[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 4 09:07:11 UTC 2018
svx/source/sdr/properties/properties.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit ffdf0f99bd459e0f422592de373d0ec6a0d9926c
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
AuthorDate: Tue Jul 17 18:39:23 2018 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 4 11:06:46 2018 +0200
tdf#118139 Set Default StyleSheet only when available
Change-Id: Id8643895add3181c41737249326bb49e1a2c2493
Reviewed-on: https://gerrit.libreoffice.org/57582
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
(cherry picked from commit 7d2668517b68f9a7f056a993e53b4dd80838a4f9)
Reviewed-on: https://gerrit.libreoffice.org/61315
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx
index bdeeeeaaec8d..61929a9b498a 100644
--- a/svx/source/sdr/properties/properties.cxx
+++ b/svx/source/sdr/properties/properties.cxx
@@ -43,8 +43,17 @@ namespace sdr
void BaseProperties::applyDefaultStyleSheetFromSdrModel()
{
- // do not delete hard attributes when setting dsefault Style
- SetStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet(), true);
+ SfxStyleSheet* pDefaultStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet());
+
+ // tdf#118139 Only do this when StyleSheet really differs. It may e.g.
+ // be the case that nullptr == pDefaultStyleSheet and there is none set yet,
+ // so indeed no need to set it (needed for some strange old MSWord2003
+ // documents with CustomShape-'Group' and added Text-Frames, see task description)
+ if(pDefaultStyleSheet != GetStyleSheet())
+ {
+ // do not delete hard attributes when setting dsefault Style
+ SetStyleSheet(pDefaultStyleSheet, true);
+ }
}
const SdrObject& BaseProperties::GetSdrObject() const
More information about the Libreoffice-commits
mailing list