sc/source/ui/vba/excelvbahelper.cxx | 32 ++--- sc/source/ui/vba/excelvbahelper.hxx | 2 sc/source/ui/vba/vbaapplication.cxx | 60 +++++----- sc/source/ui/vba/vbaassistant.cxx | 4 sc/source/ui/vba/vbaaxes.cxx | 18 +-- sc/source/ui/vba/vbaaxis.cxx | 56 +++++----- sc/source/ui/vba/vbaaxistitle.cxx | 4 sc/source/ui/vba/vbaborders.cxx | 22 ++-- sc/source/ui/vba/vbacharacters.cxx | 6 - sc/source/ui/vba/vbachart.cxx | 22 ++-- sc/source/ui/vba/vbachartobject.cxx | 8 - sc/source/ui/vba/vbachartobjects.cxx | 12 +- sc/source/ui/vba/vbacharttitle.cxx | 4 sc/source/ui/vba/vbacomment.cxx | 8 - sc/source/ui/vba/vbacomments.cxx | 4 sc/source/ui/vba/vbadialog.cxx | 4 sc/source/ui/vba/vbadialogs.cxx | 4 sc/source/ui/vba/vbaeventshelper.cxx | 8 - sc/source/ui/vba/vbafiledialog.cxx | 6 - sc/source/ui/vba/vbafiledialogitems.cxx | 8 - sc/source/ui/vba/vbafont.cxx | 26 ++-- sc/source/ui/vba/vbaformat.cxx | 4 sc/source/ui/vba/vbaformatcondition.cxx | 4 sc/source/ui/vba/vbaformatconditions.cxx | 12 +- sc/source/ui/vba/vbaglobals.cxx | 20 +-- sc/source/ui/vba/vbahyperlink.cxx | 14 +- sc/source/ui/vba/vbahyperlinks.cxx | 4 sc/source/ui/vba/vbainterior.cxx | 16 +- sc/source/ui/vba/vbamenu.cxx | 4 sc/source/ui/vba/vbamenubar.cxx | 4 sc/source/ui/vba/vbamenubars.cxx | 8 - sc/source/ui/vba/vbamenuitem.cxx | 4 sc/source/ui/vba/vbamenuitems.cxx | 4 sc/source/ui/vba/vbamenus.cxx | 4 sc/source/ui/vba/vbaname.cxx | 4 sc/source/ui/vba/vbanames.cxx | 8 - sc/source/ui/vba/vbaoleobject.cxx | 6 - sc/source/ui/vba/vbaoleobjects.cxx | 4 sc/source/ui/vba/vbaoutline.cxx | 4 sc/source/ui/vba/vbapagebreak.cxx | 16 +- sc/source/ui/vba/vbapagebreaks.cxx | 10 - sc/source/ui/vba/vbapagesetup.cxx | 88 ++++++++-------- sc/source/ui/vba/vbapalette.cxx | 4 sc/source/ui/vba/vbapane.cxx | 4 sc/source/ui/vba/vbapivotcache.cxx | 4 sc/source/ui/vba/vbapivottable.cxx | 4 sc/source/ui/vba/vbapivottables.cxx | 4 sc/source/ui/vba/vbarange.cxx | 170 +++++++++++++++---------------- sc/source/ui/vba/vbarange.hxx | 2 sc/source/ui/vba/vbasheetobject.cxx | 42 +++---- sc/source/ui/vba/vbasheetobjects.cxx | 18 +-- sc/source/ui/vba/vbastyle.cxx | 8 - sc/source/ui/vba/vbastyles.cxx | 8 - sc/source/ui/vba/vbatextboxshape.cxx | 2 sc/source/ui/vba/vbatextframe.cxx | 4 sc/source/ui/vba/vbatitle.hxx | 12 +- sc/source/ui/vba/vbavalidation.cxx | 14 +- sc/source/ui/vba/vbawindow.cxx | 12 +- sc/source/ui/vba/vbawindows.cxx | 6 - sc/source/ui/vba/vbaworkbook.cxx | 28 ++--- sc/source/ui/vba/vbaworkbooks.cxx | 22 ++-- sc/source/ui/vba/vbaworksheet.cxx | 30 ++--- sc/source/ui/vba/vbaworksheets.cxx | 12 +- sc/source/ui/vba/vbawsfunction.cxx | 8 - 64 files changed, 489 insertions(+), 489 deletions(-)
New commits: commit 5a602ed852b872f87893169062ec47041e013fb9 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon May 20 09:13:38 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon May 20 14:40:36 2024 +0200 loplugin:ostr in sc/.../vba Change-Id: Ifdf0ebba617432f49e2c14c8a52c495dc1c6a36a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167853 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 3224171677e9..0f00dae66ed7 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -64,7 +64,7 @@ GetUnnamedDataBaseRanges( const ScDocShell* pShell ) if ( pShell ) xModel.set( pShell->GetModel(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xModelProps( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue("UnnamedDatabaseRanges"), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue(u"UnnamedDatabaseRanges"_ustr), uno::UNO_QUERY_THROW ); return xUnnamedDBRanges; } @@ -80,7 +80,7 @@ GetAutoFiltRange( const ScDocShell* pShell, sal_Int16 nSheet ) uno::Reference< sheet::XDatabaseRange > xDBRange( xUnnamedDBRanges->getByTable( nSheet ) , uno::UNO_QUERY_THROW ); bool bHasAuto = false; uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue("AutoFilter") >>= bHasAuto; + xProps->getPropertyValue(u"AutoFilter"_ustr) >>= bHasAuto; if ( bHasAuto ) { xDataBaseRange=xDBRange; @@ -94,7 +94,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang ScCellRangesBase* pScCellRangesBase = dynamic_cast<ScCellRangesBase*>( xRange.get() ); if ( !pScCellRangesBase ) { - throw uno::RuntimeException("Failed to access underlying doc shell uno range object" ); + throw uno::RuntimeException(u"Failed to access underlying doc shell uno range object"_ustr ); } return pScCellRangesBase->GetDocShell(); } @@ -285,7 +285,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) { uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW ); OUString sCodeName; - xProps->getPropertyValue("CodeName") >>= sCodeName; + xProps->getPropertyValue(u"CodeName"_ustr) >>= 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 >& if ( !pShell ) return; - OUString aPrjName( "Standard" ); + OUString aPrjName( u"Standard"_ustr ); pShell->GetBasicManager()->SetName( aPrjName ); /* Set library container to VBA compatibility mode. This will create @@ -347,7 +347,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& if( xLib.is() ) { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( pShell->GetModel()->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( pShell->GetModel()->createInstance(u"ooo.vba.VBAObjectModuleObjectProvider"_ustr), uno::UNO_QUERY_THROW ); // set up the module info for the workbook and sheets in the newly created // spreadsheet ScDocument& rDoc = pShell->GetDocument(); @@ -376,9 +376,9 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& sModuleInfo.ModuleType = script::ModuleType::DOCUMENT; xVBAModuleInfo->insertModuleInfo( rName, sModuleInfo ); if( xLib->hasByName( rName ) ) - xLib->replaceByName( rName, uno::Any( OUString( "Option VBASupport 1 ") ) ); + xLib->replaceByName( rName, uno::Any( u"Option VBASupport 1 "_ustr ) ); else - xLib->insertByName( rName, uno::Any( OUString( "Option VBASupport 1 " ) ) ); + xLib->insertByName( rName, uno::Any( u"Option VBASupport 1 "_ustr ) ); } } } @@ -455,7 +455,7 @@ void ExportAsFixedFormatHelper( From >>= nFrom; To >>= nTo; - OUString sRange("-"); + OUString sRange(u"-"_ustr); css::uno::Sequence<css::beans::PropertyValue> aFilterData; if (nFrom || nTo) @@ -466,7 +466,7 @@ void ExportAsFixedFormatHelper( sRange += OUString::number(nTo); aFilterData.realloc(aFilterData.getLength() + 1); - aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue("PageRange", sRange); + aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue(u"PageRange"_ustr, sRange); } OUString sQuality; @@ -475,12 +475,12 @@ void ExportAsFixedFormatHelper( if (sQuality.equalsIgnoreAsciiCase(u"xlQualityMinimum") || sQuality == "1") { aFilterData.realloc(aFilterData.getLength() + 1); - aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue("Quality", sal_Int32(70)); + aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(70)); } else if (sQuality.equalsIgnoreAsciiCase(u"xlQualityStandard") || sQuality == "0") { aFilterData.realloc(aFilterData.getLength() + 1); - aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue("UseLosslessCompression", true); + aFilterData.getArray()[aFilterData.getLength() - 1] = comphelper::makePropertyValue(u"UseLosslessCompression"_ustr, true); } else { @@ -492,9 +492,9 @@ void ExportAsFixedFormatHelper( // init set of params for storeToURL() call css::uno::Sequence<css::beans::PropertyValue> storeProps{ - comphelper::makePropertyValue("FilterData", aFilterData), - comphelper::makePropertyValue("FilterName", OUString("calc_pdf_Export")), - comphelper::makePropertyValue("URL", sURL) + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData), + comphelper::makePropertyValue(u"FilterName"_ustr, u"calc_pdf_Export"_ustr), + comphelper::makePropertyValue(u"URL"_ustr, sURL) }; bool bIncludeDocProperties = true; @@ -533,7 +533,7 @@ void ExportAsFixedFormatHelper( if ((OpenAfterPublish >>= bOpenAfterPublish) && bOpenAfterPublish) { uno::Reference<css::system::XSystemShellExecute> xSystemShellExecute(css::system::SystemShellExecute::create(::comphelper::getProcessComponentContext())); - xSystemShellExecute->execute(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), "", css::system::SystemShellExecuteFlags::URIS_ONLY); + xSystemShellExecute->execute(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), u""_ustr, css::system::SystemShellExecuteFlags::URIS_ONLY); } } diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 542991aca0ec..6f0d71d67789 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -100,7 +100,7 @@ template < typename ImplObject > { ImplObject* pObj = comphelper::getFromUnoTunnel<ImplObject>(rxWrapperIf); if ( !pObj ) - throw css::uno::RuntimeException("Internal error, can't extract implementation object", rxWrapperIf ); + throw css::uno::RuntimeException(u"Internal error, can't extract implementation object"_ustr, rxWrapperIf ); return pObj; } diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index f951cbd4581b..2fceecb58024 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -281,7 +281,7 @@ ScVbaApplication::getSelection() if (!aSelection.is()) { - throw uno::RuntimeException( "failed to obtain current selection" ); + throw uno::RuntimeException( u"failed to obtain current selection"_ustr ); } uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW ); @@ -306,7 +306,7 @@ ScVbaApplication::getSelection() uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW ); - if ( xShapeServiceInfo->supportsService("com.sun.star.drawing.Text") ) + if ( xShapeServiceInfo->supportsService(u"com.sun.star.drawing.Text"_ustr) ) { return uno::Any( uno::Reference< msforms::XTextBoxShape >( new ScVbaTextBoxShape( mxContext, xShape, xShapes, xModel ) ) ); @@ -319,8 +319,8 @@ ScVbaApplication::getSelection() } return uno::Any( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) ); } - else if( xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRange") || - xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRanges") ) + else if( xServiceInfo->supportsService(u"com.sun.star.sheet.SheetCellRange"_ustr) || + xServiceInfo->supportsService(u"com.sun.star.sheet.SheetCellRanges"_ustr) ) { uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY); if ( !xRange.is() ) @@ -345,7 +345,7 @@ ScVbaApplication::getActiveCell() uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW); ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext); if ( !pViewShell ) - throw uno::RuntimeException("No ViewShell available" ); + throw uno::RuntimeException(u"No ViewShell available"_ustr ); ScViewData& rTabView = pViewShell->GetViewData(); sal_Int32 nCursorX = rTabView.GetCurX(); @@ -377,7 +377,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& /*aFileFilter*/, const uno::An // Check, if the implementation of XFileDialogSelectedItems is what we expect if (!pItems) - throw uno::RuntimeException("Unexpected XFileDialogSelectedItems implementation"); + throw uno::RuntimeException(u"Unexpected XFileDialogSelectedItems implementation"_ustr); auto const & rItemVector = pItems->getItems(); @@ -529,7 +529,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) } } else - throw uno::RuntimeException("Invalid parameter. It should be a string or False" ); + throw uno::RuntimeException(u"Invalid parameter. It should be a string or False"_ustr ); } ::sal_Int32 SAL_CALL @@ -576,7 +576,7 @@ ScVbaApplication::wait( double time ) SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); aArgs->Put(aRef.get(), 1); - SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "WaitUntil", SbxClassType::Method )); + SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( u"WaitUntil"_ustr, SbxClassType::Method )); if ( pMeth ) { @@ -600,7 +600,7 @@ ScVbaApplication::Names( const css::uno::Any& aIndex ) uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW ); uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( - "NamedRanges" ), uno::UNO_QUERY_THROW ); + u"NamedRanges"_ustr ), uno::UNO_QUERY_THROW ); css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) ); if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID ) @@ -628,7 +628,7 @@ ScVbaApplication::getActiveSheet() if ( !result.is() ) { // Fixme - check if this is reasonable/desired behavior - throw uno::RuntimeException("No activeSheet available" ); + throw uno::RuntimeException(u"No activeSheet available"_ustr ); } return result; @@ -655,7 +655,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) { bool aScroll = false; if( !(Scroll >>= aScroll) ) - throw uno::RuntimeException("second parameter should be boolean" ); + throw uno::RuntimeException(u"second parameter should be boolean"_ustr ); bScroll = aScroll; @@ -702,7 +702,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) //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("invalid reference for range name, it should be procedure name" ); + throw uno::RuntimeException(u"invalid reference for range name, it should be procedure name"_ustr ); } return; } @@ -736,7 +736,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) } return; } - throw uno::RuntimeException("invalid reference or name" ); + throw uno::RuntimeException(u"invalid reference or name"_ustr ); } sal_Int32 SAL_CALL @@ -786,7 +786,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) break; } default: - throw uno::RuntimeException("Unknown value for Cursor pointer" ); + throw uno::RuntimeException(u"Unknown value for Cursor pointer"_ustr ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } @@ -802,7 +802,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) OUString SAL_CALL ScVbaApplication::getName() { - return "Microsoft Excel"; + return u"Microsoft Excel"_ustr; } // #TODO #FIXME get/setDisplayAlerts are just stub impl @@ -863,7 +863,7 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) // #FIXME calling ScViewUtil::SetFullScreen( *pShell, bSet ); // directly results in a strange crash, using dispatch instead if ( bSet != getDisplayFullScreen() ) - dispatchRequests( getCurrentDocument(), ".uno:FullScreen" ); + dispatchRequests( getCurrentDocument(), u".uno:FullScreen"_ustr ); } sal_Bool SAL_CALL @@ -883,8 +883,8 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet ) // 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("HasVerticalScrollBar", uno::Any( bSet ) ); - xProps->setPropertyValue("HasHorizontalScrollBar", uno::Any( bSet ) ); + xProps->setPropertyValue(u"HasVerticalScrollBar"_ustr, uno::Any( bSet ) ); + xProps->setPropertyValue(u"HasHorizontalScrollBar"_ustr, uno::Any( bSet ) ); } sal_Bool SAL_CALL @@ -936,12 +936,12 @@ ScVbaApplication::setIteration( sal_Bool bSet ) mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< frame::XDesktop > xDesktop - (xSMgr->createInstanceWithContext( "com.sun.star.frame.Desktop" , mxContext), uno::UNO_QUERY_THROW ); + (xSMgr->createInstanceWithContext( u"com.sun.star.frame.Desktop"_ustr , mxContext), uno::UNO_QUERY_THROW ); uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration(); while ( xComponents->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xComponents->nextElement(), uno::UNO_QUERY ); - if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) + if ( xServiceInfo.is() && xServiceInfo->supportsService( u"com.sun.star.sheet.SpreadsheetDocument"_ustr ) ) { uno::Reference< beans::XPropertySet > xProps( xServiceInfo, uno::UNO_QUERY ); if ( xProps.is() ) @@ -1002,19 +1002,19 @@ ScVbaApplication::setDefaultFilePath( const OUString& DefaultFilePath ) OUString SAL_CALL ScVbaApplication::getDefaultFilePath() { - return getOfficePath( "Work"); + return getOfficePath( u"Work"_ustr); } OUString SAL_CALL ScVbaApplication::getLibraryPath() { - return getOfficePath( "Basic"); + return getOfficePath( u"Basic"_ustr); } OUString SAL_CALL ScVbaApplication::getTemplatesPath() { - return getOfficePath( "Template"); + return getOfficePath( u"Template"_ustr); } OUString SAL_CALL @@ -1034,7 +1034,7 @@ ScVbaApplication::getOperatingSystem() return "Macintosh"; #elif defined(UNX) // M. Office is not available on Unix systems, so it is not documented. - return "Unix"; + return u"Unix"_ustr; #else return OUString("Unknown"); #endif @@ -1395,7 +1395,7 @@ uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) { StarBASIC* pBasic = SfxApplication::GetBasic(); - SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "FuncCaller", SbxClassType::Method )); + SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( u"FuncCaller"_ustr, SbxClassType::Method )); uno::Any aRet; if ( pMeth ) { @@ -1490,7 +1490,7 @@ void SAL_CALL ScVbaApplication::Undo() OUString SAL_CALL ScVbaApplication::getIID() { - return "{82154425-0FBF-11d4-8313-005004526AB4}"; + return u"{82154425-0FBF-11d4-8313-005004526AB4}"_ustr; } // XConnectable @@ -1498,7 +1498,7 @@ ScVbaApplication::getIID() OUString SAL_CALL ScVbaApplication::GetIIDForClassItselfNotCoclass() { - return "{82154426-0FBF-11D4-8313-005004526AB4}"; + return u"{82154426-0FBF-11D4-8313-005004526AB4}"_ustr; } TypeAndIID SAL_CALL @@ -1506,7 +1506,7 @@ ScVbaApplication::GetConnectionPoint() { TypeAndIID aResult = { cppu::UnoType<excel::XApplicationOutgoing>::get(), - "{82154427-0FBF-11D4-8313-005004526AB4}" + u"{82154427-0FBF-11D4-8313-005004526AB4}"_ustr }; return aResult; @@ -1534,7 +1534,7 @@ ScVbaApplication::CallSinks( const OUString& Method, uno::Sequence< uno::Any >& OUString ScVbaApplication::getServiceImplName() { - return "ScVbaApplication"; + return u"ScVbaApplication"_ustr; } uno::Sequence< OUString > @@ -1542,7 +1542,7 @@ ScVbaApplication::getServiceNames() { static uno::Sequence< OUString > aServiceNames { - "ooo.vba.excel.Application" + u"ooo.vba.excel.Application"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx index ea13fbcd62ca..7cc49f5e3d54 100644 --- a/sc/source/ui/vba/vbaassistant.cxx +++ b/sc/source/ui/vba/vbaassistant.cxx @@ -100,7 +100,7 @@ ScVbaAssistant::Name( ) OUString ScVbaAssistant::getServiceImplName() { - return "ScVbaAssistant"; + return u"ScVbaAssistant"_ustr; } uno::Sequence< OUString > @@ -108,7 +108,7 @@ ScVbaAssistant::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.Assistant" + u"ooo.vba.Assistant"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index 66155bccfc43..d5396cf16b0a 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -68,7 +68,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: { ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); if ( !pChart ) - throw uno::RuntimeException("Object failure, can't access chart implementation" ); + throw uno::RuntimeException(u"Object failure, can't access chart implementation"_ustr ); uno::Reference< beans::XPropertySet > xAxisPropertySet; if ((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue)) @@ -102,18 +102,18 @@ public: // primary bool bBool = false; uno::Reference< beans::XPropertySet > xDiagramPropertySet( pChart->xDiagramPropertySet() ); - if ( ( xDiagramPropertySet->getPropertyValue("HasXAxis") >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue(u"HasXAxis"_ustr) >>= bBool ) && bBool ) mCoordinates.emplace_back( xlPrimary, xlCategory ); - if ( ( xDiagramPropertySet->getPropertyValue("HasYAxis") >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue(u"HasYAxis"_ustr) >>= bBool ) && bBool ) mCoordinates.emplace_back( xlPrimary, xlSeriesAxis ); if ( pChart->is3D() ) mCoordinates.emplace_back( xlPrimary, xlValue ); // secondary - if ( ( xDiagramPropertySet->getPropertyValue("HasSecondaryXAxis") >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue(u"HasSecondaryXAxis"_ustr) >>= bBool ) && bBool ) mCoordinates.emplace_back( xlSecondary, xlCategory ); - if ( ( xDiagramPropertySet->getPropertyValue("HasSecondaryYAxis") >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue(u"HasSecondaryYAxis"_ustr) >>= bBool ) && bBool ) mCoordinates.emplace_back( xlSecondary, xlSeriesAxis ); } @@ -129,7 +129,7 @@ public: { css::uno::Any anyEx = cppu::getCaughtException(); throw css::lang::WrappedTargetException( - "Error Getting Index!", + u"Error Getting Index!"_ustr, getXWeak(), anyEx ); } @@ -178,7 +178,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 ) ) - throw uno::RuntimeException("Axes::Item Failed to extract type" ); + throw uno::RuntimeException(u"Axes::Item Failed to extract type"_ustr ); if ( _oAxisGroup.hasValue() ) _oAxisGroup >>= nAxisGroup ; @@ -195,7 +195,7 @@ ScVbaAxes::createCollectionObject(const css::uno::Any& aSource) OUString ScVbaAxes::getServiceImplName() { - return "ScVbaAxes"; + return u"ScVbaAxes"_ustr; } uno::Sequence< OUString > @@ -203,7 +203,7 @@ ScVbaAxes::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Axes" + u"ooo.vba.excel.Axes"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index 76cf9fe066e3..46a5db7f0eb6 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -39,7 +39,7 @@ ScVbaAxis::getChartPtr() { ScVbaChart* pChart = moChartParent.get(); if ( !pChart ) - throw uno::RuntimeException("Can't access parent chart impl" ); + throw uno::RuntimeException(u"Can't access parent chart impl"_ustr ); return pChart; } @@ -240,13 +240,13 @@ ScVbaAxis::setHasTitle( sal_Bool _bHasTitle ) switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->setPropertyValue("HasXAxisTitle", uno::Any(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue(u"HasXAxisTitle"_ustr, uno::Any(_bHasTitle)); break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->setPropertyValue("HasZAxisTitle", uno::Any(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue(u"HasZAxisTitle"_ustr, uno::Any(_bHasTitle)); break; default: // xlValue: - pChart->mxDiagramPropertySet->setPropertyValue("HasYAxisTitle", uno::Any(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue(u"HasYAxisTitle"_ustr, uno::Any(_bHasTitle)); } } @@ -267,13 +267,13 @@ ScVbaAxis::getHasTitle( ) switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->getPropertyValue("HasXAxisTitle") >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue(u"HasXAxisTitle"_ustr) >>= bHasTitle; break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->getPropertyValue("HasZAxisTitle") >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue(u"HasZAxisTitle"_ustr) >>= bHasTitle; break; default: // xlValue: - pChart->mxDiagramPropertySet->getPropertyValue("HasYAxisTitle") >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue(u"HasYAxisTitle"_ustr) >>= bHasTitle; } } catch (const uno::Exception& e) @@ -289,7 +289,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("StepHelp", uno::Any(_fMinorUnit)); + mxPropertySet->setPropertyValue(u"StepHelp"_ustr, uno::Any(_fMinorUnit)); } catch (uno::Exception& ) { @@ -304,7 +304,7 @@ ScVbaAxis::getMinorUnit( ) try { if (isValueAxis()) - mxPropertySet->getPropertyValue("StepHelp") >>= fMinor; + mxPropertySet->getPropertyValue(u"StepHelp"_ustr) >>= fMinor; } catch (uno::Exception& ) { @@ -319,7 +319,7 @@ ScVbaAxis::setMinorUnitIsAuto( sal_Bool _bMinorUnitIsAuto ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("AutoStepHelp", uno::Any(_bMinorUnitIsAuto)); + mxPropertySet->setPropertyValue(u"AutoStepHelp"_ustr, uno::Any(_bMinorUnitIsAuto)); } catch (uno::Exception& ) { @@ -335,7 +335,7 @@ ScVbaAxis::getMinorUnitIsAuto( ) { if (isValueAxis()) { - mxPropertySet->getPropertyValue("AutoStepHelp") >>= bIsAuto; + mxPropertySet->getPropertyValue(u"AutoStepHelp"_ustr) >>= bIsAuto; } } catch (const uno::Exception&) @@ -365,7 +365,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("StepMain", uno::Any(_fMajorUnit)); + mxPropertySet->setPropertyValue(u"StepMain"_ustr, uno::Any(_fMajorUnit)); } } catch (const uno::Exception&) @@ -381,7 +381,7 @@ ScVbaAxis::getMajorUnit( ) try { if (isValueAxis()) - mxPropertySet->getPropertyValue("StepMain") >>= fMax; + mxPropertySet->getPropertyValue(u"StepMain"_ustr) >>= fMax; } catch (const uno::Exception&) { @@ -397,7 +397,7 @@ ScVbaAxis::setMajorUnitIsAuto( sal_Bool _bMajorUnitIsAuto ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("AutoStepMain", uno::Any( _bMajorUnitIsAuto )); + mxPropertySet->setPropertyValue(u"AutoStepMain"_ustr, uno::Any( _bMajorUnitIsAuto )); } } catch (const uno::Exception&) @@ -414,7 +414,7 @@ ScVbaAxis::getMajorUnitIsAuto( ) { if (isValueAxis()) { - mxPropertySet->getPropertyValue("AutoStepMain") >>= bIsAuto; + mxPropertySet->getPropertyValue(u"AutoStepMain"_ustr) >>= bIsAuto; } } catch (const uno::Exception&) @@ -431,7 +431,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue("Max", uno::Any(_fMaximumScale)); + mxPropertySet->setPropertyValue(u"Max"_ustr, uno::Any(_fMaximumScale)); } } catch (const uno::Exception&) @@ -448,7 +448,7 @@ ScVbaAxis::getMaximumScale( ) { if (isValueAxis()) { - mxPropertySet->getPropertyValue("Max") >>= fMax; + mxPropertySet->getPropertyValue(u"Max"_ustr) >>= fMax; } } catch (const uno::Exception&) @@ -465,7 +465,7 @@ ScVbaAxis::setMaximumScaleIsAuto( sal_Bool _bMaximumScaleIsAuto ) try { if ( isValueAxis() ) - mxPropertySet->setPropertyValue("AutoMax", uno::Any( _bMaximumScaleIsAuto )); + mxPropertySet->setPropertyValue(u"AutoMax"_ustr, uno::Any( _bMaximumScaleIsAuto )); } catch (const uno::Exception&) @@ -481,7 +481,7 @@ ScVbaAxis::getMaximumScaleIsAuto( ) try { if (isValueAxis()) - mxPropertySet->getPropertyValue("AutoMax") >>= bIsAuto; + mxPropertySet->getPropertyValue(u"AutoMax"_ustr) >>= bIsAuto; } catch (const uno::Exception&) { @@ -496,7 +496,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("Min", uno::Any( _fMinimumScale ) ); + mxPropertySet->setPropertyValue(u"Min"_ustr, uno::Any( _fMinimumScale ) ); } catch ( uno::Exception& ) { @@ -511,7 +511,7 @@ ScVbaAxis::getMinimumScale( ) try { if (isValueAxis()) - mxPropertySet->getPropertyValue("Min") >>= fMin; + mxPropertySet->getPropertyValue(u"Min"_ustr) >>= fMin; } catch (const uno::Exception& e) { @@ -527,7 +527,7 @@ ScVbaAxis::setMinimumScaleIsAuto( sal_Bool _bMinimumScaleIsAuto ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("AutoMin", uno::Any(_bMinimumScaleIsAuto)); + mxPropertySet->setPropertyValue(u"AutoMin"_ustr, uno::Any(_bMinimumScaleIsAuto)); } } catch (const uno::Exception&) @@ -544,7 +544,7 @@ ScVbaAxis::getMinimumScaleIsAuto( ) { if (isValueAxis()) { - mxPropertySet->getPropertyValue("AutoMin") >>= bIsAuto; + mxPropertySet->getPropertyValue(u"AutoMin"_ustr) >>= bIsAuto; } } catch (const uno::Exception&) @@ -570,10 +570,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) switch (_nScaleType) { case xlScaleLinear: - mxPropertySet->setPropertyValue("Logarithmic", uno::Any( false ) ); + mxPropertySet->setPropertyValue(u"Logarithmic"_ustr, uno::Any( false ) ); break; case xlScaleLogarithmic: - mxPropertySet->setPropertyValue("Logarithmic", uno::Any( true ) ); + mxPropertySet->setPropertyValue(u"Logarithmic"_ustr, uno::Any( true ) ); break; default: // According to MS the parameter is ignored and no Error is thrown @@ -596,7 +596,7 @@ ScVbaAxis::getScaleType( ) if (isValueAxis()) { bool bisLogarithmic = false; - mxPropertySet->getPropertyValue( "Logarithmic" ) >>= bisLogarithmic; + mxPropertySet->getPropertyValue( u"Logarithmic"_ustr ) >>= bisLogarithmic; if (bisLogarithmic) nScaleType = xlScaleLogarithmic; else @@ -648,7 +648,7 @@ void SAL_CALL ScVbaAxis::setLeft( double left ) OUString ScVbaAxis::getServiceImplName() { - return "ScVbaAxis"; + return u"ScVbaAxis"_ustr; } uno::Sequence< OUString > @@ -656,7 +656,7 @@ ScVbaAxis::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Axis" + u"ooo.vba.excel.Axis"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaaxistitle.cxx b/sc/source/ui/vba/vbaaxistitle.cxx index 5336ef7a763f..c35166cdc56c 100644 --- a/sc/source/ui/vba/vbaaxistitle.cxx +++ b/sc/source/ui/vba/vbaaxistitle.cxx @@ -29,7 +29,7 @@ ScVbaAxisTitle::ScVbaAxisTitle( const uno::Reference< XHelperInterface >& xParen OUString ScVbaAxisTitle::getServiceImplName() { - return "ScVbaAxisTitle"; + return u"ScVbaAxisTitle"_ustr; } uno::Sequence< OUString > @@ -37,7 +37,7 @@ ScVbaAxisTitle::getServiceNames() { static uno::Sequence< OUString > const aServiceNames = comphelper::concatSequences( AxisTitleBase::getServiceNames(), - uno::Sequence<OUString> { "ooo.vba.excel.AxisTitle" } ); + uno::Sequence<OUString> { u"ooo.vba.excel.AxisTitle"_ustr } ); return aServiceNames; } diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 157994adbcab..b57c2abd35c0 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -148,13 +148,13 @@ private: protected: virtual OUString getServiceImplName() override { - return "ScVbaBorder"; + return u"ScVbaBorder"_ustr; } virtual css::uno::Sequence<OUString> getServiceNames() override { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Border" + u"ooo.vba.excel.Border"_ustr }; return aServiceNames; } @@ -167,7 +167,7 @@ public: table::BorderLine aBorderLine; if ( getBorderLine( aBorderLine ) ) return uno::Any( OORGBToXLRGB( Color(ColorTransparency, aBorderLine.Color) ) ); - throw uno::RuntimeException("No Implementation available" ); + throw uno::RuntimeException(u"No Implementation available"_ustr ); } void SAL_CALL setColor( const uno::Any& _color ) override { @@ -175,7 +175,7 @@ public: _color >>= nColor; table::BorderLine aBorderLine; if ( !getBorderLine( aBorderLine ) ) - throw uno::RuntimeException("No Implementation available" ); + throw uno::RuntimeException(u"No Implementation available"_ustr ); aBorderLine.Color = XLRGBToOORGB( nColor ); setBorderLine( aBorderLine ); @@ -230,7 +230,7 @@ public: break; } } - throw uno::RuntimeException("Method failed" ); + throw uno::RuntimeException(u"Method failed"_ustr ); } void SAL_CALL setWeight( const uno::Any& _weight ) override { @@ -238,7 +238,7 @@ public: _weight >>= nWeight; table::BorderLine aBorderLine; if ( !getBorderLine( aBorderLine ) ) - throw uno::RuntimeException("Method failed" ); + throw uno::RuntimeException(u"Method failed"_ustr ); switch ( nWeight ) { @@ -255,7 +255,7 @@ public: aBorderLine.OuterLineWidth = OOLineHairline; break; default: - throw uno::RuntimeException("Bad param" ); + throw uno::RuntimeException(u"Bad param"_ustr ); } setBorderLine( aBorderLine ); @@ -284,7 +284,7 @@ public: _linestyle >>= nLineStyle; table::BorderLine aBorderLine; if ( !getBorderLine( aBorderLine ) ) - throw uno::RuntimeException("Method failed" ); + throw uno::RuntimeException(u"Method failed"_ustr ); switch ( nLineStyle ) { @@ -298,7 +298,7 @@ public: case XlLineStyle::xlSlantDashDot: break; default: - throw uno::RuntimeException("Bad param" ); + throw uno::RuntimeException(u"Bad param"_ustr ); } setBorderLine( aBorderLine ); @@ -576,7 +576,7 @@ void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight ) OUString ScVbaBorders::getServiceImplName() { - return "ScVbaBorders"; + return u"ScVbaBorders"_ustr; } uno::Sequence< OUString > @@ -584,7 +584,7 @@ ScVbaBorders::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Borders" + u"ooo.vba.excel.Borders"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 087bfbd1aaa7..e41a42551404 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -98,7 +98,7 @@ void SAL_CALL ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) { // #TODO #FIXME needs implementation, or can't be done? - throw uno::RuntimeException("Not Implemented" ); + throw uno::RuntimeException(u"Not Implemented"_ustr ); } // Methods @@ -119,7 +119,7 @@ ScVbaCharacters::Delete( ) OUString ScVbaCharacters::getServiceImplName() { - return "ScVbaCharacters"; + return u"ScVbaCharacters"_ustr; } uno::Sequence< OUString > @@ -127,7 +127,7 @@ ScVbaCharacters::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Characters" + u"ooo.vba.excel.Characters"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index d4cf3a0e1e89..f915dc47e343 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -264,7 +264,7 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - setDiagram( "com.sun.star.chart.BarDiagram"); + setDiagram( u"com.sun.star.chart.BarDiagram"_ustr); break; case xlLine: case xl3DLine: @@ -273,7 +273,7 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlLineMarkers: case xlLineMarkersStacked: case xlLineMarkersStacked100: - setDiagram( "com.sun.star.chart.LineDiagram"); + setDiagram( u"com.sun.star.chart.LineDiagram"_ustr); break; case xl3DArea: case xlArea: @@ -281,17 +281,17 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlAreaStacked100: case xl3DAreaStacked: case xl3DAreaStacked100: - setDiagram( "com.sun.star.chart.AreaDiagram" ); + setDiagram( u"com.sun.star.chart.AreaDiagram"_ustr ); break; case xlDoughnut: case xlDoughnutExploded: - setDiagram( "com.sun.star.chart.DonutDiagram" ); + setDiagram( u"com.sun.star.chart.DonutDiagram"_ustr ); break; case xlStockHLC: case xlStockOHLC: case xlStockVHLC: case xlStockVOHLC: - setDiagram( "com.sun.star.chart.StockDiagram"); + setDiagram( u"com.sun.star.chart.StockDiagram"_ustr); mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::Any((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); mxDiagramPropertySet->setPropertyValue( VOLUME, uno::Any((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); break; @@ -302,13 +302,13 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xl3DPie: case xlPie: case xlBarOfPie: // not possible (Zoom pie) - setDiagram( "com.sun.star.chart.PieDiagram"); + setDiagram( u"com.sun.star.chart.PieDiagram"_ustr); break; case xlRadar: case xlRadarMarkers: case xlRadarFilled: - setDiagram( "com.sun.star.chart.NetDiagram"); + setDiagram( u"com.sun.star.chart.NetDiagram"_ustr); break; case xlXYScatter: case xlBubble: // not possible @@ -317,7 +317,7 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlXYScatterLinesNoMarkers: case xlXYScatterSmooth: case xlXYScatterSmoothNoMarkers: - setDiagram( "com.sun.star.chart.XYDiagram"); + setDiagram( u"com.sun.star.chart.XYDiagram"_ustr); switch(_nChartType) { case xlXYScatter: @@ -554,7 +554,7 @@ ScVbaChart::Activate() uno::Reference< XHelperInterface > xParent( getParent() ); ScVbaChartObject* pChartObj = static_cast< ScVbaChartObject* >( xParent.get() ); if ( !pChartObj ) - throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), "no ChartObject as parent" ); + throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), u"no ChartObject as parent"_ustr ); pChartObj->Activate(); @@ -1041,7 +1041,7 @@ ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) OUString ScVbaChart::getServiceImplName() { - return "ScVbaChart"; + return u"ScVbaChart"_ustr; } uno::Sequence< OUString > @@ -1049,7 +1049,7 @@ ScVbaChart::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Chart" + u"ooo.vba.excel.Chart"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 0395da35e06d..7bb526f618ae 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -99,7 +99,7 @@ ScVbaChartObject::Delete() uno::Reference< excel::XChartObjects > xColl( xParent->ChartObjects( uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaChartObjects* pChartObjectsImpl = static_cast< ScVbaChartObjects* >( xColl.get() ); if (!pChartObjectsImpl) - throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), "Parent is not ChartObjects" ); + throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), u"Parent is not ChartObjects"_ustr ); pChartObjectsImpl->removeByName( getPersistName() ); @@ -119,7 +119,7 @@ ScVbaChartObject::Activate() } catch (uno::Exception& ) { - throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), "ChartObject Activate internal error" ); + throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), u"ChartObject Activate internal error"_ustr ); } } @@ -132,7 +132,7 @@ ScVbaChartObject::getChart() OUString ScVbaChartObject::getServiceImplName() { - return "ScVbaChartObject"; + return u"ScVbaChartObject"_ustr; } uno::Sequence< OUString > @@ -140,7 +140,7 @@ ScVbaChartObject::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.ChartObject" + u"ooo.vba.excel.ChartObject"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 3cc7788bb823..7d7d95a85ae4 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -74,7 +74,7 @@ public: { css::uno::Any anyEx(cppu::getCaughtException()); throw lang::WrappedTargetException( - "Error creating ScVbaChartObject!", + u"Error creating ScVbaChartObject!"_ustr, getXWeak(), anyEx ); } @@ -106,10 +106,10 @@ ScVbaChartObjects::getChartObjectNames() const ScCellRangesBase* pUno = dynamic_cast< ScCellRangesBase* >( xIf.get() ); ScDocShell* pDocShell = nullptr; if ( !pUno ) - throw uno::RuntimeException("Failed to obtain the impl class from the drawpage" ); + throw uno::RuntimeException(u"Failed to obtain the impl class from the drawpage"_ustr ); pDocShell = pUno->GetDocShell(); if ( !pDocShell ) - throw uno::RuntimeException("Failed to obtain the docshell implclass" ); + throw uno::RuntimeException(u"Failed to obtain the docshell implclass"_ustr ); uno::Reference< sheet::XSpreadsheets > xSpreadsheets = pDocShell->GetModel()->getSheets(); std::vector< OUString > aChartNamesVector; @@ -143,7 +143,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 - OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), "Chart " , std::u16string_view(), 1); + OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), u"Chart "_ustr , std::u16string_view(), 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); @@ -191,7 +191,7 @@ ScVbaChartObjects::createCollectionObject( const css::uno::Any& aSource ) OUString ScVbaChartObjects::getServiceImplName() { - return "ScVbaChartObjects"; + return u"ScVbaChartObjects"_ustr; } css::uno::Sequence<OUString> @@ -199,7 +199,7 @@ ScVbaChartObjects::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.excel.ChartObjects" + u"ooo.vba.excel.ChartObjects"_ustr }; return sNames; } diff --git a/sc/source/ui/vba/vbacharttitle.cxx b/sc/source/ui/vba/vbacharttitle.cxx index 2e881fd61919..93a9acdca82f 100644 --- a/sc/source/ui/vba/vbacharttitle.cxx +++ b/sc/source/ui/vba/vbacharttitle.cxx @@ -29,7 +29,7 @@ ScVbaChartTitle::ScVbaChartTitle( const uno::Reference< XHelperInterface >& xPar OUString ScVbaChartTitle::getServiceImplName() { - return "ScVbaChartTitle"; + return u"ScVbaChartTitle"_ustr; } uno::Sequence< OUString > @@ -37,7 +37,7 @@ ScVbaChartTitle::getServiceNames() { static uno::Sequence< OUString > const aServiceNames = comphelper::concatSequences( ChartTitleBase::getServiceNames(), - uno::Sequence< OUString > { "ooo.vba.excel.Chart" } ); + uno::Sequence< OUString > { u"ooo.vba.excel.Chart"_ustr } ); return aServiceNames; } diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx index a9b1cf7c47f2..121b5d8568c2 100644 --- a/sc/source/ui/vba/vbacomment.cxx +++ b/sc/source/ui/vba/vbacomment.cxx @@ -50,7 +50,7 @@ ScVbaComment::ScVbaComment( mxRange( xRange ) { if ( !xRange.is() ) - throw lang::IllegalArgumentException("range is not set ", uno::Reference< uno::XInterface >() , 1 ); + throw lang::IllegalArgumentException(u"range is not set "_ustr, uno::Reference< uno::XInterface >() , 1 ); getAnnotation(); } @@ -203,7 +203,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("ScVbaComment::Text - bad Start value " ); + throw uno::RuntimeException(u"ScVbaComment::Text - bad Start value "_ustr ); } else if ( aText.hasValue() ) { @@ -218,7 +218,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An OUString ScVbaComment::getServiceImplName() { - return "ScVbaComment"; + return u"ScVbaComment"_ustr; } uno::Sequence< OUString > @@ -226,7 +226,7 @@ ScVbaComment::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.ScVbaComment" + u"ooo.vba.excel.ScVbaComment"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index 470e468b7189..f28246512750 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -97,7 +97,7 @@ ScVbaComments::getElementType() OUString ScVbaComments::getServiceImplName() { - return "ScVbaComments"; + return u"ScVbaComments"_ustr; } css::uno::Sequence<OUString> @@ -105,7 +105,7 @@ ScVbaComments::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.excel.Comments" + u"ooo.vba.excel.Comments"_ustr }; return sNames; } diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx index 5537c65a3caf..937039b448b0 100644 --- a/sc/source/ui/vba/vbadialog.cxx +++ b/sc/source/ui/vba/vbadialog.cxx @@ -70,7 +70,7 @@ ScVbaDialog::mapIndexToName( sal_Int32 nIndex ) OUString ScVbaDialog::getServiceImplName() { - return "ScVbaDialog"; + return u"ScVbaDialog"_ustr; } uno::Sequence< OUString > @@ -78,7 +78,7 @@ ScVbaDialog::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Dialog" + u"ooo.vba.excel.Dialog"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbadialogs.cxx b/sc/source/ui/vba/vbadialogs.cxx index 9264728a282b..066e72055d6e 100644 --- a/sc/source/ui/vba/vbadialogs.cxx +++ b/sc/source/ui/vba/vbadialogs.cxx @@ -35,7 +35,7 @@ ScVbaDialogs::Item( const uno::Any &aItem ) OUString ScVbaDialogs::getServiceImplName() { - return "ScVbaDialogs"; + return u"ScVbaDialogs"_ustr; } uno::Sequence< OUString > @@ -43,7 +43,7 @@ ScVbaDialogs::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Dialogs" + u"ooo.vba.excel.Dialogs"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 9cfb3ab31b08..f9544e1f3c20 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -621,12 +621,12 @@ void SAL_CALL ScVbaEventsHelper::notifyEvent( const css::document::EventObject& OUString ScVbaEventsHelper::getImplementationName() { - return "ScVbaEventsHelper"; + return u"ScVbaEventsHelper"_ustr; } css::uno::Sequence<OUString> ScVbaEventsHelper::getSupportedServiceNames() { - return {"com.sun.star.script.vba.VBASpreadsheetEventProcessor"}; + return {u"com.sun.star.script.vba.VBASpreadsheetEventProcessor"_ustr}; } // protected ------------------------------------------------------------------ @@ -658,7 +658,7 @@ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, rEventQueue.emplace_back(WORKBOOK_ACTIVATE ); uno::Sequence< uno::Any > aArgs{ uno::Any(mxModel->getCurrentController()) }; rEventQueue.emplace_back( WORKBOOK_WINDOWACTIVATE, aArgs ); - if (!hasModule("Auto_Open")) + if (!hasModule(u"Auto_Open"_ustr)) rEventQueue.emplace_back(AUTO_OPEN ); // remember initial selection maOldSelection <<= mxModel->getCurrentSelection(); @@ -779,7 +779,7 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& rEventQueue, case WORKBOOK_BEFORECLOSE: /* Execute Auto_Close only if not cancelled by event handler, but before UI asks user whether to cancel closing the document. */ - if (!bCancel && !hasModule("Auto_Close")) + if (!bCancel && !hasModule(u"Auto_Close"_ustr)) rEventQueue.emplace_back(AUTO_CLOSE ); break; } diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx index f7f31db2a579..9bef15a2609e 100644 --- a/sc/source/ui/vba/vbafiledialog.cxx +++ b/sc/source/ui/vba/vbafiledialog.cxx @@ -35,7 +35,7 @@ using namespace ::ooo::vba; ScVbaFileDialog::ScVbaFileDialog( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const sal_Int32 nType ) : ScVbaFileDialog_BASE( xParent, xContext) , m_nType(nType) - , m_sTitle("FileDialog") + , m_sTitle(u"FileDialog"_ustr) , m_bMultiSelectMode(false) {} @@ -158,7 +158,7 @@ sal_Int32 ScVbaFileDialog::Show() OUString ScVbaFileDialog::getServiceImplName() { - return "ScVbaFileDialog"; + return u"ScVbaFileDialog"_ustr; } uno::Sequence<OUString> @@ -166,7 +166,7 @@ ScVbaFileDialog::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.FileDialog" + u"ooo.vba.FileDialog"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbafiledialogitems.cxx b/sc/source/ui/vba/vbafiledialogitems.cxx index d34ace3c55e3..8737ec4e8383 100644 --- a/sc/source/ui/vba/vbafiledialogitems.cxx +++ b/sc/source/ui/vba/vbafiledialogitems.cxx @@ -73,9 +73,9 @@ ScVbaFileDialogSelectedItems::createCollectionObject( const uno::Any& aSource ) { sal_Int32 nPosition = -1; if (!(aSource >>= nPosition)) - throw uno::RuntimeException("not an sal_Int32"); + throw uno::RuntimeException(u"not an sal_Int32"_ustr); if (nPosition < 0 || o3tl::make_unsigned(nPosition) >= m_sItems.size()) - throw uno::RuntimeException("out of range"); + throw uno::RuntimeException(u"out of range"_ustr); OUString sPath = m_sItems[nPosition]; return uno::Any( sPath ); @@ -107,7 +107,7 @@ sal_Int32 ScVbaFileDialogSelectedItems::getCount() OUString ScVbaFileDialogSelectedItems::getServiceImplName() { - return "ScVbaFileDialogSelectedItems"; + return u"ScVbaFileDialogSelectedItems"_ustr; } uno::Sequence<OUString> @@ -115,7 +115,7 @@ ScVbaFileDialogSelectedItems::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.FileDialogSelectedItems" + u"ooo.vba.FileDialogSelectedItems"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 815a077efc9e..07b577268c02 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -98,14 +98,14 @@ ScVbaFont::setStandardFontSize( const uno::Any& /*aValue*/ ) //XXX #TODO# #FIXME# //mxFont->setPropertyValue("CharSize", ( uno::Any )fValue ); throw uno::RuntimeException( - "setStandardFontSize not supported" ); + u"setStandardFontSize not supported"_ustr ); } uno::Any SAL_CALL ScVbaFont::getStandardFontSize() { //XXX #TODO# #FIXME# - throw uno::RuntimeException( "getStandardFontSize not supported" ); + throw uno::RuntimeException( u"getStandardFontSize not supported"_ustr ); // return uno::Any(); } @@ -113,14 +113,14 @@ void SAL_CALL ScVbaFont::setStandardFont( const uno::Any& /*aValue*/ ) { //XXX #TODO# #FIXME# - throw uno::RuntimeException("setStandardFont not supported" ); + throw uno::RuntimeException(u"setStandardFont not supported"_ustr ); } uno::Any SAL_CALL ScVbaFont::getStandardFont() { //XXX #TODO# #FIXME# - throw uno::RuntimeException("getStandardFont not supported"); + throw uno::RuntimeException(u"getStandardFont not supported"_ustr); // return uno::Any(); } @@ -212,10 +212,10 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) nValue = awt::FontUnderline::DOUBLE; break; default: - throw uno::RuntimeException("Unknown value for Underline" ); + throw uno::RuntimeException(u"Unknown value for Underline"_ustr ); } - mxFont->setPropertyValue("CharUnderline", uno::Any(nValue) ); + mxFont->setPropertyValue(u"CharUnderline"_ustr, uno::Any(nValue) ); } @@ -231,7 +231,7 @@ ScVbaFont::getUnderline() if(mbFormControl) return uno::Any( nValue ); - mxFont->getPropertyValue("CharUnderline") >>= nValue; + mxFont->getPropertyValue(u"CharUnderline"_ustr) >>= nValue; switch ( nValue ) { case awt::FontUnderline::DOUBLE: @@ -244,7 +244,7 @@ ScVbaFont::getUnderline() nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone; break; default: - throw uno::RuntimeException("Unknown value retrieved for Underline" ); + throw uno::RuntimeException(u"Unknown value retrieved for Underline"_ustr ); } return uno::Any( nValue ); @@ -290,7 +290,7 @@ uno::Any ScVbaFont::getColor() { // #TODO #FIXME - behave like getXXX above ( wrt. GetDataSet ) - uno::Any aAny = OORGBToXLRGB( mxFont->getPropertyValue("CharColor") ); + uno::Any aAny = OORGBToXLRGB( mxFont->getPropertyValue(u"CharColor"_ustr) ); return aAny; } @@ -298,7 +298,7 @@ void SAL_CALL ScVbaFont::setOutlineFont( const uno::Any& aValue ) { if(!mbFormControl) - mxFont->setPropertyValue("CharContoured", aValue ); + mxFont->setPropertyValue(u"CharContoured"_ustr, aValue ); } uno::Any SAL_CALL @@ -307,13 +307,13 @@ ScVbaFont::getOutlineFont() if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR) == SfxItemState::INVALID ) return aNULL(); - return mbFormControl ? uno::Any( false ) : mxFont->getPropertyValue("CharContoured"); + return mbFormControl ? uno::Any( false ) : mxFont->getPropertyValue(u"CharContoured"_ustr); } OUString ScVbaFont::getServiceImplName() { - return "ScVbaFont"; + return u"ScVbaFont"_ustr; } uno::Sequence< OUString > @@ -321,7 +321,7 @@ ScVbaFont::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Font" + u"ooo.vba.excel.Font"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index c99d34879050..2a0aea444fe9 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -64,7 +64,7 @@ ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xP uno::Reference< frame::XModel > xModel, bool bCheckAmbiguoity ) : ScVbaFormat_BASE( xParent, xContext ), - m_aDefaultLocale( "en", "US", OUString() ), + m_aDefaultLocale( u"en"_ustr, u"US"_ustr, OUString() ), mxPropertySet(std::move( _xPropertySet )), mxModel(std::move( xModel )), mbCheckAmbiguoity( bCheckAmbiguoity ), @@ -805,7 +805,7 @@ ScVbaFormat< Ifc... >::getCurrentDataSet() { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() ); if ( !pDataSet ) - throw uno::RuntimeException("Can't access Itemset for XPropertySet" ); + throw uno::RuntimeException(u"Can't access Itemset for XPropertySet"_ustr ); return pDataSet; } diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index 8c2b80238a76..7c752d98d37b 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -142,7 +142,7 @@ ScVbaFormatCondition::notifyRange() OUString ScVbaFormatCondition::getServiceImplName() { - return "ScVbaFormatCondition"; + return u"ScVbaFormatCondition"_ustr; } uno::Sequence< OUString > @@ -150,7 +150,7 @@ ScVbaFormatCondition::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.FormatCondition" + u"ooo.vba.excel.FormatCondition"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index a6c3ae4125e8..64f82e003610 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -168,17 +168,17 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons else aValue <<= ScVbaFormatCondition::retrieveAPIOperator(_aOperator); - beans::PropertyValue aProperty( "Operator", 0, aValue, beans::PropertyState_DIRECT_VALUE ); + beans::PropertyValue aProperty( u"Operator"_ustr, 0, aValue, beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProperty ); if ( _aFormula1.hasValue() ) { - beans::PropertyValue aProp( "Formula1", 0, uno::Any( getA1Formula( _aFormula1 ) ), beans::PropertyState_DIRECT_VALUE ); + beans::PropertyValue aProp( u"Formula1"_ustr, 0, uno::Any( getA1Formula( _aFormula1 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } if ( _aFormula2.hasValue() ) { - beans::PropertyValue aProp( "Formula2", 0, uno::Any( getA1Formula( _aFormula2 ) ), beans::PropertyState_DIRECT_VALUE ); + beans::PropertyValue aProp( u"Formula2"_ustr, 0, uno::Any( getA1Formula( _aFormula2 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } aProperty.Name = "StyleName"; @@ -239,7 +239,7 @@ ScVbaFormatConditions::getStyleName() if ( !pStyles ) DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, {} ); uno::Sequence< OUString > sCellStyleNames = pStyles->getStyleNames(); - return ContainerUtilities::getUniqueName(sCellStyleNames, "Excel_CondFormat", u"_"); + return ContainerUtilities::getUniqueName(sCellStyleNames, u"Excel_CondFormat"_ustr, u"_"); } void @@ -274,7 +274,7 @@ ScVbaFormatConditions::removeFormatCondition( const OUString& _sStyleName, bool OUString ScVbaFormatConditions::getServiceImplName() { - return "ScVbaFormatConditions"; + return u"ScVbaFormatConditions"_ustr; } uno::Sequence< OUString > @@ -282,7 +282,7 @@ ScVbaFormatConditions::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.FormatConditions" + u"ooo.vba.excel.FormatConditions"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx index 734553d50db8..9fec0ccba8fd 100644 --- a/sc/source/ui/vba/vbaglobals.cxx +++ b/sc/source/ui/vba/vbaglobals.cxx @@ -205,7 +205,7 @@ ScVbaGlobals::getDebug() { uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithContext( - "ooo.vba.Debug", mxContext ); + u"ooo.vba.Debug"_ustr, mxContext ); return uno::Any( xVBADebug ); } catch( uno::Exception& ) @@ -227,13 +227,13 @@ ScVbaGlobals::getAvailableServiceNames( ) ScVbaGlobals_BASE::getAvailableServiceNames(), uno::Sequence< OUString > { - "ooo.vba.excel.Range", - "ooo.vba.excel.Workbook", - "ooo.vba.excel.Window", - "ooo.vba.excel.Worksheet", - "ooo.vba.excel.Application", - "ooo.vba.excel.Hyperlink", - "com.sun.star.script.vba.VBASpreadsheetEventProcessor" + u"ooo.vba.excel.Range"_ustr, + u"ooo.vba.excel.Workbook"_ustr, + u"ooo.vba.excel.Window"_ustr, + u"ooo.vba.excel.Worksheet"_ustr, + u"ooo.vba.excel.Application"_ustr, + u"ooo.vba.excel.Hyperlink"_ustr, + u"com.sun.star.script.vba.VBASpreadsheetEventProcessor"_ustr } ); return serviceNames; } @@ -241,7 +241,7 @@ ScVbaGlobals::getAvailableServiceNames( ) OUString ScVbaGlobals::getServiceImplName() { - return "ScVbaGlobals"; + return u"ScVbaGlobals"_ustr; } uno::Sequence< OUString > @@ -249,7 +249,7 @@ ScVbaGlobals::getServiceNames() { static uno::Sequence< OUString > aServiceNames { - "ooo.vba.excel.Globals" + u"ooo.vba.excel.Globals"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index 17190b9cf62d..852910adc667 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("Cannot get address" ); + throw uno::RuntimeException(u"Cannot get address"_ustr ); 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("com.sun.star.text.TextField.URL"), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xUrlField( xFactory->createInstance(u"com.sun.star.text.TextField.URL"_ustr), uno::UNO_QUERY_THROW ); mxTextField.set( xUrlField, uno::UNO_QUERY_THROW ); setUrlComponents( aUrlComp ); setTextToDisplay( aTextToDisplay ); @@ -155,14 +155,14 @@ OUString ScVbaHyperlink::getTextToDisplay() { ensureTextField(); OUString aTextToDisplay; - mxTextField->getPropertyValue("Representation") >>= aTextToDisplay; + mxTextField->getPropertyValue(u"Representation"_ustr) >>= aTextToDisplay; return aTextToDisplay; } void ScVbaHyperlink::setTextToDisplay( const OUString& rTextToDisplay ) { ensureTextField(); - mxTextField->setPropertyValue("Representation", uno::Any( rTextToDisplay ) ); + mxTextField->setPropertyValue(u"Representation"_ustr, uno::Any( rTextToDisplay ) ); } sal_Int32 SAL_CALL ScVbaHyperlink::getType() @@ -195,7 +195,7 @@ uno::Reference< msforms::XShape > SAL_CALL ScVbaHyperlink::getShape() return uno::Reference< msforms::XShape >( getParent(), uno::UNO_QUERY_THROW ); } -VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaHyperlink, "ooo.vba.excel.Hyperlink" ) +VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaHyperlink, u"ooo.vba.excel.Hyperlink"_ustr ) // private -------------------------------------------------------------------- @@ -209,7 +209,7 @@ ScVbaHyperlink::UrlComponents ScVbaHyperlink::getUrlComponents() { ensureTextField(); OUString aUrl; - mxTextField->getPropertyValue("URL") >>= aUrl; + mxTextField->getPropertyValue(u"URL"_ustr) >>= aUrl; sal_Int32 nHashPos = aUrl.indexOf( '#' ); if( nHashPos < 0 ) return UrlComponents( aUrl, OUString() ); @@ -222,7 +222,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) OUStringBuffer aUrl( rUrlComp.first ); if( !rUrlComp.second.isEmpty() ) aUrl.append( "#" + rUrlComp.second ); - mxTextField->setPropertyValue("URL", uno::Any( aUrl.makeStringAndClear() ) ); + mxTextField->setPropertyValue(u"URL"_ustr, uno::Any( aUrl.makeStringAndClear() ) ); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index d309f5f44ec1..6b748a6cdc28 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -39,7 +39,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("Empty range objects" ); + throw uno::RuntimeException(u"Empty range objects"_ustr ); for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex ) if( !rScOuter.Contains( rScInner[ nIndex ] ) ) @@ -272,6 +272,6 @@ uno::Any ScVbaHyperlinks::createCollectionObject( const uno::Any& rSource ) // XHelperInterface ----------------------------------------------------------- -VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaHyperlinks, "ooo.vba.excel.Hyperlinks" ) +VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaHyperlinks, u"ooo.vba.excel.Hyperlinks"_ustr ) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index ce94c893ad07..b83b80097c4c 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -72,7 +72,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, m_aPattColor = Color(0); m_nPattern = 0; if ( !m_xProps.is() ) - throw lang::IllegalArgumentException("properties", uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException(u"properties"_ustr, uno::Reference< uno::XInterface >(), 2 ); } uno::Any @@ -238,7 +238,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("UserDefinedAttributes"), uno::UNO_QUERY_THROW ); + return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue(u"UserDefinedAttributes"_ustr), uno::UNO_QUERY_THROW ); } sal_Int32 ScVbaInterior::GetAttributeData( uno::Any const & aValue ) @@ -277,7 +277,7 @@ ScVbaInterior::SetUserDefinedAttributes( const OUString& sName, const uno::Any& if( xNameContainer->hasByName( sName ) ) xNameContainer->removeByName( sName ); xNameContainer->insertByName( sName, aValue ); - m_xProps->setPropertyValue("UserDefinedAttributes", uno::Any( xNameContainer ) ); + m_xProps->setPropertyValue(u"UserDefinedAttributes"_ustr, uno::Any( xNameContainer ) ); } } // OOo do not support below API @@ -294,7 +294,7 @@ void SAL_CALL ScVbaInterior::setPattern( const uno::Any& _pattern ) { if( !(_pattern >>= m_nPattern) ) - throw uno::RuntimeException("Invalid Pattern index" ); + throw uno::RuntimeException(u"Invalid Pattern index"_ustr ); SetUserDefinedAttributes( PATTERN, SetAttributeData( m_nPattern ) ); SetMixedColor(); @@ -340,7 +340,7 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) { sal_Int32 nPattColor = 0; if( !(_patterncolor >>= nPattColor) ) - throw uno::RuntimeException("Invalid Pattern Color" ); + throw uno::RuntimeException(u"Invalid Pattern Color"_ustr ); SetUserDefinedAttributes( PATTERNCOLOR, SetAttributeData( XLRGBToOORGB( nPattColor ) ) ); SetMixedColor(); @@ -359,7 +359,7 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) { sal_Int32 nColorIndex = 0; if( !(_patterncolorindex >>= nColorIndex) ) - throw uno::RuntimeException("Invalid Pattern Color" ); + throw uno::RuntimeException(u"Invalid Pattern Color"_ustr ); if( nColorIndex == 0 ) return; @@ -405,7 +405,7 @@ void SAL_CALL ScVbaInterior::setPatternTintAndShade(const uno::Any& /*rAny*/) OUString ScVbaInterior::getServiceImplName() { - return "ScVbaInterior"; + return u"ScVbaInterior"_ustr; } uno::Sequence< OUString > @@ -413,7 +413,7 @@ ScVbaInterior::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Interior" + u"ooo.vba.excel.Interior"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index d2bac36933f4..831674120976 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -52,7 +52,7 @@ ScVbaMenu::MenuItems( const uno::Any& aIndex ) OUString ScVbaMenu::getServiceImplName() { - return "ScVbaMenu"; + return u"ScVbaMenu"_ustr; } uno::Sequence<OUString> @@ -60,7 +60,7 @@ ScVbaMenu::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Menu" + u"ooo.vba.excel.Menu"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx index 50f69fdbf6b2..994f1cc5e20c 100644 --- a/sc/source/ui/vba/vbamenubar.cxx +++ b/sc/source/ui/vba/vbamenubar.cxx @@ -33,7 +33,7 @@ ScVbaMenuBar::Menus( const uno::Any& aIndex ) OUString ScVbaMenuBar::getServiceImplName() { - return "ScVbaMenuBar"; + return u"ScVbaMenuBar"_ustr; } uno::Sequence<OUString> @@ -41,7 +41,7 @@ ScVbaMenuBar::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.MenuBar" + u"ooo.vba.excel.MenuBar"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 57f66644fcd6..a6df4695497f 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -90,20 +90,20 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) if( nIndex == excel::XlSheetType::xlWorksheet ) { uno::Any aSource; - aSource <<= OUString( "Worksheet Menu Bar" ); + aSource <<= u"Worksheet Menu Bar"_ustr; 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::Any( xMenuBar ); } - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } // XHelperInterface OUString ScVbaMenuBars::getServiceImplName() { - return "ScVbaMenuBars"; + return u"ScVbaMenuBars"_ustr; } uno::Sequence<OUString> @@ -111,7 +111,7 @@ ScVbaMenuBars::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.MenuBars" + u"ooo.vba.excel.MenuBars"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenuitem.cxx b/sc/source/ui/vba/vbamenuitem.cxx index 522db66b097c..fb58f209aadb 100644 --- a/sc/source/ui/vba/vbamenuitem.cxx +++ b/sc/source/ui/vba/vbamenuitem.cxx @@ -50,7 +50,7 @@ ScVbaMenuItem::Delete( ) OUString ScVbaMenuItem::getServiceImplName() { - return "ScVbaMenuItem"; + return u"ScVbaMenuItem"_ustr; } uno::Sequence<OUString> @@ -58,7 +58,7 @@ ScVbaMenuItem::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.MenuItem" + u"ooo.vba.excel.MenuItem"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index 10d6fc33e046..37dcc4b25eb3 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -123,7 +123,7 @@ uno::Reference< excel::XMenuItem > SAL_CALL ScVbaMenuItems::Add( const OUString& OUString ScVbaMenuItems::getServiceImplName() { - return "ScVbaMenuItems"; + return u"ScVbaMenuItems"_ustr; } uno::Sequence<OUString> @@ -131,7 +131,7 @@ ScVbaMenuItems::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.MenuItems" + u"ooo.vba.excel.MenuItems"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index b9b2c08fa0f2..d4be37a782d1 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -109,7 +109,7 @@ uno::Reference< excel::XMenu > SAL_CALL ScVbaMenus::Add( const OUString& Caption OUString ScVbaMenus::getServiceImplName() { - return "ScVbaMenus"; + return u"ScVbaMenus"_ustr; } uno::Sequence<OUString> @@ -117,7 +117,7 @@ ScVbaMenus::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Menus" + u"ooo.vba.excel.Menus"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 98a242401e7d..8eb3357e746c 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -203,7 +203,7 @@ ScVbaName::Delete() OUString ScVbaName::getServiceImplName() { - return "ScVbaName"; + return u"ScVbaName"_ustr; } uno::Sequence< OUString > @@ -211,7 +211,7 @@ ScVbaName::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Name" + u"ooo.vba.excel.Name"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 074cfe60d647..4e316e83f481 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -79,7 +79,7 @@ ScVbaNames::getScDocument() uno::Reference< frame::XModel > xModel( getModel() , uno::UNO_SET_THROW ); ScTabViewShell * pTabViewShell = excel::getBestViewShell( xModel ); if ( !pTabViewShell ) - throw uno::RuntimeException( "No ViewShell available" ); + throw uno::RuntimeException( u"No ViewShell available"_ustr ); ScViewData& rViewData = pTabViewShell->GetViewData(); return rViewData.GetDocument(); } @@ -113,7 +113,7 @@ ScVbaNames::Add( const css::uno::Any& Name , sName = sName.copy(nIndex+1); if (ScRangeData::IsNameValid(sName, getScDocument()) != ScRangeData::IsNameValidType::NAME_VALID) - throw uno::RuntimeException( "This Name is not valid ." ); + throw uno::RuntimeException( u"This Name is not valid ."_ustr ); } } uno::Reference< table::XCellRange > xUnoRange; @@ -245,7 +245,7 @@ ScVbaNames::createCollectionObject( const uno::Any& aSource ) OUString ScVbaNames::getServiceImplName() { - return "ScVbaNames"; + return u"ScVbaNames"_ustr; } css::uno::Sequence<OUString> @@ -253,7 +253,7 @@ ScVbaNames::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.NamedRanges" + u"ooo.vba.excel.NamedRanges"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx index f2cd5de40f8b..bfd981ba7922 100644 --- a/sc/source/ui/vba/vbaoleobject.cxx +++ b/sc/source/ui/vba/vbaoleobject.cxx @@ -38,7 +38,7 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW ); uno::Reference<frame::XModel> xModel( xChild->getParent(), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext(u"ooo.vba.ControlProvider"_ustr, mxContext ), uno::UNO_QUERY_THROW ); m_xControl.set( xControlProvider->createControl( xControlShape, xModel ) ); } @@ -134,7 +134,7 @@ void SAL_CALL ScVbaOLEObject::setLinkedCell( const OUString& _linkedcell ) OUString ScVbaOLEObject::getServiceImplName() { - return "ScVbaOLEObject"; + return u"ScVbaOLEObject"_ustr; } uno::Sequence< OUString > @@ -142,7 +142,7 @@ ScVbaOLEObject::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.OLEObject" + u"ooo.vba.excel.OLEObject"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 06b576f26f61..b7b85bbb03ce 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -169,7 +169,7 @@ ScVbaOLEObjects::getElementType() OUString ScVbaOLEObjects::getServiceImplName() { - return "ScVbaOLEObjects"; + return u"ScVbaOLEObjects"_ustr; } uno::Sequence< OUString > @@ -177,7 +177,7 @@ ScVbaOLEObjects::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.OLEObjects" + u"ooo.vba.excel.OLEObjects"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx index 60bc12921b4d..a8e6dba877ae 100644 --- a/sc/source/ui/vba/vbaoutline.cxx +++ b/sc/source/ui/vba/vbaoutline.cxx @@ -42,7 +42,7 @@ ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevel OUString ScVbaOutline::getServiceImplName() { - return "ScVbaOutline"; + return u"ScVbaOutline"_ustr; } uno::Sequence< OUString > @@ -50,7 +50,7 @@ ScVbaOutline::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.Outline" + u"ooo.vba.excel.Outline"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 2b7d3ff4a605..e9adbde14623 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -41,7 +41,7 @@ ScVbaPageBreak< Ifc... >::ScVbaPageBreak( const uno::Reference< XHelperInterface template< typename... Ifc > sal_Int32 ScVbaPageBreak< Ifc... >::getType() { - uno::Any aValue = mxRowColPropertySet->getPropertyValue("IsStartOfNewPage"); + uno::Any aValue = mxRowColPropertySet->getPropertyValue(u"IsStartOfNewPage"_ustr); bool hasPageBreak = false; aValue >>= hasPageBreak; @@ -66,11 +66,11 @@ void ScVbaPageBreak< Ifc... >::setType(sal_Int32 type) if( type == excel::XlPageBreak::xlPageBreakNone ) { - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(false)); + mxRowColPropertySet->setPropertyValue(u"IsStartOfNewPage"_ustr, uno::Any(false)); return; } - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(true)); + mxRowColPropertySet->setPropertyValue(u"IsStartOfNewPage"_ustr, uno::Any(true)); if( type == excel::XlPageBreak::xlPageBreakManual ) maTablePageBreakData.ManualBreak = true; else @@ -80,7 +80,7 @@ void ScVbaPageBreak< Ifc... >::setType(sal_Int32 type) template< typename... Ifc > void ScVbaPageBreak< Ifc... >::Delete() { - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(false)); + mxRowColPropertySet->setPropertyValue(u"IsStartOfNewPage"_ustr, uno::Any(false)); } template< typename... Ifc > @@ -96,7 +96,7 @@ template class ScVbaPageBreak< excel::XHPageBreak >; OUString ScVbaHPageBreak::getServiceImplName() { - return "ScVbaHPageBreak"; + return u"ScVbaHPageBreak"_ustr; } uno::Sequence< OUString > @@ -104,7 +104,7 @@ ScVbaHPageBreak::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.HPageBreak" + u"ooo.vba.excel.HPageBreak"_ustr }; return aServiceNames; } @@ -127,7 +127,7 @@ ScVbaVPageBreak::~ScVbaVPageBreak() OUString ScVbaVPageBreak::getServiceImplName() { - return "ScVbaVPageBreak"; + return u"ScVbaVPageBreak"_ustr; } uno::Sequence< OUString > @@ -135,7 +135,7 @@ ScVbaVPageBreak::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.VPageBreak" + u"ooo.vba.excel.VPageBreak"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index b9a0235c34f3..5e07cef98a2d 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -180,7 +180,7 @@ uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) 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("IsStartOfNewPage", uno::Any(true)); + xRowColPropertySet->setPropertyValue(u"IsStartOfNewPage"_ustr, uno::Any(true)); sheet::TablePageBreakData aTablePageBreakData; aTablePageBreakData.ManualBreak = true; aTablePageBreakData.Position = nAPIRowColIndex; @@ -250,7 +250,7 @@ ScVbaHPageBreaks::getElementType() OUString ScVbaHPageBreaks::getServiceImplName() { - return "ScVbaHPageBreaks"; + return u"ScVbaHPageBreaks"_ustr; } uno::Sequence< OUString > @@ -258,7 +258,7 @@ ScVbaHPageBreaks::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.HPageBreaks" + u"ooo.vba.excel.HPageBreaks"_ustr }; return aServiceNames; } @@ -307,7 +307,7 @@ ScVbaVPageBreaks::getElementType() OUString ScVbaVPageBreaks::getServiceImplName() { - return "ScVbaVPageBreaks"; + return u"ScVbaVPageBreaks"_ustr; } uno::Sequence< OUString > @@ -315,7 +315,7 @@ ScVbaVPageBreaks::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.excel.VPageBreaks" + u"ooo.vba.excel.VPageBreaks"_ustr }; return aServiceNames; } diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index f945802e1082..009570e32dca 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -50,17 +50,17 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent // query for current page style mxModel.set( xModel, uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW ); - uno::Any aValue = xSheetProps->getPropertyValue("PageStyle"); + uno::Any aValue = xSheetProps->getPropertyValue(u"PageStyle"_ustr); OUString aStyleName; aValue >>= aStyleName; uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies(); - uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(u"PageStyles"_ustr), uno::UNO_QUERY_THROW ); mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW ); mnOrientLandscape = excel::XlPageOrientation::xlLandscape; mnOrientPortrait = excel::XlPageOrientation::xlPortrait; - mxPageProps->getPropertyValue("IsLandscape") >>= mbIsLandscape; + mxPageProps->getPropertyValue(u"IsLandscape"_ustr) >>= mbIsLandscape; } OUString SAL_CALL ScVbaPageSetup::getPrintArea() @@ -139,7 +139,7 @@ void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() { - return mxPageProps->getPropertyValue("ScaleToPagesY"); + return mxPageProps->getPropertyValue(u"ScaleToPagesY"_ustr); } void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) @@ -153,7 +153,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) fitToPagesTall >>= scaleToPageY; } - mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( scaleToPageY )); + mxPageProps->setPropertyValue(u"ScaleToPagesY"_ustr, uno::Any( scaleToPageY )); } catch( uno::Exception& ) { @@ -162,7 +162,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() { - return mxPageProps->getPropertyValue("ScaleToPagesX"); + return mxPageProps->getPropertyValue(u"ScaleToPagesX"_ustr); } void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) @@ -176,7 +176,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) fitToPagesWide >>= scaleToPageX; } - mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( scaleToPageX )); + mxPageProps->setPropertyValue(u"ScaleToPagesX"_ustr, uno::Any( scaleToPageX )); } catch( uno::Exception& ) { @@ -185,7 +185,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) uno::Any SAL_CALL ScVbaPageSetup::getZoom() { - return mxPageProps->getPropertyValue("PageScale"); + return mxPageProps->getPropertyValue(u"PageScale"_ustr); } void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) @@ -213,9 +213,9 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) // these only exist in S08 sal_uInt16 nScale = 0; - mxPageProps->setPropertyValue("ScaleToPages", uno::Any( nScale )); - mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( nScale )); - mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( nScale )); + mxPageProps->setPropertyValue(u"ScaleToPages"_ustr, uno::Any( nScale )); + mxPageProps->setPropertyValue(u"ScaleToPagesX"_ustr, uno::Any( nScale )); + mxPageProps->setPropertyValue(u"ScaleToPagesY"_ustr, uno::Any( nScale )); } catch (const beans::UnknownPropertyException&) { @@ -228,7 +228,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) { } - mxPageProps->setPropertyValue("PageScale", uno::Any( pageScale )); + mxPageProps->setPropertyValue(u"PageScale"_ustr, uno::Any( pageScale )); } OUString SAL_CALL ScVbaPageSetup::getLeftHeader() @@ -236,7 +236,7 @@ OUString SAL_CALL ScVbaPageSetup::getLeftHeader() OUString leftHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getLeftText(); leftHeader = xText->getString(); } @@ -251,10 +251,10 @@ void SAL_CALL ScVbaPageSetup::setLeftHeader( const OUString& leftHeader) { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getLeftText(); xText->setString( leftHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); + mxPageProps->setPropertyValue(u"RightPageHeaderContent"_ustr, uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -266,7 +266,7 @@ OUString SAL_CALL ScVbaPageSetup::getCenterHeader() OUString centerHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getCenterText(); centerHeader = xText->getString(); } @@ -281,10 +281,10 @@ void SAL_CALL ScVbaPageSetup::setCenterHeader( const OUString& centerHeader) { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getCenterText(); xText->setString( centerHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); + mxPageProps->setPropertyValue(u"RightPageHeaderContent"_ustr, uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -296,7 +296,7 @@ OUString SAL_CALL ScVbaPageSetup::getRightHeader() OUString rightHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getRightText(); rightHeader = xText->getString(); } @@ -311,10 +311,10 @@ void SAL_CALL ScVbaPageSetup::setRightHeader( const OUString& rightHeader) { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue(u"RightPageHeaderContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getRightText(); xText->setString( rightHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); + mxPageProps->setPropertyValue(u"RightPageHeaderContent"_ustr, uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -326,7 +326,7 @@ OUString SAL_CALL ScVbaPageSetup::getLeftFooter() OUString leftFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getLeftText(); leftFooter = xText->getString(); } @@ -341,10 +341,10 @@ void SAL_CALL ScVbaPageSetup::setLeftFooter( const OUString& leftFooter) { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getLeftText(); xText->setString( leftFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); + mxPageProps->setPropertyValue(u"RightPageFooterContent"_ustr, uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -356,7 +356,7 @@ OUString SAL_CALL ScVbaPageSetup::getCenterFooter() OUString centerFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getCenterText(); centerFooter = xText->getString(); } @@ -371,10 +371,10 @@ void SAL_CALL ScVbaPageSetup::setCenterFooter( const OUString& centerFooter) { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getCenterText(); xText->setString( centerFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); + mxPageProps->setPropertyValue(u"RightPageFooterContent"_ustr, uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -387,7 +387,7 @@ OUString SAL_CALL ScVbaPageSetup::getRightFooter() OUString rightFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getRightText(); rightFooter = xText->getString(); } @@ -402,10 +402,10 @@ void SAL_CALL ScVbaPageSetup::setRightFooter( const OUString& rightFooter) { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue(u"RightPageFooterContent"_ustr), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getRightText(); xText->setString( rightFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); + mxPageProps->setPropertyValue(u"RightPageFooterContent"_ustr, uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -417,7 +417,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() sal_Int32 order = excel::XlOrder::xlDownThenOver; try { - uno::Any aValue = mxPageProps->getPropertyValue("PrintDownFirst"); + uno::Any aValue = mxPageProps->getPropertyValue(u"PrintDownFirst"_ustr); bool bPrintDownFirst = false; aValue >>= bPrintDownFirst; if( !bPrintDownFirst ) @@ -446,7 +446,7 @@ void SAL_CALL ScVbaPageSetup::setOrder(sal_Int32 order) try { - mxPageProps->setPropertyValue("PrintDownFirst", uno::Any( bOrder )); + mxPageProps->setPropertyValue(u"PrintDownFirst"_ustr, uno::Any( bOrder )); } catch (const uno::Exception&) { @@ -458,7 +458,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() sal_Int16 number = 0; try { - uno::Any aValue = mxPageProps->getPropertyValue("FirstPageNumber"); + uno::Any aValue = mxPageProps->getPropertyValue(u"FirstPageNumber"_ustr); aValue >>= number; } catch( uno::Exception& ) @@ -482,7 +482,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) { uno::Any aValue; aValue <<= static_cast<sal_Int16>(firstPageNumber); - mxPageProps->setPropertyValue("FirstPageNumber", aValue ); + mxPageProps->setPropertyValue(u"FirstPageNumber"_ustr, aValue ); } catch (const uno::Exception&) { @@ -494,7 +494,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() bool centerVertically = false; try { - uno::Any aValue = mxPageProps->getPropertyValue("CenterVertically"); + uno::Any aValue = mxPageProps->getPropertyValue(u"CenterVertically"_ustr); aValue >>= centerVertically; } catch (const uno::Exception&) @@ -507,7 +507,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) { try { - mxPageProps->setPropertyValue("CenterVertically", uno::Any( centerVertically )); -e ... etc. - the rest is truncated