You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/01/07 23:14:06 UTC

svn commit: r1556379 [1/8] - in /openoffice/branches/alg_writerframes/main: chart2/source/controller/main/ comphelper/inc/comphelper/ comphelper/source/property/ cui/source/factory/ cui/source/inc/ cui/source/tabpages/ drawinglayer/inc/drawinglayer/pri...

Author: alg
Date: Tue Jan  7 22:14:04 2014
New Revision: 1556379

URL: http://svn.apache.org/r1556379
Log:
Initial version with core/draw/im-export/print/pdf/UI functionality, still stuff missing

Added:
    openoffice/branches/alg_writerframes/main/sw/inc/unobrushitemhelper.hxx
    openoffice/branches/alg_writerframes/main/sw/source/core/unocore/unobrushitemhelper.cxx
Modified:
    openoffice/branches/alg_writerframes/main/chart2/source/controller/main/ShapeController.cxx
    openoffice/branches/alg_writerframes/main/comphelper/inc/comphelper/TypeGeneration.hxx
    openoffice/branches/alg_writerframes/main/comphelper/source/property/TypeGeneration.cxx
    openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.cxx
    openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.hxx
    openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx
    openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.cxx
    openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
    openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
    openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
    openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/texture/texture.hxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/processor3d/defaultprocessor3d.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/texture/texture.cxx
    openoffice/branches/alg_writerframes/main/drawinglayer/source/texture/texture3d.cxx
    openoffice/branches/alg_writerframes/main/editeng/inc/editeng/brshitem.hxx
    openoffice/branches/alg_writerframes/main/editeng/inc/editeng/unoprnms.hxx
    openoffice/branches/alg_writerframes/main/editeng/inc/editeng/unotext.hxx
    openoffice/branches/alg_writerframes/main/editeng/source/items/frmitems.cxx
    openoffice/branches/alg_writerframes/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
    openoffice/branches/alg_writerframes/main/reportdesign/source/ui/misc/UITools.cxx
    openoffice/branches/alg_writerframes/main/sc/source/ui/drawfunc/drawsh.cxx
    openoffice/branches/alg_writerframes/main/sd/source/ui/func/fuarea.cxx
    openoffice/branches/alg_writerframes/main/sfx2/source/dialog/tabdlg.cxx
    openoffice/branches/alg_writerframes/main/svl/source/undo/undo.cxx
    openoffice/branches/alg_writerframes/main/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
    openoffice/branches/alg_writerframes/main/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
    openoffice/branches/alg_writerframes/main/svx/inc/svx/svxdlg.hxx
    openoffice/branches/alg_writerframes/main/svx/inc/svx/unoshprp.hxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
    openoffice/branches/alg_writerframes/main/svx/source/svdraw/svddrgmt.cxx
    openoffice/branches/alg_writerframes/main/svx/source/table/viewcontactoftableobj.cxx
    openoffice/branches/alg_writerframes/main/sw/Library_sw.mk
    openoffice/branches/alg_writerframes/main/sw/inc/doc.hxx
    openoffice/branches/alg_writerframes/main/sw/inc/frmfmt.hxx
    openoffice/branches/alg_writerframes/main/sw/inc/swatrset.hxx
    openoffice/branches/alg_writerframes/main/sw/inc/unoframe.hxx
    openoffice/branches/alg_writerframes/main/sw/inc/unomap.hxx
    openoffice/branches/alg_writerframes/main/sw/inc/unoprnms.hxx
    openoffice/branches/alg_writerframes/main/sw/sdi/_frmsh.sdi
    openoffice/branches/alg_writerframes/main/sw/source/core/access/accpara.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/attr/swatrset.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/bastyp/init.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/doc/docdraw.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/doc/docfly.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/doc/notxtfrm.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/doc/poolfmt.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/inc/frame.hxx
    openoffice/branches/alg_writerframes/main/sw/source/core/inc/frmtool.hxx
    openoffice/branches/alg_writerframes/main/sw/source/core/layout/atrfrm.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/layout/paintfrm.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/layout/wsfrm.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/text/inftxt.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/text/porfld.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/text/txtfly.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/txtnode/fntcache.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/unocore/unoframe.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/unocore/unomap.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/unocore/unoprnms.cxx
    openoffice/branches/alg_writerframes/main/sw/source/core/unocore/unostyle.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/app/docst.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/app/docstyle.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.src
    openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmmgr.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmpage.src
    openoffice/branches/alg_writerframes/main/sw/source/ui/inc/frmsh.hxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/shells/basesh.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drawdlg.cxx
    openoffice/branches/alg_writerframes/main/sw/source/ui/shells/frmsh.cxx
    openoffice/branches/alg_writerframes/main/vcl/source/gdi/impgraph.cxx
    openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/txtprmap.hxx
    openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmltypes.hxx
    openoffice/branches/alg_writerframes/main/xmloff/source/text/txtexppr.cxx
    openoffice/branches/alg_writerframes/main/xmloff/source/text/txtprhdl.cxx
    openoffice/branches/alg_writerframes/main/xmloff/source/text/txtprmap.cxx

