diff options
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 24 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 38 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 34 |
3 files changed, 48 insertions, 48 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 52574c269ee5..c68f6f91feb7 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -274,12 +274,12 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos if( aDataHelper.GetFormatCount() ) { - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) || - aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) || - aDataHelper.HasFormat( FORMAT_FILE ) || - aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) || - aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) || - aDataHelper.HasFormat( FORMAT_BITMAP ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE ) || + aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) || + aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) || + aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) ) { bEnable = sal_True; } @@ -574,12 +574,12 @@ sal_Int8 GalleryBrowser2::AcceptDrop( DropTargetHelper& rTarget, const AcceptDro { if( !mpCurTheme->IsDragging() ) { - if( rTarget.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING ) || - rTarget.IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) || - rTarget.IsDropFormatSupported( FORMAT_FILE ) || - rTarget.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB ) || - rTarget.IsDropFormatSupported( FORMAT_GDIMETAFILE ) || - rTarget.IsDropFormatSupported( FORMAT_BITMAP ) ) + if( rTarget.IsDropFormatSupported( SotClipboardFormatId::DRAWING ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::FILE ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::SVXB ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::GDIMETAFILE ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::BITMAP ) ) { nRet = DND_ACTION_COPY; } diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index fd0a90cc33be..7a7809df927a 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -477,29 +477,29 @@ void GalleryTransferable::AddSupportedFormats() { if( SGA_OBJ_SVDRAW == meObjectKind ) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::DRAWING ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); } else { if( mpURL ) - AddFormat( FORMAT_FILE ); + AddFormat( SotClipboardFormatId::FILE ); if( mpGraphicObject ) { - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); if( mpGraphicObject->GetType() == GRAPHIC_GDIMETAFILE ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); } else { - AddFormat( FORMAT_BITMAP ); - AddFormat( FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } } } @@ -507,33 +507,33 @@ void GalleryTransferable::AddSupportedFormats() bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bRet = false; InitData( false ); - if( ( SOT_FORMATSTR_ID_DRAWING == nFormat ) && ( SGA_OBJ_SVDRAW == meObjectKind ) ) + if( ( SotClipboardFormatId::DRAWING == nFormat ) && ( SGA_OBJ_SVDRAW == meObjectKind ) ) { - bRet = ( mxModelStream.Is() && SetObject( &mxModelStream, 0, rFlavor ) ); + bRet = ( mxModelStream.Is() && SetObject( &mxModelStream, SotClipboardFormatId::NONE, rFlavor ) ); } - else if( ( SOT_FORMATSTR_ID_SVIM == nFormat ) && mpImageMap ) + else if( ( SotClipboardFormatId::SVIM == nFormat ) && mpImageMap ) { // TODO/MBA: do we need a BaseURL here?! bRet = SetImageMap( *mpImageMap, rFlavor ); } - else if( ( FORMAT_FILE == nFormat ) && mpURL ) + else if( ( SotClipboardFormatId::FILE == nFormat ) && mpURL ) { bRet = SetString( mpURL->GetMainURL( INetURLObject::NO_DECODE ), rFlavor ); } - else if( ( SOT_FORMATSTR_ID_SVXB == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::SVXB == nFormat ) && mpGraphicObject ) { bRet = SetGraphic( mpGraphicObject->GetGraphic(), rFlavor ); } - else if( ( FORMAT_GDIMETAFILE == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::GDIMETAFILE == nFormat ) && mpGraphicObject ) { bRet = SetGDIMetaFile( mpGraphicObject->GetGraphic().GetGDIMetaFile(), rFlavor ); } - else if( ( FORMAT_BITMAP == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::BITMAP == nFormat ) && mpGraphicObject ) { bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor ); } @@ -542,7 +542,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons } bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, - sal_uInt32, const datatransfer::DataFlavor& ) + SotClipboardFormatId, const datatransfer::DataFlavor& ) { bool bRet = false; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 2bf184f4c559..c0f5ecd6d00e 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1185,24 +1185,24 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran TransferableDataHelper aDataHelper( rxTransferable ); boost::scoped_ptr<Graphic> pGraphic; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { SotStorageStreamRef xModelStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xModelStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xModelStm ) ) bRet = InsertModelStream( xModelStm, nInsertPos ); } - else if( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) || - aDataHelper.HasFormat( FORMAT_FILE ) ) + else if( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE ) ) { FileList aFileList; - if( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) ) - aDataHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ); + if( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) ) + aDataHelper.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ); else { OUString aFile; - if (aDataHelper.GetString(FORMAT_FILE, aFile) && !aFile.isEmpty()) + if (aDataHelper.GetString(SotClipboardFormatId::FILE, aFile) && !aFile.isEmpty()) aFileList.AppendFile( aFile ); } @@ -1226,16 +1226,16 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran else { Graphic aGraphic; - sal_uIntPtr nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) - nFormat = SOT_FORMATSTR_ID_SVXB; - else if( aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) - nFormat = FORMAT_GDIMETAFILE; - else if( aDataHelper.HasFormat( FORMAT_BITMAP ) ) - nFormat = FORMAT_BITMAP; + if( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) + nFormat = SotClipboardFormatId::SVXB; + else if( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) + nFormat = SotClipboardFormatId::GDIMETAFILE; + else if( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) ) + nFormat = SotClipboardFormatId::BITMAP; - if( nFormat && aDataHelper.GetGraphic( nFormat, aGraphic ) ) + if( nFormat != SotClipboardFormatId::NONE && aDataHelper.GetGraphic( nFormat, aGraphic ) ) pGraphic.reset(new Graphic( aGraphic )); } @@ -1243,13 +1243,13 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran { bRet = false; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::SVIM ) ) { ImageMap aImageMap; // according to KA we don't need a BaseURL here - if( aDataHelper.GetImageMap( SOT_FORMATSTR_ID_SVIM, aImageMap ) ) + if( aDataHelper.GetImageMap( SotClipboardFormatId::SVIM, aImageMap ) ) { SvxGalleryDrawModel aModel; |