[Libreoffice-commits] core.git: sw/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 8 11:54:20 UTC 2021


 sw/source/uibase/uiview/view.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit c0936ba2474f199b7242e2ca0a2d460647bc339e
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 8 10:53:10 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Apr 8 13:53:42 2021 +0200

    These checks are not needed
    
    Change-Id: Ic1a707010a4d17955e47a781355213044a699cf0
    OUString::operator== will check if lengths are not equal anyway
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113756
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index fc63c5568e42..c874e021375a 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1171,9 +1171,8 @@ static bool lcl_IsOwnDocument( SwView& rView )
     OUString Created = xDocProps->getAuthor();
     OUString Changed = xDocProps->getModifiedBy();
     OUString FullName = SW_MOD()->GetUserOptions().GetFullName();
-    return (!FullName.isEmpty() &&
-            (!Changed.isEmpty() && Changed == FullName )) ||
-            (Changed.isEmpty() && !Created.isEmpty() && Created == FullName );
+    return !FullName.isEmpty()
+           && (Changed == FullName || (Changed.isEmpty() && Created == FullName));
 }
 
 void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )


More information about the Libreoffice-commits mailing list