Kaydet (Commit) 9bd6c8d0 authored tarafından Noel Grandin's avatar Noel Grandin

convert svtools/source/filter/* from String to OUString

Change-Id: Ia544a7e84ac4de4f64ef4d7e71219a3f4683c430
üst 563e228f
...@@ -140,7 +140,7 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() ...@@ -140,7 +140,7 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues()
maMediaDescriptor.realloc( ++nCount ); maMediaDescriptor.realloc( ++nCount );
// the "FilterData" Property is an Any that will contain our PropertySequence of Values // the "FilterData" Property is an Any that will contain our PropertySequence of Values
maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); maMediaDescriptor[ i ].Name = "FilterData";
maMediaDescriptor[ i ].Value <<= maFilterDataSequence; maMediaDescriptor[ i ].Value <<= maFilterDataSequence;
return maMediaDescriptor; return maMediaDescriptor;
} }
...@@ -178,8 +178,8 @@ sal_Int16 SvFilterOptionsDialog::execute() ...@@ -178,8 +178,8 @@ sal_Int16 SvFilterOptionsDialog::execute()
{ {
sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL;
String aFilterNameStr( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); OUString aFilterNameStr( "FilterName" );
String aInternalFilterName; OUString aInternalFilterName;
sal_Int32 j, nCount = maMediaDescriptor.getLength(); sal_Int32 j, nCount = maMediaDescriptor.getLength();
for ( j = 0; j < nCount; j++ ) for ( j = 0; j < nCount; j++ )
{ {
...@@ -188,12 +188,12 @@ sal_Int16 SvFilterOptionsDialog::execute() ...@@ -188,12 +188,12 @@ sal_Int16 SvFilterOptionsDialog::execute()
OUString aStr; OUString aStr;
maMediaDescriptor[ j ].Value >>= aStr; maMediaDescriptor[ j ].Value >>= aStr;
aInternalFilterName = aStr; aInternalFilterName = aStr;
aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "draw_" ) ), String(), 0 ); aInternalFilterName = aInternalFilterName.replaceAll( "draw_", "" );
aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 ); aInternalFilterName = aInternalFilterName.replaceAll( "impress_", "" );
break; break;
} }
} }
if ( aInternalFilterName.Len() ) if ( !aInternalFilterName.isEmpty() )
{ {
GraphicFilter aGraphicFilter( sal_True ); GraphicFilter aGraphicFilter( sal_True );
...@@ -234,24 +234,24 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp ...@@ -234,24 +234,24 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp
mxSourceDocument = xDoc; mxSourceDocument = xDoc;
// try to set the corresponding metric unit // try to set the corresponding metric unit
String aConfigPath; OUString aConfigPath;
uno::Reference< lang::XServiceInfo > xServiceInfo uno::Reference< lang::XServiceInfo > xServiceInfo
( xDoc, uno::UNO_QUERY ); ( xDoc, uno::UNO_QUERY );
if ( xServiceInfo.is() ) if ( xServiceInfo.is() )
{ {
if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") )
aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Impress/Layout/Other/MeasureUnit" ) ); aConfigPath = "Office.Impress/Layout/Other/MeasureUnit";
else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") ) else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") )
aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Draw/Layout/Other/MeasureUnit" ) ); aConfigPath = "Office.Draw/Layout/Other/MeasureUnit";
if ( aConfigPath.Len() ) if ( !aConfigPath.isEmpty() )
{ {
FilterConfigItem aConfigItem( aConfigPath ); FilterConfigItem aConfigItem( aConfigPath );
String aPropertyName; OUString aPropertyName;
SvtSysLocale aSysLocale; SvtSysLocale aSysLocale;
if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC ) if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC )
aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); aPropertyName = "Metric";
else else
aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) ); aPropertyName = "NonMetric";
meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); meFieldUnit = (FieldUnit)aConfigItem.ReadInt32( aPropertyName, FUNIT_CM );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment