diff --git a/OdfFile/Writer/Converter/ConvertDrawing.cpp b/OdfFile/Writer/Converter/ConvertDrawing.cpp index c382290986..4e78643d96 100644 --- a/OdfFile/Writer/Converter/ConvertDrawing.cpp +++ b/OdfFile/Writer/Converter/ConvertDrawing.cpp @@ -1049,6 +1049,7 @@ void OoxConverter::convert(PPTX::Logic::PrstGeom *oox_geom) { odf_context()->drawing_context()->set_viewBox(21600, 21600); odf_context()->drawing_context()->set_path(L"U 10800 10800 10800 10800 0 360 Z N"); + odf_context()->drawing_context()->set_draw_type(L"circle"); return; } diff --git a/OdfFile/Writer/Format/odf_drawing_context.cpp b/OdfFile/Writer/Format/odf_drawing_context.cpp index 1853335edd..66dd77734e 100644 --- a/OdfFile/Writer/Format/odf_drawing_context.cpp +++ b/OdfFile/Writer/Format/odf_drawing_context.cpp @@ -219,6 +219,8 @@ struct odf_drawing_state flipH_ = flipV_ = false; + draw_type_ = boost::none; + } std::vector elements_; @@ -230,6 +232,8 @@ struct odf_drawing_state _CP_OPT(double) cx_; _CP_OPT(double) cy_; + _CP_OPT(std::wstring) draw_type_; + bool flipH_; bool flipV_; @@ -1115,6 +1119,10 @@ void odf_drawing_context::end_shape() { text_shape = true; } + else if (impl_->current_drawing_state_.draw_type_) + { + sub_type = *impl_->current_drawing_state_.draw_type_; + } //else //{ // sub_type = L"polyline"; @@ -1712,6 +1720,11 @@ void odf_drawing_context::add_handle (std::wstring x, std::wstring y, std::wstri impl_->current_drawing_state_.oox_shape_->handles.push_back(h); } +void odf_drawing_context::set_draw_type(const std::wstring& draw_type) +{ + impl_->current_drawing_state_.draw_type_ = draw_type; +} + void odf_drawing_context::add_formula (std::wstring name, std::wstring fmla) { if (!impl_->current_drawing_state_.oox_shape_) return; diff --git a/OdfFile/Writer/Format/odf_drawing_context.h b/OdfFile/Writer/Format/odf_drawing_context.h index a417484a08..c38725eb43 100644 --- a/OdfFile/Writer/Format/odf_drawing_context.h +++ b/OdfFile/Writer/Format/odf_drawing_context.h @@ -208,6 +208,7 @@ public: void set_textarea (std::wstring l, std::wstring t, std::wstring r, std::wstring b); void add_handle (std::wstring x, std::wstring y, std::wstring refX, std::wstring refY, std::wstring minX, std::wstring maxX, std::wstring minY, std::wstring maxY); + void set_draw_type (const std::wstring& draw_type); void set_viewBox (double W, double H);