[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - oox/inc oox/source
Sarper Akdemir (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 23 21:31:17 UTC 2021
oox/inc/drawingml/textbody.hxx | 3 +++
oox/inc/drawingml/textliststyle.hxx | 10 ++++++++++
oox/source/drawingml/textliststyle.cxx | 1 +
oox/source/drawingml/textliststylecontext.cxx | 1 +
4 files changed, 15 insertions(+)
New commits:
commit 3e65f59f3cf43db02ab4f25cc5668d74d77cdb59
Author: Sarper Akdemir <sarper.akdemir at collabora.com>
AuthorDate: Sun May 9 20:56:41 2021 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Jun 23 23:30:38 2021 +0200
tdf#59323: ooxml import: hasListStyleOnImport
Introduces hasListStyleOnImport to determine whether or not the textbody had a
non-empty lstStyle tag in it on import.
Change-Id: Iccb8cfb20e4402e7cadb8e2f2b9a1f6fa178ade4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117007
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117534
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx
index 27bd7856bcbc..54f40b9098b8 100644
--- a/oox/inc/drawingml/textbody.hxx
+++ b/oox/inc/drawingml/textbody.hxx
@@ -82,6 +82,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 94b6b10dc569..d4b5297ffb6d 100644
--- a/oox/inc/drawingml/textliststyle.hxx
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -45,6 +45,14 @@ public:
const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
TextParagraphPropertiesVector& 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
@@ -53,6 +61,8 @@ private:
TextParagraphPropertiesVector maListStyle;
TextParagraphPropertiesVector 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 15475ddcacb0..59061f16eafa 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -23,6 +23,7 @@
namespace oox { namespace drawingml {
TextListStyle::TextListStyle()
+ : mbHasListStyleOnImport(false)
{
for ( int i = 0; i < 9; i++ )
{
diff --git a/oox/source/drawingml/textliststylecontext.cxx b/oox/source/drawingml/textliststylecontext.cxx
index 9c43e7206f1b..dee3a71e3f80 100644
--- a/oox/source/drawingml/textliststylecontext.cxx
+++ b/oox/source/drawingml/textliststylecontext.cxx
@@ -42,6 +42,7 @@ TextListStyleContext::~TextListStyleContext()
ContextHandlerRef TextListStyleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
+ mrTextListStyle.setHasListStyleOnImport();
switch( aElementToken )
{
case A_TOKEN( defPPr ): // CT_TextParagraphProperties
More information about the Libreoffice-commits
mailing list