Modified: openoffice/branches/alg_writerframes/main/chart2/source/controller/main/ShapeController.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/chart2/source/controller/main/ShapeController.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/chart2/source/controller/main/ShapeController.cxx (original)
+++ openoffice/branches/alg_writerframes/main/chart2/source/controller/main/ShapeController.cxx Tue Jan  7 22:14:04 2014
@@ -316,8 +316,7 @@ void ShapeController::executeDispatch_Fo
             if ( pFact )
             {
                 ::boost::scoped_ptr< AbstractSvxAreaTabDialog > pDlg(
-                    pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
-                        pDrawViewWrapper ) );
+                    pFact->CreateSvxAreaTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(), true ) );
                 if ( pDlg.get() )
                 {
                     SfxItemPool& rItemPool = pDrawViewWrapper->GetModel()->GetItemPool();

Modified: openoffice/branches/alg_writerframes/main/comphelper/inc/comphelper/TypeGeneration.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/comphelper/inc/comphelper/TypeGeneration.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/comphelper/inc/comphelper/TypeGeneration.hxx (original)
+++ openoffice/branches/alg_writerframes/main/comphelper/inc/comphelper/TypeGeneration.hxx Tue Jan  7 22:14:04 2014
@@ -113,6 +113,13 @@ namespace comphelper
         CPPUTYPE_TABLEBORDERDISTANCES, //getCppuType( (table::TableBorderDistances*)0 )
         CPPUTPYE_REFEMBEDDEDOBJECT, // XEmbeddedObject::static_type
 
+        //UUUU add types needed for fill style definitions in SW
+        CPPUTYPE_RECTANGLEPOINT,    //getCppuType((drawing::RectanglePoint*)0)
+        CPPUTYPE_BITMAPMODE,        // getCppuType((drawing::BitmapMode*)0)
+        CPPUTYPE_GRADIENT,          // getCppuType((awt::Gradient*)0)
+        CPPUTYPE_HATCH,             // getCppuType((drawing::Hatch*)0)
+        CPPUTYPE_FILLSTYLE,         // getCppuType((drawing::FillStyle*)0)
+
         CPPUTYPE_END
 	};
 	COMPHELPER_DLLPUBLIC void GenerateCppuType (

Modified: openoffice/branches/alg_writerframes/main/comphelper/source/property/TypeGeneration.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/comphelper/source/property/TypeGeneration.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/comphelper/source/property/TypeGeneration.cxx (original)
+++ openoffice/branches/alg_writerframes/main/comphelper/source/property/TypeGeneration.cxx Tue Jan  7 22:14:04 2014
@@ -131,6 +131,13 @@
 #include <com/sun/star/graphic/XGraphic.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
 
+//UUUU add types needed for fill style definitions in SW
+#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
 using ::rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::container;
@@ -228,7 +235,15 @@ namespace comphelper
             case CPPUTYPE_REFXGRAPHIC:      pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
             case CPPUTYPE_TABLEBORDERDISTANCES:     pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
             case CPPUTPYE_REFEMBEDDEDOBJECT:        pType = &embed::XEmbeddedObject::static_type(); break;
-			default:
+
+            //UUUU add types needed for fill style definitions in SW
+            case CPPUTYPE_RECTANGLEPOINT:   pType = &getCppuType((drawing::RectanglePoint*)0); break;
+            case CPPUTYPE_BITMAPMODE:       pType = &getCppuType((drawing::BitmapMode*)0); break;
+            case CPPUTYPE_GRADIENT:         pType = &getCppuType((awt::Gradient*)0); break;
+            case CPPUTYPE_HATCH:            pType = &getCppuType((drawing::Hatch*)0); break;
+            case CPPUTYPE_FILLSTYLE:        pType = &getCppuType((drawing::FillStyle*)0); break;
+
+            default:
 				OSL_ASSERT( "Unknown CPPU type" );
 		}
 	}

Modified: openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.cxx (original)
+++ openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.cxx Tue Jan  7 22:14:04 2014
@@ -1607,9 +1607,9 @@ AbstractGraphicFilterDialog * AbstractDi
 AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Window* pParent,
 															const SfxItemSet* pAttr,
 															SdrModel* pModel,
-															const SdrView* pSdrView )
+                                                            bool bShadow)
 {
-	SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel,pSdrView );
+	SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel, bShadow );
 	return new AbstractSvxAreaTabDialog_Impl( pDlg );
 }
 

Modified: openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.hxx (original)
+++ openoffice/branches/alg_writerframes/main/cui/source/factory/dlgfact.hxx Tue Jan  7 22:14:04 2014
@@ -741,7 +741,7 @@ public:
 	virtual AbstractSvxAreaTabDialog* 		CreateSvxAreaTabDialog( Window* pParent,//add for SvxAreaTabDialog
 															const SfxItemSet* pAttr,
 															SdrModel* pModel,
-															const SdrView* pSdrView = NULL ); //add for SvxAreaTabDialog
+                                                            bool bShadow ); //add for SvxAreaTabDialog
 	virtual SfxAbstractTabDialog*			CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add for SvxLineTabDialog
 																 SdrModel* pModel,
 																 const SdrObject* pObj = NULL,

Modified: openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx (original)
+++ openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx Tue Jan  7 22:14:04 2014
@@ -71,9 +71,7 @@ protected:
 #endif
 
 public:
-	SvxAreaTabDialog( Window* pParent,
-					  const SfxItemSet* pAttr, SdrModel* pModel,
-					  const SdrView* pSdrView = NULL );
+	SvxAreaTabDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow );
 	~SvxAreaTabDialog();
 
 	void SetNewColorTable( XColorListSharedPtr aColTab ) { maNewColorTab = aColTab; }

Modified: openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.cxx (original)
+++ openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.cxx Tue Jan  7 22:14:04 2014
@@ -62,7 +62,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
 	Window* pParent,
 	const SfxItemSet* pAttr,
 	SdrModel* pModel,
-	const SdrView* /* pSdrView */
+    bool bShadow
 ) :
 
 	SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_AREA ), pAttr ),
@@ -86,20 +86,29 @@ SvxAreaTabDialog::SvxAreaTabDialog
     mnPos( 0 ),
     mbAreaTP( sal_False )
 {
-	FreeResource();
+    FreeResource();
 
-	AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create,  0);
-	AddTabPage( RID_SVXPAGE_COLOR, SvxColorTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_GRADIENT, SvxGradientTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_HATCH, SvxHatchTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_BITMAP, SvxBitmapTabPage::Create,  0);
+    AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 );
 
