diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/drawingml/textbody.hxx | 3 | ||||
-rw-r--r-- | oox/inc/drawingml/textliststyle.hxx | 10 | ||||
-rw-r--r-- | oox/source/drawingml/textliststyle.cxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/textliststylecontext.cxx | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx index f89e069d5ffe..2ac96011f3c8 100644 --- a/oox/inc/drawingml/textbody.hxx +++ b/oox/inc/drawingml/textbody.hxx @@ -80,6 +80,9 @@ public: /// Flags textbody as having a non-empty bodyPr tag void setHasNoninheritedBodyProperties() { mbHasNoninheritedBodyProperties = true; } + /// Returns whether the textbody had a non-empty lstStyle tag in it + bool hasListStyleOnImport() const { return maTextListStyle.hasListStyleOnImport(); } + void ApplyStyleEmpty( const ::oox::core::XmlFilterBase& rFilterBase, const css::uno::Reference < css::text::XText > & xText, diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx index cd770457575f..7fe071af669b 100644 --- a/oox/inc/drawingml/textliststyle.hxx +++ b/oox/inc/drawingml/textliststyle.hxx @@ -50,6 +50,14 @@ public: }; TextParagraphPropertiesArray& getAggregationListStyle() { return maAggregationListStyle; }; + /// Flags ListStyle as having a non-empty lstStyle tag on import + void setHasListStyleOnImport() { mbHasListStyleOnImport = true; } + /** Returns whether the lstStyle tag was non-empty on import + * + * @return true if list style has it's own noninherited properties. + */ + bool hasListStyleOnImport() const { return mbHasListStyleOnImport; } + #ifdef DBG_UTIL void dump() const; #endif @@ -57,6 +65,8 @@ public: private: TextParagraphPropertiesArray maListStyle; TextParagraphPropertiesArray maAggregationListStyle; + /// Set if ListStyle has a non-empty lstStyle tag on import + bool mbHasListStyleOnImport; }; } diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx index 0b757159e5bc..175b6caf879b 100644 --- a/oox/source/drawingml/textliststyle.cxx +++ b/oox/source/drawingml/textliststyle.cxx @@ -23,6 +23,7 @@ namespace oox::drawingml { TextListStyle::TextListStyle() + : mbHasListStyleOnImport(false) { } diff --git a/oox/source/drawingml/textliststylecontext.cxx b/oox/source/drawingml/textliststylecontext.cxx index f2abd9b91c21..62d81f9c7f4a 100644 --- a/oox/source/drawingml/textliststylecontext.cxx +++ b/oox/source/drawingml/textliststylecontext.cxx @@ -41,6 +41,7 @@ TextListStyleContext::~TextListStyleContext() ContextHandlerRef TextListStyleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) { + mrTextListStyle.setHasListStyleOnImport(); switch( aElementToken ) { case A_TOKEN( defPPr ): // CT_TextParagraphProperties |