openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1599233 [1/9] - in /openoffice/trunk/main: cui/source/factory/ cui/source/inc/ cui/source/tabpages/ sc/source/core/data/ svx/ svx/inc/svx/ svx/inc/svx/sdr/attribute/ svx/source/dialog/ svx/source/sdr/attribute/ svx/source/sdr/primitive2d/ ...
Date Mon, 02 Jun 2014 15:00:53 GMT
Author: alg
Date: Mon Jun  2 15:00:50 2014
New Revision: 1599233

URL: http://svn.apache.org/r1599233
Log:
i124638 Second step of DrawingLayer FillAttributes for Writer objects, now added support for Paragraph and PageStyle (including Header and Footer) for direct attributes and style attributes

Added:
    openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx   (with props)
    openoffice/trunk/main/svx/inc/svx/unobrushitemhelper.hxx
    openoffice/trunk/main/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx   (with props)
    openoffice/trunk/main/svx/source/unodraw/unobrushitemhelper.cxx
    openoffice/trunk/main/xmloff/inc/xmlsdtypes.hxx   (with props)
Removed:
    openoffice/trunk/main/sw/inc/fillattributes.hxx
    openoffice/trunk/main/sw/inc/unobrushitemhelper.hxx
    openoffice/trunk/main/sw/source/core/layout/fillattributes.cxx
    openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx
Modified:
    openoffice/trunk/main/cui/source/factory/dlgfact.cxx
    openoffice/trunk/main/cui/source/factory/dlgfact.hxx
    openoffice/trunk/main/cui/source/inc/bbdlg.hxx
    openoffice/trunk/main/cui/source/inc/cuires.hrc
    openoffice/trunk/main/cui/source/inc/page.hxx
    openoffice/trunk/main/cui/source/tabpages/bbdlg.cxx
    openoffice/trunk/main/cui/source/tabpages/bbdlg.src
    openoffice/trunk/main/cui/source/tabpages/page.cxx
    openoffice/trunk/main/cui/source/tabpages/tparea.cxx
    openoffice/trunk/main/sc/source/core/data/documen9.cxx
    openoffice/trunk/main/svx/Library_svxcore.mk
    openoffice/trunk/main/svx/Package_inc.mk
    openoffice/trunk/main/svx/inc/svx/hdft.hxx
    openoffice/trunk/main/svx/inc/svx/pagectrl.hxx
    openoffice/trunk/main/svx/inc/svx/svxdlg.hxx
    openoffice/trunk/main/svx/inc/svx/svxids.hrc
    openoffice/trunk/main/svx/source/dialog/hdft.cxx
    openoffice/trunk/main/svx/source/dialog/pagectrl.cxx
    openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
    openoffice/trunk/main/svx/source/sidebar/tools/ColorControl.cxx
    openoffice/trunk/main/svx/source/tbxctrls/tbxcolorupdate.cxx
    openoffice/trunk/main/sw/Library_sw.mk
    openoffice/trunk/main/sw/inc/cmdid.h
    openoffice/trunk/main/sw/inc/format.hxx
    openoffice/trunk/main/sw/inc/frmatr.hxx
    openoffice/trunk/main/sw/inc/frmfmt.hxx
    openoffice/trunk/main/sw/inc/hintids.hxx
    openoffice/trunk/main/sw/inc/hints.hxx
    openoffice/trunk/main/sw/inc/ndtxt.hxx
    openoffice/trunk/main/sw/inc/node.hxx
    openoffice/trunk/main/sw/inc/swatrset.hxx
    openoffice/trunk/main/sw/inc/swunohelper.hxx
    openoffice/trunk/main/sw/inc/unoframe.hxx
    openoffice/trunk/main/sw/inc/unoprnms.hxx
    openoffice/trunk/main/sw/inc/unostyle.hxx
    openoffice/trunk/main/sw/source/core/access/accpara.cxx
    openoffice/trunk/main/sw/source/core/attr/cellatr.cxx
    openoffice/trunk/main/sw/source/core/attr/format.cxx
    openoffice/trunk/main/sw/source/core/attr/hints.cxx
    openoffice/trunk/main/sw/source/core/bastyp/init.cxx
    openoffice/trunk/main/sw/source/core/doc/docdesc.cxx
    openoffice/trunk/main/sw/source/core/doc/docdraw.cxx
    openoffice/trunk/main/sw/source/core/doc/docedt.cxx
    openoffice/trunk/main/sw/source/core/doc/docfly.cxx
    openoffice/trunk/main/sw/source/core/doc/docfmt.cxx
    openoffice/trunk/main/sw/source/core/doc/docnew.cxx
    openoffice/trunk/main/sw/source/core/doc/docredln.cxx
    openoffice/trunk/main/sw/source/core/doc/notxtfrm.cxx
    openoffice/trunk/main/sw/source/core/doc/poolfmt.cxx
    openoffice/trunk/main/sw/source/core/doc/visiturl.cxx
    openoffice/trunk/main/sw/source/core/docnode/node.cxx
    openoffice/trunk/main/sw/source/core/inc/frame.hxx
    openoffice/trunk/main/sw/source/core/inc/frmtool.hxx
    openoffice/trunk/main/sw/source/core/inc/rolbck.hxx
    openoffice/trunk/main/sw/source/core/layout/atrfrm.cxx
    openoffice/trunk/main/sw/source/core/layout/findfrm.cxx
    openoffice/trunk/main/sw/source/core/layout/frmtool.cxx
    openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
    openoffice/trunk/main/sw/source/core/text/inftxt.cxx
    openoffice/trunk/main/sw/source/core/text/txtfrm.cxx
    openoffice/trunk/main/sw/source/core/txtnode/fntcache.cxx
    openoffice/trunk/main/sw/source/core/txtnode/ndtxt.cxx
    openoffice/trunk/main/sw/source/core/txtnode/thints.cxx
    openoffice/trunk/main/sw/source/core/txtnode/txtatr2.cxx
    openoffice/trunk/main/sw/source/core/txtnode/txtedt.cxx
    openoffice/trunk/main/sw/source/core/undo/rolbck.cxx
    openoffice/trunk/main/sw/source/core/unocore/swunohelper.cxx
    openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx
    openoffice/trunk/main/sw/source/core/unocore/unomap.cxx
    openoffice/trunk/main/sw/source/core/unocore/unoparagraph.cxx
    openoffice/trunk/main/sw/source/core/unocore/unoprnms.cxx
    openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx
    openoffice/trunk/main/sw/source/ui/app/docst.cxx
    openoffice/trunk/main/sw/source/ui/app/docstyle.cxx
    openoffice/trunk/main/sw/source/ui/chrdlg/paradlg.src
    openoffice/trunk/main/sw/source/ui/chrdlg/pardlg.cxx
    openoffice/trunk/main/sw/source/ui/fmtui/tmpdlg.cxx
    openoffice/trunk/main/sw/source/ui/fmtui/tmpdlg.src
    openoffice/trunk/main/sw/source/ui/frmdlg/colex.cxx
    openoffice/trunk/main/sw/source/ui/shells/basesh.cxx
    openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx
    openoffice/trunk/main/sw/source/ui/uiview/viewstat.cxx
    openoffice/trunk/main/sw/source/ui/utlui/uitool.cxx
    openoffice/trunk/main/xmloff/inc/PageMasterImportContext.hxx
    openoffice/trunk/main/xmloff/inc/xmloff/PageMasterStyleMap.hxx
    openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx
    openoffice/trunk/main/xmloff/inc/xmloff/prstylei.hxx
    openoffice/trunk/main/xmloff/inc/xmloff/txtprmap.hxx
    openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx
    openoffice/trunk/main/xmloff/source/draw/sdpropls.hxx
    openoffice/trunk/main/xmloff/source/style/PageMasterExportPropMapper.cxx
    openoffice/trunk/main/xmloff/source/style/PageMasterImportContext.cxx
    openoffice/trunk/main/xmloff/source/style/PageMasterPropHdlFactory.cxx
    openoffice/trunk/main/xmloff/source/style/PageMasterStyleMap.cxx
    openoffice/trunk/main/xmloff/source/style/prstylei.cxx
    openoffice/trunk/main/xmloff/source/style/xmlimppr.cxx
    openoffice/trunk/main/xmloff/source/style/xmlprmap.cxx
    openoffice/trunk/main/xmloff/source/text/txtexppr.cxx
    openoffice/trunk/main/xmloff/source/text/txtprhdl.cxx
    openoffice/trunk/main/xmloff/source/text/txtprmap.cxx
    openoffice/trunk/main/xmloff/source/text/txtstyli.cxx

Modified: openoffice/trunk/main/cui/source/factory/dlgfact.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/factory/dlgfact.cxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/factory/dlgfact.cxx (original)
+++ openoffice/trunk/main/cui/source/factory/dlgfact.cxx Mon Jun  2 15:00:50 2014
@@ -1363,12 +1363,20 @@ AbstractSvxSearchSimilarityDialog * Abst
 	return NULL;
 }
 
-SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent,
-											const SfxItemSet& rCoreSet,
-											sal_Bool bEnableSelector)
-{
-	SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector);
-	return new AbstractTabDialog_Impl( pDlg );
+//UUUU
+SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
+    Window* pParent,
+    const SfxItemSet& rCoreSet,
+    bool bEnableSelector,
+    bool bEnableDrawingLayerFillStyles)
+{
+    SfxTabDialog* pDlg = new SvxBorderBackgroundDlg(
+        pParent,
+        rCoreSet,
+        bEnableSelector,
+        bEnableDrawingLayerFillStyles);
+
+    return new AbstractTabDialog_Impl(pDlg);
 }
 
 AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent,

Modified: openoffice/trunk/main/cui/source/factory/dlgfact.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/factory/dlgfact.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/factory/dlgfact.hxx (original)
+++ openoffice/trunk/main/cui/source/factory/dlgfact.hxx Mon Jun  2 15:00:50 2014
@@ -647,9 +647,14 @@ public:
    virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent );  //add for FmShowColsDialog
    virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent,  //add for SvxZoomDialog
 											const SfxItemSet& rCoreSet);
-   virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg
-											const SfxItemSet& rCoreSet,
-											sal_Bool bEnableSelector = sal_False) ;
+
+   //UUUU add for SvxBorderBackgroundDlg
+   virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg(
+       Window* pParent,
+       const SfxItemSet& rCoreSet,
+       bool bEnableSelector = false,
+       bool bEnableDrawingLayerFillStyles = false);
+
    virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog
 																const SfxItemSet* pAttr,
 																const SdrView* pView,

Modified: openoffice/trunk/main/cui/source/inc/bbdlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/bbdlg.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/bbdlg.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/bbdlg.hxx Mon Jun  2 15:00:50 2014
@@ -34,17 +34,20 @@
 class SvxBorderBackgroundDlg: public SfxTabDialog
 {
 public:
-	SvxBorderBackgroundDlg(	Window *pParent,
-							const SfxItemSet& rCoreSet,
-							sal_Bool bEnableSelector = sal_False );
+    SvxBorderBackgroundDlg(Window *pParent,
+        const SfxItemSet& rCoreSet,
+        bool bEnableSelector = false,
+        bool bEnableDrawingLayerFillStyles = false);
 
-	~SvxBorderBackgroundDlg();
+    ~SvxBorderBackgroundDlg();
 
 protected:
-	virtual void 	PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage );
+    virtual void 	PageCreated(sal_uInt16 nPageId,SfxTabPage& rTabPage);
 
 private:
-	sal_Bool	bEnableBackgroundSelector; // fuer Border/Background-Dlg
+    /// bitfield
+    bool        mbEnableBackgroundSelector : 1;         // fuer Border/Background-Dlg
+    bool        mbEnableDrawingLayerFillStyles : 1;     // for full DrawingLayer FillStyles
 };
 
 

Modified: openoffice/trunk/main/cui/source/inc/cuires.hrc
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/cuires.hrc?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/cuires.hrc (original)
+++ openoffice/trunk/main/cui/source/inc/cuires.hrc Mon Jun  2 15:00:50 2014
@@ -42,7 +42,11 @@
 #define RID_SVXDLG_TEXT                  	(RID_SVX_START + 183)
 #define RID_SVXDLG_TRANSFORM                (RID_SVX_START +  45)
 #define RID_SVXDLG_LINE                     (RID_SVX_START +  50)
-#define RID_SVXDLG_BBDLG                    (RID_SVX_START +  40)
+
+//UUUU
+#define RID_SVXDLG_BBDLG_BACKGROUND         (RID_SVX_START +  40)
+#define RID_SVXDLG_BBDLG_AREA_TRANS         (RID_SVX_START +  41)
+
 #define RID_SVXDLG_CAPTION                  (RID_SVX_START + 151)
 #define RID_SVXDLG_AREA                     (RID_SVX_START +  55)
 #define RID_SVXSTRARY_PAPERSIZE_STD			(RID_SVX_START + 142)

Modified: openoffice/trunk/main/cui/source/inc/page.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/inc/page.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/inc/page.hxx (original)
+++ openoffice/trunk/main/cui/source/inc/page.hxx Mon Jun  2 15:00:50 2014
@@ -80,7 +80,7 @@
 		<SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
 */
 
-struct	SvxPage_Impl;
+//UUUU struct	SvxPage_Impl;
 typedef	sal_uInt16 MarginPosition;
 
 class SvxPageDescPage : public SfxTabPage
@@ -88,6 +88,7 @@ class SvxPageDescPage : public SfxTabPag
 	using TabPage::ActivatePage;
 	using TabPage::DeactivatePage;
 
+private:
     // paper format
     FixedLine           aPaperSizeFl;
     FixedText           aPaperFormatText;
@@ -167,7 +168,14 @@ class SvxPageDescPage : public SfxTabPag
 	Paper               ePaperStart;
 	Paper               ePaperEnd;
 
-	SvxPage_Impl*		pImpl;
+	//UUUU SvxPage_Impl*		pImpl;
+    MarginPosition      m_nPos;
+    Printer*            mpDefPrinter;
+
+    bool                mbDelPrinter : 1;
+
+    //UUUU
+    bool mbEnableDrawingLayerFillStyles : 1;
 
 #ifdef _SVX_PAGE_CXX
 	void                Init_Impl();
@@ -208,6 +216,9 @@ class SvxPageDescPage : public SfxTabPag
 
 	SvxPageDescPage( Window* pParent, const SfxItemSet& rSet );
 
+    //UUUU
+    void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; }
+
 protected:
 	virtual void        ActivatePage( const SfxItemSet& rSet );
 	virtual int         DeactivatePage( SfxItemSet* pSet = 0 );

Modified: openoffice/trunk/main/cui/source/tabpages/bbdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/bbdlg.cxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/bbdlg.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/bbdlg.cxx Mon Jun  2 15:00:50 2014
@@ -35,18 +35,37 @@
 #include "backgrnd.hxx"
 #include <dialmgr.hxx>
 
-// class SvxBorderBackgroundDlg ------------------------------------------
+//UUUU
+#include "cuitabarea.hxx"
 
-SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent,
-												const SfxItemSet& rCoreSet,
-												sal_Bool bEnableSelector ) :
+// class SvxBorderBackgroundDlg ------------------------------------------
 
-	SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ),
-	bEnableBackgroundSelector( bEnableSelector )
+SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(Window *pParent,
+    const SfxItemSet& rCoreSet,
+    bool bEnableSelector,
+    bool bEnableDrawingLayerFillStyles) 
+:   SfxTabDialog(
+        pParent, 
+        CUI_RES(
+            bEnableDrawingLayerFillStyles ? RID_SVXDLG_BBDLG_AREA_TRANS : RID_SVXDLG_BBDLG_BACKGROUND), 
+        &rCoreSet),
+    mbEnableBackgroundSelector(bEnableSelector),
+    mbEnableDrawingLayerFillStyles(bEnableDrawingLayerFillStyles)
 {
-	FreeResource();
-	AddTabPage( RID_SVXPAGE_BORDER, SvxBorderTabPage::Create, 0 );
-	AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 );
+    FreeResource();
+    AddTabPage(RID_SVXPAGE_BORDER,SvxBorderTabPage::Create,0);
+
+    if(mbEnableDrawingLayerFillStyles)
+    {
+        //UUUU Here we want full DrawingLayer FillStyle access, so add Area and Transparency TabPages
+        AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 );
+        AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create,  0);
+    }
+    else
+    {
+        //UUUU Use the more simple Background TabPage
+        AddTabPage(RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0);
+    }
 }
 
 // -----------------------------------------------------------------------
@@ -57,12 +76,48 @@ SvxBorderBackgroundDlg::~SvxBorderBackgr
 
 // -----------------------------------------------------------------------
 
-void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
+void SvxBorderBackgroundDlg::PageCreated(sal_uInt16 nPageId, SfxTabPage& rTabPage)
 {
-	// Umschalten zwischen Farbe/Grafik ermoeglichen:
-
-	if ( bEnableBackgroundSelector && (RID_SVXPAGE_BACKGROUND == nPageId) )
-		((SvxBackgroundTabPage&)rTabPage).ShowSelector( );
+    switch(nPageId)
+    {
+        case RID_SVXPAGE_BACKGROUND:
+        {
+            // allow switching between Color/graphic
+            if(mbEnableBackgroundSelector) 
+            {
+                static_cast< SvxBackgroundTabPage& >(rTabPage).ShowSelector();
+            }
+            break;
+        }
+
+        //UUUU inits for Area and Transparency TabPages
+        // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
+        // the color table) need to be added as items (e.g. SvxColorTableItem) to make
+        // these pages find the needed attributes for fill style suggestions.
+        // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on 
+        // demand, but could also be directly added from the DrawModel.
+        case RID_SVXPAGE_AREA:
+        {
+            SfxItemSet aNew(
+                *GetInputSetImpl()->GetPool(),
+                SID_COLOR_TABLE, SID_BITMAP_LIST,
+                SID_OFFER_IMPORT, SID_OFFER_IMPORT, 
+                0, 0);
+
+            aNew.Put(*GetInputSetImpl());
+
+            // add flag for direct graphic content selection
+            aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
+
+            rTabPage.PageCreated(aNew);
+            break;
+        }
+        case RID_SVXPAGE_TRANSPARENCE:
+        {
+            rTabPage.PageCreated(*GetInputSetImpl());
+            break;
+        }
+    }
 }
 