-	SetCurPageId( RID_SVXPAGE_AREA );
+    if(bShadow)
+    {
+        AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 );
+    }
+    else
+    {
+        RemoveTabPage( RID_SVXPAGE_SHADOW );
+    }
+
+    AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create,  0);
+    AddTabPage( RID_SVXPAGE_COLOR, SvxColorTabPage::Create, 0 );
+    AddTabPage( RID_SVXPAGE_GRADIENT, SvxGradientTabPage::Create, 0 );
+    AddTabPage( RID_SVXPAGE_HATCH, SvxHatchTabPage::Create, 0 );
+    AddTabPage( RID_SVXPAGE_BITMAP, SvxBitmapTabPage::Create,  0);
+
+    SetCurPageId( RID_SVXPAGE_AREA );
 
-	CancelButton& rBtnCancel = GetCancelButton();
-	rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl ) );
+    CancelButton& rBtnCancel = GetCancelButton();
+    rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl ) );
 //! rBtnCancel.SetText( CUI_RESSTR( RID_SVXSTR_CLOSE ) );
 }
 

Modified: openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx (original)
+++ openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx Tue Jan  7 22:14:04 2014
@@ -2322,92 +2322,117 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCou
 
 IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG )
 {
-	TriState eState = aTsbTile.GetState();
-	if( eState == STATE_CHECK )
-	{
-		aTsbStretch.Disable();
-		aRbtRow.Enable();
-		aRbtColumn.Enable();
-		aMtrFldOffset.Enable();
+    TriState eState = aTsbTile.GetState();
+    if( eState == STATE_CHECK )
+    {
+        // tiled
+        // disable stretched for tiled graphic
+        aTsbStretch.Disable();
+
+        // allow tile offset
+        aRbtRow.Enable();
+        aRbtColumn.Enable();
+        aMtrFldOffset.Enable();
         aFlOffset.Enable();
 
-		aCtlPosition.Enable();
-		aCtlPosition.Invalidate();
-		aFtXOffset.Enable();
-		aMtrFldXOffset.Enable();
-		aFtYOffset.Enable();
-		aMtrFldYOffset.Enable();
+        // allow positioning
+        aCtlPosition.Enable();
+        aCtlPosition.Invalidate();
+        aFtXOffset.Enable();
+        aMtrFldXOffset.Enable();
+        aFtYOffset.Enable();
+        aMtrFldYOffset.Enable();
         aFlPosition.Enable();
 
-		aTsbScale.Enable();
-		aTsbOriginal.Enable();
-		aFtXSize.Enable();
-		aMtrFldXSize.Enable();
-		aFtYSize.Enable();
-		aMtrFldYSize.Enable();
+        // allow size definitions
+        aTsbScale.Enable();
+        aTsbOriginal.Enable();
+        aFtXSize.Enable();
+        aMtrFldXSize.Enable();
+        aFtYSize.Enable();
+        aMtrFldYSize.Enable();
         aFlSize.Enable();
-	}
-	else if( eState == STATE_NOCHECK )
-	{
-		aTsbStretch.Enable();
-		aRbtRow.Disable();
-		aRbtColumn.Disable();
-		aMtrFldOffset.Disable();
+    }
+    else if( eState == STATE_NOCHECK )
+    {
+        // non-tiled
+        // enable stretch selection
+        aTsbStretch.Enable();
+
+        // no need for tile offset
+        aRbtRow.Disable();
+        aRbtColumn.Disable();
+        aMtrFldOffset.Disable();
         aFlOffset.Disable();
 
-		aCtlPosition.Disable();
-		aCtlPosition.Invalidate();
-		aFtXOffset.Disable();
-		aMtrFldXOffset.Disable();
-		aFtYOffset.Disable();
-		aMtrFldYOffset.Disable();
-        aFlPosition.Disable();
-
-		if( aTsbStretch.GetState() != STATE_NOCHECK )
-		{
-			aTsbScale.Disable();
-			aTsbOriginal.Disable();
-			aFtXSize.Disable();
-			aMtrFldXSize.Disable();
-			aFtYSize.Disable();
-			aMtrFldYSize.Disable();
+        if( aTsbStretch.GetState() != STATE_NOCHECK )
+        {
+            // non-tiled, stretched
+            // no need for positioning
+            aCtlPosition.Disable();
+            aCtlPosition.Invalidate();
+            aFtXOffset.Disable();
+            aMtrFldXOffset.Disable();
+            aFtYOffset.Disable();
+            aMtrFldYOffset.Disable();
+            aFlPosition.Disable();
+
+            // no need for size definitions
+            aTsbScale.Disable();
+            aTsbOriginal.Disable();
+            aFtXSize.Disable();
+            aMtrFldXSize.Disable();
+            aFtYSize.Disable();
+            aMtrFldYSize.Disable();
             aFlSize.Disable();
-		}
-		else
-		{
-			aTsbScale.Enable();
-			aTsbOriginal.Enable();
-			aFtXSize.Enable();
-			aMtrFldXSize.Enable();
-			aFtYSize.Enable();
-			aMtrFldYSize.Enable();
+        }
+        else
+        {
+            // non-tiled, non-stretched
+            // allow positioning
+            aCtlPosition.Enable();
+            aCtlPosition.Invalidate();
+            aFtXOffset.Enable();
+            aMtrFldXOffset.Enable();
+            aFtYOffset.Enable();
+            aMtrFldYOffset.Enable();
+            aFlPosition.Enable();
+
+            // allow size definitions
+            aTsbScale.Enable();
+            aTsbOriginal.Enable();
+            aFtXSize.Enable();
+            aMtrFldXSize.Enable();
+            aFtYSize.Enable();
+            aMtrFldYSize.Enable();
             aFlSize.Enable();
-		}
-	}
-	else
-	{
-		aTsbStretch.Disable();
-		aRbtRow.Disable();
-		aRbtColumn.Disable();
-		aMtrFldOffset.Disable();
+        }
+    }
+    else
+    {
+        // disable all when tiling is undefined
+        aTsbStretch.Disable();
+        aRbtRow.Disable();
+        aRbtColumn.Disable();
+        aMtrFldOffset.Disable();
         aFlOffset.Disable();
 
-		aCtlPosition.Disable();
-		aCtlPosition.Invalidate();
-		aFtXOffset.Disable();
-		aMtrFldXOffset.Disable();
-		aFtYOffset.Disable();
-		aMtrFldYOffset.Disable();
+        aCtlPosition.Disable();
+        aCtlPosition.Invalidate();
+        aFtXOffset.Disable();
+        aMtrFldXOffset.Disable();
+        aFtYOffset.Disable();
+        aMtrFldYOffset.Disable();
         aFlPosition.Disable();
 
-		aTsbScale.Disable();
-		aTsbOriginal.Disable();
-		aFtXSize.Disable();
-		aMtrFldXSize.Disable();
-		aFtYSize.Disable();
-		aMtrFldYSize.Disable();
+        aTsbScale.Disable();
+        aTsbOriginal.Disable();
+        aFtXSize.Disable();
+        aMtrFldXSize.Disable();
+        aFtYSize.Disable();
+        aMtrFldYSize.Disable();
         aFlSize.Disable();
-	}
+    }
 
 	if( aTsbOriginal.GetState() == STATE_CHECK )
 	{

Modified: openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx (original)
+++ openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx Tue Jan  7 22:14:04 2014
@@ -55,55 +55,64 @@ namespace drawinglayer
             version is used in the MetafilePrimitive2D decomposition when the old XOR
             paint was recorded.
          */
-		class DRAWINGLAYER_DLLPUBLIC FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
-            /// the geometric definition
-			basegfx::B2DRange						maObjectRange;
+        class DRAWINGLAYER_DLLPUBLIC FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
+            /// the geometrically visible area
+            basegfx::B2DRange                       maOutputRange;
+
+            /// the area the gradient definition is based on
+            /// in the simplest case identical to OutputRange
+            basegfx::B2DRange                       maDefinitionRange;
 
             /// the gradient definition
-			attribute::FillGradientAttribute		maFillGradient;
+            attribute::FillGradientAttribute        maFillGradient;
 
             /// local helpers
             void generateMatricesAndColors(
                 std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor) const;
+                basegfx::BColor& rOuterColor) const;
             Primitive2DSequence createOverlappingFill(
                 const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, 
-                const basegfx::BColor& rOutmostColor,
+                const basegfx::BColor& rOuterColor,
                 const basegfx::B2DPolygon& rUnitPolygon) const;
             Primitive2DSequence createNonOverlappingFill(
                 const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, 
-                const basegfx::BColor& rOutmostColor,
+                const basegfx::BColor& rOuterColor,
                 const basegfx::B2DPolygon& rUnitPolygon) const;
 
-		protected:
+        protected:
             /// local helper
-    		Primitive2DSequence createFill(bool bOverlapping) const;
+            Primitive2DSequence createFill(bool bOverlapping) const;
 
             /// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
-            /// constructor
-			FillGradientPrimitive2D(
-				const basegfx::B2DRange& rObjectRange, 
-				const attribute::FillGradientAttribute& rFillGradient);
-
-			/// data read access
-			const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
-			const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+        public:
+            /// constructors. The one without definition range will use output range as definition range
+            FillGradientPrimitive2D(
+                const basegfx::B2DRange& rOutputRange, 
+                const attribute::FillGradientAttribute& rFillGradient);
+            FillGradientPrimitive2D(
+                const basegfx::B2DRange& rOutputRange, 
+                const basegfx::B2DRange& rDefinitionRange, 
+                const attribute::FillGradientAttribute& rFillGradient);
+
+            /// data read access
+            const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
+            const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+            const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx (original)
+++ openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx Tue Jan  7 22:14:04 2014
@@ -34,8 +34,8 @@
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** FillHatchPrimitive2D class
 
             This class defines a hatch filling for a rectangular area. The
@@ -50,47 +50,57 @@ namespace drawinglayer
 
             The decomposition will deliver the hatch lines.
          */
-		class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D : public DiscreteMetricDependentPrimitive2D
-		{
-		private:
-            /// the geometric definition
-			basegfx::B2DRange						maObjectRange;
+        class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D : public DiscreteMetricDependentPrimitive2D
+        {
+        private:
+            /// the geometrically visible area
+            basegfx::B2DRange                       maOutputRange;
+
+            /// the area the gradient definition is based on
+            /// in the simplest case identical to OutputRange
+            basegfx::B2DRange                       maDefinitionRange;
 
             /// the hatch definition
-			attribute::FillHatchAttribute			maFillHatch;
+            attribute::FillHatchAttribute           maFillHatch;
 
             /// hatch background color (if used)
-			basegfx::BColor							maBColor;
+            basegfx::BColor                         maBColor;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
         public:
-            /// constructor
-			FillHatchPrimitive2D(
-				const basegfx::B2DRange& rObjectRange, 
-				const basegfx::BColor& rBColor, 
-				const attribute::FillHatchAttribute& rFillHatch);
-
-			/// data read access
-			const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
-			const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
-			const basegfx::BColor& getBColor() const { return maBColor; }
+            /// constructors. The one without definition range will use output range as definition range
+            FillHatchPrimitive2D(
+                const basegfx::B2DRange& rOutputRange, 
+                const basegfx::BColor& rBColor, 
+                const attribute::FillHatchAttribute& rFillHatch);
+            FillHatchPrimitive2D(
+                const basegfx::B2DRange& rOutputRange, 
+                const basegfx::B2DRange& rDefinitionRange, 
+                const basegfx::BColor& rBColor, 
+                const attribute::FillHatchAttribute& rFillHatch);
+
+            /// data read access
+            const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
+            const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+            const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
+            const basegfx::BColor& getBColor() const { return maBColor; }
 
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
 
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
 
-			/// get local decomposition. Overloaded since this decomposition is view-dependent
-			virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+            /// get local decomposition. Overloaded since this decomposition is view-dependent
+            virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
             /// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx (original)
+++ openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx Tue Jan  7 22:14:04 2014
@@ -41,45 +41,45 @@
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonHairlinePrimitive2D class
 
             This primitive defines a multi-PolygonHairlinePrimitive2D and is
             just for convenience. The definition is not different from the single
-            defined PolygonHairlinePrimitive2Ds.
+                defined PolygonHairlinePrimitive2Ds.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the hairline geometry
-			basegfx::B2DPolyPolygon					maPolyPolygon;
+            basegfx::B2DPolyPolygon                 maPolyPolygon;
 
             /// the hairline color
-			basegfx::BColor							maBColor;
+            basegfx::BColor                         maBColor;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
+        public:
             /// constructor
-			PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor);
+            PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::BColor& getBColor() const { return maBColor; }
 
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const basegfx::BColor& getBColor() const { return maBColor; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -87,55 +87,55 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonMarkerPrimitive2D class
 
             This primitive defines a multi-PolygonMarkerPrimitive2D and is
             just for convenience. The definition is not different from the single
             defined PolygonMarkerPrimitive2Ds.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the marker hairline geometry
-			basegfx::B2DPolyPolygon					maPolyPolygon;
+            basegfx::B2DPolyPolygon                 maPolyPolygon;
             
             /// the two colors
-			basegfx::BColor							maRGBColorA;
-			basegfx::BColor							maRGBColorB;
+            basegfx::BColor                         maRGBColorA;
+            basegfx::BColor                         maRGBColorB;
 
             /// the dash distance in 'pixels'
-			double									mfDiscreteDashLength;
+            double                                  mfDiscreteDashLength;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
+        public:
             /// constructor
-			PolyPolygonMarkerPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-				const basegfx::BColor& rRGBColorA,
-				const basegfx::BColor& rRGBColorB,
-				double fDiscreteDashLength);
-
-			// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
-			const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
-			double getDiscreteDashLength() const { return mfDiscreteDashLength; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            PolyPolygonMarkerPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const basegfx::BColor& rRGBColorA,
+                const basegfx::BColor& rRGBColorB,
+                double fDiscreteDashLength);
+
+            // data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
+            const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
+            double getDiscreteDashLength() const { return mfDiscreteDashLength; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -143,57 +143,57 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonStrokePrimitive2D class
 
             This primitive defines a multi-PolygonStrokePrimitive2D and is
             just for convenience. The definition is not different from the single
             defined PolygonStrokePrimitive2Ds.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the line geometry
-			basegfx::B2DPolyPolygon					maPolyPolygon;
+            basegfx::B2DPolyPolygon                 maPolyPolygon;
             
             /// the line attributes like width, join and color
-			attribute::LineAttribute				maLineAttribute;
+            attribute::LineAttribute                maLineAttribute;
             
             /// the line stroking (if used)
-			attribute::StrokeAttribute				maStrokeAttribute;
+            attribute::StrokeAttribute              maStrokeAttribute;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
+        public:
             /// constructor
-			PolyPolygonStrokePrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-    			const attribute::LineAttribute& rLineAttribute,
-				const attribute::StrokeAttribute& rStrokeAttribute);
+            PolyPolygonStrokePrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::LineAttribute& rLineAttribute,
+                const attribute::StrokeAttribute& rStrokeAttribute);
 
             /// constructor without stroking
-			PolyPolygonStrokePrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-    			const attribute::LineAttribute& rLineAttribute);
-
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
-			const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            PolyPolygonStrokePrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::LineAttribute& rLineAttribute);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
+            const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -201,55 +201,55 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonStrokePrimitive2D class
 
             This primitive defines a multi-PolygonStrokeArrowPrimitive2D and is
             just for convenience. The definition is not different from the single
             defined PolygonStrokeArrowPrimitive2Ds.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonStrokeArrowPrimitive2D : public PolyPolygonStrokePrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonStrokeArrowPrimitive2D : public PolyPolygonStrokePrimitive2D
