summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-01 05:35:31 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-01 05:35:31 -0500
commit20a132b51715bb1869068a52202e63701550041d (patch)
tree4336b3cad54c55ec0209aff8ff8745ccc3031a83 /sc/source/ui
parente18d881753ce02e6226a911fe26c33c9f465c361 (diff)
targeted string re-work
Change-Id: I970c967cce1a5d18e2b9b2b99cddfb3118159950
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/vba/vbafilesearch.cxx12
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx28
-rw-r--r--sc/source/ui/vba/vbahelper.cxx46
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx88
-rw-r--r--sc/source/ui/vba/vbapropvalue.hxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx274
-rw-r--r--sc/source/ui/view/cellsh1.cxx10
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx8
-rw-r--r--sc/source/ui/view/tabvwshg.cxx10
12 files changed, 241 insertions, 243 deletions
diff --git a/sc/source/ui/vba/vbafilesearch.cxx b/sc/source/ui/vba/vbafilesearch.cxx
index f526011c629e..ddb5c04be3eb 100644
--- a/sc/source/ui/vba/vbafilesearch.cxx
+++ b/sc/source/ui/vba/vbafilesearch.cxx
@@ -56,7 +56,7 @@ static Reference< XSimpleFileAccess3 > getFileAccess( void )
if( xSMgr.is() )
{
xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY );
+ ( ::rtl::OUString( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
}
}
return xSFI;
@@ -180,15 +180,15 @@ sal_Int32 SAL_CALL ScVbaFileSearch::Execute( ) throw (css::uno::RuntimeExceptio
if ( IsWildCard( aTempFileName ) )
{
bool bEndWithAsterisk = aTempFileName.endsWithAsciiL("*", 1);
- bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"))) == 0);
+ bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString("*")) == 0);
if ( !bEndWithAsterisk && !bStartWithAsterisk )
{
- aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ aTempFileName = ::rtl::OUString("*") + aTempFileName + ::rtl::OUString("*");
}
}
else
{
- aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ aTempFileName = ::rtl::OUString("*") + aTempFileName + ::rtl::OUString("*");
}
WildCard wildCard( aTempFileName );
SearchWildCard( wildCard, m_sLookIn, m_bSearchSubFolders, m_aSearchedFiles );
@@ -227,7 +227,7 @@ Reference< XFoundFiles > SAL_CALL ScVbaFileSearch::getFoundFiles() throw (css::u
rtl::OUString ScVbaFileSearch::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VbaFileSearch"));
+ return rtl::OUString("VbaFileSearch");
}
css::uno::Sequence< rtl::OUString > ScVbaFileSearch::getServiceNames()
@@ -236,7 +236,7 @@ css::uno::Sequence< rtl::OUString > ScVbaFileSearch::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.FileSearch") );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.FileSearch" );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 9d210f81b62e..3ef30f9625ed 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -51,14 +51,14 @@ using namespace ::ooo::vba;
// =============================================================================
//ScVbaGlobals::ScVbaGlobals( css::uno::Reference< css::uno::XComponentContext >const& rxContext, ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext )
-rtl::OUString sDocCtxName( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext") );
+rtl::OUString sDocCtxName( "ExcelDocumentContext" );
ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
{
OSL_TRACE("ScVbaGlobals::ScVbaGlobals()");
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
- aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application"));
+ aInitArgs[ 0 ].Name = rtl::OUString("Application");
aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
aInitArgs[ 1 ].Name = sDocCtxName;
aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
@@ -102,8 +102,8 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
return xWorkbook;
}
// FIXME check if this is correct/desired behavior
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "No activeWorkbook available" )), Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(
+ "No activeWorkbook available" ), Reference< uno::XInterface >() );
}
@@ -241,7 +241,7 @@ ScVbaGlobals::getDebug() throw (uno::RuntimeException)
aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithArgumentsAndContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.Debug" ) ), aArgs, mxContext );
+ ::rtl::OUString( "ooo.vba.Debug" ), aArgs, mxContext );
return uno::Any( xVBADebug );
}
catch( uno::Exception& )
@@ -264,13 +264,13 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
if ( !bInit )
{
rtl::OUString names[] = {
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Range" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Workbook" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Window" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Worksheet" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Application" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Hyperlink" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" ) )
+ ::rtl::OUString( "ooo.vba.excel.Range" ),
+ ::rtl::OUString( "ooo.vba.excel.Workbook" ),
+ ::rtl::OUString( "ooo.vba.excel.Window" ),
+ ::rtl::OUString( "ooo.vba.excel.Worksheet" ),
+ ::rtl::OUString( "ooo.vba.excel.Application" ),
+ ::rtl::OUString( "ooo.vba.excel.Hyperlink" ),
+ ::rtl::OUString( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" )
};
sal_Int32 nExcelServices = ( sizeof( names )/ sizeof( names[0] ) );
sal_Int32 startIndex = serviceNames.getLength();
@@ -285,7 +285,7 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
rtl::OUString
ScVbaGlobals::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaGlobals"));
+ return rtl::OUString("ScVbaGlobals");
}
uno::Sequence< rtl::OUString >
@@ -295,7 +295,7 @@ ScVbaGlobals::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Globals" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Globals" );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index b3a4a35efee6..b5fda853b822 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -82,7 +82,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
if( !xIntrospection.is() )
{
uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- xIntrospection.set( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection") ) ), uno::UNO_QUERY_THROW );
+ xIntrospection.set( xFactory->createInstance( rtl::OUString( "com.sun.star.beans.Introspection" ) ), uno::UNO_QUERY_THROW );
}
return xIntrospection->inspect( aObject );
}
@@ -90,7 +90,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
uno::Reference< script::XTypeConverter >
getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static uno::Reference< script::XTypeConverter > xTypeConv( xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter") ), xContext ), uno::UNO_QUERY_THROW );
+ static uno::Reference< script::XTypeConverter > xTypeConv( xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( "com.sun.star.script.Converter" ), xContext ), uno::UNO_QUERY_THROW );
return xTypeConv;
}
// helper method to determine if the view ( calc ) is in print-preview mode
@@ -124,10 +124,10 @@ private:
static uno::Reference< beans::XPropertySet > getGlobalSheetSettings() throw ( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySet > xTmpProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( "DefaultContext" )), uno::UNO_QUERY_THROW );
static uno::Reference<lang::XMultiComponentFactory > xServiceManager(
xContext->getServiceManager(), uno::UNO_QUERY_THROW );
- static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.GlobalSheetSettings" ) ) ,xContext ), uno::UNO_QUERY_THROW );
+ static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( "com.sun.star.sheet.GlobalSheetSettings" ) ,xContext ), uno::UNO_QUERY_THROW );
return xProps;
}
@@ -270,7 +270,7 @@ getCurrentDocument() throw (uno::RuntimeException)
uno::Any aModel;
- SbxVariable *pCompVar = basicChosen->Find( UniString(RTL_CONSTASCII_USTRINGPARAM("ThisComponent")), SbxCLASS_OBJECT );
+ SbxVariable *pCompVar = basicChosen->Find( UniString("ThisComponent"), SbxCLASS_OBJECT );
if ( pCompVar )
{
@@ -281,14 +281,14 @@ getCurrentDocument() throw (uno::RuntimeException)
// trying last gasp try the current component
uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
// test if vba service is present
- uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( "DefaultContext" )), uno::UNO_QUERY_THROW );
uno::Reference<lang::XMultiComponentFactory > xSMgr( xCtx->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), xCtx), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString("com.sun.star.frame.Desktop"), xCtx), uno::UNO_QUERY_THROW );
xModel.set( xDesktop->getCurrentComponent(), uno::UNO_QUERY );
if ( !xModel.is() )
{
throw uno::RuntimeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't extract model from basic ( its obviously not set yet ) therefore don't know the currently selected document") ), uno::Reference< uno::XInterface >() );
+ rtl::OUString( "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document") ), uno::Reference< uno::XInterface >() );
}
return xModel;
}
@@ -303,9 +303,7 @@ getCurrentDocument() throw (uno::RuntimeException)
{
OSL_TRACE("Failed to get ThisComponent");
throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "Can't determine the currently selected document") ),
+ rtl::OUString( "Can't determine the currently selected document" ),
uno::Reference< uno::XInterface >() );
}
return xModel;
@@ -408,7 +406,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
if ( nCopies > 1 ) // Collate only useful when more that 1 copy
Collate >>= bCollate;
- rtl::OUString sRange( RTL_CONSTASCII_USTRINGPARAM( "-" ) );
+ rtl::OUString sRange( "-" );
rtl::OUString sFileName;
if (( nFrom || nTo ) )
@@ -535,7 +533,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
break;
}
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid type, can't convert" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid type, can't convert" ), uno::Reference< uno::XInterface >() );
}
return sString;
}
@@ -592,7 +590,7 @@ ContainerUtilities::FieldInList( const uno::Sequence< rtl::OUString >& SearchLis
}
bool NeedEsc(sal_Unicode cCode)
{
- String sEsc(RTL_CONSTASCII_USTRINGPARAM(".^$+\\|{}()"));
+ String sEsc(".^$+\\|{}()");
return (STRING_NOTFOUND != sEsc.Search(cCode));
}
@@ -615,11 +613,11 @@ rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike )
start++;
break;
case '*':
- sResult.append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")));
+ sResult.append(rtl::OUString(".*"));
start++;
break;
case '#':
- sResult.append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[0-9]")));
+ sResult.append(rtl::OUString("[0-9]"));
start++;
break;
case '~':
@@ -713,42 +711,42 @@ UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComp
double UserFormGeometryHelper::getLeft()
{
sal_Int32 nLeft = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;
+ mxModel->getPropertyValue( rtl::OUString( VBA_LEFT ) ) >>= nLeft;
return Millimeter::getInPoints( nLeft );
}
void UserFormGeometryHelper::setLeft( double nLeft )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
+ mxModel->setPropertyValue( rtl::OUString( VBA_LEFT ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
}
double UserFormGeometryHelper::getTop()
{
sal_Int32 nTop = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop;
+ mxModel->getPropertyValue( rtl::OUString( VBA_TOP ) ) >>= nTop;
return Millimeter::getInPoints( nTop );
}
void UserFormGeometryHelper::setTop( double nTop )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
+ mxModel->setPropertyValue( rtl::OUString( VBA_TOP ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
}
double UserFormGeometryHelper::getHeight()
{
sal_Int32 nHeight = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight;
+ mxModel->getPropertyValue( rtl::OUString( SC_UNONAME_CELLHGT ) ) >>= nHeight;
return Millimeter::getInPoints( nHeight );
}
void UserFormGeometryHelper::setHeight( double nHeight )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
+ mxModel->setPropertyValue( rtl::OUString( SC_UNONAME_CELLHGT ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
}
double UserFormGeometryHelper::getWidth()
{
sal_Int32 nWidth = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth;
+ mxModel->getPropertyValue( rtl::OUString( SC_UNONAME_CELLWID ) ) >>= nWidth;
return Millimeter::getInPoints( nWidth );
}
void UserFormGeometryHelper::setWidth( double nWidth)
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
+ mxModel->setPropertyValue( rtl::OUString( SC_UNONAME_CELLWID ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
}
SfxItemSet*
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index 2831df0fcf92..fe0403c056b9 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -60,13 +60,13 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent
// query for current page style
mxModel.set( xModel, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
- uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
+ uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( "PageStyle" ));
rtl::OUString aStyleName;
aValue >>= aStyleName;
uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
- uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( "PageStyles")), uno::UNO_QUERY_THROW );
mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
mnOrientLandscape = excel::XlPageOrientation::xlLandscape;
mnOrientPortrait = excel::XlPageOrientation::xlPortrait;
@@ -101,7 +101,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw
{
uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
if( rAreas.isEmpty() ||
- rAreas.equalsIgnoreAsciiCase ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FALSE")) ) )
+ rAreas.equalsIgnoreAsciiCase ( rtl::OUString("FALSE") ) )
{
// print the whole sheet
uno::Sequence< table::CellRangeAddress > aSeq;
@@ -148,7 +148,7 @@ void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::
uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "ScaleToPagesY"));
}
void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
@@ -162,7 +162,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
fitToPagesTall >>= scaleToPageY;
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesY"), uno::makeAny( scaleToPageY ));
}
catch( uno::Exception& )
{
@@ -171,7 +171,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "ScaleToPagesX"));
}
void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
@@ -185,7 +185,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
fitToPagesWide >>= scaleToPageX;
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesX"), uno::makeAny( scaleToPageX ));
}
catch( uno::Exception& )
{
@@ -194,7 +194,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "PageScale"));
}
void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
@@ -222,9 +222,9 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
// these only exist in S08
sal_uInt16 nScale = 0;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPages"), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesX"), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesY"), uno::makeAny( nScale ));
}
catch( beans::UnknownPropertyException& )
{
@@ -237,7 +237,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
{
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PageScale"), uno::makeAny( pageScale ));
}
rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
@@ -245,7 +245,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeE
rtl::OUString leftHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
@@ -263,12 +263,12 @@ void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) th
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
xText->setString( leftHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -281,7 +281,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::Runtim
rtl::OUString centerHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
@@ -299,12 +299,12 @@ void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
xText->setString( centerHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -317,7 +317,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::Runtime
rtl::OUString rightHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getRightText();
@@ -335,12 +335,12 @@ void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader)
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getRightText();
xText->setString( rightHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -353,7 +353,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeE
rtl::OUString leftFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getLeftText();
@@ -371,12 +371,12 @@ void SAL_CALL ScVbaPageSetup::setLeftFooter( const rtl::OUString& leftFooter) th
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getLeftText();
xText->setString( leftFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -389,7 +389,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::Runtim
rtl::OUString centerFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getCenterText();
@@ -407,12 +407,12 @@ void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getCenterText();
xText->setString( centerFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -426,7 +426,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::Runtime
rtl::OUString rightFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getRightText();
@@ -444,12 +444,12 @@ void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter)
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getRightText();
xText->setString( rightFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -462,7 +462,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
sal_Int32 order = excel::XlOrder::xlDownThenOver;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "PrintDownFirst"));
sal_Bool bPrintDownFirst = false;
aValue >>= bPrintDownFirst;
if( !bPrintDownFirst )
@@ -491,7 +491,7 @@ void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::Runtim
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PrintDownFirst"), uno::makeAny( bOrder ));
}
catch( uno::Exception& )
{
@@ -503,7 +503,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::Runtime
sal_Int16 number = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "FirstPageNumber"));
aValue >>= number;
}
catch( uno::Exception& )
@@ -529,7 +529,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr
{
uno::Any aValue;
aValue <<= (sal_Int16)firstPageNumber;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
+ mxPageProps->setPropertyValue( rtl::OUString( "FirstPageNumber"), aValue );
}
catch( uno::Exception& )
{
@@ -541,7 +541,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::Runtime
sal_Bool centerVertically = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "CenterVertically"));
aValue >>= centerVertically;
}
catch( uno::Exception& )
@@ -554,7 +554,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
+ mxPageProps->setPropertyValue( rtl::OUString( "CenterVertically"), uno::makeAny( centerVertically ));
}
catch( uno::Exception& )
{
@@ -566,7 +566,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::Runti
sal_Bool centerHorizontally = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "CenterHorizontally"));
aValue >>= centerHorizontally;
}
catch( uno::Exception& )
@@ -579,7 +579,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
+ mxPageProps->setPropertyValue( rtl::OUString( "CenterHorizontally"), uno::makeAny( centerHorizontally ));
}
catch( uno::Exception& )
{
@@ -591,7 +591,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeExc
sal_Bool printHeadings = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "PrintHeaders"));
aValue >>= printHeadings;
}
catch( uno::Exception& )
@@ -604,7 +604,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (c
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PrintHeaders"), uno::makeAny( printHeadings ));
}
catch( uno::Exception& )
{
@@ -614,7 +614,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (c
rtl::OUString
ScVbaPageSetup::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup"));
+ return rtl::OUString("ScVbaPageSetup");
}
uno::Sequence< rtl::OUString >
@@ -624,7 +624,7 @@ ScVbaPageSetup::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.PageSetup" );
}
return aServiceNames;
}
@@ -688,7 +688,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeExcept
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "Size"));
aValue >>= size;
ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, true);
}
@@ -722,7 +722,7 @@ void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 paperSize) throw (css::uno
{
Size size1 = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM );
com::sun::star::awt::Size size(size1.Width(), size1.Height());
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")), uno::makeAny( size ));
+ mxPageProps->setPropertyValue( rtl::OUString( "Size"), uno::makeAny( size ));
}
catch( uno::Exception& )
{
diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx
index 2cbc37ecc981..f4d296a2e82c 100644
--- a/sc/source/ui/vba/vbapropvalue.hxx
+++ b/sc/source/ui/vba/vbapropvalue.hxx
@@ -52,7 +52,7 @@ public:
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
+ rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); }
};
#endif //SC_VBA_PROPVALULE_HXX
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 572abbe4225e..958888eeb2ff 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -273,7 +273,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException
return ScCellRangesBase::getImplementation( mxRanges );
if( mxRange.is() )
return ScCellRangesBase::getImplementation( mxRange );
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("General Error creating range - Unknown" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("General Error creating range - Unknown" ), uno::Reference< uno::XInterface >() );
}
ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
@@ -285,7 +285,7 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't access Itemset for range" ), uno::Reference< uno::XInterface >() );
return pDataSet;
}
@@ -456,14 +456,14 @@ const ScRangeList& ScVbaRange::getScRangeList() throw (uno::RuntimeException)
{
if( ScCellRangesBase* pScRangesBase = getCellRangesBase() )
return pScRangesBase->GetRangeList();
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain UNO range implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain UNO range implementation object" ), uno::Reference< uno::XInterface >() );
}
const ScRangeList& ScVbaRange::getScRangeList( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
{
if( ScVbaRange* pScVbaRange = getImplementation( rxRange ) )
return pScVbaRange->getScRangeList();
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain VBA range implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain VBA range implementation object" ), uno::Reference< uno::XInterface >() );
}
@@ -482,7 +482,7 @@ public:
uno::Reference< beans::XPropertySet > getNumberProps()
{
long nIndexKey = 0;
- uno::Any aValue = mxRangeProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat")));
+ uno::Any aValue = mxRangeProps->getPropertyValue(rtl::OUString( "NumberFormat"));
aValue >>= nIndexKey;
if ( mxFormats.is() )
@@ -526,7 +526,7 @@ public:
uno::Reference< beans::XPropertySet > xNumberProps( getNumberProps(), uno::UNO_QUERY_THROW );
::rtl::OUString aFormatString;
- uno::Any aString = xNumberProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FormatString")));
+ uno::Any aString = xNumberProps->getPropertyValue(rtl::OUString( "FormatString"));
aString >>= aFormatString;
return aFormatString;
}
@@ -535,7 +535,7 @@ public:
{
uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
sal_Int16 nType = ::comphelper::getINT16(
- xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Type" )) ) );
+ xNumberProps->getPropertyValue( ::rtl::OUString( "Type" ) ) );
return nType;
}
@@ -547,12 +547,12 @@ public:
{
lang::Locale aLocale;
uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
- xNumProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Locale" ) ) ) >>= aLocale;
+ xNumProps->getPropertyValue( ::rtl::OUString( "Locale" ) ) >>= aLocale;
nNewIndex = mxFormats->queryKey( rFormat, aLocale, false );
if ( nNewIndex == -1 ) // format not defined
nNewIndex = mxFormats->addNew( rFormat, aLocale );
}
- mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
+ mxRangeProps->setPropertyValue( rtl::OUString( "NumberFormat" ), uno::makeAny( nNewIndex ) );
return true;
}
@@ -560,12 +560,12 @@ public:
{
uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
lang::Locale aLocale;
- xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
+ xNumberProps->getPropertyValue( ::rtl::OUString( "Locale" ) ) >>= aLocale;
uno::Reference<util::XNumberFormatTypes> xTypes( mxFormats, uno::UNO_QUERY );
if ( xTypes.is() )
{
sal_Int32 nNewIndex = xTypes->getStandardFormat( nType, aLocale );
- mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
+ mxRangeProps->setPropertyValue( rtl::OUString( "NumberFormat" ), uno::makeAny( nNewIndex ) );
return true;
}
return false;
@@ -668,19 +668,19 @@ public:
};
-const static ::rtl::OUString ISVISIBLE( RTL_CONSTASCII_USTRINGPARAM( "IsVisible"));
-const static ::rtl::OUString POSITION( RTL_CONSTASCII_USTRINGPARAM( "Position"));
-const static rtl::OUString EQUALS( RTL_CONSTASCII_USTRINGPARAM("=") );
-const static rtl::OUString NOTEQUALS( RTL_CONSTASCII_USTRINGPARAM("<>") );
-const static rtl::OUString GREATERTHAN( RTL_CONSTASCII_USTRINGPARAM(">") );
-const static rtl::OUString GREATERTHANEQUALS( RTL_CONSTASCII_USTRINGPARAM(">=") );
-const static rtl::OUString LESSTHAN( RTL_CONSTASCII_USTRINGPARAM("<") );
-const static rtl::OUString LESSTHANEQUALS( RTL_CONSTASCII_USTRINGPARAM("<=") );
-const static rtl::OUString CONTS_HEADER( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader" ));
-const static rtl::OUString INSERTPAGEBREAKS( RTL_CONSTASCII_USTRINGPARAM("InsertPageBreaks" ));
-const static rtl::OUString STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY( RTL_CONSTASCII_USTRINGPARAM("The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again") );
-const static rtl::OUString STR_ERRORMESSAGE_NOCELLSWEREFOUND( RTL_CONSTASCII_USTRINGPARAM("No cells were found") );
-const static rtl::OUString CELLSTYLE( RTL_CONSTASCII_USTRINGPARAM("CellStyle") );
+const static ::rtl::OUString ISVISIBLE( "IsVisible");
+const static ::rtl::OUString POSITION( "Position");
+const static rtl::OUString EQUALS( "=" );
+const static rtl::OUString NOTEQUALS( "<>" );
+const static rtl::OUString GREATERTHAN( ">" );
+const static rtl::OUString GREATERTHANEQUALS( ">=" );
+const static rtl::OUString LESSTHAN( "<" );
+const static rtl::OUString LESSTHANEQUALS( "<=" );
+const static rtl::OUString CONTS_HEADER( "ContainsHeader" );
+const static rtl::OUString INSERTPAGEBREAKS( "InsertPageBreaks" );
+const static rtl::OUString STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY( "The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again" );
+const static rtl::OUString STR_ERRORMESSAGE_NOCELLSWEREFOUND( "No cells were found" );
+const static rtl::OUString CELLSTYLE( "CellStyle" );
class CellValueSetter : public ValueSetter
{
@@ -815,7 +815,7 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference<
table::CellContentType eFormulaType = table::CellContentType_VALUE;
// some formulas give textual results
- xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FormulaResultType" ) ) ) >>= eFormulaType;
+ xProp->getPropertyValue( rtl::OUString( "FormulaResultType" ) ) >>= eFormulaType;
if ( eFormulaType == table::CellContentType_TEXT )
{
@@ -962,7 +962,7 @@ public:
};
-const static rtl::OUString sNA(RTL_CONSTASCII_USTRINGPARAM("#N/A"));
+const static rtl::OUString sNA("#N/A");
class Dim1ArrayValueSetter : public ArrayVisitor
{
@@ -1152,7 +1152,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
{
// see if there is a match with a named range
uno::Reference< beans::XPropertySet > xProps( pDocSh->GetModel(), uno::UNO_QUERY_THROW );
- uno::Reference< container::XNameAccess > xNameAccess( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xNameAccess( xProps->getPropertyValue( rtl::OUString( "NamedRanges" ) ), uno::UNO_QUERY_THROW );
// Strangly enough you can have Range( "namedRange1, namedRange2, etc," )
// loop around each ',' seperated name
std::vector< rtl::OUString > vNames;
@@ -1286,10 +1286,10 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference
uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException)
{
if( !rxCellRanges.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() );
sal_Int32 nCount = rxCellRanges->getCount();
if( nCount < 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() );
ScRangeList aScRanges;
for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
@@ -1416,14 +1416,14 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
ScVbaRange* pRange = dynamic_cast< ScVbaRange* >( xRange.get() );
if ( pRange && pDocSh && pRange->getScDocument() != pDocSh->GetDocument() )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid range" ), uno::Reference< uno::XInterface >() );
}
xRange->getCellRange() >>= xRangeParam;
}
break;
}
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't extact CellRangeAddress from type" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't extact CellRangeAddress from type" ), uno::Reference< uno::XInterface >() );
}
return lclGetRangeAddress( xRangeParam );
}
@@ -1434,7 +1434,7 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno
uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::GetDocumentFromRange(xRange);
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
return borders;
@@ -1448,7 +1448,7 @@ void lcl_NotifyRangeChanges( const uno::Reference< frame::XModel >& xModel, ScCe
const ScRangeList& aCellRanges = pUnoRangesBase->GetRangeList();
if ( pModelObj && pModelObj->HasChangesListeners() )
{
- pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aCellRanges );
+ pModelObj->NotifyChanges( ::rtl::OUString( "cell-change" ), aCellRanges );
}
}
}
@@ -1476,9 +1476,9 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
mbIsColumns( bIsColumns )
{
if ( !xContext.is() )
- throw lang::IllegalArgumentException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "context is not set " ) ), uno::Reference< uno::XInterface >() , 1 );
+ throw lang::IllegalArgumentException( rtl::OUString( "context is not set " ), uno::Reference< uno::XInterface >() , 1 );
if ( !xRange.is() )
- throw lang::IllegalArgumentException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "range is not set " ) ), uno::Reference< uno::XInterface >() , 1 );
+ throw lang::IllegalArgumentException( rtl::OUString( "range is not set " ), uno::Reference< uno::XInterface >() , 1 );
uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxParent, mxContext, xRange ) );
m_Areas = new ScVbaRangeAreas( mxParent, mxContext, xIndex, mbIsRows, mbIsColumns );
@@ -1533,10 +1533,10 @@ uno::Any SAL_CALL ScVbaRange::getName() throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
if ( !xModel.is() )
{
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid document" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid document" ), uno::Reference< uno::XInterface >() );
}
uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRanges"))) , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString("NamedRanges")) , uno::UNO_QUERY_THROW );
uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
sal_Int32 nCount = xNames->getCount();
@@ -1582,10 +1582,10 @@ ScVbaRange::setName( const uno::Any& aName ) throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
if ( !xModel.is() )
{
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid document" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid document" ), uno::Reference< uno::XInterface >() );
}
uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRanges"))) , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString("NamedRanges")) , uno::UNO_QUERY_THROW );
uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
@@ -2231,7 +2231,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
else if ( mxRanges.is() )
xProps.set(mxRanges, ::uno::UNO_QUERY );
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
ScCellRangeObj* pRangeObj = NULL;
@@ -2369,7 +2369,7 @@ ScVbaRange::Select() throw (uno::RuntimeException)
{
ScCellRangesBase* pUnoRangesBase = getCellRangesBase();
if ( !pUnoRangesBase )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying uno range object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access underlying uno range object" ), uno::Reference< uno::XInterface >() );
ScDocShell* pShell = pUnoRangesBase->GetDocShell();
if ( pShell )
{
@@ -2503,10 +2503,10 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
aRange.aEnd.SetRow( aRange.aStart.Row() + ( nEndRow - nStartRow ));
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal param" ), uno::Reference< uno::XInterface >() );
if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
// return a normal range ( even for multi-selection
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
return new ScVbaRange( mxParent, mxContext, xRange, true );
@@ -2547,10 +2547,10 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
aRange.aEnd.SetCol( aRange.aStart.Col() + ( nEndCol - nStartCol ));
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal param" ), uno::Reference< uno::XInterface >() );
if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
}
// Columns() - no params
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
@@ -2627,7 +2627,7 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
{
// #TODO support ( if necessary ) multi-area range in this scenario
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("!!! That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "!!! That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
uno::Any aRange = xRange->getCellRange();
uno::Reference< table::XCellRange > xCellRange;
@@ -2650,7 +2650,7 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
ScRangeList aList = pUnoRangesBase->GetRangeList();
if ( !excel::implnCopyRanges( xModel, aList ) )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -2668,7 +2668,7 @@ void
ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
if (Destination.hasValue())
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2778,7 +2778,7 @@ ScVbaRange::setWrapText( const uno::Any& aIsWrapped ) throw (script::BasicErrorE
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
bool bIsWrapped = extractBoolFromAny( aIsWrapped );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), uno::Any( bIsWrapped ) );
+ xProps->setPropertyValue( rtl::OUString( "IsTextWrapped" ), uno::Any( bIsWrapped ) );
}
uno::Any
@@ -2806,7 +2806,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept
return aNULL();
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
- uno::Any aValue = xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ) );
+ uno::Any aValue = xProps->getPropertyValue( rtl::OUString( "IsTextWrapped" ) );
return aValue;
}
@@ -2847,7 +2847,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
if( !Cell1.hasValue() )
throw uno::RuntimeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Invalid Argument " ) ),
+ rtl::OUString( " Invalid Argument " ),
uno::Reference< XInterface >() );
table::CellRangeAddress resultAddress;
@@ -2998,7 +2998,7 @@ void SAL_CALL
ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
ScDocShell* pShell = getScDocShell();
uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
@@ -3131,7 +3131,7 @@ ScVbaRange::getHidden() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to get IsVisible property")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to get IsVisible property"), uno::Reference< uno::XInterface >() );
}
catch( const uno::Exception& e )
{
@@ -3181,7 +3181,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
// sanity check required params
if ( What.isEmpty() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, missing params" ) , uno::Reference< uno::XInterface >() );
rtl::OUString sWhat = VBAToRegexp( What);
// #TODO #FIXME SearchFormat & ReplacesFormat are not processed
// What do we do about MatchByte.. we don't seem to support that
@@ -3199,7 +3199,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
xReplace->createReplaceDescriptor();
xDescriptor->setSearchString( sWhat);
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHREGEXP ) ), uno::makeAny( sal_True ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHREGEXP ), uno::makeAny( sal_True ) );
xDescriptor->setReplaceString( Replacement);
if ( LookAt.hasValue() )
{
@@ -3211,11 +3211,11 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() );
// set global search props ( affects the find dialog
// and of course the defaults for this method
newOptions.SetWordOnly( bSearchWords );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHWORDS ), uno::makeAny( bSearchWords ) );
}
// sets SearchByRow ( true for Rows )
if ( SearchOrder.hasValue() )
@@ -3227,16 +3227,16 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() );
newOptions.SetRowDirection( bSearchByRow );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHBYROW ), uno::makeAny( bSearchByRow ) );
}
if ( MatchCase.hasValue() )
{
// SearchCaseSensitive
MatchCase >>= bMatchCase;
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHCASE ), uno::makeAny( bMatchCase ) );
}
ScGlobal::SetSearchItem( newOptions );
@@ -3270,7 +3270,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if( What >>= sWhat )
{
if( sWhat.isEmpty() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() );
}
else if( What >>= nWhat )
{
@@ -3281,7 +3281,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sWhat = rtl::OUString::valueOf( fWhat );
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() );
rtl::OUString sSearch = VBAToRegexp( sWhat );
@@ -3296,7 +3296,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
xDescriptor->setSearchString( sSearch );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHREGEXP ) ), uno::Any( true ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHREGEXP ), uno::Any( true ) );
uno::Reference< excel::XRange > xAfterRange;
uno::Reference< table::XCellRange > xStartCell;
@@ -3304,10 +3304,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// After must be a single cell in the range
if( xAfterRange->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be a single cell." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "After must be a single cell." ) , uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
if( !xCell.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be in range." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "After must be in range." ) , uno::Reference< uno::XInterface >() );
xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
}
@@ -3330,10 +3330,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
nSearchType = SVX_SEARCHIN_VALUE;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookIn." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookIn." ) , uno::Reference< uno::XInterface >() );
}
newOptions.SetCellType( nSearchType );
- xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchType" )), uno::makeAny( nSearchType ) );
+ xDescriptor->setPropertyValue( rtl::OUString( "SearchType" ), uno::makeAny( nSearchType ) );
}
}
@@ -3347,9 +3347,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() );
newOptions.SetWordOnly( bSearchWords );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHWORDS ), uno::makeAny( bSearchWords ) );
}
// SearchOrder
@@ -3362,10 +3362,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() );
newOptions.SetRowDirection( bSearchByRow );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHBYROW ), uno::makeAny( bSearchByRow ) );
}
// SearchDirection
@@ -3380,9 +3380,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchDirection" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchDirection" ) , uno::Reference< uno::XInterface >() );
newOptions.SetBackward( bSearchBackwards );
- xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchBackwards" )), uno::makeAny( bSearchBackwards ) );
+ xDescriptor->setPropertyValue( rtl::OUString( "SearchBackwards" ), uno::makeAny( bSearchBackwards ) );
}
}
@@ -3392,9 +3392,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// SearchCaseSensitive
if( !( MatchCase >>= bMatchCase ) )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for MatchCase" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for MatchCase" ) , uno::Reference< uno::XInterface >() );
}
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHCASE ), uno::makeAny( bMatchCase ) );
// MatchByte
// SearchFormat
@@ -3439,11 +3439,11 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere
rtl::OUString sRangeName = ::comphelper::getString( Key );
table::CellRangeAddress aRefAddr;
if ( !pDocSh )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort no docshell to calculate key param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort no docshell to calculate key param"), uno::Reference< uno::XInterface >() );
xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr );
}
else
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort illegal type value for key param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort illegal type value for key param"), uno::Reference< uno::XInterface >() );
uno::Reference< table::XCellRange > xKey;
xKey.set( xKeyRange->getCellRange(), uno::UNO_QUERY_THROW );
return xKey;
@@ -3461,7 +3461,7 @@ const rtl::OUString& sPropName ) throw( uno::RuntimeException )
if ( pProp->Name.equals( sPropName ) )
return count;
if ( count == nItems )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort unknown sort property")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort unknown sort property"), uno::Reference< uno::XInterface >() );
return -1; //should never reach here ( satisfy compiler )
}
@@ -3497,7 +3497,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
aTableField.IsAscending = false;
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal Key param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal Key param" ), uno::Reference< uno::XInterface >() );
}
@@ -3507,7 +3507,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
// #TODO# #FIXME# can we do something with Type
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
@@ -3515,7 +3515,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
@@ -3645,7 +3645,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocShell* pDocShell = getScDocShell();
xKey1 = processKey( Key1, mxContext, pDocShell );
if ( !xKey1.is() )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort needs a key1 param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort needs a key1 param"), uno::Reference< uno::XInterface >() );
if ( Key2.hasValue() )
xKey2 = processKey( Key2, mxContext, pDocShell );
@@ -3654,7 +3654,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
uno::Reference< util::XSortable > xSort( mxRange, uno::UNO_QUERY_THROW );
uno::Sequence< beans::PropertyValue > sortDescriptor = xSort->createSortDescriptor();
- sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SortFields") ) );
+ sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString( "SortFields" ) );
uno::Sequence< table::TableSortField > sTableFields(1);
sal_Int32 nTableIndex = 0;
@@ -3672,7 +3672,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
}
sortDescriptor[ nTableSortFieldIndex ].Value <<= sTableFields;
- sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsSortColumns")) );
+ sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString("IsSortColumns") );
sortDescriptor[ nIndex ].Value <<= bIsSortColumns;
nIndex = findSortPropertyIndex( sortDescriptor, CONTS_HEADER );
@@ -3722,7 +3722,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException)
nMoveX = 1;
break;
default:
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid Direction" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Invalid Direction" ), uno::Reference< uno::XInterface >() );
}
if ( pDoc )
@@ -3749,11 +3749,11 @@ uno::Reference< excel::XCharacters > SAL_CALL
ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
{
if ( !isSingleCellRange() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create Characters property for multicell range ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't create Characters property for multicell range " ), uno::Reference< uno::XInterface >() );
uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::GetDocumentFromRange(mxRange);
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length );
@@ -3788,7 +3788,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
mode = sheet::CellDeleteMode_LEFT;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("Illegal paramater ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal paramater " ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -3840,7 +3840,7 @@ ScVbaRange::createEnumeration() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
ScVbaRange::getDefaultMethodName( ) throw (uno::RuntimeException)
{
- const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") );
+ const static rtl::OUString sName( "Item" );
return sName;
}
@@ -3878,9 +3878,9 @@ ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (u
// return Char Width in points
double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException )
{
- const static rtl::OUString sDflt( RTL_CONSTASCII_USTRINGPARAM("Default"));
- const static rtl::OUString sCharFontName( RTL_CONSTASCII_USTRINGPARAM("CharFontName"));
- const static rtl::OUString sPageStyles( RTL_CONSTASCII_USTRINGPARAM("PageStyles"));
+ const static rtl::OUString sDflt( "Default");
+ const static rtl::OUString sCharFontName( "CharFontName");
+ const static rtl::OUString sPageStyles( "PageStyles");
// get the font from the default style
uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNameAccess( xStyleSupplier->getStyleFamilies(), uno::UNO_QUERY_THROW );
@@ -4019,7 +4019,7 @@ uno::Reference< excel::XRange >
ScVbaRange::getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException )
{
if ( !m_Areas.is() )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No areas available")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("No areas available"), uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW );
return xRange;
}
@@ -4314,7 +4314,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
Cell1 >>= sRangeName;
if ( Cell1.hasValue() && !Cell2.hasValue() && !sRangeName.isEmpty() )
{
- const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
+ const static rtl::OUString sNamedRanges( "NamedRanges");
uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
@@ -4441,7 +4441,7 @@ void lcl_setTableFieldsFromCriteria( rtl::OUString& sCriteria1, uno::Reference<
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
- xDescProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseRegularExpressions" ) ), uno::Any( sal_True ) );
+ xDescProps->setPropertyValue( rtl::OUString( "UseRegularExpressions" ), uno::Any( sal_True ) );
}
}
@@ -4456,7 +4456,7 @@ void lcl_setTableFieldsFromCriteria( rtl::OUString& sCriteria1, uno::Reference<
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
- xDescProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseRegularExpressions" ) ), uno::Any( sal_True ) );
+ xDescProps->setPropertyValue( rtl::OUString( "UseRegularExpressions" ), uno::Any( sal_True ) );
}
}
else if ( ( nPos = sCriteria1.indexOf( GREATERTHAN ) ) == 0 )
@@ -4530,7 +4530,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if ( pRange )
{
if ( pRange->isSingleCellRange() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create AutoFilter") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't create AutoFilter" ), uno::Reference< uno::XInterface >() );
RangeHelper currentRegion( pRange->mxRange );
autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress();
}
@@ -4565,18 +4565,18 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
xDataBaseRange.set( xDBRanges->getByTable(nSheet ), uno::UNO_QUERY_THROW );
}
if ( !xDataBaseRange.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Failed to find the autofilter placeholder range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to find the autofilter placeholder range" ), uno::Reference< uno::XInterface >() );
uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW );
// set autofilt
- xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) );
+ xDBRangeProps->setPropertyValue( rtl::OUString( "AutoFilter" ), uno::Any(sal_True) );
// set header
uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
sal_Bool bHasColHeader = false;
ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL;
bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : false;
- xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( bHasColHeader ) );
+ xFiltProps->setPropertyValue( rtl::OUString( "ContainsHeader" ), uno::Any( bHasColHeader ) );
}
@@ -4690,7 +4690,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
nConn = sheet::FilterConnection_AND;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UnknownOption") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "UnknownOption" ), uno::Reference< uno::XInterface >() );
}
@@ -4757,7 +4757,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if( xSheetFilterDescriptor.is() )
xSheetFilterDescriptor->setFilterFields2( uno::Sequence< sheet::TableFilterField2 >() );
}
- xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(!bHasAuto) );
+ xDBRangeProps->setPropertyValue( rtl::OUString( "AutoFilter" ), uno::Any(!bHasAuto) );
}
}
@@ -4785,7 +4785,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
mode = sheet::CellInsertMode_DOWN;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("Illegal paramater ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal paramater " ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -4869,7 +4869,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Destination.hasValue() )
{
if( !( Destination >>= xRange ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Destination parameter should be a range" )),
+ throw uno::RuntimeException( rtl::OUString( "Destination parameter should be a range" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set range");
}
@@ -4884,7 +4884,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if ( DataType.hasValue() )
{
if( !( DataType >>= xlTextParsingType ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataType parameter should be a short" )),
+ throw uno::RuntimeException( rtl::OUString( "DataType parameter should be a short" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Datatype" );
}
@@ -4894,7 +4894,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( TextQualifier.hasValue() )
{
if( !( TextQualifier >>= xlTextQualifier ))
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TextQualifier parameter should be a short" )),
+ throw uno::RuntimeException( rtl::OUString( "TextQualifier parameter should be a short" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set TextQualifier");
}
@@ -4903,7 +4903,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( ConsecutiveDelimiter.hasValue() )
{
if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ConsecutiveDelimiter parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "ConsecutiveDelimiter parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set ConsecutiveDelimiter");
}
@@ -4912,7 +4912,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Tab.hasValue() && bDilimited )
{
if( !( Tab >>= bTab ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Tab parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Tab parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Tab");
}
@@ -4921,7 +4921,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Semicolon.hasValue() && bDilimited )
{
if( !( Semicolon >>= bSemicolon ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Semicolon parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Semicolon parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Semicolon");
}
@@ -4929,7 +4929,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Comma.hasValue() && bDilimited )
{
if( !( Comma >>= bComma ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Comma parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Comma parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Comma");
}
@@ -4937,7 +4937,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Space.hasValue() && bDilimited )
{
if( !( Space >>= bSpace ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Space parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Space parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Space");
}
@@ -4949,12 +4949,12 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
{
if( OtherChar.hasValue() )
if( !( OtherChar >>= sOtherChar ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OtherChar parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "OtherChar parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set OtherChar" );
}
else if( bOther )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Other parameter should be a True" )),
+ throw uno::RuntimeException( rtl::OUString( "Other parameter should be a True" ),
uno::Reference< uno::XInterface >() );
}
// FieldInfo, Optional Variant. An array containing parse information for the individual columns of data.
@@ -4969,7 +4969,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( DecimalSeparator.hasValue() )
{
if( !( DecimalSeparator >>= sDecimalSeparator ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DecimalSeparator parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "DecimalSeparator parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set DecimalSeparator" );
}
@@ -4977,7 +4977,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( ThousandsSeparator.hasValue() )
{
if( !( ThousandsSeparator >>= sThousandsSeparator ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ThousandsSeparator parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "ThousandsSeparator parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set ThousandsSpeparator" );
}
@@ -5095,7 +5095,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException)
uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW );
ScVbaHyperlinksRef xScSheetHlinks( dynamic_cast< ScVbaHyperlinks* >( xSheetHlinks.get() ) );
if( !xScSheetHlinks.is() )
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain hyperlinks implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain hyperlinks implementation object" ), uno::Reference< uno::XInterface >() );
// create a new local hyperlinks object based on the sheet hyperlinks
ScVbaHyperlinksRef xHlinks( new ScVbaHyperlinks( getParent(), mxContext, xScSheetHlinks, getScRangeList() ) );
@@ -5200,7 +5200,7 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException)
return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) );
if( mxRanges.is() )
return lclGetPrefixVariant( lclGetPrefixChar( mxRanges ) );
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected empty Range object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Unexpected empty Range object" ), uno::Reference< uno::XInterface >() );
}
uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
@@ -5209,7 +5209,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not get Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
sal_Bool bShowDetail = false;
@@ -5241,7 +5241,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
}
else
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
}
return aNULL();
}
@@ -5252,7 +5252,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
bool bShowDetail = extractBoolFromAny( aShowDetail );
@@ -5277,7 +5277,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
}
else
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
}
}
@@ -5360,9 +5360,9 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
Data >>= xIntRes;
uno::Reference< script::XInvocation > xInvRes(xIntRes, uno::UNO_QUERY_THROW);
- rtl::OUString oMoveNext(RTL_CONSTASCII_USTRINGPARAM("MoveNext")) ;
- rtl::OUString oEof(RTL_CONSTASCII_USTRINGPARAM("EOF")) ;
- rtl::OUString oFields(RTL_CONSTASCII_USTRINGPARAM("Fields")) ;
+ rtl::OUString oMoveNext("MoveNext") ;
+ rtl::OUString oEof("EOF") ;
+ rtl::OUString oFields("Fields") ;
if( !xInvRes->hasMethod(oMoveNext))
{
@@ -5373,7 +5373,7 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
aRet = xInvRes->getValue(oFields);
aRet >>= xIntFields;
uno::Reference< script::XInvocation > xInvFields(xIntFields, uno::UNO_QUERY_THROW);
- aRet = xInvFields->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Count"))) ;
+ aRet = xInvFields->getValue( rtl::OUString("Count")) ;
aRet >>= lColCnt;
//Set the assign column number
@@ -5401,12 +5401,12 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
nCol = l;
aPar <<= nCol;
//get every field
- aRet = xInvFields->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Item")), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
+ aRet = xInvFields->invoke( rtl::OUString("Item"), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
aRet >>= xIntFld;
uno::Reference< script::XInvocation > xInvFld(xIntFld, uno::UNO_QUERY_THROW); //Get the Field obj
//set the field value
- aRet = xInvFld->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")) );
+ aRet = xInvFld->getValue( rtl::OUString("Value") );
uno::Reference< excel::XRange > xRngToFill = xRngPos->Offset(aCrrRow,aCrrCol );
xRngToFill->setValue(aRet);
@@ -5568,7 +5568,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
eCmd = FILL_GROWTH;
break;
case excel::XlAutoFillType::xlFillFormats:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "xlFillFormat not supported for AutoFill" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "xlFillFormat not supported for AutoFill" ), uno::Reference< uno::XInterface >() );
case excel::XlAutoFillType::xlFillValues:
case excel::XlAutoFillType::xlFillSeries:
case excel::XlAutoFillType::xlLinearTrend:
@@ -6086,17 +6086,17 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from range" ), uno::Reference< uno::XInterface >() );
}
// Action
if ( Action != excel::XlFilterAction::xlFilterInPlace && Action != excel::XlFilterAction::xlFilterCopy )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid input parameter" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid input parameter" ), uno::Reference< uno::XInterface >() );
}
if ( m_Areas->getCount() > 1 )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid range" ), uno::Reference< uno::XInterface >() );
}
sal_Bool bCopyOut = ( Action != excel::XlFilterAction::xlFilterInPlace );
@@ -6156,7 +6156,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
uno::Reference< beans::XPropertySet > xPropertySet( xFilterDesc, uno::UNO_QUERY );
if ( xPropertySet.is() )
{
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_COPYOUT ) ), uno::makeAny( bCopyOut ) );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_COPYOUT ), uno::makeAny( bCopyOut ) );
}
// CopyToRange
@@ -6173,7 +6173,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
ScUnoConversion::FillScRange( refRange, getCellRangeAddressForVBARange( CopyToRange, getScDocShell(), aTmpConv ) );
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), refRange ) );
uno::Reference< sheet::XCellAddressable > xCellAddr( xRange->getCellByPosition( 0, 0 ), uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_OUTPOS ) ), uno::makeAny( xCellAddr->getCellAddress() ) );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_OUTPOS ), uno::makeAny( xCellAddr->getCellAddress() ) );
}
// Unique
@@ -6189,7 +6189,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
catch( const uno::Exception& )
{
}
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_SKIPDUP ) ), aUnique );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_SKIPDUP ), aUnique );
}
// Do filter.
@@ -6255,7 +6255,7 @@ ScVbaRange::PivotTable() throw (uno::RuntimeException)
rtl::OUString
ScVbaRange::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaRange"));
+ return rtl::OUString("ScVbaRange");
}
uno::Sequence< rtl::OUString >
@@ -6265,7 +6265,7 @@ ScVbaRange::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Range" );
}
return aServiceNames;
}
@@ -6277,7 +6277,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException)
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
- static rtl::OUString FunctionName( RTL_CONSTASCII_USTRINGPARAM("IsError" ) );
+ static rtl::OUString FunctionName( "IsError" );
uno::Sequence< uno::Any > Params(1);
uno::Reference< excel::XRange > aRange( this );
Params[0] = uno::makeAny( aRange );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 7c650c42b9d3..1588e4080c84 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1596,7 +1596,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
+ rtl::OUString("com.sun.star.linguistic2.ChineseTranslationDialog")
, xContext), UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
@@ -1606,7 +1606,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
- aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
+ aParam.Name = rtl::OUString("ParentWindow");
aParam.Value <<= makeAny(xDialogParentWindow);
pArray[0] <<= makeAny(aParam);
xInit->initialize( aSeq );
@@ -1624,9 +1624,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
try
{
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDirectionToSimplified")) ) >>= bToSimplified;
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUseCharacterVariants")) ) >>= bUseVariants;
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsTranslateCommonTerms")) ) >>= bCommonTerms;
+ xProp->getPropertyValue( rtl::OUString("IsDirectionToSimplified") ) >>= bToSimplified;
+ xProp->getPropertyValue( rtl::OUString("IsUseCharacterVariants") ) >>= bUseVariants;
+ xProp->getPropertyValue( rtl::OUString("IsTranslateCommonTerms") ) >>= bCommonTerms;
}
catch( Exception& )
{
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index a5f44a8b4266..3021062c47ef 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -225,7 +225,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
+ rtl::OUString("_beamer"),
frame::FrameSearchFlag::CHILDREN);
if ( xBeamerFrame.is() )
bWasOpen = sal_True;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index dc75138a9120..98ac6655ded8 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -367,7 +367,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xInfo;
xStyles->getByName( pNameItem->GetValue() ) >>= xInfo;
::rtl::OUString aUIName;
- xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName;
+ xInfo->getPropertyValue( ::rtl::OUString("DisplayName") ) >>= aUIName;
if ( !aUIName.isEmpty() )
rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index bf3402c32e4e..24a37cfa12fc 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -465,7 +465,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
const ScDPLabelData& rLabelData = pDPData->maLabels;
mpDPFieldPopup.reset(new ScCheckListMenuWindow(this, pViewData->GetDocument()));
- mpDPFieldPopup->setName(OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot field member popup")));
+ mpDPFieldPopup->setName(OUString("DataPilot field member popup"));
mpDPFieldPopup->setExtendedData(pDPData.release());
mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this));
{
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 86f3315bf5cb..adc5208567a3 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -954,14 +954,14 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
if(pSeq)
{
sal_uInt16 nViewID(GetViewFrame()->GetCurViewId());
- pSeq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_VIEWID));
- rtl::OUStringBuffer sBuffer(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_VIEW)));
+ pSeq[0].Name = rtl::OUString(SC_VIEWID);
+ rtl::OUStringBuffer sBuffer(rtl::OUString(SC_VIEW));
::sax::Converter::convertNumber(sBuffer,
static_cast<sal_Int32>(nViewID));
pSeq[0].Value <<= sBuffer.makeStringAndClear();
- pSeq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ZOOMVALUE));
+ pSeq[1].Name = rtl::OUString(SC_ZOOMVALUE);
pSeq[1].Value <<= sal_Int32 (pPreview->GetZoom());
- pSeq[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageNumber"));
+ pSeq[2].Name = rtl::OUString("PageNumber");
pSeq[2].Value <<= pPreview->GetPageNo();
}
}
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 43ccf1ce8c79..6e6fad45cdf9 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -86,26 +86,26 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
uno::Any aAny;
aAny <<= rtl::OUString(rName);
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Label" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "Label" ), aAny );
::rtl::OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL );
aAny <<= aTmp;
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "TargetURL" ), aAny );
if( rTarget.Len() )
{
aAny <<= rtl::OUString(rTarget);
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetFrame" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "TargetFrame" ), aAny );
}
form::FormButtonType eButtonType = form::FormButtonType_URL;
aAny <<= eButtonType;
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "ButtonType" ), aAny );
if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
{
aAny <<= sal_True;
- xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DispatchURLInternal" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "DispatchURLInternal" ), aAny );
}
Point aPos;