summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-12 14:53:28 +0200
committerNoel Grandin <noel@peralex.com>2015-03-18 14:23:50 +0200
commitfb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch)
treebeaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /sfx2
parentb8ce52aab9459773544f1696cfe6b7b6f171a389 (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 'sfx2')
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/fileobj.cxx18
-rw-r--r--sfx2/source/appl/impldde.cxx33
-rw-r--r--sfx2/source/appl/linkmgr2.cxx13
-rw-r--r--sfx2/source/appl/lnkbase2.cxx20
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx8
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
-rw-r--r--sfx2/source/doc/docfilt.cxx12
-rw-r--r--sfx2/source/doc/objembed.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx84
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
11 files changed, 101 insertions, 99 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index d2bf891e2c59..67b2f508573a 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -437,7 +437,7 @@ bool SfxApplication::InitializeDde()
pAppData_Impl->pDocTopics = new SfxDdeDocTopics_Impl;
// we certainly want to support RTF!
- pAppData_Impl->pDdeService->AddFormat( FORMAT_RTF );
+ pAppData_Impl->pDdeService->AddFormat( SotClipboardFormatId::RTF );
// Config path as a topic becauseof multiple starts
INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() );
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index db30c8354584..a1c1d989722a 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -76,11 +76,11 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
const OUString & rMimeType,
bool bGetSynchron )
{
- sal_uIntPtr nFmt = SotExchange::RegisterFormatMimeType( rMimeType );
+ SotClipboardFormatId nFmt = SotExchange::RegisterFormatMimeType( rMimeType );
switch( nType )
{
case FILETYPE_TEXT:
- if( FORMAT_FILE == nFmt )
+ if( SotClipboardFormatId::FILE == nFmt )
{
// The media in the application must be opened to lookup the
// relative file links!! This is done through the link manager
@@ -94,8 +94,8 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
{
SfxMediumRef xTmpMed;
- if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
- SOT_FORMATSTR_ID_SVXB == nFmt )
+ if( SotClipboardFormatId::GDIMETAFILE == nFmt || SotClipboardFormatId::BITMAP == nFmt ||
+ SotClipboardFormatId::SVXB == nFmt )
{
Graphic aGrf;
@@ -138,15 +138,15 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
aGrf.SetDefaultType();
}
- if( SOT_FORMATSTR_ID_SVXB != nFmt )
+ if( SotClipboardFormatId::SVXB != nFmt )
nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
- ? FORMAT_BITMAP
- : FORMAT_GDIMETAFILE;
+ ? SotClipboardFormatId::BITMAP
+ : SotClipboardFormatId::GDIMETAFILE;
SvMemoryStream aMemStm( 0, 65535 );
switch ( nFmt )
{
- case SOT_FORMATSTR_ID_SVXB:
+ case SotClipboardFormatId::SVXB:
if( GRAPHIC_NONE != aGrf.GetType() )
{
aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
@@ -154,7 +154,7 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
}
break;
- case FORMAT_BITMAP:
+ case SotClipboardFormatId::BITMAP:
{
const Bitmap aBitmap(aGrf.GetBitmap());
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 6f1cb5196bfb..1d9617636c48 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -265,31 +265,32 @@ void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const
bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
{
- sal_uInt16 nFmt = 0;
+ SotClipboardFormatId nFmt = SotClipboardFormatId::NONE;
switch( rReq.GetFormat() )
{
- case FORMAT_RTF:
- nFmt = FORMAT_STRING;
+ case SotClipboardFormatId::RTF:
+ nFmt = SotClipboardFormatId::STRING;
break;
- case SOT_FORMATSTR_ID_HTML_SIMPLE:
- case SOT_FORMATSTR_ID_HTML:
- nFmt = FORMAT_RTF;
+ case SotClipboardFormatId::HTML_SIMPLE:
+ case SotClipboardFormatId::HTML:
+ nFmt = SotClipboardFormatId::RTF;
break;
- case FORMAT_GDIMETAFILE:
- nFmt = FORMAT_BITMAP;
+ case SotClipboardFormatId::GDIMETAFILE:
+ nFmt = SotClipboardFormatId::BITMAP;
break;
- case SOT_FORMATSTR_ID_SVXB:
- nFmt = FORMAT_GDIMETAFILE;
+ case SotClipboardFormatId::SVXB:
+ nFmt = SotClipboardFormatId::GDIMETAFILE;
break;
// something else?
+ default: break;
}
- if( nFmt )
+ if( nFmt != SotClipboardFormatId::NONE )
rReq.SetFormat( nFmt ); // try it once more
- return 0 != nFmt;
+ return SotClipboardFormatId::NONE != nFmt;
}
bool SvDDEObject::IsPending() const
@@ -313,19 +314,19 @@ bool SvDDEObject::IsDataComplete() const
IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
{
- sal_uIntPtr nFmt = pData->GetFormat();
+ SotClipboardFormatId nFmt = pData->GetFormat();
switch( nFmt )
{
- case FORMAT_GDIMETAFILE:
+ case SotClipboardFormatId::GDIMETAFILE:
break;
- case FORMAT_BITMAP:
+ case SotClipboardFormatId::BITMAP:
break;
default:
{
const sal_Char* p = (sal_Char*)( pData->operator const void*() );
- long nLen = FORMAT_STRING == nFmt ? (p ? strlen( p ) : 0) : (long)*pData;
+ long nLen = SotClipboardFormatId::STRING == nFmt ? (p ? strlen( p ) : 0) : (long)*pData;
Sequence< sal_Int8 > aSeq( reinterpret_cast<const sal_Int8*>(p), nLen );
if( pGetData )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 6b8a19d09176..9d910a92beff 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -501,11 +501,11 @@ void LinkManager::CancelTransfers()
// gets the appropriate information as a string
// For now this is required for file object in conjunction with JavaScript
// - needs information about Load/Abort/Error
-sal_uIntPtr LinkManager::RegisterStatusInfoId()
+SotClipboardFormatId LinkManager::RegisterStatusInfoId()
{
- static sal_uIntPtr nFormat = 0;
+ static SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
- if( !nFormat )
+ if( nFormat == SotClipboardFormatId::NONE )
{
nFormat = SotExchange::RegisterFormatName(
OUString("StatusInfo from SvxInternalLink"));
@@ -529,13 +529,13 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType,
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
{
- case SOT_FORMATSTR_ID_SVXB:
+ case SotClipboardFormatId::SVXB:
{
ReadGraphic( aMemStm, rGrf );
bRet = true;
}
break;
- case FORMAT_GDIMETAFILE:
+ case SotClipboardFormatId::GDIMETAFILE:
{
GDIMetaFile aMtf;
aMtf.Read( aMemStm );
@@ -543,7 +543,7 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType,
bRet = true;
}
break;
- case FORMAT_BITMAP:
+ case SotClipboardFormatId::BITMAP:
{
Bitmap aBmp;
ReadDIB(aBmp, aMemStm, true);
@@ -551,6 +551,7 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType,
bRet = true;
}
break;
+ default: break;
}
}
return bRet;
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 9e1e8603d941..d75252df67c2 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -67,10 +67,10 @@ struct ImplBaseLinkData
struct tClientType
{
// applies for all links
- sal_uIntPtr nCntntType; // Update Format
+ SotClipboardFormatId nCntntType; // Update Format
// Not Ole-Links
- bool bIntrnlLnk; // It is an internal link
- sal_uInt16 nUpdateMode; // UpdateMode
+ bool bIntrnlLnk; // It is an internal link
+ sal_uInt16 nUpdateMode; // UpdateMode
};
struct tDDEType
@@ -84,7 +84,7 @@ struct ImplBaseLinkData
};
ImplBaseLinkData()
{
- ClientType.nCntntType = 0;
+ ClientType.nCntntType = SotClipboardFormatId::NONE;
ClientType.bIntrnlLnk = false;
ClientType.nUpdateMode = 0;
DDEType.pItem = NULL;
@@ -108,7 +108,7 @@ public:
#endif
virtual ~ImplDdeItem();
- virtual DdeData* Get( sal_uIntPtr ) SAL_OVERRIDE;
+ virtual DdeData* Get( SotClipboardFormatId ) SAL_OVERRIDE;
virtual bool Put( const DdeData* ) SAL_OVERRIDE;
virtual void AdviseLoop( bool ) SAL_OVERRIDE;
@@ -135,7 +135,7 @@ SvBaseLink::SvBaseLink()
-SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
+SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, SotClipboardFormatId nContentType )
: m_bIsReadOnly(false)
{
pImpl = new BaseLink_Impl();
@@ -419,16 +419,16 @@ void SvBaseLink::_GetRealObject( bool bConnect)
Disconnect();
}
-sal_uIntPtr SvBaseLink::GetContentType() const
+SotClipboardFormatId SvBaseLink::GetContentType() const
{
if( OBJECT_CLIENT_SO & nObjType )
return pImplData->ClientType.nCntntType;
- return 0; // all Formats ?
+ return SotClipboardFormatId::NONE; // all Formats ?
}
-bool SvBaseLink::SetContentType( sal_uIntPtr nType )
+bool SvBaseLink::SetContentType( SotClipboardFormatId nType )
{
if( OBJECT_CLIENT_SO & nObjType )
{
@@ -578,7 +578,7 @@ ImplDdeItem::~ImplDdeItem()
aRef->Disconnect();
}
-DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat )
+DdeData* ImplDdeItem::Get( SotClipboardFormatId nFormat )
{
if( pLink->GetObj() )
{
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index c2d5014bdebb..c8143170cced 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -775,9 +775,9 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf
return GetFilterForProps( aSeq, nMust, nDont );
}
-const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
- if (nId == 0)
+ if (nId == SotClipboardFormatId::NONE)
return 0;
com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aSeq(1);
@@ -970,7 +970,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
// collect information to add filter to container
// (attention: some information aren't available on filter directly ... you must search for corresponding type too!)
sal_Int32 nFlags = 0 ;
- sal_Int32 nClipboardId = 0 ;
+ SotClipboardFormatId nClipboardId = SotClipboardFormatId::NONE;
sal_Int32 nDocumentIconId = 0 ;
sal_Int32 nFormatVersion = 0 ;
OUString sMimeType ;
@@ -1086,7 +1086,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
// For external filters ignore clipboard IDs
if((nFlags & SFX_FILTER_STARONEFILTER) == SFX_FILTER_STARONEFILTER)
{
- nClipboardId = 0;
+ nClipboardId = SotClipboardFormatId::NONE;
}
}
// register SfxFilter
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index bc17030b7907..70f8c977880d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -146,7 +146,7 @@ sal_Int8 DropListBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
*/
{
- if ( IsDropFormatSupported( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) )
+ if ( IsDropFormatSupported( SotClipboardFormatId::OBJECTDESCRIPTOR ) )
{
// special case: page styles are allowed to create new styles by example
// but not allowed to be created by drag and drop
@@ -173,7 +173,7 @@ sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
for ( sal_uInt32 i = 0; i < nFormatCount; ++i )
{
- SotFormatStringId nId = aHelper.GetFormat(i);
+ SotClipboardFormatId nId = aHelper.GetFormat(i);
TransferableObjectDescriptor aDesc;
if ( aHelper.GetTransferableObjectDescriptor( nId, aDesc ) )
@@ -2617,7 +2617,7 @@ sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
// special case: page styles are allowed to create new styles by example
// but not allowed to be created by drag and drop
if ( nItemId != SfxTemplate::SfxFamilyIdToNId( SFX_STYLE_FAMILY_PAGE )&&
- IsDropFormatSupported( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) &&
+ IsDropFormatSupported( SotClipboardFormatId::OBJECTDESCRIPTOR ) &&
!rParent.bNewByExampleDisabled )
{
nReturn = DND_ACTION_COPY;
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 08ac76eaaa92..2599f3528919 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -41,7 +41,7 @@ SfxFilter::SfxFilter( const OUString& rProvider, const OUString &rFilterName ) :
maProvider(rProvider),
nFormatType(0),
nVersion(0),
- lFormat(0),
+ lFormat(SotClipboardFormatId::NONE),
nDocIcon(0)
{
}
@@ -49,7 +49,7 @@ SfxFilter::SfxFilter( const OUString& rProvider, const OUString &rFilterName ) :
SfxFilter::SfxFilter( const OUString &rName,
const OUString &rWildCard,
SfxFilterFlags nType,
- sal_uInt32 lFmt,
+ SotClipboardFormatId lFmt,
const OUString &rTypNm,
sal_uInt16 nIcon,
const OUString &rMimeType,
@@ -165,8 +165,8 @@ OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
}
else
{
- sal_Int32 nClipId = ((SotStorage&)rStg).GetFormat();
- if ( nClipId )
+ SotClipboardFormatId nClipId = ((SotStorage&)rStg).GetFormat();
+ if ( nClipId != SotClipboardFormatId::NONE )
{
const SfxFilter* pFilter = SfxFilterMatcher().GetFilter4ClipBoardId( nClipId );
if ( pFilter )
@@ -198,8 +198,8 @@ OUString SfxFilter::GetTypeFromStorage(
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
aDataFlavor.MimeType = aMediaType;
- sal_uInt32 nClipId = SotExchange::GetFormat( aDataFlavor );
- if ( nClipId )
+ SotClipboardFormatId nClipId = SotExchange::GetFormat( aDataFlavor );
+ if ( nClipId != SotClipboardFormatId::NONE )
{
SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
if ( bTemplate )
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index fe7432823882..c21bdc735466 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -156,7 +156,7 @@ void SfxObjectShell::SetMapUnit( MapUnit nMapUnit )
void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc ) const
{
- sal_uInt32 nClipFormat;
+ SotClipboardFormatId nClipFormat;
OUString aAppName, aShortName;
FillClass( &rDesc.maClassName, &nClipFormat, &aAppName, &rDesc.maTypeName, &aShortName, SOFFICE_FILEFORMAT_CURRENT );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 59cb2e81ad45..2129913c5137 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -310,25 +310,25 @@ namespace {
* Chart2 does not have an Object shell, so handle this here for now
* If we ever implement a full scale object shell in chart2 move it there
*/
-sal_uInt32 GetChartVersion( sal_Int32 nVersion, bool bTemplate )
+SotClipboardFormatId GetChartVersion( sal_Int32 nVersion, bool bTemplate )
{
if( nVersion == SOFFICE_FILEFORMAT_60)
{
- return SOT_FORMATSTR_ID_STARCHART_60;
+ return SotClipboardFormatId::STARCHART_60;
}
else if( nVersion == SOFFICE_FILEFORMAT_8)
{
if (bTemplate)
{
SAL_WARN("sfx", "no chart template support yet");
- return SOT_FORMATSTR_ID_STARCHART_8;
+ return SotClipboardFormatId::STARCHART_8;
}
else
- return SOT_FORMATSTR_ID_STARCHART_8;
+ return SotClipboardFormatId::STARCHART_8;
}
SAL_WARN("sfx", "unsupported version");
- return 0;
+ return SotClipboardFormatId::NONE;
}
}
@@ -343,14 +343,14 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
{
SvGlobalName aName;
OUString aFullTypeName, aShortTypeName, aAppName;
- sal_uInt32 nClipFormat=0;
+ SotClipboardFormatId nClipFormat = SotClipboardFormatId::NONE;
if(!bChart)
FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate );
else
nClipFormat = GetChartVersion(nVersion, bTemplate);
- if ( nClipFormat )
+ if ( nClipFormat != SotClipboardFormatId::NONE )
{
// basic doesn't have a ClipFormat
// without MediaType the storage is not really usable, but currently the BasicIDE still
@@ -1346,7 +1346,7 @@ bool SfxObjectShell::SaveTo_Impl
// If the filter is a "cross export" filter ( f.e. a filter for exporting an impress document from
// a draw document ), the ClassId of the destination storage is different from the ClassId of this
// document. It can be retrieved from the default filter for the desired target format
- long nFormat = rMedium.GetFilter()->GetFormat();
+ SotClipboardFormatId nFormat = rMedium.GetFilter()->GetFormat();
SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
const SfxFilter *pFilt = rMatcher.GetFilter4ClipBoardId( nFormat );
if ( pFilt )
@@ -3330,26 +3330,26 @@ bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XSto
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
aDataFlavor.MimeType = aMediaType;
- sal_uInt32 nFormat = SotExchange::GetFormat( aDataFlavor );
+ SotClipboardFormatId nFormat = SotExchange::GetFormat( aDataFlavor );
switch ( nFormat )
{
- case SOT_FORMATSTR_ID_STARWRITER_60 :
- case SOT_FORMATSTR_ID_STARWRITERWEB_60 :
- case SOT_FORMATSTR_ID_STARWRITERGLOB_60 :
- case SOT_FORMATSTR_ID_STARDRAW_60 :
- case SOT_FORMATSTR_ID_STARIMPRESS_60 :
- case SOT_FORMATSTR_ID_STARCALC_60 :
- case SOT_FORMATSTR_ID_STARCHART_60 :
- case SOT_FORMATSTR_ID_STARMATH_60 :
- case SOT_FORMATSTR_ID_STARWRITER_8:
- case SOT_FORMATSTR_ID_STARWRITERWEB_8:
- case SOT_FORMATSTR_ID_STARWRITERGLOB_8:
- case SOT_FORMATSTR_ID_STARDRAW_8:
- case SOT_FORMATSTR_ID_STARIMPRESS_8:
- case SOT_FORMATSTR_ID_STARCALC_8:
- case SOT_FORMATSTR_ID_STARCHART_8:
- case SOT_FORMATSTR_ID_STARMATH_8:
+ case SotClipboardFormatId::STARWRITER_60 :
+ case SotClipboardFormatId::STARWRITERWEB_60 :
+ case SotClipboardFormatId::STARWRITERGLOB_60 :
+ case SotClipboardFormatId::STARDRAW_60 :
+ case SotClipboardFormatId::STARIMPRESS_60 :
+ case SotClipboardFormatId::STARCALC_60 :
+ case SotClipboardFormatId::STARCHART_60 :
+ case SotClipboardFormatId::STARMATH_60 :
+ case SotClipboardFormatId::STARWRITER_8:
+ case SotClipboardFormatId::STARWRITERWEB_8:
+ case SotClipboardFormatId::STARWRITERGLOB_8:
+ case SotClipboardFormatId::STARDRAW_8:
+ case SotClipboardFormatId::STARIMPRESS_8:
+ case SotClipboardFormatId::STARCALC_8:
+ case SotClipboardFormatId::STARCHART_8:
+ case SotClipboardFormatId::STARMATH_8:
break;
default:
@@ -3468,26 +3468,26 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
aDataFlavor.MimeType = aMediaType;
- sal_uInt32 nFormat = SotExchange::GetFormat( aDataFlavor );
+ SotClipboardFormatId nFormat = SotExchange::GetFormat( aDataFlavor );
switch ( nFormat )
{
- case SOT_FORMATSTR_ID_STARWRITER_60 :
- case SOT_FORMATSTR_ID_STARWRITERWEB_60 :
- case SOT_FORMATSTR_ID_STARWRITERGLOB_60 :
- case SOT_FORMATSTR_ID_STARDRAW_60 :
- case SOT_FORMATSTR_ID_STARIMPRESS_60 :
- case SOT_FORMATSTR_ID_STARCALC_60 :
- case SOT_FORMATSTR_ID_STARCHART_60 :
- case SOT_FORMATSTR_ID_STARMATH_60 :
- case SOT_FORMATSTR_ID_STARWRITER_8:
- case SOT_FORMATSTR_ID_STARWRITERWEB_8:
- case SOT_FORMATSTR_ID_STARWRITERGLOB_8:
- case SOT_FORMATSTR_ID_STARDRAW_8:
- case SOT_FORMATSTR_ID_STARIMPRESS_8:
- case SOT_FORMATSTR_ID_STARCALC_8:
- case SOT_FORMATSTR_ID_STARCHART_8:
- case SOT_FORMATSTR_ID_STARMATH_8:
+ case SotClipboardFormatId::STARWRITER_60 :
+ case SotClipboardFormatId::STARWRITERWEB_60 :
+ case SotClipboardFormatId::STARWRITERGLOB_60 :
+ case SotClipboardFormatId::STARDRAW_60 :
+ case SotClipboardFormatId::STARIMPRESS_60 :
+ case SotClipboardFormatId::STARCALC_60 :
+ case SotClipboardFormatId::STARCHART_60 :
+ case SotClipboardFormatId::STARMATH_60 :
+ case SotClipboardFormatId::STARWRITER_8:
+ case SotClipboardFormatId::STARWRITERWEB_8:
+ case SotClipboardFormatId::STARWRITERGLOB_8:
+ case SotClipboardFormatId::STARDRAW_8:
+ case SotClipboardFormatId::STARIMPRESS_8:
+ case SotClipboardFormatId::STARCALC_8:
+ case SotClipboardFormatId::STARCHART_8:
+ case SotClipboardFormatId::STARMATH_8:
break;
default:
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 972c328500a3..2c3bd55979d5 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1688,7 +1688,7 @@ static bool lcl_getServiceName ( const OUString &rFileURL, OUString &rName )
uno::Reference< embed::XStorage > xStorage =
comphelper::OStorageHelper::GetStorageFromURL( rFileURL, embed::ElementModes::READ );
- sal_uIntPtr nFormat = SotStorage::GetFormatID( xStorage );
+ SotClipboardFormatId nFormat = SotStorage::GetFormatID( xStorage );
const SfxFilter* pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );