From c3f9eb1c81319dd4a6138a1a2b4fc21bafd942cb Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 15 Aug 2012 09:46:56 +0200 Subject: make fontwork custom shapes as one path object created from polypolygon - which contains outlines of all characters instead of creating group of path objects - now the stretched bitmap fill works correctly - stretching over whole text instead of only 1st character - fixes part of n#759172 Change-Id: I65211e336aadb8909b5d4a3dcb3647f44be22595 --- svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'svx/source/customshapes/EnhancedCustomShapeFontWork.cxx') diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 2f6833f0bada..da4394481002 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -788,9 +788,9 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const SdrObject* pCustomShape ) { SdrObject* pRet = NULL; + basegfx::B2DPolyPolygon aPolyPoly; if ( !rFWData.vTextAreas.empty() ) { - pRet = new SdrObjGroup(); std::vector< FWTextArea >::const_iterator aTextAreaIter = rFWData.vTextAreas.begin(); std::vector< FWTextArea >::const_iterator aTextAreaIEnd = rFWData.vTextAreas.end(); while ( aTextAreaIter != aTextAreaIEnd ) @@ -807,8 +807,7 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd std::vector< PolyPolygon >::const_iterator aOutlineIEnd = aCharacterIter->vOutlines.end(); while( aOutlineIter != aOutlineIEnd ) { - SdrObject* pPathObj = new SdrPathObj( OBJ_POLY, aOutlineIter->getB2DPolyPolygon() ); - ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pPathObj ); + aPolyPoly.append( aOutlineIter->getB2DPolyPolygon() ); ++aOutlineIter; } ++aCharacterIter; @@ -818,6 +817,8 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd ++aTextAreaIter; } + pRet = new SdrPathObj( OBJ_POLY, aPolyPoly ); + Point aP( pCustomShape->GetSnapRect().Center() ); Size aS( pCustomShape->GetLogicRect().GetSize() ); aP.X() -= aS.Width() / 2; -- cgit