sw/inc/swfltopt.hxx | 4 ++-- sw/source/core/tox/txmsrt.cxx | 12 ++++++------ sw/source/filter/basflt/fltini.cxx | 6 +++--- sw/source/filter/ww8/ww8par.cxx | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-)
New commits: commit da5cad1018e860b2aab773021339483e3df8ed2e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 2 14:56:18 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 4 08:25:29 2024 +0200 replace createFromAscii with OUString literals in SwFilterOptions Change-Id: Ide9c91584aaee5493697c010eeb76afbd7818a46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167094 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx index 8fca62493ae1..7ad63c787ff9 100644 --- a/sw/inc/swfltopt.hxx +++ b/sw/inc/swfltopt.hxx @@ -28,10 +28,10 @@ private: virtual void ImplCommit() override; public: - SwFilterOptions( sal_uInt16 nCnt, const char** ppNames, + SwFilterOptions( sal_uInt16 nCnt, const OUString* ppNames, sal_uInt64* pValues ); - void GetValues( sal_uInt16 nCnt, const char** ppNames, + void GetValues( sal_uInt16 nCnt, const OUString* ppNames, sal_uInt64* pValues ); virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; }; diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 9a5b6f0e2c4f..86c05f2b6843 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -212,14 +212,14 @@ bool StgWriter::IsStgWriter() const { return true; } </FilterFlags> */ -SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const char** ppNames, +SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const OUString* ppNames, sal_uInt64* pValues ) : ConfigItem( "Office.Writer/FilterFlags" ) { GetValues( nCnt, ppNames, pValues ); } -void SwFilterOptions::GetValues( sal_uInt16 nCnt, const char** ppNames, +void SwFilterOptions::GetValues( sal_uInt16 nCnt, const OUString* ppNames, sal_uInt64* pValues ) { Sequence<OUString> aNames( nCnt ); @@ -227,7 +227,7 @@ void SwFilterOptions::GetValues( sal_uInt16 nCnt, const char** ppNames, sal_uInt16 n; for( n = 0; n < nCnt; ++n ) - pNames[ n ] = OUString::createFromAscii( ppNames[ n ] ); + pNames[ n ] = ppNames[ n ]; Sequence<Any> aValues = GetProperties( aNames ); if( nCnt == aValues.getLength() ) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 958396d2d54d..943c80759109 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6247,13 +6247,13 @@ ErrCode SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss) ErrCode nErrRet = ERRCODE_NONE; { - static const char* aNames[ 13 ] = { - "WinWord/WW", "WinWord/WW8", "WinWord/WWFT", - "WinWord/WWFLX", "WinWord/WWFLY", - "WinWord/WWF", - "WinWord/WWFA0", "WinWord/WWFA1", "WinWord/WWFA2", - "WinWord/WWFB0", "WinWord/WWFB1", "WinWord/WWFB2", - "WinWord/RegardHindiDigits" + static constexpr OUString aNames[ 13 ] = { + u"WinWord/WW"_ustr, u"WinWord/WW8"_ustr, u"WinWord/WWFT"_ustr, + u"WinWord/WWFLX"_ustr, u"WinWord/WWFLY"_ustr, + u"WinWord/WWF"_ustr, + u"WinWord/WWFA0"_ustr, u"WinWord/WWFA1"_ustr, u"WinWord/WWFA2"_ustr, + u"WinWord/WWFB0"_ustr, u"WinWord/WWFB1"_ustr, u"WinWord/WWFB2"_ustr, + u"WinWord/RegardHindiDigits"_ustr }; sal_uInt64 aVal[ 13 ]; commit 4dc6cb3b53f0847ee8ce6fea5e671fc580af8cb2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 2 14:53:11 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 4 08:25:21 2024 +0200 replace createFromAscii with OUString literals in SwTOXPara Change-Id: Ib72bcb5713f3598ff689ef1e767f72f8325828db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167093 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 95ba1911feed..6133743b898d 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -704,16 +704,16 @@ std::pair<OUString, bool> SwTOXPara::GetURL(SwRootFrame const*const) const if( pFly ) { aText = "#" + pFly->GetName() + OUStringChar(cMarkSeparator); - const char* pStr; + std::optional<OUString> pStr; switch( eType ) { - case SwTOXElement::Ole: pStr = "ole"; break; - case SwTOXElement::Graphic: pStr = "graphic"; break; - case SwTOXElement::Frame: pStr = "frame"; break; - default: pStr = nullptr; + case SwTOXElement::Ole: pStr = u"ole"_ustr; break; + case SwTOXElement::Graphic: pStr = u"graphic"_ustr; break; + case SwTOXElement::Frame: pStr = u"frame"_ustr; break; + default: break; } if( pStr ) - aText += OUString::createFromAscii( pStr ); + aText += *pStr; } } break;