Kaydet (Commit) 81664c03 authored tarafından Armin Le Grand's avatar Armin Le Grand

#121448# Aligned default fill color/ line style for all apps

üst 1d462c8d
......@@ -417,7 +417,6 @@ private:
sal_uInt8 nAsianCompression;
sal_uInt8 nAsianKerning;
sal_Bool bSetDrawDefaults;
sal_Bool bPastingDrawFromOtherDoc;
......@@ -477,8 +476,6 @@ public:
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; }
......@@ -1868,7 +1865,6 @@ private: // CLOOK-Impl-Methoden
void UpdateDrawPrinter();
void UpdateDrawLanguages();
void UpdateDrawDefaults();
SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
void LoadDdeLinks(SvStream& rStream);
......
......@@ -204,7 +204,6 @@ ScDocument::ScDocument( ScDocumentMode eMode,
nVisSpellState( 0 ),
nAsianCompression(SC_ASIANCOMPRESSION_INVALID),
nAsianKerning(SC_ASIANKERNING_INVALID),
bSetDrawDefaults( sal_False ),
bPastingDrawFromOtherDoc( sal_False ),
nInDdeLinkUpdate( 0 ),
bInUnoBroadcast( sal_False ),
......
......@@ -1914,12 +1914,6 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
UpdateDrawLanguages(); // set edit engine defaults in drawing layer pool
}
void ScDocument::SetDrawDefaults()
{
bSetDrawDefaults = sal_True;
UpdateDrawDefaults();
}
Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
{
......
......@@ -192,7 +192,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(sal_False);
......@@ -217,18 +221,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( sal_True, EE_CHAR_PAIRKERNING ) );
pDrawLayer->SetDrawingLayerPoolDefaults();
}
}
void ScDocument::UpdateDrawPrinter()
{
if (pDrawLayer)
......
......@@ -86,8 +86,6 @@ sal_Bool __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >&
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);
......
......@@ -294,7 +294,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
......
......@@ -742,8 +742,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;
......
......@@ -2170,18 +2170,6 @@ 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) );
}
//
// i120668, move from the header files, add delete action
//
......
......@@ -48,11 +48,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); // #121448# Use defined default color
const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #121448# 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
......
......@@ -602,8 +602,6 @@ private:
sal_Bool mbStartIdleTimer ; // idle timer mode start/stop
bool mbSetDrawDefaults ; // set draw pool defaults for freshly created documents
static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete
//---------------- private Methoden ------------------------------
......@@ -2121,13 +2119,6 @@ public:
::sw::UndoManager & GetUndoManager();
::sw::UndoManager const& GetUndoManager() const;
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
/// 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();
};
......
......@@ -705,8 +705,6 @@ void SwDoc::InitDrawModel()
pViewSh = (ViewShell*)pViewSh->GetNext();
}while( pViewSh != pCurrentView );
}
UpdateDrawDefaults();
}
/** method to notify drawing page view about the invisible layers
......@@ -1099,16 +1097,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 ( pDrawModel && mbSetDrawDefaults )
pDrawModel->SetDrawingLayerPoolDefaults();
}
// eof
......@@ -299,7 +299,6 @@ SwDoc::SwDoc()
n32DummyCompatabilityOptions1(0),
n32DummyCompatabilityOptions2(0),
mbStartIdleTimer(sal_False),
mbSetDrawDefaults(false),
meDocType( DOCTYPE_NATIVE )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" );
......
......@@ -347,8 +347,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();
// --> OD 2005-02-10 #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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment