Compare commits

..

8 Commits

23 changed files with 778 additions and 153 deletions

View File

@ -131,6 +131,7 @@ text_tracked_context::_state & text_tracked_context::get_tracked_change(std::wst
//----------------------------------------------------------------------------------------------------------------
docx_conversion_context::docx_conversion_context(odf_reader::odf_document * OdfDocument) :
last_dump_page_properties_ (true),
next_dump_page_properties_ (false),
page_break_ (false),
page_break_after_ (false),
@ -1425,14 +1426,22 @@ void docx_conversion_context::next_dump_page_properties(bool val)
if (process_headers_footers_ && val) return;
next_dump_page_properties_ = val;
if (val)
last_dump_page_properties(true);
}
bool docx_conversion_context::is_next_dump_page_properties()
{
return next_dump_page_properties_;
}
void docx_conversion_context::last_dump_page_properties(bool val)
{
last_dump_page_properties_ = val;
}
bool docx_conversion_context::is_last_dump_page_properties()
{
return last_dump_page_properties_;
}
void docx_conversion_context::start_text_list_style(const std::wstring & StyleName)
{
text_list_style_name_ = StyleName;

View File

@ -793,6 +793,7 @@ public:
bool next_dump_page_properties_;
bool next_dump_section_;
bool last_dump_page_properties_;
odf_reader::odf_document *root()
{
@ -862,6 +863,8 @@ public:
void next_dump_page_properties (bool val);
bool is_next_dump_page_properties ();
void last_dump_page_properties (bool val);
bool is_last_dump_page_properties ();
void set_master_page_name(const std::wstring & MasterPageName);
const std::wstring & get_master_page_name() const;

View File

@ -172,6 +172,8 @@ std::wstring mediaitems::create_file_name(const std::wstring & uri, RelsType typ
if (type == typeOleObject && sExt.empty())
sExt = L".bin";
else if ( type == typeChart)
sExt = L".xml";
return get_default_file_name(type) + std::to_wstring(Num) + sExt;
}
@ -240,8 +242,6 @@ std::wstring mediaitems::add_or_find(const std::wstring & href, RelsType type, b
std::wstring inputPath = isMediaInternal ? odf_packet_ + FILE_SEPARATOR_STR + href : href;
std::wstring outputPath = isMediaInternal ? ( sub_path + inputFileName) : href;
if ( type == typeChart) outputPath = outputPath + L".xml";
std::wstring id;
for (size_t i = 0 ; i < items_.size(); i++)

View File

@ -137,7 +137,8 @@ xlsx_table_state::xlsx_table_state(xlsx_conversion_context * Context, std::wstri
in_cell(false),
bEndTable(false),
bRTL(false),
bHidden(false)
bHidden(false),
bProtected(false)
{
odf_reader::style_table_properties * table_prop = NULL;
odf_reader::style_instance * tableStyle = context_->root()->odf_context().styleContainer().style_by_name(table_style_, odf_types::style_family::Table, false);

View File

@ -338,6 +338,38 @@ void xlsx_table_context::serialize_tableParts(std::wostream & _Wostream, rels &
{
if (false == xlsx_data_ranges_[it->second]->bTablePart) continue;
// из за дебелизма мсофис которому ОБЯЗАТЕЛЬНО нужно прописывать имена колонок таблицы (и они должны быть еще
// прописаны и в самих данных таблицы !!
int i = xlsx_data_ranges_[it->second]->header_values.size() - 1;
for (; i >= 0; i--)
{
if (false == xlsx_data_ranges_[it->second]->header_values[i].empty())
{
break;
}
}
if (i == -1)
{
xlsx_data_ranges_[it->second]->bTablePart = false;
continue;
}
else
{
size_t erase = xlsx_data_ranges_[it->second]->header_values.size() - 1 - i;
if (erase > 0)
{
xlsx_data_ranges_[it->second]->header_values.erase(xlsx_data_ranges_[it->second]->header_values.begin() + i + 1, xlsx_data_ranges_[it->second]->header_values.end());
xlsx_data_ranges_[it->second]->cell_end.first -= erase;
std::wstring ref1 = getCellAddress(xlsx_data_ranges_[it->second]->cell_start.first, xlsx_data_ranges_[it->second]->cell_start.second);
std::wstring ref2 = getCellAddress(xlsx_data_ranges_[it->second]->cell_end.first, xlsx_data_ranges_[it->second]->cell_end.second);
xlsx_data_ranges_[it->second]->ref = ref1 + L":" + ref2;
}
}
//--------------------------------------------------------
size_t id = xlsx_conversion_context_->get_table_parts_size() + 1;
std::wstring rId = L"tprtId" + std::to_wstring(id);
@ -351,10 +383,10 @@ void xlsx_table_context::serialize_tableParts(std::wostream & _Wostream, rels &
}
}
Rels.add( relationship(rId, L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table", ref));
//--------------------------------------------------------
std::wstringstream strm;
CP_XML_WRITER(strm)
{
{
CP_XML_NODE(L"table")
{
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");

View File

@ -151,7 +151,10 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
{
if (page_layout_instance *lastPageLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_by_name(Context.get_page_properties()))
{
Context.next_dump_page_properties(true);
if (Context.is_last_dump_page_properties())
{
Context.next_dump_page_properties(true);
}
lastPageLayout->docx_serialize(Context.output_stream(), Context);
//Context.remove_page_properties();

View File

@ -129,6 +129,16 @@ void office_text::add_child_element( xml::sax * Reader, const std::wstring & Ns,
else if (is_text_content(Ns, Name))
{
CP_CREATE_ELEMENT(content_);
if (!first_element_style_name && (content_.back()->get_type() == typeTextP ||
content_.back()->get_type() == typeTextH))
{//bus-modern_l.ott
if (content_.back()->element_style_name)
first_element_style_name = content_.back()->element_style_name;
else
first_element_style_name = L""; //default
}
}
else
CP_NOT_APPLICABLE_ELM();
@ -155,6 +165,26 @@ void office_text::docx_convert(oox::docx_conversion_context & Context)
//forms_->docx_convert(Context);
Context.start_office_text();
if ((first_element_style_name) && (!first_element_style_name->empty()))
{
std::wstring text___ = *first_element_style_name;
const _CP_OPT(std::wstring) masterPageName = Context.root()->odf_context().styleContainer().master_page_name_by_name(text___);
if (masterPageName)
{
std::wstring masterPageNameLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(*masterPageName);
if (false == masterPageNameLayout.empty())
{
Context.set_master_page_name(*masterPageName); //проверка на то что тема действительно существует????
Context.remove_page_properties();
Context.add_page_properties(masterPageNameLayout);
}
}
}
for (size_t i = 0; i < content_.size(); i++)
{
if (content_[i]->element_style_name)

View File

@ -70,6 +70,8 @@ private:
//office_element_ptr forms_; -> content
office_element_ptr_array content_;
_CP_OPT(std::wstring) first_element_style_name;
};
CP_REGISTER_OFFICE_ELEMENT2(office_text);
//----------------------------------------------------------------------------------------------------

View File

@ -443,6 +443,8 @@ namespace {
double pixToSize(double pixels, double maxDigitSize)
{
if (pixels < 8) pixels = 8; //УВЕДОМЛЕНИЕ О ПРИБЫТИИ ИНОСТРАННОГО ГРАЖДАНИНА.ods
return (int(( pixels /*/ 0.75*/ - 5)/ maxDigitSize * 100. + 0.5)) /100. * 0.9; // * 9525. * 72.0 / (360000.0 * 2.54);
}
double cmToChars (double cm)
@ -772,10 +774,10 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
double s;
if (oox::parseTime(tv, h, m, s))
{
boost::int64_t intTime = (boost::int64_t)oox::convertTime(h, m, s);
if (intTime > 0)
double dTime = oox::convertTime(h, m, s);
if (dTime >= 0)
{
number_val = boost::lexical_cast<std::wstring>(intTime);
number_val = boost::lexical_cast<std::wstring>(dTime);
}
else
{

View File

@ -308,7 +308,7 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
}
}
}
if (next_section_/* || next_end_section_*/)
if (next_section_/* || next_end_section_*/)//remove in text::section
{
Context.get_section_context().get().is_dump_ = true;
is_empty = false;
@ -675,6 +675,7 @@ void section::add_child_element( xml::sax * Reader, const std::wstring & Ns, con
void section::docx_convert(oox::docx_conversion_context & Context)
{
bool bAddSection = false;
if ( false == Context.get_drawing_state_content())
{
std::wstring current_page_properties = Context.get_page_properties();
@ -682,6 +683,8 @@ void section::docx_convert(oox::docx_conversion_context & Context)
Context.get_section_context().add_section (section_attr_.name_, section_attr_.style_name_.get_value_or(L""), current_page_properties);
Context.add_page_properties(current_page_properties);
bAddSection = true;
}
else
{
@ -729,6 +732,11 @@ void section::docx_convert(oox::docx_conversion_context & Context)
}
content_[i]->docx_convert(Context);
}
if (bAddSection)
{
Context.get_section_context().get().is_dump_ = true;
Context.last_dump_page_properties(false);
}
}
// text-section-source-attr

View File

@ -2911,6 +2911,8 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
_CP_OPT(int) anchor_type_x, anchor_type_y;
bool bThrough = oox_anchor->m_oBehindDoc.IsInit() ? oox_anchor->m_oBehindDoc->ToBool(): false;
if (oox_anchor->m_oPositionV.IsInit() && oox_anchor->m_oPositionV->m_oRelativeFrom.IsInit())
{
int vert_rel = oox_anchor->m_oPositionV->m_oRelativeFrom->GetValue();
@ -3005,6 +3007,12 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
{
odt_context->drawing_context()->set_wrap_style(odf_types::style_wrap::None);
wrap_set = true;
if (bThrough)
{//эффект_штурмовика.docx
odt_context->drawing_context()->set_wrap_style(odf_types::style_wrap::RunThrough);
odt_context->drawing_context()->set_object_background(true);
}
}
else if (oox_anchor->m_oAllowOverlap.IsInit())
{

View File

@ -40,6 +40,8 @@
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpTree.h"
#include <iostream>
CStylesWriter::CStylesWriter() : m_pTheme(NULL) {}
CStylesWriter::CStylesWriter(NSPresentationEditor::CTheme* pTheme) : m_pTheme(pTheme) {}
@ -889,6 +891,208 @@ void NSPresentationEditor::CShapeWriter::WriteShapeInfo()
std::wstring str2 = _T("</p:nvSpPr>");
m_oWriter.WriteString(str2);
}
void NSPresentationEditor::CShapeWriter::Write3dShape()
{
CShapeElement* pShapeElement = dynamic_cast<CShapeElement*>(m_pElement.get());
if (!pShapeElement) return;
CPPTShape *pPPTShape = dynamic_cast<CPPTShape *>(pShapeElement->m_pShape->getBaseShape().get());
if (!pPPTShape) return;
if (!pPPTShape->m_o3dOptions.bEnabled) return;
//{
// std::cout << "........................................................................\n";
// std::wcout << pShapeElement->m_sName << L"\n";
// if (pPPTShape->m_o3dOptions.dSpecularAmt)
// {
// std::cout << "SpecularAmt\t" << (*pPPTShape->m_o3dOptions.dSpecularAmt) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dDiffuseAmt)
// {
// std::cout << "iffuseAmt\t" << (*pPPTShape->m_o3dOptions.dDiffuseAmt) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dShininess)
// {
// std::cout << "Shininess\t" << (*pPPTShape->m_o3dOptions.dShininess) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dXRotationAngle)
// {
// std::cout << "XRotationAngle\t" << (*pPPTShape->m_o3dOptions.dXRotationAngle) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dYRotationAngle)
// {
// std::cout << "YRotationAngle\t" << (*pPPTShape->m_o3dOptions.dYRotationAngle) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationAxisX)
// {
// std::cout << "RotationAxisX\t" << (*pPPTShape->m_o3dOptions.dRotationAxisX) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationAxisY)
// {
// std::cout << "RotationAxisY\t" << (*pPPTShape->m_o3dOptions.dRotationAxisY) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationAxisZ)
// {
// std::cout << "RotationAxisZ\t" << (*pPPTShape->m_o3dOptions.dRotationAxisZ) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationAngle)
// {
// std::cout << "RotationAngle\t" << (*pPPTShape->m_o3dOptions.dRotationAngle) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationCenterX)
// {
// std::cout << "RotationCenterX\t" << (*pPPTShape->m_o3dOptions.dRotationCenterX) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationCenterY)
// {
// std::cout << "RotationCenterY\t" << (*pPPTShape->m_o3dOptions.dRotationCenterY) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dRotationCenterZ)
// {
// std::cout << "RotationCenterZ\t" << (*pPPTShape->m_o3dOptions.dRotationCenterZ) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dTolerance)
// {
// std::cout << "Tolerance\t" << (*pPPTShape->m_o3dOptions.dTolerance) << "\n";
// }
// std::cout << "XViewpoint\t" << (pPPTShape->m_o3dOptions.dXViewpoint) << "\n";
// std::cout << "YViewpoint\t" << (pPPTShape->m_o3dOptions.dYViewpoint) << "\n";
// if (pPPTShape->m_o3dOptions.dZViewpoint)
// {
// std::cout << "ZViewpoint\t" << (*pPPTShape->m_o3dOptions.dZViewpoint) << "\n";
// }
// std::cout << "OriginX\t" << (pPPTShape->m_o3dOptions.dOriginX) << "\n";
// std::cout << "OriginY\t" << (pPPTShape->m_o3dOptions.dOriginY) << "\n";
// std::cout << "SkewAngle\t" << (pPPTShape->m_o3dOptions.dSkewAngle) << "\n";
// std::cout << "SkewAmount\t" << (pPPTShape->m_o3dOptions.nSkewAmount) << "\n";
// if (pPPTShape->m_o3dOptions.dAmbientIntensity)
// {
// std::cout << "AmbientIntensity\t" << (*pPPTShape->m_o3dOptions.dAmbientIntensity) << "\n";
// }
// if (pPPTShape->m_o3dOptions.dKeyIntensity)
// {
// std::cout << "KeyIntensity\t" << (*pPPTShape->m_o3dOptions.dKeyIntensity) << "\n";
// }
// std::cout << "KeyX\t" << (pPPTShape->m_o3dOptions.dKeyX) << "\n";
// std::cout << "KeyY\t" << (pPPTShape->m_o3dOptions.dKeyY) << "\n";
// if (pPPTShape->m_o3dOptions.dKeyZ)
// {
// std::cout << "KeyZ\t" << (*pPPTShape->m_o3dOptions.dKeyZ) << "\n";
// }
// std::cout << "FillIntensity\t" << (pPPTShape->m_o3dOptions.dFillIntensity) << "\n";
// std::cout << "FillX\t" << (pPPTShape->m_o3dOptions.dFillX) << "\n";
// std::cout << "FillY\t" << (pPPTShape->m_o3dOptions.dFillY) << "\n";
// if (pPPTShape->m_o3dOptions.dFillZ)
// {
// std::cout << "FillZ\t" << (*pPPTShape->m_o3dOptions.dFillZ) << "\n";
// }
// std::cout << "........................................................................\n";
//}
m_oWriter.WriteString(std::wstring(L"<a:scene3d>"));
m_oWriter.WriteString(std::wstring(L"<a:camera"));
std::wstring sAngle;
if (pPPTShape->m_o3dOptions.dSkewAngle < 10) sAngle = L"Left";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 10 && pPPTShape->m_o3dOptions.dSkewAngle < 80) sAngle = L"BottomLeft";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 80 && pPPTShape->m_o3dOptions.dSkewAngle < 100) sAngle = L"Bottom";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 100 && pPPTShape->m_o3dOptions.dSkewAngle < 145) sAngle = L"BottomRight";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 145 && pPPTShape->m_o3dOptions.dSkewAngle < 190) sAngle = L"Right";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 190 && pPPTShape->m_o3dOptions.dSkewAngle < 235) sAngle = L"TopRight";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 235 && pPPTShape->m_o3dOptions.dSkewAngle < 280) sAngle = L"Top";
else if (pPPTShape->m_o3dOptions.dSkewAngle >= 280 && pPPTShape->m_o3dOptions.dSkewAngle < 325) sAngle = L"TopLeft";
else sAngle = L"Front";
if (pPPTShape->m_o3dOptions.bParallel)
m_oWriter.WriteString(std::wstring(L" prst=\"legacyOblique" + sAngle + L"\""));
else
m_oWriter.WriteString(std::wstring(L" prst=\"legacyPerspective" + sAngle + L"\""));
m_oWriter.WriteString(std::wstring(L">"));
if (pPPTShape->m_o3dOptions.bConstrainRotation)
{
m_oWriter.WriteString(std::wstring(L"<a:rot"));
m_oWriter.WriteString(std::wstring(L" lat=\"" + std::to_wstring((int)(60000 * pPPTShape->m_o3dOptions.dXRotationAngle.get_value_or(0))) + L"\""));
m_oWriter.WriteString(std::wstring(L" lon=\"" + std::to_wstring((int)(60000 * pPPTShape->m_o3dOptions.dYRotationAngle.get_value_or(0))) + L"\""));
m_oWriter.WriteString(std::wstring(L" rev=\"" + std::to_wstring((int)(60000 * pPPTShape->m_o3dOptions.dRotationAngle.get_value_or(0))) + L"\""));
m_oWriter.WriteString(std::wstring(L"/>"));
}
m_oWriter.WriteString(std::wstring(L"</a:camera>"));
m_oWriter.WriteString(std::wstring(L"<a:lightRig"));
if (pPPTShape->m_o3dOptions.dFillIntensity < 0.3)
m_oWriter.WriteString(std::wstring(L" rig=\"legacyHarsh3\""));
else if (pPPTShape->m_o3dOptions.dFillIntensity < 0.4)
m_oWriter.WriteString(std::wstring(L" rig=\"legacyFlat4\""));
else if (pPPTShape->m_o3dOptions.dFillIntensity > 0.6 ||
(pPPTShape->m_o3dOptions.dKeyX < 0.1 && pPPTShape->m_o3dOptions.dFillX < 0.1 &&
pPPTShape->m_o3dOptions.dKeyY < 0.1 && pPPTShape->m_o3dOptions.dFillY < 0.1))
m_oWriter.WriteString(std::wstring(L" rig=\"legacyFlat1\""));
else
m_oWriter.WriteString(std::wstring(L" rig=\"legacyFlat3\""));
if (pPPTShape->m_o3dOptions.dKeyX < 0.1 && pPPTShape->m_o3dOptions.dFillX < 0.1)
{
if (pPPTShape->m_o3dOptions.dKeyY < 0.1 && pPPTShape->m_o3dOptions.dFillY < 0.1)
m_oWriter.WriteString(std::wstring(L" dir=\"t\""));
else if (pPPTShape->m_o3dOptions.dKeyY < 0) m_oWriter.WriteString(std::wstring(L" dir=\"r\""));
else m_oWriter.WriteString(std::wstring(L" dir=\"l\""));
}
else
{
if (pPPTShape->m_o3dOptions.dKeyX < 0) m_oWriter.WriteString(std::wstring(L" dir=\"t\""));
else m_oWriter.WriteString(std::wstring(L" dir=\"b\""));
}
m_oWriter.WriteString(std::wstring(L"/>"));
m_oWriter.WriteString(std::wstring(L"</a:scene3d>"));
m_oWriter.WriteString(std::wstring(L"<a:sp3d"));
m_oWriter.WriteString(std::wstring(L" extrusionH=\"" + std::to_wstring(pPPTShape->m_o3dOptions.nExtrudeBackward) + L"\""));
switch(pPPTShape->m_o3dOptions.nRenderMode)
{
case 0x00000000://solid
{
if (pPPTShape->m_o3dOptions.bMetallic)
m_oWriter.WriteString(std::wstring(L" prstMaterial=\"legacyMetal\""));
else
m_oWriter.WriteString(std::wstring(L" prstMaterial=\"legacyMatte\""));
}break;
case 0x00000001: m_oWriter.WriteString(std::wstring(L" prstMaterial=\"legacyWireframe\"")); break; //wireframe
case 0x00000002: m_oWriter.WriteString(std::wstring(L" prstMaterial=\"legacyWireframe\"")); break; //bounding cube ????
}
m_oWriter.WriteString(std::wstring(L">"));
m_oWriter.WriteString(std::wstring(L"<a:bevelT w=\"13500\" h=\"13500\" prst=\"angle\"/>"));
m_oWriter.WriteString(std::wstring(L"<a:bevelB w=\"13500\" h=\"13500\" prst=\"angle\"/>"));
std::wstring strExtrusionClr;
if (pPPTShape->m_o3dOptions.oExtrusionColor)
{
strExtrusionClr = ConvertColor(*pPPTShape->m_o3dOptions.oExtrusionColor);
}
else
{
if (pShapeElement->m_oBrush.Type != c_BrushTypeNoFill)
{
strExtrusionClr = ConvertColor(pShapeElement->m_oBrush.Color1, pShapeElement->m_oBrush.Alpha1);
}
else
{
strExtrusionClr = ConvertColor(pShapeElement->m_oPen.Color, pShapeElement->m_oPen.Alpha);
}
}
m_oWriter.WriteString(std::wstring(L"<a:extrusionClr>"));
m_oWriter.WriteString(strExtrusionClr);
m_oWriter.WriteString(std::wstring(L"</a:extrusionClr>"));
m_oWriter.WriteString(std::wstring(L"<a:contourClr>"));
m_oWriter.WriteString(strExtrusionClr);
m_oWriter.WriteString(std::wstring(L"</a:contourClr>"));
m_oWriter.WriteString(std::wstring(L"</a:sp3d>"));
}
void NSPresentationEditor::CShapeWriter::WriteTextInfo()
{
//if (false == m_xmlTxBodyAlternative.empty())
@ -1552,6 +1756,7 @@ std::wstring NSPresentationEditor::CShapeWriter::ConvertShape()
}
m_oWriter.WriteString(ConvertShadow(pShapeElement->m_oShadow));
}
Write3dShape();
m_oWriter.WriteString(std::wstring(L"</p:spPr>"));

View File

@ -181,7 +181,7 @@ namespace NSPresentationEditor
std::wstring ConvertShadow (CShadow & shadow);
std::wstring ConvertBrush (CBrush & brush);
std::wstring ConvertLineEnd (unsigned char cap, unsigned char length, unsigned char width);
static std::wstring ConvertColor (CColor & color, long alpha);
static std::wstring ConvertColor (CColor & color, long alpha = 255);
void ParseXmlAlternative(const std::wstring & xml);
// тип рендерера-----------------------------------------------------------------------------
@ -453,5 +453,6 @@ namespace NSPresentationEditor
void WriteShapeInfo();
void WriteImageInfo();
void WriteTextInfo();
void Write3dShape();
};
}

View File

@ -261,7 +261,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
{
pElement->m_oBrush.Type = c_BrushTypeNoFill;
}
else if (pElement->m_oBrush.Type == c_BrushTypeNoFill )
else if (pElement->m_oBrush.Type == c_BrushTypeNotSet )
{
pElement->m_oBrush.Type = c_BrushTypeSolid;
}
@ -420,7 +420,7 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
else
oAtom.ToColor(&pElement->m_oBrush.Color1);
if (pElement->m_oBrush.Type == c_BrushTypeNoFill )
if (pElement->m_oBrush.Type == c_BrushTypeNotSet )
pElement->m_oBrush.Type = c_BrushTypeSolid;
}break;
@ -434,7 +434,7 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
else
oAtom.ToColor(&pElement->m_oBrush.Color2);
if (pElement->m_bIsBackground && pElement->m_oBrush.Type == c_BrushTypeNoFill )
if (pElement->m_bIsBackground && pElement->m_oBrush.Type == c_BrushTypeNotSet )
{
pElement->m_oBrush.Type = c_BrushTypeSolid;
}
@ -563,23 +563,23 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
// line --------------------------------------------------------
case lineBoolean: //Line Style Boolean Properties
{
bool bNoLineDrawDash = GETBIT(pProperty->m_lValue, 0);
bool bLineFillShape = GETBIT(pProperty->m_lValue, 1);
bool bHitTestLine = GETBIT(pProperty->m_lValue, 2);
bool bLine = GETBIT(pProperty->m_lValue, 3);
bool bArrowheadsOK = GETBIT(pProperty->m_lValue, 4);
bool bInsetPenOK = GETBIT(pProperty->m_lValue, 5);
bool bInsetPen = GETBIT(pProperty->m_lValue, 6);
bool bLineOpaqueBackColor = GETBIT(pProperty->m_lValue, 9);
bool bUsefNoLineDrawDash = GETBIT(pProperty->m_lValue, 16);
bool bUsefLineFillShape = GETBIT(pProperty->m_lValue, 17);
bool bUsefHitTestLine = GETBIT(pProperty->m_lValue, 18);
bool bUsefLine = GETBIT(pProperty->m_lValue, 19);
bool bUsefArrowheadsOK = GETBIT(pProperty->m_lValue, 20);
bool bUsefInsetPenOK = GETBIT(pProperty->m_lValue, 21);
bool bUsefInsetPen = GETBIT(pProperty->m_lValue, 22);
bool bUsefLineOpaqueBackColor = GETBIT(pProperty->m_lValue, 25);
bool bUsefInsetPen = GETBIT(pProperty->m_lValue, 22);
bool bUsefInsetPenOK = GETBIT(pProperty->m_lValue, 21);
bool bUsefArrowheadsOK = GETBIT(pProperty->m_lValue, 20);
bool bUsefLine = GETBIT(pProperty->m_lValue, 19);
bool bUsefHitTestLine = GETBIT(pProperty->m_lValue, 18);
bool bUsefLineFillShape = GETBIT(pProperty->m_lValue, 17);
bool bUsefNoLineDrawDash = GETBIT(pProperty->m_lValue, 16);
bool bLineOpaqueBackColor = GETBIT(pProperty->m_lValue, 9);
bool bInsetPen = GETBIT(pProperty->m_lValue, 6);
bool bInsetPenOK = GETBIT(pProperty->m_lValue, 5);
bool bArrowheadsOK = GETBIT(pProperty->m_lValue, 4);
bool bLine = GETBIT(pProperty->m_lValue, 3);
bool bHitTestLine = GETBIT(pProperty->m_lValue, 2);
bool bLineFillShape = GETBIT(pProperty->m_lValue, 1);
bool bNoLineDrawDash = GETBIT(pProperty->m_lValue, 0);
if (bUsefLine)
pElement->m_bLine = bLine;
@ -738,41 +738,63 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
pElement->m_oShadow.Visible = fshadowObscured;
}
}break;
case shapeBoolean:
{
bool fUsefPolicyLabel = GETBIT(pProperty->m_lValue, 25);
bool fUsefPolicyBarcode = GETBIT(pProperty->m_lValue, 24);
bool fUsefFlipHOverride = GETBIT(pProperty->m_lValue, 23);
bool fUsefFlipVOverride = GETBIT(pProperty->m_lValue, 22);
bool fUsefOleIcon = GETBIT(pProperty->m_lValue, 21);
bool fUsefPreferRelativeResize = GETBIT(pProperty->m_lValue, 20);
bool fUsefLockShapeType = GETBIT(pProperty->m_lValue, 19);
bool fUsefInitiator = GETBIT(pProperty->m_lValue, 18);
bool fUsefBackground = GETBIT(pProperty->m_lValue, 16);
bool fPolicyLabel = fUsefPolicyLabel ? GETBIT(pProperty->m_lValue, 9) : false;
bool fPolicyBarcode = fUsefPolicyBarcode ? GETBIT(pProperty->m_lValue, 8) : false;
bool fFlipHOverride = fUsefFlipHOverride ? GETBIT(pProperty->m_lValue, 7) : false;
bool fFlipVOverride = fUsefFlipVOverride ? GETBIT(pProperty->m_lValue, 6) : false;
bool fOleIcon = fUsefOleIcon ? GETBIT(pProperty->m_lValue, 5) : false;
bool fPreferRelativeResize = fUsefPreferRelativeResize ? GETBIT(pProperty->m_lValue, 4) : false;
bool fLockShapeType = fUsefLockShapeType ? GETBIT(pProperty->m_lValue, 3) : false;
bool fInitiator = fUsefInitiator ? GETBIT(pProperty->m_lValue, 2) : false;
bool fBackground = fUsefBackground ? GETBIT(pProperty->m_lValue, 0) : false;
}break;
case groupShapeBoolean:
{
bool fUsefLayoutInCell = GETBIT(pProperty->m_lValue, 0);
bool fUsefIsBullet = GETBIT(pProperty->m_lValue, 1);
bool fUsefStandardHR = GETBIT(pProperty->m_lValue, 2);
bool fUsefNoshadeHR = GETBIT(pProperty->m_lValue, 3);
bool fUsefHorizRule = GETBIT(pProperty->m_lValue, 4);
bool fUsefUserDrawn = GETBIT(pProperty->m_lValue, 5);
bool fUsefAllowOverlap = GETBIT(pProperty->m_lValue, 6);
bool fUsefReallyHidden = GETBIT(pProperty->m_lValue, 7);
bool fUsefScriptAnchor = GETBIT(pProperty->m_lValue, 8);
bool fUsefEditedWrap = GETBIT(pProperty->m_lValue, 9);
bool fUsefBehindDocument = GETBIT(pProperty->m_lValue, 10);
bool fUsefOnDblClickNotify = GETBIT(pProperty->m_lValue, 11);
bool fUsefIsButton = GETBIT(pProperty->m_lValue, 12);
bool fUsefOneD = GETBIT(pProperty->m_lValue, 13);
bool fUsefHidden = GETBIT(pProperty->m_lValue, 14);
bool fUsefPrint = GETBIT(pProperty->m_lValue, 15);
bool fUsefLayoutInCell = GETBIT(pProperty->m_lValue, 31);
bool fUsefIsBullet = GETBIT(pProperty->m_lValue, 30);
bool fUsefStandardHR = GETBIT(pProperty->m_lValue, 29);
bool fUsefNoshadeHR = GETBIT(pProperty->m_lValue, 28);
bool fUsefHorizRule = GETBIT(pProperty->m_lValue, 27);
bool fUsefUserDrawn = GETBIT(pProperty->m_lValue, 26);
bool fUsefAllowOverlap = GETBIT(pProperty->m_lValue, 25);
bool fUsefReallyHidden = GETBIT(pProperty->m_lValue, 24);
bool fUsefScriptAnchor = GETBIT(pProperty->m_lValue, 23);
bool fUsefEditedWrap = GETBIT(pProperty->m_lValue, 22);
bool fUsefBehindDocument = GETBIT(pProperty->m_lValue, 21);
bool fUsefOnDblClickNotify = GETBIT(pProperty->m_lValue, 20);
bool fUsefIsButton = GETBIT(pProperty->m_lValue, 19);
bool fUsefOneD = GETBIT(pProperty->m_lValue, 18);
bool fUsefHidden = GETBIT(pProperty->m_lValue, 17);
bool fUsefPrint = GETBIT(pProperty->m_lValue, 16);
bool fLayoutInCell = fUsefLayoutInCell ? GETBIT(pProperty->m_lValue, 16) : true;
bool fIsBullet = fUsefIsBullet ? GETBIT(pProperty->m_lValue, 17) : false;
bool fStandardHR = fUsefStandardHR ? GETBIT(pProperty->m_lValue, 18) : false;
bool fNoshadeHR = fUsefNoshadeHR ? GETBIT(pProperty->m_lValue, 19) : false;
bool fHorizRule = fUsefHorizRule ? GETBIT(pProperty->m_lValue, 20) : false;
bool fUserDrawn = fUsefUserDrawn ? GETBIT(pProperty->m_lValue, 21) : false;
bool fAllowOverlap = fUsefAllowOverlap ? GETBIT(pProperty->m_lValue, 22) : true;
bool fReallyHidden = fUsefReallyHidden ? GETBIT(pProperty->m_lValue, 23) : false;
bool fScriptAnchor = fUsefScriptAnchor ? GETBIT(pProperty->m_lValue, 24) : false;
bool fEditedWrap = fUsefEditedWrap ? GETBIT(pProperty->m_lValue, 25) : false;
bool fBehindDocument = fUsefBehindDocument ? GETBIT(pProperty->m_lValue, 26) : false;
bool fOnDblClickNotify = fUsefOnDblClickNotify ? GETBIT(pProperty->m_lValue, 27) : false;
bool fIsButton = fUsefIsButton ? GETBIT(pProperty->m_lValue, 28) : false;
bool fOneD = fUsefOneD ? GETBIT(pProperty->m_lValue, 29) : false;
bool fHidden = fUsefHidden ? GETBIT(pProperty->m_lValue, 30) : false;
bool fPrint = fUsefPrint ? GETBIT(pProperty->m_lValue, 31) : true;
bool fLayoutInCell = fUsefLayoutInCell ? GETBIT(pProperty->m_lValue, 15) : true;
bool fIsBullet = fUsefIsBullet ? GETBIT(pProperty->m_lValue, 14) : false;
bool fStandardHR = fUsefStandardHR ? GETBIT(pProperty->m_lValue, 13) : false;
bool fNoshadeHR = fUsefNoshadeHR ? GETBIT(pProperty->m_lValue, 12) : false;
bool fHorizRule = fUsefHorizRule ? GETBIT(pProperty->m_lValue, 11) : false;
bool fUserDrawn = fUsefUserDrawn ? GETBIT(pProperty->m_lValue, 10) : false;
bool fAllowOverlap = fUsefAllowOverlap ? GETBIT(pProperty->m_lValue, 9) : true;
bool fReallyHidden = fUsefReallyHidden ? GETBIT(pProperty->m_lValue, 8) : false;
bool fScriptAnchor = fUsefScriptAnchor ? GETBIT(pProperty->m_lValue, 7) : false;
bool fEditedWrap = fUsefEditedWrap ? GETBIT(pProperty->m_lValue, 6) : false;
bool fBehindDocument = fUsefBehindDocument ? GETBIT(pProperty->m_lValue, 5) : false;
bool fOnDblClickNotify = fUsefOnDblClickNotify ? GETBIT(pProperty->m_lValue, 4) : false;
bool fIsButton = fUsefIsButton ? GETBIT(pProperty->m_lValue, 3) : false;
bool fOneD = fUsefOneD ? GETBIT(pProperty->m_lValue, 2) : false;
bool fHidden = fUsefHidden ? GETBIT(pProperty->m_lValue, 1) : false;
bool fPrint = fUsefPrint ? GETBIT(pProperty->m_lValue, 0) : true;
pElement->m_bHidden = fHidden || fIsBullet;
//presentation_ticio_20100610.ppt
@ -1092,23 +1114,20 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
{
case NSOfficeDrawing::alignTextLeft:
{
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 0;
break;
}
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 0;
}break;
case NSOfficeDrawing::alignTextCenter:
{
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
break;
}
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
}break;
case NSOfficeDrawing::alignTextRight:
{
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 2;
break;
}
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 2;
}break;
default:
{
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
}
}break;
};
break;
}
@ -1211,9 +1230,239 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
pParentShape->m_oText.m_bAutoFit = bFitShapeToText;
}break;
case NSOfficeDrawing::c3DSpecularAmt:
{
pShape->m_o3dOptions.dSpecularAmt = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DDiffuseAmt:
{
pShape->m_o3dOptions.dDiffuseAmt = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DShininess:
{
pShape->m_o3dOptions.dShininess = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DEdgeThickness:
{
pShape->m_o3dOptions.nEdgeThickness = pProperty->m_lValue;
}break;
case NSOfficeDrawing::C3DExtrudeForward:
{
pShape->m_o3dOptions.nExtrudeForward = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DExtrudeBackward:
{
pShape->m_o3dOptions.nExtrudeBackward = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DExtrudePlane:
{
//ExtrudePlane = 0;
}break;
case NSOfficeDrawing::c3DExtrusionColor:
{
SColorAtom oAtom;
oAtom.FromValue(pProperty->m_lValue);
CColor tmp;
if(oAtom.bSysIndex) tmp = CorrectSysColor(pProperty->m_lValue, pElement, pTheme);
else oAtom.ToColor(&tmp);
pShape->m_o3dOptions.oExtrusionColor = tmp;
}break;
case NSOfficeDrawing::c3DCrMod:
{
SColorAtom oAtom;
oAtom.FromValue(pProperty->m_lValue);
CColor tmp;
if(oAtom.bSysIndex) tmp = CorrectSysColor(pProperty->m_lValue, pElement, pTheme);
else oAtom.ToColor(&tmp);
pShape->m_o3dOptions.oCrMod = tmp;
}break;
case NSOfficeDrawing::c3DExtrusionColorExt:
{
SColorAtom oAtom;
oAtom.FromValue(pProperty->m_lValue);
CColor tmp;
if(oAtom.bSysIndex) tmp = CorrectSysColor(pProperty->m_lValue, pElement, pTheme);
else oAtom.ToColor(&tmp);
pShape->m_o3dOptions.oExtrusionColorExt = tmp;
}break;
case NSOfficeDrawing::c3DExtrusionColorExtMod:
{
pShape->m_o3dOptions.nTypeExtrusionColorExt = (pProperty->m_lValue & 0x00000300) >> 8;
}break;
case NSOfficeDrawing::c3DBottomBevelWidth:
{
pShape->m_o3dOptions.dBottomBevelWidth = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DBottomBevelHeight:
{
pShape->m_o3dOptions.dBottomBevelHeight = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DBottomBevelType:
{
pShape->m_o3dOptions.nBottomBevelType = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DTopBevelWidth:
{
pShape->m_o3dOptions.dTopBevelWidth = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DTopBevelHeight:
{
pShape->m_o3dOptions.dTopBevelHeight = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DTopBevelType:
{
pShape->m_o3dOptions.nTopBevelType = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DBoolean:
{
bool fUsef3D = GETBIT(pProperty->m_lValue, 19);
bool fUsefc3DMetallic = GETBIT(pProperty->m_lValue, 18);
bool fUsefc3DUseExtrusionColor = GETBIT(pProperty->m_lValue, 17);
bool fUsefc3DLightFace = GETBIT(pProperty->m_lValue, 16);
pShape->m_o3dOptions.bEnabled = fUsef3D ? GETBIT(pProperty->m_lValue, 3) : false;
pShape->m_o3dOptions.bMetallic = fUsefc3DMetallic ? GETBIT(pProperty->m_lValue, 2) : false;
pShape->m_o3dOptions.bExtrusionColor= fUsefc3DUseExtrusionColor ? GETBIT(pProperty->m_lValue, 1) : false;
pShape->m_o3dOptions.bLightFace = fUsefc3DLightFace ? GETBIT(pProperty->m_lValue, 0) : true;
}break;
case NSOfficeDrawing::c3DYRotationAngle:
{
double val = FixedPointToDouble(pProperty->m_lValue);
if (val < 0) val += 360;
pShape->m_o3dOptions.dYRotationAngle = val;
}break;
case NSOfficeDrawing::c3DXRotationAngle:
{
double val = FixedPointToDouble(pProperty->m_lValue);
if (val < 0) val += 360;
pShape->m_o3dOptions.dXRotationAngle = val;
}break;
case NSOfficeDrawing::c3DRotationAxisX:
{
pShape->m_o3dOptions.dRotationAxisX = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationAxisY:
{
pShape->m_o3dOptions.dRotationAxisY = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationAxisZ:
{
pShape->m_o3dOptions.dRotationAxisZ = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationAngle:
{
pShape->m_o3dOptions.dRotationAngle = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationCenterX:
{
pShape->m_o3dOptions.dRotationCenterX = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationCenterY:
{
pShape->m_o3dOptions.dRotationCenterY = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRotationCenterZ:
{
pShape->m_o3dOptions.dRotationCenterZ = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DRenderMode:
{
pShape->m_o3dOptions.nRenderMode = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DTolerance:
{
pShape->m_o3dOptions.dTolerance = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DXViewpoint:
{
pShape->m_o3dOptions.dXViewpoint = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DYViewpoint:
{
pShape->m_o3dOptions.dYViewpoint = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DZViewpoint:
{
pShape->m_o3dOptions.dZViewpoint = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DOriginX:
{
pShape->m_o3dOptions.dOriginX = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DOriginY:
{
pShape->m_o3dOptions.dOriginY = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DSkewAngle:
{
double val = FixedPointToDouble(pProperty->m_lValue);
if (val <= 0) val += 360;
pShape->m_o3dOptions.dSkewAngle = val;
}break;
case NSOfficeDrawing::c3DSkewAmount:
{
pShape->m_o3dOptions.nSkewAmount = pProperty->m_lValue;
}break;
case NSOfficeDrawing::c3DAmbientIntensity:
{
pShape->m_o3dOptions.dAmbientIntensity = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DKeyX:
{
pShape->m_o3dOptions.dKeyX = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DKeyY:
{
pShape->m_o3dOptions.dKeyY = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DKeyZ:
{
pShape->m_o3dOptions.dKeyZ = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DKeyIntensity:
{
pShape->m_o3dOptions.dKeyIntensity = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DFillX:
{
pShape->m_o3dOptions.dFillX = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DFillY:
{
pShape->m_o3dOptions.dFillY = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DFillZ:
{
pShape->m_o3dOptions.dFillZ = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DFillIntensity:
{
pShape->m_o3dOptions.dFillIntensity = FixedPointToDouble(pProperty->m_lValue);
}break;
case NSOfficeDrawing::c3DStyleBoolean:
{
bool fUsefc3DConstrainRotation = GETBIT(pProperty->m_lValue, 20);
bool fUsefc3DRotationCenterAuto = GETBIT(pProperty->m_lValue, 19);
bool fUsefc3DParallel = GETBIT(pProperty->m_lValue, 18);
bool fUsefc3DKeyHarsh = GETBIT(pProperty->m_lValue, 17);
bool fUsefc3DFillHarsh = GETBIT(pProperty->m_lValue, 16);
pShape->m_o3dOptions.bConstrainRotation = fUsefc3DConstrainRotation ? GETBIT(pProperty->m_lValue, 4) : true;
pShape->m_o3dOptions.bRotationCenterAuto= fUsefc3DRotationCenterAuto? GETBIT(pProperty->m_lValue, 3) : false;
pShape->m_o3dOptions.bParallel = fUsefc3DParallel ? GETBIT(pProperty->m_lValue, 2) : true;
pShape->m_o3dOptions.bKeyHarsh = fUsefc3DKeyHarsh ? GETBIT(pProperty->m_lValue, 1) : true;
pShape->m_o3dOptions.bFillHarsh = fUsefc3DFillHarsh ? GETBIT(pProperty->m_lValue, 0) : true;
}break;
default:
{
int unknown_value = pProperty->m_lValue;
unknown_value = unknown_value;
}break;
}
}
@ -2203,7 +2452,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
pShape->m_pShape->m_oText.m_oAttributes.m_oTextBrush = pShape->m_oBrush;
pShape->m_pShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
pShape->m_pShape->m_oText.m_oAttributes.m_nTextAlignVertical = 1;
pShape->m_pShape->m_oText.m_oAttributes.m_nTextAlignVertical = 1;
pShape->m_pShape->m_lDrawType = c_ShapeDrawType_Text;
break;

View File

@ -63,14 +63,6 @@ using namespace NSPresentationEditor;
class CPPTElement
{
public:
inline double FixedPointToDouble(unsigned int op)
{
short Integral = op >> 16;
unsigned short Fractional = op - (Integral << 16);
return Integral + (Fractional / 65536.0);
}
bool ChangeBlack2ColorImage(std::wstring image_path, int rgbColor1, int rgbColor2);
CColor CorrectSysColor(int nColorCode, CElementPtr pElement, CTheme* pTheme);

View File

@ -735,7 +735,7 @@ namespace NSPresentationEditor
void SetDefaultParams()
{
Type = c_BrushTypeNoFill;
Type = c_BrushTypeNotSet;
Color1 = 0xFFFFFFFF;
Alpha1 = 255;

View File

@ -1239,19 +1239,24 @@ namespace NSOfficeDrawing
perspectiveBoolean=639,
//3D Object
c3DSpecularAmt=640,
c3DDiffuseAmt=641,
c3DShininess=642,
c3DEdgeThickness=643,
C3DExtrudeForward=644,
c3DExtrudeBackward=645,
c3DExtrudePlane=646,
c3DExtrusionColor=647,
c3DCrMod=648,
f3D=700,
fc3DMetallic=701,
fc3DUseExtrusionColor=702,
fc3DLightFace=703,
c3DSpecularAmt = 640,
c3DDiffuseAmt = 641,
c3DShininess = 642,
c3DEdgeThickness = 643,
C3DExtrudeForward = 644,
c3DExtrudeBackward = 645,
c3DExtrudePlane = 646,
c3DExtrusionColor = 647,
c3DCrMod = 648,
c3DExtrusionColorExt = 649,
c3DExtrusionColorExtMod = 651,
c3DBottomBevelWidth = 661,
c3DBottomBevelHeight = 662,
c3DBottomBevelType = 663,
c3DTopBevelWidth = 664,
c3DTopBevelHeight = 665,
c3DTopBevelType = 666,
c3DBoolean = 703,
//3D Style
c3DYRotationAngle=704,
@ -1280,52 +1285,34 @@ namespace NSOfficeDrawing
c3DFillX=727,
c3DFillY=728,
c3DFillZ=729,
c3DFillIntensity=730,
fc3DConstrainRotation=763,
fc3DRotationCenterAuto=764,
fc3DParallel=765,
fc3DKeyHarsh=766,
fc3DFillHarsh=767,
c3DFillIntensity = 730,
c3DStyleBoolean = 767,
//Shape
hspMaster=769,
cxstyle=771,
bWMode=772,
bWModePureBW=773,
bWModeBW=774,
idDiscussAnchor=775,
dgmLayout=777,
dgmNodeKind=778,
dgmLayoutMRU=779,
wzEquationXML=780,
fPolicyLabel=822,
fPolicyBarcode=823,
fFlipHQFE5152=824,
fFlipVQFE5152=825,
fPreferRelativeResize=827,
fLockShapeType=828,
fInitiator=829,
fDeleteAttachedObject=830,
fBackground=831,
hspMaster = 769,
cxstyle = 771,
bWMode = 772,
bWModePureBW = 773,
bWModeBW = 774,
idDiscussAnchor = 775,
dgmLayout = 777,
dgmNodeKind = 778,
dgmLayoutMRU = 779,
wzEquationXML = 780,
shapeBoolean = 831,
//Callout
spcot=832,
dxyCalloutGap=833,
spcoa=834,
spcod=835,
dxyCalloutDropSpecified=836,
dxyCalloutLengthSpecified=837,
fCallout=889,
fCalloutAccentBar=890,
fCalloutTextBorder=891,
fCalloutMinusX=892,
fCalloutMinusY=893,
fCalloutDropAuto=894,
fCalloutLengthSpecified=895,
spcot = 832,
dxyCalloutGap = 833,
spcoa = 834,
spcod = 835,
dxyCalloutDropSpecified = 836,
dxyCalloutLengthSpecified = 837,
calloutBoolean = 895,
//Groupe Shape
wzName=896,
wzDescription=897,
wzName = 896,
wzDescription = 897,
pihlShape=898,
pWrapPolygonVertices=899,
dxWrapDistLeft=900,
@ -1363,9 +1350,9 @@ namespace NSOfficeDrawing
wzWebBot=933,
wzAppletArg=934,
wzAccessBlob=936,
metroBlob=937,
dhgt=938,
groupShapeBoolean=959,
metroBlob = 937,
dhgt = 938,
groupShapeBoolean = 959,
//Unknown HTML
wzLineId=1026,

View File

@ -38,15 +38,110 @@
using namespace NSOfficeDrawing;
using namespace NSPresentationEditor;
static double FixedPointToDouble(unsigned int op)
{
short Integral = op >> 16;
unsigned short Fractional = op - (Integral << 16);
return Integral + (Fractional / 65536.0);
}
namespace PPTShapes
{
struct _3dOptions
{
_3dOptions() : bEnabled(false), bMetallic(false), bExtrusionColor(false), bLightFace(true),
bConstrainRotation(true), bRotationCenterAuto(false), bParallel(true), bFillHarsh(true), bKeyHarsh(true),
nRenderMode(0), dSpecularAmt(0), nEdgeThickness(0x0000319C), nExtrudeForward(0), nExtrudeBackward(0x0006F9F0),
nSkewAmount(0x32)
{
dFillIntensity = FixedPointToDouble(0x00009470);
dKeyX = FixedPointToDouble(0x0000C350);
dKeyY = FixedPointToDouble(0x00000000);
dFillX = FixedPointToDouble(0xFFFF3CB0);
dFillY = FixedPointToDouble(0x00000000);
dOriginX = FixedPointToDouble(0x00008000);
dOriginY = FixedPointToDouble(0xFFFF8000);
dSkewAngle = 225;//FixedPointToDouble(0xFF790000);
dXViewpoint = FixedPointToDouble(0x001312D0);
dYViewpoint = FixedPointToDouble(0xFFECED30);
}
bool bEnabled;
bool bMetallic;
bool bExtrusionColor;
bool bLightFace;
bool bConstrainRotation;
bool bRotationCenterAuto;
bool bParallel;
bool bKeyHarsh;
bool bFillHarsh;
boost::optional<double> dSpecularAmt;
boost::optional<double> dDiffuseAmt;
boost::optional<double> dShininess;
_INT32 nEdgeThickness;
_INT32 nExtrudeForward;
_INT32 nExtrudeBackward;
boost::optional<double> dBottomBevelWidth;
boost::optional<double> dBottomBevelHeight;
boost::optional<_INT32> nBottomBevelType;
boost::optional<double> dTopBevelWidth;
boost::optional<double> dTopBevelHeight;
boost::optional<_INT32> nTopBevelType;
boost::optional<double> dXRotationAngle;
boost::optional<double> dYRotationAngle;
boost::optional<double> dRotationAxisX;
boost::optional<double> dRotationAxisY;
boost::optional<double> dRotationAxisZ;
boost::optional<double> dRotationAngle;
boost::optional<double> dRotationCenterX;
boost::optional<double> dRotationCenterY;
boost::optional<double> dRotationCenterZ;
boost::optional<double> dTolerance;
double dXViewpoint;
double dYViewpoint;
boost::optional<double> dZViewpoint;
boost::optional<CColor> oExtrusionColor;
boost::optional<CColor> oCrMod;
boost::optional<CColor> oExtrusionColorExt;
boost::optional<_INT32> nTypeExtrusionColorExt;
_INT32 nRenderMode;
double dOriginX;
double dOriginY;
double dSkewAngle;
_INT32 nSkewAmount;
boost::optional<double> dAmbientIntensity;
boost::optional<double> dKeyIntensity;
double dKeyX;
double dKeyY;
double dFillIntensity;
double dFillX;
double dFillY;
boost::optional<double> dKeyZ;
boost::optional<double> dFillZ;
};
}
class CPPTShape : public CBaseShape
{
public:
PPTShapes::ShapeType m_eType;
PPTShapes::ShapeType m_eType;
NSGuidesVML::CFormulasManager m_oManager;
NSCustomVML::CCustomVML m_oCustomVML;
NSCustomVML::CCustomVML m_oCustomVML;
PPTShapes::_3dOptions m_o3dOptions;
std::wstring m_strPathLimoX;
std::wstring m_strPathLimoX;
std::wstring m_strPathLimoY;
std::vector<std::wstring> m_arStringTextRects;
@ -54,6 +149,7 @@ public:
bool m_bIsFilled;
bool m_bIsStroked;
nullable<OOX::VmlOffice::CSignatureLine> m_oSignatureLine;
CPPTShape();

View File

@ -278,6 +278,9 @@ namespace NSPresentationEditor
{
m_oStyles.m_pLevels[i] = pTheme->m_pStyles[0].m_pLevels[i];
}
if (m_oStyles.m_pLevels[i].is_init() == false) continue;
if (m_oRuler.tabsStops.size() > 0)
{
m_oStyles.m_pLevels[i]->m_oPFRun.tabStops = m_oRuler.tabsStops;

View File

@ -1 +1 @@
2.5.556.0
2.5.561.0

View File

@ -97,6 +97,7 @@ const long c_BrushTypePattern = 3009;
const long c_BrushTypeHatch1 = 4009;
const long c_BrushTypeHatch53 = 4061;
const long c_BrushTypeNoFill = 5000;
const long c_BrushTypeNotSet = 5001;
const long c_BrushTextureModeStretch = 0;
const long c_BrushTextureModeTile = 1;

View File

@ -224,10 +224,8 @@ ARTIFACTS += Common/3dParty/*/$(TARGET)/build/*
ifeq ($(OS),Windows_NT)
ARTIFACTS += Common/3dParty/v8/v8/out.gn/$(TARGET)/release/*.dat
ARTIFACTS += Common/3dParty/v8/v8/out.gn/$(TARGET)/release/obj/*
else
ARTIFACTS += Common/3dParty/v8/v8/out.gn/$(TARGET)/*.dat
ARTIFACTS += Common/3dParty/v8/v8/out.gn/$(TARGET)/obj/*
endif
EXT_TARGET += $(DOCBUILDER)

View File

@ -29,13 +29,8 @@ core_windows {
QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}
#CONFIG += build_for_centos6
build_for_centos6 {
core_linux_64 {
QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux-x86-64.so.2
} else {
QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux.so.2
}
core_linux {
QMAKE_LFLAGS += -Wl,--rpath=./:./system
}
DEFINES += UNICODE \