diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/dialogs-test.cxx | 3 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 28 | ||||
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 3 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/CustomAnimationPreset.cxx | 21 | ||||
-rw-r--r-- | sd/source/core/stlfamily.cxx | 3 | ||||
-rw-r--r-- | sd/source/filter/sdpptwrp.cxx | 3 | ||||
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/inspagob.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel3.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 6 |
18 files changed, 41 insertions, 87 deletions
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 4eb9d9884481..b0f5ce782969 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -365,12 +365,11 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) // CreateSdInsertPagesObjsDlg(const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) override; SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); - const OUString aFileName("foo"); pRetval = getSdAbstractDialogFactory()->CreateSdInsertPagesObjsDlg( getViewShell()->GetFrameWeld(), pDrawDoc, nullptr, - aFileName); + "foo"); break; } case 10: diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index c6d2f48aedde..a3ff094b7f21 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -543,10 +543,9 @@ void SdOOXMLExportTest2::testTdf123090() CPPUNIT_ASSERT_EQUAL(OUString("aaa"), xTextRange->getString()); sal_Int32 nWidth; - const OUString sWidth("Width"); uno::Reference< css::table::XTableColumns > xColumns( xTable->getColumns(), uno::UNO_SET_THROW); uno::Reference< beans::XPropertySet > xRefColumn( xColumns->getByIndex(1), uno::UNO_QUERY_THROW ); - xRefColumn->getPropertyValue( sWidth ) >>= nWidth; + xRefColumn->getPropertyValue( "Width" ) >>= nWidth; CPPUNIT_ASSERT_EQUAL( sal_Int32(9136), nWidth); xDocShRef->DoClose(); @@ -1170,11 +1169,10 @@ void SdOOXMLExportTest2::testTdf111518() xShell->DoClose(); xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml"); - OUString sExpect = "M -3.54167E-6 -4.81481E-6 L 0.39037 -0.00069 E"; OUString sActual = getXPath(pXmlDocRels, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animMotion", "path"); - CPPUNIT_ASSERT_MOTIONPATH(sExpect, sActual); + CPPUNIT_ASSERT_MOTIONPATH("M -3.54167E-6 -4.81481E-6 L 0.39037 -0.00069 E", sActual); } void SdOOXMLExportTest2::testTdf100387() @@ -2249,24 +2247,16 @@ void SdOOXMLExportTest2::testTdf120573() void SdOOXMLExportTest2::testTdf118825() { - const OUString sPath1 = "M 0.0449285714285714 0.00368253968253968 C 0.0575714285714285 -0.00095238095238096 0.0704264795523803 -0.00370117418637049 0.0831071428571428 -0.00819047619047622 C 0.0953550597998766 -0.0125265741339082 0.107821870086751 -0.010397536991717 0.120321428571429 -0.0115555555555556 C 0.133179018681433 -0.0127467438724762 0.151318627483861 -0.0158700272533852 0.1585 0.00539682539682542 C 0.16478291361998 0.0240029898688431 0.15828642886492 0.0483806254341085 0.161392857142857 0.0698412698412698 C 0.165179286017685 0.0959996731216037 0.17453898927982 0.119735912694626 0.187142857142857 0.132634920634921 C 0.199788991845377 0.145577185161529 0.215607110490848 0.142889773028431 0.230107142857143 0.142857142857143 C 0.243821417584191 0.142826280916829 0.257716514999779 0.142685979556724 0.271142857142857 0.137777777777778 C 0.286895094567923 0.132019309914514 0.302318190711873 0.122962218306185 0.317928571428571 0.11568253968254 C 0.333496771884547 0.108422531222479 0.348787823719556 0.0990570571890929 0.363714285714286 0.0885079365079364 C 0.374930683062651 0.080580865157908 0.385357142857143 0.0693333333333332 0.396178571428571 0.0596825396825396 L 0.404785714285714 0.0410158730158729 L 0.401892857142857 0.0342222222222221 E"; - - const OUString sPath2 = "M 0.025 0.0571428571428571 L 0.0821428571428571 0.184126984126984 L -0.175 0.234920634920635 L -0.246428571428571 -0.0190476190476191 L -0.0821428571428573 -0.133333333333333 E"; - - const OUString sPath3 = "M -0.0107142857142857 0.00634920634920635 C -0.110714285714286 0.501587301587301 -0.153571428571429 -0.00634920634920635 -0.246428571428572 0.184126984126984 C -0.339285714285715 0.374603174603175 -0.296428571428572 0.514285714285714 -0.267857142857143 0.603174603174603 C -0.239285714285715 0.692063492063492 0.0607142857142858 0.590476190476191 0.0607142857142858 0.590476190476191 E"; - - const OUString sPath4 = "M 0.0535714285714286 -0.0444444444444444 L 0.132142857142857 -0.0444444444444444 L 0.132142857142857 -0.146031746031746 L 0.0964285714285715 -0.146031746031746 E"; - ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118825-motionpath.odp"), ODP); utl::TempFile tempFile; xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); - CPPUNIT_ASSERT_MOTIONPATH(sPath1, getXPath(pXmlDocContent, "(//p:animMotion)[1]", "path")); - CPPUNIT_ASSERT_MOTIONPATH(sPath2, getXPath(pXmlDocContent, "(//p:animMotion)[2]", "path")); - CPPUNIT_ASSERT_MOTIONPATH(sPath3, getXPath(pXmlDocContent, "(//p:animMotion)[3]", "path")); - CPPUNIT_ASSERT_MOTIONPATH(sPath4, getXPath(pXmlDocContent, "(//p:animMotion)[4]", "path")); + CPPUNIT_ASSERT_MOTIONPATH("M 0.0449285714285714 0.00368253968253968 C 0.0575714285714285 -0.00095238095238096 0.0704264795523803 -0.00370117418637049 0.0831071428571428 -0.00819047619047622 C 0.0953550597998766 -0.0125265741339082 0.107821870086751 -0.010397536991717 0.120321428571429 -0.0115555555555556 C 0.133179018681433 -0.0127467438724762 0.151318627483861 -0.0158700272533852 0.1585 0.00539682539682542 C 0.16478291361998 0.0240029898688431 0.15828642886492 0.0483806254341085 0.161392857142857 0.0698412698412698 C 0.165179286017685 0.0959996731216037 0.17453898927982 0.119735912694626 0.187142857142857 0.132634920634921 C 0.199788991845377 0.145577185161529 0.215607110490848 0.142889773028431 0.230107142857143 0.142857142857143 C 0.243821417584191 0.142826280916829 0.257716514999779 0.142685979556724 0.271142857142857 0.137777777777778 C 0.286895094567923 0.132019309914514 0.302318190711873 0.122962218306185 0.317928571428571 0.11568253968254 C 0.333496771884547 0.108422531222479 0.348787823719556 0.0990570571890929 0.363714285714286 0.0885079365079364 C 0.374930683062651 0.080580865157908 0.385357142857143 0.0693333333333332 0.396178571428571 0.0596825396825396 L 0.404785714285714 0.0410158730158729 L 0.401892857142857 0.0342222222222221 E", getXPath(pXmlDocContent, "(//p:animMotion)[1]", "path")); + CPPUNIT_ASSERT_MOTIONPATH("M 0.025 0.0571428571428571 L 0.0821428571428571 0.184126984126984 L -0.175 0.234920634920635 L -0.246428571428571 -0.0190476190476191 L -0.0821428571428573 -0.133333333333333 E", getXPath(pXmlDocContent, "(//p:animMotion)[2]", "path")); + CPPUNIT_ASSERT_MOTIONPATH("M -0.0107142857142857 0.00634920634920635 C -0.110714285714286 0.501587301587301 -0.153571428571429 -0.00634920634920635 -0.246428571428572 0.184126984126984 C -0.339285714285715 0.374603174603175 -0.296428571428572 0.514285714285714 -0.267857142857143 0.603174603174603 C -0.239285714285715 0.692063492063492 0.0607142857142858 0.590476190476191 0.0607142857142858 0.590476190476191 E", getXPath(pXmlDocContent, "(//p:animMotion)[3]", "path")); + CPPUNIT_ASSERT_MOTIONPATH("M 0.0535714285714286 -0.0444444444444444 L 0.132142857142857 -0.0444444444444444 L 0.132142857142857 -0.146031746031746 L 0.0964285714285715 -0.146031746031746 E", getXPath(pXmlDocContent, "(//p:animMotion)[4]", "path")); xDocShRef->DoClose(); } @@ -2616,8 +2606,7 @@ void SdOOXMLExportTest2::testTdf100348_convert_Fontwork2TextWarp() void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX() { - const OUString sPath("/sd/qa/unit/data/pptx/tdf125573_FontWorkScaleX.pptx"); - ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(sPath), PPTX); + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf125573_FontWorkScaleX.pptx"), PPTX); utl::TempFile tempFile; xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); @@ -2698,8 +2687,7 @@ void SdOOXMLExportTest2::testTdf99497_keepAppearanceOfCircleKind() // slide 1 ARC -> arc, slide 2 CUT -> chord, slide 3 SECTION -> pie // Adjustment values need to exist and their values need to correspond to the // original angles. Shape 'arc' needs to be unfilled. - const OUString sPath("/sd/qa/unit/data/odp/tdf99497_CircleKind.odp"); - ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(sPath), ODP); + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf99497_CircleKind.odp"), ODP); utl::TempFile tempFile; xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index f08b60c30193..9496c1eae7c2 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -804,8 +804,7 @@ void SdImportTestSmartArt::testOrgChart() CPPUNIT_ASSERT(xManager.is()); // Without the accompanying fix in place, this test would have failed: this // was just "Manager", and the second paragraph was lost. - OUString aExpected("Manager\nSecond para"); - CPPUNIT_ASSERT_EQUAL(aExpected, xManager->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Manager\nSecond para"), xManager->getString()); uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xManager, uno::UNO_QUERY); uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration(); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 1dc8557cfc2a..c869ce00a1a9 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1430,11 +1430,10 @@ void SdImportTest::testRowHeight() CPPUNIT_ASSERT( pTableObj ); sal_Int32 nHeight; - const OUString sHeight("Height"); uno::Reference< css::table::XTable > xTable(pTableObj->getTable(), uno::UNO_SET_THROW); uno::Reference< css::table::XTableRows > xRows( xTable->getRows(), uno::UNO_SET_THROW); uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW ); - xRefRow->getPropertyValue( sHeight ) >>= nHeight; + xRefRow->getPropertyValue( "Height" ) >>= nHeight; CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight); xDocShRef->DoClose(); @@ -2935,8 +2934,7 @@ void SdImportTest::testTdf122899() // Error was, that the path coordinates of a mso_sptArc shape were read as sal_Int16 // although they are unsigned 16 bit. This leads to wrong positions of start and end // point and results to a huge shape width in the test document. - OUString aSrc="sd/qa/unit/data/ppt/tdf122899_Arc_90_to_91_clockwise.ppt"; - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(aSrc), PPT); + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf122899_Arc_90_to_91_clockwise.ppt"), PPT); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier( xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_MESSAGE("Could not get XDrawPagesSupplier", xDrawPagesSupplier.is()); diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 216bdb7d08b0..52c3b55513be 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -787,8 +787,7 @@ void SdMiscTest::testTdf119956() void SdMiscTest::testTdf98839_ShearVFlipH() { // Loads a document with a sheared shape and mirrors it - const OUString sURL = "sd/qa/unit/data/tdf98839_ShearVFlipH.odg"; - sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(sURL), ODG); + sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf98839_ShearVFlipH.odg"), ODG); sd::GraphicViewShell* pViewShell = static_cast<sd::GraphicViewShell*>(xDocShRef->GetViewShell()); SdPage* pPage = pViewShell->GetActualPage(); SdrObjCustomShape* pShape = static_cast<SdrObjCustomShape*>(pPage->GetObj(0)); @@ -812,8 +811,7 @@ void SdMiscTest::testTdf98839_ShearVFlipH() void SdMiscTest::testTdf130988() { - const OUString sURL("sd/qa/unit/data/tdf130988_3D_create_lathe.odg"); - sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(sURL), ODG); + sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf130988_3D_create_lathe.odg"), ODG); //emulate command .uno:ConvertInto3DLathe sd::ViewShell* pViewShell = xDocShRef->GetViewShell(); @@ -834,8 +832,7 @@ void SdMiscTest::testTdf130988() void SdMiscTest::testTdf131033() { - const OUString sURL("sd/qa/unit/data/tdf131033_3D_SceneSizeIn2d.odg"); - sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(sURL), ODG); + sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf131033_3D_SceneSizeIn2d.odg"), ODG); // The document contains a polygon, so that emulate command .uno:ConvertInto3DLathe // by direct call of ConvertMarkedObjTo3D works. @@ -860,8 +857,7 @@ void SdMiscTest::testTdf129898LayerDrawnInSlideshow() { // Versions LO 6.2 to 6.4 have produced files, where the layer DrawnInSlideshow has // got visible=false and printable=false attributes. Those files should be repaired now. - const OUString sURL = "sd/qa/unit/data/tdf129898_faulty_DrawnInSlideshow.odp"; - sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc(sURL), ODP); + sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("sd/qa/unit/data/tdf129898_faulty_DrawnInSlideshow.odp"), ODP); CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is()); // Verify model diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 40ac14ab27fb..d6567fc9f38d 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -571,8 +571,7 @@ bool CustomAnimationEffect::checkForText( const std::vector<sal_Int32>* paragrap xEnumeration->nextElement() >>= xParaSet; if( xParaSet.is() ) { - const OUString strNumberingLevel( "NumberingLevel" ); - xParaSet->getPropertyValue( strNumberingLevel ) >>= nParaDepth; + xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth; } } } @@ -2180,8 +2179,7 @@ bool EffectSequenceHelper::getParagraphNumberingLevels( const Reference< XShape sal_Int32 nParaDepth = 0; if( xParaSet.is() ) { - const OUString strNumberingLevel( "NumberingLevel" ); - xParaSet->getPropertyValue( strNumberingLevel ) >>= nParaDepth; + xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth; } rParagraphNumberingLevel.push_back( nParaDepth ); diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 25c03daae6ac..3be4e76941f8 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -334,28 +334,21 @@ void CustomAnimationPresets::importResources() Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext ); - const OUString aPropertyPath("/org.openoffice.Office.UI.Effects/UserInterface/Properties" ); - implImportLabels( xConfigProvider, aPropertyPath, maPropertyNameMap ); + implImportLabels( xConfigProvider, "/org.openoffice.Office.UI.Effects/UserInterface/Properties", maPropertyNameMap ); - const OUString aEffectsPath( "/org.openoffice.Office.UI.Effects/UserInterface/Effects" ); - implImportLabels( xConfigProvider, aEffectsPath, maEffectNameMap ); + implImportLabels( xConfigProvider, "/org.openoffice.Office.UI.Effects/UserInterface/Effects", maEffectNameMap ); importEffects(); - const OUString aEntrancePath( "/org.openoffice.Office.UI.Effects/Presets/Entrance" ); - importPresets( xConfigProvider, aEntrancePath, maEntrancePresets ); + importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Entrance", maEntrancePresets ); - const OUString aEmphasisPath( "/org.openoffice.Office.UI.Effects/Presets/Emphasis" ); - importPresets( xConfigProvider, aEmphasisPath, maEmphasisPresets ); + importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Emphasis", maEmphasisPresets ); - const OUString aExitPath( "/org.openoffice.Office.UI.Effects/Presets/Exit" ); - importPresets( xConfigProvider, aExitPath, maExitPresets ); + importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Exit", maExitPresets ); - const OUString aMotionPathsPath( "/org.openoffice.Office.UI.Effects/Presets/MotionPaths" ); - importPresets( xConfigProvider, aMotionPathsPath, maMotionPathsPresets ); + importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/MotionPaths", maMotionPathsPresets ); - const OUString aMiscPath( "/org.openoffice.Office.UI.Effects/Presets/Misc" ); - importPresets( xConfigProvider, aMiscPath, maMiscPresets ); + importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Misc", maMiscPresets ); } catch (const lang::WrappedTargetException&) { diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index bb332e7939ab..0f03615c88f3 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -188,8 +188,7 @@ OUString SAL_CALL SdStyleFamily::getName() throw DisposedException(); OUString aLayoutName( pPage->GetLayoutName() ); - const OUString aSep( SD_LT_SEPARATOR ); - sal_Int32 nIndex = aLayoutName.indexOf(aSep); + sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR); if( nIndex != -1 ) aLayoutName = aLayoutName.copy(0, nIndex); diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 2374c69f280d..f40ccb7bcecb 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -181,8 +181,7 @@ bool SdPPTFilter::Import() xDualStorage = pStorage->OpenSotStorage( sDualStorage, StreamMode::STD_READ ); pStorage = xDualStorage; } - OUString sDRMContent("\011DRMContent"); - if (pStorage->IsContained(sDRMContent)) + if (pStorage->IsContained("\011DRMContent")) { // Document is DRM encrypted pStorage = lcl_DRMDecrypt(mrMedium, pStorage, aDecryptedStorageStrm); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 9b20d9d7b322..c129d35d0974 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -943,8 +943,7 @@ bool SdXMLFilter::Export() xProps->setPropertyValue( "UseCommonStoragePasswordEncryption", uno::makeAny( true ) ); - const OUString sStreamName( "StreamName"); - xInfoSet->setPropertyValue( sStreamName, Any( sDocName ) ); + xInfoSet->setPropertyValue( "StreamName", Any( sDocName ) ); } xWriter->setOutputStream( xDocOut ); diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index f16751c0085c..4ec1e83b190d 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -459,8 +459,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq ) //we start without wizard //check whether we should load a template document - const OUString aServiceName( "com.sun.star.presentation.PresentationDocument" ); - OUString aStandardTemplate( SfxObjectFactory::GetStandardTemplate( aServiceName ) ); + OUString aStandardTemplate( SfxObjectFactory::GetStandardTemplate( "com.sun.star.presentation.PresentationDocument" ) ); if( !aStandardTemplate.isEmpty() ) { diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 803f55810c9f..cd25de214631 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -271,8 +271,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, weld::Button&, rButton, void ) { bDisableCtrls = true; m_xBtnStop->set_sensitive(true); - OUString const aStr("Animator:"); // here we should think about something smart - pProgress.reset(new SfxProgress( nullptr, aStr, nFullTime )); + pProgress.reset(new SfxProgress( nullptr, "Animator:", nFullTime )); // "Animator:" here we should think about something smart } sal_uLong nTmpTime = 0; diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index 37fa11ece19c..d36adcd5b8ad 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -74,8 +74,7 @@ void SdInsertPagesObjsDlg::Reset() } else { - OUString sImgText(BMP_DOC_TEXT); - m_xLbTree->InsertEntry(m_rName, sImgText); + m_xLbTree->InsertEntry(m_rName, BMP_DOC_TEXT); } m_xCbxMasters->set_active(true); diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 8ef2d9533e39..667a5a97e8f1 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -288,8 +288,6 @@ void DrawDocShell::Execute( SfxRequest& rReq ) const OUString aSelectionLangPrefix("Current_"); const OUString aParagraphLangPrefix("Paragraph_"); const OUString aDocumentLangPrefix("Default_"); - const OUString aStrNone("LANGUAGE_NONE"); - const OUString aStrResetLangs("RESET_LANGUAGES"); bool bSelection = false; bool bParagraph = false; @@ -300,9 +298,9 @@ void DrawDocShell::Execute( SfxRequest& rReq ) { aNewLangTxt = aNewLangTxt.replaceAt( nPos, aDocumentLangPrefix.getLength(), "" ); - if (aNewLangTxt == aStrNone) + if (aNewLangTxt == "LANGUAGE_NONE") lcl_setLanguage( pDoc, OUString(), true ); - else if (aNewLangTxt == aStrResetLangs) + else if (aNewLangTxt == "RESET_LANGUAGES") lcl_setLanguage( pDoc, OUString() ); else lcl_setLanguage( pDoc, aNewLangTxt ); @@ -374,8 +372,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) if (pItem2) sIgnoreText = pItem2->GetValue(); - const OUString sSpellingType("Spelling"); - if(sIgnoreText == sSpellingType) + if(sIgnoreText == "Spelling") { ESelection aOldSel = rEditView.GetSelection(); rEditView.SpellIgnoreWord(); diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index a916ab0dad28..acb012fdbf1a 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -174,8 +174,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) lcl_AddFilter( aFilterVector, pFilter ); // get Powerpoint filter - OUString aExt = ".ppt"; - pFilter = aMatch.GetFilter4Extension( aExt ); + pFilter = aMatch.GetFilter4Extension( ".ppt" ); lcl_AddFilter( aFilterVector, pFilter ); // Get other draw/impress filters diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index 150791213b13..67653997278d 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -70,9 +70,6 @@ std::shared_ptr<CacheConfiguration> CacheConfiguration::Instance() CacheConfiguration::CacheConfiguration() { // Get the cache size from configuration. - const OUString sPathToImpressConfigurationRoot("/org.openoffice.Office.Impress/"); - const OUString sPathToNode("MultiPaneGUI/SlideSorter/PreviewCache"); - try { // Obtain access to the configuration. @@ -82,7 +79,7 @@ CacheConfiguration::CacheConfiguration() // Obtain access to Impress configuration. Sequence<Any> aCreationArguments(comphelper::InitAnyPropertySequence( { - {"nodepath", makeAny(sPathToImpressConfigurationRoot)}, + {"nodepath", makeAny(OUString("/org.openoffice.Office.Impress/"))}, {"depth", makeAny(sal_Int32(-1))} })); @@ -96,7 +93,7 @@ CacheConfiguration::CacheConfiguration() return; // Get the node for the slide sorter preview cache. - mxCacheNode.set( xHierarchy->getByHierarchicalName(sPathToNode), UNO_QUERY); + mxCacheNode.set( xHierarchy->getByHierarchicalName("MultiPaneGUI/SlideSorter/PreviewCache"), UNO_QUERY); } catch (RuntimeException &) { diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 277ff844acad..d8ff97b9dea4 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -109,8 +109,7 @@ TableDesignWidget::TableDesignWidget(weld::Builder& rBuilder, ViewShellBase& rBa Reference< XController > xController( mrBase.GetController(), UNO_SET_THROW ); Reference< XStyleFamiliesSupplier > xFamiliesSupp( xController->getModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() ); - const OUString sFamilyName( "table" ); - mxTableFamily.set( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); + mxTableFamily.set( xFamilies->getByName( "table" ), UNO_QUERY_THROW ); } catch (const Exception&) { @@ -717,8 +716,7 @@ void TableDesignWidget::FillDesignPreviewControl() Reference< XPropertySet > xPageSet( mxView->getCurrentPage(), UNO_QUERY ); if( xPageSet.is() ) { - const OUString sIsBackgroundDark( "IsBackgroundDark" ); - xPageSet->getPropertyValue(sIsBackgroundDark) >>= bIsPageDark; + xPageSet->getPropertyValue("IsBackgroundDark") >>= bIsPageDark; } } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 3551d7e5b552..6f66b1958b8d 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2778,9 +2778,8 @@ void SdMasterPage::setBackground( const Any& rValue ) { Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW ); Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ) ; - OUString aStyleName(sUNO_PseudoSheet_Background); - Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( aStyleName ), UNO_QUERY_THROW ); + Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( sUNO_PseudoSheet_Background ), UNO_QUERY_THROW ); Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_SET_THROW ); Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY ); @@ -2872,8 +2871,7 @@ void SdMasterPage::getBackground( Any& rValue ) Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_SET_THROW ); Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ); - const OUString aStyleName(sUNO_PseudoSheet_Background); - rValue <<= Reference< beans::XPropertySet >( xFamily->getByName( aStyleName ), UNO_QUERY_THROW ); + rValue <<= Reference< beans::XPropertySet >( xFamily->getByName( sUNO_PseudoSheet_Background ), UNO_QUERY_THROW ); } else { |