+        {
+        private:
             /// geometric definitions for line start and end
-			attribute::LineStartEndAttribute				maStart;
-			attribute::LineStartEndAttribute				maEnd;
+            attribute::LineStartEndAttribute                maStart;
+            attribute::LineStartEndAttribute                maEnd;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
+        public:
             /// constructor
-			PolyPolygonStrokeArrowPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-    			const attribute::LineAttribute& rLineAttribute,
-				const attribute::StrokeAttribute& rStrokeAttribute, 
-				const attribute::LineStartEndAttribute& rStart, 
-				const attribute::LineStartEndAttribute& rEnd);
+            PolyPolygonStrokeArrowPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::LineAttribute& rLineAttribute,
+                const attribute::StrokeAttribute& rStrokeAttribute, 
+                const attribute::LineStartEndAttribute& rStart, 
+                const attribute::LineStartEndAttribute& rEnd);
 
             /// constructor without stroking
-			PolyPolygonStrokeArrowPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-    			const attribute::LineAttribute& rLineAttribute,
-				const attribute::LineStartEndAttribute& rStart, 
-				const attribute::LineStartEndAttribute& rEnd);
-
-			/// data read access
-			const attribute::LineStartEndAttribute& getStart() const { return maStart; }
-			const attribute::LineStartEndAttribute& getEnd() const { return maEnd; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            PolyPolygonStrokeArrowPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::LineAttribute& rLineAttribute,
+                const attribute::LineStartEndAttribute& rStart, 
+                const attribute::LineStartEndAttribute& rEnd);
+
+            /// data read access
+            const attribute::LineStartEndAttribute& getStart() const { return maStart; }
+            const attribute::LineStartEndAttribute& getEnd() const { return maEnd; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -257,43 +257,43 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonColorPrimitive2D class
 
             This primitive defines a PolyPolygon filled with a single color.
             This is one of the non-decomposable primitives, so a renderer
             should proccess it.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonColorPrimitive2D : public BasePrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonColorPrimitive2D : public BasePrimitive2D
+        {
+        private:
             /// the PolyPolygon geometry
-			basegfx::B2DPolyPolygon					maPolyPolygon;
+            basegfx::B2DPolyPolygon                 maPolyPolygon;
 
             /// the polygon fill color
-			basegfx::BColor							maBColor;
+            basegfx::BColor                         maBColor;
 
-		public:
+        public:
             /// constructor
-			PolyPolygonColorPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-				const basegfx::BColor& rBColor);
-
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const basegfx::BColor& getBColor() const { return maBColor; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// get range
-			virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+            PolyPolygonColorPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const basegfx::BColor& rBColor);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::BColor& getBColor() const { return maBColor; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// get range
+            virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -301,44 +301,52 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonColorPrimitive2D class
 
             This primitive defines a PolyPolygon filled with a gradient. The
             decomosition will create a MaskPrimitive2D containing a 
             FillGradientPrimitive2D.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonGradientPrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonGradientPrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the PolyPolygon geometry
-			basegfx::B2DPolyPolygon						maPolyPolygon;
+            basegfx::B2DPolyPolygon                     maPolyPolygon;
+
+            /// the definition range
+            basegfx::B2DRange                           maDefinitionRange;
 
             /// the gradient definition
-			attribute::FillGradientAttribute			maFillGradient;
+            attribute::FillGradientAttribute            maFillGradient;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
-            /// constructor
-			PolyPolygonGradientPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-				const attribute::FillGradientAttribute& rFillGradient);
-
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+        public:
+            /// constructors. The one without definition range will use output range as definition range
+            PolyPolygonGradientPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::FillGradientAttribute& rFillGradient);
+            PolyPolygonGradientPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const basegfx::B2DRange& rDefinitionRange,
+                const attribute::FillGradientAttribute& rFillGradient);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+            const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -346,49 +354,58 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonHatchPrimitive2D class
 
             This primitive defines a PolyPolygon filled with a hatch. The
             decomosition will create a MaskPrimitive2D containing a 
             FillHatchPrimitive2D.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonHatchPrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonHatchPrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the PolyPolygon geometry
