diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-19 10:54:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-19 12:56:36 +0100 |
commit | 4bc44490f51f7cc4a36cc7131137018da986c293 (patch) | |
tree | 38670025e05b151b2e9e464427556c79d13626eb /cui/source | |
parent | d7dbc5fd426a7f2dfda74e281bef7d3a87598203 (diff) |
loplugin:stringliteraldefine in tools
Change-Id: I348b9a844c009f9c19301baa76d31b12f67c6130
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 13 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 8bfe89465962..152a7ec7fbc1 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -26,7 +26,6 @@ #include <hlmarkwn_def.hxx> char const sHash[] = "#"; -char const sFileScheme[] = INET_FILE_SCHEME; /************************************************************************* |* @@ -135,7 +134,7 @@ void SvxHyperlinkDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrNam // get data from standard-fields rStrURL = GetCurrentURL(); - if( rStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) + if( rStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) rStrURL.clear(); GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode ); @@ -174,7 +173,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickFileopenHdl_Impl, weld::Button&, void) css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, mpDialog->getDialog() ); OUString aOldURL( GetCurrentURL() ); - if( aOldURL.startsWithIgnoreAsciiCase( sFileScheme ) ) + if( aOldURL.startsWithIgnoreAsciiCase( INET_FILE_SCHEME ) ) { OUString aPath; osl::FileBase::getSystemPathFromFileURL(aOldURL, aPath); @@ -210,14 +209,14 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickTargetHdl_Impl, weld::Button&, void) if ( GetPathType ( maStrURL ) == EPathType::ExistsFile || maStrURL.isEmpty() || - maStrURL.equalsIgnoreAsciiCase( sFileScheme ) || + maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) || maStrURL.startsWith( sHash ) ) { mxMarkWnd->SetError( LERR_NOERROR ); weld::WaitObject aWait(mpDialog->getDialog()); - if ( maStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) + if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) mxMarkWnd->RefreshTree ( "" ); else mxMarkWnd->RefreshTree ( maStrURL ); @@ -250,11 +249,11 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, void) { if ( IsMarkWndVisible() && ( GetPathType( maStrURL )== EPathType::ExistsFile || maStrURL.isEmpty() || - maStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) ) + maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) ) { weld::WaitObject aWait(mpDialog->getDialog()); - if ( maStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) + if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) ) mxMarkWnd->RefreshTree ( "" ); else mxMarkWnd->RefreshTree ( maStrURL ); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 19153270a600..c26420d5703a 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -241,7 +241,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl, weld::Entry&, voi void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme) { //if rScheme is empty or unknown the default behaviour is like it where HTTP - bool bFTP = o3tl::starts_with(rScheme, u"" INET_FTP_SCHEME); + bool bFTP = o3tl::starts_with(rScheme, INET_FTP_SCHEME); bool bInternet = !bFTP; //update protocol button selection: @@ -260,7 +260,7 @@ void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme) m_xCbAnonymous->set_visible( bFTP ); //update 'link target in document'-window and opening-button - if (o3tl::starts_with(rScheme, u"" INET_HTTP_SCHEME) || rScheme.empty()) + if (o3tl::starts_with(rScheme, INET_HTTP_SCHEME) || rScheme.empty()) { if ( m_bMarkWndOpen ) ShowMarkWnd (); |