[Libreoffice-commits] core.git: 12 commits - cui/source cui/uiconfig cui/UIConfig_cui.mk include/svx include/vcl include/xmloff sc/source svx/Library_svxcore.mk svx/source sw/inc sw/Library_sw.mk sw/source sw/uiconfig vcl/source xmloff/inc xmloff/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Jul 1 04:30:51 PDT 2014


 cui/UIConfig_cui.mk                                      |    1 
 cui/source/factory/dlgfact.cxx                           |   20 
 cui/source/factory/dlgfact.hxx                           |   10 
 cui/source/inc/bbdlg.hxx                                 |   13 
 cui/source/inc/page.hxx                                  |   15 
 cui/source/tabpages/bbdlg.cxx                            |   70 
 cui/source/tabpages/page.cxx                             |  327 +-
 cui/source/tabpages/tparea.cxx                           |    7 
 cui/uiconfig/ui/borderareatransparencydialog.ui          |  148 +
 include/svx/hdft.hxx                                     |   20 
 include/svx/pagectrl.hxx                                 |   99 
 include/svx/sdr/attribute/sdrallfillattributeshelper.hxx |   95 
 include/svx/svxdlg.hxx                                   |   10 
 include/svx/svxids.hrc                                   |    3 
 include/svx/unobrushitemhelper.hxx                       |   53 
 include/vcl/bmpacc.hxx                                   |    1 
 include/xmloff/PageMasterStyleMap.hxx                    |   27 
 include/xmloff/XMLShapeStyleContext.hxx                  |    3 
 include/xmloff/prstylei.hxx                              |   37 
 include/xmloff/txtprmap.hxx                              |    8 
 sc/source/core/data/documen9.cxx                         |   34 
 svx/Library_svxcore.mk                                   |    2 
 svx/source/dialog/hdft.cxx                               |  475 +++-
 svx/source/dialog/pagectrl.cxx                           |  444 ++--
 svx/source/sdr/attribute/sdrallfillattributeshelper.cxx  |  268 ++
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx     |    6 
 svx/source/sidebar/tools/ColorControl.cxx                |   12 
 svx/source/tbxctrls/tbxcolorupdate.cxx                   |   16 
 svx/source/unodraw/unobrushitemhelper.cxx                |  330 ++
 sw/Library_sw.mk                                         |    2 
 sw/inc/IDocumentDrawModelAccess.hxx                      |   10 
 sw/inc/cmdid.h                                           |   20 
 sw/inc/doc.hxx                                           |    2 
 sw/inc/docsh.hxx                                         |    6 
 sw/inc/dpage.hxx                                         |    4 
 sw/inc/drawdoc.hxx                                       |    6 
 sw/inc/fillattributes.hxx                                |   70 
 sw/inc/format.hxx                                        |   25 
 sw/inc/frmatr.hxx                                        |    2 
 sw/inc/frmfmt.hxx                                        |    8 
 sw/inc/hintids.hxx                                       |    8 
 sw/inc/hints.hxx                                         |   26 
 sw/inc/ndtxt.hxx                                         |    6 
 sw/inc/node.hxx                                          |    9 
 sw/inc/swatrset.hxx                                      |    6 
 sw/inc/swunohelper.hxx                                   |    9 
 sw/inc/unobrushitemhelper.hxx                            |   36 
 sw/inc/unoframe.hxx                                      |    5 
 sw/inc/unoprnms.hxx                                      |   54 
 sw/inc/unostyle.hxx                                      |    7 
 sw/source/core/access/accpara.cxx                        |    2 
 sw/source/core/attr/cellatr.cxx                          |    6 
 sw/source/core/attr/format.cxx                           |   38 
 sw/source/core/bastyp/init.cxx                           |    6 
 sw/source/core/doc/DocumentDrawModelManager.cxx          |   12 
 sw/source/core/doc/doc.cxx                               |    3 
 sw/source/core/doc/docdesc.cxx                           |   70 
 sw/source/core/doc/docedt.cxx                            |    6 
 sw/source/core/doc/docfly.cxx                            |   11 
 sw/source/core/doc/docfmt.cxx                            |   18 
 sw/source/core/doc/doclay.cxx                            |    1 
 sw/source/core/doc/docnew.cxx                            |   27 
 sw/source/core/doc/docredln.cxx                          |   20 
 sw/source/core/doc/notxtfrm.cxx                          |    2 
 sw/source/core/doc/poolfmt.cxx                           |    3 
 sw/source/core/doc/visiturl.cxx                          |   12 
 sw/source/core/docnode/node.cxx                          |    8 
 sw/source/core/draw/dcontact.cxx                         |    1 
 sw/source/core/draw/dpage.cxx                            |    4 
 sw/source/core/draw/drawdoc.cxx                          |   40 
 sw/source/core/frmedt/feshview.cxx                       |    2 
 sw/source/core/inc/DocumentDrawModelManager.hxx          |   12 
 sw/source/core/inc/dflyobj.hxx                           |    1 
 sw/source/core/inc/frame.hxx                             |   13 
 sw/source/core/inc/frmtool.hxx                           |    2 
 sw/source/core/layout/atrfrm.cxx                         |   52 
 sw/source/core/layout/fillattributes.cxx                 |  141 -
 sw/source/core/layout/findfrm.cxx                        |   13 
 sw/source/core/layout/frmtool.cxx                        |   24 
 sw/source/core/layout/newfrm.cxx                         |    2 
 sw/source/core/layout/paintfrm.cxx                       |  135 -
 sw/source/core/text/inftxt.cxx                           |    2 
 sw/source/core/text/txtfrm.cxx                           |   12 
 sw/source/core/txtnode/fntcache.cxx                      |    2 
 sw/source/core/txtnode/ndtxt.cxx                         |   85 
 sw/source/core/txtnode/thints.cxx                        |   29 
 sw/source/core/txtnode/txtatr2.cxx                       |   18 
 sw/source/core/txtnode/txtedt.cxx                        |    8 
 sw/source/core/undo/docundo.cxx                          |    4 
 sw/source/core/undo/rolbck.cxx                           |   89 
 sw/source/core/unocore/swunohelper.cxx                   |   35 
 sw/source/core/unocore/unobrushitemhelper.cxx            |  327 --
 sw/source/core/unocore/unodraw.cxx                       |    3 
 sw/source/core/unocore/unoframe.cxx                      |   80 
 sw/source/core/unocore/unomap.cxx                        |  129 -
 sw/source/core/unocore/unoparagraph.cxx                  |  267 ++
 sw/source/core/unocore/unostyle.cxx                      | 1663 ++++++++++-----
 sw/source/core/view/viewimp.cxx                          |    2 
 sw/source/core/view/viewsh.cxx                           |    2 
 sw/source/filter/html/htmldrawreader.cxx                 |    3 
 sw/source/filter/ww8/rtfattributeoutput.cxx              |    3 
 sw/source/filter/ww8/wrtw8esh.cxx                        |    9 
 sw/source/filter/ww8/wrtww8.cxx                          |    7 
 sw/source/filter/ww8/ww8atr.cxx                          |    4 
 sw/source/filter/xml/swxml.cxx                           |    1 
 sw/source/filter/xml/xmlexp.cxx                          |    3 
 sw/source/filter/xml/xmlimp.cxx                          |    4 
 sw/source/ui/chrdlg/pardlg.cxx                           |   50 
 sw/source/ui/fmtui/tmpdlg.cxx                            |   58 
 sw/source/uibase/app/docsh.cxx                           |    3 
 sw/source/uibase/app/docshdrw.cxx                        |   66 
 sw/source/uibase/app/docshini.cxx                        |    5 
 sw/source/uibase/app/docst.cxx                           |   59 
 sw/source/uibase/app/docstyle.cxx                        |   64 
 sw/source/uibase/frmdlg/colex.cxx                        |   79 
 sw/source/uibase/inc/swuipardlg.hxx                      |    2 
 sw/source/uibase/lingu/sdrhhcwrap.cxx                    |    1 
 sw/source/uibase/shells/basesh.cxx                       |  229 --
 sw/source/uibase/shells/drwbassh.cxx                     |    4 
 sw/source/uibase/shells/frmsh.cxx                        |    2 
 sw/source/uibase/shells/grfsh.cxx                        |    5 
 sw/source/uibase/shells/textsh1.cxx                      |   61 
 sw/source/uibase/uiview/view.cxx                         |    4 
 sw/source/uibase/uiview/viewstat.cxx                     |   14 
 sw/source/uibase/uno/unotxdoc.cxx                        |    8 
 sw/source/uibase/utlui/content.cxx                       |   14 
 sw/source/uibase/utlui/uitool.cxx                        |   42 
 sw/uiconfig/swriter/ui/paradialog.ui                     |   21 
 sw/uiconfig/swriter/ui/templatedialog2.ui                |   25 
 sw/uiconfig/swriter/ui/templatedialog8.ui                |   33 
 vcl/source/gdi/bmpacc3.cxx                               |    6 
 xmloff/inc/PageMasterImportContext.hxx                   |    5 
 xmloff/inc/xmlsdtypes.hxx                                |  204 +
 xmloff/source/draw/XMLShapeStyleContext.cxx              |   72 
 xmloff/source/draw/sdpropls.cxx                          |    9 
 xmloff/source/draw/sdpropls.hxx                          |  156 -
 xmloff/source/style/PageMasterExportPropMapper.cxx       |  116 +
 xmloff/source/style/PageMasterImportContext.cxx          |  155 +
 xmloff/source/style/PageMasterPropHdlFactory.cxx         |   44 
 xmloff/source/style/PageMasterStyleMap.cxx               |  324 +-
 xmloff/source/style/prstylei.cxx                         |  257 ++
 xmloff/source/style/xmlimppr.cxx                         |    2 
 xmloff/source/style/xmlprmap.cxx                         |    2 
 xmloff/source/text/txtexppr.cxx                          |   16 
 xmloff/source/text/txtprhdl.cxx                          |   33 
 xmloff/source/text/txtprmap.cxx                          |   50 
 xmloff/source/text/txtstyli.cxx                          |  214 +
 147 files changed, 5888 insertions(+), 2979 deletions(-)

New commits:
commit 7b66810f17c1000ac1d4dc3c5ba49842a0d146be
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 18:04:18 2014 +0200

    getSvxBrushItemFromSourceSet: add fix for JunitTest_sw_complex
    
    Change-Id: I826cd15923ecb2088161e4cf9650b2f388fd84b5

diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index c95c200..f6fe915 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -191,7 +191,15 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
 
     if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue())
     {
-        Color aFillColor(COL_AUTO);
+        // no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have XFILL_NONE)
+        Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
+
+        // when fill style is none, then don't allow anything other than 0 or auto.
+        if (aFillColor.GetColor() != 0)
+            aFillColor.SetColor(COL_AUTO);
+
+        aFillColor.SetTransparency(0xff);
+
         return SvxBrushItem(aFillColor, nBackgroundID);
     }
 
commit 0df2e8d6826cb8672d61e05280d98840a51b2771
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 15:22:03 2014 +0200

    SwXPageStyle::GetPropertyValues_Impl: lost FN_UNO_HEADER/FOOTER_FIRST
    
    Change-Id: I38d7372f713c115b7c975e2aad84ae14e3cf8e1f

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index b532237..f8d85db 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3819,9 +3819,11 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
 
                 case FN_UNO_HEADER:
                 case FN_UNO_HEADER_LEFT:
+                case FN_UNO_HEADER_FIRST:
                 case FN_UNO_HEADER_RIGHT:
                 case FN_UNO_FOOTER:
                 case FN_UNO_FOOTER_LEFT:
+                case FN_UNO_FOOTER_FIRST:
                 case FN_UNO_FOOTER_RIGHT:
                 {
                     //UUUU cleanups for readability (undos removed, rearranged)
@@ -3831,9 +3833,11 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                     {
                         case FN_UNO_HEADER:       bHeader = true;  nRes = RES_HEADER; break;
                         case FN_UNO_HEADER_LEFT:  bHeader = true;  nRes = RES_HEADER; bLeft = true;  break;
+                        case FN_UNO_HEADER_FIRST: bHeader = true;  nRes = RES_HEADER; bFirst = true; break;
                         case FN_UNO_HEADER_RIGHT: bHeader = true;  nRes = RES_HEADER; break;
                         case FN_UNO_FOOTER:       bHeader = false; nRes = RES_FOOTER; break;
                         case FN_UNO_FOOTER_LEFT:  bHeader = false; nRes = RES_FOOTER; bLeft = true;  break;
+                        case FN_UNO_FOOTER_FIRST: bHeader = false; nRes = RES_FOOTER; bFirst = true; break;
                         case FN_UNO_FOOTER_RIGHT: bHeader = false; nRes = RES_FOOTER; break;
                         default: break;
                     }
commit 3350fabd23859eb5fdbe77c6db9248866d4e2995
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 13:46:04 2014 +0200

    SwXAutoStyle::GetPropertyValues_Impl: fix handling of CharAutoStyleName
    
    Without this, all character properties defined inside automatic styles
    are ignored.
    
    Change-Id: I3c25f5d36503a9f40834dd88573a40c34380b967

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e0c3bd6..b532237 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4609,7 +4609,8 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
 
         if ( RES_TXTATR_AUTOFMT == pEntry->nWID || RES_AUTO_STYLE == pEntry->nWID )
         {
-            pValues[i] <<= StylePool::nameOf( mpSet );
+            OUString sName(StylePool::nameOf( mpSet ));
+            aTarget <<= sName;
             bDone = true;
         }
         else if(bTakeCareOfDrawingLayerFillStyle)
commit 3d399b0e45720354fc64dc3d121ee486e01eff89
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 12:19:23 2014 +0200

    getSvxBrushItemFromSourceSet: let XFILL_NONE result in COL_AUTO
    
    I'm not completely sure about this, but without this, automatic color is
    translated back as rgba(114, 159, 207, 255), which sounds even worse.
    
    Change-Id: I9f96f26b3797d9e289119a4795d2535b6d72262e

diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index 5ce03ac..c95c200 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -191,10 +191,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
 
     if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue())
     {
-        // no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have XFILL_NONE)
-        Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
-        aFillColor.SetTransparency(0xff);
-
+        Color aFillColor(COL_AUTO);
         return SvxBrushItem(aFillColor, nBackgroundID);
     }
 
commit 9e9e9e4748695a626609b380d8cc4a191c54d83a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 11:57:32 2014 +0200

    SwXPageStyle: fix FirstIsShared handling
    
    At least now beans::UnknownPropertyException is not thrown when it is
    written.
    
    Change-Id: I6d4f8dbb1ac7caffc4bfdfb9c4c1c84eb9179883

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index cfbef1f..e0c3bd6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2862,7 +2862,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
                     const bool bHeader(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Header"));
                     const bool bFooter(SFX_STYLE_FAMILY_PAGE == eFamily && sPropName.startsWith("Footer"));
 
-                    if(bHeader || bFooter)
+                    if(bHeader || bFooter || sPropName == UNO_NAME_FIRST_IS_SHARED)
                     {
                         const SvxSetItem* pSetItem;
 
@@ -3415,7 +3415,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                     const bool bHeader(rPropName.startsWith("Header"));
                     const bool bFooter(rPropName.startsWith("Footer"));
 
-                    if(bHeader || bFooter)
+                    if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
                     {
                         // it is a Header/Footer entry, access the SvxSetItem containing it's information
                         const SvxSetItem* pSetItem = 0;
@@ -3523,7 +3523,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
                     const bool bHeader(rPropName.startsWith("Header"));
                     const bool bFooter(rPropName.startsWith("Footer"));
 
-                    if(bHeader || bFooter)
+                    if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
                     {
                         const SvxSetItem* pSetItem = 0;
 
@@ -3720,7 +3720,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                     const bool bHeader(rPropName.startsWith("Header"));
                     const bool bFooter(rPropName.startsWith("Footer"));
 
-                    if(bHeader || bFooter)
+                    if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
                     {
                         // slot is a Header/Footer slot
                         rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) );
@@ -3794,7 +3794,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
                     const bool bHeader(rPropName.startsWith("Header"));
                     const bool bFooter(rPropName.startsWith("Footer"));
 
-                    if(bHeader || bFooter)
+                    if(bHeader || bFooter || rPropName == UNO_NAME_FIRST_IS_SHARED)
                     {
                         rtl::Reference< SwDocStyleSheet > xStyle( new SwDocStyleSheet( *(SwDocStyleSheet*)pBase ) );
                         const SfxItemSet& rSet = xStyle->GetItemSet();
commit 8624eafde1ed307a3ec212309462b7ed73bb1477
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 30 11:44:07 2014 +0200

    Remove stray fprintf
    
    Change-Id: I3cfe170091f11a3039ff6443b283fb45773a4e70

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index af269c7..a6fc287 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -146,11 +146,9 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
             if(pLocalPool)
             {
                 OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a secondary pool set where the DrawingLayer ItemPool is to be placed (!)");
-                fprintf(stderr, "ANS is %p\n", pLocalPool->GetSecondaryPool());
 #if 0
                 pLocalPool->SetSecondaryPool(&pDrawLayer->GetItemPool());
 #endif
-                fprintf(stderr, "was set to %p\n", pLocalPool->GetSecondaryPool());
             }
         }
 #endif
commit d1465c64c6f64ad8dd25e40cdc69649b24b305ea
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 20 16:03:03 2014 +0100

    fix tests
    
    Change-Id: Ia7099e87baa553ce6f5537908e1fb65c268d3940

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 3b1e657..af269c7 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -133,7 +133,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
         sfx2::LinkManager* pMgr = GetDocLinkManager().getLinkManager(bAutoCalc);
         if (pMgr)
             pDrawLayer->SetLinkManager(pMgr);
-
+#if 1
         //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
@@ -146,9 +146,14 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
             if(pLocalPool)
             {
                 OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a secondary pool set where the DrawingLayer ItemPool is to be placed (!)");
+                fprintf(stderr, "ANS is %p\n", pLocalPool->GetSecondaryPool());
+#if 0
                 pLocalPool->SetSecondaryPool(&pDrawLayer->GetItemPool());
+#endif
+                fprintf(stderr, "was set to %p\n", pLocalPool->GetSecondaryPool());
             }
         }
+#endif
 
         //  Drawing pages are accessed by table number, so they must also be present
         //  for preceding table numbers, even if the tables aren't allocated
@@ -248,10 +253,12 @@ void ScDocument::DeleteDrawLayer()
 
         if(pLocalPool && pLocalPool->GetSecondaryPool())
         {
+            fprintf(stderr, "RET is %p\n", pLocalPool->GetSecondaryPool());
+#if 0
             pLocalPool->SetSecondaryPool(0);
+#endif
         }
     }
-
     delete pDrawLayer;
     pDrawLayer = 0;
 }
commit 5f0d957ac6ea656ab6131a174fe52307f5f6eb2f
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Jun 5 12:24:35 2014 +0000

    Resolves: #i125045# For XMLPropertyMapper using TEXT_PROP_MAP_SHAPE_PARA...
    
    hide the DrawingLayer FillStyle entries by moving them to the front of
    aXMLParaPropMap and using a higher index for construction
    
    (cherry picked from commit 35f3ceaf60f109f45aa7fef7077aead398bed53f)
    
    Change-Id: I8244e4dc685a2aa35e4154a43455ff62c8ee58fe

diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 396c68b..bf15e56 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -116,12 +116,11 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
     GMAP( "FillHatchName",                  XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ),
     GMAP( "FillBackground",                 XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID,       XML_TYPE_BOOL, 0 ),
     GMAP( "FillBitmapName",                 XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ),