-
+//eof

Modified: openoffice/trunk/main/cui/source/tabpages/bbdlg.src
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/bbdlg.src?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/bbdlg.src (original)
+++ openoffice/trunk/main/cui/source/tabpages/bbdlg.src Mon Jun  2 15:00:50 2014
@@ -24,35 +24,75 @@
 #include <cuires.hrc>
 #include <svx/dialogs.hrc>
 
- // RID_SVXDLG_BBDLG ------------------------------------------------------
-TabDialog RID_SVXDLG_BBDLG
+// RID_SVXDLG_BBDLG_BACKGROUND and RID_SVXDLG_BBDLG_AREA_TRANS ------------
+
+TabDialog RID_SVXDLG_BBDLG_BACKGROUND
 {
-	OutputSize = TRUE ;
-	SVLook = TRUE ;
-	Size = MAP_APPFONT ( 328 , 155 ) ;
-	Text [ en-US ] = "Border / Background" ;
-	Moveable = TRUE ;
-	 //	Closeable = TRUE; hat ja einen OKButton
-	TabControl 1
-	{
-		OutputSize = TRUE ;
-		Pos = MAP_APPFONT ( 2 , 10 ) ;
-		Size = MAP_APPFONT ( 260 , 135 ) ;
-		PageList =
-		{
-			PageItem
-			{
-				Identifier = RID_SVXPAGE_BORDER ;
-				Text [ en-US ] = "Borders" ;
-			};
-			PageItem
-			{
-				Identifier = RID_SVXPAGE_BACKGROUND ;
-				Text [ en-US ] = "Background" ;
-			};
-		};
-	};
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 328 , 155 ) ;
+    Text [ en-US ] = "Border / Background" ;
+    Moveable = TRUE ;
+
+    TabControl 1
+    {
+        OutputSize = TRUE ;
+        Pos = MAP_APPFONT ( 2 , 10 ) ;
+        Size = MAP_APPFONT ( 260 , 135 ) ;
+        PageList =
+        {
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_BORDER ;
+                Text [ en-US ] = "Borders" ;
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_BACKGROUND ;
+                Text [ en-US ] = "Background" ;
+            };
+        };
+    };
 };
+
+TabDialog RID_SVXDLG_BBDLG_AREA_TRANS
+{
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 328 , 155 ) ;
+    Text [ en-US ] = "Border / Background" ;
+    Moveable = TRUE ;
+
+    TabControl 1
+    {
+        OutputSize = TRUE ;
+        Pos = MAP_APPFONT ( 2 , 10 ) ;
+        Size = MAP_APPFONT ( 260 , 135 ) ;
+        PageList =
+        {
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_BORDER ;
+                Text [ en-US ] = "Borders" ;
+            };
+
+            //UUUU new Area and Transparence TabPages
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_AREA;
+                PageResID = RID_SVXPAGE_AREA;
+                Text [ en-US ] = "Area" ;
+            };
+            PageItem
+            {
+                Identifier = RID_SVXPAGE_TRANSPARENCE;
+                PageResID = RID_SVXPAGE_TRANSPARENCE;
+                Text [ en-US ] = "Transparency" ;
+            };
+        };
+    };
+};
+
  // ********************************************************************** EOF
 
 

Modified: openoffice/trunk/main/cui/source/tabpages/page.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/page.cxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/page.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/page.cxx Mon Jun  2 15:00:50 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_cui.hxx"
 
@@ -61,12 +59,15 @@
 #include <editeng/eerdll.hxx>
 #include <editeng/editrids.hrc> // for RID_SVXSTR_PAPERBIN...,
 #include <svx/svxids.hrc>
-
-// #i4219#
 #include <svtools/optionsdrawinglayer.hxx>
 #include <svl/slstitm.hxx> //CHINA001
 #include <svl/aeitem.hxx> //CHINA001
 #include <sfx2/request.hxx> //CHINA001
+
+//UUUU
+#include <svx/xdef.hxx>
+#include <svx/unobrushitemhelper.hxx>
+
 // configuration helper =======================================================
 
 /** Helper to get a configuration setting.
@@ -208,19 +209,20 @@ sal_Bool IsEqualSize_Impl( const SvxSize
 #define MARGIN_TOP		( (MarginPosition)0x0004 )
 #define MARGIN_BOTTOM	( (MarginPosition)0x0008 )
 
-struct SvxPage_Impl
-{
-	MarginPosition	m_nPos;
-    Printer*        mpDefPrinter;
-    bool            mbDelPrinter;
-
-    SvxPage_Impl() :
-        m_nPos( 0 ),
-        mpDefPrinter( 0 ),
-        mbDelPrinter( false ) {}
-
-    ~SvxPage_Impl() { if ( mbDelPrinter ) delete mpDefPrinter; }
-};
+//UUUU
+//struct SvxPage_Impl
+//{
+//	MarginPosition	m_nPos;
+//    Printer*        mpDefPrinter;
+//    bool            mbDelPrinter;
+//
+//    SvxPage_Impl() :
+//        m_nPos( 0 ),
+//        mpDefPrinter( 0 ),
+//        mbDelPrinter( false ) {}
+//
+//    ~SvxPage_Impl() { if ( mbDelPrinter ) delete mpDefPrinter; }
+//};
 
 // class SvxPageDescPage --------------------------------------------------
 
@@ -240,10 +242,8 @@ SfxTabPage* SvxPageDescPage::Create( Win
 
 // -----------------------------------------------------------------------
 
-SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) :
-
-	SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PAGE ), rAttr ),
-
+SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) 
+:   SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PAGE ), rAttr ),
     aPaperSizeFl        ( this, CUI_RES( FL_PAPER_SIZE ) ),
     aPaperFormatText    ( this, CUI_RES( FT_PAPER_FORMAT ) ),
     aPaperSizeBox       ( this, CUI_RES( LB_PAPER_SIZE ) ),
@@ -290,8 +290,17 @@ SvxPageDescPage::SvxPageDescPage( Window
 	eMode				( SVX_PAGE_MODE_STANDARD ),
 	ePaperStart			( PAPER_A3 ),
 	ePaperEnd 			( PAPER_ENV_DL ),
-	pImpl				( new SvxPage_Impl )
 
+    //UUUU
+    // pImpl				( new SvxPage_Impl ),
+
+    //UUUU
+    m_nPos( 0 ),
+    mpDefPrinter( 0 ),
+    mbDelPrinter( false ),
+
+    //UUUU
+    mbEnableDrawingLayerFillStyles(false)
 {
 	bBorderModified = sal_False;
 	FreeResource();
@@ -351,27 +360,28 @@ SvxPageDescPage::SvxPageDescPage( Window
 	SetFieldUnit( aPaperHeightEdit, eFUnit );
 
     if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() )
-        pImpl->mpDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+    {
+        mpDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+    }
 	else
 	{
-        pImpl->mpDefPrinter = new Printer;
-        pImpl->mbDelPrinter = true;
+        mpDefPrinter = new Printer;
+        mbDelPrinter = true;
 	}
 
-    MapMode aOldMode = pImpl->mpDefPrinter->GetMapMode();
-    pImpl->mpDefPrinter->SetMapMode( MAP_TWIP );
+    MapMode aOldMode = mpDefPrinter->GetMapMode();
+    mpDefPrinter->SetMapMode( MAP_TWIP );
 
 	// First- und Last-Werte f"ur die R"ander setzen
-    Size aPaperSize = pImpl->mpDefPrinter->GetPaperSize();
-    Size aPrintSize = pImpl->mpDefPrinter->GetOutputSize();
+    Size aPaperSize = mpDefPrinter->GetPaperSize();
+    Size aPrintSize = mpDefPrinter->GetOutputSize();
 	/*
 	 * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren,
 	 * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des
 	 * Koordinatensystems verschoben ist.
 	 */
-    Point aPrintOffset = pImpl->mpDefPrinter->GetPageOffset() -
-                         pImpl->mpDefPrinter->PixelToLogic( Point() );
-    pImpl->mpDefPrinter->SetMapMode( aOldMode );
+    Point aPrintOffset = mpDefPrinter->GetPageOffset() - mpDefPrinter->PixelToLogic( Point() );
+    mpDefPrinter->SetMapMode( aOldMode );
 
     long nOffset = !aPrintOffset.X() && !aPrintOffset.Y() ? 0 : PRINT_OFFSET;
 	aLeftMarginEdit.SetFirst( aLeftMarginEdit.Normalize( aPrintOffset.X() ), FUNIT_TWIP );
