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 /include/sfx2 | |
parent | b8ce52aab9459773544f1696cfe6b7b6f171a389 (diff) |
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 'include/sfx2')
-rw-r--r-- | include/sfx2/docfilt.hxx | 9 | ||||
-rw-r--r-- | include/sfx2/fcontnr.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/linkmgr.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/lnkbase.hxx | 6 | ||||
-rw-r--r-- | include/sfx2/objsh.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sfxdlg.hxx | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx index 34d7130d5981..5506f44cb9c3 100644 --- a/include/sfx2/docfilt.hxx +++ b/include/sfx2/docfilt.hxx @@ -28,6 +28,7 @@ #include <rtl/ustring.hxx> #include <sal/config.h> #include <sal/types.h> +#include <sot/formats.hxx> #include <sfx2/dllapi.h> #include <sfx2/sfxdefs.hxx> #include <tools/wldcrd.hxx> @@ -60,7 +61,7 @@ class SFX2_DLLPUBLIC SfxFilter SfxFilterFlags nFormatType; sal_uIntPtr nVersion; - sal_uIntPtr lFormat; + SotClipboardFormatId lFormat; sal_uInt16 nDocIcon; public: @@ -69,7 +70,7 @@ public: SfxFilter( const OUString &rName, const OUString &rWildCard, SfxFilterFlags nFormatType, - sal_uInt32 lFormat, + SotClipboardFormatId lFormat, const OUString &rTypeName, sal_uInt16 nDocIcon, const OUString &rMimeType, @@ -90,14 +91,14 @@ public: const OUString& GetName() const { return maFilterName; } const WildCard& GetWildcard() const { return aWildCard; } const OUString& GetRealTypeName() const { return aTypeName; } - sal_uIntPtr GetFormat() const { return lFormat; } + SotClipboardFormatId GetFormat() const { return lFormat; } const OUString& GetTypeName() const { return aTypeName; } const OUString& GetUIName() const { return aUIName; } sal_uInt16 GetDocIconId() const { return nDocIcon; } const OUString& GetUserData() const { return aUserData; } const OUString& GetDefaultTemplate() const { return aDefaultTemplate; } void SetDefaultTemplate( const OUString& rStr ) { aDefaultTemplate = rStr; } - bool UsesStorage() const { return GetFormat() != 0; } + bool UsesStorage() const { return GetFormat() != SotClipboardFormatId::NONE; } void SetURLPattern( const OUString& rStr ); OUString GetURLPattern() const { return aPattern; } void SetUIName( const OUString& rName ) { aUIName = rName; } diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 758a73e80b4d..7a71a130f99a 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -118,7 +118,7 @@ public: sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, bool bPlugIn, bool bAPI = false ) const; const SfxFilter* GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; - const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; + const SfxFilter* GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4EA( const OUString& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4Extension( const OUString& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index 33aafb90a26d..12bf4378a613 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -151,7 +151,7 @@ public: // got the appropriate information as a string. // Is now required for FileObject in conjunction with JavaScript // this needs information about Load/Abort/Error - static sal_uIntPtr RegisterStatusInfoId(); + static SotClipboardFormatId RegisterStatusInfoId(); // if the mimetype says graphic/bitmap/gdimetafile then get the // graphic from the Any. Return says no errors diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index d88e53da59d7..0613a297246d 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -96,7 +96,7 @@ protected: m_xInputStreamToLoadFrom; SvBaseLink(); - SvBaseLink( sal_uInt16 nLinkType, sal_uIntPtr nContentType = FORMAT_STRING ); + SvBaseLink( sal_uInt16 nLinkType, SotClipboardFormatId nContentType = SotClipboardFormatId::STRING ); virtual ~SvBaseLink(); void _GetRealObject( bool bConnect = true ); @@ -136,8 +136,8 @@ public: void SetUpdateMode( sal_uInt16 ); sal_uInt16 GetUpdateMode() const; - sal_uIntPtr GetContentType() const; - bool SetContentType( sal_uIntPtr nType ); + SotClipboardFormatId GetContentType() const; + bool SetContentType( SotClipboardFormatId nType ); LinkManager* GetLinkManager(); const LinkManager* GetLinkManager() const; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 289a2dac73bb..1eda88cbf7ad 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -581,7 +581,7 @@ public: virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pFormat, + SotClipboardFormatId * pFormat, OUString * pAppName, OUString * pFullTypeName, OUString * pShortTypeName, diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index 31aa37ae12a7..799f7b40662e 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -93,9 +93,9 @@ public: class SfxAbstractPasteDialog : virtual public VclAbstractDialog { public: - virtual void Insert( SotFormatStringId nFormat, const rtl::OUString & rFormatName ) = 0; + virtual void Insert( SotClipboardFormatId nFormat, const rtl::OUString & rFormatName ) = 0; virtual void SetObjName( const SvGlobalName & rClass, const rtl::OUString & rObjName ) = 0; - virtual sal_uIntPtr GetFormat( const TransferableDataHelper& aHelper, + virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ) = 0; }; |