-    GMAP( "FillTransparence",               XML_NAMESPACE_DRAW, XML_OPACITY,            XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ),    // exists in SW, too
-    GMAP( "FillTransparenceGradientName",   XML_NAMESPACE_DRAW, XML_OPACITY_NAME,       XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ),
-
-    GMAP( "FillBitmapSizeX",                    XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillTransparence",               XML_NAMESPACE_DRAW, XML_OPACITY,                XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ),    // exists in SW, too
+    GMAP( "FillTransparenceGradientName",   XML_NAMESPACE_DRAW, XML_OPACITY_NAME,           XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ),
+    GMAP( "FillBitmapSizeX",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapSizeY",                    XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapSizeY",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     GMAP( "FillBitmapMode",                 XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SD_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
     GMAP( "FillBitmapPositionOffsetX",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index e0b617e..7979d1a 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -85,6 +85,31 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
 {
     // RES_UNKNOWNATR_CONTAINER
     MP_E( "ParaUserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+
+    //UUUU fill attributes for paragraph backgrounds
+    // #i125045# moved to the front to be able to exclude these in lcl_txtprmap_getMap
+    // for TEXT_PROP_MAP_SHAPE_PARA to not have these double for Shapes (which already have these)
+    GMAP( "FillStyle",                      XML_NAMESPACE_DRAW, XML_FILL,                   XML_SW_TYPE_FILLSTYLE, 0 ),
+    GMAP( "FillColor",                      XML_NAMESPACE_DRAW, XML_FILL_COLOR,             XML_TYPE_COLOR, 0 ),
+    GMAP( "FillColor2",                     XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR,   XML_TYPE_COLOR, 0 ),
+    GMAP( "FillGradientName",               XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME,     XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ),
+    GMAP( "FillGradientStepCount",          XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT,    XML_TYPE_NUMBER16, 0 ),
+    GMAP( "FillHatchName",                  XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ),
+    GMAP( "FillBackground",                 XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID,       XML_TYPE_BOOL, 0 ),
+    GMAP( "FillBitmapName",                 XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ),
+    GMAP( "FillTransparence",               XML_NAMESPACE_DRAW, XML_OPACITY,                XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ),    // exists in SW, too
+    GMAP( "FillTransparenceGradientName",   XML_NAMESPACE_DRAW, XML_OPACITY_NAME,           XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ),
+    GMAP( "FillBitmapSizeX",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapSizeY",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapMode",                 XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SW_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
+    GMAP( "FillBitmapPositionOffsetX",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
+    GMAP( "FillBitmapPositionOffsetY",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
+    GMAP( "FillBitmapRectanglePoint",       XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT,   XML_SW_TYPE_BITMAP_REFPOINT, 0 ),
+    GMAP( "FillBitmapOffsetX",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X ),
+    GMAP( "FillBitmapOffsetY",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y ),
+
     // RES_LR_SPACE
     // !!! DO NOT REORDER THE MARGINS !!!
     MP_E( "ParaLeftMargin",         FO, MARGIN,     XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL ),
@@ -344,28 +369,6 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
     MP_E( "ParaBackGraphicFilter",STYLE,    FILTER_NAME,    MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
     MP_E( "ParaBackGraphicURL", STYLE,  BACKGROUND_IMAGE,   MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
 
-    //UUUU fill attributes for paragraph backgrounds
-    GMAP( "FillStyle",                      XML_NAMESPACE_DRAW, XML_FILL,                   XML_SW_TYPE_FILLSTYLE, 0 ),
-    GMAP( "FillColor",                      XML_NAMESPACE_DRAW, XML_FILL_COLOR,             XML_TYPE_COLOR, 0 ),
-    GMAP( "FillColor2",                     XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR,   XML_TYPE_COLOR, 0 ),
-    GMAP( "FillGradientName",               XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME,     XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ),
-    GMAP( "FillGradientStepCount",          XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT,    XML_TYPE_NUMBER16, 0 ),
-    GMAP( "FillHatchName",                  XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ),
-    GMAP( "FillBackground",                 XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID,       XML_TYPE_BOOL, 0 ),
-    GMAP( "FillBitmapName",                 XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME,        XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ),
-    GMAP( "FillTransparence",               XML_NAMESPACE_DRAW, XML_OPACITY,                XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ),    // exists in SW, too
-    GMAP( "FillTransparenceGradientName",   XML_NAMESPACE_DRAW, XML_OPACITY_NAME,           XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ),
-    GMAP( "FillBitmapSizeX",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapSizeY",                XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapMode",                 XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SW_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
-    GMAP( "FillBitmapPositionOffsetX",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
-    GMAP( "FillBitmapPositionOffsetY",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
-    GMAP( "FillBitmapRectanglePoint",       XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT,   XML_SW_TYPE_BITMAP_REFPOINT, 0 ),
-    GMAP( "FillBitmapOffsetX",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X ),
-    GMAP( "FillBitmapOffsetY",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y ),
-
     // RES_BOX
     MP_E( "LeftBorder",         STYLE,  BORDER_LINE_WIDTH,        XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
     MP_E( "LeftBorder",         STYLE,  BORDER_LINE_WIDTH_LEFT,   XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
@@ -958,7 +961,11 @@ static XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
         pMap = aXMLTextPropMap;
         break;
     case TEXT_PROP_MAP_SHAPE_PARA:
-        pMap = &(aXMLParaPropMap[1]);
+        // #i125045# use [21] instead of [1] for text props for Shapes, idices
+        // [1..20] contain the DrawingLayer FillStyle attributes corresponding to
+        // [XATTR_FILL_FIRST .. XATTR_FILL_LAST] and would be double since Shapes
+        // already contain these (usually in aXMLSDProperties)
+        pMap = &(aXMLParaPropMap[21]);
         OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "shape para map changed" );
         break;
     case TEXT_PROP_MAP_PARA:
commit 378dc6ef20ffd0e657d78dbf6646d48059be4045
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Jun 5 08:44:38 2014 +0000

    Related: #i124638# Corrected relationship between DrawModel and...
    
    DocShell in Writer, made SwDrawModel and handling more known
    
    (includes suspicious removal of setting SID_ATTR_LINEEND_WIDTH_DEFAULT)
    
    (cherry picked from commit a7ccadbf3b1ac378ca15d3630d48f48734700e5c)
    
    Conflicts:
    	sw/inc/IDocumentDrawModelAccess.hxx
    	sw/inc/doc.hxx
    	sw/inc/docsh.hxx
    	sw/inc/dpage.hxx
    	sw/inc/drawdoc.hxx
    	sw/source/core/access/accmap.cxx
    	sw/source/core/doc/doc.cxx
    	sw/source/core/doc/docdesc.cxx
    	sw/source/core/doc/docdraw.cxx
    	sw/source/core/doc/docfly.cxx
    	sw/source/core/doc/doclay.cxx
    	sw/source/core/doc/docnew.cxx
    	sw/source/core/draw/dcontact.cxx
    	sw/source/core/draw/dpage.cxx
    	sw/source/core/draw/drawdoc.cxx
    	sw/source/core/frmedt/feshview.cxx
    	sw/source/core/layout/fly.cxx
    	sw/source/core/layout/frmtool.cxx
    	sw/source/core/layout/newfrm.cxx
    	sw/source/core/layout/paintfrm.cxx
    	sw/source/core/undo/docundo.cxx
    	sw/source/core/undo/unattr.cxx
    	sw/source/core/unocore/unodraw.cxx
    	sw/source/core/unocore/unoframe.cxx
    	sw/source/core/view/vdraw.cxx
    	sw/source/core/view/viewimp.cxx
    	sw/source/core/view/viewsh.cxx
    	sw/source/filter/html/htmldrawreader.cxx
    	sw/source/filter/rtf/rtffly.cxx
    	sw/source/filter/rtf/swparrtf.cxx
    	sw/source/filter/ww8/docxattributeoutput.cxx
    	sw/source/filter/ww8/rtfattributeoutput.cxx
    	sw/source/filter/ww8/wrtw8esh.cxx
    	sw/source/filter/ww8/wrtww8.cxx
    	sw/source/filter/ww8/ww8graf.cxx
    	sw/source/filter/xml/swxml.cxx
    	sw/source/filter/xml/xmlexp.cxx
    	sw/source/filter/xml/xmlimp.cxx
    	sw/source/ui/app/docshdrw.cxx
    	sw/source/ui/uiview/view.cxx
    	sw/source/ui/uno/unodefaults.cxx
    	sw/source/uibase/app/docst.cxx
    	sw/source/uibase/app/docstyle.cxx
    	sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
    	sw/source/uibase/lingu/sdrhhcwrap.cxx
    	sw/source/uibase/shells/drwbassh.cxx
    	sw/source/uibase/shells/frmsh.cxx
    	sw/source/uibase/shells/grfsh.cxx
    	sw/source/uibase/shells/textsh1.cxx
    	sw/source/uibase/uno/unotxdoc.cxx
    	sw/source/uibase/utlui/content.cxx
    
    Conflicts:
    	sw/source/uibase/app/docshdrw.cxx
    
    Change-Id: Icb99eaa7bfb1eb8922a9fd928b5e4149821130dd

diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx
index ad8415a..7cf0b86 100644
--- a/sw/inc/IDocumentDrawModelAccess.hxx
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -22,7 +22,7 @@
 
 #include <svx/svdtypes.hxx>
 
-class SwDrawDocument;
+class SwDrawModel;
 class SdrPageView;
 
 class IDocumentDrawModelAccess
@@ -31,10 +31,10 @@ public:
 
     /** Draw Model and id accessors
      */
-    virtual const SwDrawDocument* GetDrawModel() const = 0;
-    virtual SwDrawDocument* GetDrawModel() = 0;
-    virtual SwDrawDocument* _MakeDrawModel() = 0;
-    virtual SwDrawDocument* GetOrCreateDrawModel() = 0;
+    virtual const SwDrawModel* GetDrawModel() const = 0;
+    virtual SwDrawModel* GetDrawModel() = 0;
+    virtual SwDrawModel* _MakeDrawModel() = 0;
+    virtual SwDrawModel* GetOrCreateDrawModel() = 0;
     virtual SdrLayerID GetHeavenId() const = 0;
     virtual SdrLayerID GetHellId() const = 0;
     virtual SdrLayerID GetControlsId() const = 0;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 37a6fda..2f84c0d 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -87,7 +87,7 @@ class Outliner;
 class OutputDevice;
 class Point;
 class SbxArray;
-class SdrModel;
+class SwDrawModel;
 class SdrObject;
 class SdrUndoAction;
 class VirtualDevice;
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 2aeafa6..4e03e15 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -51,6 +51,12 @@ class IDocumentDeviceAccess;
 class IDocumentSettingAccess;
 class IDocumentTimerAccess;
 class IDocumentChartDataProviderAccess;
+class SwDocShell;
+class SwDrawModel;
+
+// initialize DrawModel (in form of a SwDrawModel) and DocShell (in form of a SwDocShell)
+// as needed, one or both parameters may be zero
+void SAL_DLLPRIVATE InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawModel);
 
 class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
 {
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index 38bd63e..5881dd9 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -23,7 +23,7 @@
 #include <svx/svdobj.hxx>
 
 class SdrPageGridFrameList;
-class SwDrawDocument;
+class SwDrawModel;
 class SwDoc;
 
 class SwDPage : public FmFormPage, public SdrObjUserCall
@@ -32,7 +32,7 @@ class SwDPage : public FmFormPage, public SdrObjUserCall
     SwDoc&                  rDoc;
 
 public:
-    SwDPage(SwDrawDocument& rNewModel, bool bMasterPage=false);
+    SwDPage(SwDrawModel& rNewModel, bool bMasterPage=false);
     virtual ~SwDPage();
 
     // #i3694#
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index f06d5b5..2bc65c6 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -24,12 +24,12 @@
 class SwDoc;
 class SwDocShell;
 
-class SwDrawDocument : public FmFormModel
+class SwDrawModel : public FmFormModel
 {
     SwDoc* pDoc;
 public:
-    SwDrawDocument( SwDoc* pDoc );
-    virtual ~SwDrawDocument();
+    SwDrawModel( SwDoc* pDoc );
+    virtual ~SwDrawModel();
 
     const SwDoc& GetDoc() const { return *pDoc; }
           SwDoc& GetDoc()       { return *pDoc; }
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index 7dc30f9..2a8b56c 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -98,8 +98,8 @@ void DocumentDrawModelManager::InitDrawModel()
     m_rSwdoc.GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ));
 
     SAL_INFO( "sw.doc", "before create DrawDocument" );
-    // The document owns the SwDrawDocument. We always have two layers and one page.
-    mpDrawModel = new SwDrawDocument( &m_rSwdoc );
+    // The document owns the SwDrawModel. We always have two layers and one page.
+    mpDrawModel = new SwDrawModel( &m_rSwdoc );
 
     mpDrawModel->EnableUndo( m_rSwdoc.GetIDocumentUndoRedo().DoesUndo() );
 
@@ -196,17 +196,17 @@ void DocumentDrawModelManager::ReleaseDrawModel()
 
 
 
-const SwDrawDocument* DocumentDrawModelManager::GetDrawModel() const
+const SwDrawModel* DocumentDrawModelManager::GetDrawModel() const
 {
     return mpDrawModel;
 }
 
-SwDrawDocument* DocumentDrawModelManager::GetDrawModel()
+SwDrawModel* DocumentDrawModelManager::GetDrawModel()
 {
     return mpDrawModel;
 }
 
-SwDrawDocument* DocumentDrawModelManager::_MakeDrawModel()
+SwDrawModel* DocumentDrawModelManager::_MakeDrawModel()
 {
     OSL_ENSURE( !mpDrawModel, "_MakeDrawModel: Why?" );
     InitDrawModel();
@@ -229,7 +229,7 @@ SwDrawDocument* DocumentDrawModelManager::_MakeDrawModel()
     return mpDrawModel;
 }
 
-SwDrawDocument* DocumentDrawModelManager::GetOrCreateDrawModel()
+SwDrawModel* DocumentDrawModelManager::GetOrCreateDrawModel()
 {
     return GetDrawModel() ? GetDrawModel() : _MakeDrawModel();
 }
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 289b13f..cfe2ef9 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -22,7 +22,6 @@
 #include <DocumentDrawModelManager.hxx>
 #include <UndoManager.hxx>
 #include <hintids.hxx>
-
 #include <tools/shl.hxx>
 #include <tools/globname.hxx>
 #include <svx/svxids.hrc>
@@ -117,11 +116,9 @@
 
 #include <vector>
 #include <map>
-
 #include <osl/diagnose.h>
 #include <osl/interlck.h>
 #include <vbahelper/vbaaccesshelper.hxx>
-
 #include "switerator.hxx"
 
 /* @@@MAINTAINABILITY-HORROR@@@
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 31c9fe2..f2b8466 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -28,7 +28,6 @@
 #include <fmtornt.hxx>
 #include <fmtsrnd.hxx>
 #include <dcontact.hxx>
-
 #include <ndgrf.hxx>
 #include <doc.hxx>
 #include <IDocumentUndoRedo.hxx>
@@ -447,7 +446,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
 
 void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet)
 {
-    SdrModel* pDrawModel = getIDocumentDrawModelAccess().GetOrCreateDrawModel();
+    SwDrawModel* pDrawModel = getIDocumentDrawModelAccess().GetOrCreateDrawModel();
     SfxItemIter aIter(rSet);
 
     for(const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem())
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 52c6263..bf97e7c 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -37,7 +37,6 @@
 #include <svx/svdouno.hxx>
 #include <svx/fmpage.hxx>
 #include <editeng/frmdiritem.hxx>
-
 #include <swmodule.hxx>
 #include <modcfg.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 882719e..9ebd797 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -677,13 +677,20 @@ void SwDoc::SetDocShell( SwDocShell* pDSh )
         }
 
         mpLinkMgr->SetPersist( mpDocShell );
+
         if( GetDocumentDrawModelManager().GetDrawModel() )
         {
-            ((SwDrawDocument*)GetDocumentDrawModelManager().GetDrawModel())->SetObjectShell( mpDocShell );
+            GetDocumentDrawModelManager().GetDrawModel()->SetObjectShell( mpDocShell );
             GetDocumentDrawModelManager().GetDrawModel()->SetPersist( mpDocShell );
             OSL_ENSURE( GetDocumentDrawModelManager().GetDrawModel()->GetPersist() == GetPersist(),
                     "draw model's persist is out of sync" );
         }
+
+        // set DocShell pointer also on DrawModel
+        InitDrawModelAndDocShell(mpDocShell, GetDocumentDrawModelManager().GetDrawModel());
+        OSL_ENSURE(!GetDocumentDrawModelManager().GetDrawModel() ||
+            GetDocumentDrawModelManager().GetDrawModel()->GetPersist() == GetPersist(),
+            "draw model's persist is out of sync");
     }
 }
 
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 1734bb4..ce33281 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -67,6 +67,7 @@
 #include <com/sun/star/text/WritingMode2.hpp>
 #include <switerator.hxx>
 #include <algorithm>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index d98bfd4..b1cef17 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::frame;
 
-SwDPage::SwDPage(SwDrawDocument& rNewModel, bool bMasterPage) :
+SwDPage::SwDPage(SwDrawModel& rNewModel, bool bMasterPage) :
     FmFormPage(rNewModel, bMasterPage),
     pGridLst( 0 ),
     rDoc(rNewModel.GetDoc())
@@ -83,7 +83,7 @@ void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrm *pPg )
 const SdrPageGridFrameList*  SwDPage::GetGridFrameList(
                         const SdrPageView* pPV, const Rectangle *pRect ) const
 {
-    SwViewShell *pSh = ((SwDrawDocument*)GetModel())->GetDoc().GetCurrentViewShell();
+    SwViewShell *pSh = static_cast< SwDrawModel* >(GetModel())->GetDoc().GetCurrentViewShell();
     while (pSh && pSh->Imp()->GetPageView() != pPV)
         pSh = (SwViewShell*)pSh->GetNext();
     if (pSh)
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 8090dfe..149408b 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -49,7 +49,7 @@ const OUString GetPalettePath()
     return aPathOpt.GetPalettePath();
 }
 
-SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
+SwDrawModel::SwDrawModel( SwDoc* pD ) :
     FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(),
                  pD->GetDocShell(), true ),
     pDoc( pD )
@@ -57,29 +57,9 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
     SetScaleUnit( MAP_TWIP );
     SetSwapGraphics( true );
 
-    SwDocShell* pDocSh = pDoc->GetDocShell();
-    if ( pDocSh )
-    {
-        SetObjectShell( pDocSh );
-        SvxColorListItem* pColItem = ( SvxColorListItem* )
-                                ( pDocSh->GetItem( SID_COLOR_TABLE ) );
-        XColorListRef pXCol = pColItem ? pColItem->GetColorList() :
-                                         XColorList::GetStdColorList();
-        SetPropertyList( static_cast<XPropertyList *> (pXCol.get()) );
-
-        if ( !pColItem )
-            pDocSh->PutItem( SvxColorListItem( pXCol, SID_COLOR_TABLE ) );
-
-        pDocSh->PutItem( SvxGradientListItem( GetGradientList(), SID_GRADIENT_LIST ));
-        pDocSh->PutItem( SvxHatchListItem( GetHatchList(), SID_HATCH_LIST ) );
-        pDocSh->PutItem( SvxBitmapListItem( GetBitmapList(), SID_BITMAP_LIST ) );
-        pDocSh->PutItem( SvxDashListItem( GetDashList(), SID_DASH_LIST ) );
-        pDocSh->PutItem( SvxLineEndListItem( GetLineEndList(), SID_LINEEND_LIST ) );
-        pDocSh->PutItem( SfxUInt16Item(SID_ATTR_LINEEND_WIDTH_DEFAULT, 111) );
-        SetObjectShell( pDocSh );
-    }
-    else
-        SetPropertyList( static_cast<XPropertyList *> (XColorList::GetStdColorList().get()) );
+    // use common InitDrawModelAndDocShell which will set the associations as needed,
+    // including SvxColorTableItem  with WhichID SID_COLOR_TABLE
+    InitDrawModelAndDocShell(pDoc ? pDoc->GetDocShell() : 0, this);
 
     // copy all the default values to the SdrModel
     SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool();
@@ -119,7 +99,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
 
 // Destructor
 
-SwDrawDocument::~SwDrawDocument()
+SwDrawModel::~SwDrawModel()
 {
     Broadcast(SdrHint(HINT_MODELCLEARED));
 
@@ -133,25 +113,25 @@ SwDrawDocument::~SwDrawDocument()
  *
  * @return Pointer to the new page.
  */
-SdrPage* SwDrawDocument::AllocPage(bool bMasterPage)
+SdrPage* SwDrawModel::AllocPage(bool bMasterPage)
 {
     SwDPage* pPage = new SwDPage(*this, bMasterPage);
     pPage->SetName(OUString("Controls"));
     return pPage;
 }
 
-uno::Reference<embed::XStorage> SwDrawDocument::GetDocumentStorage() const
+uno::Reference<embed::XStorage> SwDrawModel::GetDocumentStorage() const
 {
     return pDoc->GetDocStorage();
 }
 
-SdrLayerID SwDrawDocument::GetControlExportLayerId( const SdrObject & ) const
+SdrLayerID SwDrawModel::GetControlExportLayerId( const SdrObject & ) const
 {
     //for versions < 5.0, there was only Hell and Heaven
     return (SdrLayerID)pDoc->getIDocumentDrawModelAccess().GetHeavenId();
 }
 
-uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
+uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
 {
     uno::Reference< uno::XInterface > xModel;
 
@@ -164,7 +144,7 @@ uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
     }
     catch( uno::RuntimeException& )
     {
-        OSL_FAIL( "<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
+        OSL_FAIL( "<SwDrawModel::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
     }
 
     return xModel;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 0aca2c6..7cb37cc 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "hintids.hxx"
-
 #include <svx/sdrobjectfilter.hxx>
 #include <svx/svditer.hxx>
 #include <svx/svdobj.hxx>
@@ -80,6 +79,7 @@
 #include <HandleAnchorNodeChg.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <switerator.hxx>
+#include <drawdoc.hxx>
 
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
diff --git a/sw/source/core/inc/DocumentDrawModelManager.hxx b/sw/source/core/inc/DocumentDrawModelManager.hxx
index d142c71..c9052e7 100644
--- a/sw/source/core/inc/DocumentDrawModelManager.hxx
+++ b/sw/source/core/inc/DocumentDrawModelManager.hxx
@@ -25,7 +25,7 @@
 #include <boost/utility.hpp>
 #include <svx/svdtypes.hxx>
 
-class SwDrawDocument;
+class SwDrawModel;
 class SdrPageView;
 class SwDoc;
 
@@ -44,10 +44,10 @@ public:
     void DrawNotifyUndoHdl();
 
     //IDocumentDrawModelAccess
-    virtual const SwDrawDocument* GetDrawModel() const SAL_OVERRIDE;
-    virtual SwDrawDocument* GetDrawModel() SAL_OVERRIDE;
-    virtual SwDrawDocument* _MakeDrawModel() SAL_OVERRIDE;
-    virtual SwDrawDocument* GetOrCreateDrawModel() SAL_OVERRIDE;
+    virtual const SwDrawModel* GetDrawModel() const SAL_OVERRIDE;
+    virtual SwDrawModel* GetDrawModel() SAL_OVERRIDE;
+    virtual SwDrawModel* _MakeDrawModel() SAL_OVERRIDE;
+    virtual SwDrawModel* GetOrCreateDrawModel() SAL_OVERRIDE;
     virtual SdrLayerID GetHeavenId() const SAL_OVERRIDE;
     virtual SdrLayerID GetHellId() const SAL_OVERRIDE;
     virtual SdrLayerID GetControlsId() const SAL_OVERRIDE;
@@ -70,7 +70,7 @@ private:
     SwDoc& m_rSwdoc;
 
 
-    SwDrawDocument* mpDrawModel;
+    SwDrawModel* mpDrawModel;
 
     /** Draw Model Layer IDs
      * LayerIds, Heaven == above document
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index b474823..0d0e8ce 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -65,6 +65,7 @@
 
 //UUUU
 #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
+#include <drawdoc.hxx>
 
 // ftnfrm.cxx:
 void sw_RemoveFtns( SwFtnBossFrm* pBoss, bool bPageOnly, bool bEndNotes );
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 4aaa767..23ab179 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -484,7 +484,7 @@ void SwRootFrm::Init( SwFrmFmt* pFmt )
     pLayoutAccess->SetCurrentViewShell( this->GetCurrShell() );
     bCallbackActionEnabled = false; // needs to be set to sal_True before leaving!
 
-    SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
+    SwDrawModel* pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
     if ( pMd )
     {
         // Disable "multiple layout"
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 3678af7..2dde87b 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -79,10 +79,10 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
-//UUUU
 #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
 #include <drawinglayer/processor2d/processor2dtools.hxx>
 #include <ndtxt.hxx>
+#include <drawdoc.hxx>
 
 #define COL_NOTES_SIDEPANE                  RGB_COLORDATA(230,230,230)
 #define COL_NOTES_SIDEPANE_BORDER           RGB_COLORDATA(200,200,200)
@@ -7607,7 +7607,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
 Graphic SwDrawFrmFmt::MakeGraphic( ImageMap* )
 {
     Graphic aRet;
-    SdrModel *pMod = getIDocumentDrawModelAccess()->GetDrawModel();
+    SwDrawModel* pMod = getIDocumentDrawModelAccess()->GetDrawModel();
     if ( pMod )
     {
         SdrObject *pObj = FindSdrObject();
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index f097c21..a873377 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -20,9 +20,7 @@
 #include <UndoManager.hxx>
 
 #include <vcl/wrkwin.hxx>
-
 #include <svx/svdmodel.hxx>
-
 #include <swmodule.hxx>
 #include <doc.hxx>
 #include <drawdoc.hxx>
@@ -85,7 +83,7 @@ void UndoManager::DoUndo(bool const bDoUndo)
     {
         EnableUndo(bDoUndo);
 
-        SdrModel *const pSdrModel = m_rDrawModelAccess.GetDrawModel();
+        SwDrawModel*const pSdrModel = m_rDrawModelAccess.GetDrawModel();
         if( pSdrModel )
         {
             pSdrModel->EnableUndo(bDoUndo);
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2717324..473aa36 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -65,6 +65,7 @@
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <com/sun/star/drawing/PointSequence.hpp>
 #include <switerator.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
@@ -828,7 +829,7 @@ SwFmDrawPage*   SwXDrawPage::GetSvxPage()
     {
         SolarMutexGuard aGuard;
         // #i52858#
-        SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
+        SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
         SdrPage* pPage = pModel->GetPage( 0 );
 
         {
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index bf9a249..f77b8af 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -117,7 +117,6 @@
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
-//UUUU
 #include <svx/unobrushitemhelper.hxx>
 #include <svx/xfillit0.hxx>
 #include <svx/xbtmpit.hxx>
@@ -137,6 +136,7 @@
 #include <svx/xflhtit.hxx>
 #include <svx/xfltrit.hxx>
 #include <swunohelper.hxx>
+#include <drawdoc.hxx>
 
 // from fefly1.cxx
 extern bool sw_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet );
@@ -1304,7 +1304,7 @@ SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrmFmt &rFmt)
     {
         SwDoc *pDoc = rFmt.GetDoc();
         // #i52858# - method name changed
-        SdrModel *pDrawModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
+        SwDrawModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
         SwFlyDrawContact* pContactObject
                     = new SwFlyDrawContact( &rFmt, pDrawModel );
         pObject = pContactObject->GetMaster();
@@ -1691,7 +1691,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
             {
                 SdrObject* pObject =
                     GetOrCreateSdrObject( (SwFlyFrmFmt&)*pFmt );
-                SdrModel *pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+                SwDrawModel *pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
                 pDrawModel->GetPage(0)->
                             SetObjectOrdNum(pObject->GetOrdNum(), nZOrder);
             }
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 34e15aa..71e2a3e 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -35,13 +35,13 @@
 #include <accmap.hxx>
 
 #include <pagepreviewlayout.hxx>
-
 #include <comcore.hrc>
 #include <svx/svdundo.hxx>
 #include <IDocumentLayoutAccess.hxx>
 #include <IDocumentDrawModelAccess.hxx>
 #include <IDocumentDeviceAccess.hxx>
 #include <IDocumentSettingAccess.hxx>
+#include <drawdoc.hxx>
 
 void SwViewImp::Init( const SwViewOption *pNewOpt )
 {
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index cc80298..1b6b1e5 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -757,7 +757,7 @@ void SwViewShell::SetAddExtLeading( bool bNew )
     {
         SwWait aWait( *GetDoc()->GetDocShell(), true );
         pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
-        SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
+        SwDrawModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
         if ( pTmpDrawModel )
             pTmpDrawModel->SetAddExtLeading( bNew );
         const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index a50926e..346c94d 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -360,8 +360,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
 
     // Ein DrawTxtobj anlegen
     // #i52858# - method name changed
-    SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
-
+    SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
     SdrPage* pPg = pModel->GetPage( 0 );
     pMarquee = SdrObjFactory::MakeNewObject( SdrInventor,
                                              OBJ_TEXT, pPg, pModel );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 6dabc93..3ac3a87 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -31,7 +31,6 @@
 #include <rtl/ustring.hxx>
 #include <rtl/tencinfo.h>
 #include <svtools/rtfkeywd.hxx>
-
 #include <editeng/fontitem.hxx>
 #include <editeng/tstpitem.hxx>
 #include <editeng/adjustitem.hxx>
@@ -1716,7 +1715,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin
             bool bSwapInPage = false;
             if (!pSdrObj->GetPage())
             {
-                if (SdrModel* pModel = m_rExport.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
+                if (SwDrawModel* pModel = m_rExport.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
                 {
                     if (SdrPage* pPage = pModel->GetPage(0))
                     {
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index a7bef43..9a97ae5 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -96,6 +96,7 @@
 #include "sfx2/sfxsids.hrc"
 #include <svl/urihelper.hxx>
 #include <unotools/saveopt.hxx>
+#include <drawdoc.hxx>
 
 #include <algorithm>
 
@@ -1002,7 +1003,7 @@ sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
         SwFrmFmt* pFmt = (SwFrmFmt*)&rFmt;
         nOrdNum = pDoc->GetSpzFrmFmts()->GetPos( pFmt );
 
-        const SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+        const SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
         if( pModel )
             nOrdNum += pModel->GetPage( 0 )->GetObjCount();
     }
@@ -2162,7 +2163,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType
 void SwBasicEscherEx::Init()
 {
     MapUnit eMap = MAP_TWIP;
-    if (SdrModel *pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
+    if (SwDrawModel *pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
     {
         // PPT arbeitet nur mit Einheiten zu 576DPI
         // WW hingegen verwendet twips, dh. 1440DPI.
@@ -2296,7 +2297,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
                         bool bSwapInPage = false;
                         if (!pSdrObj->GetPage())
                         {
-                            if (SdrModel* pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
+                            if (SwDrawModel* pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel())
                             {
                                 if (SdrPage *pPage = pModel->GetPage(0))
                                 {
@@ -3028,7 +3029,7 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
     {
         OpenContainer( ESCHER_SpContainer );
 
-        SdrModel *pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+        SwDrawModel *pModel = rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel();
         OutputDevice *pDevice = Application::GetDefaultDevice();
         OSL_ENSURE(pModel && pDevice, "no model or device");
 
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index c69ee3f..b1c1f82 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -23,12 +23,9 @@
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 #include <unotools/ucbstreamhelper.hxx>
-
 #include <algorithm>
-
 #include <map>
 #include <set>
-
 #include <hintids.hxx>
 #include <string.h>
 #include <osl/endian.h>
@@ -94,15 +91,11 @@
 #include "writerhelper.hxx"
 #include "writerwordglue.hxx"
 #include "ww8attributeoutput.hxx"
-
 #include <IDocumentMarkAccess.hxx>
 #include <xmloff/odffields.hxx>
-
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <com/sun/star/document/XDocumentProperties.hpp>
-
 #include "dbgoutsw.hxx"
-
 #include <sfx2/docfile.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/frame.hxx>
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 5098659..afce162 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -57,7 +57,6 @@
 #include <unotextrange.hxx>
 #include <swmodule.hxx>
 #include <SwXMLSectionList.hxx>
-
 #include <statstr.hrc>
 
 #include <SwStyleNameMapper.hxx>
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 090c675..19fabca 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -63,6 +63,7 @@
 #include <IDocumentDrawModelAccess.hxx>
 
 #include <pausethreadstarting.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -230,7 +231,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
     if( (getExportFlags() & (EXPORT_MASTERSTYLES|EXPORT_CONTENT)) != 0 )
     {
         //Auf die Korrektheit der OrdNums sind wir schon angewiesen.
-        SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+        SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
         if( pModel )
             pModel->GetPage( 0 )->RecalcObjOrdNums();
     }
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 2e7d370..ad9a021 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -672,7 +672,7 @@ void SwXMLImport::startDocument()
     pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); // #i52858# - method name changed
 
     // SJ: #i49801# locking the modell to disable repaints
-    SdrModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+    SwDrawModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
     if ( pDrawModel )
         pDrawModel->setLock(true);
 
@@ -872,7 +872,7 @@ void SwXMLImport::endDocument( void )
                 pDoc->PrtOLENotify( true );
         }
 
-        SdrModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+        SwDrawModel* pDrawModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
         if ( pDrawModel )
             pDrawModel->setLock(false);
     }
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index bffe055..b2998a1 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -71,6 +71,7 @@
 #include <IDocumentUndoRedo.hxx>
 #include <IDocumentSettingAccess.hxx>
 #include <IDocumentDeviceAccess.hxx>
+#include <IDocumentDrawModelAccess.hxx>
 #include <docstat.hxx>
 #include <pagedesc.hxx>
 #include <pview.hxx>
@@ -281,7 +282,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
     }
 
     UpdateFontList();
-    InitDraw();
+    InitDrawModelAndDocShell(this, mpDoc ? mpDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
 
     delete pRdr;
 
diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx
index f24a98d..2fcfac1 100644
--- a/sw/source/uibase/app/docshdrw.cxx
+++ b/sw/source/uibase/app/docshdrw.cxx
@@ -33,25 +33,59 @@
 using namespace ::com::sun::star;
 
 // Load Document
-void  SwDocShell::InitDraw()
+void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocument)
 {
-    SdrModel *pDrDoc = mpDoc->getIDocumentDrawModelAccess().GetDrawModel();
-    if( pDrDoc )
+    if(pSwDrawDocument)
     {
-        // create Lists and Tables DocShell's ItemSet
-        PutItem( SvxGradientListItem( pDrDoc->GetGradientList(), SID_GRADIENT_LIST ) );
-        PutItem( SvxHatchListItem( pDrDoc->GetHatchList(), SID_HATCH_LIST ) );
-        PutItem( SvxBitmapListItem( pDrDoc->GetBitmapList(), SID_BITMAP_LIST ) );
-        PutItem( SvxDashListItem( pDrDoc->GetDashList(), SID_DASH_LIST ) );
-        PutItem( SvxLineEndListItem( pDrDoc->GetLineEndList(), SID_LINEEND_LIST ) );
-        PutItem( SvxColorListItem( pDrDoc->GetColorList(), SID_COLOR_TABLE ));
-
-        Outliner& rOutliner = pDrDoc->GetDrawOutliner();
-        uno::Reference<linguistic2::XHyphenator> xHyphenator( ::GetHyphenator() );
-        rOutliner.SetHyphenator( xHyphenator );
+        if(pSwDocShell == pSwDrawDocument->GetObjectShell())
+        {
+            // association already done, nothing to do
+        }
+        else
+        {
+            // set object shell (mainly for FormControl stuff), maybe zero
+            pSwDrawDocument->SetObjectShell(pSwDocShell);
+
+            // set persist, maybe zero
+            pSwDrawDocument->SetPersist(pSwDocShell);
+
+            // get and decide on the color table to use
+            if(pSwDocShell)
+            {
+                const SvxColorListItem* pColItemFromDocShell = static_cast< const SvxColorListItem* >(pSwDocShell->GetItem(SID_COLOR_TABLE));
+
+                if(pColItemFromDocShell)
+                {
+                    // the DocShell has a ColorTable, use it also in DrawingLayer
+                    XColorListRef xCol(pColItemFromDocShell->GetColorList());
+                    pSwDrawDocument->SetPropertyList(static_cast<XPropertyList*>(xCol.get()));
+                }
+                else
+                {
+                    // Use the ColorTable which is used at the DrawingLayer's SdrModel
+                    pSwDocShell->PutItem(SvxColorListItem(pSwDrawDocument->GetColorList(), SID_COLOR_TABLE));
+                }
+
+                // add other tables in SfxItemSet of the DocShell
+                pSwDocShell->PutItem(SvxGradientListItem(pSwDrawDocument->GetGradientList(), SID_GRADIENT_LIST));
+                pSwDocShell->PutItem(SvxHatchListItem(pSwDrawDocument->GetHatchList(), SID_HATCH_LIST));
+                pSwDocShell->PutItem(SvxBitmapListItem(pSwDrawDocument->GetBitmapList(), SID_BITMAP_LIST));
+                pSwDocShell->PutItem(SvxDashListItem(pSwDrawDocument->GetDashList(), SID_DASH_LIST));
+                pSwDocShell->PutItem(SvxLineEndListItem(pSwDrawDocument->GetLineEndList(), SID_LINEEND_LIST));
+            }
+
+            // init hyphenator for DrawingLayer outliner
+            uno::Reference<linguistic2::XHyphenator> xHyphenator(::GetHyphenator());
+            Outliner& rOutliner = pSwDrawDocument->GetDrawOutliner();
+
+            rOutliner.SetHyphenator(xHyphenator);
+        }
+    }
+    else if(pSwDocShell)
+    {
+        // fallback: add the default color list to have one when someone requests it from the DocShell
+        pSwDocShell->PutItem(SvxColorListItem(XColorList::GetStdColorList(), SID_COLOR_TABLE));
     }
-    else
-        PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index bc5b40a..719282e 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -61,6 +61,7 @@
 #include <doc.hxx>
 #include <IDocumentSettingAccess.hxx>
 #include <IDocumentDeviceAccess.hxx>
+#include <IDocumentDrawModelAccess.hxx>
 #include <docfac.hxx>
 #include <docstyle.hxx>
 #include <shellio.hxx>
@@ -549,7 +550,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
         }
 
         UpdateFontList();
-        InitDraw();
+        InitDrawModelAndDocShell(this, mpDoc ? mpDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
 
         SetError( nErr, OUString( OSL_LOG_PREFIX ) );
         bRet = !IsError( nErr );
@@ -615,7 +616,7 @@ void SwDocShell::SubInitNew()
     OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
     mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
     UpdateFontList();
-    InitDraw();
+    InitDrawModelAndDocShell(this, mpDoc ? mpDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
 
     mpDoc->getIDocumentSettingAccess().setLinkUpdateMode( GLOBALSETTING );
     mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index b95e8e6..0fe7bae 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -47,11 +47,8 @@
 #include <SwRewriter.hxx>
 #include <numrule.hxx>
 #include <swundo.hxx>
-
-//UUUU
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
-
 #include "view.hxx"
 #include "wrtsh.hxx"
 #include "docsh.hxx"
@@ -77,7 +74,6 @@
 #include "swevent.hxx"
 #include "edtwin.hxx"
 #include "unochart.hxx"
-
 #include "app.hrc"
 #include "swabstdlg.hxx"
 
@@ -754,7 +750,7 @@ sal_uInt16 SwDocShell::Edit(
         //UUUU create needed items for XPropertyList entries from the DrawModel so that
         // the Area TabPage can access them
         SfxItemSet& rSet = xTmp->GetItemSet();
-        const SdrModel* pDrawModel = GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+        const SwDrawModel* pDrawModel = GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
 
         rSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
         rSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index ecc667f..146022b 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -56,12 +56,11 @@
 #include <svx/svxids.hrc>
 #include <svx/xdef.hxx>
 #include <SwRewriter.hxx>
-
-//UUUU
 #include <svx/xfillit0.hxx>
 #include <svx/xflftrit.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
+#include <drawdoc.hxx>
 
 // The Format names in the list of all names have the
 // following family as their first character:
@@ -1201,7 +1200,7 @@ SfxItemSet&   SwDocStyleSheet::GetItemSet()
 
                     //UUUU create needed items for XPropertyList entries from the DrawModel so that
                     // the Area TabPage can access them
-                    const SdrModel* pDrawModel = rDoc.getIDocumentDrawModelAccess().GetDrawModel();
+                    const SwDrawModel* pDrawModel = rDoc.getIDocumentDrawModelAccess().GetDrawModel();
 
                     aCoreSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
                     aCoreSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 9875627..0e80123 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -44,6 +44,7 @@
 #include <IDocumentDrawModelAccess.hxx>
 #include <docary.hxx>
 #include <edtwin.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 3be5529..3efcc94 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -50,7 +50,6 @@
 #include <svx/svdogrp.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/svditer.hxx>
-
 #include <shells.hrc>
 #define SwDrawBaseShell
 #include <sfx2/msg.hxx>
@@ -63,7 +62,6 @@
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
 #include <com/sun/star/text/RelOrientation.hpp>
-
 #include <IDocumentDrawModelAccess.hxx>
 #include <boost/scoped_ptr.hpp>
 
@@ -609,7 +607,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
     else
     {
         nRet = 1;
-        SdrModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
+        SwDrawModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
         SdrObjListIter aIter( *(pModel->GetPage(0)), IM_DEEPWITHGROUPS );
         while( aIter.IsMore() )
         {
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index da54124..e58e37b6 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -445,7 +445,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
 
                 //UUUU create needed items for XPropertyList entries from the DrawModel so that
                 // the Area TabPage can access them
-                const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                const SwDrawModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
 
                 aSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
                 aSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index ed018dc..0b17b54 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -26,7 +26,6 @@
 #include <svl/urihelper.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/dispatch.hxx>
-
 #include <sfx2/objface.hxx>
 #include <editeng/sizeitem.hxx>
 #include <editeng/protitem.hxx>
@@ -73,12 +72,10 @@
 #include <doc.hxx>
 #include <docsh.hxx>
 #include <svx/drawitem.hxx>
-
 #define SwGrfShell
 
 #include <sfx2/msg.hxx>
 #include "swslots.hxx"
-
 #include "swabstdlg.hxx"
 #include <boost/scoped_ptr.hpp>
 
@@ -241,7 +238,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
 
             //UUUU create needed items for XPropertyList entries from the DrawModel so that
             // the Area TabPage can access them
-            const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+            const SwDrawModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
 
             aSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
             aSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 3bb5a63..76025c2 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -81,7 +81,6 @@
 #include <edtwin.hxx>
 #include <redlndlg.hxx>
 #include "fldmgr.hxx"
-
 #include <globals.hrc>
 #include <shells.hrc>
 #include <app.hrc>
@@ -91,15 +90,12 @@
 #include <vcl/svapp.hxx>
 #include <sfx2/app.hxx>
 #include <breakit.hxx>
-
 #include <SwSmartTagMgr.hxx>
-
 #include <editeng/acorrcfg.hxx>
 #include "swabstdlg.hxx"
 #include "misc.hrc"
 #include "chrdlg.hrc"
 #include <IDocumentStatistics.hxx>
-
 #include <sfx2/sfxdlg.hxx>
 #include <unotools/lingucfg.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -120,10 +116,8 @@
 #include <svx/nbdtmgfact.hxx>
 #include <svx/nbdtmg.hxx>
 
-//UUUU
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
-
 #include <numrule.hxx>
 #include <boost/scoped_ptr.hpp>
 
@@ -930,7 +924,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
             //UUUU create needed items for XPropertyList entries from the DrawModel so that
             // the Area TabPage can access them
             // Do this after GetCurAttr, this resets the ItemSet content again
-            const SdrModel* pDrawModel = GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+            const SwDrawModel* pDrawModel = GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
 
             aCoreSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE));
             aCoreSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST));
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 37060cc..1d0db01 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1633,8 +1633,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
                     // regarded while switching from readonly-mode to edit-mode
                     if( !bReadonly )
                     {
-                        SwDrawDocument * pDrawDoc = 0;
-                        if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) ) )
+                        SwDrawModel * pDrawDoc = GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                        if (pDrawDoc)
                         {
                             if( !pDrawDoc->GetOpenInDesignMode() )
                                 break;// don't touch the design mode
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index b61eb77..9ceee45 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1918,7 +1918,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
         break;
         case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
         {
-            SwDrawDocument * pDrawDoc;
+            SwDrawModel * pDrawDoc;
             bool bAuto = *(sal_Bool*) aValue.getValue();
 
             if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
@@ -1938,7 +1938,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
         break;
         case WID_DOC_APPLY_FORM_DESIGN_MODE:
         {
-            SwDrawDocument * pDrawDoc;
+            SwDrawModel * pDrawDoc;
             bool bMode = *(sal_Bool*)aValue.getValue();
 
             if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
@@ -2088,7 +2088,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
         break;
         case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
         {
-            SwDrawDocument * pDrawDoc;
+            SwDrawModel * pDrawDoc;
             bool bAuto;
             if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
                 bAuto = pDrawDoc->GetAutoControlFocus();
@@ -2099,7 +2099,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
         break;
         case WID_DOC_APPLY_FORM_DESIGN_MODE:
         {
-            SwDrawDocument * pDrawDoc;
+            SwDrawModel * pDrawDoc;
             bool bMode;
             if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
                 bMode = pDrawDoc->GetOpenInDesignMode();
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index faf3371..c69eea0 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -413,7 +413,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
         {
             sTypeToken = OUString();
             nMemberCount = 0;
-            SdrModel* pModel = pWrtShell->getIDocumentDrawModelAccess()->GetDrawModel();
+            SwDrawModel* pModel = pWrtShell->getIDocumentDrawModelAccess()->GetDrawModel();
             if(pModel)
             {
                 SdrPage* pPage = pModel->GetPage(0);
@@ -741,7 +741,7 @@ void    SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
                 pMember->DeleteAndDestroyAll();
 
             IDocumentDrawModelAccess* pIDDMA = pWrtShell->getIDocumentDrawModelAccess();
-            SdrModel* pModel = pIDDMA->GetDrawModel();
+            SwDrawModel* pModel = pIDDMA->GetDrawModel();
             if(pModel)
             {
                 SdrPage* pPage = pModel->GetPage(0);
@@ -871,7 +871,7 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
                 SdrView* pDrawView = pActiveShell->GetDrawView();
                 if (pDrawView)
                 {
-                    SdrModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                    SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
                     SdrPage* pPage = pDrawModel->GetPage(0);
                     const sal_uInt32 nCount = pPage->GetObjCount();
                     for( sal_uInt32 i=0; i< nCount; i++ )
@@ -964,7 +964,7 @@ OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
                 SdrView* pDrawView = pActiveShell->GetDrawView();
                 if (pDrawView)
                 {
-                    SdrModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                    SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
                     SdrPage* pPage = pDrawModel->GetPage(0);
                     sal_uInt32 nCount = pPage->GetObjCount();
                     for( sal_uInt32 i=0; i< nCount; i++ )
@@ -1408,7 +1408,7 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
             SdrView* pDrawView = pActiveShell->GetDrawView();
             if (pDrawView)
             {
-                SdrModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
                 SdrPage* pPage = pDrawModel->GetPage(0);
                 sal_uInt32 nCount = pPage->GetObjCount();
 
@@ -2677,7 +2677,7 @@ void  SwContentTree::KeyInput(const KeyEvent& rEvent)
                         {
                             pDrawView->SdrEndTextEdit();//Change from "EndTextEdit" to "SdrEndTextEdit" for acc migration
 
-                            SdrModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
+                            SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
                             SdrPage* pPage = pDrawModel->GetPage(0);
                             sal_uInt32 nCount = pPage->GetObjCount();
                             bool hasObjectMarked = false;
@@ -3352,7 +3352,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
             {
                 pDrawView->SdrEndTextEdit();
                 pDrawView->UnmarkAll();
-                SdrModel* _pModel = pActiveShell->getIDocumentDrawModelAccess()->GetDrawModel();
+                SwDrawModel* _pModel = pActiveShell->getIDocumentDrawModelAccess()->GetDrawModel();
                 SdrPage* pPage = _pModel->GetPage(0);
                 sal_uInt32 nCount = pPage->GetObjCount();
                 for( sal_uInt32 i=0; i< nCount; i++ )
commit c3f70303cf3725cfd64d3b07c0e7e895f8ac629d
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Jun 3 16:43:56 2014 +0000

    Related: #i124638# Corrected paints of Writer Frames...
    
    with DrawingLayer FillAttributes for all systems and AA/nonAA
    
    (cherry picked from commit fcc24448899577e220db70f265bad59f0ffa8428)
    
    Change-Id: I1b3d66061132d1d276080f99e94c421b429de936

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index f51680c..3678af7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1838,12 +1838,9 @@ bool DrawFillAttributes(
 
     if(bUseNew && rFillAttributes.get() && rFillAttributes->isUsed())
     {
-        //UUUU Need to substract a half logical pixel unit from TopLeft to get the correct
-        // layering for AAed paints
-        const basegfx::B2DVector aHalfSingleUnit(rOut.GetInverseViewTransformation() * basegfx::B2DVector(0.5, 0.5));
-        const basegfx::B2DRange aPaintRange(
-            rPaintRect.Left() - aHalfSingleUnit.getX(),
-            rPaintRect.Top() - aHalfSingleUnit.getY(),
+        basegfx::B2DRange aPaintRange(
+            rPaintRect.Left(),
+            rPaintRect.Top(),
             rPaintRect.Right(),
             rPaintRect.Bottom());
 
@@ -1851,6 +1848,14 @@ bool DrawFillAttributes(
             !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
             !basegfx::fTools::equalZero(aPaintRange.getHeight()))
         {
+            //UUUU need to expand for correct AAed and non-AAed visualization as primitive; move
+            // bounds to half-(logical)pixel bounds and add a width/height of one pixel that is missing
+            // from SwRect/Rectangle integer handling
+            const basegfx::B2DVector aSingleUnit(rOut.GetInverseViewTransformation() * basegfx::B2DVector(0.5, 0.5));
+
+            aPaintRange.expand(aPaintRange.getMinimum() - (aSingleUnit * 0.5));
+            aPaintRange.expand(aPaintRange.getMaximum() + (aSingleUnit * 1.5));
+
             const basegfx::B2DRange aDefineRange(
                 rOriginalLayoutRect.Left(),
                 rOriginalLayoutRect.Top(),
commit c7853b5b5cb71899b6b60fd2175763785b8afb7f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 20 12:42:59 2014 +0100

    hook up new drawing support to .uis
    
    Change-Id: Id441a91e86b89bf8fe6bfd778ca09e732e054103

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 124c909..5ed7198 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/backgroundpage \
 	cui/uiconfig/ui/baselinksdialog \
 	cui/uiconfig/ui/bitmaptabpage \
+	cui/uiconfig/ui/borderareatransparencydialog \
 	cui/uiconfig/ui/borderbackgrounddialog \
 	cui/uiconfig/ui/borderpage \
 	cui/uiconfig/ui/breaknumberoption \
diff --git a/cui/uiconfig/ui/borderareatransparencydialog.ui b/cui/uiconfig/ui/borderareatransparencydialog.ui
new file mode 100644
index 0000000..69d1f85
--- /dev/null
+++ b/cui/uiconfig/ui/borderareatransparencydialog.ui
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkDialog" id="BorderAreaTransparencyDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Border / Background</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="reset">
+                <property name="label">gtk-revert-to-saved</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkNotebook" id="tabcontrol">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="borders">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Borders</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="area">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Area</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="transparence">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Transparency</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">reset</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/paradialog.ui b/sw/uiconfig/swriter/ui/paradialog.ui
index 6c4baf7..09ede3d 100644
--- a/sw/uiconfig/swriter/ui/paradialog.ui
+++ b/sw/uiconfig/swriter/ui/paradialog.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="ParagraphPropertiesDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -204,16 +205,30 @@
               <placeholder/>
             </child>
             <child type="tab">
-              <object class="GtkLabel" id="labelTP_BACKGROUND">
+              <object class="GtkLabel" id="area">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Background</property>
+                <property name="label" translatable="yes">Area</property>
               </object>
               <packing>
                 <property name="position">8</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="transparence">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Transparency</property>
+              </object>
+              <packing>
+                <property name="position">9</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/sw/uiconfig/swriter/ui/templatedialog2.ui b/sw/uiconfig/swriter/ui/templatedialog2.ui
index d376ffd..65cedac 100644
--- a/sw/uiconfig/swriter/ui/templatedialog2.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog2.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="TemplateDialog2">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -288,10 +289,10 @@
               <placeholder/>
             </child>
             <child type="tab">
-              <object class="GtkLabel" id="background">
+              <object class="GtkLabel" id="area">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Background</property>
+                <property name="label" translatable="yes">Area</property>
               </object>
               <packing>
                 <property name="position">12</property>
@@ -302,13 +303,27 @@
               <placeholder/>
             </child>
             <child type="tab">
+              <object class="GtkLabel" id="transparence">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Transparency</property>
+              </object>
+              <packing>
+                <property name="position">13</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
               <object class="GtkLabel" id="borders">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Borders</property>
               </object>
               <packing>
-                <property name="position">13</property>
+                <property name="position">14</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -322,7 +337,7 @@
                 <property name="label" translatable="yes">Condition</property>
               </object>
               <packing>
-                <property name="position">14</property>
+                <property name="position">15</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
diff --git a/sw/uiconfig/swriter/ui/templatedialog8.ui b/sw/uiconfig/swriter/ui/templatedialog8.ui
index 9ae5942..31e457b 100644
--- a/sw/uiconfig/swriter/ui/templatedialog8.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog8.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="TemplateDialog8">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -134,10 +135,10 @@
               <placeholder/>
             </child>
             <child type="tab">
-              <object class="GtkLabel" id="background">
+              <object class="GtkLabel" id="area">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Background</property>
+                <property name="label" translatable="yes">Area</property>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -148,13 +149,27 @@
               <placeholder/>
             </child>
             <child type="tab">
+              <object class="GtkLabel" id="transparence">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Transparency</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
               <object class="GtkLabel" id="header">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Header</property>
               </object>
               <packing>
-                <property name="position">3</property>
+                <property name="position">4</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -168,7 +183,7 @@
                 <property name="label" translatable="yes">Footer</property>
               </object>
               <packing>
-                <property name="position">4</property>
+                <property name="position">5</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -182,7 +197,7 @@
                 <property name="label" translatable="yes">Borders</property>
               </object>
               <packing>
-                <property name="position">5</property>
+                <property name="position">6</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -196,7 +211,7 @@
                 <property name="label" translatable="yes">Columns</property>
               </object>
               <packing>
-                <property name="position">6</property>
+                <property name="position">7</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -210,7 +225,7 @@
                 <property name="label" translatable="yes">Footnote</property>
               </object>
               <packing>
-                <property name="position">7</property>
+                <property name="position">8</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -224,7 +239,7 @@
                 <property name="label" translatable="yes">Text Grid</property>
               </object>
               <packing>
-                <property name="position">8</property>
+                <property name="position">9</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
commit 7d9bb549d498d6beed2c4050c402d09643febdfa
Author: Armin Le Grand <alg at apache.org>
Date:   Mon Jun 2 15:00:50 2014 +0000

    Related: #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
    
    (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)
    
    Conflicts:
    	cui/source/factory/dlgfact.cxx
    	cui/source/factory/dlgfact.hxx
    	cui/source/inc/bbdlg.hxx
    	cui/source/inc/cuires.hrc
    	cui/source/tabpages/bbdlg.cxx
    	cui/source/tabpages/bbdlg.src
    	cui/source/tabpages/page.cxx
    	cui/source/tabpages/tparea.cxx
    	include/svx/pagectrl.hxx
    	include/svx/svxdlg.hxx
    	include/svx/svxids.hrc
    	include/xmloff/PageMasterStyleMap.hxx
    	include/xmloff/prstylei.hxx
    	include/xmloff/txtprmap.hxx
    	svx/Package_inc.mk
    	svx/inc/svx/hdft.hxx
    	svx/source/dialog/hdft.cxx
    	svx/source/dialog/pagectrl.cxx
    	svx/source/tbxctrls/tbxcolorupdate.cxx
    	svx/source/unodraw/unobrushitemhelper.cxx
    	sw/Library_sw.mk
    	sw/inc/fillattributes.hxx
    	sw/inc/format.hxx
    	sw/inc/frmatr.hxx
    	sw/inc/frmfmt.hxx
    	sw/inc/hintids.hxx
    	sw/inc/hints.hxx
    	sw/inc/ndtxt.hxx
    	sw/inc/node.hxx
    	sw/inc/swunohelper.hxx
    	sw/inc/unobrushitemhelper.hxx
    	sw/inc/unoprnms.hxx
    	sw/source/core/attr/format.cxx
    	sw/source/core/attr/hints.cxx
    	sw/source/core/doc/docdesc.cxx
    	sw/source/core/doc/docdraw.cxx
    	sw/source/core/doc/docfmt.cxx
    	sw/source/core/doc/docnew.cxx
    	sw/source/core/doc/docredln.cxx
    	sw/source/core/doc/poolfmt.cxx
    	sw/source/core/doc/visiturl.cxx
    	sw/source/core/docnode/node.cxx
    	sw/source/core/inc/frame.hxx
    	sw/source/core/inc/frmtool.hxx
    	sw/source/core/inc/rolbck.hxx
    	sw/source/core/layout/atrfrm.cxx
    	sw/source/core/layout/fillattributes.cxx
    	sw/source/core/layout/findfrm.cxx
    	sw/source/core/layout/paintfrm.cxx
    	sw/source/core/txtnode/ndtxt.cxx
    	sw/source/core/txtnode/thints.cxx
    	sw/source/core/txtnode/txtedt.cxx
    	sw/source/core/undo/rolbck.cxx
    	sw/source/core/unocore/swunohelper.cxx
    	sw/source/core/unocore/unoframe.cxx
    	sw/source/core/unocore/unomap.cxx
    	sw/source/core/unocore/unoparagraph.cxx
    	sw/source/core/unocore/unoprnms.cxx
    	sw/source/core/unocore/unostyle.cxx
    	sw/source/ui/chrdlg/paradlg.src
    	sw/source/ui/chrdlg/pardlg.cxx
    	sw/source/ui/fmtui/tmpdlg.cxx
    	sw/source/ui/fmtui/tmpdlg.src
    	sw/source/uibase/app/docst.cxx
    	sw/source/uibase/app/docstyle.cxx
    	sw/source/uibase/frmdlg/colex.cxx
    	sw/source/uibase/shells/basesh.cxx
    	sw/source/uibase/shells/textsh1.cxx
    	sw/source/uibase/uiview/viewstat.cxx
    	sw/source/uibase/utlui/uitool.cxx
    	xmloff/inc/PageMasterImportContext.hxx
    	xmloff/inc/xmloff/XMLShapeStyleContext.hxx
    	xmloff/source/draw/XMLShapeStyleContext.cxx
    	xmloff/source/draw/sdpropls.hxx
    	xmloff/source/style/PageMasterExportPropMapper.cxx
    	xmloff/source/style/PageMasterImportContext.cxx
    	xmloff/source/style/PageMasterPropHdlFactory.cxx
    	xmloff/source/style/PageMasterStyleMap.cxx
    	xmloff/source/style/prstylei.cxx
    	xmloff/source/text/txtexppr.cxx
    	xmloff/source/text/txtprhdl.cxx
    	xmloff/source/text/txtprmap.cxx
    	xmloff/source/text/txtstyli.cxx
    
    Conflicts:
    	svx/source/dialog/hdft.cxx
    	sw/source/core/doc/visiturl.cxx
    	sw/source/core/txtnode/thints.cxx
    	sw/source/core/txtnode/txtatr2.cxx
    	sw/source/core/unocore/unostyle.cxx
    
    Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 55d20b3c..523c641 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1309,12 +1309,20 @@ AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchS
     return NULL;
 }
 
-SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent,
-                                            const SfxItemSet& rCoreSet,
-                                            bool bEnableSelector)
-{
-    SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector);
-    return new CuiAbstractTabDialog_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 CuiAbstractTabDialog_Impl(pDlg);
 }
 
 AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1cf6b4c..df9a087 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -571,9 +571,13 @@ public:
    virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ) SAL_OVERRIDE;
    virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent,
                                             const SfxItemSet& rCoreSet) SAL_OVERRIDE;
-   virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent,
-                                            const SfxItemSet& rCoreSet,
-                                            bool bEnableSelector = false) SAL_OVERRIDE ;
+   //UUUU add for SvxBorderBackgroundDlg
+   virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg(
+       Window* pParent,
+       const SfxItemSet& rCoreSet,
+       bool bEnableSelector = false,
+       bool bEnableDrawingLayerFillStyles = false) SAL_OVERRIDE;
+
    virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent,
                                                                 const SfxItemSet* pAttr,
                                                                 const SdrView* pView,
diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx
index c4393bd..f5fc9d2 100644
--- a/cui/source/inc/bbdlg.hxx
+++ b/cui/source/inc/bbdlg.hxx
@@ -28,17 +28,22 @@
 class SvxBorderBackgroundDlg: public SfxTabDialog
 {
 public:
-    SvxBorderBackgroundDlg(Window *pParent, const SfxItemSet& rCoreSet,
-        bool bEnableSelector = false);
+    SvxBorderBackgroundDlg(Window *pParent,
+        const SfxItemSet& rCoreSet,
+        bool bEnableSelector = false,
+        bool bEnableDrawingLayerFillStyles = false);
 protected:
     virtual void    PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) SAL_OVERRIDE;
 
 private:
-    bool m_bEnableBackgroundSelector; ///< for Border/Background
+    /// bitfield
+    bool        mbEnableBackgroundSelector : 1;         ///< for Border/Background
+    bool        mbEnableDrawingLayerFillStyles : 1;     ///< for full DrawingLayer FillStyles
     sal_uInt16  m_nBackgroundPageId;
+    sal_uInt16  m_nAreaPageId;
+    sal_uInt16  m_nTransparencePageId;
 };
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index a64ca32..dcbdc21 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -64,7 +64,7 @@
         <SvxLRSpaceItem>:       <SID_ATTR_LRSPACE>
 */
 
-struct  SvxPage_Impl;
+//UUUU struct   SvxPage_Impl;
 typedef sal_uInt16 MarginPosition;
 
 class SvxPageDescPage : public SfxTabPage
@@ -72,6 +72,7 @@ class SvxPageDescPage : public SfxTabPage
     using TabPage::ActivatePage;
     using TabPage::DeactivatePage;
 
+private:
     // paper format
     ListBox*             m_pPaperSizeBox;
 
@@ -137,7 +138,14 @@ class SvxPageDescPage : public SfxTabPage
     Paper               ePaperStart;
     Paper               ePaperEnd;
 
-    SvxPage_Impl*       pImpl;
+    //UUUU SvxPage_Impl*        pImpl;
+    MarginPosition      m_nPos;
+    Printer*            mpDefPrinter;
+
+    bool                mbDelPrinter : 1;
+
+    //UUUU

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list