svx/qa/unit/classicshapes.cxx | 7 +- svx/qa/unit/customshapes.cxx | 56 +++++++++------------- svx/source/core/graphichelper.cxx | 3 - svx/source/dialog/SafeModeDialog.cxx | 3 - svx/source/form/fmshimp.cxx | 3 - svx/source/form/fmsrcimp.cxx | 6 -- svx/source/form/navigatortree.cxx | 6 -- svx/source/form/tbxform.cxx | 3 - svx/source/gallery2/galobj.cxx | 5 - svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 3 - svx/source/svdraw/svdedtv1.cxx | 3 - svx/source/svdraw/svdedxv.cxx | 8 +-- svx/source/svdraw/svdoashp.cxx | 55 +++++++-------------- svx/source/svdraw/svdpntv.cxx | 3 - svx/source/table/svdotable.cxx | 3 - svx/source/table/tablecontroller.cxx | 3 - svx/source/tbxctrls/extrusioncontrols.cxx | 4 - svx/source/tbxctrls/fillctrl.cxx | 3 - svx/source/unodraw/unoshap2.cxx | 3 - svx/source/xml/xmlxtexp.cxx | 3 - 20 files changed, 67 insertions(+), 116 deletions(-)
New commits: commit 017862727a19f419313eead325f1dbc2936088ed Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jun 5 10:18:21 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Jun 5 11:59:17 2020 +0200 Upcoming loplugin:elidestringvar: svx Change-Id: Ia7b4f69361b6cc29f6e5c0093b13cf0b48e25ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/svx/qa/unit/classicshapes.cxx b/svx/qa/unit/classicshapes.cxx index b03210d12c20..3e519418ed84 100644 --- a/svx/qa/unit/classicshapes.cxx +++ b/svx/qa/unit/classicshapes.cxx @@ -73,8 +73,7 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf98584ShearVertical) // They are converted to rotate * shear horizontal * scale. // Besides using a wrong sign in shear angle, error was, that TRSetGeometry of SdrPathObj did // not consider the additional scaling (tdf#98565). - const OUString sFileName("tdf98584_ShearVertical.odg"); - const OUString sURL(m_directories.getURLFromSrc(sDataDirectory) + sFileName); + const OUString sURL(m_directories.getURLFromSrc(sDataDirectory) + "tdf98584_ShearVertical.odg"); mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); @@ -149,8 +148,8 @@ CPPUNIT_TEST_FIXTURE(ClassicshapesTest, testTdf98583ShearHorizontal) // LT 8000,5000 and RB 14000, 9000, which means width 6001, height 4001. // Error was, that not the mathematical matrix was used, but the API matrix, which has // wrong sign in shear angle. - const OUString sFileName("tdf98583_ShearHorizontal.odp"); - const OUString sURL(m_directories.getURLFromSrc(sDataDirectory) + sFileName); + const OUString sURL(m_directories.getURLFromSrc(sDataDirectory) + + "tdf98583_ShearHorizontal.odp"); mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.presentation.PresentationDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index a21652113ef8..ce2f06c42bfe 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -183,8 +183,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testWidthOrientationCommandU) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document with path "M 750 0 L 750 500 250 500 250 0 U 500 0 500 500 0 180 N" // in viewBox="0 0 1000 500" and width="10cm", height="5cm". - const OUString sFileName("tdf121845_WidthOrientation_command_U.odg"); - const OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + const OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf121845_WidthOrientation_command_U.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); // Error was, that the width and height of the ellipse was halved and that the ellipse @@ -207,8 +207,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testHalfEllipseVML) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document which was converted from VML to doc by Word. It had a VML // path="m750,al500,,500,500,,-11796480e" resulting in a lower half circle. - const OUString sFileName("tdf121845_HalfEllipseVML.doc"); - const OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + const OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf121845_HalfEllipseVML.doc"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.text.TextDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); // Error was, that a full circle instead of the half circle was draw. @@ -227,8 +227,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testLargeSwingAngleVML) // tdf121845 custom shape with command U (angleellipse) is wrongly drawn // Load a document which was converted from VML to doc by Word. It had a VML // path="al50,50,45,45,2621440,31457280e" resulting in a full circle plus 120 deg segment. - const OUString sFileName("tdf121845_start40_swing480.doc"); - const OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + const OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf121845_start40_swing480.doc"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.text.TextDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); // Error was, that only the 120 deg segment was drawn. @@ -247,8 +247,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf121845_two_commands_U) // Load a document with path "U 950 250 200 200 90 180 250 250 200 200 180 270 N" // Error was, that the second ellipse segment was interpreted as command T and // thus a line from first to second segment was drawn. - const OUString sFileName("tdf121845_Two_commands_U.odg"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf121845_Two_commands_U.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -269,8 +268,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124212_handle_position) // default viewBox. Load a document with svg:viewBox="10800 0 10800 21600" // Error was, that moving the controller results in a handle position that // does not reflect the movement. - const OUString sFileName("tdf124212_handle_position.odg"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf124212_handle_position.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -294,8 +292,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124029_arc_position) // tdf121029 MS binary custom shape mso_sptArc has wrong position // MS uses the sector for position reference. Error was, that // LibreOffice has used the underlying ellipse. - const OUString sFileName("tdf124029_Arc_position.doc"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf124029_Arc_position.doc"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.text.TextDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -313,8 +310,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf124740_handle_path_coordsystem) // tdf124740 OOXML shape with handle and w and h attribute on path has wrong // handle position // The handle position was scaled erroneously twice. - const OUString sFileName("tdf124740_HandleInOOXMLUserShape.pptx"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf124740_HandleInOOXMLUserShape.pptx"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -339,8 +336,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf115813_OOXML_XY_handle) // Connectors are included as ordinary shapes to prevent converting. // Error was, that the handle movement and the changes to the shape did not follow // the mouse movement. - const OUString sFileName("tdf115813_HandleMovementOOXMLPresetShapes.pptx"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + + "tdf115813_HandleMovementOOXMLPresetShapes.pptx"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); @@ -398,8 +395,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testQuadraticCurveTo) // When converting to cubic Bezier curve, this had resulted in a wrong first control point. // The quadraticcurveto segment starts in shape center in the test file. The first control // point should produce a horizontal tangent in the start point. - const OUString sFileName("tdf125782_QuadraticCurveTo.odg"); - const OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + const OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf125782_QuadraticCurveTo.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); uno::Reference<drawing::XShape> xShape(getShape(0)); @@ -419,8 +416,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP) // opened and exported to ODF format by LibreOffice. // Error was, that for shapes, which were originally imported from OOXML, the handles // could not be moved at all. - const OUString sFileName("tdf126512_OOXMLHandleMovementInODF.odp"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf126512_OOXMLHandleMovementInODF.odp"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); @@ -467,8 +464,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Mirror) // and therefore equals approximately the text frame. // Error was, that because of wrong calculation, the flipped shapes do not use the // text frame but the frame rectangle for their text. - const OUString sFileName("tdf127785_Mirror.odp"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf127785_Mirror.odp"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); OUString sErrors; // sErrors collects the errors and should be empty in case all is OK. @@ -510,8 +506,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126060_3D_Z_Rotation) // and the text has 3D z rotation. When we open the document we // should see the text vertically and rotated from text bound center not text box. - const OUString sFileName("tdf126060_3D_Z_Rotation.pptx"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf126060_3D_Z_Rotation.pptx"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); OUString sErrors; // sErrors collects the errors and should be empty in case all is OK. @@ -542,8 +537,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_Asymmetric) // the text and therefore equals approximately the text frame. // Error was, that the 180deg text rotation was not compensated for the position of // the flipped text box. - const OUString sFileName("tdf127785_asymmetricTextBoxFlipV.odg"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL + = m_directories.getURLFromSrc(sDataDirectory) + "tdf127785_asymmetricTextBoxFlipV.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); OUString sErrors; // sErrors collects the errors and should be empty in case all is OK. @@ -576,8 +571,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_TextRotateAngle) // surrounds the text and therefore equals approximately the text frame. // Error was, that the compensation for the 180° rotation added for vertical // flip were not made to the text box position but to the text matrix. - const OUString sFileName("tdf127785_TextRotateAngle.odp"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf127785_TextRotateAngle.odp"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); OUString sErrors; // sErrors collects the errors and should be empty in case all is OK. @@ -608,8 +602,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf128413_tbrlOnOff) // The document contains a rotated shape with text. The error was, that switching // tb-rl writing-mode on, changed the shape size and position. - const OUString sFileName("tdf128413_tbrl_OnOff.odp"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf128413_tbrl_OnOff.odp"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); uno::Reference<drawing::XShape> xShape(getShape(0)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); @@ -639,8 +632,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf129532_MatrixFlipV) // attribute. That should result in mirroring on the x-axis. Error was, that the lines // which are drawn on the shape rectangle were mirrored, but not the rectangle itself. // The rectangle was only shifted. - const OUString sFileName("tdf129532_MatrixFlipV.odg"); - OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName; + OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + "tdf129532_MatrixFlipV.odg"; mxComponent = loadFromDesktop(sURL, "com.sun.star.comp.drawing.DrawingDocument"); CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is()); OUString sErrors; // sErrors collects the errors and should be empty in case all is OK. diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index c4755ff10863..fb483c5bfe54 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -132,9 +132,8 @@ bool lcl_ExecuteFilterDialog( const Sequence< PropertyValue >& rPropsForDialog, bool bStatus = false; try { - const OUString aServiceName("com.sun.star.svtools.SvFilterOptionsDialog"); Reference< XExecutableDialog > xFilterDialog( - comphelper::getProcessServiceFactory()->createInstance( aServiceName ), UNO_QUERY ); + comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.svtools.SvFilterOptionsDialog" ), UNO_QUERY ); Reference< XPropertyAccess > xFilterProperties( xFilterDialog, UNO_QUERY ); if( xFilterDialog.is() && xFilterProperties.is() ) diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index b74d2a93dae2..6cd0f306ad34 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -301,8 +301,7 @@ namespace { IMPL_LINK(SafeModeDialog, CreateZipBtnHdl, weld::Button&, /*rBtn*/, void) { - const OUString zipFileName("libreoffice-profile.zip"); - const OUString zipFileURL(comphelper::BackupFileHelper::getUserProfileURL() + "/" + zipFileName); + const OUString zipFileURL(comphelper::BackupFileHelper::getUserProfileURL() + "/libreoffice-profile.zip"); osl::File::remove(zipFileURL); // Remove previous exports try { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 6407f74e9fbf..3ffa410e8fc6 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3421,8 +3421,7 @@ void FmXFormShell::CreateExternalView_Lock() // column type : listbox pDispatchArgs->Name = FMARG_ADDCOL_COLUMNTYPE; - OUString fColName = FM_COL_LISTBOX; - pDispatchArgs->Value <<= fColName; + pDispatchArgs->Value <<= OUString(FM_COL_LISTBOX); // pDispatchArgs->Value <<= (OUString)FM_COL_LISTBOX; ++pDispatchArgs; diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 82a6313a9ae1..8510a1f2692b 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -780,10 +780,8 @@ void FmSearchEngine::SearchNextImpl() { // since in all other cases * and ? in the search string are of course // also allowed, but should not count as WildCards, I need to normalize OUString aTmp(strSearchExpression); - const OUString s_sStar("\\*"); - const OUString s_sQuotation("\\?"); - aTmp = aTmp.replaceAll("*", s_sStar); - aTmp = aTmp.replaceAll("?", s_sQuotation); + aTmp = aTmp.replaceAll("*", "\\*"); + aTmp = aTmp.replaceAll("?", "\\?"); strSearchExpression = aTmp; switch (m_nPosition) diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 2f62c697eda4..e1410282fed3 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -460,8 +460,7 @@ namespace svxform pFormModel->BegUndo(aUndoStr); // slot was valid for (exactly) one selected form - OUString fControlName = FM_COMPONENT_HIDDEN; - NewControl( fControlName, *m_arrCurrentSelection.begin(), true ); + NewControl( FM_COMPONENT_HIDDEN, *m_arrCurrentSelection.begin(), true ); pFormModel->EndUndo(); } else if (sIdent == "cut") @@ -952,8 +951,7 @@ namespace svxform for (sal_Int32 i=0; i<nCount; ++i) { // create new control - OUString fControlName = FM_COMPONENT_HIDDEN; - FmControlData* pNewControlData = NewControl( fControlName, _pTargetEntry, false); + FmControlData* pNewControlData = NewControl( FM_COMPONENT_HIDDEN, _pTargetEntry, false); Reference< XPropertySet > xNewPropSet( pNewControlData->GetPropertySet() ); // copy properties form old control to new one diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 837aa154aabf..e6138af09060 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -203,8 +203,7 @@ SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal() VclPtr<InterimItemWindow> SvxFmTbxCtlRecTotal::CreateItemWindow( vcl::Window* pParent ) { - OUString const aSample("123456"); - m_xFixedText.reset(VclPtr<LabelItemWindow>::Create(pParent, aSample)); + m_xFixedText.reset(VclPtr<LabelItemWindow>::Create(pParent, "123456")); m_xFixedText->set_label(""); m_xFixedText->Show(); diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 5d97eb9f2a40..ef5972181105 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -386,10 +386,7 @@ SgaObjectSvDraw::SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject SvxGalleryDrawModel::SvxGalleryDrawModel() : mpFormModel( nullptr ) { - - const OUString sFactoryURL("sdraw"); - - mxDoc = SfxObjectShell::CreateObjectByFactoryName( sFactoryURL ); + mxDoc = SfxObjectShell::CreateObjectByFactoryName( "sdraw" ); if( mxDoc.Is() ) { diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index f83e9bafdebd..6cf416a68d15 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -287,9 +287,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, weld::ComboBox&, void) mxMTRAngle->hide(); mxBmpImport->hide(); mxToolBoxColor->show(); - const OUString aTmpStr; const Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO; - const XFillColorItem aXFillColorItem( aTmpStr, aColor ); + const XFillColorItem aXFillColorItem( "", aColor ); // #i122676# change FillStyle and Color in one call XFillStyleItem aXFillStyleItem(drawing::FillStyle_SOLID); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 3423ba65027b..439dba1a6ebb 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1062,10 +1062,9 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) } if(bHasEEFeatureItems) { - const OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, VclMessageType::Info, VclButtonsType::Ok, - aMessage)); + "SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.")); xInfoBox->run(); } } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 40aacd3474fb..6dddd270005c 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2142,11 +2142,11 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) if (bHasEEFeatureItems) { - const OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items " - "at the SdrView does not make sense! It only leads to " - "overhead and unreadable documents."); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog( - nullptr, VclMessageType::Info, VclButtonsType::Ok, aMessage)); + nullptr, VclMessageType::Info, VclButtonsType::Ok, + "SdrObjEditView::SetAttributes(): Setting EE_FEATURE items " + "at the SdrView does not make sense! It only leads to " + "overhead and unreadable documents.")); xInfoBox->run(); } } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 3d4e6bfc409b..77c2d2d6ae51 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -467,8 +467,7 @@ bool SdrObjCustomShape::IsMirroredX() const { bool bMirroredX = false; SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const OUString sMirroredX( "MirroredX" ); - css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredX ); + css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( "MirroredX" ); if ( pAny ) *pAny >>= bMirroredX; return bMirroredX; @@ -477,8 +476,7 @@ bool SdrObjCustomShape::IsMirroredY() const { bool bMirroredY = false; SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const OUString sMirroredY( "MirroredY" ); - css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredY ); + css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( "MirroredY" ); if ( pAny ) *pAny >>= bMirroredY; return bMirroredY; @@ -486,9 +484,8 @@ bool SdrObjCustomShape::IsMirroredY() const void SdrObjCustomShape::SetMirroredX( const bool bMirrorX ) { SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const OUString sMirroredX( "MirroredX" ); PropertyValue aPropVal; - aPropVal.Name = sMirroredX; + aPropVal.Name = "MirroredX"; aPropVal.Value <<= bMirrorX; aGeometryItem.SetPropertyValue( aPropVal ); SetMergedItem( aGeometryItem ); @@ -496,9 +493,8 @@ void SdrObjCustomShape::SetMirroredX( const bool bMirrorX ) void SdrObjCustomShape::SetMirroredY( const bool bMirrorY ) { SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const OUString sMirroredY( "MirroredY" ); PropertyValue aPropVal; - aPropVal.Name = sMirroredY; + aPropVal.Name = "MirroredY"; aPropVal.Value <<= bMirrorY; aGeometryItem.SetPropertyValue( aPropVal ); SetMergedItem( aGeometryItem ); @@ -508,9 +504,7 @@ double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const { const css::uno::Any* pAny; const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); - const OUString sTextRotateAngle( "TextRotateAngle" ); - const OUString sTextPreRotateAngle( "TextPreRotateAngle" ); - pAny = rGeometryItem.GetPropertyValueByName( bPreRotation ? sTextPreRotateAngle : sTextRotateAngle ); + pAny = rGeometryItem.GetPropertyValueByName( bPreRotation ? OUStringLiteral( "TextPreRotateAngle" ) : OUStringLiteral( "TextRotateAngle" ) ); double fExtraTextRotateAngle = 0.0; if ( pAny ) *pAny >>= fExtraTextRotateAngle; @@ -522,9 +516,8 @@ double SdrObjCustomShape::GetCameraRotation() const const css::uno::Any* pAny; double fTextCameraZRotateAngle = 0.0; const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); - const OUString sTextCameraZRotateAngle( "TextCameraZRotateAngle" ); - pAny = rGeometryItem.GetPropertyValueByName(sTextCameraZRotateAngle); + pAny = rGeometryItem.GetPropertyValueByName("TextCameraZRotateAngle"); if ( pAny ) *pAny >>= fTextCameraZRotateAngle; @@ -1107,10 +1100,9 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons bool bIsDefaultGeometry = false; OUString sShapeType; - const OUString sType( "Type" ); const SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const Any *pAny = aGeometryItem.GetPropertyValueByName( sType ); + const Any *pAny = aGeometryItem.GetPropertyValueByName( "Type" ); if ( pAny ) *pAny >>= sShapeType; @@ -1122,8 +1114,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons { case DefaultType::Viewbox : { - const OUString sViewBox( "ViewBox" ); - const Any* pViewBox = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sViewBox ); + const Any* pViewBox = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( "ViewBox" ); css::awt::Rectangle aViewBox; if (pViewBox && (*pViewBox >>= aViewBox) && pDefCustomShape) { @@ -1136,8 +1127,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Path : { - const OUString sCoordinates( "Coordinates" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sCoordinates ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "Coordinates" ); if ( pAny && pDefCustomShape && pDefCustomShape->nVertices && pDefCustomShape->pVertices ) { css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates1, seqCoordinates2; @@ -1161,8 +1151,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Gluepoints : { - const OUString sGluePoints( "GluePoints" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sGluePoints ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "GluePoints" ); if ( pAny && pDefCustomShape && pDefCustomShape->nGluePoints && pDefCustomShape->pGluePoints ) { css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqGluePoints1, seqGluePoints2; @@ -1187,8 +1176,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Segments : { // Path/Segments - const OUString sSegments( "Segments" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sSegments ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "Segments" ); if ( pAny ) { css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > seqSegments1, seqSegments2; @@ -1231,8 +1219,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::StretchX : { - const OUString sStretchX( "StretchX" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sStretchX ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "StretchX" ); if ( pAny && pDefCustomShape ) { sal_Int32 nStretchX = 0; @@ -1249,8 +1236,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::StretchY : { - const OUString sStretchY( "StretchY" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sStretchY ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "StretchY" ); if ( pAny && pDefCustomShape ) { sal_Int32 nStretchY = 0; @@ -1267,8 +1253,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::Equations : { - const OUString sEquations( "Equations" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sEquations ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( "Equations" ); if ( pAny && pDefCustomShape && pDefCustomShape->nCalculation && pDefCustomShape->pCalculation ) { css::uno::Sequence< OUString > seqEquations1, seqEquations2; @@ -1292,8 +1277,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons case DefaultType::TextFrames : { - const OUString sTextFrames( "TextFrames" ); - pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, sTextFrames ); + pAny = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sPath, "TextFrames" ); if ( pAny && pDefCustomShape && pDefCustomShape->nTextRect && pDefCustomShape->pTextRect ) { css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > seqTextFrames1, seqTextFrames2; @@ -2885,8 +2869,7 @@ void SdrObjCustomShape::SaveGeoData(SdrObjGeoData& rGeo) const rAGeo.bMirroredX = IsMirroredX(); rAGeo.bMirroredY = IsMirroredY(); - const OUString sAdjustmentValues( "AdjustmentValues" ); - const Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ).GetPropertyValueByName( sAdjustmentValues ); + const Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ).GetPropertyValueByName( "AdjustmentValues" ); if ( pAny ) *pAny >>= rAGeo.aAdjustmentSeq; } @@ -2900,9 +2883,8 @@ void SdrObjCustomShape::RestGeoData(const SdrObjGeoData& rGeo) SetMirroredY( rAGeo.bMirroredY ); SdrCustomShapeGeometryItem rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); - const OUString sAdjustmentValues( "AdjustmentValues" ); PropertyValue aPropVal; - aPropVal.Name = sAdjustmentValues; + aPropVal.Name = "AdjustmentValues"; aPropVal.Value <<= rAGeo.aAdjustmentSeq; rGeometryItem.SetPropertyValue( aPropVal ); SetMergedItem( rGeometryItem ); @@ -3231,9 +3213,8 @@ OUString SdrObjCustomShape::GetCustomShapeName() const || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine" ) { OUString sShapeType; - const OUString sType("Type"); const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const Any* pAny = rGeometryItem.GetPropertyValueByName( sType ); + const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" ); if ( pAny && ( *pAny >>= sShapeType ) ) sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType ); } diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index ccc47ca9c401..6e931e7f4504 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -947,10 +947,9 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { - const OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, VclMessageType::Info, VclButtonsType::Ok, - aMessage)); + "SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.")); xInfoBox->run(); } } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 7672e29cb021..6f9044f979e6 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -436,8 +436,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) const OUString sStyleName( Reference< XNamed >( rSource.mxTableStyle, UNO_QUERY_THROW )->getName() ); Reference< XStyleFamiliesSupplier > xSFS(rTargetSdrModel.getUnoModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), css::uno::UNO_SET_THROW ); - const OUString sFamilyName( "table" ); - Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( sFamilyName ), UNO_QUERY_THROW ); + Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( "table" ), UNO_QUERY_THROW ); if( xTableFamilyAccess->hasByName( sStyleName ) ) { diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 9fa0c057565e..1264b9a2eb90 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1068,8 +1068,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) { Reference< XStyleFamiliesSupplier > xSFS( rModel.getUnoModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilyNameAccess( xSFS->getStyleFamilies(), UNO_SET_THROW ); - const OUString sFamilyName( "table" ); - Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( sFamilyName ), UNO_QUERY_THROW ); + Reference< XNameAccess > xTableFamilyAccess( xFamilyNameAccess->getByName( "table" ), UNO_QUERY_THROW ); if( xTableFamilyAccess->hasByName( pArg->GetValue() ) ) { diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 8f4e2fd5dc74..5bbec47357cf 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -453,8 +453,6 @@ IMPL_LINK(ExtrusionDepthWindow, SelectHdl, weld::ToggleButton&, rButton, void) if (mxCustom->get_active()) { - const OUString aCommand( ".uno:ExtrusionDepthDialog" ); - Sequence< PropertyValue > aArgs( 2 ); aArgs[0].Name = "Depth"; aArgs[0].Value <<= mfDepth; @@ -463,7 +461,7 @@ IMPL_LINK(ExtrusionDepthWindow, SelectHdl, weld::ToggleButton&, rButton, void) rtl::Reference<svt::PopupWindowController> xControl(mxControl); xControl->EndPopupMode(); - xControl->dispatchCommand(aCommand, aArgs); + xControl->dispatchCommand(".uno:ExtrusionDepthDialog", aArgs); } else { diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 588e77f07439..3d91e5cb823c 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -700,9 +700,8 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillTypeHdl, weld::ComboBox&, void) { mpLbFillAttr->hide(); mpToolBoxColor->show(); - const OUString aTmpStr; const ::Color aColor = mpColorItem->GetColorValue(); - const XFillColorItem aXFillColorItem( aTmpStr, aColor ); + const XFillColorItem aXFillColorItem( "", aColor ); // #i122676# change FillStyle and Color in one call SfxViewFrame::Current()->GetDispatcher()->ExecuteList( diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 81ee656205d8..1e70d9a28f58 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1689,8 +1689,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c // tdf#98163 Use a custom slot to have filter code flush the UNO // API implementations of SdrObjCustomShape. Used e.g. by // ~SdXMLCustomShapeContext, see there for more information - const OUString sFlushCustomShapeUnoApiObjects("FlushCustomShapeUnoApiObjects"); - if(sFlushCustomShapeUnoApiObjects == aPropertyName) + if("FlushCustomShapeUnoApiObjects" == aPropertyName) { SdrObjCustomShape* pTarget = dynamic_cast< SdrObjCustomShape* >(pObject); if(pTarget) diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 68b5ea9bd326..27bd63fe9bcb 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -281,8 +281,7 @@ bool SvxXMLXTableExportComponent::save( xGraphicStorageHandler = xGraphicHelper.get(); // Finally do the export - const OUString aName; - rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xWriter, xTable, xGraphicStorageHandler ) ); + rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, "", xWriter, xTable, xGraphicStorageHandler ) ); bRet = xExporter->exportTable(); if( xGraphicHelper ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits