summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-11-10 23:18:52 +0100
committerEike Rathke <erack@redhat.com>2017-11-11 01:18:47 +0100
commit38f4d4ca02cdc2fd4656e3a72def94da1df89650 (patch)
treeb142aceae633b3ff8f8d92f69f6b33ddb38f2e32 /sw/source/uibase
parent12434a33c1c153c375d2e02e0ae26f471ff15b68 (diff)
A user object id is *NOT* a SotClipboardFormatId
Do not try to squeeze it into such.. especially if SotClipboardFormatId::... enum identifiers are used in a user object id context that is completely not related to the identifier name this is totally confusing. commit fb14be5f8f74f83ba89e15f891ddf1f753dcc62f Date: Thu Mar 12 14:53:28 2015 +0200 create new 'enum class' SotClipboardFormatId to unify types overdid with that. Change-Id: I34b570be9f52b7b94ca8af6b23983393ac3a3a55 Reviewed-on: https://gerrit.libreoffice.org/44612 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx16
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx2
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f46c7767e5b8..0c5493e41331 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -134,13 +134,13 @@
#define OLESIZE 11905 - 2 * lMinBorder, 6 * MM50
-#define SWTRANSFER_OBJECTTYPE_DRAWMODEL static_cast<SotClipboardFormatId>(0x00000001)
-#define SWTRANSFER_OBJECTTYPE_HTML static_cast<SotClipboardFormatId>(0x00000002)
-#define SWTRANSFER_OBJECTTYPE_RTF static_cast<SotClipboardFormatId>(0x00000004)
-#define SWTRANSFER_OBJECTTYPE_STRING static_cast<SotClipboardFormatId>(0x00000008)
-#define SWTRANSFER_OBJECTTYPE_SWOLE static_cast<SotClipboardFormatId>(0x00000010)
-#define SWTRANSFER_OBJECTTYPE_DDE static_cast<SotClipboardFormatId>(0x00000020)
-#define SWTRANSFER_OBJECTTYPE_RICHTEXT static_cast<SotClipboardFormatId>(0x00000040)
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_DRAWMODEL = 0x00000001;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_HTML = 0x00000002;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_RTF = 0x00000004;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_STRING = 0x00000008;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_SWOLE = 0x00000010;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_DDE = 0x00000020;
+constexpr sal_uInt32 SWTRANSFER_OBJECTTYPE_RICHTEXT = 0x00000040;
using namespace ::svx;
using namespace ::com::sun::star;
@@ -609,7 +609,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
}
bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream,
- void* pObject, SotClipboardFormatId nObjectType,
+ void* pObject, sal_uInt32 nObjectType,
const DataFlavor& /*rFlavor*/ )
{
bool bRet = false;
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index 91ee9d659ee8..6f9248551c92 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -140,7 +140,7 @@ protected:
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm,
void* pUserObject,
- SotClipboardFormatId nUserObjectId,
+ sal_uInt32 nUserObjectId,
const css::datatransfer::DataFlavor& rFlavor ) override;
virtual void DragFinished( sal_Int8 nDropAction ) override;
virtual void ObjectReleased() override;