diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-18 10:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 09:45:04 +0100 |
commit | bb06f51308428500c9c8d11ae05f0aa03ecc179c (patch) | |
tree | b18620e8572ed6d4c43c8605660d59f5f7a7e531 /sw/source/uibase/wrtsh | |
parent | 42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff) |
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r-- | sw/source/uibase/wrtsh/move.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
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 ); } } |