From ee405fb2ef36337851801f1bd34411c606d55988 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 21 Jun 2021 13:50:48 +0300 Subject: Delete copy ctors/assignments for DLLEXPORT class Their default definitions may create/destroy temporary OutputDevice objects, which requires that the class is defined at the site of instantiation of the implicit definition. The solution is to delete these unused methods. If they would happen to be needed, then move the default definitions to the correct place. This reverts commit 30a17b05fb8a860c1e53cb7cfc405b1cea0a9d15. Change-Id: I43f4e76763ff4409e9527f44cd2d8e227982257c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117574 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- include/oox/helper/graphichelper.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/oox') diff --git a/include/oox/helper/graphichelper.hxx b/include/oox/helper/graphichelper.hxx index 7735a15306a8..eab39beffcf5 100644 --- a/include/oox/helper/graphichelper.hxx +++ b/include/oox/helper/graphichelper.hxx @@ -32,10 +32,10 @@ #include #include #include -#include // Workaround for MSVC bug - can't forward-declare OutputDevice #include struct WmfExternal; +class OutputDevice; namespace com::sun::star { namespace awt { struct Point; } @@ -64,6 +64,13 @@ public: const StorageRef& rxStorage ); virtual ~GraphicHelper(); + // Avoid implicitly defined copy constructors/assignments for the DLLPUBLIC class (they may + // require forward-declared classes used internally to be defined in places using GraphicHelper) + GraphicHelper(const GraphicHelper&) = delete; + GraphicHelper(GraphicHelper&&) = delete; + GraphicHelper& operator=(const GraphicHelper&) = delete; + GraphicHelper& operator=(GraphicHelper&&) = delete; + // System colors and predefined colors ------------------------------------ /** Returns a system color specified by the passed XML token identifier. */ -- cgit