diff options
Diffstat (limited to 'chart2/source')
4 files changed, 24 insertions, 24 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index d7544c8a9681..259cb389abe1 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -260,10 +260,10 @@ void ChartController::executeDispatch_Paste() TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( m_pChartWindow )); if( aDataHelper.GetTransferable().is()) { - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) + if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { SotStorageStreamRef xStm; - if ( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) ) + if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) ) { xStm->Seek( 0 ); Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) ); @@ -274,31 +274,31 @@ void ChartController::executeDispatch_Paste() } } } - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) { // graphic exchange format (graphic manager bitmap format?) SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm )) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm )) ReadGraphic( *xStm, aGraphic ); } - else if( aDataHelper.HasFormat( FORMAT_GDIMETAFILE )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE )) { // meta file GDIMetaFile aMetafile; - if( aDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMetafile )) + if( aDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMetafile )) aGraphic = Graphic( aMetafile ); } - else if( aDataHelper.HasFormat( FORMAT_BITMAP )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP )) { // bitmap (non-graphic-manager) BitmapEx aBmpEx; - if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx )) + if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx )) aGraphic = Graphic( aBmpEx ); } - else if( aDataHelper.HasFormat( FORMAT_STRING )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::STRING )) { OUString aString; - if( aDataHelper.GetString( FORMAT_STRING, aString ) && m_pDrawModelWrapper ) + if( aDataHelper.GetString( SotClipboardFormatId::STRING, aString ) && m_pDrawModelWrapper ) { if( m_pDrawViewWrapper ) { diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx index 0857de3f1612..d9722c17ace5 100644 --- a/chart2/source/controller/main/ChartDropTargetHelper.cxx +++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx @@ -82,7 +82,7 @@ sal_Int8 ChartDropTargetHelper::AcceptDrop( const AcceptDropEvent& rEvt ) if( ( rEvt.mnAction == DND_ACTION_COPY || rEvt.mnAction == DND_ACTION_MOVE ) && satisfiesPrerequisites() && - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK ) ) + IsDropFormatSupported( SotClipboardFormatId::LINK ) ) { // @todo: check if the data is suitable. Is this possible without XTransferable? nResult = rEvt.mnAction; @@ -101,9 +101,9 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) satisfiesPrerequisites()) { TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable ); - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK )) + if( aDataHelper.HasFormat( SotClipboardFormatId::LINK )) { - Sequence<sal_Int8> aBytes = aDataHelper.GetSequence(SOT_FORMATSTR_ID_LINK, OUString()); + Sequence<sal_Int8> aBytes = aDataHelper.GetSequence(SotClipboardFormatId::LINK, OUString()); if (aBytes.getLength()) { ::std::vector< OUString > aStrings( lcl_getStringsFromByteSequence( aBytes )); diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx index e46796e65053..d5584d78ad84 100644 --- a/chart2/source/controller/main/ChartTransferable.cxx +++ b/chart2/source/controller/main/ChartTransferable.cxx @@ -30,7 +30,7 @@ #include <svx/unomodel.hxx> #include <svx/svdview.hxx> -#define CHARTTRANSFER_OBJECTTYPE_DRAWMODEL 1 +#define CHARTTRANSFER_OBJECTTYPE_DRAWMODEL SotClipboardFormatId::STRING using namespace ::com::sun::star; @@ -66,30 +66,30 @@ void ChartTransferable::AddSupportedFormats() { if ( m_bDrawing ) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); } - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bResult = false; if( HasFormat( nFormat )) { - if ( nFormat == SOT_FORMATSTR_ID_DRAWING ) + if ( nFormat == SotClipboardFormatId::DRAWING ) { bResult = SetObject( m_pMarkedObjModel, CHARTTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor ); } - else if ( nFormat == FORMAT_GDIMETAFILE ) + else if ( nFormat == SotClipboardFormatId::GDIMETAFILE ) { Graphic aGraphic( m_xMetaFileGraphic ); bResult = SetGDIMetaFile( aGraphic.GetGDIMetaFile(), rFlavor ); } - else if( nFormat == FORMAT_BITMAP ) + else if( nFormat == SotClipboardFormatId::BITMAP ) { Graphic aGraphic( m_xMetaFileGraphic ); bResult = SetBitmapEx( aGraphic.GetBitmapEx(), rFlavor ); @@ -99,7 +99,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c return bResult; } -bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, +bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const datatransfer::DataFlavor& /* rFlavor */ ) { // called from SetObject, put data into stream diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx index 3c54689a07db..5ebf31902825 100644 --- a/chart2/source/controller/main/ChartTransferable.hxx +++ b/chart2/source/controller/main/ChartTransferable.hxx @@ -44,7 +44,7 @@ protected: // implementation of TransferableHelper methods virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; private: |