summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorChristian Lippka ORACLE <christian.lippka@oracle.com>2011-03-10 14:21:52 +0100
committerChristian Lippka ORACLE <christian.lippka@oracle.com>2011-03-10 14:21:52 +0100
commit545fe253b4913ea9411b54566afd5c858a20517b (patch)
treefbfc9dbf5f77abe62188d6f411d20d434c97fb02 /svx
parent7bd8816087332807a2320b9e7711fdda751bf204 (diff)
impress210: #i117133# put new drawing layer fill and stroke styles in pool only for newly created documents
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdmodel.hxx1
-rw-r--r--svx/source/svdraw/svdmodel.cxx16
-rw-r--r--svx/source/xoutdev/xpool.cxx4
3 files changed, 19 insertions, 2 deletions
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index a32147a3032f..3c112bc57700 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -742,6 +742,7 @@ public:
also during the runtime of the Undo() and Redo() methods. */
bool IsUndoEnabled() const;
+ void SetDrawingLayerPoolDefaults();
};
typedef tools::WeakReference< SdrModel > SdrModelWeakRef;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 5328e5f1a3d1..eeefc7223b77 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -69,6 +69,9 @@
#include "svx/svdstr.hrc" // Objektname
#include "svdoutlinercache.hxx"
+#include "svx/xflclit.hxx"
+#include "svx/xflhtit.hxx"
+#include "svx/xlnclit.hxx"
#include <svl/asiancfg.hxx>
#include "editeng/fontitem.hxx"
@@ -210,6 +213,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
pItemPool->SetPoolDefaultItem( SdrTextWordWrapItem( sal_False ) );
SetTextDefaults();
+
pLayerAdmin=new SdrLayerAdmin;
pLayerAdmin->SetModel(this);
ImpSetUIUnit();
@@ -2167,6 +2171,18 @@ const ::com::sun::star::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImpleme
return *pSeq;
}
+void SdrModel::SetDrawingLayerPoolDefaults()
+{
+ const String aNullStr;
+ const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE);
+ const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING);
+ const XHatch aNullHatch(aNullLineCol);
+
+ pItemPool->SetPoolDefaultItem( XFillColorItem(aNullStr,aNullFillCol) );
+ pItemPool->SetPoolDefaultItem( XFillHatchItem(pItemPool,aNullHatch) );
+ pItemPool->SetPoolDefaultItem( XLineColorItem(aNullStr,aNullLineCol) );
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
TYPEINIT1(SdrHint,SfxHint);
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index 305b181a65a2..a86baef14810 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -52,8 +52,8 @@ XOutdevItemPool::XOutdevItemPool(
const XubString aNullStr;
const Bitmap aNullBmp;
const basegfx::B2DPolyPolygon aNullPol;
- const Color aNullLineCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE));
- const Color aNullFillCol(RGB_Color(COL_DEFAULT_SHAPE_FILLING));
+ const Color aNullLineCol(RGB_Color(COL_BLACK));
+ const Color aNullFillCol(RGB_COLORDATA( 153, 204, 255 ));
const Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
const XDash aNullDash;
const XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE));