diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-12 14:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-18 14:23:50 +0200 |
commit | fb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch) | |
tree | beaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /sd/source/ui/view/drviews7.cxx | |
parent | convert AccessibleStates to enum class (diff) | |
download | core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.tar.gz core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.zip |
create new 'enum class' SotClipboardFormatId to unify types
of which there are several.
There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
numeric values to the underlying code, but perhaps further fixing is necessary?
Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'sd/source/ui/view/drviews7.cxx')
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 37e8a31d668d..055dcd865ddb 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star::linguistic2; sal_uInt32 nFormatCount (rDataHelper.GetFormatCount()); for (sal_uInt32 i=0; i<nFormatCount; i++) { - const SotFormatStringId nTestFormat = rDataHelper.GetFormat(i); + const SotClipboardFormatId nTestFormat = rDataHelper.GetFormat(i); // Check if the current format is the same as one that has already // been handled. @@ -124,13 +124,13 @@ using namespace ::com::sun::star::linguistic2; { switch (nTestFormat) { - case SOT_FORMATSTR_ID_EMBED_SOURCE: + case SotClipboardFormatId::EMBED_SOURCE: { OUString sName; TransferableObjectDescriptor aDescriptor; if (rDataHelper.GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDescriptor)) + SotClipboardFormatId::OBJECTDESCRIPTOR, aDescriptor)) { sName = aDescriptor.maTypeName; } @@ -142,24 +142,25 @@ using namespace ::com::sun::star::linguistic2; break; } - case SOT_FORMATSTR_ID_LINK_SOURCE: - case SOT_FORMATSTR_ID_DRAWING: - case SOT_FORMATSTR_ID_SVXB: - case FORMAT_GDIMETAFILE: - case FORMAT_BITMAP: - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case FORMAT_STRING: - case SOT_FORMATSTR_ID_HTML: - case FORMAT_RTF: - case SOT_FORMATSTR_ID_EDITENGINE: + case SotClipboardFormatId::LINK_SOURCE: + case SotClipboardFormatId::DRAWING: + case SotClipboardFormatId::SVXB: + case SotClipboardFormatId::GDIMETAFILE: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::STRING: + case SotClipboardFormatId::HTML: + case SotClipboardFormatId::RTF: + case SotClipboardFormatId::EDITENGINE: pResult->AddClipbrdFormat(nTestFormat); break; + default: break; } } } // Check some OLE formats whose names are handled differently. - SotFormatStringId nFormat (SOT_FORMATSTR_ID_EMBED_SOURCE_OLE); + SotClipboardFormatId nFormat (SotClipboardFormatId::EMBED_SOURCE_OLE); bool bHasFormat (rDataHelper.HasFormat(nFormat)); if ( ! bHasFormat) { |