summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-18 16:24:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-21 11:44:11 +0200
commitcf3453de6400374f3486585ae758423ef621a220 (patch)
tree4b12bb9978f6d4fc186f0bc61843e6ff3076831f /include
parent1bec8a3d3b16bb8881bd49f58d8786421ff5f839 (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> (cherry picked from commit 8fa14ac550ddc43790b65858f18d23f522aff1f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117553
Diffstat (limited to 'include')
-rw-r--r--include/oox/helper/graphichelper.hxx5
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.