diff options
Diffstat (limited to 'sc/source/ui/vba')
58 files changed, 319 insertions, 323 deletions
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 676d05aadcee..b4bf3ff4670b 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -50,7 +50,7 @@ GetUnnamedDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException ) if ( pShell ) xModel.set( pShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xModelProps( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UnnamedDatabaseRanges") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue( rtl::OUString("UnnamedDatabaseRanges") ), uno::UNO_QUERY_THROW ); return xUnnamedDBRanges; } @@ -66,7 +66,7 @@ GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( uno::RuntimeExc uno::Reference< sheet::XDatabaseRange > xDBRange( xUnnamedDBRanges->getByTable( nSheet ) , uno::UNO_QUERY_THROW ); sal_Bool bHasAuto = false; uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ) ) >>= bHasAuto; + xProps->getPropertyValue( rtl::OUString("AutoFilter") ) >>= bHasAuto; if ( bHasAuto ) { xDataBaseRange=xDBRange; @@ -80,7 +80,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange ); if ( !pScCellRangesBase ) { - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying doc shell uno range object" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Failed to access underlying doc shell uno range object" ), uno::Reference< uno::XInterface >() ); } return pScCellRangesBase->GetDocShell(); } @@ -113,7 +113,7 @@ private: comphelper::getProcessComponentContext() ); static uno::Reference<lang::XMultiComponentFactory > xServiceManager( xContext->getServiceManager() ); - 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; } @@ -265,7 +265,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro { uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW ); rtl::OUString sCodeName; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CodeName") ) ) >>= sCodeName; + xProps->getPropertyValue( rtl::OUString("CodeName") ) >>= sCodeName; // #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible // to create a module ( and use 'Option VBASupport 1' ) for a calc document, in this scenario there // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at @@ -327,7 +327,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString( "ooo.vba.VBAObjectModuleObjectProvider")), uno::UNO_QUERY_THROW ); // set up the module info for the workbook and sheets in the nealy created // spreadsheet ScDocument* pDoc = pShell->GetDocument(); @@ -359,9 +359,9 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& sModuleInfo.ModuleType = script::ModuleType::DOCUMENT; xVBAModuleInfo->insertModuleInfo( *it, sModuleInfo ); if( xLib->hasByName( *it ) ) - xLib->replaceByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n") ) ) ); + xLib->replaceByName( *it, uno::makeAny( rtl::OUString( "Option VBASupport 1\n") ) ); else - xLib->insertByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) ) ) ); + xLib->insertByName( *it, uno::makeAny( rtl::OUString( "Option VBASupport 1\n" ) ) ); } } } diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 9372b208756a..186c7ffd4afb 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -79,7 +79,7 @@ template < typename ImplObject > if ( xTunnel.is() ) pObj = reinterpret_cast<ImplObject*>( xTunnel->getSomething(ImplObject::getUnoTunnelId())); if ( bThrow && !pObj ) - throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Internal error, can't exctract implementation object" ) ), rxWrapperIf ); + throw css::uno::RuntimeException( rtl::OUString( "Internal error, can't exctract implementation object" ), rxWrapperIf ); return pObj; } // ============================================================================ diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx index 433dea872408..f3d32063b472 100644 --- a/sc/source/ui/vba/testvba/testvba.cxx +++ b/sc/source/ui/vba/testvba/testvba.cxx @@ -78,7 +78,7 @@ OUString convertToURL( const OUString& rPath ) { osl::FileBase::getFileURLFromSystemPath( rPath, aURL ); if ( aURL.equals( rPath ) ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "could'nt convert " )).concat( rPath ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " to a URL, is it a fully qualified path name? " )) ), Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "could'nt convert " ).concat( rPath ).concat( rtl::OUString( " to a URL, is it a fully qualified path name? " ) ), Reference< uno::XInterface >() ); } return aURL; } @@ -123,9 +123,9 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) { rtl::OUString sLogLocation; - Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PathSettings" )), mxContext), uno::UNO_QUERY_THROW ); - pathSettings->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Work" )) ) >>= sLogLocation; - sLogLocation = sLogLocation.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HelperAPI-test.log" )) ); + Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW ); + pathSettings->getPropertyValue( rtl::OUString( "Work" ) ) >>= sLogLocation; + sLogLocation = sLogLocation.concat( rtl::OUString( "/" ) ).concat( rtl::OUString( "HelperAPI-test.log" ) ); return sLogLocation; } rtl::OUString getLogLocationWithName( OUString fileName ) throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) @@ -133,9 +133,9 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) printf("%s\n", getenv("HOME") ); printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() ); rtl::OUString sLogLocation; - Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PathSettings" )), mxContext), uno::UNO_QUERY_THROW ); - pathSettings->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Work" )) ) >>= sLogLocation; - sLogLocation = sLogLocation.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".log" )) ); + Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW ); + pathSettings->getPropertyValue( rtl::OUString( "Work" ) ) >>= sLogLocation; + sLogLocation = sLogLocation.concat( rtl::OUString( "/" ) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString( ".log" ) ); return sLogLocation; } @@ -150,13 +150,13 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) printf( "processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); // Loading the wanted document Sequence< PropertyValue > propertyValues(1); - propertyValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" )); + propertyValues[0].Name = rtl::OUString( "Hidden" ); propertyValues[0].Value <<= false; rtl::OUString sfileUrl = convertToURL( sUrl ); printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); Reference< uno::XInterface > xDoc = - mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0, propertyValues); + mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString( "_blank" ), 0, propertyValues); printf( "got xDoc\n" ); OUString logFileURL = convertToURL( getLogLocation() ); @@ -173,15 +173,15 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) Reference< script::provider::XScript > xScript; try { - xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.TestMacros.Main?language=Basic&location=document") )); + xScript = xProv->getScript( rtl::OUString( "vnd.sun.star.script:VBAProject.TestMacros.Main?language=Basic&location=document")); } catch ( uno::Exception& e ) { try { - xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.testMacro.Main?language=Basic&location=document" ))); + xScript = xProv->getScript( rtl::OUString( "vnd.sun.star.script:VBAProject.testMacro.Main?language=Basic&location=document" )); } catch ( uno::Exception& e2 ) { - xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.testMain.Main?language=Basic&location=document" ))); + xScript = xProv->getScript( rtl::OUString( "vnd.sun.star.script:VBAProject.testMain.Main?language=Basic&location=document" )); } } OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -193,7 +193,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) ); - OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".log" )); + OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString( ".log" ); try { printf("move log file\n"); @@ -253,7 +253,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory ); if ( !mxSFA->isFolder( sFileDirectoryURL) ) { - throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "not a directory: ")).concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 ); + throw lang::IllegalArgumentException( rtl::OUString( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 ); } // Getting all files and directories in the current directory Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, false ); diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 1a2e82b8d3b8..0825e457cad5 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -259,7 +259,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException) if (!aSelection.is()) { throw uno::RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("failed to obtain current selection")), + rtl::OUString("failed to obtain current selection"), uno::Reference< uno::XInterface >() ); } @@ -277,15 +277,15 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException) if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape ) { uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW ); - if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) ) ) + if ( xShapeServiceInfo->supportsService( rtl::OUString( "com.sun.star.drawing.Text" ) ) ) { return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, xModel ) ) ); } } return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) ); } - else if( xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetCellRange")) ) || - xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetCellRanges")) ) ) + else if( xServiceInfo->supportsService( rtl::OUString("com.sun.star.sheet.SheetCellRange") ) || + xServiceInfo->supportsService( rtl::OUString("com.sun.star.sheet.SheetCellRanges") ) ) { uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY); if ( !xRange.is() ) @@ -299,8 +299,8 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException) } else { - throw uno::RuntimeException( sImplementationName + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - " not supported")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( sImplementationName + rtl::OUString( + " not supported"), uno::Reference< uno::XInterface >() ); } } @@ -311,10 +311,10 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException ) uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW); ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext); if ( !pViewShell ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewShell available")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("No ViewShell available"), uno::Reference< uno::XInterface >() ); ScViewData* pTabView = pViewShell->GetViewData(); if ( !pTabView ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewData available")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("No ViewData available"), uno::Reference< uno::XInterface >() ); sal_Int32 nCursorX = pTabView->GetCurX(); sal_Int32 nCursorY = pTabView->GetCurY(); @@ -424,7 +424,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime } } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid prarameter. It should be a string or False" )), + throw uno::RuntimeException( rtl::OUString( "Invalid prarameter. It should be a string or False" ), uno::Reference< uno::XInterface >() ); } @@ -472,7 +472,7 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException) SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); aArgs->Put( aRef, 1 ); - SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WaitUntil") ), SbxCLASS_METHOD ); + SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString("WaitUntil"), SbxCLASS_METHOD ); if ( pMeth ) { @@ -496,7 +496,7 @@ ScVbaApplication::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeExcep uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); 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 ); + rtl::OUString( "NamedRanges" ) ), uno::UNO_QUERY_THROW ); css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) ); if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID ) @@ -525,7 +525,7 @@ ScVbaApplication::getActiveSheet() throw (uno::RuntimeException) if ( !result.is() ) { // Fixme - check if this is reasonable/desired behavior - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No activeSheet available" )), + throw uno::RuntimeException( rtl::OUString( "No activeSheet available" ), uno::Reference< uno::XInterface >() ); } return result; @@ -557,7 +557,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro bScroll = aScroll; } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "second parameter should be boolean" )), + throw uno::RuntimeException( rtl::OUString( "second parameter should be boolean" ), uno::Reference< uno::XInterface >() ); } @@ -599,11 +599,11 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro { //maybe this should be a procedure name //TODO for procedure name - //browse::XBrowseNodeFactory is a singlton. OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")) + //browse::XBrowseNodeFactory is a singlton. OUString( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") //and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode. //for query XInvocation interface. //but how to directly get the XInvocation? - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid reference for range name, it should be procedure name" )), + throw uno::RuntimeException( rtl::OUString( "invalid reference for range name, it should be procedure name" ), uno::Reference< uno::XInterface >() ); } return; @@ -638,7 +638,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro } return; } - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid reference or name" )), + throw uno::RuntimeException( rtl::OUString( "invalid reference or name" ), uno::Reference< uno::XInterface >() ); } @@ -691,8 +691,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Unknown value for Cursor pointer"), uno::Reference< uno::XInterface >() ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } @@ -757,7 +756,7 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeExce // #FIXME calling ScViewUtil::SetFullScreen( *pShell, bSet ); // directly results in a strange crash, using dispatch instead if ( bSet != getDisplayFullScreen() ) - dispatchRequests( getCurrentDocument(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:FullScreen") ) ); + dispatchRequests( getCurrentDocument(), rtl::OUString(".uno:FullScreen") ); } sal_Bool SAL_CALL @@ -777,8 +776,8 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet ) throw (uno::RuntimeExce // use uno here as it does all he repainting etc. magic uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xView, uno::UNO_QUERY ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasVerticalScrollBar") ), uno::makeAny( bSet ) ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasHorizontalScrollBar") ), uno::makeAny( bSet ) ); + xProps->setPropertyValue( rtl::OUString("HasVerticalScrollBar"), uno::makeAny( bSet ) ); + xProps->setPropertyValue( rtl::OUString("HasHorizontalScrollBar"), uno::makeAny( bSet ) ); } sal_Bool SAL_CALL @@ -831,7 +830,7 @@ static uno::Reference< beans::XPropertySet > lcl_getPathSettingsService( const u if ( !xPathSettings.is() ) { uno::Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - xPathSettings.set( xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")), xContext ), uno::UNO_QUERY_THROW ); + xPathSettings.set( xSMgr->createInstanceWithContext( rtl::OUString("com.sun.star.util.PathSettings"), xContext ), uno::UNO_QUERY_THROW ); } return xPathSettings; } @@ -863,25 +862,25 @@ ScVbaApplication::setDefaultFilePath( const ::rtl::OUString& DefaultFilePath ) t uno::Reference< beans::XPropertySet > xProps = lcl_getPathSettingsService( mxContext ); rtl::OUString aURL; osl::FileBase::getFileURLFromSystemPath( DefaultFilePath, aURL ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work")), uno::Any( aURL ) ); + xProps->setPropertyValue( rtl::OUString("Work"), uno::Any( aURL ) ); } ::rtl::OUString SAL_CALL ScVbaApplication::getDefaultFilePath() throw (uno::RuntimeException) { - return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Work"))); + return getOfficePath( rtl::OUString("Work")); } ::rtl::OUString SAL_CALL ScVbaApplication::getLibraryPath() throw (uno::RuntimeException) { - return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Basic"))); + return getOfficePath( rtl::OUString("Basic")); } ::rtl::OUString SAL_CALL ScVbaApplication::getTemplatesPath() throw (uno::RuntimeException) { - return getOfficePath( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Template"))); + return getOfficePath( rtl::OUString("Template")); } ::rtl::OUString SAL_CALL @@ -1230,7 +1229,7 @@ uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException ) { StarBASIC* pBasic = SFX_APP()->GetBasic(); - SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD ); + SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString("FuncCaller"), SbxCLASS_METHOD ); uno::Any aRet; if ( pMeth ) { @@ -1256,7 +1255,7 @@ uno::Any SAL_CALL ScVbaApplication::GetOpenFilename( aArgs[ 5 ] = rMultiSelect; uno::Reference< lang::XMultiComponentFactory > xFactory( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< XExecutableDialog > xFilePicker( xFactory->createInstanceWithArgumentsAndContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.OpenFilePicker" ) ), aArgs, mxContext ), uno::UNO_QUERY_THROW ); + ::rtl::OUString( "ooo.vba.OpenFilePicker" ), aArgs, mxContext ), uno::UNO_QUERY_THROW ); return xFilePicker->execute(); } @@ -1273,7 +1272,7 @@ uno::Any SAL_CALL ScVbaApplication::GetSaveAsFilename( aArgs[ 5 ] = rButtonText; uno::Reference< lang::XMultiComponentFactory > xFactory( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< XExecutableDialog > xFilePicker( xFactory->createInstanceWithArgumentsAndContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.SaveAsFilePicker" ) ), aArgs, mxContext ), uno::UNO_QUERY_THROW ); + ::rtl::OUString( "ooo.vba.SaveAsFilePicker" ), aArgs, mxContext ), uno::UNO_QUERY_THROW ); return xFilePicker->execute(); } @@ -1299,7 +1298,7 @@ ScVbaApplication::MenuBars( const uno::Any& aIndex ) throw (uno::RuntimeExceptio rtl::OUString ScVbaApplication::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaApplication")); + return rtl::OUString("ScVbaApplication"); } uno::Sequence< rtl::OUString > @@ -1309,7 +1308,7 @@ ScVbaApplication::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Application" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Application" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx index 9944ea166f5b..0d3ed7eb84bf 100644 --- a/sc/source/ui/vba/vbaassistant.cxx +++ b/sc/source/ui/vba/vbaassistant.cxx @@ -107,7 +107,7 @@ ScVbaAssistant::Name( ) throw (css::script::BasicErrorException, css::uno::Runt rtl::OUString ScVbaAssistant::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant")); + return rtl::OUString("ScVbaAssistant"); } uno::Sequence< rtl::OUString > @@ -117,7 +117,7 @@ ScVbaAssistant::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.Assistant" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.Assistant" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index 6fa603aa7bd6..3174bd2ed093 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -64,7 +64,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: { ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); if ( !pChart ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Object failure, can't access chart implementation" )), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Object failure, can't access chart implementation" ), uno::Reference< uno::XInterface >() ); uno::Reference< beans::XPropertySet > xAxisPropertySet; if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue))) @@ -96,18 +96,18 @@ public: // primary sal_Bool bBool = false; uno::Reference< beans::XPropertySet > xDiagramPropertySet( pChart->xDiagramPropertySet() ); - if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasXAxis" ) ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( "HasXAxis" ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlCategory ) ); - if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxis" ) ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( "HasYAxis" ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlSeriesAxis ) ); if ( pChart->is3D() ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlValue ) ); // secondary - if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxis" ) ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( "HasSecondaryXAxis" ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlSecondary, xlCategory ) ); - if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxis" ) ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( "HasSecondaryYAxis" ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlSecondary, xlSeriesAxis ) ); } @@ -160,7 +160,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) sal_Int32 nAxisGroup = xlPrimary; sal_Int32 nType = -1; if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Axes::Item Failed to extract type" )), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Axes::Item Failed to extract type" ), uno::Reference< uno::XInterface >() ); if ( _oAxisGroup.hasValue() ) _oAxisGroup >>= nAxisGroup ; @@ -177,7 +177,7 @@ ScVbaAxes::createCollectionObject(const css::uno::Any& aSource) rtl::OUString ScVbaAxes::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaAxes")); + return rtl::OUString("ScVbaAxes"); } uno::Sequence< rtl::OUString > @@ -187,7 +187,7 @@ ScVbaAxes::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axes" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Axes" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index c1f92f22cc9e..035383a118c4 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -38,7 +38,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) { ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() ); if ( !pChart ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't access parent chart impl")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Can't access parent chart impl"), uno::Reference< uno::XInterface >() ); return pChart; } @@ -232,13 +232,13 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasXAxisTitle")), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString("HasXAxisTitle"), uno::makeAny(_bHasTitle)); break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasZAxisTitle")), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString("HasZAxisTitle"), uno::makeAny(_bHasTitle)); break; default: // xlValue: - pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString("HasYAxisTitle"), uno::makeAny(_bHasTitle)); } } @@ -259,13 +259,13 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasXAxisTitle")) ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString("HasXAxisTitle") ) >>= bHasTitle; break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasZAxisTitle")) ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString("HasZAxisTitle") ) >>= bHasTitle; break; default: // xlValue: - pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")) ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString("HasYAxisTitle") ) >>= bHasTitle; } } catch (const uno::Exception& e) @@ -281,7 +281,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException try { if (isValueAxis()) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp") ), uno::makeAny(_fMinorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString("StepHelp"), uno::makeAny(_fMinorUnit)); } catch (uno::Exception& ) { @@ -296,7 +296,7 @@ ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce try { if (isValueAxis()) - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp"))) >>= fMinor; + mxPropertySet->getPropertyValue( rtl::OUString("StepHelp")) >>= fMinor; } catch (uno::Exception& ) { @@ -311,7 +311,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas try { if (isValueAxis()) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoStepHelp" ) ), uno::makeAny(_bMinorUnitIsAuto)); + mxPropertySet->setPropertyValue( rtl::OUString( "AutoStepHelp" ), uno::makeAny(_bMinorUnitIsAuto)); } catch (uno::Exception& ) { @@ -327,7 +327,7 @@ ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoStepHelp")) ) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString( "AutoStepHelp") ) >>= bIsAuto; } } catch (uno::Exception& ) @@ -357,7 +357,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException { if (isValueAxis()) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain")), uno::makeAny(_fMajorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString("StepMain"), uno::makeAny(_fMajorUnit)); } } catch (uno::Exception& ) @@ -373,7 +373,7 @@ ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce try { if (isValueAxis()) - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain"))) >>= fMax; + mxPropertySet->getPropertyValue( rtl::OUString("StepMain")) >>= fMax; } catch (uno::Exception& ) { @@ -389,7 +389,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas { if (isValueAxis()) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoStepMain" ) ), uno::makeAny( _bMajorUnitIsAuto )); + mxPropertySet->setPropertyValue( rtl::OUString( "AutoStepMain" ), uno::makeAny( _bMajorUnitIsAuto )); } } catch (uno::Exception& ) @@ -406,7 +406,7 @@ ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoStepMain"))) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString( "AutoStepMain")) >>= bIsAuto; } } catch (uno::Exception& ) @@ -423,7 +423,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorExc { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ) ), uno::makeAny(_fMaximumScale)); + mxPropertySet->setPropertyValue( rtl::OUString( "Max" ), uno::makeAny(_fMaximumScale)); } } catch ( uno::Exception& ) @@ -440,7 +440,7 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))) >>= fMax; + mxPropertySet->getPropertyValue( rtl::OUString( "Max" )) >>= fMax; } } catch (uno::Exception& ) @@ -457,7 +457,7 @@ ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (scrip try { if ( isValueAxis() ) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoMax" ) ), uno::makeAny( _bMaximumScaleIsAuto )); + mxPropertySet->setPropertyValue( rtl::OUString( "AutoMax" ), uno::makeAny( _bMaximumScaleIsAuto )); } catch ( uno::Exception& ) @@ -474,7 +474,7 @@ ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru try { if (isValueAxis()) - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoMax" )) ) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString( "AutoMax" ) ) >>= bIsAuto; } catch ( uno::Exception& ) { @@ -489,7 +489,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorExc try { if (isValueAxis()) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Min") ), uno::makeAny( _fMinimumScale ) ); + mxPropertySet->setPropertyValue( rtl::OUString("Min"), uno::makeAny( _fMinimumScale ) ); } catch ( uno::Exception& ) { @@ -504,7 +504,7 @@ ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeE try { if (isValueAxis()) - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Min") )) >>= fMin; + mxPropertySet->getPropertyValue( rtl::OUString( "Min")) >>= fMin; } catch (const uno::Exception& e) { @@ -520,7 +520,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip { if (isValueAxis()) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin") ), uno::makeAny(_bMinimumScaleIsAuto)); + mxPropertySet->setPropertyValue( rtl::OUString("AutoMin"), uno::makeAny(_bMinimumScaleIsAuto)); } } catch (uno::Exception& ) @@ -537,7 +537,7 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin")) ) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString("AutoMin") ) >>= bIsAuto; } } catch (uno::Exception& ) @@ -563,10 +563,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce switch (_nScaleType) { case xlScaleLinear: - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_False ) ); + mxPropertySet->setPropertyValue( rtl::OUString( "Logarithmic" ), uno::makeAny( sal_False ) ); break; case xlScaleLogarithmic: - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Logarithmic" ) ), uno::makeAny( sal_True ) ); + mxPropertySet->setPropertyValue( rtl::OUString( "Logarithmic" ), uno::makeAny( sal_True ) ); break; default: // According to MS the paramenter is ignored and no Error is thrown @@ -589,7 +589,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce if (isValueAxis()) { sal_Bool bisLogarithmic = false; - mxPropertySet->getPropertyValue( rtl::OUString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Logarithmic"))) ) >>= bisLogarithmic; + mxPropertySet->getPropertyValue( rtl::OUString( rtl::OUString("Logarithmic")) ) >>= bisLogarithmic; if (bisLogarithmic) nScaleType = xlScaleLogarithmic; else @@ -641,7 +641,7 @@ void SAL_CALL ScVbaAxis::setLeft( double left ) throw (css::script::BasicErrorEx rtl::OUString ScVbaAxis::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaAxis")); + return rtl::OUString("ScVbaAxis"); } uno::Sequence< rtl::OUString > @@ -651,7 +651,7 @@ ScVbaAxis::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Axis" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Axis" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxistitle.cxx b/sc/source/ui/vba/vbaaxistitle.cxx index 2d715c46597e..986d1a3766e7 100644 --- a/sc/source/ui/vba/vbaaxistitle.cxx +++ b/sc/source/ui/vba/vbaaxistitle.cxx @@ -28,7 +28,7 @@ ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< XHelperInterface >& xParen rtl::OUString ScVbaAxisTitle::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaAxisTitle")); + return rtl::OUString("ScVbaAxisTitle"); } uno::Sequence< rtl::OUString > @@ -39,7 +39,7 @@ ScVbaAxisTitle::getServiceNames() { uno::Sequence< rtl::OUString > BaseServiceNames = AxisTitleBase::getServiceNames(); aServiceNames.realloc( BaseServiceNames.getLength() + 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.AxisTitle" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.AxisTitle" ); for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index ) aServiceNames[ index ] = BaseServiceNames[ index ]; } diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index cb23dd87eed4..e792c6ea5418 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -146,7 +146,7 @@ private: protected: virtual rtl::OUString getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaBorder")); + return rtl::OUString("ScVbaBorder"); } virtual css::uno::Sequence<rtl::OUString> getServiceNames() { @@ -154,7 +154,7 @@ protected: if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Border" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Border" ); } return aServiceNames; } @@ -167,7 +167,7 @@ public: table::BorderLine aBorderLine; if ( getBorderLine( aBorderLine ) ) return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) ); - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No Implementation available" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "No Implementation available" ), uno::Reference< uno::XInterface >() ); } void SAL_CALL setColor( const uno::Any& _color ) throw (uno::RuntimeException) { @@ -180,7 +180,7 @@ public: setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No Implementation available" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "No Implementation available" ), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL getColorIndex() throw (uno::RuntimeException) @@ -231,7 +231,7 @@ public: break; } } - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Method failed" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); } void SAL_CALL setWeight( const uno::Any& _weight ) throw (uno::RuntimeException) { @@ -255,12 +255,12 @@ public: aBorderLine.OuterLineWidth = OOLineHairline; break; default: - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bad param" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Method failed" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException) @@ -289,12 +289,12 @@ public: case XlLineStyle::xlSlantDashDot: break; default: - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bad param" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Method failed" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); } }; @@ -549,7 +549,7 @@ void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight ) throw (uno::Run rtl::OUString ScVbaBorders::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaBorders")); + return rtl::OUString("ScVbaBorders"); } uno::Sequence< rtl::OUString > @@ -559,7 +559,7 @@ ScVbaBorders::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Borders" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Borders" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 2cfa4759b3ec..ae4f367c3a31 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -87,7 +87,7 @@ void SAL_CALL ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) throw (css::uno::RuntimeException) { // #TODO #FIXME needs implementation, or can't be done? - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Not Implemented") ), uno::Reference< XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString( "Not Implemented"), uno::Reference< XInterface >() ); } @@ -110,7 +110,7 @@ ScVbaCharacters::Delete( ) throw (css::uno::RuntimeException) rtl::OUString ScVbaCharacters::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaCharacters")); + return rtl::OUString("ScVbaCharacters"); } uno::Sequence< rtl::OUString > @@ -120,7 +120,7 @@ ScVbaCharacters::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Characters" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Characters" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 7483da72f56b..a050d4f93553 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -262,7 +262,7 @@ try case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.BarDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.BarDiagram")); break; case xlLine: case xl3DLine: @@ -271,7 +271,7 @@ try case xlLineMarkers: case xlLineMarkersStacked: case xlLineMarkersStacked100: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.LineDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.LineDiagram")); break; case xl3DArea: case xlArea: @@ -279,17 +279,17 @@ try case xlAreaStacked100: case xl3DAreaStacked: case xl3DAreaStacked100: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.AreaDiagram")) ); + setDiagram( rtl::OUString("com.sun.star.chart.AreaDiagram") ); break; case xlDoughnut: case xlDoughnutExploded: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.DonutDiagram") ) ); + setDiagram( rtl::OUString("com.sun.star.chart.DonutDiagram") ); break; case xlStockHLC: case xlStockOHLC: case xlStockVHLC: case xlStockVOHLC: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.StockDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.StockDiagram")); mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny(sal_Bool((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC)))); mxDiagramPropertySet->setPropertyValue(VOLUME, uno::makeAny(sal_Bool((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC)))); break; @@ -300,13 +300,13 @@ try case xl3DPie: case xlPie: case xlBarOfPie: // not possible (Zoom pie) - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.PieDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.PieDiagram")); break; case xlRadar: case xlRadarMarkers: case xlRadarFilled: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.NetDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.NetDiagram")); break; case xlXYScatter: case xlBubble: // not possible @@ -315,7 +315,7 @@ try case xlXYScatterLinesNoMarkers: case xlXYScatterSmooth: case xlXYScatterSmoothNoMarkers: - setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.XYDiagram"))); + setDiagram( rtl::OUString("com.sun.star.chart.XYDiagram")); switch(_nChartType) { case xlXYScatter: @@ -555,7 +555,7 @@ ScVbaChart::Activate() throw (script::BasicErrorException, uno::RuntimeException if ( pChartObj ) pChartObj->Activate(); else - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no ChartObject as parent" ) ) ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( "no ChartObject as parent" ) ); } void SAL_CALL @@ -1055,7 +1055,7 @@ ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) thro rtl::OUString ScVbaChart::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaChart")); + return rtl::OUString("ScVbaChart"); } uno::Sequence< rtl::OUString > @@ -1065,7 +1065,7 @@ ScVbaChart::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Chart" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 17860737d13e..07183cc036da 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -100,7 +100,7 @@ ScVbaChartObject::Delete() throw ( css::script::BasicErrorException ) if (pChartObjectsImpl) pChartObjectsImpl->removeByName( getPersistName() ); else - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Parent is not ChartObjects" ) ) ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( "Parent is not ChartObjects" ) ); } void @@ -117,7 +117,7 @@ ScVbaChartObject::Activate() throw ( script::BasicErrorException ) } catch (uno::Exception& ) { - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ChartObject Activate internal error" ) ) ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( "ChartObject Activate internal error" ) ); } } @@ -130,7 +130,7 @@ ScVbaChartObject::getChart() throw (css::uno::RuntimeException) rtl::OUString ScVbaChartObject::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaChartObject")); + return rtl::OUString("ScVbaChartObject"); } uno::Sequence< rtl::OUString > @@ -140,7 +140,7 @@ ScVbaChartObject::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObject" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.ChartObject" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index d3df6585f12a..cdfd42545885 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -74,10 +74,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() ); ScDocShell* pDocShell = NULL; if ( !pUno ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Failed to obtain the impl class from the drawpage")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Failed to obtain the impl class from the drawpage"), uno::Reference< uno::XInterface >() ); pDocShell = pUno->GetDocShell(); if ( !pDocShell ) - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Failed to obtain the docshell implclass")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Failed to obtain the docshell implclass"), uno::Reference< uno::XInterface >() ); uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets(); @@ -119,7 +119,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight aRectangle.Width = Millimeter::getInHundredthsOfOneMillimeter(_nWidth); aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight); // Note the space at the end of the stem ("Chart "). In ChartSheets only "Chart" is the stem - rtl::OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Chart " ) ) , rtl::OUString(), 1); + rtl::OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), rtl::OUString( "Chart " ) , rtl::OUString(), 1); xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false ); uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered); @@ -168,7 +168,7 @@ ScVbaChartObjects::createCollectionObject( const css::uno::Any& aSource ) rtl::OUString ScVbaChartObjects::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaChartObjects")); + return rtl::OUString("ScVbaChartObjects"); } css::uno::Sequence<rtl::OUString> @@ -178,7 +178,7 @@ ScVbaChartObjects::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ChartObjects") ); + sNames[0] = rtl::OUString("ooo.vba.excel.ChartObjects"); } return sNames; } diff --git a/sc/source/ui/vba/vbacharttitle.cxx b/sc/source/ui/vba/vbacharttitle.cxx index 865bf3dc746e..3fbe661f98fa 100644 --- a/sc/source/ui/vba/vbacharttitle.cxx +++ b/sc/source/ui/vba/vbacharttitle.cxx @@ -28,7 +28,7 @@ ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< XHelperInterface >& xPar rtl::OUString ScVbaChartTitle::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaChartTitle")); + return rtl::OUString("ScVbaChartTitle"); } uno::Sequence< rtl::OUString > @@ -39,7 +39,7 @@ ScVbaChartTitle::getServiceNames() { uno::Sequence< rtl::OUString > BaseServiceNames = ChartTitleBase::getServiceNames(); aServiceNames.realloc( BaseServiceNames.getLength() + 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Chart" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Chart" ); for ( sal_Int32 index = 1; index < (BaseServiceNames.getLength() + 1); ++index ) aServiceNames[ index ] = BaseServiceNames[ index ]; } diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx index cc4a683a3141..1393237312bf 100644 --- a/sc/source/ui/vba/vbacomment.cxx +++ b/sc/source/ui/vba/vbacomment.cxx @@ -47,7 +47,7 @@ ScVbaComment::ScVbaComment( mxRange( xRange ) { 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< text::XSimpleText > xAnnoText( getAnnotation(), uno::UNO_QUERY ); } @@ -200,7 +200,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An xAnnoText->insertString( xRange, sText, bOverwrite ); return xAnnoText->getString(); } - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScVbaComment::Text - bad Start value " ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "ScVbaComment::Text - bad Start value " ), uno::Reference< uno::XInterface >() ); } else if ( aText.hasValue() ) { @@ -215,7 +215,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An rtl::OUString ScVbaComment::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaComment")); + return rtl::OUString("ScVbaComment"); } uno::Sequence< rtl::OUString > @@ -225,7 +225,7 @@ ScVbaComment::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.ScVbaComment" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.ScVbaComment" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index 24423a7a3dfb..9e09ee631cda 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -91,7 +91,7 @@ ScVbaComments::getElementType() throw (uno::RuntimeException) rtl::OUString ScVbaComments::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaComments")); + return rtl::OUString("ScVbaComments"); } css::uno::Sequence<rtl::OUString> @@ -101,7 +101,7 @@ ScVbaComments::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Comments") ); + sNames[0] = rtl::OUString("ooo.vba.excel.Comments"); } return sNames; } diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index bc222676da8c..3ebd89adf753 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -157,7 +157,7 @@ ScVbaCondition< Ifc1 >::Operator(sal_Bool _bIncludeFormulaValue) throw ( script: } case sheet::ConditionOperator_NONE: default: - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Operator not supported"))); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString("Operator not supported")); break; } return retvalue; diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx index 78fccd684510..1f1c3736bce9 100644 --- a/sc/source/ui/vba/vbadialog.cxx +++ b/sc/source/ui/vba/vbadialog.cxx @@ -65,7 +65,7 @@ ScVbaDialog::mapIndexToName( sal_Int32 nIndex ) rtl::OUString ScVbaDialog::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaDialog")); + return rtl::OUString("ScVbaDialog"); } uno::Sequence< rtl::OUString > @@ -75,7 +75,7 @@ ScVbaDialog::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Dialog" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Dialog" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbadialogs.cxx b/sc/source/ui/vba/vbadialogs.cxx index 8375a06fb636..367dbcf6cea1 100644 --- a/sc/source/ui/vba/vbadialogs.cxx +++ b/sc/source/ui/vba/vbadialogs.cxx @@ -40,7 +40,7 @@ ScVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException) rtl::OUString ScVbaDialogs::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaDialogs")); + return rtl::OUString("ScVbaDialogs"); } uno::Sequence< rtl::OUString > @@ -50,7 +50,7 @@ ScVbaDialogs::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Dialogs" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Dialogs" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 17939060c89e..b89f3cd46416 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -105,8 +105,8 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio nValue = SUPERSCRIPT; nValue2 = SUPERSCRIPTHEIGHT; } - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 ); + xProps->setPropertyValue( rtl::OUString( "CharEscapement" ), ( uno::Any )nValue ); + xProps->setPropertyValue( rtl::OUString( "CharEscapementHeight" ), ( uno::Any )nValue2 ); } uno::Any SAL_CALL @@ -138,7 +138,7 @@ ScVbaFont::getSuperscript() throw ( uno::RuntimeException ) xCell.set( xCellRange->getCellByPosition( 0,0 ) ); uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); short nValue = 0; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue; + xProps->getPropertyValue( rtl::OUString( "CharEscapement" ) ) >>= nValue; return uno::makeAny( ( nValue == SUPERSCRIPT ) ); } @@ -178,8 +178,8 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException nValue2 = SUBSCRIPTHEIGHT; } - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 ); - xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue ); + xProps->setPropertyValue( rtl::OUString( "CharEscapementHeight" ), ( uno::Any )nValue2 ); + xProps->setPropertyValue( rtl::OUString( "CharEscapement" ), ( uno::Any )nValue ); } @@ -213,7 +213,7 @@ ScVbaFont::getSubscript() throw ( uno::RuntimeException ) uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); short nValue = NORMAL; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue; + xProps->getPropertyValue( rtl::OUString( "CharEscapement" ) ) >>= nValue; return uno::makeAny( ( nValue == SUBSCRIPT ) ); } @@ -258,9 +258,9 @@ void SAL_CALL ScVbaFont::setStandardFontSize( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException ) { //XXX #TODO# #FIXME# - //mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )fValue ); + //mxFont->setPropertyValue( rtl::OUString( "CharSize" ), ( uno::Any )fValue ); throw uno::RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setStandardFontSize not supported") ), uno::Reference< uno::XInterface >() ); + rtl::OUString("setStandardFontSize not supported"), uno::Reference< uno::XInterface >() ); } @@ -269,7 +269,7 @@ ScVbaFont::getStandardFontSize() throw ( uno::RuntimeException ) { //XXX #TODO# #FIXME# throw uno::RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getStandardFontSize not supported") ), uno::Reference< uno::XInterface >() ); + rtl::OUString("getStandardFontSize not supported"), uno::Reference< uno::XInterface >() ); // return uno::Any(); } @@ -279,7 +279,7 @@ ScVbaFont::setStandardFont( const uno::Any& /*aValue*/ ) throw( uno::RuntimeExce { //XXX #TODO# #FIXME# throw uno::RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setStandardFont not supported") ), uno::Reference< uno::XInterface >() ); + rtl::OUString("setStandardFont not supported"), uno::Reference< uno::XInterface >() ); } @@ -288,7 +288,7 @@ ScVbaFont::getStandardFont() throw ( uno::RuntimeException ) { //XXX #TODO# #FIXME# throw uno::RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getStandardFont not supported") ), uno::Reference< uno::XInterface >() ); + rtl::OUString("getStandardFont not supported"), uno::Reference< uno::XInterface >() ); // return uno::Any(); } @@ -379,10 +379,10 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException nValue = awt::FontUnderline::DOUBLE; break; default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value for Underline")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Unknown value for Underline"), uno::Reference< uno::XInterface >() ); } - mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" ) ), ( uno::Any )nValue ); + mxFont->setPropertyValue( rtl::OUString( "CharUnderline" ), ( uno::Any )nValue ); } @@ -394,7 +394,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException ) return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; - mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" ) ) ) >>= nValue; + mxFont->getPropertyValue( rtl::OUString( "CharUnderline" ) ) >>= nValue; switch ( nValue ) { case awt::FontUnderline::DOUBLE: @@ -407,7 +407,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException ) nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone; break; default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value retrieved for Underline") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Unknown value retrieved for Underline"), uno::Reference< uno::XInterface >() ); } return uno::makeAny( nValue ); @@ -454,14 +454,14 @@ ScVbaFont::getColor() throw (uno::RuntimeException) { // #TODO #FIXME - behave like getXXX above ( wrt. GetDataSet ) uno::Any aAny; - aAny = OORGBToXLRGB( mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) ) ); + aAny = OORGBToXLRGB( mxFont->getPropertyValue( rtl::OUString( "CharColor" ) ) ); return aAny; } void SAL_CALL ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException ) { - mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ), aValue ); + mxFont->setPropertyValue( rtl::OUString( "CharContoured" ), aValue ); } uno::Any SAL_CALL @@ -470,13 +470,13 @@ ScVbaFont::getOutlineFont() throw (uno::RuntimeException) if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); - return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) ); + return mxFont->getPropertyValue( rtl::OUString( "CharContoured" ) ); } rtl::OUString ScVbaFont::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaFont")); + return rtl::OUString("ScVbaFont"); } uno::Sequence< rtl::OUString > @@ -486,7 +486,7 @@ ScVbaFont::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Font" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Font" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index c33dcf448222..e05e3ce53bd4 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -50,12 +50,12 @@ using namespace ::com::sun::star; #define LOCALE "Locale" template< typename Ifc1 > -ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "US") ), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False ) +ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( script::BasicErrorException ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( rtl::OUString("en"), rtl::OUString( "US"), rtl::OUString() ), mxPropertySet( _xPropertySet ), mxModel( xModel ), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( sal_False ) { try { if ( !mxModel.is() ) - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XModel Interface could not be retrieved") ) ); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( "XModel Interface could not be retrieved") ); // mxServiceInfo is unused, // mxNumberFormatsSupplier is initialized when needed in initializeNumberFormats. } @@ -774,7 +774,7 @@ template< typename Ifc1 > rtl::OUString ScVbaFormat<Ifc1>::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaFormat")); + return rtl::OUString("ScVbaFormat"); } template< typename Ifc1 > @@ -785,7 +785,7 @@ ScVbaFormat<Ifc1>::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Format" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Format" ); } return aServiceNames; } @@ -803,7 +803,7 @@ ScVbaFormat<Ifc1>::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 XPropertySet" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Can't access Itemset for XPropertySet" ), uno::Reference< uno::XInterface >() ); return pDataSet; } diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index acdb253c60eb..09a1455a3d73 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -140,7 +140,7 @@ ScVbaFormatCondition::notifyRange() throw ( script::BasicErrorException ) { try { - mxParentRangePropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ConditionalFormat") ), uno::makeAny( mxSheetConditionalEntries) ); + mxParentRangePropertySet->setPropertyValue( rtl::OUString("ConditionalFormat"), uno::makeAny( mxSheetConditionalEntries) ); } catch (uno::Exception& ) { @@ -151,7 +151,7 @@ ScVbaFormatCondition::notifyRange() throw ( script::BasicErrorException ) rtl::OUString ScVbaFormatCondition::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaFormatCondition")); + return rtl::OUString("ScVbaFormatCondition"); } uno::Sequence< rtl::OUString > @@ -161,7 +161,7 @@ ScVbaFormatCondition::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatCondition" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.FormatCondition" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 7cfb8a549f21..f0922d52f384 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -203,7 +203,7 @@ ScVbaFormatConditions::notifyRange() throw ( script::BasicErrorException ) { try { - mxParentRangePropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ConditionalFormat")), uno::makeAny( mxSheetConditionalEntries )); + mxParentRangePropertySet->setPropertyValue( rtl::OUString("ConditionalFormat"), uno::makeAny( mxSheetConditionalEntries )); } catch (uno::Exception& ) { @@ -228,7 +228,7 @@ ScVbaFormatConditions::getStyleName() if ( !pStyles ) DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() ); uno::Sequence< rtl::OUString > sCellStyleNames = pStyles->getStyleNames(); - return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_") )); + return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, rtl::OUString("_")); } void @@ -263,7 +263,7 @@ ScVbaFormatConditions::removeFormatCondition( const rtl::OUString& _sStyleName, rtl::OUString ScVbaFormatConditions::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaFormatConditions")); + return rtl::OUString("ScVbaFormatConditions"); } uno::Sequence< rtl::OUString > @@ -273,7 +273,7 @@ ScVbaFormatConditions::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FormatConditions" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.FormatConditions" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx index d213535c7f4a..707a5578b605 100644 --- a/sc/source/ui/vba/vbaglobals.cxx +++ b/sc/source/ui/vba/vbaglobals.cxx @@ -230,7 +230,7 @@ ScVbaGlobals::getDebug() throw (uno::RuntimeException) { uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.Debug" ) ), mxContext ); + ::rtl::OUString( "ooo.vba.Debug" ), mxContext ); return uno::Any( xVBADebug ); } catch( uno::Exception& ) diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index e8df70391fa8..0c1ce0e618da 100644 --- a/sc/source/ui/vba/vbahyperlink.cxx +++ b/sc/source/ui/vba/vbahyperlink.cxx @@ -55,7 +55,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch UrlComponents aUrlComp; OUString aTextToDisplay; if( !(rAddress >>= aUrlComp.first) || aUrlComp.first.isEmpty() ) - throw uno::RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot get address" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( OUString( "Cannot get address" ), uno::Reference< uno::XInterface >() ); rSubAddress >>= aUrlComp.second; rScreenTip >>= maScreenTip; rTextToDisplay >>= aTextToDisplay; @@ -84,7 +84,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch } // create and initialize a new URL text field uno::Reference< lang::XMultiServiceFactory > xFactory( ScVbaRange::getUnoModel( xAnchorRange ), uno::UNO_QUERY_THROW ); - uno::Reference< text::XTextContent > xUrlField( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextField.URL" ) ) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xUrlField( xFactory->createInstance( OUString( "com.sun.star.text.TextField.URL" ) ), uno::UNO_QUERY_THROW ); mxTextField.set( xUrlField, uno::UNO_QUERY_THROW ); setUrlComponents( aUrlComp ); setTextToDisplay( aTextToDisplay ); @@ -155,14 +155,14 @@ OUString ScVbaHyperlink::getTextToDisplay() throw (uno::RuntimeException) { ensureTextField(); OUString aTextToDisplay; - mxTextField->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ) ) >>= aTextToDisplay; + mxTextField->getPropertyValue( OUString( "Representation" ) ) >>= aTextToDisplay; return aTextToDisplay; } void ScVbaHyperlink::setTextToDisplay( const OUString& rTextToDisplay ) throw (uno::RuntimeException) { ensureTextField(); - mxTextField->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Representation" ) ), uno::Any( rTextToDisplay ) ); + mxTextField->setPropertyValue( OUString( "Representation" ), uno::Any( rTextToDisplay ) ); } sal_Int32 SAL_CALL ScVbaHyperlink::getType() throw (uno::RuntimeException) @@ -209,7 +209,7 @@ ScVbaHyperlink::UrlComponents ScVbaHyperlink::getUrlComponents() throw (uno::Run { ensureTextField(); OUString aUrl; - mxTextField->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) ) >>= aUrl; + mxTextField->getPropertyValue( OUString( "URL" ) ) >>= aUrl; sal_Int32 nHashPos = aUrl.indexOf( '#' ); if( nHashPos < 0 ) return UrlComponents( aUrl, OUString() ); @@ -222,7 +222,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un OUStringBuffer aUrl( rUrlComp.first ); if( !rUrlComp.second.isEmpty() ) aUrl.append( sal_Unicode( '#' ) ).append( rUrlComp.second ); - mxTextField->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ), uno::Any( aUrl.makeStringAndClear() ) ); + mxTextField->setPropertyValue( OUString( "URL" ), uno::Any( aUrl.makeStringAndClear() ) ); } namespace hyperlink diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index c1d056f5e6d8..8711ba0a1168 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -38,7 +38,7 @@ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRan { const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner ); if( rScInner.empty() || rScOuter.empty() ) - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Empty range objects" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString( "Empty range objects" ), uno::Reference< uno::XInterface >() ); for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex ) if( !rScOuter.In( *rScInner[ nIndex ] ) ) diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 6cda078aefef..7b4d65d8496b 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -86,7 +86,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, m_aPattColor.SetColor( (sal_uInt32)0x0 ); m_nPattern = 0L; if ( !m_xProps.is() ) - throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( rtl::OUString( "properties"), uno::Reference< uno::XInterface >(), 2 ); } uno::Any @@ -250,7 +250,7 @@ ScVbaInterior::GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 n uno::Reference< container::XNameContainer > ScVbaInterior::GetAttributeContainer() { - return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UserDefinedAttributes" )) ), uno::UNO_QUERY_THROW ); + return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( rtl::OUString( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW ); } sal_Int32 ScVbaInterior::GetAttributeData( uno::Any aValue ) @@ -266,7 +266,7 @@ uno::Any ScVbaInterior::SetAttributeData( sal_Int32 nValue ) { xml::AttributeData aAttributeData; - aAttributeData.Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "sal_Int32" )); + aAttributeData.Type = rtl::OUString( "sal_Int32" ); aAttributeData.Value = rtl::OUString::valueOf( nValue ); return uno::makeAny( aAttributeData ); } @@ -289,7 +289,7 @@ ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno:: if( xNameContainer->hasByName( sName ) ) xNameContainer->removeByName( sName ); xNameContainer->insertByName( sName, aValue ); - m_xProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UserDefinedAttributes" )), uno::makeAny( xNameContainer ) ); + m_xProps->setPropertyValue( rtl::OUString( "UserDefinedAttributes" ), uno::makeAny( xNameContainer ) ); } } // OOo do not support below API @@ -311,7 +311,7 @@ ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeExcepti SetMixedColor(); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Pattern index" )), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Invalid Pattern index" ), uno::Reference< uno::XInterface >() ); } Color ScVbaInterior::GetBackColor() @@ -359,7 +359,7 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::Runt SetMixedColor(); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Pattern Color" )), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException) @@ -382,13 +382,13 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) ); } else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Pattern Color" )), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); } rtl::OUString ScVbaInterior::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaInterior")); + return rtl::OUString("ScVbaInterior"); } uno::Sequence< rtl::OUString > @@ -398,7 +398,7 @@ ScVbaInterior::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Interior" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Interior" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index 19c1392eeb0c..dedb0398d6bb 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -69,7 +69,7 @@ ScVbaMenu::MenuItems( const uno::Any& aIndex ) throw (script::BasicErrorExceptio rtl::OUString ScVbaMenu::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenu")); + return rtl::OUString("ScVbaMenu"); } uno::Sequence<rtl::OUString> @@ -79,7 +79,7 @@ ScVbaMenu::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Menu" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Menu" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx index 6d9b625326d5..91997c0b1b20 100644 --- a/sc/source/ui/vba/vbamenubar.cxx +++ b/sc/source/ui/vba/vbamenubar.cxx @@ -51,7 +51,7 @@ ScVbaMenuBar::Menus( const uno::Any& aIndex ) throw (script::BasicErrorException rtl::OUString ScVbaMenuBar::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuBar")); + return rtl::OUString("ScVbaMenuBar"); } uno::Sequence<rtl::OUString> @@ -61,7 +61,7 @@ ScVbaMenuBar::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuBar" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.MenuBar" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 33d43897657f..eb7aead78349 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -106,20 +106,20 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw if( nIndex == excel::XlSheetType::xlWorksheet ) { uno::Any aSource; - aSource <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Worksheet Menu Bar" )); + aSource <<= rtl::OUString( "Worksheet Menu Bar" ); uno::Reference< XCommandBar > xCommandBar( m_xCommandBars->Item( aSource, uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( this, mxContext, xCommandBar ) ); return uno::makeAny( xMenuBar ); } - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } // XHelperInterface rtl::OUString ScVbaMenuBars::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuBars")); + return rtl::OUString("ScVbaMenuBars"); } uno::Sequence<rtl::OUString> @@ -129,7 +129,7 @@ ScVbaMenuBars::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuBars" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.MenuBars" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenuitem.cxx b/sc/source/ui/vba/vbamenuitem.cxx index 37a701e8e726..881ef72fa9cc 100644 --- a/sc/source/ui/vba/vbamenuitem.cxx +++ b/sc/source/ui/vba/vbamenuitem.cxx @@ -67,7 +67,7 @@ ScVbaMenuItem::Delete( ) throw (script::BasicErrorException, uno::RuntimeExcepti rtl::OUString ScVbaMenuItem::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuItem")); + return rtl::OUString("ScVbaMenuItem"); } uno::Sequence<rtl::OUString> @@ -77,7 +77,7 @@ ScVbaMenuItem::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuItem" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.MenuItem" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index 8df35adac119..90e70b127c18 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -135,7 +135,7 @@ uno::Reference< excel::XMenuItem > SAL_CALL ScVbaMenuItems::Add( const rtl::OUSt rtl::OUString ScVbaMenuItems::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuItems")); + return rtl::OUString("ScVbaMenuItems"); } uno::Sequence<rtl::OUString> @@ -145,7 +145,7 @@ ScVbaMenuItems::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuItems" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.MenuItems" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index b7d50e590a92..f1ab8e120485 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -121,7 +121,7 @@ uno::Reference< excel::XMenu > SAL_CALL ScVbaMenus::Add( const rtl::OUString& Ca rtl::OUString ScVbaMenus::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaMenus")); + return rtl::OUString("ScVbaMenus"); } uno::Sequence<rtl::OUString> @@ -131,7 +131,7 @@ ScVbaMenus::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Menus" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Menus" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx index e02d7e0e99cb..6bd3cb59bc79 100644 --- a/sc/source/ui/vba/vbaoleobject.cxx +++ b/sc/source/ui/vba/vbaoleobject.cxx @@ -40,7 +40,7 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW ); css::uno::Reference< css::frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); m_xControl.set( xControlProvider->createControl( xControlShape, xModel ) ); } @@ -128,7 +128,7 @@ ScVbaOLEObject::setWidth( double _width ) throw (uno::RuntimeException) rtl::OUString ScVbaOLEObject::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaOLEObject")); + return rtl::OUString("ScVbaOLEObject"); } uno::Sequence< rtl::OUString > @@ -138,7 +138,7 @@ ScVbaOLEObject::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObject" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.OLEObject" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 88b1ac4d6a16..7b1c44fd94ad 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -161,7 +161,7 @@ ScVbaOLEObjects::getElementType() throw (uno::RuntimeException) rtl::OUString ScVbaOLEObjects::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaOLEObjects")); + return rtl::OUString("ScVbaOLEObjects"); } uno::Sequence< rtl::OUString > @@ -171,7 +171,7 @@ ScVbaOLEObjects::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.OLEObjects" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.OLEObjects" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx index 00ea233f7c48..29cbd0e09434 100644 --- a/sc/source/ui/vba/vbaoutline.cxx +++ b/sc/source/ui/vba/vbaoutline.cxx @@ -40,7 +40,7 @@ ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevel rtl::OUString ScVbaOutline::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaOutline")); + return rtl::OUString("ScVbaOutline"); } uno::Sequence< rtl::OUString > @@ -50,7 +50,7 @@ ScVbaOutline::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Outline" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Outline" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index e8e3b8d0f48b..611c568243e6 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -36,7 +36,7 @@ ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& template< typename Ifc1 > sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) { - uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" ))); + uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( "IsStartOfNewPage" )); sal_Bool hasPageBreak = false; aValue >>= hasPageBreak; @@ -61,11 +61,11 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) if( type == excel::XlPageBreak::xlPageBreakNone ) { - mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False)); + mxRowColPropertySet->setPropertyValue( rtl::OUString( "IsStartOfNewPage" ), uno::makeAny(sal_False)); return; } - mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True)); + mxRowColPropertySet->setPropertyValue( rtl::OUString( "IsStartOfNewPage" ), uno::makeAny(sal_True)); if( type == excel::XlPageBreak::xlPageBreakManual ) maTablePageBreakData.ManualBreak = sal_True; else @@ -75,7 +75,7 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) template< typename Ifc1 > void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException) { - mxRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_False)); + mxRowColPropertySet->setPropertyValue( rtl::OUString( "IsStartOfNewPage" ), uno::makeAny(sal_False)); } template< typename Ifc1 > @@ -89,7 +89,7 @@ template< typename Ifc1 > rtl::OUString ScVbaPageBreak<Ifc1>::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak")); + return rtl::OUString("ScVbaPageBreak"); } template< typename Ifc1 > @@ -100,7 +100,7 @@ ScVbaPageBreak<Ifc1>::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageBreak" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.PageBreak" ); } return aServiceNames; } @@ -111,7 +111,7 @@ template class ScVbaPageBreak< excel::XHPageBreak >; rtl::OUString ScVbaHPageBreak::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak")); + return rtl::OUString("ScVbaHPageBreak"); } uno::Sequence< rtl::OUString > @@ -121,7 +121,7 @@ ScVbaHPageBreak::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreak" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.HPageBreak" ); } return aServiceNames; } @@ -144,7 +144,7 @@ ScVbaVPageBreak::~ScVbaVPageBreak() rtl::OUString ScVbaVPageBreak::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaVPageBreak")); + return rtl::OUString("ScVbaVPageBreak"); } uno::Sequence< rtl::OUString > @@ -154,7 +154,7 @@ ScVbaVPageBreak::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.VPageBreak" ) ); + aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.VPageBreak" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 5c02d5ddb702..8c6806e1992a 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -172,7 +172,7 @@ uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange ); uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer(); uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW ); - xRowColPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" )), uno::makeAny(sal_True)); + xRowColPropertySet->setPropertyValue( rtl::OUString( "IsStartOfNewPage" ), uno::makeAny(sal_True)); sheet::TablePageBreakData aTablePageBreakData; aTablePageBreakData.ManualBreak = sal_True; aTablePageBreakData.Position = nAPIRowColIndex; @@ -240,7 +240,7 @@ ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException) rtl::OUString ScVbaHPageBreaks::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreaks")); + return rtl::OUString("ScVbaHPageBreaks"); } uno::Sequence< rtl::OUString > @@ -250,7 +250,7 @@ ScVbaHPageBreaks::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.HPageBreaks" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.HPageBreaks" ); } return aServiceNames; } @@ -300,7 +300,7 @@ ScVbaVPageBreaks::getElementType() throw ( uno::RuntimeException ) rtl::OUString ScVbaVPageBreaks::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaVPageBreaks")); + return rtl::OUString("ScVbaVPageBreaks"); } uno::Sequence< rtl::OUString > @@ -310,7 +310,7 @@ ScVbaVPageBreaks::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.VPageBreaks" ) ); + aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.VPageBreaks" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx index 738393591e62..fc43d9e9300c 100644 --- a/sc/source/ui/vba/vbapalette.cxx +++ b/sc/source/ui/vba/vbapalette.cxx @@ -97,8 +97,8 @@ ScVbaPalette::getPalette() const if ( m_pShell ) xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW ); else - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't extract palette, no doc shell" ) ), uno::Reference< uno::XInterface >() ); - xIndex.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ColorPalette") ) ), uno::UNO_QUERY ); + throw uno::RuntimeException( rtl::OUString( "Can't extract palette, no doc shell" ), uno::Reference< uno::XInterface >() ); + xIndex.set( xProps->getPropertyValue( rtl::OUString("ColorPalette") ), uno::UNO_QUERY ); if ( !xIndex.is() ) return new DefaultPalette(); return xIndex; diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index 18d754a5723e..3a8bcd856d5a 100644 --- a/sc/source/ui/vba/vbapane.cxx +++ b/sc/source/ui/vba/vbapane.cxx @@ -48,7 +48,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti { if( _scrollcolumn < 1 ) { - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Column number should not less than 1" )), + throw uno::RuntimeException( rtl::OUString( "Column number should not less than 1" ), uno::Reference< uno::XInterface >() ); } m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 ); @@ -65,7 +65,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException) { if( _scrollrow < 1 ) { - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Row number should not less than 1" )), + throw uno::RuntimeException( rtl::OUString( "Row number should not less than 1" ), uno::Reference< uno::XInterface >() ); } m_xViewPane->setFirstVisibleRow( _scrollrow - 1 ); @@ -99,7 +99,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( Down >>= down ) downRows += down; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Down\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: Down\n" ); } if( Up.hasValue() ) { @@ -107,7 +107,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( Up >>= up ) downRows -= up; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Up\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: Up\n" ); } if( ToRight.hasValue() ) { @@ -115,7 +115,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( ToRight >>= right ) rightCols += right; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToRight\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: ToRight\n" ); } if( ToLeft.hasValue() ) { @@ -123,7 +123,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( ToLeft >>= left ) rightCols -= left; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: ToLeft\n" ); } if( !messageBuffer.isEmpty() ) throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) ); @@ -154,7 +154,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( Down >>= down ) downPages += down; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Down\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: Down\n" ); } if( Up.hasValue() ) { @@ -162,7 +162,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( Up >>= up ) downPages -= up; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Up\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: Up\n" ); } if( ToRight.hasValue() ) { @@ -170,7 +170,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( ToRight >>= right ) acrossPages += right; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToRight\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: ToRight\n" ); } if( ToLeft.hasValue() ) { @@ -178,7 +178,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( ToLeft >>= left ) acrossPages -= left; else - messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" )); + messageBuffer += rtl::OUString( "Error getting parameter: ToLeft\n" ); } if( !messageBuffer.isEmpty() ) throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) ); diff --git a/sc/source/ui/vba/vbapivotcache.cxx b/sc/source/ui/vba/vbapivotcache.cxx index 4b81fdfac08f..a37473e10349 100644 --- a/sc/source/ui/vba/vbapivotcache.cxx +++ b/sc/source/ui/vba/vbapivotcache.cxx @@ -35,7 +35,7 @@ ScVbaPivotCache::Refresh() throw (css::uno::RuntimeException) rtl::OUString ScVbaPivotCache::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotCache")); + return rtl::OUString("ScVbaPivotCache"); } uno::Sequence< rtl::OUString > @@ -45,7 +45,7 @@ ScVbaPivotCache::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotCache" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.PivotCache" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbapivottable.cxx b/sc/source/ui/vba/vbapivottable.cxx index 605ecdfaebf3..97ce5e200ad5 100644 --- a/sc/source/ui/vba/vbapivottable.cxx +++ b/sc/source/ui/vba/vbapivottable.cxx @@ -38,7 +38,7 @@ ScVbaPivotTable::PivotCache() throw (uno::RuntimeException) rtl::OUString ScVbaPivotTable::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotTable")); + return rtl::OUString("ScVbaPivotTable"); } uno::Sequence< rtl::OUString > @@ -48,7 +48,7 @@ ScVbaPivotTable::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.PivotTable" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx index c407b9f3a25a..ffa5e173c385 100644 --- a/sc/source/ui/vba/vbapivottables.cxx +++ b/sc/source/ui/vba/vbapivottables.cxx @@ -69,7 +69,7 @@ ScVbaPivotTables::getElementType() throw (uno::RuntimeException) rtl::OUString ScVbaPivotTables::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotTables")); + return rtl::OUString("ScVbaPivotTables"); } css::uno::Sequence<rtl::OUString> @@ -79,7 +79,7 @@ ScVbaPivotTables::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTables") ); + sNames[0] = rtl::OUString("ooo.vba.excel.PivotTables"); } return sNames; } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a42f756b252c..43f7d5076c79 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -389,7 +389,7 @@ getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::R { ScCellRangesBase* pUno = ScCellRangesBase::getImplementation( xIf ); if ( !pUno ) - 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 >() ); return pUno->GetDocShell(); } @@ -427,7 +427,7 @@ getDocumentFromRange( const uno::Reference< table::XCellRange >& xRange ) { ScDocShell* pDocShell = getDocShellFromRange( xRange ); if ( !pDocShell ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying docshell from uno range object" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Failed to access underlying docshell from uno range object" ), uno::Reference< uno::XInterface >() ); ScDocument* pDoc = pDocShell->GetDocument(); return pDoc; } @@ -2473,7 +2473,7 @@ void ScVbaRange::Copy(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 ); @@ -3554,7 +3554,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException) nSID = SID_CURSORBLKRIGHT; break; default: - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": Invalid ColumnIndex" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( ::rtl::OUString( ": Invalid ColumnIndex" ), uno::Reference< uno::XInterface >() ); } if ( pDispatcher ) { diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index ff4c618f681e..364bd789a826 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -274,7 +274,7 @@ public: // XDefaultMethod ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException); // XDefaultProperty - ::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"); } // #TODO completely rewrite ScVbaRange, its become a hackfest diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 1889078a1edc..086dc8e322e4 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -31,7 +31,7 @@ uno::Reference< container::XNameAccess > ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) { uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( rtl::OUString( "CellStyles" ) ), uno::UNO_QUERY_THROW ); return xStylesAccess; } @@ -47,9 +47,9 @@ lcl_getStyleProps( const rtl::OUString& sStyleName, const uno::Reference< frame: void ScVbaStyle::initialise() throw ( uno::RuntimeException ) { if (!mxModel.is() ) - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XModel Interface could not be retrieved")) ); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( "XModel Interface could not be retrieved") ); uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW ); - if ( !xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CellStyle" ) ) ) ) + if ( !xServiceInfo->supportsService( rtl::OUString( "com.sun.star.style.CellStyle" ) ) ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() ); } @@ -160,7 +160,7 @@ ScVbaStyle::getMergeCells( ) throw (script::BasicErrorException, uno::RuntimeEx rtl::OUString ScVbaStyle::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaStyle")); + return rtl::OUString("ScVbaStyle"); } uno::Sequence< rtl::OUString > @@ -170,7 +170,7 @@ ScVbaStyle::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyle" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.XStyle" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index 5ced82e242c9..fa49f5f47819 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -121,7 +121,7 @@ ScVbaStyles::Add( const ::rtl::OUString& _sName, const uno::Any& _aBasedOn ) thr } } - uno::Reference< style::XStyle > xStyle( mxMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CellStyle"))), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( mxMSF->createInstance( rtl::OUString("com.sun.star.style.CellStyle")), uno::UNO_QUERY_THROW ); if (!mxNameContainerCellStyles->hasByName(_sName)) { @@ -157,7 +157,7 @@ ScVbaStyles::Delete(const rtl::OUString _sStyleName) throw ( script::BasicErrorE rtl::OUString ScVbaStyles::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaStyles")); + return rtl::OUString("ScVbaStyles"); } uno::Sequence< rtl::OUString > @@ -167,7 +167,7 @@ ScVbaStyles::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XStyles" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.XStyles" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx index e0c318fa7b9d..ca7cc7270613 100644 --- a/sc/source/ui/vba/vbatextboxshape.cxx +++ b/sc/source/ui/vba/vbatextboxshape.cxx @@ -50,7 +50,7 @@ ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) t ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL; 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 >() ); uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW ); ScVbaPalette aPalette( pDoc->GetDocumentShell() ); diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx index 40b392c3517c..306f71318ee7 100644 --- a/sc/source/ui/vba/vbatextframe.cxx +++ b/sc/source/ui/vba/vbatextframe.cxx @@ -43,7 +43,7 @@ ScVbaTextFrame::Characters() throw (uno::RuntimeException) rtl::OUString ScVbaTextFrame::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaTextFrame")); + return rtl::OUString("ScVbaTextFrame"); } uno::Sequence< rtl::OUString > @@ -53,7 +53,7 @@ ScVbaTextFrame::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.TextFrame" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.TextFrame" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index ed2d4cc1b789..d3c84ac95198 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -68,7 +68,7 @@ public: { try { - xShapePropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("String") ), css::uno::makeAny( Text )); + xShapePropertySet->setPropertyValue( rtl::OUString("String"), css::uno::makeAny( Text )); } catch ( css::uno::Exception& ) { @@ -80,7 +80,7 @@ public: ::rtl::OUString sText; try { - xShapePropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("String") ) ) >>= sText; + xShapePropertySet->getPropertyValue( rtl::OUString("String") ) >>= sText; } catch ( css::uno::Exception& ) { @@ -117,7 +117,7 @@ public: { try { - xShapePropertySet->setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextRotation")), css::uno::makeAny(_nOrientation*100)); + xShapePropertySet->setPropertyValue(rtl::OUString("TextRotation"), css::uno::makeAny(_nOrientation*100)); } catch (css::uno::Exception& ) { @@ -129,7 +129,7 @@ public: sal_Int32 nSOOrientation = 0; try { - xShapePropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextRotation"))) >>= nSOOrientation; + xShapePropertySet->getPropertyValue( rtl::OUString("TextRotation")) >>= nSOOrientation; } catch (css::uno::Exception& ) { @@ -140,7 +140,7 @@ public: // XHelperInterface rtl::OUString getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TitleImpl")); + return rtl::OUString("TitleImpl"); } css::uno::Sequence< rtl::OUString > getServiceNames() { @@ -148,7 +148,7 @@ public: if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.XTitle" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.XTitle" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx index 1ba1724ed179..6fe1ffca789e 100644 --- a/sc/source/ui/vba/vbavalidation.cxx +++ b/sc/source/ui/vba/vbavalidation.cxx @@ -230,10 +230,10 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un sheet::ValidationType nValType = sheet::ValidationType_ANY; xProps->getPropertyValue( STYPE ) >>= nValType; if ( nValType != sheet::ValidationType_ANY ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "validation object already exists" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "validation object already exists" ), uno::Reference< uno::XInterface >() ); sal_Int32 nType = -1; if ( !Type.hasValue() || !( Type >>= nType ) ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "missing required param" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "missing required param" ), uno::Reference< uno::XInterface >() ); Delete(); // set up defaults rtl::OUString sFormula1; @@ -247,7 +247,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un // for validate list // at least formula1 is required if ( !Formula1.hasValue() ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "missing param" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "missing param" ), uno::Reference< uno::XInterface >() ); nValType = sheet::ValidationType_LIST; xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); // #TODO validate required params @@ -259,7 +259,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); break; default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unsupported operation..." ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "unsupported operation..." ), uno::Reference< uno::XInterface >() ); } sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP; @@ -280,7 +280,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un eStyle = sheet::ValidationAlertStyle_INFO; break; default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "bad param..." ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "bad param..." ), uno::Reference< uno::XInterface >() ); } } @@ -330,7 +330,7 @@ ScVbaValidation::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Validation" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Validation" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 925394cf741b..f56f3039987a 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -103,13 +103,13 @@ public: { ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() ); if ( !pModel ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain current document" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Cannot obtain current document" ), uno::Reference< uno::XInterface >() ); ScDocShell* pDocShell = (ScDocShell*)pModel->GetEmbeddedObject(); if ( !pDocShell ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain docshell" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Cannot obtain docshell" ), uno::Reference< uno::XInterface >() ); ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( !pViewShell ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Cannot obtain view shell" ), uno::Reference< uno::XInterface >() ); SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); uno::Sequence<sal_Int32> aSheets( nTabCount ); @@ -290,7 +290,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P /* sal_Int32 nSheets = 0; sal_Int32 nPosition = 0; - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No Implemented")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("No Implemented"), uno::Reference< uno::XInterface >() ); sal_Bool bSheets = ( Sheets >>= nSheets ); sal_Bool bPosition = ( Position >>= nPosition ); if ( bSheets || bPosition ) // at least one param specified @@ -444,7 +444,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE else if (nwindowState == xlNormal) pWork -> Restore(); else - throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Parameter" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Invalid Parameter" ), uno::Reference< uno::XInterface >() ); } } @@ -867,7 +867,7 @@ void SAL_CALL ScVbaWindow::setTabRatio( double fRatio ) throw (css::uno::Runtime rtl::OUString ScVbaWindow::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWindow")); + return rtl::OUString("ScVbaWindow"); } uno::Sequence< rtl::OUString > @@ -877,7 +877,7 @@ ScVbaWindow::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Window" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Window" ); } return aServiceNames; } diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 56ddccf9e9c0..0c090516961d 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -228,7 +228,7 @@ ScVbaWindows::Arrange( ::sal_Int32 /*ArrangeStyle*/, const uno::Any& /*ActiveWor rtl::OUString ScVbaWindows::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWindows")); + return rtl::OUString("ScVbaWindows"); } css::uno::Sequence<rtl::OUString> @@ -238,7 +238,7 @@ ScVbaWindows::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Windows") ); + sNames[0] = rtl::OUString("ooo.vba.excel.Windows"); } return sNames; } diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 2a87035ad301..6062b9e3bde5 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -257,8 +257,8 @@ ScVbaWorkbook::SaveCopyAs( const rtl::OUString& sFileName ) throw ( uno::Runtime osl::FileBase::getFileURLFromSystemPath( sFileName, aURL ); uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > storeProps(1); - storeProps[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); - storeProps[0].Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MS Excel 97" ) ); + storeProps[0].Name = rtl::OUString( "FilterName" ); + storeProps[0].Value <<= rtl::OUString( "MS Excel 97" ); xStor->storeToURL( aURL, storeProps ); } @@ -279,7 +279,7 @@ ScVbaWorkbook::Names( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString("NamedRanges") ), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) ); if ( aIndex.hasValue() ) return uno::Any( xNames->Item( aIndex, uno::Any() ) ); @@ -289,7 +289,7 @@ ScVbaWorkbook::Names( const uno::Any& aIndex ) throw (uno::RuntimeException) rtl::OUString ScVbaWorkbook::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWorkbook")); + return rtl::OUString("ScVbaWorkbook"); } uno::Sequence< rtl::OUString > @@ -299,7 +299,7 @@ ScVbaWorkbook::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbook" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Workbook" ); } return aServiceNames; } @@ -308,7 +308,7 @@ ScVbaWorkbook::getServiceNames() ScVbaWorkbook::getCodeName() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY_THROW ); - return xModelProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CodeName" ) ) ).get< ::rtl::OUString >(); + return xModelProp->getPropertyValue( ::rtl::OUString( "CodeName" ) ).get< ::rtl::OUString >(); } sal_Int64 diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index fb2eca206487..70d3ab4968c4 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -88,7 +88,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( rtl::OUString( "ooo.vba.VBAObjectModuleObjectProvider")), uno::UNO_QUERY_THROW ); // set up the module info for the workbook and sheets in the nealy created // spreadsheet ScDocument* pDoc = pShell->GetDocument(); @@ -120,9 +120,9 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& sModuleInfo.ModuleType = script::ModuleType::DOCUMENT; xVBAModuleInfo->insertModuleInfo( *it, sModuleInfo ); if( xLib->hasByName( *it ) ) - xLib->replaceByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n") ) ) ); + xLib->replaceByName( *it, uno::makeAny( rtl::OUString( "Option VBASupport 1\n") ) ); else - xLib->insertByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) ) ) ); + xLib->insertByName( *it, uno::makeAny( rtl::OUString( "Option VBASupport 1\n" ) ) ); } } } @@ -266,9 +266,9 @@ ScVbaWorkbooks::isSpreadSheetFile( const rtl::OUString& sType ) rtl::OUString ScVbaWorkbooks::getFileFilterType( const rtl::OUString& rFileName ) { - uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")), mxContext), uno::UNO_QUERY_THROW ); + uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(::rtl::OUString("com.sun.star.document.TypeDetection"), mxContext), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aMediaDesc(1); - aMediaDesc[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("URL" ) ); + aMediaDesc[ 0 ].Name = rtl::OUString("URL" ); aMediaDesc[ 0 ].Value <<= rFileName; rtl::OUString sType = xTypeDetect->queryTypeByDescriptor( aMediaDesc, sal_True ); return sType; @@ -304,7 +304,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi // 6 Custom character (see the Delimiter argument // no format means use the current delimiter sProps.realloc( 3 ); - sProps[ nIndex ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterOptions" ) ); + sProps[ nIndex ].Name = rtl::OUString("FilterOptions" ); sal_Int16 delims[] = { 0 /*default not used*/, 9/*tab*/, 44/*comma*/, 32/*space*/, 59/*semicolon*/ }; static rtl::OUString sRestOfFormat( RTL_CONSTASCII_USTRINGPARAM(",34,0,1" ) ); @@ -317,7 +317,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi Format >>= nFormat; // val of nFormat overwritten if extracted // validate param if ( nFormat < 1 || nFormat > 6 ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal value for Format" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Illegal value for Format" ), uno::Reference< uno::XInterface >() ); } sal_Int16 nDelim = getCurrentDelim(); @@ -330,29 +330,29 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi { // Need to check Delimiter param if ( !Delimiter.hasValue() ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Expected value for Delimiter" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Expected value for Delimiter" ), uno::Reference< uno::XInterface >() ); rtl::OUString sStr; Delimiter >>= sStr; String aUniStr( sStr ); if ( aUniStr.Len() ) nDelim = aUniStr.GetChar(0); else - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Incorrect value for Delimiter" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Incorrect value for Delimiter" ), uno::Reference< uno::XInterface >() ); } getCurrentDelim() = nDelim; //set new current sFormat = rtl::OUString::valueOf( (sal_Int32)nDelim ) + sRestOfFormat; sProps[ nIndex++ ].Value <<= sFormat; - sProps[ nIndex ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); + sProps[ nIndex ].Name = rtl::OUString("FilterName"); sProps[ nIndex++ ].Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text - txt - csv (StarCalc)") ); // Ensure WORKAROUND_CSV_TXT_BUG_i60158 gets called in typedetection.cxx so // csv is forced for deep detected 'writerxxx' types - sProps[ nIndex ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentService") ); - sProps[ nIndex ].Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument") ); + sProps[ nIndex ].Name = rtl::OUString("DocumentService"); + sProps[ nIndex ].Value <<= rtl::OUString("com.sun.star.sheet.SpreadsheetDocument"); } else if ( !isSpreadSheetFile( sType ) ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString("Bad Format"), uno::Reference< uno::XInterface >() ); uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent ); @@ -365,7 +365,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi rtl::OUString ScVbaWorkbooks::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWorkbooks")); + return rtl::OUString("ScVbaWorkbooks"); } css::uno::Sequence<rtl::OUString> @@ -375,7 +375,7 @@ ScVbaWorkbooks::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Workbooks") ); + sNames[0] = rtl::OUString("ooo.vba.excel.Workbooks"); } return sNames; } diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index e7f36f843808..7377ef8726ba 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -163,8 +163,8 @@ openNewDoc(rtl::OUString aSheetName ) uno::Reference <frame::XDesktop2 > xComponentLoader = frame::Desktop::create(xContext); uno::Reference<lang::XComponent > xComponent( xComponentLoader->loadComponentFromURL( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/scalc" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" ) ), 0, + rtl::OUString( "private:factory/scalc" ), + rtl::OUString( "_blank" ), 0, uno::Sequence < ::com::sun::star::beans::PropertyValue >() ) ); uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xComponent, uno::UNO_QUERY_THROW ); if ( xSpreadDoc.is() ) @@ -362,8 +362,7 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException) return excel::XlEnableSelection::xlNoSelection; } else - throw uno::RuntimeException(::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "Sheet Name does not exist. ") ), + throw uno::RuntimeException(::rtl::OUString( "Sheet Name does not exist. "), uno::Reference< XInterface >() ); } @@ -404,8 +403,7 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx } } else - throw uno::RuntimeException(::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "Sheet Name does not exist. ") ), + throw uno::RuntimeException(::rtl::OUString( "Sheet Name does not exist. "), uno::Reference< XInterface >() ); } @@ -702,7 +700,7 @@ void ScVbaWorksheet::CheckSpelling( const uno::Any& /*CustomDictionary*/,const uno::Any& /*IgnoreUppercase*/,const uno::Any& /*AlwaysSuggest*/, const uno::Any& /*SpellingLang*/ ) throw (uno::RuntimeException) { // #TODO# #FIXME# unused params above, can we do anything with those - rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SpellDialog")); + rtl::OUString url = rtl::OUString( ".uno:SpellDialog"); uno::Reference< frame::XModel > xModel( getModel() ); dispatchRequests(xModel,url); } @@ -804,7 +802,7 @@ ScVbaWorksheet::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeExceptio // #163498# initialize Names object with correct parent (this worksheet) // TODO: real sheet-local names... uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( rtl::OUString("NamedRanges") ), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) ); if ( aIndex.hasValue() ) return uno::Any( xNames->Item( aIndex, uno::Any() ) ); @@ -951,7 +949,7 @@ ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::U uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } @@ -1031,7 +1029,7 @@ ScVbaWorksheet::getControlShape( const ::rtl::OUString& sName ) rtl::OUString ScVbaWorksheet::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWorksheet")); + return rtl::OUString("ScVbaWorksheet"); } void SAL_CALL @@ -1054,7 +1052,7 @@ ScVbaWorksheet::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.Worksheet" ); } return aServiceNames; } @@ -1063,7 +1061,7 @@ rtl::OUString SAL_CALL ScVbaWorksheet::getCodeName() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xSheetProp( mxSheet, uno::UNO_QUERY_THROW ); - return xSheetProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CodeName" ) ) ).get< ::rtl::OUString >(); + return xSheetProp->getPropertyValue( ::rtl::OUString( "CodeName" ) ).get< ::rtl::OUString >(); } sal_Int16 diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index a2d3524159fa..3986dcab2700 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -361,8 +361,7 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep } } else - throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "Visible property doesn't support non boolean #FIXME" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Visible property doesn't support non boolean #FIXME" ), uno::Reference< uno::XInterface >() ); } void SAL_CALL @@ -370,7 +369,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException) { ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel ); if ( !pViewShell ) - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString( "Cannot obtain view shell" ), uno::Reference< uno::XInterface >() ); ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData(); sal_Bool bReplace = sal_True; @@ -474,7 +473,7 @@ ScVbaWorksheets::getItemByStringIndex( const rtl::OUString& sIndex ) throw (uno: rtl::OUString ScVbaWorksheets::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWorksheets")); + return rtl::OUString("ScVbaWorksheets"); } css::uno::Sequence<rtl::OUString> @@ -484,7 +483,7 @@ ScVbaWorksheets::getServiceNames() if ( sNames.getLength() == 0 ) { sNames.realloc( 1 ); - sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheets") ); + sNames[0] = rtl::OUString("ooo.vba.excel.Worksheets"); } return sNames; } diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx index bce1b6a0f918..4f507edfd91e 100644 --- a/sc/source/ui/vba/vbawsfunction.cxx +++ b/sc/source/ui/vba/vbawsfunction.cxx @@ -179,10 +179,10 @@ ScVbaWSFunction::invoke(const rtl::OUString& FunctionName, const uno::Sequence< { uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XFunctionAccess > xFunctionAccess( xSMgr->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.FunctionAccess" ) ), mxContext ), + ::rtl::OUString( "com.sun.star.sheet.FunctionAccess" ), mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPropSet( xFunctionAccess, uno::UNO_QUERY_THROW ); - xPropSet->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsArrayFunction" ) ), uno::Any( bAsArray ) ); + xPropSet->setPropertyValue( ::rtl::OUString( "IsArrayFunction" ), uno::Any( bAsArray ) ); aRet = xFunctionAccess->callFunction( FunctionName, aParamTemp ); } @@ -294,7 +294,7 @@ ScVbaWSFunction::getExactName( const ::rtl::OUString& aApproximateName ) throw ( rtl::OUString ScVbaWSFunction::getServiceImplName() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaWSFunction")); + return rtl::OUString("ScVbaWSFunction"); } uno::Sequence< rtl::OUString > @@ -304,7 +304,7 @@ ScVbaWSFunction::getServiceNames() if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.WorksheetFunction" ) ); + aServiceNames[ 0 ] = rtl::OUString("ooo.vba.excel.WorksheetFunction" ); } return aServiceNames; } |