diff options
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/docfilt.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/objembed.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 84 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 2 |
4 files changed, 50 insertions, 50 deletions
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 ); |