diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-18 16:24:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-19 18:08:51 +0200 |
commit | 8fa14ac550ddc43790b65858f18d23f522aff1f2 (patch) | |
tree | eaf97366b95b06e7d1e6d455725e1551f19da97f /include/oox | |
parent | e3077168072452fb8f1c0a8afb2992877cb96d1c (diff) |
fix loading calc files with embedded form macros
GraphicHelper was trying to use the current frame/
window to convert values, but during initial load
there is no current window.
Change-Id: I8a79501df1d2e83a13d3cfb64ae8e66152c60561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117470
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/helper/graphichelper.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/oox/helper/graphichelper.hxx b/include/oox/helper/graphichelper.hxx index 50c54175db93..6e6a255d9bd6 100644 --- a/include/oox/helper/graphichelper.hxx +++ b/include/oox/helper/graphichelper.hxx @@ -32,6 +32,7 @@ #include <sal/types.h> #include <com/sun/star/graphic/XGraphicProvider2.hpp> #include <com/sun/star/graphic/XGraphicMapper.hpp> +#include <vcl/vclptr.hxx> struct WmfExternal; @@ -46,6 +47,7 @@ namespace com::sun::star { namespace graphic { class XGraphicProvider; } namespace uno { class XComponentContext; } } +class OutputDevice; namespace oox { @@ -105,6 +107,7 @@ public: /** Converts the passed size from 1/100 mm to AppFont units. */ css::awt::Size convertHmmToAppFont( const css::awt::Size& rHmm ) const; + // Graphics and graphic objects ------------------------------------------ /** Imports a graphic from the passed input stream. */ @@ -134,7 +137,7 @@ private: css::uno::Reference< css::uno::XComponentContext > mxContext; css::uno::Reference< css::graphic::XGraphicProvider2 > mxGraphicProvider; - css::uno::Reference< css::awt::XUnitConversion > mxUnitConversion; + VclPtr<OutputDevice> mxDefaultOutputDevice; css::awt::DeviceInfo maDeviceInfo; ///< Current output device info. ::std::map< sal_Int32, ::Color > maSystemPalette; ///< Maps system colors (XML tokens) to RGB color values. StorageRef mxStorage; ///< Storage containing embedded graphics. |