@@ -425,7 +435,10 @@ SvxPageDescPage::SvxPageDescPage( Window
 
 SvxPageDescPage::~SvxPageDescPage()
 {
-	delete pImpl;
+    if(mbDelPrinter) 
+    {
+        delete mpDefPrinter;
+    }
 }
 
 // -----------------------------------------------------------------------
@@ -509,7 +522,7 @@ void SvxPageDescPage::Reset( const SfxIt
 
     // allgemeine Seitendaten
 	SvxNumType eNumType = SVX_ARABIC;
-    bLandscape = ( pImpl->mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
+    bLandscape = ( mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
 	sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL;
 	pItem = GetItem( rSet, SID_ATTR_PAGE );
 
@@ -538,7 +551,7 @@ void SvxPageDescPage::Reset( const SfxIt
 	{
 		nPaperBin = ( (const SvxPaperBinItem*)pItem )->GetValue();
 
-        if ( nPaperBin >= pImpl->mpDefPrinter->GetPaperBinCount() )
+        if ( nPaperBin >= mpDefPrinter->GetPaperBinCount() )
 			nPaperBin = PAPERBIN_PRINTER_SETTINGS;
 	}
 
@@ -547,21 +560,21 @@ void SvxPageDescPage::Reset( const SfxIt
 	if ( PAPERBIN_PRINTER_SETTINGS	== nPaperBin )
 		aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS );
 	else
-        aBinName = pImpl->mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin );
+        aBinName = mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin );
 
 	sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( aBinName );
 	aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)nPaperBin );
 	aPaperTrayBox.SelectEntry( aBinName );
 
 	// Size rausholen
-    Size aPaperSize = SvxPaperInfo::GetPaperSize( pImpl->mpDefPrinter );
+    Size aPaperSize = SvxPaperInfo::GetPaperSize( mpDefPrinter );
 	pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE );
 
 	if ( pItem )
 		aPaperSize = ( (const SvxSizeItem*)pItem )->GetSize();
 
 	FASTBOOL bOrientationSupport =
-        pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION );
+        mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION );
 #ifdef OS2
 	// unter OS/2 wird bei HasSupport() immer sal_True returned
 	// aber nur als Dummy, deshalb FALSE
@@ -1005,11 +1018,11 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_
 	aPaperTrayBox.SetEntryData( nEntryPos,
 		(void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS );
 	String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) );
-    sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount();
+    sal_uInt16 nBinCount = mpDefPrinter->GetPaperBinCount();
 
 	for ( sal_uInt16 i = 0; i < nBinCount; ++i )
 	{
-        String aName = pImpl->mpDefPrinter->GetPaperBinName(i);
+        String aName = mpDefPrinter->GetPaperBinName(i);
 
 		if ( !aName.Len() )
 		{
@@ -1158,27 +1171,26 @@ IMPL_LINK( SvxPageDescPage, SwapOrientat
 
 void SvxPageDescPage::SwapFirstValues_Impl( FASTBOOL bSet )
 {
-    MapMode aOldMode = pImpl->mpDefPrinter->GetMapMode();
+    MapMode aOldMode = mpDefPrinter->GetMapMode();
 	Orientation	eOri = ORIENTATION_PORTRAIT;
 
 	if ( bLandscape )
 		eOri = ORIENTATION_LANDSCAPE;
-    Orientation eOldOri = pImpl->mpDefPrinter->GetOrientation();
-    pImpl->mpDefPrinter->SetOrientation( eOri );
-    pImpl->mpDefPrinter->SetMapMode( MAP_TWIP );
+    Orientation eOldOri = mpDefPrinter->GetOrientation();
+    mpDefPrinter->SetOrientation( eOri );
+    mpDefPrinter->SetMapMode( MAP_TWIP );
 
 	// First- und Last-Werte f"ur die R"ander setzen
-    Size aPaperSize = pImpl->mpDefPrinter->GetPaperSize();
-    Size aPrintSize = pImpl->mpDefPrinter->GetOutputSize();
+    Size aPaperSize = mpDefPrinter->GetPaperSize();
+    Size aPrintSize = mpDefPrinter->GetOutputSize();
 	/*
 	 * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren,
 	 * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des
 	 * Koordinatensystems verschoben ist.
 	 */
-    Point aPrintOffset = pImpl->mpDefPrinter->GetPageOffset() -
-                         pImpl->mpDefPrinter->PixelToLogic( Point() );
-    pImpl->mpDefPrinter->SetMapMode( aOldMode );
-    pImpl->mpDefPrinter->SetOrientation( eOldOri );
+    Point aPrintOffset = mpDefPrinter->GetPageOffset() - mpDefPrinter->PixelToLogic( Point() );
+    mpDefPrinter->SetMapMode( aOldMode );
+    mpDefPrinter->SetOrientation( eOldOri );
 
     sal_Int64 nSetL = aLeftMarginEdit.Denormalize(
 					aLeftMarginEdit.GetValue( FUNIT_TWIP ) );
@@ -1260,90 +1272,124 @@ void SvxPageDescPage::UpdateExample_Impl
 
 // -----------------------------------------------------------------------
 
-void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet )
+void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
 {
-	sal_uInt16 nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET );
-
-	if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
-	{
-		const SvxSetItem& rSetItem =
-			(const SvxSetItem&)rSet.Get( nWhich, sal_False );
-		const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
-		const SfxBoolItem& rOn =
-			(const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+    sal_uInt16 nWhich(GetWhich(SID_ATTR_PAGE_HEADERSET));
 
-		if ( rOn.GetValue() )
-		{
-			nWhich = GetWhich( SID_ATTR_BRUSH );
+    if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False))
+    {
+        const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich, sal_False));
+        const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
+        const SfxBoolItem& rOn = static_cast< const SfxBoolItem& >(rTmpSet.Get(GetWhich(SID_ATTR_PAGE_ON)));
 
-			if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
-			{
-				const SvxBrushItem& rItem =
-					(const SvxBrushItem&)rTmpSet.Get( nWhich );
-				aBspWin.SetHdColor( rItem.GetColor() );
-			}
-			nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+        if(rOn.GetValue())
+        {
+            drawinglayer::attribute::SdrAllFillAttributesHelperPtr aHeaderFillAttributes;
 
-			if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
-			{
-				const SvxBoxItem& rItem =
-					(const SvxBoxItem&)rTmpSet.Get( nWhich );
-				aBspWin.SetHdBorder( rItem );
-			}
-		}
-	}
+            if(mbEnableDrawingLayerFillStyles)
+            {
+                //UUUU create FillAttributes directly from DrawingLayer FillStyle entries
+                aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet));
+            }
+            else
+            {
+                nWhich = GetWhich(SID_ATTR_BRUSH);
+
+                if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich))
+                {
+                    //UUUU create FillAttributes from SvxBrushItem
+                    const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
+                    SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+
+                    setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+                    aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                }
+            }
+
+            aBspWin.setHeaderFillAttributes(aHeaderFillAttributes);
+            nWhich = GetWhich(SID_ATTR_BORDER_OUTER);
+
+            if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET)
+            {
+                const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rTmpSet.Get(nWhich));
+                aBspWin.SetHdBorder(rItem);
+            }
+        }
+    }
 
-	nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET );
+    nWhich = GetWhich(SID_ATTR_PAGE_FOOTERSET);
 
-	if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
-	{
-		const SvxSetItem& rSetItem =
-			(const SvxSetItem&)rSet.Get( nWhich, sal_False );
-		const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
-		const SfxBoolItem& rOn =
-			(const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+    if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False))
+    {
+        const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich,sal_False));
+        const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
+        const SfxBoolItem& rOn = static_cast< const SfxBoolItem& >(rTmpSet.Get(GetWhich(SID_ATTR_PAGE_ON)));
 
-		if ( rOn.GetValue() )
-		{
-			nWhich = GetWhich( SID_ATTR_BRUSH );
+        if(rOn.GetValue())
+        {
+            drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFooterFillAttributes;
 
-			if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
-			{
-				const SvxBrushItem& rItem =
-					(const SvxBrushItem&)rTmpSet.Get( nWhich );
-				aBspWin.SetFtColor( rItem.GetColor() );
-			}
-			nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+            if(mbEnableDrawingLayerFillStyles)
+            {
+                //UUUU create FillAttributes directly from DrawingLayer FillStyle entries
+                aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet));
+            }
+            else
+            {
+                nWhich = GetWhich(SID_ATTR_BRUSH);
+
+                if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich))
+                {
+                    //UUUU create FillAttributes from SvxBrushItem
+                    const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
+                    SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+
+                    setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+                    aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                }
+            }
+
+            aBspWin.setFooterFillAttributes(aFooterFillAttributes);
+            nWhich = GetWhich(SID_ATTR_BORDER_OUTER);
+
+            if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET)
+            {
+                const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rTmpSet.Get(nWhich));
+                aBspWin.SetFtBorder(rItem);
+            }
+        }
+    }
 
