diff options
Diffstat (limited to 'sw')
27 files changed, 86 insertions, 86 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index fd408c10c3b2..a0cd4c593082 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -61,7 +61,7 @@ public: static void syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const css::uno::Any& rValue); /// Does the same, but works on properties which lack an sw-specific WID / MemberID. - static void syncProperty(SwFrameFormat* pShape, const OUString& rPropertyName, + static void syncProperty(SwFrameFormat* pShape, std::u16string_view rPropertyName, const css::uno::Any& rValue); /// Get a property of the underlying TextFrame. static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 043446a7c6f0..eb0dbdb0d540 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -116,17 +116,17 @@ namespace SwUnoCursorHelper const bool bForceExpandHints ); /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - void makeRedline( SwPaM const & rPaM, const OUString& RedlineType, + void makeRedline( SwPaM const & rPaM, std::u16string_view RedlineType, const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties ); /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - void makeTableRowRedline( SwTableLine& rTableLine, const OUString& RedlineType, + void makeTableRowRedline( SwTableLine& rTableLine, std::u16string_view RedlineType, const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties ); /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - SW_DLLPUBLIC void makeTableCellRedline( SwTableBox& rTableBox, const OUString& RedlineType, + SW_DLLPUBLIC void makeTableCellRedline( SwTableBox& rTableBox, std::u16string_view RedlineType, const css::uno::Sequence< css::beans::PropertyValue >& RedlineProperties ); /// @param bTableMode: attributes should be applied to a table selection diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 5b3d6bd33408..8fc67fdf5206 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -851,7 +851,7 @@ #define UNO_NAME_CHAR_HIGHLIGHT "CharHighlight" #define UNO_NAME_STYLE_INTEROP_GRAB_BAG "StyleInteropGrabBag" #define UNO_NAME_CHAR_INTEROP_GRAB_BAG "CharInteropGrabBag" -#define UNO_NAME_TEXT_VERT_ADJUST "TextVerticalAdjust" +#define UNO_NAME_TEXT_VERT_ADJUST u"TextVerticalAdjust" #define UNO_NAME_CELL_INTEROP_GRAB_BAG "CellInteropGrabBag" #define UNO_NAME_ROW_INTEROP_GRAB_BAG "RowInteropGrabBag" #define UNO_NAME_TABLE_INTEROP_GRAB_BAG "TableInteropGrabBag" diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 471a9ae8bc3e..693595e76eef 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -70,7 +70,7 @@ namespace sw { CreateParentXText(SwDoc & rDoc, const SwPosition& rPos); bool GetDefaultTextContentValue(css::uno::Any& rAny, - const OUString& rPropertyName, sal_uInt16 nWID = 0); + std::u16string_view rPropertyName, sal_uInt16 nWID = 0); } // namespace sw diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 40a60f6d3e1e..b699c2cd10ae 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -2339,9 +2339,9 @@ void SwUiWriterTest::testDeleteTableRedlines() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount()); uno::Sequence<beans::PropertyValue> aDescriptor; - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("A1"))), "TableCellInsert", aDescriptor); - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("B1"))), "TableCellInsert", aDescriptor); - SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), "TableCellInsert", aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("A1"))), u"TableCellInsert", aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("B1"))), u"TableCellInsert", aDescriptor); + SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), u"TableCellInsert", aDescriptor); IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess(); SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable(); rExtras.DeleteAllTableRedlines(*pDoc, rTable, false, RedlineType::Any); diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index d2359c82a0cc..9df25b47bcfd 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -705,7 +705,7 @@ namespace sw::mark } } - void DropDownFieldmark::SendLOKMessage(const OString& sAction) + void DropDownFieldmark::SendLOKMessage(std::string_view sAction) { const SfxViewShell* pViewShell = SfxViewShell::Current(); if (!pViewShell || pViewShell->isLOKMobilePhone()) diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 476089bc8723..1e276998ca82 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -427,7 +427,7 @@ tools::Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool b return aRet; } -void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPropertyName, +void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rPropertyName, const css::uno::Any& rValue) { // Textframes does not have valid horizontal adjust property, so map it to paragraph adjust property @@ -469,7 +469,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope return; } - if (rPropertyName == "CustomShapeGeometry") + if (rPropertyName == u"CustomShapeGeometry") { // CustomShapeGeometry changes the textbox position offset and size, so adjust both. syncProperty(pShape, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::Any()); diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index d9f9e361bc65..a6c6185c28af 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -214,9 +214,9 @@ bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos, // the reversed caption order in autocaption, solved by #i61007#) static void lcl_formatReferenceLanguage( OUString& rRefText, bool bClosingParenthesis, LanguageType eLang, - const OUString& rReferenceLanguage) + std::u16string_view rReferenceLanguage) { - if (eLang != LANGUAGE_HUNGARIAN || (rReferenceLanguage != "hu" && rReferenceLanguage != "Hu")) + if (eLang != LANGUAGE_HUNGARIAN || (rReferenceLanguage != u"hu" && rReferenceLanguage != u"Hu")) return; // Add Hungarian definitive article (a/az) before references, @@ -334,7 +334,7 @@ static void lcl_formatReferenceLanguage( OUString& rRefText, // lowercase, if rReferenceLanguage == "hu", not "Hu" OUString sArticle; - if ( rReferenceLanguage == "hu" ) + if ( rReferenceLanguage == u"hu" ) sArticle = "a"; else sArticle = "A"; @@ -431,7 +431,7 @@ OUString SwGetRefField::GetFieldName() const static void FilterText(OUString & rText, LanguageType const eLang, - OUString const& rSetReferenceLanguage) + std::u16string_view rSetReferenceLanguage) { // remove all special characters (replace them with blanks) if (rText.isEmpty()) @@ -452,7 +452,7 @@ static void FilterText(OUString & rText, LanguageType const eLang, } } rText = aBuf.makeStringAndClear(); - if (!rSetReferenceLanguage.isEmpty()) + if (!rSetReferenceLanguage.empty()) { lcl_formatReferenceLanguage(rText, false, eLang, rSetReferenceLanguage); } diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 766791f772e1..a73cc31c9874 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -293,7 +293,7 @@ namespace sw::mark { // This method should be called only by the portion so we can now the portion's painting area void SetPortionPaintArea(const SwRect& rPortionPaintArea); - void SendLOKMessage(const OString& sAction); + void SendLOKMessage(std::string_view sAction); private: SwRect m_aPortionPaintArea; diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index 69c407d5b135..7c6ab857eb86 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -288,7 +288,7 @@ public: /// @throws std::exception static css::uno::Any GetPropertyValue( - OUString const& PropertyName, SwRangeRedline const& rRedline); + std::u16string_view PropertyName, SwRangeRedline const& rRedline); /// @throws std::exception static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties( SwRangeRedline const& rRedline, bool const bIsStart); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 0186b5f9613f..99de9745078f 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1226,21 +1226,21 @@ bool DocInsertStringSplitCR( } void makeRedline( SwPaM const & rPaM, - const OUString& rRedlineType, + std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) { IDocumentRedlineAccess& rRedlineAccess = rPaM.GetDoc().getIDocumentRedlineAccess(); RedlineType eType; - if ( rRedlineType == "Insert" ) + if ( rRedlineType == u"Insert" ) eType = RedlineType::Insert; - else if ( rRedlineType == "Delete" ) + else if ( rRedlineType == u"Delete" ) eType = RedlineType::Delete; - else if ( rRedlineType == "Format" ) + else if ( rRedlineType == u"Format" ) eType = RedlineType::Format; - else if ( rRedlineType == "TextTable" ) + else if ( rRedlineType == u"TextTable" ) eType = RedlineType::Table; - else if ( rRedlineType == "ParagraphFormat" ) + else if ( rRedlineType == u"ParagraphFormat" ) eType = RedlineType::ParagraphFormat; else throw lang::IllegalArgumentException(); @@ -1385,17 +1385,17 @@ void makeRedline( SwPaM const & rPaM, } void makeTableRowRedline( SwTableLine& rTableLine, - const OUString& rRedlineType, + std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) { IDocumentRedlineAccess* pRedlineAccess = &rTableLine.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess(); RedlineType eType; - if ( rRedlineType == "TableRowInsert" ) + if ( rRedlineType == u"TableRowInsert" ) { eType = RedlineType::TableRowInsert; } - else if ( rRedlineType == "TableRowDelete" ) + else if ( rRedlineType == u"TableRowDelete" ) { eType = RedlineType::TableRowDelete; } @@ -1434,17 +1434,17 @@ void makeTableRowRedline( SwTableLine& rTableLine, } void makeTableCellRedline( SwTableBox& rTableBox, - const OUString& rRedlineType, + std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue >& rRedlineProperties ) { IDocumentRedlineAccess* pRedlineAccess = &rTableBox.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess(); RedlineType eType; - if ( rRedlineType == "TableCellInsert" ) + if ( rRedlineType == u"TableCellInsert" ) { eType = RedlineType::TableCellInsert; } - else if ( rRedlineType == "TableCellDelete" ) + else if ( rRedlineType == u"TableCellDelete" ) { eType = RedlineType::TableCellDelete; } diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 7aca78714e65..dbb264b51b77 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -289,18 +289,18 @@ static sal_uInt16 lcl_GetPropMapIdForFieldType( SwFieldIds nWhich ) return nId; } -static sal_Int32 lcl_PropName2TokenPos(const OUString& rPropertyName) +static sal_Int32 lcl_PropName2TokenPos(std::u16string_view rPropertyName) { - if (rPropertyName == UNO_NAME_DDE_COMMAND_TYPE) + if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_TYPE) return 0; - if (rPropertyName == UNO_NAME_DDE_COMMAND_FILE) + if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_FILE) return 1; - if (rPropertyName == UNO_NAME_DDE_COMMAND_ELEMENT) + if (rPropertyName == u"" UNO_NAME_DDE_COMMAND_ELEMENT) return 2; - if (rPropertyName == UNO_NAME_IS_AUTOMATIC_UPDATE) + if (rPropertyName == u"" UNO_NAME_IS_AUTOMATIC_UPDATE) return 3; return SAL_MAX_INT32; diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index ab2dcae3e49d..4077e90ab831 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -840,15 +840,15 @@ SwXParagraph::Impl::GetPropertyValuesTolerant_Impl( } bool ::sw::GetDefaultTextContentValue( - uno::Any& rAny, const OUString& rPropertyName, sal_uInt16 nWID) + uno::Any& rAny, std::u16string_view rPropertyName, sal_uInt16 nWID) { if(!nWID) { - if(rPropertyName == UNO_NAME_ANCHOR_TYPE) + if(rPropertyName == u"" UNO_NAME_ANCHOR_TYPE) nWID = FN_UNO_ANCHOR_TYPE; - else if(rPropertyName == UNO_NAME_ANCHOR_TYPES) + else if(rPropertyName == u"" UNO_NAME_ANCHOR_TYPES) nWID = FN_UNO_ANCHOR_TYPES; - else if(rPropertyName == UNO_NAME_TEXT_WRAP) + else if(rPropertyName == u"" UNO_NAME_TEXT_WRAP) nWID = FN_UNO_TEXT_WRAP; else return false; diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 7095280585f1..df3ad38cfffd 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -249,38 +249,38 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } -uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, const SwRangeRedline& rRedline ) +uno::Any SwXRedlinePortion::GetPropertyValue( std::u16string_view rPropertyName, const SwRangeRedline& rRedline ) { uno::Any aRet; - if(rPropertyName == UNO_NAME_REDLINE_AUTHOR) + if(rPropertyName == u"" UNO_NAME_REDLINE_AUTHOR) aRet <<= rRedline.GetAuthorString(); - else if(rPropertyName == UNO_NAME_REDLINE_DATE_TIME) + else if(rPropertyName == u"" UNO_NAME_REDLINE_DATE_TIME) { aRet <<= rRedline.GetTimeStamp().GetUNODateTime(); } - else if(rPropertyName == UNO_NAME_REDLINE_COMMENT) + else if(rPropertyName == u"" UNO_NAME_REDLINE_COMMENT) aRet <<= rRedline.GetComment(); - else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION) + else if(rPropertyName == u"" UNO_NAME_REDLINE_DESCRIPTION) aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr(); - else if(rPropertyName == UNO_NAME_REDLINE_TYPE) + else if(rPropertyName == u"" UNO_NAME_REDLINE_TYPE) { aRet <<= SwRedlineTypeToOUString(rRedline.GetType()); } - else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA) + else if(rPropertyName == u"" UNO_NAME_REDLINE_SUCCESSOR_DATA) { if(rRedline.GetRedlineData().Next()) aRet <<= lcl_GetSuccessorProperties(rRedline); } - else if (rPropertyName == UNO_NAME_REDLINE_IDENTIFIER) + else if (rPropertyName == u"" UNO_NAME_REDLINE_IDENTIFIER) { aRet <<= OUString::number( sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) ); } - else if (rPropertyName == UNO_NAME_IS_IN_HEADER_FOOTER) + else if (rPropertyName == u"" UNO_NAME_IS_IN_HEADER_FOOTER) { aRet <<= rRedline.GetDoc().IsInHeaderFooter( rRedline.GetPoint()->nNode ); } - else if (rPropertyName == UNO_NAME_MERGE_LAST_PARA) + else if (rPropertyName == u"" UNO_NAME_MERGE_LAST_PARA) { aRet <<= !rRedline.IsDelLastPara(); } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 132a4dde5aec..422619dae051 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1139,7 +1139,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl( case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: ::sw::GetDefaultTextContentValue( - pRet[nProperty], OUString(), pEntry->nWID); + pRet[nProperty], u"", pEntry->nWID); break; case FN_UNO_REDLINE_NODE_START: case FN_UNO_REDLINE_NODE_END: @@ -1633,7 +1633,7 @@ SwXTextSection::getPropertyDefault(const OUString& rPropertyName) case FN_UNO_ANCHOR_TYPES: case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: - ::sw::GetDefaultTextContentValue(aRet, OUString(), pEntry->nWID); + ::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID); break; default: if(pFormat && SfxItemPool::IsWhich(pEntry->nWID)) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 1235417db455..e6ee4dac0e1b 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -608,14 +608,14 @@ uno::Sequence< beans::PropertyValue > SwXStyleFamilies::getStyleLoaderOptions() } static bool lcl_GetHeaderFooterItem( - SfxItemSet const& rSet, OUString const& rPropName, bool const bFooter, + SfxItemSet const& rSet, std::u16string_view rPropName, bool const bFooter, SvxSetItem const*& o_rpItem) { SfxItemState eState = rSet.GetItemState( bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, reinterpret_cast<const SfxPoolItem**>(&o_rpItem)); if (SfxItemState::SET != eState && - rPropName == UNO_NAME_FIRST_IS_SHARED) + rPropName == u"" UNO_NAME_FIRST_IS_SHARED) { // fdo#79269 header may not exist, check footer then eState = rSet.GetItemState( (!bFooter) ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 9731df22cd99..90f8894bc08a 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2771,7 +2771,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) case FN_UNO_TEXT_WRAP: case FN_UNO_ANCHOR_TYPE: ::sw::GetDefaultTextContentValue( - aRet, OUString(), pEntry->nWID); + aRet, u"", pEntry->nWID); break; case FN_UNO_RANGE_ROW_LABEL: diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 7b1a5cc19be3..36e246d7dbc1 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -188,7 +188,7 @@ OString lclConvToHex(sal_uInt16 nHex) } } -bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, const OString& rValue) +bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, std::string_view rValue) { if (!bReqIF) return false; @@ -245,10 +245,10 @@ public: } void SwHTMLWriter::OutCSS1_Property( const char *pProp, - const char *pVal, + std::string_view sVal, const OUString *pSVal ) { - if (IgnorePropertyForReqIF(mbReqIF, pProp, pVal)) + if (IgnorePropertyForReqIF(mbReqIF, pProp, sVal)) return; OStringBuffer sOut; @@ -347,8 +347,8 @@ void SwHTMLWriter::OutCSS1_Property( const char *pProp, { // for STYLE-Option encode string Strm().WriteOString( sOut.makeStringAndClear() ); - if( pVal ) - HTMLOutFuncs::Out_String( Strm(), OUString::createFromAscii(pVal), + if( !sVal.empty() ) + HTMLOutFuncs::Out_String( Strm(), OUString::createFromAscii(sVal), m_eDestEnc, &m_aNonConvertableCharacters ); else if( pSVal ) HTMLOutFuncs::Out_String( Strm(), *pSVal, m_eDestEnc, &m_aNonConvertableCharacters ); @@ -356,8 +356,8 @@ void SwHTMLWriter::OutCSS1_Property( const char *pProp, else { // for STYLE-Tag print string directly - if( pVal ) - sOut.append(pVal); + if( !sVal.empty() ) + sOut.append(sVal); else if( pSVal ) sOut.append(OUStringToOString(*pSVal, m_eDestEnc)); } diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 4c5f335597a0..2fab7232e5e0 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2687,7 +2687,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.m_bOutOpts ) return rWrt; - if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-family", OString())) + if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-family", "")) { return rWrt; } @@ -2733,7 +2733,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.m_bOutOpts ) return rWrt; - if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-size", OString())) + if (IgnorePropertyForReqIF(rHTMLWrt.mbReqIF, "font-size", "")) { return rWrt; } diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index ab282ba652ff..e2a1c1d30c85 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -454,9 +454,9 @@ public: inline void OutCSS1_PropertyAscii( const char *pProp, const char *pVal ); inline void OutCSS1_PropertyAscii( const char *pProp, - const OString& rVal ); + std::string_view rVal ); inline void OutCSS1_Property( const char *pProp, const OUString& rVal ); - void OutCSS1_Property( const char *pProp, const char *pVal, + void OutCSS1_Property( const char *pProp, std::string_view pVal, const OUString *pSVal ); void OutCSS1_UnitProperty( const char *pProp, tools::Long nVal ); void OutCSS1_PixelProperty( const char *pProp, tools::Long nVal, bool bVert ); @@ -606,15 +606,15 @@ inline void SwHTMLWriter::OutCSS1_PropertyAscii( const char *pProp, } inline void SwHTMLWriter::OutCSS1_PropertyAscii( const char *pProp, - const OString& rVal ) + std::string_view rVal ) { - OutCSS1_Property( pProp, rVal.getStr(), nullptr ); + OutCSS1_Property( pProp, rVal, nullptr ); } inline void SwHTMLWriter::OutCSS1_Property( const char *pProp, const OUString& rVal ) { - OutCSS1_Property( pProp, nullptr, &rVal ); + OutCSS1_Property( pProp, std::string_view(), &rVal ); } @@ -698,7 +698,7 @@ Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt ); OString GetCSS1_Color(const Color& rColor); /// Determines if rProperty with a given rValue has to be suppressed due to ReqIF mode. -bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, const OString& rValue); +bool IgnorePropertyForReqIF(bool bReqIF, const OString& rProperty, std::string_view rValue); #endif // INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9f949b0a748a..5a58b8407218 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -297,9 +297,9 @@ void DocxAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 /*nScript*/ ) } /// Are multiple paragraphs disallowed inside this type of SDT? -static bool lcl_isOnelinerSdt(const OUString& rName) +static bool lcl_isOnelinerSdt(std::u16string_view rName) { - return rName == "Title" || rName == "Subtitle" || rName == "Company"; + return rName == u"Title" || rName == u"Subtitle" || rName == u"Company"; } // write a floating table directly to docx without the surrounding frame diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index c37ee40fb6de..7c67e6702d3a 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2233,18 +2233,18 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr ) //helper function //For MS MacroButton field, the symbol in plain text is always "(" (0x28), //which should be mapped according to the macro type -static bool ConvertMacroSymbol( const OUString& rName, OUString& rReference ) +static bool ConvertMacroSymbol( std::u16string_view rName, OUString& rReference ) { bool bConverted = false; if( rReference == "(" ) { bConverted = true; sal_Unicode cSymbol = sal_Unicode(); // silence false warning - if (rName == "CheckIt") + if (rName == u"CheckIt") cSymbol = 0xF06F; - else if (rName == "UncheckIt") + else if (rName == u"UncheckIt") cSymbol = 0xF0FE; - else if (rName == "ShowExample") + else if (rName == u"ShowExample") cSymbol = 0xF02A; //else if... : todo else diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index f9a63c449a08..2f08f0a5a7c3 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -406,7 +406,7 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const return bResult; } -void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent) +void SwHeaderFooterWin::ExecuteCommand(std::string_view rIdent) { SwView& rView = GetEditWin()->GetView(); SwWrtShell& rSh = rView.GetWrtShell(); diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index 0d3d0f1409cc..f92d45f858fc 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -60,7 +60,7 @@ public: bool IsHeader() const { return m_bIsHeader; }; bool IsEmptyHeaderFooter( ) const; - void ExecuteCommand(const OString &rIdent); + void ExecuteCommand(std::string_view rIdent); void SetReadonly( bool bReadonly ) override; diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 16db8910a0ad..478d9da699e9 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -214,7 +214,7 @@ public: void SetOutlineLevel(sal_uInt8 nSet); /** Execute commands of the Navigator */ - void ExecCommand(const OString& rCmd, bool bModifier); + void ExecCommand(std::string_view rCmd, bool bModifier); void ShowTree(); void HideTree(); @@ -363,7 +363,7 @@ public: void MoveSelectionTo(const weld::TreeIter* pDropTarget); - void TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu); + void TbxMenuHdl(std::string_view rCommand, weld::Menu& rMenu); void InsertRegion( const SwGlblDocContent* pCont, const OUString* pFileName = nullptr ); void EditContent(const SwGlblDocContent* pCont ); @@ -371,13 +371,13 @@ public: void ShowTree(); void HideTree(); - void ExecCommand(const OString& rCmd); + void ExecCommand(std::string_view rCmd); void Display(bool bOnlyUpdateUserData = false); bool Update(bool bHard); - void ExecuteContextMenuAction(const OString& rSelectedPopupEntry); + void ExecuteContextMenuAction(std::string_view rSelectedPopupEntry); const SwWrtShell* GetActiveWrtShell() const {return m_pActiveShell;} }; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 6eceb15435eb..51a4bbd825cc 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2769,7 +2769,7 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint) } } -void SwContentTree::ExecCommand(const OString& rCmd, bool bOutlineWithChildren) +void SwContentTree::ExecCommand(std::string_view rCmd, bool bOutlineWithChildren) { const bool bUp = rCmd == "chapterup"; const bool bUpDown = bUp || rCmd == "chapterdown"; diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index b550b0058000..095ec76e581c 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -292,7 +292,7 @@ IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool) return bPop; } -void SwGlobalTree::TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu) +void SwGlobalTree::TbxMenuHdl(std::string_view rCommand, weld::Menu& rMenu) { const MenuEnableFlags nEnableFlags = GetEnableFlags(); if (rCommand == "insert") @@ -560,7 +560,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont ) } } -void SwGlobalTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) +void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry) { bool bUpdateHard = false; @@ -808,7 +808,7 @@ void SwGlobalTree::HideTree() m_xTreeView->hide(); } -void SwGlobalTree::ExecCommand(const OString &rCmd) +void SwGlobalTree::ExecCommand(std::string_view rCmd) { int nEntry = m_xTreeView->get_selected_index(); if (nEntry == -1) |