diff options
author | sj <sj@openoffice.org> | 2010-03-25 15:28:38 +0100 |
---|---|---|
committer | sj <sj@openoffice.org> | 2010-03-25 15:28:38 +0100 |
commit | 05b9996b4ea5d2328b13b5c4756a4566147f09b6 (patch) | |
tree | 355d8a9cc5f7f90c1ab944f50e9d9993f40c2d17 /oox/source/drawingml/textparagraph.cxx | |
parent | 8ea419c8c33bafd637da73b1e09807a4c02ec0fe (diff) |
impress189: #161894# now correctly importing character properties for empty paragraphs
Diffstat (limited to 'oox/source/drawingml/textparagraph.cxx')
-rw-r--r-- | oox/source/drawingml/textparagraph.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 1ff78541243e..f416b3d19d7e 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -29,6 +29,7 @@ #include "oox/drawingml/drawingmltypes.hxx" #include <rtl/ustring.hxx> +#include "oox/helper/propertyset.hxx" #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/ControlCharacter.hpp> @@ -78,11 +79,22 @@ void TextParagraph::insertAt( xText->insertControlCharacter( xStart, ControlCharacter::APPEND_PARAGRAPH, sal_False ); xAt->gotoEnd( sal_True ); } + if ( maRuns.begin() == maRuns.end() ) + { + Reference< XTextRange > xStart( xAt, UNO_QUERY ); + PropertySet aPropSet( xStart ); - for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt ) + TextCharacterProperties aTextCharacterProps( aTextCharacterStyle ); + aTextCharacterProps.assignUsed( maEndProperties ); + aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase ); + } + else { - (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle ); - nParagraphSize += (*aIt)->getText().getLength(); + for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt ) + { + (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle ); + nParagraphSize += (*aIt)->getText().getLength(); + } } xAt->gotoEnd( sal_True ); @@ -94,7 +106,6 @@ void TextParagraph::insertAt( pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 ); } - maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize ); // empty paragraphs do not have bullets in ppt |