summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-06-06 10:50:53 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-06-06 10:50:53 +0200
commitd8e310afbc5c4b0ec280c36eded9ad24c5e972ec (patch)
treeace5ed0c83e4a9705fe276a81784da3ca745c66f /oox
parent47a9bdf32558248940d2466058a4951ff38c7419 (diff)
1st part of bnc#870233: wrong list style in shapes
Text list styles were copied, without proper copy constructor and operator. It lad to mix up list styles and so text font. (cherry picked from commit 31650d5b4255c484faec11d570cb98a80f0120cc) Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Iee7a6c0c1f74322fd7b80e41a262849f948e463a
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/textliststyle.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 466edf257c65..3a92b120ab64 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -34,6 +34,34 @@ TextListStyle::~TextListStyle()
{
}
+TextListStyle::TextListStyle(const TextListStyle& rStyle)
+{
+ assert(rStyle.maListStyle.size() == 9);
+ assert(rStyle.maAggregationListStyle.size() == 9);
+ for ( size_t i = 0; i < 9; i++ )
+ {
+ maListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties(*rStyle.maListStyle[i]) ) );
+ maAggregationListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties(*rStyle.maAggregationListStyle[i]) ) );
+ }
+}
+
+TextListStyle& TextListStyle::operator=(const TextListStyle& rStyle)
+{
+ if(this != &rStyle)
+ {
+ assert(rStyle.maListStyle.size() == 9);
+ assert(rStyle.maAggregationListStyle.size() == 9);
+ assert(maListStyle.size() == 9);
+ assert(maAggregationListStyle.size() == 9);
+ for ( size_t i = 0; i < 9; i++ )
+ {
+ *maListStyle[i] = *rStyle.maListStyle[i];
+ *maAggregationListStyle[i] = *rStyle.maAggregationListStyle[i];
+ }
+ }
+ return *this;
+}
+
void applyStyleList( const TextParagraphPropertiesVector& rSourceListStyle, TextParagraphPropertiesVector& rDestListStyle )
{
TextParagraphPropertiesVector::const_iterator aSourceListStyleIter( rSourceListStyle.begin() );