diff options
author | Radek Doulik <rodo@novell.com> | 2012-08-15 09:46:56 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-08-15 13:24:08 +0200 |
commit | c3f9eb1c81319dd4a6138a1a2b4fc21bafd942cb (patch) | |
tree | 263281f4b91ca35a0d5f95be0a7c946bfcd769ab /svx | |
parent | 2af61dad1bb90b70d3a21d0850965f9a014c5ecc (diff) |
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
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
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; |