Commit 4eb0a73f authored by ElenaSubbotina's avatar ElenaSubbotina

PptxFormat - delete unused

OdfFormatWriter - extended text styles
parent 7929d798
......@@ -1887,7 +1887,7 @@ void odf_drawing_context::set_textarea_font(std::wstring & latin, std::wstring &
if (!impl_->current_text_properties) return;
if (!ea.empty()) impl_->current_text_properties->content_.fo_font_family_ = ea;
if (!cs.empty()) impl_->current_text_properties->content_.style_font_family_complex_= cs;
if (!cs.empty()) impl_->current_text_properties->content_.style_font_family_complex_ = cs;
if (!latin.empty()) impl_->current_text_properties->content_.style_font_family_asian_ = latin;
}
......@@ -2218,7 +2218,7 @@ void odf_drawing_context::set_text(odf_text_context* text_context)
{
if (text_context == NULL || impl_->current_level_.size() < 1 ) return;
//if (impl_->is_presentation_ && *impl_->is_presentation_) return;
if (impl_->is_presentation_ && *impl_->is_presentation_) return;
for (size_t i = 0; i < text_context->text_elements_list_.size(); i++)
{
......
......@@ -112,7 +112,7 @@ void odp_conversion_context::end_layout_slide()
void odp_conversion_context::start_text_context()
{
text_context_ = new odf_text_context(this);
text_context_->set_styles_context(slide_context_.get_styles_context());
}
void odp_conversion_context::end_text_context()
{
......
......@@ -53,6 +53,11 @@ void odp_slide_context::set_styles_context(odf_style_context* styles_context)
styles_context_ = styles_context;
}
odf_style_context* odp_slide_context::get_styles_context()
{
return styles_context_;
}
odp_page_state & odp_slide_context::state()
{
return page_state_list_.back();
......
......@@ -53,7 +53,8 @@ public:
void start_page (office_element_ptr & elm);
void end_page ();
void set_styles_context (odf_style_context* styles_context);
void set_styles_context(odf_style_context* styles_context);
odf_style_context* get_styles_context();
odp_page_state & state();
......
......@@ -417,15 +417,11 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
}
if (type < 0)return;
/////////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
odf_context()->drawing_context()->start_shape(type);
//if (oox_shape->levelUp)
//{
// convert((PPTX::Logic::SpPr *)&oox_shape->levelUp->spPr, oox_shape->levelUp->style.GetPointer());
//}
convert(&oox_shape->spPr, oox_shape->style.GetPointer());
//имя, описалово, номер ...
convert(&oox_shape->nvSpPr);
if (oox_shape->txXfrm.IsInit() == false)
......@@ -453,6 +449,7 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
odf_context()->drawing_context()->end_drawing();
}
}
void OoxConverter::convert(PPTX::Logic::SpPr *oox_spPr, PPTX::Logic::ShapeStyle* oox_sp_style)
{
if (oox_spPr == NULL) return;
......@@ -1074,8 +1071,8 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
//свойства могут быть приписаны не только к параграфу, но и к самому объекту
if (!paragraph_properties)
{
odf_context()->styles_context()->create_style(L"", odf_types::style_family::Paragraph, true, false, -1);
paragraph_properties = odf_context()->styles_context()->last_state()->get_paragraph_properties();
odf_context()->text_context()->get_styles_context()->create_style(L"", odf_types::style_family::Paragraph, true, false, -1);
paragraph_properties = odf_context()->text_context()->get_styles_context()->last_state()->get_paragraph_properties();
//if(list_present && oox_list_style)
//{
......@@ -1196,11 +1193,9 @@ void OoxConverter::convert(PPTX::Logic::TextParagraphPr *oox_paragraph_pr, odf_w
//nullable<SimpleTypes::CCoordinate32<> > m_oDefTabSz;
//nullable<SimpleTypes::CTextFontAlignType<>> m_oFontAlgn;
if (oox_paragraph_pr->defRPr.IsInit())//может быть пустым !!!
if (oox_paragraph_pr->defRPr.IsInit())
{
odf_writer::style_text_properties * text_properties = odf_context()->text_context()->get_text_properties();
odf_writer::style_text_properties * text_properties = odf_context()->text_context()->get_styles_context()->last_state()->get_text_properties();
if (text_properties)
convert(oox_paragraph_pr->defRPr.GetPointer(), text_properties);
......@@ -1231,6 +1226,8 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
if (!oox_run_pr) return;
if (!text_properties) return;
PPTX::Theme *theme = oox_theme();
PPTX::Logic::GradFill* gradFill = &oox_run_pr->Fill.as<PPTX::Logic::GradFill>();
if (gradFill)
{
......@@ -1243,8 +1240,19 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
odf_context()->drawing_context()->end_area_properties();
}
}
PPTX::Logic::SolidFill* solidFill = &oox_run_pr->Fill.as<PPTX::Logic::SolidFill>();
if (solidFill)
{
std::wstring hexColor;
_CP_OPT(double) opacity;
convert(&solidFill->Color, hexColor, opacity);
int res = 0;
if ((res = hexColor.find(L"#")) < 0) hexColor = std::wstring(L"#") + hexColor;
text_properties->content_.fo_color_ = odf_types::color(hexColor);
}
if (oox_run_pr->ln.IsInit())
if (oox_run_pr->ln.IsInit() && oox_run_pr->ln->Fill.getType() != OOX::et_a_noFill)
{
if (odf_context()->drawing_context()->change_text_box_2_wordart())
{
......@@ -1257,7 +1265,6 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
}
}
//
if (oox_run_pr->b.IsInit())
{
if (oox_run_pr->b.get() == true)
......@@ -1266,17 +1273,6 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
text_properties->content_.fo_font_weight_ = odf_types::font_weight(odf_types::font_weight::WNormal);
}
PPTX::Logic::SolidFill* solidFill = &oox_run_pr->Fill.as<PPTX::Logic::SolidFill>();
if (solidFill)
{
std::wstring hexColor;
_CP_OPT(double) opacity;
convert(&solidFill->Color, hexColor, opacity);
int res = 0;
if ((res = hexColor.find(L"#")) < 0) hexColor = std::wstring(L"#") + hexColor;
text_properties->content_.fo_color_ = odf_types::color(hexColor);
}
if (oox_run_pr->i.IsInit())
{
if (oox_run_pr->i.get() ==true)
......@@ -1293,7 +1289,17 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
if (oox_run_pr->latin.IsInit())
{
if (!oox_run_pr->latin->typeface.empty())
text_properties->content_.fo_font_family_ = oox_run_pr->latin->typeface;
{
std::wstring font = oox_run_pr->latin->typeface;
if (font == L"+mj-lt")
font = theme->themeElements.fontScheme.majorFont.latin.typeface;
else if (font == L"+mn-lt")
font = theme->themeElements.fontScheme.minorFont.latin.typeface;
if (!font.empty())
text_properties->content_.fo_font_family_ = font;
}
else
{
text_properties->content_.fo_font_family_ = L"Calibri";//default_font; ????
......@@ -1302,7 +1308,17 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
if (oox_run_pr->ea.IsInit())
{
if (!oox_run_pr->ea->typeface.empty())
text_properties->content_.style_font_family_asian_ = oox_run_pr->ea->typeface;
{
std::wstring font = oox_run_pr->ea->typeface;
if (font == L"+mj-ea")
font = theme->themeElements.fontScheme.majorFont.ea.typeface;
else if (font == L"+mn-ea")
font = theme->themeElements.fontScheme.minorFont.ea.typeface;
if (!font.empty())
text_properties->content_.style_font_family_asian_ = font;
}
else
{
}
......@@ -1310,7 +1326,17 @@ void OoxConverter::convert(PPTX::Logic::RunProperties *oox_run_pr, odf_writer::s
if (oox_run_pr->cs.IsInit())
{
if (!oox_run_pr->cs->typeface.empty())
text_properties->content_.style_font_family_complex_ = oox_run_pr->cs->typeface;
{
std::wstring font = oox_run_pr->cs->typeface;
if (font == L"+mj-cs")
font = theme->themeElements.fontScheme.majorFont.cs.typeface;
else if (font == L"+mn-cs")
font = theme->themeElements.fontScheme.minorFont.cs.typeface;
if (!font.empty())
text_properties->content_.style_font_family_complex_ = font;
}
else
{
}
......@@ -1439,20 +1465,22 @@ void OoxConverter::convert(PPTX::Logic::TxBody *oox_txBody, PPTX::Logic::ShapeSt
odf_context()->start_text_context();
for (size_t i = 0; i < oox_txBody->Paragrs.size(); i++)
{
convert(&oox_txBody->Paragrs[i], oox_txBody->lstStyle.GetPointer());
}
odf_context()->drawing_context()->set_text( odf_context()->text_context());
//наложим внешние настройки для текста
//внешние настройки для текста
convert(oox_txBody->bodyPr.GetPointer());
if (oox_style)
{
convert(&oox_style->fontRef);
}
odf_context()->end_text_context();
}
void OoxConverter::convert(PPTX::Logic::ArcTo *oox_geom_path)
......@@ -1585,7 +1613,15 @@ void OoxConverter::convert(PPTX::Logic::FontRef *style_font_ref)
style_font = &theme->themeElements.fontScheme.minorFont;
}
if (style_font)
odf_context()->drawing_context()->set_textarea_font(style_font->latin.typeface, style_font->ea.typeface, style_font->cs.typeface);
{
std::wstring latin = style_font->latin.typeface;
std::wstring ea = style_font->ea.typeface;
std::wstring cs = style_font->cs.typeface;
//theme->themeElements.fontScheme
odf_context()->drawing_context()->set_textarea_font(latin, ea, cs);
}
}
}
......
......@@ -2248,32 +2248,25 @@ void DocxConverter::convert(SimpleTypes::CTheme<>* oox_font_theme, _CP_OPT(std::
case SimpleTypes::themeMajorAscii:
case SimpleTypes::themeMajorHAnsi :
font = docx_theme->themeElements.fontScheme.majorFont.latin.typeface;
if (font.length() > 0) odf_font_name = font;
break;
case SimpleTypes::themeMajorBidi:
font = docx_theme->themeElements.fontScheme.majorFont.cs.typeface;
if (font.length() > 0) odf_font_name = font;
break;
case SimpleTypes::themeMajorEastAsia:
font = docx_theme->themeElements.fontScheme.majorFont.ea.typeface;
if (font.length() > 0) odf_font_name = font;
break;
case SimpleTypes::themeMinorAscii:
case SimpleTypes::themeMinorHAnsi:
font = docx_theme->themeElements.fontScheme.minorFont.latin.typeface;
if (font.length() > 0) odf_font_name = font;
break;
case SimpleTypes::themeMinorBidi:
font = docx_theme->themeElements.fontScheme.minorFont.cs.typeface;
if (font.length() > 0) odf_font_name = font;
break;
case SimpleTypes::themeMinorEastAsia:
font = docx_theme->themeElements.fontScheme.minorFont.ea.typeface;
if (font.length() > 0) odf_font_name = font;
break;
}
if (!font.empty()) odf_font_name = font;
}
void DocxConverter::convert(OOX::Logic::CText *oox_text)
......
......@@ -897,23 +897,16 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, bool bPlaceholde
smart_ptr<PPTX::WrapperWritingElement> pElem = oox_slide->spTree.SpTreeElems[i].GetElem();
smart_ptr<PPTX::Logic::Shape> pShape = pElem.smart_dynamic_cast<PPTX::Logic::Shape>();
if (pShape.IsInit() && pShape->nvSpPr.nvPr.ph.is_init())
if (pShape.IsInit())
{
if (bPlaceholders)
{
pShape->FillLevelUp();
PPTX::Logic::Shape update_shape;
if (pShape->levelUp)
pShape->levelUp->Merge(update_shape, true);
pShape->Merge(update_shape);
pShape->FillLevelUp();
if (!bPlaceholders && pShape->nvSpPr.nvPr.ph.is_init())
continue;
OoxConverter::convert(&update_shape);
}
//else
//{
// OoxConverter::convert(pShape.operator->());
//}
PPTX::Logic::Shape update_shape;
pShape->Merge(update_shape);
OoxConverter::convert(&update_shape);
}
else
{
......
......@@ -36,7 +36,6 @@
#include "./../WrapperWritingElement.h"
#include "NvGraphicFramePr.h"
#include "Xfrm.h"
#include "ShapeProperties.h"
#include "Table/Table.h"
#include "SmartArt.h"
#include "Pic.h"
......
......@@ -38,8 +38,6 @@
#include "SpPr.h"
#include "ShapeStyle.h"
#include "TxBody.h"
#include "ShapeProperties.h"
#include "ShapeTextProperties.h"
#include "UniFill.h"
#include "Ln.h"
......@@ -303,19 +301,10 @@ namespace PPTX
}
std::wstring GetText()const{if(txBody.IsInit()) return txBody->GetText(); return _T(""); };
void GetShapeFullDescription(Shape& shape, int level = 0)const;
void GetRect(Aggplus::RECT& pRect)const;
DWORD GetFill(UniFill& fill)const;
DWORD GetLine(Ln& line)const;
void FillLevelUp();
void Merge(Shape& shape, bool bIsSlidePlaceholder = false);
void FillShapeProperties(ShapeProperties& props);
void FillShapeTextProperties(CShapeTextProperties& props);
void FillLevelUp()const;
mutable Shape const * levelUp;
void Merge(Shape& shape, bool bIsSlidePlaceholder = false)const;
public:
void SetLevelUpElement(const Shape& p)const{levelUp = &p;};
void SetLevelUpElement( Shape* p){m_pLevelUp = p;};
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const;
void toXmlWriterVML (NSBinPptxRW::CXmlWriter* pWriter, smart_ptr<PPTX::Theme>& oTheme, smart_ptr<PPTX::Logic::ClrMap>& oClrMap, bool in_group = false);
......@@ -326,8 +315,10 @@ namespace PPTX
//-------------------------------------------------------------------------------------------------
std::wstring m_name;
bool m_bOleShape;
Shape * m_pLevelUp;
int m_nMasterTextType;
bool m_bIsFontRefInSlide;
//-------------------------------------------------------------------------------------------------
NvSpPr nvSpPr;
SpPr spPr;
nullable<ShapeStyle> style;
......@@ -338,10 +329,6 @@ namespace PPTX
nullable<OOX::Logic::CSdtContent> oTextBoxShape;
nullable<BodyPr> oTextBoxBodyPr;
bool isFontRefInSlide;
mutable nullable<TextParagraphPr> body[10];
// Attributes
nullable_bool attrUseBgFill;
protected:
virtual void FillParentPointersForChilds();
......
This diff is collapsed.
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef PPTX_LOGIC_SHAPEPROPERTIES_INCLUDE_H_
#define PPTX_LOGIC_SHAPEPROPERTIES_INCLUDE_H_
#include "RunProperties.h"
#include "TextListStyle.h"
#include "TxBody.h"
#include "FontRef.h"
#include "TextParagraphPr.h"
#include "BodyPr.h"
#include "TextFont.h"
namespace PPTX
{
namespace Logic
{
class ShapeProperties
{
public:
ShapeProperties();
virtual ~ShapeProperties();
private:
nullable<FontRef> fontStyle;
nullable<TextParagraphPr> levels[10];
nullable<TextParagraphPr> masters[10];
nullable<BodyPr> bodyPr;
//std::string MajorLatin;
//std::string MinorLatin;
TextFont MajorLatin;
TextFont MinorLatin;
DWORD m_nTextType;
public:
void SetTextType(DWORD dwType) { m_nTextType = 0; }
DWORD GetTextType()const { return m_nTextType; }
void FillFromTextListStyle(const nullable<TextListStyle>& Src);
void FillFromTextListStyle(const TextListStyle& Src);
void FillFromTextBody(const nullable<TxBody>& Src);
void FillFontRef(const FontRef& Src);
void FillMasterFontSize(int size);
//void SetMajorLatin(const std::string& mjltFont){MajorLatin = mjltFont;};
//void SetMinorLatin(const std::string& mnltFont){MinorLatin = mnltFont;};
void SetMajorLatin(const TextFont& mjltFont){MajorLatin = mjltFont;};
void SetMinorLatin(const TextFont& mnltFont){MinorLatin = mnltFont;};
std::wstring GetAnchor()const{return bodyPr.IsInit() ? bodyPr->anchor.get_value_or(L"t") : L"t";};
std::wstring GetParagraphAlgn (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphLeftMargin (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphIndent (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphDefTabSz (int level, const nullable<TextParagraphPr>& pParagraph)const;
std::wstring GetParagraphFontAlgn (int level, const nullable<TextParagraphPr>& pParagraph)const;
bool GetParagraphLatinLnBrk (int level, const nullable<TextParagraphPr>& pParagraph)const;
bool GetParagraphRtl (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphLnSpc (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphSpcAft (int level, const nullable<TextParagraphPr>& pParagraph)const;
int GetParagraphSpcBef (int level, const nullable<TextParagraphPr>& pParagraph)const;
bool HasParagraphBullet (int level, const nullable<TextParagraphPr>& pParagraph)const;
bool GetRunBold (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
bool GetRunItalic (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
std::wstring GetRunUnderline (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
std::wstring GetRunStrike (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
std::wstring GetRunCap (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
int GetRunBaseline (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
int GetRunSize (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
int GetRunSize (int level)const;
std::wstring GetRunFont (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph, LONG& lFontIndex)const;
std::wstring GetRunPanose (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
BYTE GetRunCharset (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
BYTE GetRunPitchFamily (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetRunRGBA (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetRunARGB (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetRunBGRA (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetRunABGR (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
PPTX::Logic::UniColor GetColor(int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
PPTX::Logic::UniColor GetColorBullet(int level, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetHyperlinkRGBA()const;
DWORD GetHyperlinkARGB()const;
DWORD GetHyperlinkBGRA()const;
DWORD GetHyperlinkABGR()const;
void SetParentFilePointer(const WrapperFile* pFile);
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_SHAPEPROPERTIES_INCLUDE_H
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef PPTX_LOGIC_SHAPETEXTPROPERTIES_INCLUDE_H_
#define PPTX_LOGIC_SHAPETEXTPROPERTIES_INCLUDE_H_
#include "RunProperties.h"
#include "TextListStyle.h"
#include "TxBody.h"
#include "FontRef.h"
#include "TextParagraphPr.h"
#include "BodyPr.h"
#include "TextFont.h"
namespace PPTX
{
namespace Logic
{
class CFontInfo
{
public:
LONG FontRef;
std::wstring strFontName;
std::wstring strPanose;
std::wstring strPitchFamily;
BYTE Charset;
public:
CFontInfo()
{
FontRef = -1;
strFontName = _T("");
strPanose = _T("");
strPitchFamily = _T("");
Charset = 0;
}
CFontInfo(const CFontInfo& oSrc)
{
*this = oSrc;
}
CFontInfo& operator=(const CFontInfo& oSrc)
{
FontRef = oSrc.FontRef;
strFontName = oSrc.strFontName;
strPanose = oSrc.strPanose;
strPitchFamily = oSrc.strPitchFamily;
Charset = oSrc.Charset;
return *this;
}
};
class CShapeTextProperties
{
public:
CShapeTextProperties();
virtual ~CShapeTextProperties();
private:
nullable<FontRef> m_FontStyle;
LONG m_lTextType;
nullable<TextParagraphPr> m_levels[10];
nullable<TextParagraphPr> m_body[10];
nullable<BodyPr> bodyPr;
// просто указатель - он должен выставиться из темы
std::vector<nullable<TextParagraphPr>*>* m_masters;
TextFont MajorLatin;
TextFont MinorLatin;
bool m_bIsFontRefFromSlide;
int m_lMasterTextSize; // заглушка под таблицы.
bool m_bIsSlideShape;
const WrapperFile* m_pFile;
public:
void FillTextType(const LONG& lTextMasterType);
void FillFromTextBody(const nullable<TxBody>& Src, const nullable<TextParagraphPr>* bodyStyles);
void FillFontRef(const FontRef& Src, const bool& bIsSlideProperty);
void FillMasterFontSize(int size);
AVSINLINE void SetMajorLatin(const TextFont& mjltFont){MajorLatin = mjltFont;};
AVSINLINE void SetMinorLatin(const TextFont& mnltFont){MinorLatin = mnltFont;};
AVSINLINE void SetMasterStyles(std::vector<nullable<TextParagraphPr>*>* pStyles) { m_masters = pStyles; }
AVSINLINE nullable<TextParagraphPr>* GetLevels()
{
if (!m_bIsSlideShape)
return NULL;
return m_levels;
}
AVSINLINE nullable<TextParagraphPr>* GetLevelsBody() { return m_body; }
AVSINLINE LONG GetTextType() { return m_lTextType; }
AVSINLINE LONG GetFontRef(bool& bIsSlideSetUp)
{
bIsSlideSetUp = m_bIsFontRefFromSlide;
if (m_FontStyle.is_init() && m_FontStyle->idx.is_init())
{
return (m_FontStyle->idx->get() == _T("minor")) ? 1 : 0;
}
return -1;
}
std::wstring GetAnchor()const{return bodyPr.IsInit() ? bodyPr->anchor.get_value_or(L"t") : L"t"; };
nullable_base<WORD> GetParagraphAlgn (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<LONG> GetParagraphLeftMargin (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<LONG> GetParagraphIndent (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<LONG> GetParagraphDefTabSz (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<WORD> GetParagraphFontAlgn (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<WORD> GetParagraphLatinLnBrk (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<WORD> GetParagraphRtl (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<LONG> GetParagraphLnSpc (int level, const nullable<TextParagraphPr>& pParagraph, const double& LnSpcReduction)const;
nullable_base<LONG> GetParagraphSpcAft (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<LONG> GetParagraphSpcBef (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<bool> GetHasBullet (int level, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<bool> GetRunBold (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<bool> GetRunItalic (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<bool> GetRunUnderline (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<bool> GetRunStrike (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<WORD> GetRunCap (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<double> GetRunBaseline (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
nullable_base<WORD> GetRunSize (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph, const double& FontScale)const;
nullable_base<CFontInfo> GetRunFont (int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
PPTX::Logic::UniColor GetColor(int level, const nullable<RunProperties>& pRun, const nullable<TextParagraphPr>& pParagraph)const;
PPTX::Logic::UniColor GetColorBullet(int level, const nullable<TextParagraphPr>& pParagraph)const;
DWORD GetHyperlinkRGBA()const;
DWORD GetHyperlinkARGB()const;
DWORD GetHyperlinkBGRA()const;
DWORD GetHyperlinkABGR()const;
void SetParentFilePointer(const WrapperFile* pFile);
};
} // namespace Logic
} // namespace PPTX
#endif // PPTX_LOGIC_SHAPETEXTPROPERTIES_INCLUDE_H_
......@@ -37,8 +37,6 @@
#include "./../Logic/NvGrpSpPr.h"
#include "./../Logic/GrpSpPr.h"
#include "SpTreeElem.h"
#include "ShapeProperties.h"
#include "ShapeTextProperties.h"
#include "../../../DesktopEditor/graphics/aggplustypes.h"
......
......@@ -114,16 +114,5 @@ namespace PPTX
CellProperties->SetParentPointer(this);
}
void TableCell::GetShapeProperties(ShapeProperties& props)const
{
if(parentFileIs<Slide>())
{
parentFileAs<Slide>().FillShapeProperties(props, _T("table-cell"));
props.FillFromTextBody(txBody);
//props.SetParentFilePointer(parentFile);
}
}
} // namespace Logic
} // namespace PPTX
......@@ -36,7 +36,6 @@
#include "./../../WrapperWritingElement.h"
#include "./../TxBody.h"
#include "TableCellProperties.h"
#include "../ShapeProperties.h"
namespace PPTX
{
......@@ -59,8 +58,6 @@ namespace PPTX
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
virtual void GetShapeProperties(ShapeProperties& props)const;
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
{
pWriter->StartNode(_T("a:tc"));
......
......@@ -138,7 +138,6 @@ namespace PPTX
pWriter->EndNode(_T("p:txStyles"));
}
public:
nullable<TextListStyle> titleStyle;
nullable<TextListStyle> bodyStyle;
nullable<TextListStyle> otherStyle;
......
......@@ -52,7 +52,6 @@
#include "Logic/CxnSp.h"
#include "Logic/GraphicFrame.h"
#include "Logic/TxBody.h"
#include "Logic/ShapeProperties.h"
#include "Logic/SpTree.h"
#include "Logic/UniFill.h"
#include "Logic/UniColor.h"
......
......@@ -41,7 +41,6 @@
#include "Logic/Transitions/Transition.h"
#include "Logic/Timing/Timing.h"
#include "Logic/ShapeProperties.h"
#include "Logic/Bg.h"
#include "Theme.h"
......@@ -73,8 +72,6 @@ namespace PPTX
virtual ~Slide()
{
}
public:
virtual void read(const OOX::CPath& filename, FileMap& map)
{
//FileContainer::read(filename, map);
......@@ -147,38 +144,7 @@ namespace PPTX
return type().DefaultFileName();
}
//-------------------------------------------------
virtual void FillShapeProperties(Logic::ShapeProperties& props, const std::wstring& type)const
{
if (Layout.IsInit())
Layout->FillShapeProperties(props, type);
}
virtual void FillShapeTextProperties(Logic::CShapeTextProperties& props, const std::wstring& type)const
{
if (Layout.IsInit())
Layout->FillShapeTextProperties(props, type);
}
virtual bool GetBackground(Logic::BgPr& bg, DWORD& ARGB)const
{
if (cSld->bg.is_init())
{
if(cSld->bg->bgPr.is_init())
bg = cSld->bg->bgPr.get();
else if(cSld->bg->bgRef.is_init())
{
ARGB = cSld->bg->bgRef->Color.GetARGB();
theme->themeElements.fmtScheme.GetFillStyle(cSld->bg->bgRef->idx.get_value_or(0), bg.Fill);
}
return true;
}
else//from slideLayout
{
if (Layout.IsInit())
Layout->GetBackground(bg, ARGB);
return false;
}
return false;
}
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::Image> p = GetImage(rid);
......@@ -362,7 +328,6 @@ namespace PPTX
pReader->Seek(end);
}
public:
nullable_bool show;
nullable_bool showMasterPhAnim;
nullable_bool showMasterSp;
......@@ -380,8 +345,7 @@ namespace PPTX
smart_ptr<TableStyles> tableStyles_;
smart_ptr<PPTX::Comments> comments;
public:
//--------------------------------------------------------------------------------------
void ApplyRels()
{
Layout = FileContainer::Get(OOX::Presentation::FileTypes::SlideLayout).smart_dynamic_cast<PPTX::SlideLayout>();//boost::shared_dynamic_cast<PPTX::SlideLayout, PPTX::File>(FileContainer::get(OOX::Presentation::FileTypes::SlideLayout));
......
......@@ -46,7 +46,6 @@
#include "Logic/SpTreeElem.h"
#include "Logic/Shape.h"
#include "Logic/ShapeProperties.h"
#include "Theme.h"
#include "SlideMaster.h"
......@@ -73,8 +72,6 @@ namespace PPTX
virtual ~SlideLayout()
{
}
public:
virtual void read(const OOX::CPath& filename, FileMap& map)
{
m_sOutputFilename = filename.GetFilename();
......@@ -114,7 +111,6 @@ namespace PPTX
FileContainer::write(filename, directory, content);
}
public:
virtual const OOX::FileType type() const
{
return OOX::Presentation::FileTypes::SlideLayout;
......@@ -128,103 +124,40 @@ namespace PPTX
return type().DefaultFileName();
}
public:
virtual void GetLevelUp(const Logic::Shape& pShape)const
virtual void GetLevelUp(Logic::Shape* pShape)
{
if(pShape.nvSpPr.nvPr.ph.is_init())
if (!pShape) return;
if(pShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring idx = /*pShape.nvSpPr->nvPr->ph.is_init()?*/pShape.nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));//:"";
std::wstring type = /*pShape.nvSpPr->nvPr->ph.is_init()?*/pShape.nvSpPr.nvPr.ph->type.get_value_or(_T("body"));//:"";
if(type == _T("ctrTitle"))
type = _T("title");
std::wstring idx = pShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if(type == L"ctrTitle") type = L"title";
size_t count = cSld.spTree.SpTreeElems.size();
for(size_t i = 0; i < count; ++i)
for(size_t i = 0; i < cSld.spTree.SpTreeElems.size(); ++i)
{
const PPTX::Logic::SpTreeElem* pElem = &cSld.spTree.SpTreeElems[i];
if(pElem->is<Logic::Shape>())
smart_ptr<Logic::Shape> pLayoutShape = cSld.spTree.SpTreeElems[i].GetElem().smart_dynamic_cast<Logic::Shape>();
if(pLayoutShape.IsInit())
{
const Logic::Shape& LayoutShape = pElem->as<Logic::Shape>();
if(LayoutShape.nvSpPr.nvPr.ph.is_init())
if(pLayoutShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring lIdx = /*LayoutShape->nvSpPr->nvPr->ph.is_init()?*/LayoutShape.nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));//:"";
std::wstring lType = /*LayoutShape->nvSpPr->nvPr->ph.is_init()?*/LayoutShape.nvSpPr.nvPr.ph->type.get_value_or(_T("body"));//:"";
if(lType == _T("ctrTitle"))
lType = _T("title");
std::wstring lIdx = pLayoutShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring lType = pLayoutShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if(lType == _T("ctrTitle")) lType = _T("title");
if((type == lType) && (idx == lIdx))
{
pShape.SetLevelUpElement(LayoutShape);
pShape->SetLevelUpElement(pLayoutShape.operator->());
return;
}
//if(lType == "ctrTitle")
// lType = "title";
//if(idx == LayoutShape->nvSpPr->nvPr->idx.get_value_or("0"))
//{
// if((type == LayoutShape->nvSpPr->nvPr->type.get_value_or("")) || ((type == "") && (LayoutShape->nvSpPr->nvPr->type.get_value_or("") != "")))
// pShape->SetLevelUpElement(LayoutShape);
// return;
//}
//if((type == lType) && (type != ""))
//{
// if(idx == lIdx)
// {
// pShape.SetLevelUpElement(LayoutShape);
// return;
// }
// continue;
//}
//if((type == lType) && (type == ""))
//{
// if((idx == lIdx) && (idx != ""))
// {
// pShape.SetLevelUpElement(LayoutShape);
// return;
// }
//}
//if(type != lType)
//{
// if((idx == lIdx) && (idx != ""))
// {
// pShape.SetLevelUpElement(LayoutShape);
// return;
// }
//}
}
}
}
}
}
virtual void FillShapeProperties(Logic::ShapeProperties& props, const std::wstring& type)const
{
if(Master.IsInit())
Master->FillShapeProperties(props, type);
}
virtual void FillShapeTextProperties(Logic::CShapeTextProperties& props, const std::wstring& type)const
{
if(Master.IsInit())
Master->FillShapeTextProperties(props, type);
}
virtual void GetBackground(Logic::BgPr& bg, DWORD& ARGB)const
{
if(cSld.bg.is_init())
{
if(cSld.bg->bgPr.is_init())
bg = cSld.bg->bgPr.get();
else if(cSld.bg->bgRef.is_init())
{
ARGB = cSld.bg->bgRef->Color.GetARGB();
theme->themeElements.fmtScheme.GetFillStyle(cSld.bg->bgRef->idx.get_value_or(0), bg.Fill);
//bg.SetParentFilePointer(this);
}
}
else//from slideMaster
{
if(Master.IsInit())
Master->GetBackground(bg, ARGB);
}
}
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::Image> p = GetImage(rid);
......
......@@ -45,7 +45,6 @@
#include "Logic/XmlId.h"
#include "Logic/Shape.h"
#include "Logic/ShapeProperties.h"
#include "Logic/TxBody.h"
#include "Logic/UniColor.h"
......@@ -72,8 +71,6 @@ namespace PPTX
virtual ~SlideMaster()
{
}
public:
virtual void read(const OOX::CPath& filename, FileMap& map)
{
m_sOutputFilename = filename.GetFilename();
......@@ -121,8 +118,6 @@ namespace PPTX
WrapperFile::write(filename, directory, content);
FileContainer::write(filename, directory, content);
}
public:
virtual const OOX::FileType type() const
{
return OOX::Presentation::FileTypes::SlideMaster;
......@@ -135,170 +130,38 @@ namespace PPTX
{
return type().DefaultFileName();
}
public:
void GetLevelUp(const Logic::Shape& pShape)const
void GetLevelUp(Logic::Shape* pShape)
{
if(pShape.nvSpPr.nvPr.ph.is_init())
if (!pShape) return;
if(pShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring idx = /*pShape.nvSpPr->nvPr->ph.is_init()?*/pShape.nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));//:"";
std::wstring type = /*pShape.nvSpPr->nvPr->ph.is_init()?*/pShape.nvSpPr.nvPr.ph->type.get_value_or(_T("body"));//:"";
if(type == _T("ctrTitle"))
type = _T("title");
std::wstring idx = pShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if (type == _T("ctrTitle")) type = _T("title");
size_t count = cSld.spTree.SpTreeElems.size();
for (size_t i = 0; i < count; ++i)
for (size_t i = 0; i < cSld.spTree.SpTreeElems.size(); ++i)
{
const PPTX::Logic::SpTreeElem* pElem = &cSld.spTree.SpTreeElems[i];
if(pElem->is<Logic::Shape>())
smart_ptr<Logic::Shape> pMasterShape = cSld.spTree.SpTreeElems[i].GetElem().smart_dynamic_cast<Logic::Shape>();
if (pMasterShape.IsInit())
{
const Logic::Shape& MasterShape = pElem->as<Logic::Shape>();
if(MasterShape.nvSpPr.nvPr.ph.is_init())
if (pMasterShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring lIdx = /*MasterShape->nvSpPr->nvPr->ph.is_init()?*/MasterShape.nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));//:"";
std::wstring lType = /*MasterShape->nvSpPr->nvPr->ph.is_init()?*/MasterShape.nvSpPr.nvPr.ph->type.get_value_or(_T("body"));//:"";
if(lType == _T("ctrTitle"))
lType = _T("title");
if(type == lType)
std::wstring lIdx = pMasterShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring lType = pMasterShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if (lType == L"ctrTitle") lType = L"title";
if (type == lType)
{
pShape.SetLevelUpElement(MasterShape);
pShape->SetLevelUpElement(pMasterShape.operator->());
return;
}
//if(idx == MasterShape->nvSpPr->nvPr->idx.get_value_or("0"))
//{
// if((type == MasterShape->nvSpPr->nvPr->type.get_value_or("")) || ((type == "") && (MasterShape->nvSpPr->nvPr->type.get_value_or("") != "")))
// pShape->SetLevelUpElement(MasterShape);
// return;
//}
//if((type == lType) && (type != ""))
//{
// //if(idx == lIdx)
// //{
// pShape.SetLevelUpElement(MasterShape);
// return;
// //}
// //continue;
//}
//if((type == lType) && (type == ""))
//{
// if((idx == lType) && (idx != ""))
// {
// pShape.SetLevelUpElement(MasterShape);
// return;
// }
//}
//if(type != lType)
//{
// if((idx == lIdx) && (idx != ""))
// {
// pShape.SetLevelUpElement(MasterShape);
// return;
// }
//}
}
}
}
}
}
void FillShapeProperties(Logic::ShapeProperties& props, const std::wstring& type)const
{
if((theme.IsInit()) && (theme->presentation.IsInit()))
{
PPTX::Presentation* pPres = const_cast<PPTX::Presentation*>(theme->presentation.operator->());
pPres->SetClrMap(clrMap);
pPres->SetClrScheme(theme->themeElements.clrScheme);
}
if((theme.IsInit()) && (type != _T("")))
theme->FillShapeProperties(props, type);
if(txStyles.is_init())
{
// props.FillFromTextListStyle(txStyles->otherStyle, true);
//if(type == "")
//{
// if(Theme->spDef.is_init())
// {
// props.FillFromTextListStyle(Theme->spDef->lstStyle, true);
// if(Theme->spDef->style.is_init())
// props.FillFontRef(Theme->spDef->style->fontRef.get());
// }
// else
// props.FillFromTextListStyle(txStyles->otherStyle, true);
// return;
//}
if((type == _T("title")) || (type == _T("ctrTitle")))
{
props.FillFromTextListStyle(txStyles->titleStyle);
props.SetTextType(1);
}
else if((type == _T("body")) || (type == _T("subTitle")) || (type == _T("obj")))
{
props.FillFromTextListStyle(txStyles->bodyStyle);
props.SetTextType(2);
}
else if(type != _T(""))
{
props.FillFromTextListStyle(txStyles->otherStyle);
props.SetTextType(3);
}
else
{
props.FillFromTextListStyle(txStyles->otherStyle);
props.SetTextType(3);
if(theme.IsInit())
theme->FillShapeProperties(props, type);
}
}
}
void FillShapeTextProperties(Logic::CShapeTextProperties& props, const std::wstring& type)const
{
if((theme.IsInit()) && (theme->presentation.IsInit()))
{
PPTX::Presentation* pPres = const_cast<PPTX::Presentation*>(theme->presentation.operator->());
pPres->SetClrMap(clrMap);
pPres->SetClrScheme(theme->themeElements.clrScheme);
}
if (type == _T("table-cell"))
props.FillMasterFontSize(1800);
if ((type == _T("title")) || (type == _T("ctrTitle")))
{
props.FillTextType(1);
}
else if ((type == _T("body")) || (type == _T("subTitle")) || (type == _T("obj")))
{
props.FillTextType(2);
}
else if (type != _T(""))
{
props.FillTextType(3);
}
else
{
props.FillTextType(0);
}
}
void GetBackground(Logic::BgPr& bg, DWORD& ARGB)const
{
if(cSld.bg.is_init())
{
if(cSld.bg->bgPr.is_init())
bg = cSld.bg->bgPr.get();
else if(cSld.bg->bgRef.is_init())
{
ARGB = cSld.bg->bgRef->Color.GetARGB();
theme->themeElements.fmtScheme.GetFillStyle(cSld.bg->bgRef->idx.get_value_or(0), bg.Fill);
// bg.SetParentFilePointer(this);
}
}
}
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::Image> p = GetImage(rid);
......@@ -321,8 +184,7 @@ namespace PPTX
return p->filename().m_strFilename;
}
//---------------------Colors from map---------------------------------------
//---------------------Colors from map---------------------------------------
DWORD GetRGBAFromMap(const std::wstring& str)const
{
return theme->GetRGBAFromScheme(clrMap.GetColorSchemeIndex(str));
......@@ -342,9 +204,7 @@ namespace PPTX
{
return theme->GetABGRFromScheme(clrMap.GetColorSchemeIndex(str));
}
//---------------------------Colors from scheme------------------------------
//---------------------------Colors from scheme------------------------------
DWORD GetRGBAFromScheme(const std::wstring& str)const
{
return theme->GetRGBAFromScheme(str);
......@@ -365,7 +225,7 @@ namespace PPTX
return theme->GetABGRFromScheme(str);
}
//void ApplyColors();
virtual void toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
{
pWriter->StartRecord(NSBinPptxRW::NSMainTables::SlideMasters);
......@@ -476,7 +336,8 @@ namespace PPTX
pReader->Seek(end);
}
public:
Logic::CSld cSld;
Logic::ClrMap clrMap;
std::vector<Logic::XmlId> sldLayoutIdLst;
......@@ -490,7 +351,6 @@ namespace PPTX
smart_ptr<TableStyles> tableStyles;
smart_ptr<OOX::CVmlDrawing> Vml;
public:
void ApplyRels()
{
theme = (FileContainer::Get(OOX::FileTypes::Theme)).smart_dynamic_cast<PPTX::Theme>();
......
......@@ -40,7 +40,6 @@
#include "Logic/DefaultShapeDefinition.h"
#include "Theme/ExtraClrScheme.h"
#include "Logic/ShapeProperties.h"
#include "Logic/ClrMap.h"
#include "Presentation.h"
......@@ -325,24 +324,6 @@ namespace PPTX
return GetABGRFromScheme(m_map->GetColorSchemeIndex(str));
}
virtual void FillShapeProperties(Logic::ShapeProperties& props, const std::wstring& type)const
{
if(presentation.IsInit())
{
props.FillFromTextListStyle(presentation->defaultTextStyle);
props.SetTextType(0);
}
if(type == _T("table-cell"))
props.FillMasterFontSize(1800);
//if(spDef.is_init())
//{
// props.FillFromTextListStyle(spDef->lstStyle, true);
// if(spDef->style.is_init())
// props.FillFontRef(spDef->style->fontRef.get());
//}
props.SetMajorLatin(themeElements.fontScheme.majorFont.latin);
props.SetMinorLatin(themeElements.fontScheme.minorFont.latin);
}
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
{
smart_ptr<OOX::Image> p = GetImage(rid);
......
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="PPTXFormat"
ProjectGUID="{36636678-AE25-4BE6-9A34-2561D1BCF302}"
RootNamespace="PPTXFormat"
......@@ -2756,124 +2756,10 @@
RelativePath="..\.\PPTXFormat\Logic\Shape.h"
>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\ShapeProperties.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\ShapeProperties.h"
>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\ShapeStyle.h"
>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\ShapeTextProperties.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|Win32"
>
<Tool
Name="VCCLCompilerTool"
PrecompiledHeaderThrough="./StdAfx.h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\ShapeTextProperties.h"
>
</File>
<File
RelativePath="..\.\PPTXFormat\Logic\Sp3d.h"
>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment