[Libreoffice-commits] core.git: include/oox

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 21 16:26:22 UTC 2021


 include/oox/helper/graphichelper.hxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ee405fb2ef36337851801f1bd34411c606d55988
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jun 21 13:50:48 2021 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jun 21 18:25:43 2021 +0200

    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 <mike.kaganski at collabora.com>

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 <sal/types.h>
 #include <com/sun/star/graphic/XGraphicProvider2.hpp>
 #include <com/sun/star/graphic/XGraphicMapper.hpp>
-#include <vcl/outdev.hxx> // Workaround for MSVC bug - can't forward-declare OutputDevice
 #include <vcl/vclptr.hxx>
 
 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. */


More information about the Libreoffice-commits mailing list