svx/source/svdraw/svdobj.cxx | 4 ---- 1 file changed, 4 deletions(-) New commits: commit 55f267856e11492ae11beadbeb553dd6717de809 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Nov 7 09:44:24 2018 +0300 Commit: Mike Kaganski <mike.kagan...@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.kagan...@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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits