diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 11:40:38 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-06 10:28:18 +0000 |
commit | 0d2ff84ef183262ad826a7d4a161aa317ccfa847 (patch) | |
tree | b9705a67c1b1269fd44e0fae91d155c277bdc370 /oox | |
parent | a6a51ef9dd991e11c90317f4d6c29dfb310e1a17 (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
Reviewed-on: https://gerrit.libreoffice.org/9661
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textliststyle.cxx | 28 |
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() ); |