-			if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
-			{
-				const SvxBoxItem& rItem =
-					(const SvxBoxItem&)rTmpSet.Get( nWhich );
-				aBspWin.SetFtBorder( rItem );
-			}
-		}
-	}
+    drawinglayer::attribute::SdrAllFillAttributesHelperPtr aPageFillAttributes;
+    const SfxPoolItem* pItem = 0;
 
-	const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_BRUSH );
+    if(mbEnableDrawingLayerFillStyles)
+    {
+        //UUUU create FillAttributes directly from DrawingLayer FillStyle entries
+        aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rSet));
+    }
+    else
+    {
+        pItem = GetItem(rSet, SID_ATTR_BRUSH);
 
-	if ( pItem )
-	{
-		aBspWin.SetColor( ( (const SvxBrushItem*)pItem )->GetColor() );
-		const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic();
+        if(pItem)
+        {
+            //UUUU create FillAttributes from SvxBrushItem
+            const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem);
+            SfxItemSet aTempSet(*rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
 
-		if ( pGrf )
-		{
-			Bitmap aBitmap = pGrf->GetBitmap();
-			aBspWin.SetBitmap( &aBitmap );
-		}
-		else
-			aBspWin.SetBitmap( NULL );
-	}
+            setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+            aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+        }
+    }
 
-	pItem = GetItem( rSet, SID_ATTR_BORDER_OUTER );
+    aBspWin.setPageFillAttributes(aPageFillAttributes);
+    pItem = GetItem(rSet, SID_ATTR_BORDER_OUTER);
 
-	if ( pItem )
-		aBspWin.SetBorder( (SvxBoxItem&)*pItem );
+    if(pItem)
+    {
+        aBspWin.SetBorder(static_cast< const SvxBoxItem& >(*pItem));
+    }
 }
 
 // -----------------------------------------------------------------------
@@ -1386,16 +1432,31 @@ void SvxPageDescPage::InitHeadFoot_Impl(
 		else
 			aBspWin.SetHeader( sal_False );
 
-		// im Beispiel Hintergrund und Umrandung anzeigen
-		sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH );
+        // im Beispiel Hintergrund und Umrandung anzeigen
+        drawinglayer::attribute::SdrAllFillAttributesHelperPtr aHeaderFillAttributes;
 
