diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-31 09:57:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-01 10:23:29 +0200 |
commit | ec49191e58df2f5cb37e2608f3262e9604385fb0 (patch) | |
tree | 0c17db87473951ed31f4ea482fd4f321173a31c5 | |
parent | a06946271e7139352501e0840256402ac43f4c65 (diff) |
loplugin:ostr in sc/../drawfunc
Change-Id: I5191883a86a004f2e7c283dc0e0e77de2f7eda04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168281
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/source/ui/drawfunc/chartsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh5.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drformsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob1.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fudraw.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuins1.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuins2.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fusel.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/graphsh.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/mediash.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/oleobjsh.cxx | 4 |
14 files changed, 42 insertions, 42 deletions
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index e6378a5fa9cb..7a0a63b76195 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -61,7 +61,7 @@ void ScChartShell::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Draw_Objectbar); - GetStaticInterface()->RegisterPopupMenu("oleobject"); + GetStaticInterface()->RegisterPopupMenu(u"oleobject"_ustr); } void ScChartShell::Activate(bool bMDI) @@ -97,7 +97,7 @@ void ScChartShell::Deactivate(bool bMDI) ScChartShell::ScChartShell(ScViewData& rData) : ScDrawShell(rData) { - SetName( "ChartObject" ); + SetName( u"ChartObject"_ustr ); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Chart)); } diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 2e11d3817ee5..53ca99000933 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -92,7 +92,7 @@ void ScDrawShell::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Draw_Objectbar); - GetStaticInterface()->RegisterPopupMenu("draw"); + GetStaticInterface()->RegisterPopupMenu(u"draw"_ustr); GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId()); } diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index fddc50fe5c13..418d92d00f32 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -72,7 +72,7 @@ ScDrawShell::ScDrawShell( ScViewData& rData ) : { pMgr->SetMaxUndoActionCount( 0 ); } - SetName("Drawing"); + SetName(u"Drawing"_ustr); mpSelectionChangeHandler->Connect(); } @@ -341,12 +341,12 @@ static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet) if (!xInfo.is()) return; - if (xInfo->hasPropertyByName("FillColor")) + if (xInfo->hasPropertyByName(u"FillColor"_ustr)) { sal_uInt32 nFillColor = 0; - xPropSet->getPropertyValue("FillColor") >>= nFillColor; + xPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; - XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor)); + XFillColorItem aFillColorItem(u""_ustr, Color(ColorTransparency, nFillColor)); rSet.Put(aFillColorItem); if (comphelper::LibreOfficeKit::isActive()) @@ -354,11 +354,11 @@ static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet) (".uno:FillColor=" + OString::number(nFillColor))); } - if (!(comphelper::LibreOfficeKit::isActive() && xInfo->hasPropertyByName("FillGradientName"))) + if (!(comphelper::LibreOfficeKit::isActive() && xInfo->hasPropertyByName(u"FillGradientName"_ustr))) return; OUString aGradientName; - xPropSet->getPropertyValue("FillGradientName") >>= aGradientName; + xPropSet->getPropertyValue(u"FillGradientName"_ustr) >>= aGradientName; ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController(); if( !xChartController.is() ) @@ -370,7 +370,7 @@ static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet) return; css::uno::Reference<css::container::XNameAccess> xNameAccess( - xFact->createInstance("com.sun.star.drawing.GradientTable"), css::uno::UNO_QUERY); + xFact->createInstance(u"com.sun.star.drawing.GradientTable"_ustr), css::uno::UNO_QUERY); if (xNameAccess.is() && xNameAccess->hasByName(aGradientName)) { diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index b3f344730aba..58b3f3538da6 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -81,7 +81,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - OUString sPropButtonType( "ButtonType" ); + OUString sPropButtonType( u"ButtonType"_ustr ); if(xInfo->hasPropertyByName( sPropButtonType )) { @@ -91,7 +91,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink { OUString sTmp; // Label - OUString sPropLabel( "Label" ); + OUString sPropLabel( u"Label"_ustr ); if(xInfo->hasPropertyByName( sPropLabel )) { aAny = xPropSet->getPropertyValue( sPropLabel ); @@ -101,7 +101,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink } } // URL - OUString sPropTargetURL( "TargetURL" ); + OUString sPropTargetURL( u"TargetURL"_ustr ); if(xInfo->hasPropertyByName( sPropTargetURL )) { aAny = xPropSet->getPropertyValue( sPropTargetURL ); @@ -111,7 +111,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink } } // Target - OUString sPropTargetFrame( "TargetFrame" ); + OUString sPropTargetFrame( u"TargetFrame"_ustr ); if(xInfo->hasPropertyByName( sPropTargetFrame )) { aAny = xPropSet->getPropertyValue( sPropTargetFrame ); @@ -168,15 +168,15 @@ void ScDrawShell::ExecuteHLink( const SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - OUString sPropTargetURL( "TargetURL" ); + OUString sPropTargetURL( u"TargetURL"_ustr ); // Is it possible to set a URL in the object? if (xInfo->hasPropertyByName( sPropTargetURL )) { - OUString sPropButtonType( "ButtonType"); - OUString sPropTargetFrame( "TargetFrame" ); - OUString sPropLabel( "Label" ); + OUString sPropButtonType( u"ButtonType"_ustr); + OUString sPropTargetFrame( u"TargetFrame"_ustr ); + OUString sPropLabel( u"Label"_ustr ); if ( xInfo->hasPropertyByName( sPropLabel ) ) { diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx index b91e08646be7..0c804f23f441 100644 --- a/sc/source/ui/drawfunc/drformsh.cxx +++ b/sc/source/ui/drawfunc/drformsh.cxx @@ -37,14 +37,14 @@ void ScDrawFormShell::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Objectbar_Format); - GetStaticInterface()->RegisterPopupMenu("form"); + GetStaticInterface()->RegisterPopupMenu(u"form"_ustr); } ScDrawFormShell::ScDrawFormShell(ScViewData& rData) : ScDrawShell(rData) { - SetName("DrawForm"); + SetName(u"DrawForm"_ustr); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Form)); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 914a2e49b0e7..6138b29120e4 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -89,7 +89,7 @@ void ScDrawTextObjectBar::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Text_Toolbox_Sc); - GetStaticInterface()->RegisterPopupMenu("drawtext"); + GetStaticInterface()->RegisterPopupMenu(u"drawtext"_ustr); GetStaticInterface()->RegisterChildWindow(ScGetFontWorkId()); } @@ -124,7 +124,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData& rData) : pMgr->SetMaxUndoActionCount( 0 ); } - SetName("DrawText"); + SetName(u"DrawText"_ustr); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::DrawText)); } diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 4810876a33c4..10974d1e5be2 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -46,7 +46,7 @@ bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, mrViewData.GetSfxDocShell(), true)); if (nSlot == SID_CHAR_DLG_EFFECT) { - pDlg->SetCurPageId("fonteffects"); + pDlg->SetCurPageId(u"fonteffects"_ustr); } bool bRet = ( pDlg->Execute() == RET_OK ); diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 1e0c0e5f8ad5..f7c92e396474 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -199,7 +199,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) case KEY_ESCAPE: if ( rViewShell.IsDrawTextShell() || aSfxRequest.GetSlot() == SID_DRAW_NOTEEDIT ) { - collectUIInformation("CLOSE"); + collectUIInformation(u"CLOSE"_ustr); // if object selected -> normal draw-shell, else turn off drawing rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SfxCallMode::SLOT | SfxCallMode::RECORD); bReturn = true; diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index aa51747f864f..886d2b29ecf3 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -256,7 +256,7 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi, *rData.GetDocument().GetDrawLayer(), tools::Rectangle(aInsertPos, aSize)); - pObj->setURL( realURL, ""/*TODO?*/ ); + pObj->setURL( realURL, u""_ustr/*TODO?*/ ); pView->InsertObjectAtView( pObj.get(), *pPV, bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE ); } #endif @@ -433,7 +433,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell& rViewSh, avmedia::MediaWindow::dispatchInsertAVMedia(xDispatchProvider, aSize, aURL, bLink); })); - const bool bIsMediaURL = ::avmedia::MediaWindow::isMediaURL(aURL, ""/*TODO?*/, true, xPlayerListener); + const bool bIsMediaURL = ::avmedia::MediaWindow::isMediaURL(aURL, u""_ustr/*TODO?*/, true, xPlayerListener); if( pWin ) pWin->LeaveWait(); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 4d34208b7ec6..cac0c9f3e53a 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -185,16 +185,16 @@ void lcl_ChartInit(const uno::Reference <embed::XEmbeddedObject>& xObj, ScViewDa uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( - "CellRangeRepresentation", -1, + u"CellRangeRepresentation"_ustr, -1, uno::Any( aRangeString ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "HasCategories", -1, + u"HasCategories"_ustr, -1, uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "FirstCellAsLabel", -1, + u"FirstCellAsLabel"_ustr, -1, uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( - "DataRowSource", -1, + u"DataRowSource"_ustr, -1, uno::Any( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) }; @@ -638,7 +638,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV { css::uno::Reference<css::ui::dialogs::XAsynchronousExecutableDialog> xDialog( xMCF->createInstanceWithContext( - "com.sun.star.comp.chart2.WizardDialog" + u"com.sun.star.comp.chart2.WizardDialog"_ustr , xContext), uno::UNO_QUERY); uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xChartModel.is() && xInit.is() ) @@ -660,7 +660,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue("Size") + if( xDialogProps->getPropertyValue(u"Size"_ustr) >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -668,12 +668,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV { //calculate and set new position Point aDialogPos = rViewShell.GetChartDialogPos( aDialogSize, aRect ); - xDialogProps->setPropertyValue("Position", + xDialogProps->setPropertyValue(u"Position"_ustr, uno::Any( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } //tell the dialog to unlock controller - xDialogProps->setPropertyValue("UnlockControllersOnExecute", + xDialogProps->setPropertyValue(u"UnlockControllersOnExecute"_ustr, uno::Any( true ) ); } diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index a88acf7b3fc0..7d0174380722 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -191,7 +191,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { try { - aCaller = xProps->getPropertyValue("Name"); + aCaller = xProps->getPropertyValue(u"Name"_ustr); } catch( uno::Exception& ) {} } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 05fac4b1a04f..71420be473b7 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -46,14 +46,14 @@ void ScGraphicShell::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Graphic_Objectbar); - GetStaticInterface()->RegisterPopupMenu("graphic"); + GetStaticInterface()->RegisterPopupMenu(u"graphic"_ustr); } ScGraphicShell::ScGraphicShell(ScViewData& rData) : ScDrawShell(rData) { - SetName("GraphicObject"); + SetName(u"GraphicObject"_ustr); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Graphic)); } @@ -284,12 +284,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq if (nState == RET_YES) { - GraphicHelper::ExportGraphic(pWinFrame, pObj->GetTransformedGraphic(), ""); + GraphicHelper::ExportGraphic(pWinFrame, pObj->GetTransformedGraphic(), u""_ustr); } else if (nState == RET_NO) { const GraphicObject& aGraphicObject(pObj->GetGraphicObject()); - GraphicHelper::ExportGraphic(pWinFrame, aGraphicObject.GetGraphic(), ""); + GraphicHelper::ExportGraphic(pWinFrame, aGraphicObject.GetGraphic(), u""_ustr); } } } diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index f5b3350ba6a6..438f7a2c9bdb 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -39,7 +39,7 @@ void ScMediaShell::InitInterface_Impl() GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Media_Objectbar); - GetStaticInterface()->RegisterPopupMenu("media"); + GetStaticInterface()->RegisterPopupMenu(u"media"_ustr); } ScMediaShell::ScMediaShell(ScViewData& rData) diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx index 0e9f0075d904..afc0a61d655c 100644 --- a/sc/source/ui/drawfunc/oleobjsh.cxx +++ b/sc/source/ui/drawfunc/oleobjsh.cxx @@ -33,14 +33,14 @@ void ScOleObjectShell::InitInterface_Impl() SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server, ToolbarId::Draw_Objectbar); - GetStaticInterface()->RegisterPopupMenu("oleobject"); + GetStaticInterface()->RegisterPopupMenu(u"oleobject"_ustr); } ScOleObjectShell::ScOleObjectShell(ScViewData& rData) : ScDrawShell(rData) { - SetName("OleObject"); + SetName(u"OleObject"_ustr); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::OLE)); } |