From aad25c3da835869201370c34af9d572e6ad33e88 Mon Sep 17 00:00:00 2001 From: "Elena.Subbotina" Date: Sat, 2 Mar 2024 15:22:30 +0300 Subject: [PATCH] fix bug #66699 --- OdfFile/Reader/Format/draw_shapes_pptx.cpp | 5 +---- OdfFile/Writer/Format/Shapes/oox_shapeCallouts.h | 3 ++- OdfFile/Writer/Format/draw_shapes.cpp | 1 + OdfFile/Writer/Format/draw_shapes.h | 3 ++- OdfFile/Writer/Format/odf_drawing_context.cpp | 12 +++++++----- OdfFile/Writer/Format/oox_shape_defines.h | 5 +++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/OdfFile/Reader/Format/draw_shapes_pptx.cpp b/OdfFile/Reader/Format/draw_shapes_pptx.cpp index e3e2cd70ba..04bc9eb8ed 100644 --- a/OdfFile/Reader/Format/draw_shapes_pptx.cpp +++ b/OdfFile/Reader/Format/draw_shapes_pptx.cpp @@ -397,10 +397,7 @@ void draw_connector::pptx_convert(oox::pptx_conversion_context & Context) } void draw_enhanced_geometry::pptx_convert(oox::pptx_conversion_context & Context) { - find_draw_type_oox(); - - bool set_shape = oox_convert(Context.get_slide_context().get_properties()); - + bool set_shape = oox_convert(Context.get_slide_context().get_properties()); if (!set_shape) { diff --git a/OdfFile/Writer/Format/Shapes/oox_shapeCallouts.h b/OdfFile/Writer/Format/Shapes/oox_shapeCallouts.h index 6845f5e1e9..0bce887856 100644 --- a/OdfFile/Writer/Format/Shapes/oox_shapeCallouts.h +++ b/OdfFile/Writer/Format/Shapes/oox_shapeCallouts.h @@ -404,7 +404,8 @@ public: view_box = L"0 0 21600 21600"; modifiers = L"6300 24300"; glue_points = L"?f40 ?f41"; - + glue_points_leaving_directions = L"180"; + add(L"f0", L"$0 -10800"); add(L"f1", L"$1 -10800"); add(L"f2", L"if(?f18 ,$0 ,0)"); diff --git a/OdfFile/Writer/Format/draw_shapes.cpp b/OdfFile/Writer/Format/draw_shapes.cpp index 7149a8fed2..49b8c3dc91 100644 --- a/OdfFile/Writer/Format/draw_shapes.cpp +++ b/OdfFile/Writer/Format/draw_shapes.cpp @@ -428,6 +428,7 @@ void draw_enhanced_geometry_attlist::serialize(CP_ATTR_NODE) //CP_XML_ATTR_OPT(L"drawooo:enhanced-path", draw_enhanced_path_); CP_XML_ATTR_OPT(L"draw:enhanced-path", draw_enhanced_path_); CP_XML_ATTR_OPT(L"draw:glue-points", draw_glue_points_); + CP_XML_ATTR_OPT(L"draw:glue-point-leaving-directions", glue_points_leaving_directions_); CP_XML_ATTR_OPT(L"draw:mirror-vertical", draw_mirror_vertical_); CP_XML_ATTR_OPT(L"draw:mirror-horizontal", draw_mirror_horizontal_); diff --git a/OdfFile/Writer/Format/draw_shapes.h b/OdfFile/Writer/Format/draw_shapes.h index ba79801a85..de272fb8e2 100644 --- a/OdfFile/Writer/Format/draw_shapes.h +++ b/OdfFile/Writer/Format/draw_shapes.h @@ -311,7 +311,8 @@ public: _CP_OPT(std::wstring) draw_enhanced_path_; _CP_OPT(std::wstring) draw_text_areas_; _CP_OPT(std::wstring) draw_glue_points_; - + _CP_OPT(std::wstring) glue_points_leaving_directions_; + _CP_OPT(std::wstring) draw_sub_view_size_; _CP_OPT(odf_types::Bool) draw_mirror_vertical_; diff --git a/OdfFile/Writer/Format/odf_drawing_context.cpp b/OdfFile/Writer/Format/odf_drawing_context.cpp index 6492c82691..ead1b31063 100644 --- a/OdfFile/Writer/Format/odf_drawing_context.cpp +++ b/OdfFile/Writer/Format/odf_drawing_context.cpp @@ -1178,15 +1178,17 @@ void odf_drawing_context::end_shape() enhanced->attlist_.draw_glue_points_ = shape_define->glue_points; enhanced->attlist_.draw_sub_view_size_ = shape_define->sub_view_size; + enhanced->attlist_.glue_points_leaving_directions_ = shape_define->glue_points_leaving_directions; enhanced->attlist_.draw_path_stretchpoint_x_ = shape_define->path_stretchpoint_x; enhanced->attlist_.draw_path_stretchpoint_y_ = shape_define->path_stretchpoint_y; - if (!shape_define->modifiers.empty()) - { - enhanced->attlist_.draw_modifiers_ = shape_define->modifiers; - } - else if (impl_->current_drawing_state_.oox_shape_ && !impl_->current_drawing_state_.oox_shape_->modifiers.empty()) + //if (!shape_define->modifiers.empty()) + //{ + // enhanced->attlist_.draw_modifiers_ = shape_define->modifiers; + //} + + if (impl_->current_drawing_state_.oox_shape_ && !impl_->current_drawing_state_.oox_shape_->modifiers.empty()) { enhanced->attlist_.draw_modifiers_ = impl_->current_drawing_state_.oox_shape_->modifiers; } diff --git a/OdfFile/Writer/Format/oox_shape_defines.h b/OdfFile/Writer/Format/oox_shape_defines.h index 01b987f855..f281c352aa 100644 --- a/OdfFile/Writer/Format/oox_shape_defines.h +++ b/OdfFile/Writer/Format/oox_shape_defines.h @@ -82,9 +82,10 @@ namespace cpdoccore _CP_OPT(std::wstring) view_box; _CP_OPT(std::wstring) sub_view_size; _CP_OPT(std::wstring) glue_points; + _CP_OPT(std::wstring) glue_points_leaving_directions; - std::wstring path_stretchpoint_x; - std::wstring path_stretchpoint_y; + _CP_OPT(std::wstring) path_stretchpoint_x; + _CP_OPT(std::wstring) path_stretchpoint_y; std::wstring odf_type_name; };