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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 11 07:57:00 UTC 2018


 svx/source/svdraw/svdobj.cxx |    4 ----
 1 file changed, 4 deletions(-)

New commits:
commit 55f267856e11492ae11beadbeb553dd6717de809
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Nov 7 09:44:24 2018 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Nov 11 08:56:37 2018 +0100

    tdf#120703 PVS: remove non-functional check
    
    V547 Expression is always false. Probably the '||' operator should be used here.
    
    Was like that since commit df64bd535f01aa264dc4b0c7abfdaeff299fb482.
    
    Trying to fix it by restoring the intended logic (|| instead of && to disallow
    setting stylesheets for Para or Page) breaks several tests in
    CppunitTest_sd_import_tests; apparently the code relies on these families
    getting stylesheets. So just drop the non-functional (always false) condition.
    
    Change-Id: Ia547c089ba0ed4ae879ede89043aa737e4409a75
    Reviewed-on: https://gerrit.libreoffice.org/63234
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 19bbc62fb5d4..4306767a56be 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2162,10 +2162,6 @@ void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHar
 
 void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
 {
-    // only allow graphic and presentation styles for shapes
-    if( pNewStyleSheet && (pNewStyleSheet->GetFamily() == SfxStyleFamily::Para) && (pNewStyleSheet->GetFamily() == SfxStyleFamily::Page) )
-        return;
-
     GetProperties().SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
 }
 


More information about the Libreoffice-commits mailing list