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 /chart2/source/controller/main/ChartController_Tools.cxx | |
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 'chart2/source/controller/main/ChartController_Tools.cxx')
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 20 |
1 files changed, 10 insertions, 10 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 ) { |