diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 13:37:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-04 17:14:26 +0000 |
commit | 43bc3031483d172eccd72c3804e2d4fc2ef37de4 (patch) | |
tree | 991d98e8e61fae47ada28ba7a0b02e1d6c8e443f /cui/source/tabpages/tpshadow.cxx | |
parent | 44523738f094ff3987e85ea0c47b8c636bbe5786 (diff) |
unify color selectors
Note: this removes the use of auto-color from writer's asian text grid, because
its always invisible as far as I can see in practice.
Change-Id: Ie850790d740a4d56c43015e493e093678cef3b4e
Diffstat (limited to 'cui/source/tabpages/tpshadow.cxx')
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index d2b1dca3ce28..fa46ea2031e9 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -19,6 +19,7 @@ #include <sfx2/app.hxx> #include <sfx2/module.hxx> +#include <svx/colorbox.hxx> #include <svx/dialogs.hrc> #include "svx/xattr.hxx" @@ -182,17 +183,8 @@ void SvxShadowTabPage::dispose() SvxTabPage::dispose(); } -void SvxShadowTabPage::Construct() -{ - m_pLbShadowColor->Fill( m_pColorList ); -} - - void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { - sal_Int32 nPos; - sal_Int32 nCount; - const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) SetPageType((PageType) pPageTypeItem->GetValue()); @@ -220,18 +212,6 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) } } - // aLbShadowColor - nPos = m_pLbShadowColor->GetSelectEntryPos(); - m_pLbShadowColor->Clear(); - m_pLbShadowColor->Fill( m_pColorList ); - nCount = m_pLbShadowColor->GetEntryCount(); - if( nCount == 0 ) - ; // this case should not occur - else if( nCount <= nPos ) - m_pLbShadowColor->SelectEntryPos( 0 ); - else - m_pLbShadowColor->SelectEntryPos( nPos ); - SfxItemSet rAttribs( rSet ); // rSet contains shadow attributes too, but we want // to use it for updating rectangle attributes only, @@ -335,9 +315,6 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) } // ShadowColor - sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && - m_pLbShadowColor->IsValueChangedFromSaved() ) { XColorItem aItem(makeSdrShadowColorItem(m_pLbShadowColor->GetSelectEntryColor())); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWCOLOR ); @@ -488,11 +465,11 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, Button*, void) ModifyShadowHdl_Impl( *m_pMtrTransparent ); } - -IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ListBox&, void) +IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, SvxColorListBox&, void) { ModifyShadowHdl_Impl(*m_pMtrTransparent); } + IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) { if( m_pTsbShowShadow->GetState() == TRISTATE_TRUE ) @@ -500,11 +477,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void) else m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); - sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND ) - { - m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) ); - } + m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) ); sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue(); XFillTransparenceItem aItem( nVal ); m_rXFSet.Put( XFillTransparenceItem( aItem ) ); |