diff options
Diffstat (limited to 'sw')
89 files changed, 177 insertions, 177 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 391f97a340c6..760fc7f8abe7 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -207,7 +207,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener void ExecuteFormatAllDialog(SwView& rView); void FormatAll(const SfxItemSet &rNewAttr); - void Hide( const OUString& rAuthor ); + void Hide( std::u16string_view rAuthor ); void Hide(); void Show(); void UpdateResolvedStatus(const sw::annotation::SwAnnotationWin* topNote); diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index be11b793f1af..05921ad7a454 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -91,7 +91,7 @@ public: } void GetAllEntryIdentifiers( std::vector<OUString>& rToFill ) const; - SwAuthEntry* GetEntryByIdentifier(const OUString& rIdentifier) const; + SwAuthEntry* GetEntryByIdentifier(std::u16string_view rIdentifier) const; bool ChangeEntryContent(const SwAuthEntry* pNewEntry); // import interface diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx index c7cb40e09694..1e3c2c506b11 100644 --- a/sw/inc/cellfml.hxx +++ b/sw/inc/cellfml.hxx @@ -84,7 +84,7 @@ typedef void (SwTableFormula::*FnScanFormula)( const SwTable&, OUStringBuffer&, OUString ScanString( FnScanFormula fnFormula, const SwTable& rTable, void*) const; - static const SwTable* FindTable( SwDoc& rDoc, const OUString& rNm ); + static const SwTable* FindTable( SwDoc& rDoc, std::u16string_view rNm ); protected: enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME }; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 572afdfd4f51..2fbb94509c6e 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -759,7 +759,7 @@ public: // is the whole document protected/hidden (for UI...) bool IsAllProtect() const { return m_bAllProtect; } - bool GotoRegion( const OUString& rName ); + bool GotoRegion( std::u16string_view rName ); // show the current selection virtual void MakeSelVisible(); @@ -786,7 +786,7 @@ public: bool SelectTextAttr( sal_uInt16 nWhich, bool bExpand, const SwTextAttr* pAttr = nullptr ); bool GotoINetAttr( const SwTextINetFormat& rAttr ); - const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const; + const SwFormatINetFormat* FindINetAttr( std::u16string_view rName ) const; bool SelectText( const sal_Int32 nStart, const sal_Int32 nEnd ); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 75ab76a7c471..1cf15c399293 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -756,18 +756,18 @@ public: // Remove all language dependencies from all existing formats void RemoveAllFormatLanguageDependencies(); - static SwFormat* FindFormatByName(const SwFormatsBase& rFormatArr, const OUString& rName); + static SwFormat* FindFormatByName(const SwFormatsBase& rFormatArr, std::u16string_view rName); SwFrameFormat *MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast = false, bool bAuto = true); void DelFrameFormat( SwFrameFormat *pFormat, bool bBroadcast = false ); - SwFrameFormat* FindFrameFormatByName( const OUString& rName ) const; + SwFrameFormat* FindFrameFormatByName( std::u16string_view rName ) const; SwCharFormat *MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast = false ); void DelCharFormat(size_t nFormat, bool bBroadcast = false); void DelCharFormat(SwCharFormat const * pFormat, bool bBroadcast = false); - SwCharFormat* FindCharFormatByName( const OUString& rName ) const + SwCharFormat* FindCharFormatByName( std::u16string_view rName ) const { return static_cast<SwCharFormat*>(FindFormatByName( *mpCharFormatTable, rName )); } // Formatcollections (styles) @@ -795,7 +795,7 @@ public: const bool bReset = true, const bool bResetListAttrs = false, SwRootFrame const* pLayout = nullptr); - SwTextFormatColl* FindTextFormatCollByName( const OUString& rName ) const + SwTextFormatColl* FindTextFormatCollByName( std::u16string_view rName ) const { return static_cast<SwTextFormatColl*>(FindFormatByName( *mpTextFormatCollTable, rName )); } void ChkCondColls(); @@ -813,7 +813,7 @@ public: SwFrameFormat& GetTableFrameFormat(size_t nFormat, bool bUsed ) const; SwTableFormat* MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom); void DelTableFrameFormat( SwTableFormat* pFormat ); - SwTableFormat* FindTableFormatByName( const OUString& rName, bool bAll = false ) const; + SwTableFormat* FindTableFormatByName( std::u16string_view rName, bool bAll = false ) const; /** Access to frames. Iterate over Flys - for Basic-Collections. */ @@ -1077,7 +1077,7 @@ public: bool bBroadcast = false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode = SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); - sal_uInt16 FindNumRule( const OUString& rName ) const; + sal_uInt16 FindNumRule( std::u16string_view rName ) const; SwNumRule* FindNumRulePtr( const OUString& rName ) const; // Deletion only possible if Rule is not used! @@ -1268,7 +1268,7 @@ public: const SwTable* pCpyTable, bool bCpyName = false, bool bCorrPos = false ); - void UnProtectCells( const OUString& rTableName ); + void UnProtectCells( std::u16string_view rTableName ); bool UnProtectCells( const SwSelBoxes& rBoxes ); void UnProtectTables( const SwPaM& rPam ); bool HasTableAnyProtection( const SwPosition* pPos, @@ -1285,7 +1285,7 @@ public: sal_uInt16 nMode = 0 ); // Make charts of given table update. - void UpdateCharts( const OUString &rName ) const; + void UpdateCharts( std::u16string_view rName ) const; // Update all charts, for that exists any table. void UpdateAllCharts() { DoUpdateAllCharts(); } @@ -1294,7 +1294,7 @@ public: void SetTableName( SwFrameFormat& rTableFormat, const OUString &rNewName ); // @return the reference in document that is set for name. - const SwFormatRefMark* GetRefMark( const OUString& rName ) const; + const SwFormatRefMark* GetRefMark( std::u16string_view rName ) const; // @return RefMark via index - for UNO. const SwFormatRefMark* GetRefMark( sal_uInt16 nIndex ) const; @@ -1390,7 +1390,7 @@ public: SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return mpACEWord.get(); } void DeleteAutoCorrExceptWord(); - const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const; + const SwFormatINetFormat* FindINetAttr( std::u16string_view rName ) const; // Call into intransparent Basic; expect possible Return String. void ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index ff7393292eb5..40a63023f8ac 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -294,7 +294,7 @@ public: SwCharFormat* GetCurCharFormat() const; void FillByEx(SwCharFormat*); SwCharFormat* MakeCharFormat( const OUString& rName ); - SwCharFormat* FindCharFormatByName( const OUString& rName ) const; + SwCharFormat* FindCharFormatByName( std::u16string_view rName ) const; /* FormatCollections (new) - Explaining the general naming pattern: * GetXXXCount() returns the count of xxx in the document. @@ -337,7 +337,7 @@ public: SwTextFormatColl *MakeTextFormatColl(const OUString &rFormatCollName, SwTextFormatColl *pDerivedFrom = nullptr); void FillByEx(SwTextFormatColl*); - SwTextFormatColl* FindTextFormatCollByName( const OUString& rName ) const; + SwTextFormatColl* FindTextFormatCollByName( std::u16string_view rName ) const; /// @return "Auto-Collection" with given Id. If it does not exist create it. SwTextFormatColl* GetTextCollFromPool( sal_uInt16 nId ); @@ -676,13 +676,13 @@ public: svt::EmbeddedObjectRef& GetOLEObject() const; /// Is there an OLEObject with this name (SwFormat)? - bool HasOLEObj( const OUString &rName ) const; + bool HasOLEObj( std::u16string_view rName ) const; /// @return pointer to the data of the chart in which Cursr is. void SetChartName( const OUString &rName ); /// Update content of all charts for table with given name. - void UpdateCharts( const OUString &rName ); + void UpdateCharts( std::u16string_view rName ); OUString GetCurWord() const; @@ -806,7 +806,7 @@ public: void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd ); /// @return reference set in document according to given name. - const SwFormatRefMark* GetRefMark( const OUString& rName ) const; + const SwFormatRefMark* GetRefMark( std::u16string_view rName ) const; /** @return names of all references set in document. If ArrayPointer == 0 then return only whether a RefMark is set in document. */ diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index d04799bcf7fd..8a64b121e76c 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -109,7 +109,7 @@ public: bool IsDefault() const { return DerivedFrom() == nullptr; } const OUString& GetName() const { return m_aFormatName; } - bool HasName(const OUString &rName) const { return m_aFormatName == rName; } + bool HasName(std::u16string_view rName) const { return m_aFormatName == rName; } virtual void SetName( const OUString& rNewName, bool bBroadcast=false ); /// For querying the attribute array. diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx index 53abd6872486..534b3c1f2bb5 100644 --- a/sw/inc/iodetect.hxx +++ b/sw/inc/iodetect.hxx @@ -28,11 +28,11 @@ #define FILTER_RTF "RTF" ///< RTF filter #define sRtfWH "WH_RTF" -#define FILTER_TEXT "TEXT" ///< text filter with default codeset +#define FILTER_TEXT u"TEXT" ///< text filter with default codeset #define FILTER_BAS "BAS" ///< StarBasic (identical to ANSI) #define FILTER_WW8 "CWW8" ///< WinWord 97 filter #define FILTER_TEXT_DLG "TEXT_DLG" ///< text filter with encoding dialog -#define FILTER_XML "CXML" ///< XML filter +#define FILTER_XML u"CXML" ///< XML filter #define FILTER_XMLV "CXMLV" ///< XML filter #define FILTER_XMLVW "CXMLVWEB" ///< XML filter #define FILTER_DOCX "OXML" @@ -92,7 +92,7 @@ class SwIoSystem public: /// find for an internal format name the corresponding filter entry SW_DLLPUBLIC static std::shared_ptr<const SfxFilter> - GetFilterOfFormat( const OUString& rFormat, + GetFilterOfFormat( std::u16string_view rFormat, const SfxFilterContainer* pCnt = nullptr ); /** Detect for the given file which filter should be used. The filter name diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 44bb7ee33b52..7f2eaa9c9d53 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -267,7 +267,7 @@ public: /// Given a SwNode return the pagedesc in use at that location. static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd); - static SwPageDesc* GetByName(SwDoc& rDoc, const OUString& rName); + static SwPageDesc* GetByName(SwDoc& rDoc, std::u16string_view rName); SwPageDesc& operator=( const SwPageDesc& ); @@ -280,9 +280,9 @@ public: namespace std { template<> struct less<SwPageDesc*> { - bool operator()(const SwPageDesc *pPageDesc, const OUString &rName) const + bool operator()(const SwPageDesc *pPageDesc, std::u16string_view rName) const { return pPageDesc->GetName() < rName; } - bool operator()(const OUString &rName, const SwPageDesc *pPageDesc) const + bool operator()(std::u16string_view rName, const SwPageDesc *pPageDesc) const { return rName < pPageDesc->GetName(); } bool operator()(const SwPageDesc *lhs, const SwPageDesc *rhs) const { return lhs->GetName() < rhs->GetName(); } diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 9aa390386221..234b0196d68e 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -175,7 +175,7 @@ public: bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( false, nCnt ); } virtual bool GotoTable( const OUString& rName ); bool GotoTableBox( const OUString& rName ); - bool GotoRegion( const OUString& rName ); + bool GotoRegion( std::u16string_view rName ); bool GotoFootnoteAnchor(); bool GotoFootnoteText(); bool GotoNextFootnoteAnchor(); diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index 0a6866c3cb2a..2873f51e9196 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -292,7 +292,7 @@ public: std::unique_ptr<SwTableAutoFormat> ReleaseAutoFormat(const OUString& rName); /// Find table style with the provided name, return nullptr when not found. - SwTableAutoFormat* FindAutoFormat(const OUString& rName) const; + SwTableAutoFormat* FindAutoFormat(std::u16string_view rName) const; void Load(); bool Save() const; @@ -321,11 +321,11 @@ public: /// Add a copy of rBoxFormat void AddBoxFormat(const SwBoxAutoFormat& rBoxFormat, const OUString& sName); void RemoveBoxFormat(const OUString& sName); - void ChangeBoxFormatName(const OUString& sFromName, const OUString& sToName); + void ChangeBoxFormatName(std::u16string_view sFromName, const OUString& sToName); /// If found returns its name. If not found returns an empty OUString OUString GetBoxFormatName(const SwBoxAutoFormat& rBoxFormat) const; /// If found returns a ptr to a BoxFormat. If not found returns nullptr - SwBoxAutoFormat* GetBoxFormat(const OUString& sName) const; + SwBoxAutoFormat* GetBoxFormat(std::u16string_view sName) const; }; #endif diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 0b40d1e73249..a865a3880d75 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -275,7 +275,7 @@ public: SwXTextTableStyle(SwDocShell* pDocShell, const OUString& rTableAutoFormatName); /// This function looks for a SwTableAutoFormat with given name. Returns nullptr if could not be found. - static SwTableAutoFormat* GetTableAutoFormat(SwDocShell* pDocShell, const OUString& sName); + static SwTableAutoFormat* GetTableAutoFormat(SwDocShell* pDocShell, std::u16string_view sName); /// Returns box format assigned to this style SwTableAutoFormat* GetTableFormat(); void SetPhysical(); diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 676811c5baf3..868710550c2d 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -1403,7 +1403,7 @@ void SwDocTest::testTableAutoFormats() CPPUNIT_ASSERT_EQUAL( size_t(2), aLoadTAFT.size() ); //assert the values - SwTableAutoFormat* pLoadAF = aLoadTAFT.FindAutoFormat( "TestItemStyle" ); + SwTableAutoFormat* pLoadAF = aLoadTAFT.FindAutoFormat( u"TestItemStyle" ); CPPUNIT_ASSERT( pLoadAF ); //GetFont CPPUNIT_ASSERT( bool( pLoadAF->GetBoxFormat(0).GetFont() == aFont ) ); diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 4b6e9c22bd62..e2481d58686b 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -541,7 +541,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader) SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); SwRootFrame* pLayout(pWrtShell->GetLayout()); CPPUNIT_ASSERT(!pLayout->IsHideRedlines()); - pWrtShell->ChangeHeaderOrFooter("Default Page Style", /*bHeader*/ true, /*bOn*/ true, false); + pWrtShell->ChangeHeaderOrFooter(u"Default Page Style", /*bHeader*/ true, /*bOn*/ true, false); CPPUNIT_ASSERT( pWrtShell ->IsInHeaderFooter()); // assume this is supposed to put cursor in the new header... diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 73ce92082e60..3fc4f8e77cf1 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -897,9 +897,9 @@ DECLARE_ODFIMPORT_TEST(testTdf107392, "tdf107392.odt") // as sorting failed. // So instead of 0, 1, 2 these were 2, 0, 1. - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getShapeByName("Bitmap"), "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(getShapeByName("Frame"), "ZOrder")); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(getShapeByName("SVG"), "ZOrder")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Bitmap"), "ZOrder")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Frame"), "ZOrder")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"SVG"), "ZOrder")); } DECLARE_ODFIMPORT_TEST(testTdf100033_1, "tdf100033_1.odt") diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 47307b49789e..99cbb7fa4ee5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -519,7 +519,7 @@ DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx") getParagraphOfText(1, xHeaderText, "This is a header."); // Picture was missing. - uno::Reference<lang::XServiceInfo> xServiceInfo(getShapeByName("Picture 2"), uno::UNO_QUERY); + uno::Reference<lang::XServiceInfo> xServiceInfo(getShapeByName(u"Picture 2"), uno::UNO_QUERY); CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject")); // SmartArt was missing. diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index daaecd43df9f..459d72d38605 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -627,10 +627,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx") auto xShape(getShape(1)); CPPUNIT_ASSERT_MESSAGE("First shape should be visible.", getProperty<bool>(xShape, "Visible")); CPPUNIT_ASSERT_MESSAGE("First shape should be printable.", getProperty<bool>(xShape, "Printable")); - xShape = getShapeByName("Rectangle 1"); + xShape = getShapeByName(u"Rectangle 1"); CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible")); CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable")); - xShape = getShapeByName("Oval 2"); + xShape = getShapeByName(u"Oval 2"); CPPUNIT_ASSERT_MESSAGE("Third shape should be visible.", getProperty<bool>(xShape, "Visible")); CPPUNIT_ASSERT_MESSAGE("Third shape should be printable.", getProperty<bool>(xShape, "Printable")); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index e4287f12e978..e503fe92bf6e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -1055,7 +1055,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf102466, "tdf102466.docx") // check content of the first page { - uno::Reference<beans::XPropertySet> xFrame(getShapeByName("Marco1"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(getShapeByName(u"Marco1"), uno::UNO_QUERY); // no border CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xFrame, "LineWidth")); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index cb00fff1f684..a2391cbe31b3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -244,13 +244,13 @@ DECLARE_OOXMLEXPORT_TEST(testDMLTextFrameVertAdjust, "dml-textframe-vertadjust.d // TextVerticalAdjust attribute so far. // 1st frame's context is adjusted to the top - uno::Reference<beans::XPropertySet> xFrame(getShapeByName("Rectangle 1"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(getShapeByName(u"Rectangle 1"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust")); // 2nd frame's context is adjusted to the center - xFrame.set(getShapeByName("Rectangle 2"), uno::UNO_QUERY); + xFrame.set(getShapeByName(u"Rectangle 2"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_CENTER, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust")); // 3rd frame's context is adjusted to the bottom - xFrame.set(getShapeByName("Rectangle 3"), uno::UNO_QUERY); + xFrame.set(getShapeByName(u"Rectangle 3"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust")); } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index b9f01391e3f2..251bc2dcb952 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -795,7 +795,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx") DECLARE_OOXMLEXPORT_TEST(testTdf106132, "tdf106132.docx") { - uno::Reference<beans::XPropertySet> xShape(getShapeByName("Frame1"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xShape(getShapeByName(u"Frame1"), uno::UNO_QUERY); // This was 250, <wps:bodyPr ... rIns="0" ...> was ignored for an outer shape. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape, "TextRightDistance")); } diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index ec680a69a6ad..e39d475d8718 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1324,7 +1324,7 @@ DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx") DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") { - uno::Reference<drawing::XShapes> xShapes(getShapeByName("Group 219"), uno::UNO_QUERY); + uno::Reference<drawing::XShapes> xShapes(getShapeByName(u"Group 219"), uno::UNO_QUERY); uno::Reference<drawing::XShape> xShape(xShapes->getByIndex(1), uno::UNO_QUERY); uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor = xShape; // Make sure we're not testing the ellipse child. diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 85317503c90a..b0589b913248 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -118,7 +118,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf97038, "tdf97038.docx") { // Without the accompanying fix in place, this test would have failed, as the importer lost the // fLayoutInCell shape property for wrap-though shapes. - CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Kep2"), "IsFollowingTextFlow")); + CPPUNIT_ASSERT(getProperty<bool>(getShapeByName(u"Kep2"), "IsFollowingTextFlow")); } DECLARE_OOXMLIMPORT_TEST(testTdf114212, "tdf114212.docx") @@ -511,8 +511,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf115094v2, "tdf115094v2.docx") { // layoutInCell="1" combined with <wp:wrapNone/> - CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 18"), "IsFollowingTextFlow")); - CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 19"), "IsFollowingTextFlow")); + CPPUNIT_ASSERT(getProperty<bool>(getShapeByName(u"Grafik 18"), "IsFollowingTextFlow")); + CPPUNIT_ASSERT(getProperty<bool>(getShapeByName(u"Grafik 19"), "IsFollowingTextFlow")); } DECLARE_OOXMLIMPORT_TEST(testTdf122224, "tdf122224.docx") diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e1c940a00e7f..399ca38e0ab2 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1354,22 +1354,22 @@ CPPUNIT_TEST_FIXTURE(Test, testFlip) { load(mpTestDocumentPath, "flip.rtf"); comphelper::SequenceAsHashMap aMap = getProperty<uno::Sequence<beans::PropertyValue>>( - getShapeByName("h-and-v"), "CustomShapeGeometry"); + getShapeByName(u"h-and-v"), "CustomShapeGeometry"); // This resulted in a uno::RuntimeException, as MirroredX wasn't set at all, so could not extract void to boolean. CPPUNIT_ASSERT_EQUAL(true, aMap["MirroredX"].get<bool>()); CPPUNIT_ASSERT_EQUAL(true, aMap["MirroredY"].get<bool>()); - aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName("h-only"), + aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName(u"h-only"), "CustomShapeGeometry"); CPPUNIT_ASSERT_EQUAL(true, aMap["MirroredX"].get<bool>()); CPPUNIT_ASSERT(!aMap["MirroredY"].hasValue()); - aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName("v-only"), + aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName(u"v-only"), "CustomShapeGeometry"); CPPUNIT_ASSERT(!aMap["MirroredX"].hasValue()); CPPUNIT_ASSERT_EQUAL(true, aMap["MirroredY"].get<bool>()); - aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName("neither-h-nor-v"), + aMap = getProperty<uno::Sequence<beans::PropertyValue>>(getShapeByName(u"neither-h-nor-v"), "CustomShapeGeometry"); CPPUNIT_ASSERT(!aMap["MirroredX"].hasValue()); CPPUNIT_ASSERT(!aMap["MirroredY"].hasValue()); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 21b3e2f3b958..9e88e37f2aaa 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -2162,7 +2162,7 @@ void SwUiWriterTest::testTextCursorInvalidation() // can't go right in empty header CPPUNIT_ASSERT(!xCursor->goRight(1, false)); // this does not actually delete the header: xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(false)); - pWrtShell->ChangeHeaderOrFooter("Default Page Style", true, false, false); + pWrtShell->ChangeHeaderOrFooter(u"Default Page Style", true, false, false); // must be disposed after deleting header CPPUNIT_ASSERT_THROW(xCursor->goRight(1, false), uno::RuntimeException); } @@ -2506,7 +2506,7 @@ void SwUiWriterTest::testTdf79236() SwDoc* pDoc = createDoc(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); //Getting some paragraph style - SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName("Text Body"); + SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName(u"Text Body"); const SwAttrSet& rAttrSet = pTextFormat->GetAttrSet(); std::unique_ptr<SfxItemSet> pNewSet = rAttrSet.Clone(); sal_uInt16 initialCount = pNewSet->Count(); @@ -2527,7 +2527,7 @@ void SwUiWriterTest::testTdf79236() //Setting the updated item set on the style pDoc->ChgFormat(*pTextFormat, *pNewSet); //Checking the Changes - SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName("Text Body"); + SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName(u"Text Body"); const SwAttrSet& rAttrSet2 = pTextFormat2->GetAttrSet(); const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust(); SvxAdjust Adjust2 = rAdjustItem2.GetAdjust(); @@ -2535,7 +2535,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust2); //Undo the changes rUndoManager.Undo(); - SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName("Text Body"); + SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName(u"Text Body"); const SwAttrSet& rAttrSet3 = pTextFormat3->GetAttrSet(); const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust(); SvxAdjust Adjust3 = rAdjustItem3.GetAdjust(); @@ -2543,7 +2543,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust3); //Redo the changes rUndoManager.Redo(); - SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName("Text Body"); + SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName(u"Text Body"); const SwAttrSet& rAttrSet4 = pTextFormat4->GetAttrSet(); const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust(); SvxAdjust Adjust4 = rAdjustItem4.GetAdjust(); @@ -2551,7 +2551,7 @@ void SwUiWriterTest::testTdf79236() CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4); //Undo the changes rUndoManager.Undo(); - SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName("Text Body"); + SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName(u"Text Body"); const SwAttrSet& rAttrSet5 = pTextFormat5->GetAttrSet(); const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust(); SvxAdjust Adjust5 = rAdjustItem5.GetAdjust(); @@ -2960,7 +2960,7 @@ void SwUiWriterTest::testTdf60967() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); - pWrtShell->ChangeHeaderOrFooter("Default Page Style", true, true, true); + pWrtShell->ChangeHeaderOrFooter(u"Default Page Style", true, true, true); //Inserting table SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0); pWrtShell->InsertTable(TableOpt, 2, 2); @@ -4372,7 +4372,7 @@ void SwUiWriterTest::testTdf86639() { SwDoc* pDoc = createDoc("tdf86639.rtf"); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName("Heading"); + SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName(u"Heading"); pWrtShell->SetTextFormatColl(pColl); OUString aExpected = pColl->GetAttrSet().GetFont().GetFamilyName(); // This was Calibri, should be Liberation Sans. @@ -5690,7 +5690,7 @@ void SwUiWriterTest::testTableStyleUndo() rUndoManager.Redo(); CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1); // check if attributes are preserved - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground)); @@ -5698,7 +5698,7 @@ void SwUiWriterTest::testTableStyleUndo() CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1); - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); // check if attributes are preserved CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground)); @@ -5708,7 +5708,7 @@ void SwUiWriterTest::testTableStyleUndo() // undo delete so we can replace the style rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount +1 ); - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground)); @@ -5717,15 +5717,15 @@ void SwUiWriterTest::testTableStyleUndo() aNewStyle.GetBoxFormat(0).SetBackground(aBackground2); pDoc->ChgTableStyle("Test Style", aNewStyle); - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground2)); rUndoManager.Undo(); - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground)); rUndoManager.Redo(); - pStyle = pDoc->GetTableStyles().FindAutoFormat("Test Style"); + pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style"); CPPUNIT_ASSERT(pStyle); CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground2)); } diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index 895728bd412f..a316f3485777 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testGraphicDescriptorURLBitmap) } static bool ensureAutoTextExistsByTitle(const uno::Reference<text::XAutoTextGroup>& autoTextGroup, - const OUString& autoTextName) + std::u16string_view autoTextName) { const uno::Sequence<OUString> aTitles(autoTextGroup->getTitles()); for (const auto& rTitle : aTitles) @@ -296,7 +296,7 @@ static bool ensureAutoTextExistsByTitle(const uno::Reference<text::XAutoTextGrou } static bool ensureAutoTextExistsByName(const uno::Reference<text::XAutoTextGroup>& autoTextGroup, - const OUString& autoTextName) + std::u16string_view autoTextName) { const uno::Sequence<OUString> aTitles(autoTextGroup->getElementNames()); for (const auto& rTitle : aTitles) diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 9cbae7f83a3a..d63310b661c6 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -90,8 +90,8 @@ DECLARE_WW8IMPORT_TEST(testTdf124601, "tdf124601.doc") { // Without the accompanying fix in place, this test would have failed, as the importer lost the // fLayoutInCell shape property for wrap-though shapes. - CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 18"), "IsFollowingTextFlow")); - CPPUNIT_ASSERT(getProperty<bool>(getShapeByName("Grafik 19"), "IsFollowingTextFlow")); + CPPUNIT_ASSERT(getProperty<bool>(getShapeByName(u"Grafik 18"), "IsFollowingTextFlow")); + CPPUNIT_ASSERT(getProperty<bool>(getShapeByName(u"Grafik 19"), "IsFollowingTextFlow")); } DECLARE_WW8IMPORT_TEST(testImageLazyRead, "image-lazy-read.doc") diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index cff9a4ca14c1..faaad80c6a7c 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -333,7 +333,7 @@ protected: css::uno::Reference<css::drawing::XShape> getShape(int number); /// Get shape by name - css::uno::Reference<css::drawing::XShape> getShapeByName(const OUString& aName); + css::uno::Reference<css::drawing::XShape> getShapeByName(std::u16string_view aName); /// Get TextFrame by name css::uno::Reference<css::drawing::XShape> getTextFrameByName(const OUString& aName); diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index b520967b21f4..b69ade4d1b8e 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -440,7 +440,7 @@ uno::Reference<drawing::XShape> SwModelTestBase::getShape(int number) return xShape; } -uno::Reference<drawing::XShape> SwModelTestBase::getShapeByName(const OUString& aName) +uno::Reference<drawing::XShape> SwModelTestBase::getShapeByName(std::u16string_view aName) { uno::Reference<drawing::XShape> xRet; diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 7e27e1ee899a..a41f3ae86799 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2011,7 +2011,7 @@ bool SwCursorShell::GotoINetAttr( const SwTextINetFormat& rAttr ) return bRet; } -const SwFormatINetFormat* SwCursorShell::FindINetAttr( const OUString& rName ) const +const SwFormatINetFormat* SwCursorShell::FindINetAttr( std::u16string_view rName ) const { return mxDoc->FindINetAttr( rName ); } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 190edf13f0a8..07d9061672aa 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -242,7 +242,7 @@ bool SwCursorShell::MoveRegion( SwWhichRegion fnWhichRegion, SwMoveFnCollection return bRet; } -bool SwCursor::GotoRegion( const OUString& rName ) +bool SwCursor::GotoRegion( std::u16string_view rName ) { bool bRet = false; const SwSectionFormats& rFormats = GetDoc().GetSections(); @@ -267,7 +267,7 @@ bool SwCursor::GotoRegion( const OUString& rName ) return bRet; } -bool SwCursorShell::GotoRegion( const OUString& rName ) +bool SwCursorShell::GotoRegion( std::u16string_view rName ) { SwCallLink aLk( *this ); // watch Cursor-Moves;call Link if needed bool bRet = !m_pTableCursor && m_pCurrentCursor->GotoRegion( rName ); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index c971d32f4ac9..9b3b3bb70991 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1043,7 +1043,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting( } /// @return the reference in the doc for the name -const SwFormatRefMark* SwDoc::GetRefMark( const OUString& rName ) const +const SwFormatRefMark* SwDoc::GetRefMark( std::u16string_view rName ) const { for (const SfxPoolItem* pItem : GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK)) { @@ -1200,7 +1200,7 @@ void SwDoc::InvalidateAutoCompleteFlag() aLayout->SetIdleFlags(); } -const SwFormatINetFormat* SwDoc::FindINetAttr( const OUString& rName ) const +const SwFormatINetFormat* SwDoc::FindINetAttr( std::u16string_view rName ) const { for (const SfxPoolItem* pItem : GetAttrPool().GetItemSurrogates(RES_TXTATR_INETFMT)) { diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 0e2cef59555b..053fbad4f3ee 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -117,7 +117,7 @@ void SwDoc::UpdateCharts_( const SwTable& rTable, SwViewShell const & rVSh ) con } } -void SwDoc::UpdateCharts( const OUString &rName ) const +void SwDoc::UpdateCharts( std::u16string_view rName ) const { SwTable* pTmpTable = SwTable::FindTable( FindTableFormatByName( rName ) ); if( pTmpTable ) diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index a27aad094ce2..281e9cb9de64 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -731,7 +731,7 @@ void SwDoc::DelTableFrameFormat( SwTableFormat *pFormat ) delete pFormat; } -SwFrameFormat* SwDoc::FindFrameFormatByName( const OUString& rName ) const +SwFrameFormat* SwDoc::FindFrameFormatByName( std::u16string_view rName ) const { return static_cast<SwFrameFormat*>(FindFormatByName( static_cast<SwFormatsBase&>(*mpFrameFormatTable), rName )); } @@ -1608,7 +1608,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) } SwFormat* SwDoc::FindFormatByName( const SwFormatsBase& rFormatArr, - const OUString& rName ) + std::u16string_view rName ) { SwFormat* pFnd = nullptr; for( size_t n = 0; n < rFormatArr.GetFormatCount(); ++n ) diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index b933843ff6b3..176a1a2a443c 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -207,7 +207,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, switch( eDocType ) { case SPLITDOC_TO_HTML: - pFilter = SwIoSystem::GetFilterOfFormat("HTML"); + pFilter = SwIoSystem::GetFilterOfFormat(u"HTML"); break; default: diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index d84574375112..29905b64a246 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2402,7 +2402,7 @@ SwNumRule* SwDoc::GetNumRuleAtPos(SwPosition& rPos, return pRet; } -sal_uInt16 SwDoc::FindNumRule( const OUString& rName ) const +sal_uInt16 SwDoc::FindNumRule( std::u16string_view rName ) const { for( sal_uInt16 n = mpNumRuleTable->size(); n; ) if( (*mpNumRuleTable)[ --n ]->GetName() == rName ) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 2289b2290f3e..558c8d6f827d 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -992,7 +992,7 @@ std::unique_ptr<SwTableAutoFormat> SwTableAutoFormatTable::ReleaseAutoFormat(con return pRet; } -SwTableAutoFormat* SwTableAutoFormatTable::FindAutoFormat(const OUString& rName) const +SwTableAutoFormat* SwTableAutoFormatTable::FindAutoFormat(std::u16string_view rName) const { for (const auto &rFormat : m_pImpl->m_AutoFormats) { @@ -1218,7 +1218,7 @@ OUString SwCellStyleTable::GetBoxFormatName(const SwBoxAutoFormat& rBoxFormat) c return OUString(); } -SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(const OUString& sName) const +SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(std::u16string_view sName) const { for (size_t i=0; i < m_aCellStyles.size(); ++i) { @@ -1229,7 +1229,7 @@ SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(const OUString& sName) const return nullptr; } -void SwCellStyleTable::ChangeBoxFormatName(const OUString& sFromName, const OUString& sToName) +void SwCellStyleTable::ChangeBoxFormatName(std::u16string_view sFromName, const OUString& sToName) { if (!GetBoxFormat(sToName)) { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index acca43916522..5321d026b2ba 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3944,7 +3944,7 @@ OUString SwDoc::GetUniqueTableName() const return aName + OUString::number( ++nNum ); } -SwTableFormat* SwDoc::FindTableFormatByName( const OUString& rName, bool bAll ) const +SwTableFormat* SwDoc::FindTableFormatByName( std::u16string_view rName, bool bAll ) const { const SwFormat* pRet = nullptr; if( bAll ) @@ -4441,7 +4441,7 @@ bool SwDoc::UnProtectTableCells( SwTable& rTable ) return bChgd; } -void SwDoc::UnProtectCells( const OUString& rName ) +void SwDoc::UnProtectCells( std::u16string_view rName ) { SwTableFormat* pFormat = FindTableFormatByName( rName ); if( pFormat ) diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 49d7e26e9acc..f6b1291bee99 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -135,7 +135,7 @@ std::vector<OUString> lcl_getUsedPageStyles(SwViewShell const * pShell) } /// Search for a field named rFieldName of type rServiceName in xText and return it. -uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, const OUString& rFieldName) +uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, std::u16string_view rFieldName) { uno::Reference<text::XTextField> xField; uno::Reference<container::XEnumerationAccess> xParagraphEnumerationAccess(xText, uno::UNO_QUERY); @@ -172,7 +172,7 @@ uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText> } /// Search for a field named rFieldName of type rServiceName in xText and return true iff found. -bool lcl_hasField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, const OUString& rFieldName) +bool lcl_hasField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, std::u16string_view rFieldName) { return lcl_findField(xText, rServiceName, rFieldName).is(); } @@ -314,7 +314,7 @@ bool lcl_IsParagraphSignatureField(const uno::Reference<frame::XModel>& xModel, uno::Reference<text::XTextField> lcl_findFieldByRDF(const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph, const OUString& sRDFName, - const OUString& sRDFValue) + std::u16string_view sRDFValue) { uno::Reference<container::XEnumerationAccess> xTextPortionEnumerationAccess(xParagraph, uno::UNO_QUERY); if (!xTextPortionEnumerationAccess.is()) @@ -339,7 +339,7 @@ uno::Reference<text::XTextField> lcl_findFieldByRDF(const uno::Reference<frame:: uno::Reference<text::XTextField> xField(xTextField, uno::UNO_QUERY); const std::pair<OUString, OUString> pair = lcl_getRDF(xModel, xField, sRDFName); - if (pair.first == sRDFName && (sRDFValue.isEmpty() || sRDFValue == pair.second)) + if (pair.first == sRDFName && (sRDFValue.empty() || sRDFValue == pair.second)) return xField; } @@ -532,15 +532,15 @@ void lcl_RemoveParagraphMetadataField(const uno::Reference<css::text::XTextField /// Note: must have associated RDF, since classifications are otherwise just metadata fields. bool lcl_IsParagraphClassificationField(const uno::Reference<frame::XModel>& xModel, const uno::Reference<css::text::XTextField>& xField, - const OUString& sKey) + std::u16string_view sKey) { const std::pair<OUString, OUString> rdfPair = lcl_getRDF(xModel, xField, ParagraphClassificationNameRDFName); - return rdfPair.first == ParagraphClassificationNameRDFName && (sKey.isEmpty() || rdfPair.second == sKey); + return rdfPair.first == ParagraphClassificationNameRDFName && (sKey.empty() || rdfPair.second == sKey); } uno::Reference<text::XTextField> lcl_FindParagraphClassificationField(const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph, - const OUString& sKey = OUString()) + std::u16string_view sKey = u"") { uno::Reference<text::XTextField> xTextField; @@ -1113,7 +1113,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli if (bHeaderIsNeeded) { - if (!lcl_hasField(xHeaderText, DocInfoServiceName, SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER())) + if (!lcl_hasField(xHeaderText, DocInfoServiceName, OUString(SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER()))) { // Append a field to the end of the header text. uno::Reference<beans::XPropertySet> xField(xMultiServiceFactory->createInstance(DocInfoServiceName), uno::UNO_QUERY); diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index ec03360cdc8f..8f450077cde3 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -146,12 +146,12 @@ const SwFlyFrameFormat* SwEditShell::FindFlyByName( const OUString& rName ) cons return mxDoc->FindFlyByName(rName); } -SwCharFormat* SwEditShell::FindCharFormatByName( const OUString& rName ) const +SwCharFormat* SwEditShell::FindCharFormatByName( std::u16string_view rName ) const { return mxDoc->FindCharFormatByName( rName ); } -SwTextFormatColl* SwEditShell::FindTextFormatCollByName( const OUString& rName ) const +SwTextFormatColl* SwEditShell::FindTextFormatCollByName( std::u16string_view rName ) const { return mxDoc->FindTextFormatCollByName( rName ); } diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 85c065d60fed..2a665015cc50 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -369,7 +369,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const return rOObj.GetObject(); } -bool SwEditShell::HasOLEObj( const OUString &rName ) const +bool SwEditShell::HasOLEObj( std::u16string_view rName ) const { SwStartNode *pStNd; SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 ); @@ -394,7 +394,7 @@ void SwEditShell::SetChartName( const OUString &rName ) pONd->SetChartTableName( rName ); } -void SwEditShell::UpdateCharts( const OUString &rName ) +void SwEditShell::UpdateCharts( std::u16string_view rName ) { GetDoc()->UpdateCharts( rName ); } @@ -438,7 +438,7 @@ const SwDocStat& SwEditShell::GetUpdatedDocStat() } /// get the reference of a given name in the Doc -const SwFormatRefMark* SwEditShell::GetRefMark( const OUString& rName ) const +const SwFormatRefMark* SwEditShell::GetRefMark( std::u16string_view rName ) const { return GetDoc()->GetRefMark( rName ); } diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index d922c1269584..d75b079cf639 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -133,7 +133,7 @@ void SwAuthorityFieldType::GetAllEntryIdentifiers( } SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier( - const OUString& rIdentifier)const + std::u16string_view rIdentifier)const { for (const auto &rpTemp : m_DataArr) { diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 752193225283..04321a37a4f8 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -737,7 +737,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa return aStr.makeStringAndClear(); } -const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) +const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, std::u16string_view rNm ) { const SwFrameFormats& rTableFormats = *rDoc.GetTableFrameFormats(); const SwTable* pTmpTable = nullptr, *pRet = nullptr; diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index fc8b7b08787e..0deff1919ce3 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -400,7 +400,7 @@ static const char* STR_POOLPAGE[] = STR_POOLPAGE_LANDSCAPE }; -SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) +SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, std::u16string_view rName) { const size_t nDCount = rDoc.GetPageDescCnt(); diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 811f1b19331b..0cc2948231a5 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -293,7 +293,7 @@ public: TextFrameIndex GetParLen() const; // For Prepare() - bool UpdateQuoVadis( const OUString &rQuo ); + bool UpdateQuoVadis( std::u16string_view rQuo ); // Flags void SetFly() { m_bFlys = true; } diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index ecab7583e3b0..19880e023d7f 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -1529,7 +1529,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo ) /** * Is called in SwTextFrame::Prepare() */ -bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo ) +bool SwParaPortion::UpdateQuoVadis( std::u16string_view rQuo ) { SwLineLayout *pLay = this; while( pLay->GetNext() ) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index e4cd823d74e0..6b00cf30e9cd 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1756,9 +1756,9 @@ SwTextField* SwTextNode::GetFieldTextAttrAt( return pTextField; } -static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, const OUString& rName ) +static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, std::u16string_view rName ) { - if( !rName.isEmpty() ) + if( !rName.empty() ) { const size_t nArrLen = pCharFormats->size(); for( size_t i = 1; i < nArrLen; i++ ) diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 8bc55cc0487e..8004c18ee579 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -318,7 +318,7 @@ static bool GetTableAndCellsFromRangeRep( return bSuccess; } -static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName, +static void GetTableByName( const SwDoc &rDoc, std::u16string_view rTableName, SwFrameFormat **ppTableFormat, SwTable **ppTable) { SwFrameFormat *pTableFormat = nullptr; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 0049636a85d7..2f1d9d6f7e3d 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -208,7 +208,7 @@ namespace sw SfxStyleSheetBasePool* m_pBasePool; SwDocShell* m_pDocShell; - SwXStyle* FindStyle(const OUString& rStyleName) const; + SwXStyle* FindStyle(std::u16string_view rStyleName) const; sal_Int32 GetCountOrName(OUString* pString, sal_Int32 nIndex = SAL_MAX_INT32) { return m_rEntry.m_fGetCountOrName(*m_pDocShell->GetDoc(), pString, nIndex); }; static const StyleFamilyEntry& InitEntry(SfxStyleFamily eFamily) @@ -1090,7 +1090,7 @@ uno::Any SAL_CALL XStyleFamily::getPropertyValue( const OUString& sPropertyName } -SwXStyle* XStyleFamily::FindStyle(const OUString& rStyleName) const +SwXStyle* XStyleFamily::FindStyle(std::u16string_view rStyleName) const { const size_t nLCount = m_pBasePool->GetSizeOfVector(); for(size_t i = 0; i < nLCount; ++i) @@ -4367,7 +4367,7 @@ SwTableAutoFormat* SwXTextTableStyle::GetTableFormat() return m_pTableAutoFormat; } -SwTableAutoFormat* SwXTextTableStyle::GetTableAutoFormat(SwDocShell* pDocShell, const OUString& sName) +SwTableAutoFormat* SwXTextTableStyle::GetTableAutoFormat(SwDocShell* pDocShell, std::u16string_view sName) { const size_t nStyles = pDocShell->GetDoc()->GetTableStyles().size(); for(size_t i=0; i < nStyles; ++i) diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 04466aa80648..960497b8d27f 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -66,7 +66,7 @@ OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr ) return OUString(); } -std::shared_ptr<const SfxFilter> SwIoSystem::GetFilterOfFormat(const OUString& rFormatNm, +std::shared_ptr<const SfxFilter> SwIoSystem::GetFilterOfFormat(std::u16string_view rFormatNm, const SfxFilterContainer* pCnt) { SfxFilterContainer aCntSw( sSWRITER ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index ad61fc767b41..c15f17493fad 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2588,7 +2588,7 @@ const NameToId constNameToIdMapping[] = { OUString("styleSet"), FSNS( XML_w14, XML_styleSet ) }, }; -std::optional<sal_Int32> lclGetElementIdForName(const OUString& rName) +std::optional<sal_Int32> lclGetElementIdForName(std::u16string_view rName) { for (auto const & i : constNameToIdMapping) { diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b98b8bda7f42..d7925942c954 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4932,7 +4932,7 @@ void WW8Customizations::Import( SwDocShell* pShell ) } } -void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache ) +void SwWW8ImplReader::ReadGlobalTemplateSettings( std::u16string_view sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache ) { if (utl::ConfigManager::IsFuzzing()) return; @@ -4957,7 +4957,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, aURL = rGlobalTemplate; else osl::FileBase::getFileURLFromSystemPath( rGlobalTemplate, aURL ); - if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom == aURL ) ) + if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.empty() && sCreatedFrom == aURL ) ) continue; // don't try and read the same document as ourselves tools::SvRef<SotStorage> rRoot = new SotStorage( aURL, StreamMode::STD_READWRITE ); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 07beb3592bff..7629d2e5a63d 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1695,7 +1695,7 @@ private: // #i84783# // determine object attribute "Layout in Table Cell" bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const; - void ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap ); + void ReadGlobalTemplateSettings( std::u16string_view sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap ); SwWW8ImplReader(const SwWW8ImplReader &) = delete; SwWW8ImplReader& operator=(const SwWW8ImplReader&) = delete; public: // really private, but can only be done public @@ -1896,7 +1896,7 @@ public: // really private, but can only be done public void SetNCurrentColl( sal_uInt16 nColl ) { m_nCurrentColl = nColl; } std::unique_ptr<SfxItemSet> SetCurrentItemSet(std::unique_ptr<SfxItemSet> pItemSet); sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ; - const SwFormat* GetStyleWithOrgWWName( OUString const & rName ) const ; + const SwFormat* GetStyleWithOrgWWName( std::u16string_view rName ) const ; static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc); static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index bf5a27528b6e..6bc5b6866f21 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3566,7 +3566,7 @@ sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const return nRes; } -const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( OUString const & rName ) const +const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( std::u16string_view rName ) const { SwFormat* pRet = nullptr; if( !m_vColl.empty() ) diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 99ff2933ad97..91aa7e048637 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -374,7 +374,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper() } void XMLRedlineImportHelper::Add( - const OUString& rType, + std::u16string_view rType, const OUString& rId, const OUString& rAuthor, const OUString& rComment, diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx index 4a479a9cc38e..38eff4dc56e6 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx @@ -75,7 +75,7 @@ public: // (The redline will be inserted into the document after both start // and end cursor has been set.) void Add( - const OUString& rType, // redline type (insert, del,... ) + std::u16string_view rType, // redline type (insert, del,... ) const OUString& rId, // use to identify this redline const OUString& rAuthor, // name of the author const OUString& rComment, // redline comment diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 19db636a54bb..e49624e48273 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -132,7 +132,7 @@ OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable) return OUString(); } -void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTable) +void SwSelectDBTableDialog::SetSelectedTable(std::u16string_view rTable, bool bIsTable) { for (int i = 0, nCount = m_xTable->n_children(); i < nCount; ++i) { diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx index 852a7570d285..01c1edcc49fe 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hxx +++ b/sw/source/ui/dbui/selectdbtabledialog.hxx @@ -37,7 +37,7 @@ public: virtual ~SwSelectDBTableDialog() override; OUString GetSelectedTable(bool& bIsTable); - void SetSelectedTable(const OUString& rTable, bool bIsTable); + void SetSelectedTable(std::u16string_view rTable, bool bIsTable); }; #endif diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 843083c99eb4..14215accd178 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -535,7 +535,7 @@ SwEditRegionDlg::~SwEditRegionDlg( ) } } -void SwEditRegionDlg::SelectSection(const OUString& rSectionName) +void SwEditRegionDlg::SelectSection(std::u16string_view rSectionName) { std::unique_ptr<weld::TreeIter> xIter(m_xTree->make_iterator()); if (!m_xTree->get_iter_first(*xIter)) diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 8aa1d8de9fc9..6dd5c5b1d4b7 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -184,7 +184,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem) } } -SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont) +SwLabRec* SwLabDlg::GetRecord(std::u16string_view rRecName, bool bCont) { SwLabRec* pRec = nullptr; bool bFound = false; diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index e4e44316f9ab..6871bd4b6d26 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -80,7 +80,7 @@ void SwChangeDBDlg::FillDBPopup() Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext); const SwDBData& rDBData = pSh->GetDBData(); - m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, OUString()); + m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, u""); TreeSelect(); Sequence< OUString > aDBNames = xDBContext->getElementNames(); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 99a7d5f05b3b..267d318d8559 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -138,7 +138,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*) if(pSh) { SwDBData aTmp(pSh->GetDBData()); - m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString()); + m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, u""); } } } @@ -506,7 +506,7 @@ void SwFieldDBPage::ActivateMailMergeAddress() m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database))); TypeListBoxHdl(*m_xTypeLB); const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource(); - m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString()); + m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, u""); } void SwFieldDBPage::SetWrtShell(SwWrtShell& rSh) diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 3ea8bb755bbc..cb3339e3c55f 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1081,7 +1081,7 @@ const TextInfo aTextInfoArr[] = {AUTH_FIELD_CUSTOM5, HID_AUTH_FIELD_CUSTOM5 } }; -static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, const OUString& rColumnTitle) +static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, std::u16string_view rColumnTitle) { for(const auto& rField : rFields) { diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 21e131891386..7b173f63e449 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -339,8 +339,8 @@ void SwGlossaryDlg::EnableShortName(bool bOn) } // does the title exist in the selected group? -std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rBlock, - const OUString& rShort) +std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(std::u16string_view rBlock, + std::u16string_view rShort) { // look for possible entry in TreeListBox std::unique_ptr<weld::TreeIter> xEntry = m_xCategoryBox->make_iterator(); @@ -353,7 +353,7 @@ std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rB do { if (rBlock == m_xCategoryBox->get_text(*xEntry) && - (rShort.isEmpty() || + (rShort.empty() || rShort == m_xCategoryBox->get_id(*xEntry)) ) { diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index bef52a28777c..bdaa59f9015f 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -291,7 +291,7 @@ IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OString&, rIdent, void) pPage->Reset(GetOutputItemSet()); } -sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const +sal_uInt16 SwOutlineTabDialog::GetLevel(std::u16string_view rFormatName) const { for(sal_uInt16 i = 0; i < MAXLEVEL; ++i) { diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index c7cfe8446cb0..4e305cc100e5 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -542,7 +542,7 @@ SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName ) } uno::Any -SwVbaDocument::getControlShape( const OUString& sName ) +SwVbaDocument::getControlShape( std::u16string_view sName ) { uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index a5e4dabf8452..0d213690a982 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -38,7 +38,7 @@ private: std::vector<css::uno::Reference< ooo::vba::XSink >> mvSinks; void Initialize(); - css::uno::Any getControlShape( const OUString& sName ); + css::uno::Any getControlShape( std::u16string_view sName ); css::uno::Reference< css::container::XNameAccess > getFormControls() const; public: diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index a2342c9f3d0e..bb135b823c92 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -648,7 +648,7 @@ void SwDocShell::Execute(SfxRequest& rReq) // 3 - file saved in non-HTML -> QueryBox to save as HTML std::shared_ptr<const SfxFilter> pHtmlFlt = SwIoSystem::GetFilterOfFormat( - "HTML", + u"HTML", SwWebDocShell::Factory().GetFilterContainer() ); bool bLocalHasName = HasName(); if(bLocalHasName) @@ -976,7 +976,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for HTML there is only one filter!! pFlt = SwIoSystem::GetFilterOfFormat( - "HTML", + u"HTML", SwWebDocShell::Factory().GetFilterContainer() ); pStrId = STR_LOAD_HTML_DOC; } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index a15f9000883b..c720c3775c8c 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -330,7 +330,7 @@ static SwTableAutoFormat* lcl_FindTableStyle(SwDoc& rDoc, const OUString& rName, return pFormat; } -static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, const OUString& rName, SwDocStyleSheet *pStyle) +static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view rName, SwDocStyleSheet *pStyle) { const SwBoxAutoFormat* pFormat = rDoc.GetCellStyles().GetBoxFormat(rName); diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 4dee21a4ed0c..e47c7dc92c9c 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -164,7 +164,7 @@ void SwDBTreeList::InitTreeList() m_xTreeView->set_image(*m_xScratchIter, aImg); } } - Select(OUString(), OUString(), OUString()); + Select(u"", u"", u""); bInitialized = true; } @@ -320,7 +320,7 @@ OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sa } // Format: database.table -void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, const OUString& rColumnName) +void SwDBTreeList::Select(std::u16string_view rDBName, std::u16string_view rTableName, std::u16string_view rColumnName) { std::unique_ptr<weld::TreeIter> xParent(m_xTreeView->make_iterator()); if (!m_xTreeView->get_iter_first(*xParent)) @@ -345,7 +345,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c m_xTreeView->copy_iterator(*xChild, *xParent); bool bNoChild = false; - if (bShowColumns && !rColumnName.isEmpty()) + if (bShowColumns && !rColumnName.empty()) { if (!m_xTreeView->iter_has_child(*xParent)) { diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index d5153892a0dc..84144c447bbb 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1726,7 +1726,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr) LayoutPostIts(); } -void SwPostItMgr::Hide( const OUString& rAuthor ) +void SwPostItMgr::Hide( std::u16string_view rAuthor ) { for (auto const& postItField : mvPostItFields) { diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 42ac135fedcd..dcf02a29de31 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -373,7 +373,7 @@ SwFieldMgr::~SwFieldMgr() } // organise RefMark by names -bool SwFieldMgr::CanInsertRefMark( const OUString& rStr ) +bool SwFieldMgr::CanInsertRefMark( std::u16string_view rStr ) { bool bRet = false; SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : lcl_GetShell(); diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx index 863ac1a40083..651654bb9843 100644 --- a/sw/source/uibase/inc/dbtree.hxx +++ b/sw/source/uibase/inc/dbtree.hxx @@ -45,8 +45,8 @@ public: OUString GetDBName(OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = nullptr); - void Select( const OUString& rDBName, const OUString& rTableName, - const OUString& rColumnName ); + void Select( std::u16string_view rDBName, std::u16string_view rTableName, + std::u16string_view rColumnName ); void ShowColumns(bool bShowCol); diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 9a701e2a4280..ebc5c4966c09 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -154,7 +154,7 @@ public: bool bIsTable, const OUString& rFieldName); // organise RefMark with names - bool CanInsertRefMark( const OUString& rStr ); + bool CanInsertRefMark( std::u16string_view rStr ); // access to field types via ResId size_t GetFieldTypeCount() const; diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx index 3da5d88617a5..11192ecd6234 100644 --- a/sw/source/uibase/inc/gloslst.hxx +++ b/sw/source/uibase/inc/gloslst.hxx @@ -50,7 +50,7 @@ class SwGlossaryList : public AutoTimer OUString sPath; bool bFilled; - AutoTextGroup* FindGroup(const OUString& rGroupName); + AutoTextGroup* FindGroup(std::u16string_view rGroupName); static void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss); public: @@ -59,7 +59,7 @@ public: void HasLongName(const std::vector<OUString>& rBeginCandidates, std::vector<std::pair<OUString, sal_uInt16>>& rLongNames); - bool GetShortName(const OUString& rLongName, + bool GetShortName(std::u16string_view rLongName, OUString& rShortName, OUString& rGroupName ); size_t GetGroupCount(); diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index 7f0dab68901f..4ac5b6c8e4ec 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -95,7 +95,7 @@ class SwGlossaryDlg : public SfxDialogController void Apply(); void Init(); - std::unique_ptr<weld::TreeIter> DoesBlockExist(const OUString& sBlock, const OUString& rShort); + std::unique_ptr<weld::TreeIter> DoesBlockExist(std::u16string_view sBlock, std::u16string_view rShort); void ShowAutoText(const OUString& rGroup, const OUString& rShortName); void ResumeShowAutoText(); diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx index 86d08a2573a1..a7a1c66412c6 100644 --- a/sw/source/uibase/inc/label.hxx +++ b/sw/source/uibase/inc/label.hxx @@ -51,7 +51,7 @@ public: SwDBManager* pDBManager, bool bLabel); virtual ~SwLabDlg() override; - SwLabRec* GetRecord(const OUString &rRecName, bool bCont); + SwLabRec* GetRecord(std::u16string_view rRecName, bool bCont); void GetLabItem(SwLabItem &rItem); SwLabRecs &Recs() { return *m_pRecs; } diff --git a/sw/source/uibase/inc/langhelper.hxx b/sw/source/uibase/inc/langhelper.hxx index 8c93d29d3c36..8efc5931e574 100644 --- a/sw/source/uibase/inc/langhelper.hxx +++ b/sw/source/uibase/inc/langhelper.hxx @@ -38,8 +38,8 @@ namespace SwLangHelper extern void GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet ); extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView const &rView, SwWrtShell &rSh ); - extern void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); - extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage( SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet ); extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView const * pOLV = nullptr ); diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index f9c3c1f15dde..f7702359c3ee 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -56,7 +56,7 @@ public: virtual ~SwOutlineTabDialog() override; SwNumRule* GetNumRule() { return xNumRule.get(); } - sal_uInt16 GetLevel(const OUString &rFormatName) const; + sal_uInt16 GetLevel(std::u16string_view rFormatName) const; OUString* GetCollNames() {return aCollNames;} static sal_uInt16 GetActNumLevel() {return nNumLevel;} diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index adb2681efef2..a16fc1b93f5e 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -110,7 +110,7 @@ public: SwEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh); virtual ~SwEditRegionDlg() override; - void SelectSection(const OUString& rSectionName); + void SelectSection(std::u16string_view rSectionName); }; diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index a8cc9a49d6cb..4499c0c15763 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -358,7 +358,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)(); GetStyle eCreate = GETSTYLE_NOCREATE); SwCharFormat* GetCharStyle(const OUString &rFormatName, GetStyle eCreate = GETSTYLE_NOCREATE); - SwFrameFormat* GetTableStyle(const OUString &rFormatName); + SwFrameFormat* GetTableStyle(std::u16string_view rFormatName); void SetPageStyle(const OUString &rCollName); @@ -475,7 +475,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)(); bool GotoINetAttr( const SwTextINetFormat& rAttr ); void GotoOutline( SwOutlineNodes::size_type nIdx ); bool GotoOutline( const OUString& rName ); - bool GotoRegion( const OUString& rName ); + bool GotoRegion( std::u16string_view rName ); bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, sal_uInt16 nSeqNo = 0 ); bool GotoNextTOXBase( const OUString* pName = nullptr); @@ -483,7 +483,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)(); void GotoFormatField( const SwFormatField& rField ); const SwRangeRedline* GotoRedline( SwRedlineTable::size_type nArrPos, bool bSelect); - void ChangeHeaderOrFooter(const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning); + void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning); virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) override; /// Inserts a new annotation/comment at the current cursor position / selection. diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index c203ace11024..e6a758b37e5c 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -80,7 +80,7 @@ using namespace ::com::sun::star::uno; // Prototypes static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); -static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell const & rSh, const OUString& rName) +static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell const & rSh, std::u16string_view rName) { const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM); for( size_t i = 0; i < nCount; ++i ) diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 53e039f057e1..1be26660c34c 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -217,12 +217,12 @@ namespace SwLangHelper return bRestoreSelection; } - void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage( SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) { SetLanguage( rWrtSh, nullptr , ESelection(), rLangText, bIsForSelection, rCoreSet ); } - void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) { const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText ); if (nLang == LANGUAGE_DONTKNOW) diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index f24bf135c706..ecb2e61bd3f6 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -33,7 +33,7 @@ namespace sw::sidebar { namespace { void renderPreview(sfx2::StyleManager* pStyleManager, OutputDevice& aOutputDevice, - OUString const & sName, sal_Int32 nHeight, tools::Rectangle const & aRect) + std::u16string_view sName, sal_Int32 nHeight, tools::Rectangle const & aRect) { SfxStyleSheetBase* pStyleSheet = pStyleManager->Search(sName, SfxStyleFamily::Para); @@ -98,18 +98,18 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString const & aName) { tools::Rectangle aRenderRect(Point(nMargin, y), aSize); - renderPreview(pStyleManager, *pVirtualDev, "Title", nTitleHeight, aRenderRect); + renderPreview(pStyleManager, *pVirtualDev, u"Title", nTitleHeight, aRenderRect); y += nTitleHeight; } { tools::Rectangle aRenderRect(Point(nMargin, y), aSize); - renderPreview(pStyleManager, *pVirtualDev, "Heading 1", nHeadingHeight, aRenderRect); + renderPreview(pStyleManager, *pVirtualDev, u"Heading 1", nHeadingHeight, aRenderRect); y += nHeadingHeight; } { tools::Rectangle aRenderRect(Point(nMargin, y), aSize); - renderPreview(pStyleManager, *pVirtualDev, "Text Body", nTextBodyHeight, aRenderRect); + renderPreview(pStyleManager, *pVirtualDev, u"Text Body", nTextBodyHeight, aRenderRect); } return pVirtualDev->GetBitmapEx(Point(), aSize); diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index f4c4951f6546..2ba276cf212e 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -104,7 +104,7 @@ public: maStyles.push_back(aRedefinition); } - StyleRedefinition* get(const OUString& aString) + StyleRedefinition* get(std::u16string_view aString) { for (StyleRedefinition & rStyle : maStyles) { @@ -315,7 +315,7 @@ std::vector<FontSet> initFontSets() return aFontSets; } -FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets) +FontSet getFontSet(std::u16string_view rFontVariant, std::vector<FontSet>& aFontSets) { for (const FontSet & rFontSet : aFontSets) { @@ -325,7 +325,7 @@ FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets return aFontSets[0]; } -void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, const OUString& sColorSetName, +void applyTheme(SfxStyleSheetBasePool* pPool, std::u16string_view sFontSetName, std::u16string_view sColorSetName, StyleSet& rStyleSet, svx::ColorSets& rColorSets) { SwDocStyleSheet* pStyle; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 4b83a3d00e95..bf6804075822 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1178,7 +1178,7 @@ void SwView::Execute(SfxRequest &rReq) GetViewFrame()->ShowChildWindow(SID_SIDEBAR); ::sfx2::sidebar::Sidebar::ShowPanel( - "GalleryPanel", + u"GalleryPanel", GetViewFrame()->GetFrame().GetFrameInterface()); break; case SID_AVMEDIA_PLAYER : diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 2ac47cd7efb7..dfaa0b123096 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3092,9 +3092,9 @@ void SwContentTree::HideTree() } static void lcl_SelectByContentTypeAndName(SwContentTree* pThis, weld::TreeView& rContentTree, - const OUString& rContentTypeName, const OUString& rName) + std::u16string_view rContentTypeName, std::u16string_view rName) { - if (!rName.isEmpty()) + if (!rName.empty()) { // find content type entry std::unique_ptr<weld::TreeIter> xIter(rContentTree.make_iterator()); diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index b58335850ad9..8d2dcc2af2d3 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -100,7 +100,7 @@ SwGlossaryList::~SwGlossaryList() // will be filled. Otherwise also rGroupName will be set and // on demand asked for the right group. -bool SwGlossaryList::GetShortName(const OUString& rLongName, +bool SwGlossaryList::GetShortName(std::u16string_view rLongName, OUString& rShortName, OUString& rGroupName ) { if(!bFilled) @@ -336,7 +336,7 @@ void SwGlossaryList::Invoke() Update(); } -AutoTextGroup* SwGlossaryList::FindGroup(const OUString& rGroupName) +AutoTextGroup* SwGlossaryList::FindGroup(std::u16string_view rGroupName) { for(const auto & pRet : aGroupArr) { diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 491a2fcbdb2a..bd076831167d 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -624,7 +624,7 @@ bool SwWrtShell::GotoOutline( const OUString& rName ) return bRet; } -bool SwWrtShell::GotoRegion( const OUString& rName ) +bool SwWrtShell::GotoRegion( std::u16string_view rName ) { SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwCursorShell::GotoRegion (rName); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 8251a9978142..3fb11b740ca4 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1526,7 +1526,7 @@ SwCharFormat *SwWrtShell::GetCharStyle(const OUString &rFormatName, GetStyle eCr // frame format with this name exists or // this is a default format or the format is automatic. -SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName) +SwFrameFormat *SwWrtShell::GetTableStyle(std::u16string_view rFormatName) { for( size_t i = GetTableFrameFormatCount(); i; ) { @@ -1804,7 +1804,7 @@ void SwWrtShell::SetReadonlyOption(bool bSet) // given all styles are changed void SwWrtShell::ChangeHeaderOrFooter( - const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning) + std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning) { SdrView *const pSdrView = GetDrawView(); if (pSdrView && pSdrView->IsTextEdit()) @@ -1821,7 +1821,7 @@ void SwWrtShell::ChangeHeaderOrFooter( { SwPageDesc aDesc( GetPageDesc( nFrom )); OUString sTmp(aDesc.GetName()); - if( rStyleName.isEmpty() || rStyleName == sTmp ) + if( rStyleName.empty() || rStyleName == sTmp ) { bool bChgd = false; @@ -1872,7 +1872,7 @@ void SwWrtShell::ChangeHeaderOrFooter( if ( !IsHeaderFooterEdit() ) ToggleHeaderFooterEdit(); bCursorSet = SetCursorInHdFt( - rStyleName.isEmpty() ? SIZE_MAX : nFrom, + rStyleName.empty() ? SIZE_MAX : nFrom, bHeader ); } } |