[Libreoffice-commits] core.git: include/svx sw/inc
Stephan Bergmann
sbergman at redhat.com
Fri Mar 17 16:08:55 UTC 2017
include/svx/sdgmoitm.hxx | 14 +++++++++++---
sw/inc/grfatr.hxx | 11 +++++++++--
2 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 5e3cca7b0ae81e2467fb306c1c707f6f5ba7d284
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 17 17:08:11 2017 +0100
More workaround for the MSVC "dllpublic base template" mis-feature
(happens at least with a --disable-pch build)
Change-Id: Id62b254e7835ab923955f0f6529bafa6825aa103
diff --git a/include/svx/sdgmoitm.hxx b/include/svx/sdgmoitm.hxx
index 2ff3c6e0fcc9..2c7f13a2f9cd 100644
--- a/include/svx/sdgmoitm.hxx
+++ b/include/svx/sdgmoitm.hxx
@@ -25,12 +25,20 @@
#include <svx/svddef.hxx>
#include <svx/svxdllapi.h>
+// MSVC hack:
+class SdrGrafModeItem_Base: public SfxEnumItem<GraphicDrawMode> {
+protected:
+ SdrGrafModeItem_Base(GraphicDrawMode eMode):
+ SfxEnumItem(SDRATTR_GRAFMODE, eMode) {}
-class SVX_DLLPUBLIC SdrGrafModeItem : public SfxEnumItem<GraphicDrawMode>
+ SdrGrafModeItem_Base(SvStream& rIn): SfxEnumItem(SDRATTR_GRAFMODE, rIn) {}
+};
+
+class SVX_DLLPUBLIC SdrGrafModeItem : public SdrGrafModeItem_Base
{
public:
- SdrGrafModeItem( GraphicDrawMode eMode = GraphicDrawMode::Standard ) : SfxEnumItem( SDRATTR_GRAFMODE, eMode ) {}
- SdrGrafModeItem( SvStream& rIn ) : SfxEnumItem( SDRATTR_GRAFMODE, rIn ) {}
+ SdrGrafModeItem( GraphicDrawMode eMode = GraphicDrawMode::Standard ) : SdrGrafModeItem_Base( eMode ) {}
+ SdrGrafModeItem( SvStream& rIn ) : SdrGrafModeItem_Base( rIn ) {}
virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const override;
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 396c4439d27a..b04b127d85ff 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -259,11 +259,18 @@ public:
sal_uInt8 nMemberId ) override;
};
-class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem<GraphicDrawMode>
+// MSVC hack:
+class SwDrawModeGrf_Base: public SfxEnumItem<GraphicDrawMode> {
+protected:
+ SwDrawModeGrf_Base(GraphicDrawMode nMode):
+ SfxEnumItem(RES_GRFATR_DRAWMODE, nMode) {}
+};
+
+class SW_DLLPUBLIC SwDrawModeGrf : public SwDrawModeGrf_Base
{
public:
SwDrawModeGrf( GraphicDrawMode nMode = GraphicDrawMode::Standard )
- : SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
+ : SwDrawModeGrf_Base( nMode )
{}
// pure virtual methods of SfxPoolItem
More information about the Libreoffice-commits
mailing list