-		if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
-		{
-			const SvxBrushItem& rItem =
-				(const SvxBrushItem&)rHeaderSet.Get( nWhich );
-			aBspWin.SetHdColor( rItem.GetColor() );
-		}
-		nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+        if(mbEnableDrawingLayerFillStyles)
+        {
+            //UUUU create FillAttributes directly from DrawingLayer FillStyle entries
+            aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rHeaderSet));
+        }
+        else
+        {
+            const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH));
+
+            if(rHeaderSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE)
+            {
+                //UUUU aBspWin.SetHdColor(rItem.GetColor());
+                const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich));
+                SfxItemSet aTempSet(*rHeaderSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+
+                setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+                aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+            }
+        }
+
+        aBspWin.setHeaderFillAttributes(aHeaderFillAttributes);
+        const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER));
 
 		if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
 		{
@@ -1433,16 +1494,31 @@ void SvxPageDescPage::InitHeadFoot_Impl(
 		else
 			aBspWin.SetFooter( sal_False );
 
-		// im Beispiel Hintergrund und Umrandung anzeigen
-		sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH );
+        // im Beispiel Hintergrund und Umrandung anzeigen
+        drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFooterFillAttributes;
 
-		if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
-		{
-			const SvxBrushItem& rItem =
-				(const SvxBrushItem&)rFooterSet.Get( nWhich );
-			aBspWin.SetFtColor( rItem.GetColor() );
-		}
-		nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+        if(mbEnableDrawingLayerFillStyles)
+        {
+            //UUUU create FillAttributes directly from DrawingLayer FillStyle entries
+            aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rFooterSet));
+        }
+        else
+        {
+            const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH));
+
+            if(rFooterSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE)
+            {
+                //UUUU aBspWin.SetFtColor(rItem.GetColor());
+                const SvxBrushItem& rItem = (const SvxBrushItem&)rFooterSet.Get(nWhich);
+                SfxItemSet aTempSet(*rFooterSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+
+                setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
+                aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+            }
+        }
+
+        aBspWin.setFooterFillAttributes(aFooterFillAttributes);
+        const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER));
 
 		if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
 		{
@@ -1703,7 +1779,7 @@ bool SvxPageDescPage::IsPrinterRangeOver
 	MetricField& rField, long nFirstMargin, long nLastMargin, MarginPosition nPos )
 {
 	bool bRet = false;
-	bool bCheck = ( ( pImpl->m_nPos & nPos ) == 0 );
+	bool bCheck = ( ( m_nPos & nPos ) == 0 );
 	long nValue = static_cast<long>(rField.GetValue());
 	if ( bCheck &&
 		 (  nValue < nFirstMargin || nValue > nLastMargin ) &&
@@ -1722,53 +1798,74 @@ bool SvxPageDescPage::IsPrinterRangeOver
 void SvxPageDescPage::CheckMarginEdits( bool _bClear )
 {
 	if ( _bClear )
-		pImpl->m_nPos = 0;
+		m_nPos = 0;
 
 	sal_Int64 nValue = aLeftMarginEdit.GetValue();
 	if (  nValue < nFirstLeftMargin || nValue > nLastLeftMargin )
-		pImpl->m_nPos |= MARGIN_LEFT;
+		m_nPos |= MARGIN_LEFT;
 	nValue = aRightMarginEdit.GetValue();
 	if (  nValue < nFirstRightMargin || nValue > nLastRightMargin )
-		pImpl->m_nPos |= MARGIN_RIGHT;
+		m_nPos |= MARGIN_RIGHT;
 	nValue = aTopMarginEdit.GetValue();
 	if (  nValue < nFirstTopMargin || nValue > nLastTopMargin )
-		pImpl->m_nPos |= MARGIN_TOP;
+		m_nPos |= MARGIN_TOP;
 	nValue = aBottomMarginEdit.GetValue();
 	if (  nValue < nFirstBottomMargin || nValue > nLastBottomMargin )
-		pImpl->m_nPos |= MARGIN_BOTTOM;
+		m_nPos |= MARGIN_BOTTOM;
 }
 
 bool SvxPageDescPage::IsMarginOutOfRange()
 {
-	bool bRet = ( ( ( !( pImpl->m_nPos & MARGIN_LEFT ) &&
+	bool bRet = ( ( ( !( m_nPos & MARGIN_LEFT ) &&
 					  ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) ) &&
 					( aLeftMarginEdit.GetValue() < nFirstLeftMargin ||
 					  aLeftMarginEdit.GetValue() > nLastLeftMargin ) ) ||
-				  ( ( !( pImpl->m_nPos & MARGIN_RIGHT ) &&
+				  ( ( !( m_nPos & MARGIN_RIGHT ) &&
 					  ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) ) &&
 					( aRightMarginEdit.GetValue() < nFirstRightMargin ||
 					  aRightMarginEdit.GetValue() > nLastRightMargin ) ) ||
-				  ( ( !( pImpl->m_nPos & MARGIN_TOP ) &&
+				  ( ( !( m_nPos & MARGIN_TOP ) &&
 					  ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) ) &&
 					( aTopMarginEdit.GetValue() < nFirstTopMargin ||
 					  aTopMarginEdit.GetValue() > nLastTopMargin ) ) ||
-				  ( ( !( pImpl->m_nPos & MARGIN_BOTTOM ) &&
+				  ( ( !( m_nPos & MARGIN_BOTTOM ) &&
 					  ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) ) &&
 					( aBottomMarginEdit.GetValue() < nFirstBottomMargin ||
 					  aBottomMarginEdit.GetValue() > nLastBottomMargin ) ) );
 	return bRet;
 }
 
-void SvxPageDescPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
+void SvxPageDescPage::PageCreated(SfxAllItemSet aSet) //add CHINA001
 {
-	SFX_ITEMSET_ARG (&aSet,pModeItem,SfxAllEnumItem,SID_ENUM_PAGE_MODE,sal_False);
-	SFX_ITEMSET_ARG (&aSet,pPaperStartItem,SfxAllEnumItem,SID_PAPER_START,sal_False);
-	SFX_ITEMSET_ARG (&aSet,pPaperEndItem,SfxAllEnumItem,SID_PAPER_END,sal_False);
-	SFX_ITEMSET_ARG (&aSet,pCollectListItem,SfxStringListItem,SID_COLLECT_LIST,sal_False);
-	if (pModeItem)
-		SetMode((SvxModeType)pModeItem->GetEnumValue());
-	if (pPaperStartItem && pPaperEndItem)
-		SetPaperFormatRanges( (Paper)pPaperStartItem->GetEnumValue(), (Paper)pPaperEndItem->GetEnumValue() );
-	if (pCollectListItem)
-		SetCollectionList(pCollectListItem->GetList());
+    SFX_ITEMSET_ARG(&aSet,pModeItem,SfxAllEnumItem,SID_ENUM_PAGE_MODE,sal_False);
+    SFX_ITEMSET_ARG(&aSet,pPaperStartItem,SfxAllEnumItem,SID_PAPER_START,sal_False);
+    SFX_ITEMSET_ARG(&aSet,pPaperEndItem,SfxAllEnumItem,SID_PAPER_END,sal_False);
+    SFX_ITEMSET_ARG(&aSet,pCollectListItem,SfxStringListItem,SID_COLLECT_LIST,sal_False);
+
+    //UUUU
+    SFX_ITEMSET_ARG (&aSet, pSupportDrawingLayerFillStyleItem, SfxBoolItem, SID_DRAWINGLAYER_FILLSTYLES, sal_False);
+
+    if(pModeItem)
+    {
+        SetMode((SvxModeType)pModeItem->GetEnumValue());
+    }
+
+    if(pPaperStartItem && pPaperEndItem)
+    {
+        SetPaperFormatRanges((Paper)pPaperStartItem->GetEnumValue(),(Paper)pPaperEndItem->GetEnumValue());
+    }
+
+    if(pCollectListItem)
+    {
+        SetCollectionList(pCollectListItem->GetList());
+    }
+
+    if(pSupportDrawingLayerFillStyleItem)
+    {
+        const bool bNew(pSupportDrawingLayerFillStyleItem->GetValue());
+
+        EnableDrawingLayerFillStyles(bNew);
+    }
 }
+
+//eof

Modified: openoffice/trunk/main/cui/source/tabpages/tparea.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tparea.cxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tparea.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tparea.cxx Mon Jun  2 15:00:50 2014
@@ -840,8 +840,11 @@ void SvxAreaTabPage::Construct()
 
 void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 {
-    sal_uInt16 _nPos = 0;
-	sal_uInt16 nCount;
+    //UUUU use evtl. previously selected entry to avoid changing values just by
+    // switching TabPages in dialogs using this TabPage
+    sal_uInt16 _nPos(nPos);
+    sal_uInt16 nCount(0);
+
 	//add CHINA001 Begin
 	SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False);
 	SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False);
@@ -2755,6 +2758,7 @@ void SvxAreaTabPage::PageCreated (SfxAll
 	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);
 

Modified: openoffice/trunk/main/sc/source/core/data/documen9.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/documen9.cxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/documen9.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/documen9.cxx Mon Jun  2 15:00:50 2014
@@ -161,7 +161,23 @@ void ScDocument::InitDrawLayer( SfxObjec
 		if (GetLinkManager())
 			pDrawLayer->SetLinkManager( pLinkManager );
 
-		//	Drawing pages are accessed by table number, so they must also be present
+        //UUUU set DrawingLayer's SfxItemPool at Calc's SfxItemPool as
+        // secondary pool to support DrawingLayer FillStyle ranges (and similar)
+        // in SfxItemSets using the Calc SfxItemPool. This is e.g. needed when
+        // the PageStyle using SvxBrushItem is visualized and will be potentially
+        // used more intense in the future
+        if(xPoolHelper.isValid())
+        {
+            ScDocumentPool* pLocalPool = xPoolHelper->GetDocPool();
+
+            if(pLocalPool)
+            {
+                OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a secondary pool set where the DrawingLayer ItemPool is to be placed (!)");
+                pLocalPool->SetSecondaryPool(&pDrawLayer->GetItemPool());
+            }
+        }
+
+        //	Drawing pages are accessed by table number, so they must also be present
 		//	for preceding table numbers, even if the tables aren't allocated
 		//	(important for clipboard documents).
 
@@ -254,7 +270,20 @@ IMPL_LINK_INLINE_END( ScDocument, GetUse
 
 void ScDocument::DeleteDrawLayer()
 {
-	delete pDrawLayer;
+    //UUUU remove DrawingLayer's SfxItemPool from Calc's SfxItemPool where
+    // it is registered as secondary pool
+    if(xPoolHelper.isValid())
+    {
+        ScDocumentPool* pLocalPool = xPoolHelper->GetDocPool();
+
+        if(pLocalPool && pLocalPool->GetSecondaryPool())
+        {
+            pLocalPool->SetSecondaryPool(0);
+        }
+    }
+
+    delete pDrawLayer;
+    pDrawLayer = 0;
 }
 
 sal_Bool ScDocument::DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const

Modified: openoffice/trunk/main/svx/Library_svxcore.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/Library_svxcore.mk?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/Library_svxcore.mk (original)
+++ openoffice/trunk/main/svx/Library_svxcore.mk Mon Jun  2 15:00:50 2014
@@ -189,6 +189,7 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/sdr/animation/scheduler \
     svx/source/sdr/animation/objectanimator \
     svx/source/sdr/animation/animationstate \
+    svx/source/sdr/attribute/sdrallfillattributeshelper \
     svx/source/sdr/attribute/sdrlinefillshadowtextattribute \
     svx/source/sdr/attribute/sdrfilltextattribute \
     svx/source/sdr/attribute/sdrshadowtextattribute \
@@ -392,6 +393,7 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/unodraw/gluepts \
     svx/source/unodraw/shapepropertynotifier \
     svx/source/unodraw/tableshape \
+    svx/source/unodraw/unobrushitemhelper \
     svx/source/unodraw/unobtabl \
     svx/source/unodraw/unodtabl \
     svx/source/unodraw/UnoGraphicExporter \

Modified: openoffice/trunk/main/svx/Package_inc.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/Package_inc.mk?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/Package_inc.mk (original)
+++ openoffice/trunk/main/svx/Package_inc.mk Mon Jun  2 15:00:50 2014
@@ -204,6 +204,7 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/animation/animationstate.hxx,svx/sdr/animation/animationstate.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/animation/objectanimator.hxx,svx/sdr/animation/objectanimator.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/animation/scheduler.hxx,svx/sdr/animation/scheduler.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx,svx/sdr/attribute/sdrallfillattributeshelper.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/attribute/sdrfilltextattribute.hxx,svx/sdr/attribute/sdrfilltextattribute.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/attribute/sdrformtextattribute.hxx,svx/sdr/attribute/sdrformtextattribute.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx,svx/sdr/attribute/sdrformtextoutlineattribute.hxx))
@@ -485,6 +486,7 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/ucsubset.hxx,svx/ucsubset.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unoapi.hxx,svx/unoapi.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unofill.hxx,svx/unofill.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/unobrushitemhelper.hxx,svx/unobrushitemhelper.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unomaster.hxx,svx/unomaster.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unomid.hxx,svx/unomid.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unomod.hxx,svx/unomod.hxx))

Modified: openoffice/trunk/main/svx/inc/svx/hdft.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/hdft.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/hdft.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/hdft.hxx Mon Jun  2 15:00:50 2014
@@ -43,11 +43,15 @@
 
 // class  SvxHFPage ------------------------------------------------------
 
-class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage
+class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
 {
 	using TabPage::ActivatePage;
 	using TabPage::DeactivatePage;
 
+private:
+    //UUUU
+    void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; }
+
 public:
 
 	virtual sal_Bool 	FillItemSet( SfxItemSet& rOutSet );
@@ -55,8 +59,12 @@ public:
 
 	virtual 		~SvxHFPage();
 
-	void			DisableDeleteQueryBox() { bDisableQueryBox = sal_True; }
-	void			EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; }
+    void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
+    void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; }
+
+    //UUUU
+    virtual void PageCreated(SfxAllItemSet aSet);
+
     void            EnableDynamicSpacing();
 
 protected:
@@ -84,9 +92,11 @@ protected:
 
 	sal_uInt16			nId;
 	SfxItemSet*		pBBSet;
-	sal_Bool			bDisableQueryBox;
-	sal_Bool			bEnableBackgroundSelector;
-	FASTBOOL		bInReset;
+
+    /// bitfield
+    bool            mbDisableQueryBox : 1;
+    bool            mbEnableBackgroundSelector : 1;
+    bool            mbEnableDrawingLayerFillStyles : 1;
 
 	void 			InitHandler();
 	DECL_LINK( TurnOnHdl, CheckBox*);

Modified: openoffice/trunk/main/svx/inc/svx/pagectrl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/pagectrl.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/pagectrl.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/pagectrl.hxx Mon Jun  2 15:00:50 2014
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,160 +7,165 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
 #ifndef _SVX_PAGECTRL_HXX
 #define _SVX_PAGECTRL_HXX
 
-// include ---------------------------------------------------------------
-
 #include <vcl/window.hxx>
 #include "svx/svxdllapi.h"
-
-// forward ---------------------------------------------------------------
+#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
 
 class SvxBoxItem;
-struct PageWindow_Impl;
 
 // class SvxPageWindow ---------------------------------------------------
 
 class SVX_DLLPUBLIC SvxPageWindow : public Window
 {
-	using Window::GetBorder;
+    using Window::GetBorder;
 
 private:
-	Size		aWinSize;
-	Size 		aSize;
+    Size		aWinSize;
+    Size 		aSize;
 
-	long		nTop;
-	long		nBottom;
-	long 		nLeft;
-	long		nRight;
-	Color		aColor;
-
-	PageWindow_Impl* pImpl;
-
-	long 		nHdLeft;
-	long		nHdRight;
-	long		nHdDist;
-	long		nHdHeight;
-	Color		aHdColor;
-	SvxBoxItem*	pHdBorder;
-
-	long		nFtLeft;
-	long		nFtRight;
-	long		nFtDist;
-	long		nFtHeight;
-	Color		aFtColor;
-	SvxBoxItem*	pFtBorder;
-
-	sal_Bool		bFooter	:1;
-	sal_Bool		bHeader	:1;
-	sal_Bool		bTable	:1;
-	sal_Bool		bHorz	:1;
-	sal_Bool		bVert	:1;
+    long		nTop;
+    long		nBottom;
+    long 		nLeft;
+    long		nRight;
+
+    SvxBoxItem*		pBorder;
+    sal_Bool        bResetBackground;
+    sal_Bool        bFrameDirection;
+    sal_Int32       nFrameDirection;
+
+    long 		nHdLeft;
+    long		nHdRight;
+    long		nHdDist;
+    long		nHdHeight;
+    SvxBoxItem*	pHdBorder;
+
+    long		nFtLeft;
+    long		nFtRight;
+    long		nFtDist;
+    long		nFtHeight;
+    SvxBoxItem*	pFtBorder;
+
+    //UUUU
+    drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maHeaderFillAttributes;
+    drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maFooterFillAttributes;
+    drawinglayer::attribute::SdrAllFillAttributesHelperPtr  maPageFillAttributes;
+
+    sal_Bool		bFooter : 1;
+    sal_Bool		bHeader : 1;
+    sal_Bool		bTable : 1;
+    sal_Bool		bHorz : 1;
+    sal_Bool		bVert : 1;
 
-	sal_uInt16		eUsage;
+    sal_uInt16		eUsage;
 
-	String		aLeftText;
-	String		aRightText;
+    String		aLeftText;
+    String		aRightText;
 
 protected:
-	virtual void Paint( const Rectangle& rRect );
+    virtual void Paint(const Rectangle& rRect);
 
-	virtual void DrawPage( const Point& rPoint,
-						   const sal_Bool bSecond,
-						   const sal_Bool bEnabled );
+    virtual void DrawPage(const Point& rPoint,
+        const sal_Bool bSecond,
+        const sal_Bool bEnabled);
+
+    //UUUU
+    void drawFillAttributes(
+        const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, 
+        const Rectangle& rPaintRange,
+        const Rectangle& rDefineRange);
 
 public:
-	SvxPageWindow( Window* pParent, const ResId& rId );
-	~SvxPageWindow();
+    SvxPageWindow(Window* pParent,const ResId& rId);
+    ~SvxPageWindow();
 
-	void 		SetWidth( long nW )						{ aSize.Width()  = nW; }
-	void    	SetHeight( long nH )					{ aSize.Height() = nH; }
-
-	void		SetSize( const Size& rSz )				{ aSize = rSz; }
-	const Size&	GetSize() const 						{ return aSize; }
-
-	void		SetTop( long nNew )						{ nTop = nNew; }
-	void		SetBottom( long nNew ) 					{ nBottom = nNew; }
-	void		SetLeft( long nNew )					{ nLeft = nNew; }
-	void   		SetRight( long nNew )					{ nRight = nNew; }
-	void		SetColor( const Color& rNew )			{ aColor = rNew; }
-	void		SetBorder( const SvxBoxItem& rNew );
-	void		SetBitmap( Bitmap* pBmp );
-
-	long		GetTop() const							{ return nTop;   }
-	long		GetBottom() const						{ return nBottom;}
-	long		GetLeft() const							{ return nLeft;  }
-	long		GetRight() const						{ return nRight; }
-
-	const Color&		GetColor() const				{ return aColor; }
-	const SvxBoxItem& 	GetBorder() const;
-
-	void    	SetHdLeft( long nNew )					{ nHdLeft = nNew; }
-	void    	SetHdRight( long nNew )					{ nHdRight = nNew; }
-	void    	SetHdDist( long nNew )					{ nHdDist = nNew; }
-	void    	SetHdHeight( long nNew )				{ nHdHeight = nNew; }
-	void		SetHdColor( const Color& aNew )			{ aHdColor = aNew; }
-	void		SetHdBorder( const SvxBoxItem& rNew );
-
-	long		GetHdLeft() const 						{ return nHdLeft;  }
-	long		GetHdRight() const 						{ return nHdRight; }
-	long		GetHdDist()	const 						{ return nHdDist;  }
-	long		GetHdHeight() const 					{ return nHdHeight;}
-
-	const Color&		GetHdColor() const				{ return aHdColor; }
-	const SvxBoxItem& 	GetHdBorder() const				{ return *pHdBorder; }
-
-	void		SetFtLeft( long nNew )					{ nFtLeft = nNew; }
-	void		SetFtRight( long nNew )					{ nFtRight = nNew; }
-	void		SetFtDist( long nNew )					{ nFtDist = nNew; }
-	void		SetFtHeight( long nNew )				{ nFtHeight = nNew; }
-	void		SetFtColor( const Color& aNew )			{ aFtColor = aNew; }
-	void		SetFtBorder( const SvxBoxItem& rNew );
-
-	long		GetFtLeft() const 						{ return nFtLeft;  }
-	long		GetFtRight() const 						{ return nFtRight; }
-	long		GetFtDist()	const 						{ return nFtDist;  }
-	long		GetFtHeight() const 					{ return nFtHeight;}
-
-	const Color& 		GetFtColor() const				{ return aFtColor; }
-	const SvxBoxItem& 	GetFtBorder() const				{ return *pFtBorder; }
-
-	void		SetUsage( sal_uInt16 eU )					{ eUsage = eU;  }
-	sal_uInt16		GetUsage() const						{ return eUsage;}
-
-	void 		SetHeader( sal_Bool bNew )  				{ bHeader = bNew; }
-	sal_Bool		GetHeader() const						{ return bHeader;}
-	void		SetFooter( sal_Bool bNew )					{ bFooter = bNew; }
-	sal_Bool		GetFooter() const						{ return bFooter;}
-
-	void 		SetTable( sal_Bool bNew )					{ bTable = bNew; }
-	sal_Bool		GetTable() const						{ return bTable;}
-	void		SetHorz( sal_Bool bNew )					{ bHorz = bNew; }
-	sal_Bool		GetHorz() const							{ return bHorz;}
-	void 		SetVert( sal_Bool bNew )		   			{ bVert = bNew; }
-	sal_Bool		GetVert() const				   			{ return bVert;}
+    //UUUU 
+    void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maHeaderFillAttributes = rFillAttributes; }
+    void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maFooterFillAttributes = rFillAttributes; }
+    void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maPageFillAttributes = rFillAttributes; }
+    const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const { return maPageFillAttributes; }
+
+    void 		SetWidth(long nW)						{ aSize.Width() = nW; }
+    void    	SetHeight(long nH)					{ aSize.Height() = nH; }
+
+    void		SetSize(const Size& rSz)				{ aSize = rSz; }
+    const Size&	GetSize() const 						{ return aSize; }
+
+    void		SetTop(long nNew)						{ nTop = nNew; }
+    void		SetBottom(long nNew) 					{ nBottom = nNew; }
+    void		SetLeft(long nNew)					{ nLeft = nNew; }
+    void   		SetRight(long nNew)					{ nRight = nNew; }
+    void		SetBorder(const SvxBoxItem& rNew);
+
+    long		GetTop() const							{ return nTop; }
+    long		GetBottom() const						{ return nBottom; }
+    long		GetLeft() const							{ return nLeft; }
+    long		GetRight() const						{ return nRight; }
+
+    const SvxBoxItem& 	GetBorder() const;
+
+    void    	SetHdLeft(long nNew)					{ nHdLeft = nNew; }
+    void    	SetHdRight(long nNew)					{ nHdRight = nNew; }
+    void    	SetHdDist(long nNew)					{ nHdDist = nNew; }
+    void    	SetHdHeight(long nNew)				{ nHdHeight = nNew; }
+    void		SetHdBorder(const SvxBoxItem& rNew);
+
+    long		GetHdLeft() const 						{ return nHdLeft; }
+    long		GetHdRight() const 						{ return nHdRight; }
+    long		GetHdDist()	const 						{ return nHdDist; }
+    long		GetHdHeight() const 					{ return nHdHeight; }
+
+    const SvxBoxItem& 	GetHdBorder() const				{ return *pHdBorder; }
+
+    void		SetFtLeft(long nNew)					{ nFtLeft = nNew; }
+    void		SetFtRight(long nNew)					{ nFtRight = nNew; }
+    void		SetFtDist(long nNew)					{ nFtDist = nNew; }
+    void		SetFtHeight(long nNew)				{ nFtHeight = nNew; }
+    void		SetFtBorder(const SvxBoxItem& rNew);
+
+    long		GetFtLeft() const 						{ return nFtLeft; }
+    long		GetFtRight() const 						{ return nFtRight; }
+    long		GetFtDist()	const 						{ return nFtDist; }
+    long		GetFtHeight() const 					{ return nFtHeight; }
+
+    const SvxBoxItem& 	GetFtBorder() const				{ return *pFtBorder; }
+
+    void		SetUsage(sal_uInt16 eU)					{ eUsage = eU; }
+    sal_uInt16		GetUsage() const						{ return eUsage; }
+
+    void 		SetHeader(sal_Bool bNew)  				{ bHeader = bNew; }
+    sal_Bool		GetHeader() const						{ return bHeader; }
+    void		SetFooter(sal_Bool bNew)					{ bFooter = bNew; }
+    sal_Bool		GetFooter() const						{ return bFooter; }
+
+    void 		SetTable(sal_Bool bNew)					{ bTable = bNew; }
+    sal_Bool		GetTable() const						{ return bTable; }
+    void		SetHorz(sal_Bool bNew)					{ bHorz = bNew; }
+    sal_Bool		GetHorz() const							{ return bHorz; }
+    void 		SetVert(sal_Bool bNew)		   			{ bVert = bNew; }
+    sal_Bool		GetVert() const				   			{ return bVert; }
 
     void        EnableFrameDirection(sal_Bool bEnable);
     //uses enum SvxFrameDirection
