diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 12:49:43 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 12:49:43 +0000 |
commit | 6a82628329ec1ff2c7ef1bae7474d193c137b0f9 (patch) | |
tree | 3c952e7097fc315bdc95576147e8921eb2178ac4 | |
parent | eadd9c52f5647655c836944261cb64eb42387ca5 (diff) |
INTEGRATION: CWS sj22 (1.7.236); FILE MERGED
2005/06/30 03:05:10 sj 1.7.236.1: #i45545# added support of italic and bold fontwork export
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 72ef7e8ba0..18af4c57eb 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -4,9 +4,9 @@ * * $RCSfile: EnhancedCustomShapeFontWork.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: rt $ $Date: 2005-09-08 20:25:56 $ + * last change: $Author: hr $ $Date: 2005-09-23 13:49:43 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -81,12 +81,20 @@ #define ITEMID_FONT EE_CHAR_FONTINFO #define ITEMID_CHARSCALE_W EE_CHAR_FONTWIDTH #define ITEMID_FRAMEDIR EE_PARA_WRITINGDIR +#define ITEMID_POSTURE EE_CHAR_ITALIC +#define ITEMID_WEIGHT EE_CHAR_WEIGHT #ifndef _SVX_FRMDIRITEM_HXX #include <frmdiritem.hxx> #endif #ifndef _SVX_FONTITEM_HXX //autogen #include <fontitem.hxx> #endif +#ifndef _SVX_POSTITEM_HXX +#include <postitem.hxx> +#endif +#ifndef _SVX_WGHTITEM_HXX +#include <wghtitem.hxx> +#endif #ifndef _SVX_CHARSCALEITEM_HXX #include <charscaleitem.hxx> #endif @@ -181,17 +189,17 @@ sal_Bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uInt16 sal_Int16 nParagraphsLeft = rTextObj.GetParagraphCount(); rFWData.nMaxParagraphsPerTextArea = ( ( nParagraphsLeft - 1 ) / nTextAreaCount ) + 1; - + sal_Int16 j = 0; while( nParagraphsLeft && nTextAreaCount ) { FWTextArea aTextArea; sal_Int16 i, nParagraphs = ( ( nParagraphsLeft - 1 ) / nTextAreaCount ) + 1; - for ( i = 0; i < nParagraphs; i++ ) + for ( i = 0; i < nParagraphs; i++, j++ ) { FWParagraphData aParagraphData; - aParagraphData.aString = rTextObj.GetText( i ); + aParagraphData.aString = rTextObj.GetText( j ); - const SfxItemSet& rParaSet = rTextObj.GetParaAttribs( i ); // retrieving some paragraph attributes + const SfxItemSet& rParaSet = rTextObj.GetParaAttribs( j ); // retrieving some paragraph attributes aParagraphData.nFrameDirection = ((SvxFrameDirectionItem&)rParaSet.Get( EE_PARA_WRITINGDIR )).GetValue(); aTextArea.vParagraphs.push_back( aParagraphData ); } @@ -309,6 +317,12 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F aFont.SetStyleName( rFontItem.GetStyleName() ); aFont.SetOrientation( 0 ); + SvxPostureItem& rPostureItem = (SvxPostureItem&)pCustomShape->GetMergedItem( EE_CHAR_ITALIC ); + aFont.SetItalic( rPostureItem.GetPosture() ); + + SvxWeightItem& rWeightItem = (SvxWeightItem&)pCustomShape->GetMergedItem( EE_CHAR_WEIGHT ); + aFont.SetWeight( rWeightItem.GetWeight() ); + // initializing virtual device VirtualDevice aVirDev( 1 ); aVirDev.SetMapMode( MAP_100TH_MM ); |