From 0542a837a42f7c8ec8a3f0551876f8a8e71dbeae Mon Sep 17 00:00:00 2001 From: jp Date: Fri, 17 Aug 2001 11:35:59 +0000 Subject: Bug #88544#: disable autocolor --- svx/source/dialog/chardlg.cxx | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'svx/source/dialog/chardlg.cxx') diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx index 3825be7c5fdd..d456959c7f2b 100644 --- a/svx/source/dialog/chardlg.cxx +++ b/svx/source/dialog/chardlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: chardlg.cxx,v $ * - * $Revision: 1.58 $ + * $Revision: 1.59 $ * - * last change: $Author: fs $ $Date: 2001-08-15 14:55:43 $ + * last change: $Author: jp $ $Date: 2001-08-17 12:35:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,6 +85,12 @@ #ifndef _SFXVIEWSH_HXX #include #endif +#ifndef _SFX_BINDINGS_HXX +#include +#endif +#ifndef _SFXVIEWFRM_HXX +#include +#endif #ifndef _SV_MSGBOX_HXX #include #endif @@ -420,7 +426,14 @@ void SvxCharNamePage::Initialize() m_pColorLB->SetUpdateMode( FALSE ); - m_pColorLB->InsertEntry(Color(COL_AUTO), SVX_RESSTR( RID_SVXSTR_AUTOMATIC )); + { + SfxPoolItem* pDummy; + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); + if( !pFrame || SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( + SID_ATTR_AUTO_COLOR_INVALID, pDummy )) + m_pColorLB->InsertEntry( Color( COL_AUTO ), + SVX_RESSTR( RID_SVXSTR_AUTOMATIC )); + } for ( long i = 0; i < pColorTable->Count(); i++ ) { XColorEntry* pEntry = pColorTable->Get(i); @@ -1438,7 +1451,13 @@ void SvxCharEffectsPage::Initialize() } m_aColorLB.SetUpdateMode( FALSE ); - m_aColorLB.InsertAutomaticEntry(); + { + SfxPoolItem* pDummy; + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); + if( !pFrame || SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( + SID_ATTR_AUTO_COLOR_INVALID, pDummy )) + m_aColorLB.InsertAutomaticEntry(); + } for ( long i = 0; i < pColorTable->Count(); i++ ) { XColorEntry* pEntry = pColorTable->Get(i); -- cgit