This commit is contained in:
Kamil Kerimov
2024-11-22 17:32:40 +05:00
parent 42466cf648
commit ce0f8251d3
7 changed files with 103 additions and 43 deletions

View File

@ -62,7 +62,7 @@ namespace cpdoccore
{ L"" , drawCustom}, // shapetypeAccentCallout1,
{ L"" , drawCustom}, // shapetypeAccentCallout2,
{ L"" , drawCustom}, // shapetypeAccentCallout3,
{ L"actionButtonBackPrevious" , drawCustom}, // shapetypeActionButtonBackPrevious, //mso-spt194
{ L"mso-spt194" , drawCustom}, // shapetypeActionButtonBackPrevious,
{ L"mso-spt196" , drawCustom}, // shapetypeActionButtonBeginning,
{ L"mso-spt189" , drawCustom}, // shapetypeActionButtonBlank,
{ L"mso-spt198" , drawCustom}, // shapetypeActionButtonDocument,
@ -72,7 +72,7 @@ namespace cpdoccore
{ L"mso-spt190" , drawCustom}, // shapetypeActionButtonHome,
{ L"mso-spt192" , drawCustom}, // shapetypeActionButtonInformation,
{ L"mso-spt200" , drawCustom}, // shapetypeActionButtonMovie,
{ L"mso-spt19drawCustom" , drawCustom}, // shapetypeActionButtonReturn,
{ L"mso-spt197" , drawCustom}, // shapetypeActionButtonReturn,
{ L"mso-spt199" , drawCustom}, // shapetypeActionButtonSound,
{ L"" , drawCustom}, // shapetypeArc,
{ L"" , drawCustom}, // shapetypeBentArrow,
@ -243,19 +243,19 @@ namespace cpdoccore
{ L"" , drawCustom}, // shapetypeWedgeEllipseCallout,
{ L"" , drawCustom}, // shapetypeWedgeRectCallout,
{ L"" , drawCustom}, // shapetypeWedgeRoundRectCallout,
{ L"mso-spt1drawCustom" , drawCustom}, // shapetypeBallon,
{ L"mso-spt17" , drawCustom}, // shapetypeBallon,
{ L"up-right-arrow" , drawCustom}, // shapetypeRightUpArrow,
{ L"fontwork-arch-down-pour" , drawCustom}, // shapetypeTextArchDownPour,
{ L"fontwork-arch-up-pour" , drawCustom}, // shapetypeTextArchUpPour,
{ L"mso-spt1drawCustom5" , drawCustom}, // shapetypeTextCanDown,
{ L"mso-spt1drawCustom4" , drawCustom}, // shapetypeTextCanUp,
{ L"mso-spt175" , drawCustom}, // shapetypeTextCanDown,
{ L"mso-spt174" , drawCustom}, // shapetypeTextCanUp,
{ L"fontwork-circle-pour" , drawCustom}, // shapetypeTextCirclePour,
{ L"fontwork-curve-down" , drawCustom}, // shapetypeTextCurveDown,
{ L"fontwork-curve-up" , drawCustom}, // shapetypeTextCurveUp,
{ L"mso-spt161" , drawCustom}, // shapetypeTextDeflate,
{ L"mso-spt163" , drawCustom}, // shapetypeTextDeflateBottom,
{ L"mso-spt166" , drawCustom}, // shapetypeTextDeflateInflate,
{ L"mso-spt16drawCustom" , drawCustom}, // shapetypeTextDeflateInflateDeflat,
{ L"mso-spt167" , drawCustom}, // shapetypeTextDeflateInflateDeflat,
{ L"mso-spt165" , drawCustom}, // shapetypeTextDeflateTop,
{ L"mso-spt158" , drawCustom}, // shapetypeTextDoubleWave1,
{ L"fontwork-fade-down" , drawCustom}, // shapetypeTextFadeDown,
@ -267,7 +267,7 @@ namespace cpdoccore
{ L"mso-spt142" , drawCustom}, // shapetypeTextRingInside,
{ L"mso-spt143" , drawCustom}, // shapetypeTextRingOutside,
{ L"fontwork-wave" , drawCustom}, // shapetypeTextWave1,
{ L"mso-spt15drawCustom" , drawCustom}, // shapetypeTextWave2,
{ L"mso-spt157" , drawCustom}, // shapetypeTextWave2,
{ L"mso-spt159" , drawCustom}, // shapetypeTextWave4,
{ L"mso-spt14" , drawCustom} // shapetypeThickArrow
};

View File

@ -1663,7 +1663,8 @@ void odf_drawing_context::add_path_element(std::wstring command, std::wstring st
{
XmlUtils::replace_all(strE, L"gd", L"?f");
if (command != impl_->current_drawing_state_.path_last_command_)
if (command != impl_->current_drawing_state_.path_last_command_
|| command == L"M") // NOTE: Две последовательые команды "Move" должны быть записаны без сокращений (включая команду "M" для каждого мува)
{
impl_->current_drawing_state_.path_ += command;
if (!strE.empty())
@ -1712,10 +1713,10 @@ int GetFormulaType2(const WCHAR& c1, const WCHAR& c2)
static std::wstring replace_textarea(std::wstring textarea_coord)
{
XmlUtils::replace_all(textarea_coord, L"t", L"top");
XmlUtils::replace_all(textarea_coord, L"l", L"left");
XmlUtils::replace_all(textarea_coord, L"r", L"right");
XmlUtils::replace_all(textarea_coord, L"b", L"bottom");
XmlUtils::replace_all(textarea_coord, L"t", L"0");
XmlUtils::replace_all(textarea_coord, L"l", L"0");
XmlUtils::replace_all(textarea_coord, L"r", L"logwidth");
XmlUtils::replace_all(textarea_coord, L"b", L"logheight");
return textarea_coord;
}
@ -1861,8 +1862,8 @@ void odf_drawing_context::add_formula (std::wstring name, std::wstring fmla)
}
XmlUtils::replace_all(odf_fmla, L"gd", L"?f");
XmlUtils::replace_all(odf_fmla, L"h", L"(bottom-top)");
XmlUtils::replace_all(odf_fmla, L"w", L"(right-left)");
XmlUtils::replace_all(odf_fmla, L"h", L"logheight");
XmlUtils::replace_all(odf_fmla, L"w", L"logwidth");
XmlUtils::replace_all(odf_fmla, L"adj", L"$");
//XmlUtils::replace_all(name, L"gd", L"f");
@ -1904,8 +1905,7 @@ void odf_drawing_context::set_flip_V(bool bVal)
void odf_drawing_context::set_rotate(double dVal)
{
if (dVal > 180) dVal = dVal - 360;
double dRotate = dVal / 180. * 3.14159265358979323846;
double dRotate = -dVal / 180. * 3.14159265358979323846;
impl_->current_drawing_state_.rotateAngle_ = dRotate;
}