[Libreoffice-commits] .: 2 commits - cppcanvas/source svx/source

Radek Doulík rodo at kemper.freedesktop.org
Wed Aug 15 04:24:46 PDT 2012


 cppcanvas/source/mtfrenderer/implrenderer.cxx           |    2 +-
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit c3f9eb1c81319dd4a6138a1a2b4fc21bafd942cb
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Aug 15 09:46:56 2012 +0200

    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

diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 2f6833f..da43944 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;
commit 2af61dad1bb90b70d3a21d0850965f9a014c5ecc
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Aug 15 09:45:35 2012 +0200

    display hexadecimal and decimal record numbers
    
    Change-Id: If8720ad99d2c4c6fa4927771027123a559895bb6

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 74f47ee..b257dd6 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1324,7 +1324,7 @@ namespace cppcanvas
                 // - SetFont to process font metric specific actions
                 pCurrAct->Execute( &rVDev );
 
-                EMFP_DEBUG(printf("MTF\trecord type: %x\n", pCurrAct->GetType()));
+                EMFP_DEBUG(printf("MTF\trecord type: 0x%x (%d)\n", pCurrAct->GetType(), pCurrAct->GetType()));
 
                 switch( pCurrAct->GetType() )
                 {


More information about the Libreoffice-commits mailing list