From a069fac4a08f93db74799d00f047e04f1a0735cd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Nov 2021 09:50:52 +0200 Subject: loplugin:stringliteraldefine in comphelper Change-Id: I60ccd6049db65fef2397798ab916b0d1e24c0fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125531 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/doc/objmisc.cxx | 2 +- sfx2/source/doc/objserv.cxx | 4 ++-- sfx2/source/doc/objstor.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index da72e53b2118..9da250188825 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -965,7 +965,7 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract { } - if ( aVersion.compareTo( u"" ODFVER_012_TEXT ) < 0 ) + if ( aVersion.compareTo( ODFVER_012_TEXT ) < 0 ) return; // this is ODF1.2 or later diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index bb5acfcfc89c..ac6717b921fe 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1789,7 +1789,7 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent) OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(GetStorage())); if ( IsModified() || !GetMedium() || GetMedium()->GetName().isEmpty() - || (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion.compareTo(u"" ODFVER_012_TEXT) < 0 && !bHasSign)) + || (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion.compareTo(ODFVER_012_TEXT) < 0 && !bHasSign)) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) @@ -1970,7 +1970,7 @@ bool SfxObjectShell::SignDocumentContentUsingCertificate(const ReferenceGetName().isEmpty() - || (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion.compareTo(u"" ODFVER_012_TEXT) < 0 && !bHasSign)) + || (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion.compareTo(ODFVER_012_TEXT) < 0 && !bHasSign)) { if (nVersion >= SvtSaveOptions::ODFSVER_012) { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 68e3c842f405..89e458705efe 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1208,7 +1208,7 @@ bool SfxObjectShell::SaveTo_Impl // document, but technically this is not correct, so this prevents old // signatures to be copied over to a version 1.2 document bNoPreserveForOasis = ( - (0 <= aODFVersion.compareTo(u"" ODFVER_012_TEXT) && nVersion < SvtSaveOptions::ODFSVER_012) || + (0 <= aODFVersion.compareTo(ODFVER_012_TEXT) && nVersion < SvtSaveOptions::ODFSVER_012) || (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFSVER_012) ); } -- cgit v1.2.3