summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-07-22 12:44:09 +0000
committerOliver Bolte <obo@openoffice.org>2008-07-22 12:44:09 +0000
commit98d88801b908641170308f78b66ad47a94975bf5 (patch)
treea916411fddb6989b41dd504e28d21c151e8a56f1 /oox/source/drawingml
parent689bcb79d705fb7a65abd7d6222bd05fbc2a50b0 (diff)
INTEGRATION: CWS xmlfilter06 (1.5.6); FILE MERGED
2008/07/10 11:13:34 dr 1.5.6.4: RESYNC: (1.5-1.6); FILE MERGED 2008/06/23 08:45:14 dr 1.5.6.3: apply theme font reference per shape 2008/06/20 11:58:16 dr 1.5.6.2: line/fill/character properties rework; first steps of chart text formatting and rotation import; make line arrow import work 2008/05/27 10:40:36 dr 1.5.6.1: joined changes from CWS xmlfilter05
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/textparagraph.cxx33
1 files changed, 17 insertions, 16 deletions
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 2879e496d4cd..33f4c0302b80 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textparagraph.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -29,6 +29,7 @@
************************************************************************/
#include "oox/drawingml/textparagraph.hxx"
+#include "oox/drawingml/drawingmltypes.hxx"
#include <rtl/ustring.hxx>
#include <com/sun/star/text/XText.hpp>
@@ -45,8 +46,6 @@ using namespace ::com::sun::star::frame;
namespace oox { namespace drawingml {
TextParagraph::TextParagraph()
- : mpProperties( new TextParagraphProperties )
- , mpEndProperties( new TextParagraphProperties )
{
}
@@ -58,36 +57,38 @@ void TextParagraph::insertAt(
const ::oox::core::XmlFilterBase& rFilterBase,
const Reference < XText > &xText,
const Reference < XTextCursor > &xAt,
- const TextListStylePtr& rTextStyleList, bool bFirst)
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rTextListStyle, bool bFirst) const
{
try {
sal_Int32 nParagraphSize = 0;
Reference< XTextRange > xStart( xAt, UNO_QUERY );
- sal_Int16 nLevel = mpProperties->getLevel();
- TextParagraphPropertiesVector& rListStyle = rTextStyleList->getListStyle();
+ sal_Int16 nLevel = maProperties.getLevel();
+ const TextParagraphPropertiesVector& rListStyle = rTextListStyle.getListStyle();
if ( nLevel >= static_cast< sal_Int16 >( rListStyle.size() ) )
nLevel = 0;
TextParagraphPropertiesPtr pTextParagraphStyle;
- TextCharacterPropertiesPtr pTextCharacterStyle;
if ( rListStyle.size() )
pTextParagraphStyle = rListStyle[ nLevel ];
+
+ TextCharacterProperties aTextCharacterStyle( rTextStyleProperties );
if ( pTextParagraphStyle.get() )
- pTextCharacterStyle = pTextParagraphStyle->getTextCharacterProperties();
+ aTextCharacterStyle.assignUsed( pTextParagraphStyle->getTextCharacterProperties() );
+ aTextCharacterStyle.assignUsed( maProperties.getTextCharacterProperties() );
if( !bFirst )
{
xText->insertControlCharacter( xStart, ControlCharacter::APPEND_PARAGRAPH, sal_False );
- xAt->gotoEnd(true);
+ xAt->gotoEnd( sal_True );
}
- TextRunVector::iterator begin( maRuns.begin() );
- while( begin != maRuns.end() )
+ for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt )
{
- (*begin)->insertAt( rFilterBase, xText, xAt, pTextCharacterStyle );
- nParagraphSize += (*begin++)->getText().getLength();
+ (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle );
+ nParagraphSize += (*aIt)->getText().getLength();
}
- xAt->gotoEnd(true);
+ xAt->gotoEnd( sal_True );
#ifdef DEBUG
if ( false )
@@ -103,10 +104,10 @@ void TextParagraph::insertAt(
if ( pTextParagraphStyle.get() )
{
pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize );
- fCharacterSize = pTextParagraphStyle->getCharacterSize( 18 );
+ fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 );
}
- mpProperties->pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize );
+ maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize );
// empty paragraphs do not have bullets in ppt
if ( !nParagraphSize )