-    void        SetFrameDirection(sal_Int32 nFrameDirection);
+    void        SetFrameDirection(sal_Int32 nDirection);
 
     void        ResetBackground();
 };
 
 #endif // #ifndef _SVX_PAGECTRL_HXX
 
-
+//eof

Added: openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx?rev=1599233&view=auto
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx (added)
+++ openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx Mon Jun  2 15:00:50 2014
@@ -0,0 +1,98 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX
+#define _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX
+
+#include "svx/svxdllapi.h"
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
+#include <drawinglayer/attribute/sdrfillattribute.hxx>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <boost/shared_ptr.hpp>
+#include <tools/color.hxx>
+#include <svl/itemset.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+    namespace attribute
+    {
+        class SVX_DLLPUBLIC SdrAllFillAttributesHelper
+        {
+        private:
+            basegfx::B2DRange                                                   maLastPaintRange;
+            basegfx::B2DRange                                                   maLastDefineRange;
+            boost::shared_ptr< drawinglayer::attribute::SdrFillAttribute >      maFillAttribute;
+            boost::shared_ptr< drawinglayer::attribute::FillGradientAttribute > maFillGradientAttribute;
+            drawinglayer::primitive2d::Primitive2DSequence                      maPrimitives;
+
+            void createPrimitive2DSequence(
+                const basegfx::B2DRange& rPaintRange,
+                const basegfx::B2DRange& rDefineRange);
+
+        protected:
+        public:
+            SdrAllFillAttributesHelper();
+            SdrAllFillAttributesHelper(const Color& rColor);
+            SdrAllFillAttributesHelper(const SfxItemSet& rSet);
+            ~SdrAllFillAttributesHelper();
+
+            bool isUsed() const;
+            bool hasSdrFillAttribute() const { return maFillAttribute.get(); }
+            bool hasFillGradientAttribute() const { return maFillGradientAttribute.get(); }
+            bool isTransparent() const;
+
+            const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const;
+            const drawinglayer::attribute::FillGradientAttribute& getFillGradientAttribute() const;
+            const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence(
+                const basegfx::B2DRange& rPaintRange,
+                const basegfx::B2DRange& rDefineRange) const;
+
+            // get average fill color; tries to calculate a 'medium' color
+            // which e.g. may be used as comparison to decide if other
+            // colors are visible
+            basegfx::BColor getAverageColor(const basegfx::BColor& rFallback) const;
+
+            // return if a repaint of this content needs a complete repaint. This
+            // is e.g. not needed for no fill or color fill (a partial repaint
+            // will do the trick), but necessary for everything that is not top-left
+            // oriented
+            bool needCompleteRepaint() const;
+        };
+    } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+    namespace attribute
+    {
+        typedef boost::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
+    } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX
+
+// eof

