[Libreoffice-commits] core.git: Branch 'aoo/trunk' - chart2/source comphelper/inc comphelper/source cui/source drawinglayer/inc drawinglayer/source editeng/inc editeng/source officecfg/registry reportdesign/source sc/source sd/source sfx2/source svl/source svx/inc svx/source sw/inc sw/Library_sw.mk sw/sdi sw/source vcl/source xmloff/inc xmloff/source
Armin Le Grand
alg at apache.org
Wed Mar 19 11:08:17 PDT 2014
chart2/source/controller/main/ShapeController.cxx | 3
comphelper/inc/comphelper/TypeGeneration.hxx | 7
comphelper/source/property/TypeGeneration.cxx | 15
cui/source/factory/dlgfact.cxx | 4
cui/source/factory/dlgfact.hxx | 2
cui/source/inc/cuitabarea.hxx | 42
cui/source/tabpages/tabarea.cxx | 13
cui/source/tabpages/tabarea.hrc | 2
cui/source/tabpages/tabarea.src | 9
cui/source/tabpages/tparea.cxx | 255 +++
drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx | 25
drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx | 20
drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx | 33
drawinglayer/inc/drawinglayer/texture/texture.hxx | 52
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx | 17
drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx | 117 +
drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx | 48
drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx | 122 +
drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx | 21
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 141 +
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 2
drawinglayer/source/processor3d/defaultprocessor3d.cxx | 63
drawinglayer/source/texture/texture.cxx | 230 ++-
drawinglayer/source/texture/texture3d.cxx | 18
editeng/inc/editeng/brshitem.hxx | 4
editeng/inc/editeng/unoprnms.hxx | 7
editeng/inc/editeng/unotext.hxx | 2
editeng/source/items/frmitems.cxx | 18
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 1
reportdesign/source/ui/misc/UITools.cxx | 2
sc/source/ui/drawfunc/drawsh.cxx | 2
sd/source/ui/func/fuarea.cxx | 2
sfx2/source/dialog/tabdlg.cxx | 12
svl/source/undo/undo.cxx | 10
svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx | 4
svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx | 22
svx/inc/svx/svxdlg.hxx | 2
svx/inc/svx/svxids.hrc | 68
svx/inc/svx/unoshprp.hxx | 14
svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx | 2
svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 1
svx/source/sdr/contact/viewcontactofsdrpage.cxx | 2
svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx | 17
svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx | 1
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 63
svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx | 24
svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 13
svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 8
svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 14
svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 12
svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx | 12
svx/source/svdraw/svddrgmt.cxx | 1
svx/source/table/viewcontactoftableobj.cxx | 6
sw/Library_sw.mk | 2
sw/inc/doc.hxx | 7
sw/inc/fillattributes.hxx | 72 +
sw/inc/format.hxx | 39
sw/inc/frmatr.hxx | 4
sw/inc/frmfmt.hxx | 33
sw/inc/hintids.hxx | 16
sw/inc/swatrset.hxx | 6
sw/inc/unobrushitemhelper.hxx | 33
sw/inc/unoframe.hxx | 5
sw/inc/unomap.hxx | 8
sw/inc/unoprnms.hxx | 30
sw/sdi/_frmsh.sdi | 83 +
sw/source/core/access/accpara.cxx | 6
sw/source/core/attr/format.cxx | 179 ++
sw/source/core/attr/swatrset.cxx | 91 +
sw/source/core/bastyp/init.cxx | 8
sw/source/core/doc/docdraw.cxx | 78 -
sw/source/core/doc/docfly.cxx | 65
sw/source/core/doc/notxtfrm.cxx | 19
sw/source/core/doc/poolfmt.cxx | 3
sw/source/core/inc/frame.hxx | 12
sw/source/core/inc/frmtool.hxx | 15
sw/source/core/layout/atrfrm.cxx | 138 +
sw/source/core/layout/fillattributes.cxx | 166 ++
sw/source/core/layout/paintfrm.cxx | 602 +++++---
sw/source/core/layout/wsfrm.cxx | 5
sw/source/core/text/inftxt.cxx | 18
sw/source/core/text/porfld.cxx | 3
sw/source/core/text/txtfly.cxx | 14
sw/source/core/txtnode/fntcache.cxx | 5
sw/source/core/unocore/unobrushitemhelper.cxx | 309 ++++
sw/source/core/unocore/unoframe.cxx | 713 +++++++++-
sw/source/core/unocore/unomap.cxx | 56
sw/source/core/unocore/unoprnms.cxx | 32
sw/source/core/unocore/unostyle.cxx | 489 +++++-
sw/source/ui/app/docst.cxx | 25
sw/source/ui/app/docstyle.cxx | 68
sw/source/ui/fmtui/tmpdlg.cxx | 41
sw/source/ui/fmtui/tmpdlg.src | 23
sw/source/ui/frmdlg/frmdlg.cxx | 70
sw/source/ui/frmdlg/frmmgr.cxx | 4
sw/source/ui/frmdlg/frmpage.src | 23
sw/source/ui/inc/frmsh.hxx | 8
sw/source/ui/shells/basesh.cxx | 89 +
sw/source/ui/shells/drawdlg.cxx | 9
sw/source/ui/shells/frmsh.cxx | 224 ++-
vcl/source/gdi/impgraph.cxx | 22
xmloff/inc/xmloff/txtprmap.hxx | 8
xmloff/inc/xmloff/xmltypes.hxx | 8
xmloff/source/text/txtexppr.cxx | 36
xmloff/source/text/txtprhdl.cxx | 36
xmloff/source/text/txtprmap.cxx | 25
106 files changed, 4704 insertions(+), 986 deletions(-)
New commits:
commit b635b4fa4e42053d30ab639643d2236a20243f62
Author: Armin Le Grand <alg at apache.org>
Date: Wed Mar 19 16:17:02 2014 +0000
Merge back branch alg_writerframes to trunk
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 14e70dc..fe820af 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -316,8 +316,7 @@ void ShapeController::executeDispatch_FormatArea()
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();
diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx
index 981ef75..78a4868 100644
--- a/comphelper/inc/comphelper/TypeGeneration.hxx
+++ b/comphelper/inc/comphelper/TypeGeneration.hxx
@@ -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 (
diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx
index bacf2bd..1b981a6 100644
--- a/comphelper/source/property/TypeGeneration.cxx
+++ b/comphelper/source/property/TypeGeneration.cxx
@@ -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,6 +235,14 @@ 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;
+
+ //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" );
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f38fadb..2c38a1e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1607,9 +1607,9 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMos
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 );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 097b62f..cdb579b 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -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,
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index bcc777f..d7a46a0 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -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; }
@@ -107,10 +105,8 @@ class SvxTransparenceTabPage : public SvxTabPage
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
- //CHINA001 sal_uInt16* pPageType;
- //CHINA001 sal_uInt16* pDlgType;
- sal_uInt16 nPageType; //add CHINA001
- sal_uInt16 nDlgType; //add CHINA001
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
// main selection
FixedLine aFlProp;
@@ -240,19 +236,23 @@ private:
XHatchListSharedPtr maHatchingList;
XBitmapListSharedPtr maBitmapList;
+ // Placeholders for pointer-based entries; these will be inited
+ // to point to these so that the page is usable without that
+ // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd).
+ // Without that the pages used in SvxAreaTabDialog are not usable
+ ChangeType maFixed_ChangeType;
+ sal_Bool maFixed_sal_Bool;
+
ChangeType* pnColorTableState;
ChangeType* pnBitmapListState;
ChangeType* pnGradientListState;
ChangeType* pnHatchingListState;
- //CHINA001 sal_uInt16* pPageType;
- //CHINA001 sal_uInt16* pDlgType;
- //CHINA001 sal_uInt16* pPos;
- sal_uInt16 nPageType; //add CHINA001
- sal_uInt16 nDlgType;//add CHINA001
- sal_uInt16 nPos; //add CHINA001
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
+ sal_uInt16 nPos;
- sal_Bool* pbAreaTP;
+ sal_Bool* pbAreaTP;
XOutdevItemPool* pXPool;
XFillAttrSetItem aXFillAttr;
@@ -261,6 +261,14 @@ private:
SfxMapUnit ePoolUnit;
FieldUnit eFUnit;
+ //UUUU
+ bool mbOfferImportButton;
+ bool mbPositionsAdapted;
+ bool mbDirectGraphicSet;
+ Graphic maDirectGraphic;
+ String maDirectName;
+ PushButton maBtnImport;
+
#ifdef _SVX_TPAREA_CXX
DECL_LINK( SelectDialogTypeHdl_Impl, ListBox * );
DECL_LINK( ClickInvisibleHdl_Impl, void * );
@@ -276,12 +284,16 @@ private:
DECL_LINK( ModifyBitmapHdl_Impl, void * );
// DECL_LINK( ModifyTransparentHdl_Impl, void * );
DECL_LINK( ModifyStepCountHdl_Impl, void * );
+
+ //UUUU
+ DECL_LINK( ClickImportHdl_Impl, void * );
+
DECL_LINK( ModifyTileHdl_Impl, void * );
DECL_LINK( ClickScaleHdl_Impl, void * );
#endif
public:
- SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs );
+ SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs );
void Construct();
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 7fc75eb..2ef09a8 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -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 ),
@@ -89,7 +89,16 @@ SvxAreaTabDialog::SvxAreaTabDialog
FreeResource();
AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 );
- AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 );
+
+ 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 );
diff --git a/cui/source/tabpages/tabarea.hrc b/cui/source/tabpages/tabarea.hrc
index 478d029..7406502 100644
--- a/cui/source/tabpages/tabarea.hrc
+++ b/cui/source/tabpages/tabarea.hrc
@@ -142,6 +142,8 @@
#define RBT_COLUMN 7
#define MTR_FLD_OFFSET 3
#define GRP_OFFSET 8
+//UUUU
+#define BTN_IMPORTOPTIONAL 1
#define FT_TRANSPARENT 9
#define FT_X_SIZE 10
diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src
index 0d750d5..0982cb5 100644
--- a/cui/source/tabpages/tabarea.src
+++ b/cui/source/tabpages/tabarea.src
@@ -560,6 +560,15 @@ TabPage RID_SVXPAGE_AREA
Last = 100 ;
SpinSize = 5 ;
};
+ //UUUU
+ PushButton BTN_IMPORTOPTIONAL
+ {
+ HelpID = "cui:PushButton:MD_ICONSELECTOR:BTN_IMPORTOPTIONAL";
+ Pos = MAP_APPFONT ( 132 + 12, 157 + 6 ) ;
+ Size = MAP_APPFONT ( 100 , 14 ) ;
+ TabStop = TRUE ;
+ Text[ en-US ] = "Import Graphic...";
+ };
};
// RID_SVXPAGE_SHADOW ------------------------------------------------------
TabPage RID_SVXPAGE_SHADOW
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4f70a92..f175e25 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -54,6 +54,11 @@
#include <svl/intitem.hxx> //add CHINA001
#include <sfx2/request.hxx>//add CHINA001
#include "paragrph.hrc"
+
+//UUUU
+#include "sfx2/opengrf.hxx"
+#include <vcl/msgbox.hxx>
+
#define DLGWIN this->GetParent()->GetParent()
// static ----------------------------------------------------------------
@@ -250,6 +255,8 @@ void SvxTransparenceTabPage::SetControlState_Impl(XGradientStyle eXGS)
SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs)
: SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_TRANSPARENCE ), rInAttrs),
rOutAttrs ( rInAttrs ),
+ eRP ( RP_MM ),
+
nPageType(0),
nDlgType(0),
@@ -616,9 +623,8 @@ void SvxTransparenceTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
|*
\************************************************************************/
-SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
-
- SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_AREA ), rInAttrs ),
+SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs )
+: SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_AREA ), rInAttrs ),
aFlProp ( this, CUI_RES( FL_PROP ) ),
aTypeLB ( this, CUI_RES( LB_AREA_TYPE ) ),
@@ -659,15 +665,43 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ),
rOutAttrs ( rInAttrs ),
+ eRP ( RP_MM ),
maColorTab(),
maGradientList(),
maHatchingList(),
maBitmapList(),
+ // local fixed not o be changed values for local pointers
+ maFixed_ChangeType(CT_NONE),
+ maFixed_sal_Bool(false),
+
+ // init with pointers to fixed ChangeType
+ pnColorTableState(&maFixed_ChangeType),
+ pnBitmapListState(&maFixed_ChangeType),
+ pnGradientListState(&maFixed_ChangeType),
+ pnHatchingListState(&maFixed_ChangeType),
+
+ nPageType(0),
+ nDlgType(0),
+ nPos(0),
+
+ // init with pointer to fixed bool
+ pbAreaTP(&maFixed_sal_Bool),
+
pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
aXFillAttr ( pXPool ),
- rXFSet ( aXFillAttr.GetItemSet() )
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ ePoolUnit(SFX_MAPUNIT_100TH_MM),
+ eFUnit(FUNIT_NONE),
+
+ //UUUU
+ mbOfferImportButton(false),
+ mbPositionsAdapted(false),
+ mbDirectGraphicSet(false),
+ maDirectGraphic(),
+ maBtnImport(this, CUI_RES(BTN_IMPORTOPTIONAL))
{
FreeResource();
@@ -683,6 +717,8 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
aTsbStepCount.Hide();
aNumFldStepCount.Hide();
+ //UUUU
+ maBtnImport.Hide();
aTsbTile.Hide();
aTsbStretch.Hide();
aTsbScale.Hide();
@@ -702,6 +738,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
aFtYOffset.Hide();
aMtrFldYOffset.Hide();
aFlPosition.Hide();
+
// Controls for Hatch-Background
aCbxHatchBckgrd.Hide();
aLbHatchBckgrdColor.Hide();
@@ -754,6 +791,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
aNumFldStepCount.SetModifyHdl(
LINK( this, SvxAreaTabPage, ModifyStepCountHdl_Impl ) );
+ //UUUU
+ maBtnImport.SetClickHdl(LINK(this, SvxAreaTabPage, ClickImportHdl_Impl));
+ maBtnImport.SetAccessibleRelationMemberOf(&aFlProp);
+
Link aLink( LINK( this, SvxAreaTabPage, ModifyTileHdl_Impl ) );
aTsbTile.SetClickHdl( aLink );
aTsbStretch.SetClickHdl( aLink );
@@ -1124,33 +1165,44 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
break;
case XFILL_BITMAP:
{
- nPos = aLbBitmap.GetSelectEntryPos();
- if( nPos != LISTBOX_ENTRY_NOTFOUND &&
- nPos != aLbBitmap.GetSavedValue() )
+ //UUUU
+ if(mbDirectGraphicSet && GRAPHIC_NONE != maDirectGraphic.GetType())
{
- const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos);
- const String aString(aLbBitmap.GetSelectEntry());
- const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
- pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
- if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) )
- {
- rAttrs.Put( aFillBitmapItem );
- bModified = sal_True;
- }
+ const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic);
+ rAttrs.Put(XFillStyleItem(XFILL_BITMAP));
+ rAttrs.Put(aXBmpItem);
+ bModified = sal_True;
}
- // NEU
- if( (eSavedStyle != eStyle) &&
- ( bModified ||
- SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) )
+ else
{
- XFillStyleItem aStyleItem( XFILL_BITMAP );
- pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
- if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ nPos = aLbBitmap.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbBitmap.GetSavedValue() )
{
- rAttrs.Put( aStyleItem );
- bModified = sal_True;
+ const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos);
+ const String aString(aLbBitmap.GetSelectEntry());
+ const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
+ pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
+ if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) )
+ {
+ rAttrs.Put( aFillBitmapItem );
+ bModified = sal_True;
+ }
}
- }
+ // NEU
+ if( (eSavedStyle != eStyle) &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_BITMAP );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = sal_True;
+ }
+ }
+ }
}
break;
}
@@ -1778,6 +1830,8 @@ IMPL_LINK( SvxAreaTabPage, SelectDialogTypeHdl_Impl, ListBox *, EMPTYARG )
IMPL_LINK( SvxAreaTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG )
{
+ //UUUU
+ maBtnImport.Hide();
aTsbTile.Hide();
aTsbStretch.Hide();
aTsbScale.Hide();
@@ -1827,6 +1881,8 @@ IMPL_LINK( SvxAreaTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG )
IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG )
{
+ //UUUU
+ maBtnImport.Hide();
aTsbTile.Hide();
aTsbStretch.Hide();
aTsbScale.Hide();
@@ -1915,6 +1971,8 @@ IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG )
IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG )
{
+ //UUUU
+ maBtnImport.Hide();
aTsbTile.Hide();
aTsbStretch.Hide();
aTsbScale.Hide();
@@ -2023,6 +2081,8 @@ IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG )
aTsbStepCount.Hide();
aNumFldStepCount.Hide();
+ //UUUU
+ maBtnImport.Hide();
aTsbTile.Hide();
aTsbStretch.Hide();
aTsbScale.Hide();
@@ -2197,6 +2257,50 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG )
aCbxHatchBckgrd.Hide();
aLbHatchBckgrdColor.Hide();
+ //UUUU
+ if(mbOfferImportButton)
+ {
+ maBtnImport.Show();
+ maBtnImport.Enable();
+ }
+ else
+ {
+ maBtnImport.Hide();
+ maBtnImport.Disable();
+ }
+
+ if(mbOfferImportButton && !mbPositionsAdapted)
+ {
+ //UUUU adapt positions only once in dialogs lifetime
+ mbPositionsAdapted = true;
+
+ // adapt in y from position of FL_SIZE MAP_APPFONT(3) to position of MTR_FLD_OFFSET MAP_APPFONT(157)
+ const sal_uInt32 nOrigStartY(aFlSize.GetPosPixel().Y());
+ const sal_uInt32 nOrigHeight(aMtrFldOffset.GetPosPixel().Y() - nOrigStartY);
+ const sal_uInt32 nBtnImportHeight(maBtnImport.GetSizePixel().Height());
+ const sal_uInt32 nNewHeight(nOrigHeight - nBtnImportHeight);
+
+ aFlSize.SetPosPixel(Point(aFlSize.GetPosPixel().X(), nOrigStartY + (((aFlSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aTsbOriginal.SetPosPixel(Point(aTsbOriginal.GetPosPixel().X(), nOrigStartY + (((aTsbOriginal.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aTsbScale.SetPosPixel(Point(aTsbScale.GetPosPixel().X(), nOrigStartY + (((aTsbScale.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFtXSize.SetPosPixel(Point(aFtXSize.GetPosPixel().X(), nOrigStartY + (((aFtXSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aMtrFldXSize.SetPosPixel(Point(aMtrFldXSize.GetPosPixel().X(), nOrigStartY + (((aMtrFldXSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFtYSize.SetPosPixel(Point(aFtYSize.GetPosPixel().X(), nOrigStartY + (((aFtYSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aMtrFldYSize.SetPosPixel(Point(aMtrFldYSize.GetPosPixel().X(), nOrigStartY + (((aMtrFldYSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFlPosition.SetPosPixel(Point(aFlPosition.GetPosPixel().X(), nOrigStartY + (((aFlPosition.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aCtlPosition.SetPosPixel(Point(aCtlPosition.GetPosPixel().X(), nOrigStartY + (((aCtlPosition.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFtXOffset.SetPosPixel(Point(aFtXOffset.GetPosPixel().X(), nOrigStartY + (((aFtXOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aMtrFldXOffset.SetPosPixel(Point(aMtrFldXOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldXOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFtYOffset.SetPosPixel(Point(aFtYOffset.GetPosPixel().X(), nOrigStartY + (((aFtYOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aMtrFldYOffset.SetPosPixel(Point(aMtrFldYOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldYOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aTsbTile.SetPosPixel(Point(aTsbTile.GetPosPixel().X(), nOrigStartY + (((aTsbTile.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aTsbStretch.SetPosPixel(Point(aTsbStretch.GetPosPixel().X(), nOrigStartY + (((aTsbStretch.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aFlOffset.SetPosPixel(Point(aFlOffset.GetPosPixel().X(), nOrigStartY + (((aFlOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aRbtRow.SetPosPixel(Point(aRbtRow.GetPosPixel().X(), nOrigStartY + (((aRbtRow.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aRbtColumn.SetPosPixel(Point(aRbtColumn.GetPosPixel().X(), nOrigStartY + (((aRbtColumn.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ aMtrFldOffset.SetPosPixel(Point(aMtrFldOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight)));
+ }
+
aTsbTile.Show();
aTsbStretch.Show();
aTsbScale.Show();
@@ -2244,6 +2348,11 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG )
IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG )
{
+ //UUUU
+ mbDirectGraphicSet = false;
+ maDirectGraphic.Clear();
+ maDirectName = String();
+
const SfxPoolItem* pPoolItem = NULL;
sal_uInt16 _nPos = aLbBitmap.GetSelectEntryPos();
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -2320,25 +2429,77 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
//------------------------------------------------------------------------
+IMPL_LINK( SvxAreaTabPage, ClickImportHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr& rMgr = CUI_MGR();
+ SvxOpenGraphicDialog aDlg(UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Import")));
+ aDlg.EnableLink(sal_False);
+
+ if(!aDlg.Execute())
+ {
+ EnterWait();
+ const int nError(aDlg.GetGraphic(maDirectGraphic));
+ LeaveWait();
+
+ if(!nError && GRAPHIC_NONE != maDirectGraphic.GetType())
+ {
+ // extract name from filename
+ const INetURLObject aURL(aDlg.GetPath());
+ maDirectName = String(aURL.GetName()).GetToken( 0, '.' );
+
+ // use loaded graphic
+ const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic);
+ rXFSet.Put(XFillStyleItem(XFILL_BITMAP));
+ rXFSet.Put(aXBmpItem);
+
+ // trigger state flag for directly loaded graphic
+ mbDirectGraphicSet = true;
+
+ // preview
+ aCtlBitmapPreview.SetAttributes(aXFillAttr.GetItemSet());
+ aCtlBitmapPreview.Invalidate();
+ }
+ else
+ {
+ // graphic could not be loaded
+ ErrorBox(DLGWIN, WinBits(WB_OK), String(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute();
+ }
+ }
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG )
{
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();
+ // allow positioning
aCtlPosition.Enable();
aCtlPosition.Invalidate();
+
+ // allow offsets
aFtXOffset.Enable();
aMtrFldXOffset.Enable();
aFtYOffset.Enable();
aMtrFldYOffset.Enable();
+
+ // allow 'Position" title
aFlPosition.Enable();
+ // allow size definitions
aTsbScale.Enable();
aTsbOriginal.Enable();
aFtXSize.Enable();
@@ -2349,22 +2510,33 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG )
}
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();
+ // no need for offsets, only position is supported in non-tiled
aFtXOffset.Disable();
aMtrFldXOffset.Disable();
aFtYOffset.Disable();
aMtrFldYOffset.Disable();
- aFlPosition.Disable();
if( aTsbStretch.GetState() != STATE_NOCHECK )
{
+ // non-tiled, stretched
+ // no need for positioning
+ aCtlPosition.Disable();
+ aCtlPosition.Invalidate();
+
+ // no need for 'Position" title, all deactivated
+ aFlPosition.Disable();
+
+ // no need for size definitions
aTsbScale.Disable();
aTsbOriginal.Disable();
aFtXSize.Disable();
@@ -2375,6 +2547,15 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG )
}
else
{
+ // non-tiled, non-stretched
+ // allow positioning
+ aCtlPosition.Enable();
+ aCtlPosition.Invalidate();
+
+ // allow 'Position" title, positioning is active
+ aFlPosition.Enable();
+
+ // allow size definitions
aTsbScale.Enable();
aTsbOriginal.Enable();
aFtXSize.Enable();
@@ -2386,6 +2567,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG )
}
else
{
+ // disable all when tiling is undefined
aTsbStretch.Disable();
aRbtRow.Disable();
aRbtColumn.Disable();
@@ -2573,6 +2755,8 @@ void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False);
SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,sal_False);
SFX_ITEMSET_ARG (&aSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False);
+ //UUUU
+ SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT, sal_False);
if (pColorTabItem)
SetColorTable(pColorTabItem->GetColorTable());
@@ -2588,6 +2772,19 @@ void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
SetDlgType(pDlgTypeItem->GetValue());
if (pPosItem)
SetPos(pPosItem->GetValue());
+
+ //UUUU
+ if(pOfferImportItem)
+ {
+ const bool bNew(pOfferImportItem->GetValue());
+
+ if(mbOfferImportButton != bNew)
+ {
+ mbOfferImportButton = bNew;
+ }
+ }
+
Construct();
}
+//eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index b937dee..3b4e818 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -58,8 +58,12 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- /// the geometric definition
- basegfx::B2DRange maObjectRange;
+ /// 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;
@@ -67,14 +71,14 @@ namespace drawinglayer
/// 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:
@@ -85,13 +89,18 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- /// constructor
+ /// 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& rObjectRange,
+ const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rDefinitionRange,
const attribute::FillGradientAttribute& rFillGradient);
/// data read access
- const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
+ const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
+ const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
/// compare operator
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index 9fbc68b..d360f03 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -53,8 +53,12 @@ namespace drawinglayer
class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D : public DiscreteMetricDependentPrimitive2D
{
private:
- /// the geometric definition
- basegfx::B2DRange maObjectRange;
+ /// 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;
@@ -67,14 +71,20 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- /// constructor
+ /// 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& rObjectRange,
+ const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rBColor,
const attribute::FillHatchAttribute& rFillHatch);
/// data read access
- const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
+ 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; }
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index b07cbab..d604f23 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -47,7 +47,7 @@ namespace drawinglayer
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
{
@@ -315,6 +315,9 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+ /// the definition range
+ basegfx::B2DRange maDefinitionRange;
+
/// the gradient definition
attribute::FillGradientAttribute maFillGradient;
@@ -323,13 +326,18 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- /// constructor
+ /// 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
@@ -360,6 +368,9 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+ /// the definition range
+ basegfx::B2DRange maDefinitionRange;
+
/// the hatch background color (if used)
basegfx::BColor maBackgroundColor;
@@ -371,14 +382,20 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- /// constructor
+ /// 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; }
@@ -410,6 +427,9 @@ namespace drawinglayer
/// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+ /// the definition range
+ basegfx::B2DRange maDefinitionRange;
+
/// the bitmap fill definition (may include tiling)
attribute::FillGraphicAttribute maFillGraphic;
@@ -418,13 +438,18 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- /// constructor
+ /// 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
diff --git a/drawinglayer/inc/drawinglayer/texture/texture.hxx b/drawinglayer/inc/drawinglayer/texture/texture.hxx
index aa62d1e..ce1e97d 100644
--- a/drawinglayer/inc/drawinglayer/texture/texture.hxx
+++ b/drawinglayer/inc/drawinglayer/texture/texture.hxx
@@ -79,14 +79,14 @@ namespace drawinglayer
{
protected:
basegfx::ODFGradientInfo maGradientInfo;
- basegfx::B2DRange maTargetRange;
+ basegfx::B2DRange maDefinitionRange;
basegfx::BColor maStart;
basegfx::BColor maEnd;
double mfBorder;
public:
GeoTexSvxGradient(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -99,7 +99,7 @@ namespace drawinglayer
// 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; }
@@ -116,9 +116,15 @@ namespace drawinglayer
{
class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear : public GeoTexSvxGradient
{
+ protected:
+ double mfUnitMinX;
+ double mfUnitWidth;
+ double mfUnitMaxY;
+
public:
GeoTexSvxGradientLinear(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rOutputRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -128,7 +134,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -142,9 +148,14 @@ namespace drawinglayer
{
class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial : public GeoTexSvxGradient
{
+ protected:
+ double mfUnitMinX;
+ double mfUnitWidth;
+
public:
GeoTexSvxGradientAxial(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rOutputRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -154,7 +165,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -170,7 +181,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientRadial(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -181,7 +192,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -197,7 +208,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientElliptical(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -209,7 +220,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -225,7 +236,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientSquare(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -237,7 +248,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -253,7 +264,7 @@ namespace drawinglayer
{
public:
GeoTexSvxGradientRect(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 nSteps,
@@ -265,7 +276,7 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor);
+ basegfx::BColor& rOuterColor);
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
};
} // end of namespace texture
@@ -280,15 +291,20 @@ namespace drawinglayer
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& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::B2DRange& rOutputRange,
double fDistance,
double fAngle);
virtual ~GeoTexSvxHatch();
@@ -296,7 +312,7 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
- virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+ void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
double getDistanceToHatch(const basegfx::B2DPoint& rUV) const;
const basegfx::B2DHomMatrix& getBackTextureTransform() const;
};
@@ -335,7 +351,7 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
- virtual void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+ void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
};
} // end of namespace texture
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
index aeba381..174b948 100755
--- a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
@@ -263,11 +263,11 @@ namespace drawinglayer
// get logical size of bitmap (before expanding eventually)
Graphic aGraphic(getFillGraphic());
- // 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
@@ -312,34 +312,33 @@ namespace drawinglayer
aBitmapSize.setY(getGraphicLogicSize().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)));
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index d5132de..9d7251a 100644
--- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
@@ -44,7 +44,7 @@ namespace drawinglayer
{
void FillGradientPrimitive2D::generateMatricesAndColors(
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- basegfx::BColor& rOutmostColor) const
+ basegfx::BColor& rOuterColor) const
{
rEntries.clear();
@@ -73,38 +73,83 @@ namespace drawinglayer
{
case attribute::GRADIENTSTYLE_LINEAR:
{
- texture::GeoTexSvxGradientLinear aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientLinear aGradient(
+ getDefinitionRange(),
+ getOutputRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
case attribute::GRADIENTSTYLE_AXIAL:
{
- texture::GeoTexSvxGradientAxial aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientAxial aGradient(
+ getDefinitionRange(),
+ getOutputRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
case attribute::GRADIENTSTYLE_RADIAL:
{
- texture::GeoTexSvxGradientRadial aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientRadial aGradient(
+ getDefinitionRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getOffsetX(),
+ getFillGradient().getOffsetY());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
case attribute::GRADIENTSTYLE_ELLIPTICAL:
{
- texture::GeoTexSvxGradientElliptical aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientElliptical aGradient(
+ getDefinitionRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getOffsetX(),
+ getFillGradient().getOffsetY(),
+ getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
case attribute::GRADIENTSTYLE_SQUARE:
{
- texture::GeoTexSvxGradientSquare aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientSquare aGradient(
+ getDefinitionRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getOffsetX(),
+ getFillGradient().getOffsetY(),
+ getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
case attribute::GRADIENTSTYLE_RECT:
{
- texture::GeoTexSvxGradientRect aGradient(getObjectRange(), aStart, aEnd, nSteps, getFillGradient().getBorder(), getFillGradient().getOffsetX(), getFillGradient().getOffsetY(), getFillGradient().getAngle());
- aGradient.appendTransformationsAndColors(rEntries, rOutmostColor);
+ texture::GeoTexSvxGradientRect aGradient(
+ getDefinitionRange(),
+ aStart,
+ aEnd,
+ nSteps,
+ getFillGradient().getBorder(),
+ getFillGradient().getOffsetX(),
+ getFillGradient().getOffsetY(),
+ getFillGradient().getAngle());
+ aGradient.appendTransformationsAndColors(rEntries, rOuterColor);
break;
}
}
@@ -112,7 +157,7 @@ namespace drawinglayer
Primitive2DSequence FillGradientPrimitive2D::createOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOutmostColor,
+ const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
@@ -121,8 +166,9 @@ namespace drawinglayer
// create solid fill with outmost color
aRetval[0] = Primitive2DReference(
new PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getObjectRange())),
- rOutmostColor));
+ basegfx::B2DPolyPolygon(
+ basegfx::tools::createPolygonFromRect(getOutputRange())),
+ rOuterColor));
// create solid fill steps
for(sal_uInt32 a(0); a < rEntries.size(); a++)
@@ -144,14 +190,14 @@ namespace drawinglayer
Primitive2DSequence FillGradientPrimitive2D::createNonOverlappingFill(
const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries,
- const basegfx::BColor& rOutmostColor,
+ const basegfx::BColor& rOuterColor,
const basegfx::B2DPolygon& rUnitPolygon) const
{
// prepare return value
Primitive2DSequence aRetval(rEntries.size() + 1);
- // get outmost range from object
- basegfx::B2DRange aOutmostRange(getObjectRange());
+ // get outmost viusible range from object
+ basegfx::B2DRange aOutmostRange(getOutputRange());
basegfx::B2DPolyPolygon aCombinedPolyPoly;
if(rEntries.size())
@@ -169,7 +215,7 @@ namespace drawinglayer
aRetval[0] = Primitive2DReference(
new PolyPolygonColorPrimitive2D(
aCombinedPolyPoly,
- rOutmostColor));
+ rOuterColor));
if(rEntries.size())
{
@@ -227,17 +273,17 @@ namespace drawinglayer
// get the transform matrices and colors (where colors
// will have one more entry that matrices)
std::vector< drawinglayer::texture::B2DHomMatrixAndBColor > aEntries;
- basegfx::BColor aOutmostColor;
+ basegfx::BColor aOuterColor;
- generateMatricesAndColors(aEntries, aOutmostColor);
+ generateMatricesAndColors(aEntries, aOuterColor);
if(bOverlapping)
{
- return createOverlappingFill(aEntries, aOutmostColor, aUnitPolygon);
+ return createOverlappingFill(aEntries, aOuterColor, aUnitPolygon);
}
else
{
- return createNonOverlappingFill(aEntries, aOutmostColor, aUnitPolygon);
+ return createNonOverlappingFill(aEntries, aOuterColor, aUnitPolygon);
}
}
@@ -263,10 +309,22 @@ namespace drawinglayer
}
FillGradientPrimitive2D::FillGradientPrimitive2D(
- const basegfx::B2DRange& rObjectRange,
+ const basegfx::B2DRange& rOutputRange,
const attribute::FillGradientAttribute& rFillGradient)
: BufferedDecompositionPrimitive2D(),
- maObjectRange(rObjectRange),
+ maOutputRange(rOutputRange),
+ maDefinitionRange(rOutputRange),
+ maFillGradient(rFillGradient)
+ {
+ }
+
+ FillGradientPrimitive2D::FillGradientPrimitive2D(
+ const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rDefinitionRange,
+ const attribute::FillGradientAttribute& rFillGradient)
+ : BufferedDecompositionPrimitive2D(),
+ maOutputRange(rOutputRange),
+ maDefinitionRange(rDefinitionRange),
maFillGradient(rFillGradient)
{
}
@@ -277,7 +335,8 @@ namespace drawinglayer
{
const FillGradientPrimitive2D& rCompare = (FillGradientPrimitive2D&)rPrimitive;
- return (getObjectRange() == rCompare.getObjectRange()
+ return (getOutputRange() == rCompare.getOutputRange()
+ && getDefinitionRange() == rCompare.getDefinitionRange()
&& getFillGradient() == rCompare.getFillGradient());
}
@@ -286,8 +345,8 @@ namespace drawinglayer
basegfx::B2DRange FillGradientPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- // return ObjectRange
- return getObjectRange();
+ // return the geometrically visible area
+ return getOutputRange();
}
// provide unique ID
diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
index beb5707..41fc4ff 100644
--- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
@@ -74,7 +74,12 @@ namespace drawinglayer
case attribute::HATCHSTYLE_TRIPLE:
{
// rotated 45 degrees
- texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle - F_PI4);
+ texture::GeoTexSvxHatch aHatch(
+ getDefinitionRange(),
+ getOutputRange(),
+ fDistance,
+ fAngle - F_PI4);
+
aHatch.appendTransformations(aMatrices);
// fall-through by purpose
@@ -82,7 +87,12 @@ namespace drawinglayer
case attribute::HATCHSTYLE_DOUBLE:
{
// rotated 90 degrees
- texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle - F_PI2);
+ texture::GeoTexSvxHatch aHatch(
+ getDefinitionRange(),
+ getOutputRange(),
+ fDistance,
+ fAngle - F_PI2);
+
aHatch.appendTransformations(aMatrices);
// fall-through by purpose
@@ -90,7 +100,12 @@ namespace drawinglayer
case attribute::HATCHSTYLE_SINGLE:
{
// angle as given
- texture::GeoTexSvxHatch aHatch(getObjectRange(), fDistance, fAngle);
+ texture::GeoTexSvxHatch aHatch(
+ getDefinitionRange(),
+ getOutputRange(),
+ fDistance,
+ fAngle);
+
aHatch.appendTransformations(aMatrices);
}
}
@@ -106,7 +121,7 @@ namespace drawinglayer
const Primitive2DReference xRef(
new PolyPolygonColorPrimitive2D(
basegfx::B2DPolyPolygon(
- basegfx::tools::createPolygonFromRect(getObjectRange())), getBColor()));
+ basegfx::tools::createPolygonFromRect(getOutputRange())), getBColor()));
aRetval[0] = xRef;
}
@@ -132,11 +147,25 @@ namespace drawinglayer
}
FillHatchPrimitive2D::FillHatchPrimitive2D(
- const basegfx::B2DRange& rObjectRange,
+ const basegfx::B2DRange& rOutputRange,
+ const basegfx::BColor& rBColor,
+ const attribute::FillHatchAttribute& rFillHatch)
+ : DiscreteMetricDependentPrimitive2D(),
+ maOutputRange(rOutputRange),
+ maDefinitionRange(rOutputRange),
+ maFillHatch(rFillHatch),
+ maBColor(rBColor)
+ {
+ }
+
+ FillHatchPrimitive2D::FillHatchPrimitive2D(
+ const basegfx::B2DRange& rOutputRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rBColor,
const attribute::FillHatchAttribute& rFillHatch)
: DiscreteMetricDependentPrimitive2D(),
- maObjectRange(rObjectRange),
+ maOutputRange(rOutputRange),
+ maDefinitionRange(rDefinitionRange),
maFillHatch(rFillHatch),
maBColor(rBColor)
{
@@ -148,7 +177,8 @@ namespace drawinglayer
{
const FillHatchPrimitive2D& rCompare = (FillHatchPrimitive2D&)rPrimitive;
- return (getObjectRange() == rCompare.getObjectRange()
+ return (getOutputRange() == rCompare.getOutputRange()
+ && getDefinitionRange() == rCompare.getDefinitionRange()
&& getFillHatch() == rCompare.getFillHatch()
&& getBColor() == rCompare.getBColor());
}
@@ -158,8 +188,8 @@ namespace drawinglayer
basegfx::B2DRange FillHatchPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
- // return ObjectRange
- return getObjectRange();
+ // return the geometrically visible area
+ return getOutputRange();
}
Primitive2DSequence FillHatchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index 142002e..e648122 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -208,7 +208,7 @@ namespace drawinglayer
PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute,
+ const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
@@ -219,7 +219,7 @@ namespace drawinglayer
PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute)
+ const attribute::LineAttribute& rLineAttribute)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
maLineAttribute(rLineAttribute),
@@ -304,7 +304,7 @@ namespace drawinglayer
PolyPolygonStrokeArrowPrimitive2D::PolyPolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute,
+ const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute,
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd)
@@ -316,7 +316,7 @@ namespace drawinglayer
PolyPolygonStrokeArrowPrimitive2D::PolyPolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- const attribute::LineAttribute& rLineAttribute,
+ const attribute::LineAttribute& rLineAttribute,
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd)
: PolyPolygonStrokePrimitive2D(rPolyPolygon, rLineAttribute),
@@ -412,7 +412,10 @@ namespace drawinglayer
{
// create SubSequence with FillGradientPrimitive2D
const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
- FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(aPolyPolygonRange, getFillGradient());
+ FillGradientPrimitive2D* pNewGradient = new FillGradientPrimitive2D(
+ aPolyPolygonRange,
+ getDefinitionRange(),
+ getFillGradient());
const Primitive2DReference xSubRef(pNewGradient);
const Primitive2DSequence aSubSequence(&xSubRef, 1L);
@@ -433,6 +436,18 @@ namespace drawinglayer
const attribute::FillGradientAttribute& rFillGradient)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rPolyPolygon.getB2DRange()),
+ maFillGradient(rFillGradient)
+ {
+ }
+
+ PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::B2DRange& rDefinitionRange,
+ const attribute::FillGradientAttribute& rFillGradient)
+ : BufferedDecompositionPrimitive2D(),
+ maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rDefinitionRange),
maFillGradient(rFillGradient)
{
}
@@ -443,7 +458,9 @@ namespace drawinglayer
{
const PolyPolygonGradientPrimitive2D& rCompare = (PolyPolygonGradientPrimitive2D&)rPrimitive;
- return (getFillGradient() == rCompare.getFillGradient());
+ return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+ && getDefinitionRange() == rCompare.getDefinitionRange()
+ && getFillGradient() == rCompare.getFillGradient());
}
return false;
@@ -467,7 +484,11 @@ namespace drawinglayer
{
// create SubSequence with FillHatchPrimitive2D
const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
- FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(aPolyPolygonRange, getBackgroundColor(), getFillHatch());
+ FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(
+ aPolyPolygonRange,
+ getDefinitionRange(),
+ getBackgroundColor(),
+ getFillHatch());
const Primitive2DReference xSubRef(pNewHatch);
const Primitive2DSequence aSubSequence(&xSubRef, 1L);
@@ -489,6 +510,20 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatch)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rPolyPolygon.getB2DRange()),
+ maBackgroundColor(rBackgroundColor),
+ maFillHatch(rFillHatch)
+ {
+ }
+
+ PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D(
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::B2DRange& rDefinitionRange,
+ const basegfx::BColor& rBackgroundColor,
+ const attribute::FillHatchAttribute& rFillHatch)
+ : BufferedDecompositionPrimitive2D(),
+ maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rDefinitionRange),
maBackgroundColor(rBackgroundColor),
maFillHatch(rFillHatch)
{
@@ -500,7 +535,9 @@ namespace drawinglayer
{
const PolyPolygonHatchPrimitive2D& rCompare = (PolyPolygonHatchPrimitive2D&)rPrimitive;
- return (getBackgroundColor() == rCompare.getBackgroundColor()
+ return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+ && getDefinitionRange() == rCompare.getDefinitionRange()
+ && getBackgroundColor() == rCompare.getBackgroundColor()
&& getFillHatch() == rCompare.getFillHatch());
}
@@ -535,15 +572,56 @@ namespace drawinglayer
if(aPrefSize.Width() && aPrefSize.Height())
{
// create SubSequence with FillGraphicPrimitive2D based on polygon range
- const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange());
+ const basegfx::B2DRange aOutRange(getB2DPolyPolygon().getB2DRange());
const basegfx::B2DHomMatrix aNewObjectTransform(
basegfx::tools::createScaleTranslateB2DHomMatrix(
- aPolyPolygonRange.getRange(),
- aPolyPolygonRange.getMinimum()));
- const Primitive2DReference xSubRef(
- new FillGraphicPrimitive2D(
+ aOutRange.getRange(),
+ aOutRange.getMinimum()));
+ Primitive2DReference xSubRef;
+
+ if(aOutRange != getDefinitionRange())
+ {
+ // we want to paint (tiled) content which is defined relative to DefinitionRange
+ // with the same tiling and offset(s) in the traget range of the geometry (the
+ // polygon). The range given in the local FillGraphicAttribute defines the position
+ // of the graphic in unit coordinates relative to the DefinitionRange. Transform
+ // this using DefinitionRange to get to the global definition and then with the
+ // inverse transformation from the target range to go to unit coordinates relative
+ // to that traget coordinate system.
+ basegfx::B2DRange aAdaptedRange(getFillGraphic().getGraphicRange());
+
+ const basegfx::B2DHomMatrix aFromDefinitionRangeToGlobal(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ getDefinitionRange().getRange(),
+ getDefinitionRange().getMinimum()));
+
+ aAdaptedRange.transform(aFromDefinitionRangeToGlobal);
+
+ basegfx::B2DHomMatrix aFromGlobalToOutRange(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ aOutRange.getRange(),
+ aOutRange.getMinimum()));
+ aFromGlobalToOutRange.invert();
+
+ aAdaptedRange.transform(aFromGlobalToOutRange);
+
+ const drawinglayer::attribute::FillGraphicAttribute aAdaptedFillGraphicAttribute(
+ getFillGraphic().getGraphic(),
+ aAdaptedRange,
+ getFillGraphic().getTiling(),
+ getFillGraphic().getOffsetX(),
+ getFillGraphic().getOffsetY());
+
+ xSubRef = new FillGraphicPrimitive2D(
+ aNewObjectTransform,
+ aAdaptedFillGraphicAttribute);
+ }
+ else
+ {
+ xSubRef = new FillGraphicPrimitive2D(
aNewObjectTransform,
- getFillGraphic()));
+ getFillGraphic());
+ }
// embed to mask primitive
const Primitive2DReference xRef(
@@ -564,6 +642,18 @@ namespace drawinglayer
const attribute::FillGraphicAttribute& rFillGraphic)
: BufferedDecompositionPrimitive2D(),
maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rPolyPolygon.getB2DRange()),
+ maFillGraphic(rFillGraphic)
+ {
+ }
+
+ PolyPolygonGraphicPrimitive2D::PolyPolygonGraphicPrimitive2D(
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::B2DRange& rDefinitionRange,
+ const attribute::FillGraphicAttribute& rFillGraphic)
+ : BufferedDecompositionPrimitive2D(),
+ maPolyPolygon(rPolyPolygon),
+ maDefinitionRange(rDefinitionRange),
maFillGraphic(rFillGraphic)
{
}
@@ -574,7 +664,9 @@ namespace drawinglayer
{
const PolyPolygonGraphicPrimitive2D& rCompare = (PolyPolygonGraphicPrimitive2D&)rPrimitive;
- return (getFillGraphic() == rCompare.getFillGraphic());
+ return (getB2DPolyPolygon() == rCompare.getB2DPolyPolygon()
+ && getDefinitionRange() == rCompare.getDefinitionRange()
+ && getFillGraphic() == rCompare.getFillGraphic());
}
return false;
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index 7b13bfe..22d9f84 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -152,19 +152,34 @@ namespace drawinglayer
case attribute::HATCHSTYLE_TRIPLE:
{
// rotated 45 degrees
- texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle - F_PI4);
+ texture::GeoTexSvxHatch aHatch(
+ aOutlineRange,
+ aOutlineRange,
+ getHatch().getDistance(),
+ fAngle - F_PI4);
+
aHatch.appendTransformations(aMatrices);
}
case attribute::HATCHSTYLE_DOUBLE:
{
// rotated 90 degrees
- texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle - F_PI2);
+ texture::GeoTexSvxHatch aHatch(
+ aOutlineRange,
+ aOutlineRange,
+ getHatch().getDistance(),
+ fAngle - F_PI2);
+
aHatch.appendTransformations(aMatrices);
}
case attribute::HATCHSTYLE_SINGLE:
{
// angle as given
- texture::GeoTexSvxHatch aHatch(aOutlineRange, getHatch().getDistance(), fAngle);
+ texture::GeoTexSvxHatch aHatch(
+ aOutlineRange,
+ aOutlineRange,
+ getHatch().getDistance(),
+ fAngle);
+
aHatch.appendTransformations(aMatrices);
}
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index d6a93ba..6618102 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1454,6 +1454,15 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
+ if(aLocalPolyPolygon.getB2DRange() != rHatchCandidate.getDefinitionRange())
+ {
+ // the range which defines the hatch is different from the range of the
+ // geometry (used for writer frames). This cannot be done calling vcl, thus use
+ // decomposition here
+ process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ break;
+ }
+
// #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
// per polygon. Split polygon until there are less than that
while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon))
@@ -1576,78 +1585,86 @@ namespace drawinglayer
// BTW: One more example how useful the principles of primitives are; the decomposition
// is by definition a simpler, maybe more expensive representation of the same content.
process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ break;
}
- else
+
+ const primitive2d::PolyPolygonGradientPrimitive2D& rGradientCandidate = static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate);
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rGradientCandidate.getB2DPolyPolygon());
+
+ if(aLocalPolyPolygon.getB2DRange() != rGradientCandidate.getDefinitionRange())
{
- const primitive2d::PolyPolygonGradientPrimitive2D& rGradientCandidate = static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate);
- basegfx::B2DPolyPolygon aLocalPolyPolygon(rGradientCandidate.getB2DPolyPolygon());
+ // the range which defines the gradient is different from the range of the
+ // geometry (used for writer frames). This cannot be done calling vcl, thus use
+ // decomposition here
+ process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ break;
+ }
- // #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
- // per polygon. Split polygon until there are less than that
- while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon))
- ;
-
- // for support of MetaCommentActions of the form XGRAD_SEQ_BEGIN, XGRAD_SEQ_END
- // it is safest to use the VCL OutputDevice::DrawGradient method which creates those.
- // re-create a VCL-gradient from FillGradientPrimitive2D and the needed tools PolyPolygon
- Gradient aVCLGradient;
- impConvertFillGradientAttributeToVCLGradient(aVCLGradient, rGradientCandidate.getFillGradient(), false);
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
- // #i82145# ATM VCL printing of gradients using curved shapes does not work,
- // i submitted the bug with the given ID to THB. When that task is fixed it is
- // necessary to again remove this subdivision since it decreases possible
- // printing quality (not even resolution-dependent for now). THB will tell
- // me when that task is fixed in the master
- const PolyPolygon aToolsPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(aLocalPolyPolygon));
-
- // XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END support
- SvtGraphicFill* pSvtGraphicFill = 0;
+ // #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
+ // per polygon. Split polygon until there are less than that
+ while(fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon))
+ ;
- if(!mnSvtGraphicFillCount && aLocalPolyPolygon.count())
- {
- // setup gradient stuff like in like in impgrfll
- SvtGraphicFill::GradientType eGrad(SvtGraphicFill::gradientLinear);
+ // for support of MetaCommentActions of the form XGRAD_SEQ_BEGIN, XGRAD_SEQ_END
+ // it is safest to use the VCL OutputDevice::DrawGradient method which creates those.
+ // re-create a VCL-gradient from FillGradientPrimitive2D and the needed tools PolyPolygon
+ Gradient aVCLGradient;
+ impConvertFillGradientAttributeToVCLGradient(aVCLGradient, rGradientCandidate.getFillGradient(), false);
+ aLocalPolyPolygon.transform(maCurrentTransformation);
- switch(aVCLGradient.GetStyle())
- {
- default : // GRADIENT_LINEAR:
- case GRADIENT_AXIAL:
- eGrad = SvtGraphicFill::gradientLinear;
- break;
- case GRADIENT_RADIAL:
- case GRADIENT_ELLIPTICAL:
- eGrad = SvtGraphicFill::gradientRadial;
- break;
- case GRADIENT_SQUARE:
- case GRADIENT_RECT:
- eGrad = SvtGraphicFill::gradientRectangular;
- break;
- }
+ // #i82145# ATM VCL printing of gradients using curved shapes does not work,
+ // i submitted the bug with the given ID to THB. When that task is fixed it is
+ // necessary to again remove this subdivision since it decreases possible
+ // printing quality (not even resolution-dependent for now). THB will tell
+ // me when that task is fixed in the master
+ const PolyPolygon aToolsPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(aLocalPolyPolygon));
- pSvtGraphicFill = new SvtGraphicFill(
- aToolsPolyPolygon,
- Color(),
- 0.0,
- SvtGraphicFill::fillEvenOdd,
- SvtGraphicFill::fillGradient,
- SvtGraphicFill::Transform(),
- false,
- SvtGraphicFill::hatchSingle,
- Color(),
- eGrad,
- aVCLGradient.GetStartColor(),
- aVCLGradient.GetEndColor(),
- aVCLGradient.GetSteps(),
- Graphic());
+ // XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END support
+ SvtGraphicFill* pSvtGraphicFill = 0;
+
+ if(!mnSvtGraphicFillCount && aLocalPolyPolygon.count())
+ {
+ // setup gradient stuff like in like in impgrfll
+ SvtGraphicFill::GradientType eGrad(SvtGraphicFill::gradientLinear);
+
+ switch(aVCLGradient.GetStyle())
+ {
+ default : // GRADIENT_LINEAR:
+ case GRADIENT_AXIAL:
+ eGrad = SvtGraphicFill::gradientLinear;
+ break;
+ case GRADIENT_RADIAL:
+ case GRADIENT_ELLIPTICAL:
+ eGrad = SvtGraphicFill::gradientRadial;
+ break;
+ case GRADIENT_SQUARE:
+ case GRADIENT_RECT:
+ eGrad = SvtGraphicFill::gradientRectangular;
+ break;
}
- // call VCL directly; encapsulate with SvtGraphicFill
- impStartSvtGraphicFill(pSvtGraphicFill);
- mpOutputDevice->DrawGradient(aToolsPolyPolygon, aVCLGradient);
- impEndSvtGraphicFill(pSvtGraphicFill);
+ pSvtGraphicFill = new SvtGraphicFill(
+ aToolsPolyPolygon,
+ Color(),
+ 0.0,
+ SvtGraphicFill::fillEvenOdd,
+ SvtGraphicFill::fillGradient,
+ SvtGraphicFill::Transform(),
+ false,
+ SvtGraphicFill::hatchSingle,
+ Color(),
+ eGrad,
+ aVCLGradient.GetStartColor(),
+ aVCLGradient.GetEndColor(),
+ aVCLGradient.GetSteps(),
+ Graphic());
}
+ // call VCL directly; encapsulate with SvtGraphicFill
+ impStartSvtGraphicFill(pSvtGraphicFill);
+ mpOutputDevice->DrawGradient(aToolsPolyPolygon, aVCLGradient);
+ impEndSvtGraphicFill(pSvtGraphicFill);
+
break;
}
case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D :
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 0dd8466..9f62849 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -707,7 +707,7 @@ namespace drawinglayer
const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
// create hatch polygon in range size and discrete coordinates
- basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getObjectRange());
+ basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getOutputRange());
aHatchRange.transform(maCurrentTransformation);
const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange));
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 0745920..9c7404c 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -98,32 +98,83 @@ namespace drawinglayer
{
case attribute::GRADIENTSTYLE_LINEAR:
{
- pNewTex.reset(new texture::GeoTexSvxGradientLinear(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getAngle()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientLinear(
+ aOutlineRange,
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_AXIAL:
{
- pNewTex.reset(new texture::GeoTexSvxGradientAxial(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getAngle()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientAxial(
+ aOutlineRange,
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_RADIAL:
{
- pNewTex.reset(new texture::GeoTexSvxGradientRadial(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientRadial(
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getOffsetX(),
+ rFillGradient.getOffsetY()));
break;
}
case attribute::GRADIENTSTYLE_ELLIPTICAL:
{
- pNewTex.reset(new texture::GeoTexSvxGradientElliptical(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientElliptical(
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getOffsetX(),
+ rFillGradient.getOffsetY(),
+ rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_SQUARE:
{
- pNewTex.reset(new texture::GeoTexSvxGradientSquare(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientSquare(
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getOffsetX(),
+ rFillGradient.getOffsetY(),
+ rFillGradient.getAngle()));
break;
}
case attribute::GRADIENTSTYLE_RECT:
{
- pNewTex.reset(new texture::GeoTexSvxGradientRect(aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), rFillGradient.getAngle()));
+ pNewTex.reset(
+ new texture::GeoTexSvxGradientRect(
+ aOutlineRange,
+ aStart,
+ aEnd,
+ nSteps,
+ rFillGradient.getBorder(),
+ rFillGradient.getOffsetX(),
+ rFillGradient.getOffsetY(),
+ rFillGradient.getAngle()));
break;
}
}
diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx
index 937018c..909869b 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -74,14 +74,14 @@ namespace drawinglayer
namespace texture
{
GeoTexSvxGradient::GeoTexSvxGradient(
- const basegfx::B2DRange& rTargetRange,
+ const basegfx::B2DRange& rDefinitionRange,
const basegfx::BColor& rStart,
const basegfx::BColor& rEnd,
sal_uInt32 /* nSteps */,
double fBorder)
: GeoTexSvx(),
maGradientInfo(),
- maTargetRange(rTargetRange),
+ maDefinitionRange(rDefinitionRange),
maStart(rStart),
maEnd(rEnd),
mfBorder(fBorder)
@@ -98,7 +98,7 @@ namespace drawinglayer
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list