diff options
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/drawingml/drawingmltypes.hxx | 7 | ||||
-rw-r--r-- | include/oox/drawingml/shape.hxx | 10 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx index c4f05fcdd84e..2abe05767d6a 100644 --- a/include/oox/drawingml/drawingmltypes.hxx +++ b/include/oox/drawingml/drawingmltypes.hxx @@ -190,6 +190,13 @@ inline float convertEmuToPoints( sal_Int64 nValue ) return static_cast<float>(nValue) / EMU_PER_PT; } +/** Converts the passed double value from points to mm. */ +inline double convertPointToMms(double fValue) +{ + constexpr double fFactor = static_cast<double>(EMU_PER_PT) / (EMU_PER_HMM * 100); + return fValue * fFactor; +} + /** A structure for a point with 64-bit integer components. */ struct EmuPoint { diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 4a571213a090..40a80ae113dc 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -226,6 +226,13 @@ public: sal_Int32 getDataNodeType() const { return mnDataNodeType; } + void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; } + + double getAspectRatio() const { return mfAspectRatio; } + + /// Changes reference semantics to value semantics for fill properties. + void cloneFillProperties(); + protected: css::uno::Reference< css::drawing::XShape > const & @@ -348,6 +355,9 @@ private: /// Type of data node for an in-diagram shape. sal_Int32 mnDataNodeType = 0; + + /// Aspect ratio for an in-diagram shape. + double mfAspectRatio = 0; }; } } |