summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-08-15 09:46:56 +0200
committerRadek Doulik <rodo@novell.com>2012-10-15 15:27:22 +0200
commit8899b7ca2ae3987189243fda460aebb18f84d8ed (patch)
treee63f0f5a4a9127460d18e0ec6661d1a47a23e83e /svx
parentd61388426060bada1532cf079496cfe02ad2687a (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.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 498cdfcc365c..c4f53ecf85c8 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;