-			basegfx::B2DPolyPolygon						maPolyPolygon;
+            basegfx::B2DPolyPolygon                     maPolyPolygon;
+
+            /// the definition range
+            basegfx::B2DRange                           maDefinitionRange;
 
             /// the hatch background color (if used)
-			basegfx::BColor								maBackgroundColor;
+            basegfx::BColor                             maBackgroundColor;
 
             /// the hatch definition
-			attribute::FillHatchAttribute				maFillHatch;
+            attribute::FillHatchAttribute               maFillHatch;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
-            /// constructor
-			PolyPolygonHatchPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon,
-				const basegfx::BColor& rBackgroundColor,
-				const attribute::FillHatchAttribute& rFillHatch);
-
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; }
-			const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+        public:
+            /// constructors. The one without definition range will use output range as definition range
+            PolyPolygonHatchPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon,
+                const basegfx::BColor& rBackgroundColor,
+                const attribute::FillHatchAttribute& rFillHatch);
+            PolyPolygonHatchPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon,
+                const basegfx::B2DRange& rDefinitionRange,
+                const basegfx::BColor& rBackgroundColor,
+                const attribute::FillHatchAttribute& rFillHatch);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+            const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; }
+            const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -396,44 +413,52 @@ namespace drawinglayer
 
 namespace drawinglayer
 {
-	namespace primitive2d
-	{
+    namespace primitive2d
+    {
         /** PolyPolygonGraphicPrimitive2D class
 
             This primitive defines a PolyPolygon filled with bitmap data 
             (including transparence). The decomosition will create a MaskPrimitive2D 
             containing a FillGraphicPrimitive2D.
          */
-		class DRAWINGLAYER_DLLPUBLIC PolyPolygonGraphicPrimitive2D : public BufferedDecompositionPrimitive2D
-		{
-		private:
+        class DRAWINGLAYER_DLLPUBLIC PolyPolygonGraphicPrimitive2D : public BufferedDecompositionPrimitive2D
+        {
+        private:
             /// the PolyPolygon geometry
-			basegfx::B2DPolyPolygon						maPolyPolygon;
+            basegfx::B2DPolyPolygon                     maPolyPolygon;
+
+            /// the definition range
+            basegfx::B2DRange                           maDefinitionRange;
 
             /// the bitmap fill definition (may include tiling)
-			attribute::FillGraphicAttribute				maFillGraphic;
+            attribute::FillGraphicAttribute             maFillGraphic;
 
-		protected:
-			/// local decomposition.
-			virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+        protected:
+            /// local decomposition.
+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
 
-		public:
-            /// constructor
-			PolyPolygonGraphicPrimitive2D(
-				const basegfx::B2DPolyPolygon& rPolyPolygon, 
-				const attribute::FillGraphicAttribute& rFillGraphic);
-
-			/// data read access
-			const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
-			const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
-
-			/// compare operator
-			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
-			/// provide unique ID
-			DeclPrimitrive2DIDBlock()
-		};
-	} // end of namespace primitive2d
+        public:
+            /// constructors. The one without definition range will use output range as definition range
+            PolyPolygonGraphicPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const attribute::FillGraphicAttribute& rFillGraphic);
+            PolyPolygonGraphicPrimitive2D(
+                const basegfx::B2DPolyPolygon& rPolyPolygon, 
+                const basegfx::B2DRange& rDefinitionRange,
+                const attribute::FillGraphicAttribute& rFillGraphic);
+
+            /// data read access
+            const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+            const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
+            const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
+
+            /// compare operator
+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+            /// provide unique ID
+            DeclPrimitrive2DIDBlock()
+        };
+    } // end of namespace primitive2d
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/texture/texture.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/texture/texture.hxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/texture/texture.hxx (original)
+++ openoffice/branches/alg_writerframes/main/drawinglayer/inc/drawinglayer/texture/texture.hxx Tue Jan  7 22:14:04 2014
@@ -34,23 +34,23 @@
 //////////////////////////////////////////////////////////////////////////////
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvx
-		{
-		public:
-			GeoTexSvx();
-			virtual ~GeoTexSvx();
-
-			// compare operator
-			virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
-			bool operator!=(const GeoTexSvx& rGeoTexSvx) const { return !operator==(rGeoTexSvx); }
-
-			// virtual base methods
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-			virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvx
+        {
+        public:
+            GeoTexSvx();
+            virtual ~GeoTexSvx();
+
+            // compare operator
+            virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
+            bool operator!=(const GeoTexSvx& rGeoTexSvx) const { return !operator==(rGeoTexSvx); }
+
+            // virtual base methods
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+            virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
@@ -66,138 +66,149 @@ namespace drawinglayer
             basegfx::B2DHomMatrix   maB2DHomMatrix;
             basegfx::BColor         maBColor;
         };
-	} // end of namespace texture
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradient : public GeoTexSvx
-		{
-		protected:
-			basegfx::ODFGradientInfo			maGradientInfo;
-			basegfx::B2DRange					maTargetRange;
-			basegfx::BColor						maStart;
-			basegfx::BColor						maEnd;
-			double								mfBorder;
-
-		public:
-			GeoTexSvxGradient(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradient : public GeoTexSvx
+        {
+        protected:
+            basegfx::ODFGradientInfo            maGradientInfo;
+            basegfx::B2DRange                   maDefinitionRange;
+            basegfx::BColor                     maStart;
+            basegfx::BColor                     maEnd;
+            double                              mfBorder;
+
+        public:
+            GeoTexSvxGradient(
+                const basegfx::B2DRange& rDefinitionRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
                 double fBorder);
-			virtual ~GeoTexSvxGradient();
+            virtual ~GeoTexSvxGradient();
 
-			// compare operator
-			virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
+            // compare operator
+            virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
 
-			// virtual base methods
-			virtual void appendTransformationsAndColors(
+            // virtual base methods
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor) = 0;
+                basegfx::BColor& rOuterColor) = 0;
 
-			// data access
-			const basegfx::BColor& getStart() const { return maStart; }
-			const basegfx::BColor& getEnd() const { return maEnd; }
-		};
-	} // end of namespace texture
+            // data access
+            const basegfx::BColor& getStart() const { return maStart; }
+            const basegfx::BColor& getEnd() const { return maEnd; }
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientLinear(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear : public GeoTexSvxGradient
+        {
+        protected:
+            double                  mfUnitMinX;
+            double                  mfUnitWidth;
+            double                  mfUnitMaxY;
+
+        public:
+            GeoTexSvxGradientLinear(
+                const basegfx::B2DRange& rDefinitionRange, 
+                const basegfx::B2DRange& rOutputRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
                 double fBorder, 
                 double fAngle);
-			virtual ~GeoTexSvxGradientLinear();
+            virtual ~GeoTexSvxGradientLinear();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientAxial(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial : public GeoTexSvxGradient
+        {
+        protected:
+            double                  mfUnitMinX;
+            double                  mfUnitWidth;
+
+        public:
+            GeoTexSvxGradientAxial(
+                const basegfx::B2DRange& rDefinitionRange, 
+                const basegfx::B2DRange& rOutputRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
                 double fBorder, 
                 double fAngle);
-			virtual ~GeoTexSvxGradientAxial();
+            virtual ~GeoTexSvxGradientAxial();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRadial : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientRadial(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRadial : public GeoTexSvxGradient
+        {
+        public:
+            GeoTexSvxGradientRadial(
+                const basegfx::B2DRange& rDefinitionRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
                 double fBorder, 
                 double fOffsetX, 
                 double fOffsetY);
-			virtual ~GeoTexSvxGradientRadial();
+            virtual ~GeoTexSvxGradientRadial();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientElliptical : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientElliptical(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientElliptical : public GeoTexSvxGradient
+        {
+        public:
+            GeoTexSvxGradientElliptical(
+                const basegfx::B2DRange& rDefinitionRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
@@ -205,27 +216,27 @@ namespace drawinglayer
                 double fOffsetX, 
                 double fOffsetY, 
                 double fAngle);
-			virtual ~GeoTexSvxGradientElliptical();
+            virtual ~GeoTexSvxGradientElliptical();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientSquare : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientSquare(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientSquare : public GeoTexSvxGradient
+        {
+        public:
+            GeoTexSvxGradientSquare(
+                const basegfx::B2DRange& rDefinitionRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
@@ -233,27 +244,27 @@ namespace drawinglayer
                 double fOffsetX, 
                 double fOffsetY, 
                 double fAngle);
-			virtual ~GeoTexSvxGradientSquare();
+            virtual ~GeoTexSvxGradientSquare();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRect : public GeoTexSvxGradient
-		{
-		public:
-			GeoTexSvxGradientRect(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRect : public GeoTexSvxGradient
+        {
+        public:
+            GeoTexSvxGradientRect(
+                const basegfx::B2DRange& rDefinitionRange, 
                 const basegfx::BColor& rStart, 
                 const basegfx::BColor& rEnd, 
                 sal_uInt32 nSteps, 
@@ -261,54 +272,59 @@ namespace drawinglayer
                 double fOffsetX, 
                 double fOffsetY, 
                 double fAngle);
-			virtual ~GeoTexSvxGradientRect();
+            virtual ~GeoTexSvxGradientRect();
 
-			virtual void appendTransformationsAndColors(
+            virtual void appendTransformationsAndColors(
                 std::vector< B2DHomMatrixAndBColor >& rEntries, 
-                basegfx::BColor& rOutmostColor);
-			virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
-		};
-	} // end of namespace texture
+                basegfx::BColor& rOuterColor);
+            virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxHatch : public GeoTexSvx
-		{
-		protected:
-			basegfx::B2DHomMatrix				maTextureTransform;
-			basegfx::B2DHomMatrix				maBackTextureTransform;
-			double								mfDistance;
-			double								mfAngle;
-			sal_uInt32							mnSteps;
-
-		public:
-			GeoTexSvxHatch(
-                const basegfx::B2DRange& rTargetRange, 
+    namespace texture
+    {
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxHatch : public GeoTexSvx
+        {
+        protected:
+            basegfx::B2DRange                   maOutputRange;
+            basegfx::B2DHomMatrix               maTextureTransform;
+            basegfx::B2DHomMatrix               maBackTextureTransform;
+            double                              mfDistance;
+            double                              mfAngle;
+            sal_uInt32                          mnSteps;
+
+            /// bitfield
+            bool                                mbDefinitionRangeEqualsOutputRange : 1;
+
+        public:
+            GeoTexSvxHatch(
+                const basegfx::B2DRange& rDefinitionRange, 
+                const basegfx::B2DRange& rOutputRange, 
                 double fDistance, 
                 double fAngle);
-			virtual ~GeoTexSvxHatch();
+            virtual ~GeoTexSvxHatch();
 
-			// compare operator
-			virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
+            // compare operator
+            virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
 
-			virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
-			double getDistanceToHatch(const basegfx::B2DPoint& rUV) const;
-			const basegfx::B2DHomMatrix& getBackTextureTransform() const;
-		};
-	} // end of namespace texture
+            void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+            double getDistanceToHatch(const basegfx::B2DPoint& rUV) const;
+            const basegfx::B2DHomMatrix& getBackTextureTransform() const;
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
-	namespace texture
-	{
+    namespace texture
+    {
         // This class applies a tiling to the unit range. The given range
         // will be repeated inside the unit range in X and Y and for each
         // tile a matrix will be created (by appendTransformations) that
@@ -318,26 +334,26 @@ namespace drawinglayer
         // given percentage value (offsetX has to be 0.0 <= offsetX <= 1.0).
         // Accordingly to offsetY. If both are given, offsetX is preferred 
         // and offsetY is ignored.
-		class DRAWINGLAYER_DLLPUBLIC GeoTexSvxTiled : public GeoTexSvx
-		{
-		protected:
-			basegfx::B2DRange               maRange;
-			double                          mfOffsetX;
-			double                          mfOffsetY;
+        class DRAWINGLAYER_DLLPUBLIC GeoTexSvxTiled : public GeoTexSvx
+        {
+        protected:
+            basegfx::B2DRange               maRange;
+            double                          mfOffsetX;
+            double                          mfOffsetY;
 
-		public:
-			GeoTexSvxTiled(
+        public:
+            GeoTexSvxTiled(
                 const basegfx::B2DRange& rRange, 
                 double fOffsetX = 0.0,
                 double fOffsetY = 0.0);
-			virtual ~GeoTexSvxTiled();
+            virtual ~GeoTexSvxTiled();
 
-			// compare operator
-			virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
+            // compare operator
+            virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
 
-			virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
-		};
-	} // end of namespace texture
+            void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+        };
+    } // end of namespace texture
 } // end of namespace drawinglayer
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/alg_writerframes/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx?rev=1556379&r1=1556378&r2=1556379&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx (original)
+++ openoffice/branches/alg_writerframes/main/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx Tue Jan  7 22:14:04 2014
@@ -251,11 +251,11 @@ namespace drawinglayer
 			Graphic aGraphic(getFillGraphic());
 			const basegfx::B2DVector aLogicalSize(aGraphic.GetPrefSize().getWidth(), aGraphic.GetPrefSize().getHeight());
 
-			// init values with defaults
+			// init values with defaults for stretched
 			basegfx::B2DPoint aBitmapSize(1.0, 1.0);
 			basegfx::B2DVector aBitmapTopLeft(0.0, 0.0);
 
-			// are changes needed?
+			//UUUU are changes needed? When streched we are already done, all other values will have no influence
 			if(getTiling() || !getStretch())
 			{
 				// init values with range sizes
@@ -296,34 +296,33 @@ namespace drawinglayer
 					aBitmapSize.setY(aLogicalSize.getY());
 				}
 
-				// get values, force to centered if necessary
-				const basegfx::B2DVector aRectPoint(getTiling() ? getRectPoint() : basegfx::B2DVector(0.0, 0.0));
-
 				// position changes X
-				if(0.0 == aRectPoint.getX())
+				if(0.0 == getRectPoint().getX())
 				{
 					aBitmapTopLeft.setX((fRangeWidth - aBitmapSize.getX()) * 0.5);
 				}
-				else if(1.0 == aRectPoint.getX())
+				else if(1.0 == getRectPoint().getX())
 				{
 					aBitmapTopLeft.setX(fRangeWidth - aBitmapSize.getX());
 				}
 
+                // offset positions are only meaningful when tiled
 				if(getTiling() && 0.0 != getOffsetPosition().getX())
 				{
 					aBitmapTopLeft.setX(aBitmapTopLeft.getX() + (aBitmapSize.getX() * (getOffsetPosition().getX() * 0.01)));
 				}
 
 				// position changes Y
-				if(0.0 == aRectPoint.getY())
+				if(0.0 == getRectPoint().getY())
 				{
 					aBitmapTopLeft.setY((fRangeHeight - aBitmapSize.getY()) * 0.5);
 				}
-				else if(1.0 == aRectPoint.getY())
+				else if(1.0 == getRectPoint().getY())
 				{
 					aBitmapTopLeft.setY(fRangeHeight - aBitmapSize.getY());
 				}
 
+                // offset positions are only meaningful when tiled
 				if(getTiling() && 0.0 != getOffsetPosition().getY())
 				{
 					aBitmapTopLeft.setY(aBitmapTopLeft.getY() + (aBitmapSize.getY() * (getOffsetPosition().getY() * 0.01)));