diff options
author | Armin Le Grand <alg@apache.org> | 2012-12-10 13:34:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-06 21:04:07 +0100 |
commit | c0eb5e7772c848806db8ab461f77f9549c1d8b2b (patch) | |
tree | 076a49189c0a7d0abd3ff4025f1718dfba2d4ecf | |
parent | ed1a26565898a6461503468b1fba008328019055 (diff) |
Resolves: #i121448# Aligned default fill color/line style for all apps
(cherry picked from commit 81664c037c8d6094b66c1660b6eee9693eadf401)
Conflicts:
sc/inc/document.hxx
sc/source/core/data/documen2.cxx
sc/source/core/data/documen3.cxx
sc/source/core/data/documen9.cxx
svx/inc/svx/svdmodel.hxx
svx/source/svdraw/svdmodel.cxx
sw/inc/doc.hxx
sw/source/core/doc/docdraw.cxx
sw/source/core/doc/docnew.cxx
sw/source/ui/app/docshini.cxx
Change-Id: Id0f62f0cd5b83794e2dbaee4e8b6afa704a0c23a
-rw-r--r-- | include/svx/svdmodel.hxx | 2 | ||||
-rw-r--r-- | sc/inc/document.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/documen3.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/documen9.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 12 | ||||
-rw-r--r-- | svx/source/xoutdev/xpool.cxx | 6 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 7 | ||||
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/app/docshini.cxx | 2 |
13 files changed, 9 insertions, 70 deletions
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index d57c992f3ace..3a078bffa5c0 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -679,8 +679,6 @@ public: This returns false if undo was disabled using EnableUndo( false ) and also during the runtime of the Undo() and Redo() methods. */ bool IsUndoEnabled() const; - - void SetDrawingLayerPoolDefaults(); }; typedef tools::WeakReference< SdrModel > SdrModelWeakRef; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 2b7490eb6e21..11a18e9ba24e 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -394,7 +394,6 @@ private: sal_uInt8 nAsianCompression; sal_uInt8 nAsianKerning; - bool bSetDrawDefaults; bool bPastingDrawFromOtherDoc; @@ -457,8 +456,6 @@ public: SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const; void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl ); - void SetDrawDefaults(); - void SetConsolidateDlgData( const ScConsolidateParam* pData ); const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData; } @@ -2001,7 +1998,6 @@ private: // CLOOK-Impl-methods void UpdateDrawPrinter(); void UpdateDrawLanguages(); - void UpdateDrawDefaults(); SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc ); void LoadDdeLinks(SvStream& rStream); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 1d63dd93a64d..bc9a5af324d8 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -197,7 +197,6 @@ ScDocument::ScDocument( ScDocumentMode eMode, nVisSpellState( 0 ), nAsianCompression(SC_ASIANCOMPRESSION_INVALID), nAsianKerning(SC_ASIANKERNING_INVALID), - bSetDrawDefaults( false ), bPastingDrawFromOtherDoc( false ), nInDdeLinkUpdate( 0 ), bInUnoBroadcast( false ), diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 1b64286481a8..3c20d736dd7c 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1889,12 +1889,6 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy UpdateDrawLanguages(); // set edit engine defaults in drawing layer pool } -void ScDocument::SetDrawDefaults() -{ - bSetDrawDefaults = true; - UpdateDrawDefaults(); -} - Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero ) const { if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab]) diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 50195aee77f4..d0813798ca03 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -157,7 +157,11 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) pDrawLayer->SetDefaultTabulator( GetDocOptions().GetTabDistance() ); UpdateDrawPrinter(); - UpdateDrawDefaults(); + + // set draw defaults directly + SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); + rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); + UpdateDrawLanguages(); if (bImportingXML) pDrawLayer->EnableAdjust(false); @@ -179,18 +183,6 @@ void ScDocument::UpdateDrawLanguages() } } -void ScDocument::UpdateDrawDefaults() -{ - // drawing layer defaults that are set for new documents (if InitNew was called) - - if ( pDrawLayer && bSetDrawDefaults ) - { - SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); - rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); - pDrawLayer->SetDrawingLayerPoolDefaults(); - } -} - void ScDocument::UpdateDrawPrinter() { if (pDrawLayer) diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 7f5ea07aa1e0..f206a9d6dd0c 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -53,8 +53,6 @@ sal_Bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) SetVisAreaOrSize( Rectangle( Point(), aSize ), sal_True ); } - aDocument.SetDrawDefaults(); // drawing layer defaults that are set only in InitNew - // InitOptions sets the document languages, must be called before CreateStandardStyles InitOptions(false); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 9c998a33a4d7..d3ee52777348 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -252,7 +252,6 @@ sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::s if (bRet) { - mpDoc->SetDrawingLayerPoolDefaults(); if( !mbSdDataObj ) mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling // NewOrLoadCompleted(NEW_LOADED) in diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index a184de70556b..f62bd32250a4 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -2072,18 +2072,6 @@ const ::com::sun::star::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImpleme return theSdrModelUnoTunnelImplementationId::get().getSeq(); } -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 677c2b8d9c2e..f36ffd68a369 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -41,11 +41,11 @@ XOutdevItemPool::XOutdevItemPool( const XubString aNullStr; const Graphic aNullGraphic; const basegfx::B2DPolyPolygon aNullPol; - const Color aNullLineCol(RGB_Color(COL_BLACK)); - const Color aNullFillCol(RGB_COLORDATA( 153, 204, 255 )); + const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color + const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color const Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY)); const XDash aNullDash; - const XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE)); + const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE)); const XHatch aNullHatch(aNullLineCol); // get master pointer, evtl. add myself to the end of the pools diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index c41615b15b75..ee667453cabe 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -595,8 +595,6 @@ private: bool mbStartIdleTimer; ///< idle timer mode start/stop - bool mbSetDrawDefaults; ///< set draw pool defaults for freshly created documents - static SwAutoCompleteWord *mpACmpltWords; ///< List of all words for AutoComplete //---------------- private methods ------------------------------ @@ -2080,12 +2078,7 @@ public: */ void dumpAsXml( xmlTextWriterPtr writer = NULL ); - /// must be called only in SwDocShell::InitNew, causes UpdateDrawDefaults to be called when drawing layer is created - void SetDrawDefaults(); - private: - /// method to set new graphics pool defaults, must only be called by SetDrawDefaults! - void UpdateDrawDefaults(); /// Copies master header to left / first one, if necessary - used by ChgPageDesc(). void CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, SwPageDesc *pDesc, bool bLeft); /// Copies master footer to left / first one, if necessary - used by ChgPageDesc(). diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 7419baf66bd7..4ee34a69b3a6 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -627,8 +627,6 @@ void SwDoc::InitDrawModel() pViewSh = (ViewShell*)pViewSh->GetNext(); }while( pViewSh != mpCurrentView ); } - - UpdateDrawDefaults(); } /** method to notify drawing page view about the invisible layers */ @@ -978,17 +976,4 @@ namespace docfunc } } -void SwDoc::SetDrawDefaults() -{ - mbSetDrawDefaults = true; - UpdateDrawDefaults(); -} - -void SwDoc::UpdateDrawDefaults() -{ - // drawing layer defaults that are set for new documents (if InitNew was called) - if ( mpDrawModel && mbSetDrawDefaults ) - mpDrawModel->SetDrawingLayerPoolDefaults(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 9835e6d4636a..88707bb9d6ae 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -319,8 +319,7 @@ SwDoc::SwDoc() // COMPATIBILITY FLAGS END - mbStartIdleTimer(false), - mbSetDrawDefaults(false) + mbStartIdleTimer(false) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" ); diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 2dc1dd2f3492..58d77b9afbd3 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -307,8 +307,6 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) //#i16874# AutoKerning as default for new documents pDoc->SetDefault( SvxAutoKernItem( sal_True, RES_CHRATR_AUTOKERN ) ); - pDoc->SetDrawDefaults(); - // #i42080# - Due to the several calls of method <SetDefault(..)> // at the document instance, the document is modified. Thus, reset this // status here. Note: In method <SubInitNew()> this is also done. |