svx/source/sdr/properties/captionproperties.cxx | 5 ++--- svx/source/sdr/properties/circleproperties.cxx | 7 +++---- svx/source/sdr/properties/connectorproperties.cxx | 5 ++--- svx/source/sdr/properties/customshapeproperties.cxx | 2 +- svx/source/sdr/properties/graphicproperties.cxx | 7 +++---- svx/source/sdr/properties/measureproperties.cxx | 8 ++++---- svx/source/sdr/properties/rectangleproperties.cxx | 5 ++--- svx/source/sdr/properties/textproperties.cxx | 5 ++--- 8 files changed, 19 insertions(+), 25 deletions(-)
New commits: commit 1fb121ef93325278fb2c9e417c47a5902c4b6033 Author: Armin Le Grand <armin.le.gr...@cib.de> AuthorDate: Mon Sep 17 11:28:13 2018 +0200 Commit: Armin Le Grand <armin.le.gr...@cib.de> CommitDate: Mon Sep 17 21:11:28 2018 +0200 In ::SetStyleSheet implementations call parent first This will guarantee SfxItemSet existence Change-Id: Ia969b5391c7b20d3a2bbba4376a16fcaadccb9d4 Reviewed-on: https://gerrit.libreoffice.org/60563 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@cib.de> diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx index 5e7d2d3304f6..301b804e4bc6 100644 --- a/svx/source/sdr/properties/captionproperties.cxx +++ b/svx/source/sdr/properties/captionproperties.cxx @@ -77,12 +77,11 @@ namespace sdr void CaptionProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrCaptionObj& rObj = static_cast<SdrCaptionObj&>(GetSdrObject()); - - // call parent + // call parent (always first thing to do, may create the SfxItemSet) RectangleProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + SdrCaptionObj& rObj = static_cast<SdrCaptionObj&>(GetSdrObject()); rObj.ImpRecalcTail(); } diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx index e0469fb3e2c9..ba874bb4ca4d 100644 --- a/svx/source/sdr/properties/circleproperties.cxx +++ b/svx/source/sdr/properties/circleproperties.cxx @@ -81,14 +81,13 @@ namespace sdr void CircleProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrCircObj& rObj = static_cast<SdrCircObj&>(GetSdrObject()); + // call parent (always first thing to do, may create the SfxItemSet) + RectangleProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + SdrCircObj& rObj = static_cast<SdrCircObj&>(GetSdrObject()); rObj.SetXPolyDirty(); - // call parent - RectangleProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); - // local changes rObj.ImpSetAttrToCircInfo(); } diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx index e8847dcc9ab6..e8e63311916b 100644 --- a/svx/source/sdr/properties/connectorproperties.cxx +++ b/svx/source/sdr/properties/connectorproperties.cxx @@ -78,12 +78,11 @@ namespace sdr void ConnectorProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject()); - - // call parent + // call parent (always first thing to do, may create the SfxItemSet) TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject()); rObj.ImpSetAttrToEdgeInfo(); } } // end of namespace properties diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 4a1d5dd0df09..849681f8d915 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -165,7 +165,7 @@ namespace sdr void CustomShapeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - // call parent + // call parent (always first thing to do, may create the SfxItemSet) TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr ); // update bTextFrame and RenderGeometry diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 9097857b2827..0ef07cfd8c5e 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -106,14 +106,13 @@ namespace sdr void GraphicProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrGrafObj& rObj = static_cast<SdrGrafObj&>(GetSdrObject()); + // call parent (always first thing to do, may create the SfxItemSet) + RectangleProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + SdrGrafObj& rObj = static_cast<SdrGrafObj&>(GetSdrObject()); rObj.SetXPolyDirty(); - // call parent - RectangleProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); - // local changes rObj.ImpSetAttrToGrafInfo(); } diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index a62f49ae0d59..38d0d73fcd23 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -85,16 +85,16 @@ namespace sdr void MeasureProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - // get access to dimension line object - SdrMeasureObj& rObj = static_cast<SdrMeasureObj&>(GetSdrObject()); - - // call parent + // call parent (always first thing to do, may create the SfxItemSet) TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + // get access to dimension line object + SdrMeasureObj& rObj = static_cast<SdrMeasureObj&>(GetSdrObject()); // mark dimension line text as changed (dirty) in the dimension line object rObj.SetTextDirty(); + // tdf#98525 ask the dimension line object to redraw the changed text rObj.UndirtyText(); } diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx index fa6d8b39091e..cff115198b62 100644 --- a/svx/source/sdr/properties/rectangleproperties.cxx +++ b/svx/source/sdr/properties/rectangleproperties.cxx @@ -58,12 +58,11 @@ namespace sdr // set a new StyleSheet and broadcast void RectangleProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrRectObj& rObj = static_cast<SdrRectObj&>(GetSdrObject()); - - // call parent + // call parent (always first thing to do, may create the SfxItemSet) TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // local changes + SdrRectObj& rObj = static_cast<SdrRectObj&>(GetSdrObject()); rObj.SetXPolyDirty(); } } // end of namespace properties diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 2ce79e9be992..efd4148ab9af 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -232,12 +232,11 @@ namespace sdr void TextProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject()); - - // call parent + // call parent (always first thing to do, may create the SfxItemSet) AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); // #i101556# StyleSheet has changed -> new version + SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject()); maVersion++; if(!rObj.IsLinkedText() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits