diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-05 18:43:04 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 10:28:18 +0200 |
commit | 31650d5b4255c484faec11d570cb98a80f0120cc (patch) | |
tree | 8a7018ce14aa27ecc2d2ae95a3589f73357c1cfc /oox | |
parent | 80ef7a645a8118976a4366135faa41bceda423be (diff) |
1th 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.
Change-Id: Iee7a6c0c1f74322fd7b80e41a262849f948e463a
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() ); |