Propchange: openoffice/trunk/main/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: openoffice/trunk/main/svx/inc/svx/svxdlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svxdlg.hxx?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/svxdlg.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/svxdlg.hxx Mon Jun  2 15:00:50 2014
@@ -385,9 +385,14 @@ public:
 															sal_uInt16 nOther,
 															sal_uInt16 nShorter,
 															sal_uInt16 nLonger ) = 0;
-	virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg
-											const SfxItemSet& rCoreSet,
-											sal_Bool bEnableSelector = sal_False) = 0;
+
+    //UUUU add for SvxBorderBackgroundDlg
+    virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg(
+        Window* pParent, 
+        const SfxItemSet& rCoreSet,
+        bool bEnableSelector = false,
+        bool bEnableDrawingLayerFillStyles = false) = 0;
+
     virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog
 																const SfxItemSet* pAttr,
 																const SdrView* pView,

Modified: openoffice/trunk/main/svx/inc/svx/svxids.hrc
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svxids.hrc?rev=1599233&r1=1599232&r2=1599233&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/svxids.hrc (original)
+++ openoffice/trunk/main/svx/inc/svx/svxids.hrc Mon Jun  2 15:00:50 2014
@@ -1347,9 +1347,10 @@
 
 //UUUU
 #define SID_OFFER_IMPORT                                ( SID_SVX_START + 1119)
+#define SID_DRAWINGLAYER_FILLSTYLES                     ( SID_SVX_START + 1120)
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE                               (SID_OFFER_IMPORT + 1)
+#define SID_SVX_FIRSTFREE                               (SID_DRAWINGLAYER_FILLSTYLES + 1)
 
 // --------------------------------------------------------------------------
 // Overflow check for slot IDs

Added: openoffice/trunk/main/svx/inc/svx/unobrushitemhelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/unobrushitemhelper.hxx?rev=1599233&view=auto
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/unobrushitemhelper.hxx (added)
+++ openoffice/trunk/main/svx/inc/svx/unobrushitemhelper.hxx Mon Jun  2 15:00:50 2014
@@ -0,0 +1,56 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _UNOBRUSHITEMHELPER_HXX
+#define _UNOBRUSHITEMHELPER_HXX
+
+#include "svx/svxdllapi.h"
+#include <editeng/brshitem.hxx>
+
+//UUUU Helper function definintions for UNO API fallbacks to replace SvxBrushItem. The
+// idea is to have fallbacks to create a SvxBrushItem if needed for backwards compatibility
+// if needed from the SfxItemSet and vice versa. This is used in cases where e.g. UNO API
+// accesses to slots in the SvxBrushItem are used (see cases in SvxBrushItem::QueryValue
+// and SvxBrushItem::PutValue as MID_BACK_COLOR and similar).
+// To make this work, a cycle of creating a SvxBrushItem from a SfxItemSet, changing a value 
+// using PutValue, putting back to the SfxItemSet should create the *same* SvxBrushItem
+// the next time this will be created using getSvxBrushItemFromSourceSet. For more details,
+// see comments at the implementations of that two methods.
+
+// Set the equivalent in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST] in the given
+// SfxItemSet to create the same FillStyle as is expressed by the given SvxBrushItem.
+// This method will reset all items in the XATTR_FILL_* range first.
+void SVX_DLLPUBLIC setSvxBrushItemAsFillAttributesToTargetSet(
+    const SvxBrushItem& rBrush, 
+    SfxItemSet& rToSet);
+
+// Create a SvxBrushItem as close as possible to the settings in the DrawingLayer
+// items in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Since this is not 100%
+// representable this may lead to reduced data. With nBackgroundID a Which-ID for the
+// to-be-created SvxBrushItem has to be given (default should be 99 as in RES_BACKGROUND).
+SvxBrushItem SVX_DLLPUBLIC getSvxBrushItemFromSourceSet(
+    const SfxItemSet& rSourceSet, 
+    sal_uInt16 nBackgroundID,
+    sal_Bool bSearchInParents = sal_True);
+
+#endif // _UNOBRUSHITEMHELPER_HXX
+
+//eof



Mime
View raw message