diff options
-rw-r--r-- | editeng/source/items/textitem.cxx | 2 | ||||
-rw-r--r-- | include/editeng/langitem.hxx | 10 | ||||
-rw-r--r-- | include/svl/aeitem.hxx | 14 | ||||
-rw-r--r-- | include/svl/eitem.hxx | 8 | ||||
-rw-r--r-- | svl/source/items/aeitem.cxx | 10 | ||||
-rw-r--r-- | svl/source/items/cenumitm.cxx | 3 |
6 files changed, 28 insertions, 19 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 4cf3b832109d..2b62129853d8 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2345,7 +2345,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SvxLanguageItem ------------------------------------------------- SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) - : SfxEnumItem( nId , eLang ) + : SvxLanguageItem_Base( nId , eLang ) { } diff --git a/include/editeng/langitem.hxx b/include/editeng/langitem.hxx index e2ae3e8b8186..81bbe052e460 100644 --- a/include/editeng/langitem.hxx +++ b/include/editeng/langitem.hxx @@ -32,7 +32,15 @@ class SvXMLUnitConverter; This item describes a Language. */ -class EDITENG_DLLPUBLIC SvxLanguageItem : public SfxEnumItem<LanguageType> +// MSVC hack: +class SvxLanguageItem_Base: public SfxEnumItem<LanguageType> { +protected: + explicit SvxLanguageItem_Base(sal_uInt16 nWhich, LanguageType nValue): + SfxEnumItem(nWhich, nValue) + {} +}; + +class EDITENG_DLLPUBLIC SvxLanguageItem : public SvxLanguageItem_Base { public: static SfxPoolItem* CreateDefault(); diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx index ee38084a04c7..d203e2383f12 100644 --- a/include/svl/aeitem.hxx +++ b/include/svl/aeitem.hxx @@ -26,7 +26,19 @@ class SfxAllEnumValueArr; -class SVL_DLLPUBLIC SfxAllEnumItem: public SfxEnumItem<sal_uInt16> +// MSVC hack: +class SfxAllEnumItem_Base: public SfxEnumItem<sal_uInt16> { +protected: + explicit SfxAllEnumItem_Base(sal_uInt16 nWhich, sal_uInt16 nValue): + SfxEnumItem(nWhich, nValue) + {} + + explicit SfxAllEnumItem_Base(sal_uInt16 const nWhich, SvStream & rStream): + SfxEnumItem(nWhich, rStream) + {} +}; + +class SVL_DLLPUBLIC SfxAllEnumItem: public SfxAllEnumItem_Base { SfxAllEnumValueArr* pValues; std::vector<sal_uInt16>* pDisabledValues; diff --git a/include/svl/eitem.hxx b/include/svl/eitem.hxx index 93c122b10888..49b932985c2d 100644 --- a/include/svl/eitem.hxx +++ b/include/svl/eitem.hxx @@ -82,14 +82,6 @@ public: } }; -// We need to have this one instantiated only once to prevent LNK2005 "already defined" on 32-bit MSVC. -// But then we run into the problem that "extern" and SVL_DLLPUBLIC are mutually exclusive on templates for MSVC. -#ifdef _WIN32 -extern template class SfxEnumItem<sal_uInt16>; -#else -extern template class SVL_DLLPUBLIC SfxEnumItem<sal_uInt16>; -#endif - class SVL_DLLPUBLIC SfxBoolItem : public SfxPoolItem { diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index 00c6149a55eb..b10b36d0524b 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -35,14 +35,14 @@ class SfxAllEnumValueArr : public std::vector<SfxAllEnumValue_Impl> {}; SfxAllEnumItem::SfxAllEnumItem() : - SfxEnumItem<sal_uInt16>(0, 0), + SfxAllEnumItem_Base(0, 0), pValues( nullptr ), pDisabledValues( nullptr ) { } SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal): - SfxEnumItem(which, nVal), + SfxAllEnumItem_Base(which, nVal), pValues( nullptr ), pDisabledValues( nullptr ) { @@ -50,7 +50,7 @@ SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal): } SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ): - SfxEnumItem(which, rStream), + SfxAllEnumItem_Base(which, rStream), pValues( nullptr ), pDisabledValues( nullptr ) { @@ -58,14 +58,14 @@ SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ): } SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which): - SfxEnumItem(which, 0), + SfxAllEnumItem_Base(which, 0), pValues( nullptr ), pDisabledValues( nullptr ) { } SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy): - SfxEnumItem(rCopy), + SfxAllEnumItem_Base(rCopy), pValues(nullptr), pDisabledValues( nullptr ) { diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index 8e91217935f4..33b7853e563c 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -101,9 +101,6 @@ bool SfxEnumItemInterface::GetBoolValue() const void SfxEnumItemInterface::SetBoolValue(bool) {} - -template class SfxEnumItem<sal_uInt16>; - SfxPoolItem* SfxBoolItem::CreateDefault() { return new SfxBoolItem(); |