summaryrefslogtreecommitdiffstats
path: root/vcl/source/edit/textview.cxx
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 /vcl/source/edit/textview.cxx
parentconvert AccessibleStates to enum class (diff)
downloadcore-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.tar.gz
core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.zip
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 'vcl/source/edit/textview.cxx')
-rw-r--r--vcl/source/edit/textview.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 0aa78887278e..5fc04a71313a 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -104,12 +104,12 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
{
uno::Any aAny;
- sal_uLong nT = SotExchange::GetFormat( rFlavor );
- if ( nT == SOT_FORMAT_STRING )
+ SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor );
+ if ( nT == SotClipboardFormatId::STRING )
{
aAny <<= GetText();
}
- else if ( nT == SOT_FORMATSTR_ID_HTML )
+ else if ( nT == SotClipboardFormatId::HTML )
{
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
sal_uLong nLen = GetHTMLStream().Tell();
@@ -131,16 +131,16 @@ uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavo
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
bool bHTML = GetHTMLStream().Tell() > 0;
uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 );
- SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] );
+ SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aDataFlavors.getArray()[0] );
if ( bHTML )
- SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_HTML, aDataFlavors.getArray()[1] );
+ SotExchange::GetFormatDataFlavor( SotClipboardFormatId::HTML, aDataFlavors.getArray()[1] );
return aDataFlavors;
}
sal_Bool TETextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException, std::exception)
{
- sal_uLong nT = SotExchange::GetFormat( rFlavor );
- return ( nT == SOT_FORMAT_STRING );
+ SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor );
+ return ( nT == SotClipboardFormatId::STRING );
}
struct ImpTextView
@@ -1179,7 +1179,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC
if ( xDataObj.is() )
{
datatransfer::DataFlavor aFlavor;
- SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor );
+ SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor );
if ( xDataObj->isDataFlavorSupported( aFlavor ) )
{
try
@@ -2062,7 +2062,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
if ( xDataObj.is() )
{
datatransfer::DataFlavor aFlavor;
- SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor );
+ SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor );
if ( xDataObj->isDataFlavorSupported( aFlavor ) )
{
uno::Any aData = xDataObj->getTransferData( aFlavor );