diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-27 11:54:28 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-07-27 22:30:54 +0200 |
commit | 8eb05127e8ffcbe4a6bd6eb10b073d015cea34aa (patch) | |
tree | 5f99923f170e9e1f6a92d2b27d3242b79f23ecb5 /cui | |
parent | 7b72143ef48df465fb25370ccb680c4601585730 (diff) |
Resolves: tdf#109289 add SvxColorListBox::IsValueChangedFromSaved
and remove PushButton::IsValueChangedFromSaved
Change-Id: Ib1c51e27fd708c5d4811c90ef5659b4d55dd8860
(cherry picked from commit 39fd7e97c253153a10161ef3694b64e90e65e80a)
Related: tdf#109289 move PushButton::IsValueChangedFromSaved to consumer
inheriting the IsValueChangedFromSaved from PushButton has allowed
undesirable behaviour to be selected
Change-Id: Ifccb1657d2565005e6f9e239c6118f2e5ae7970c
(cherry picked from commit 247607727986df0fd0fef198459eb6646e056ea3)
Reviewed-on: https://gerrit.libreoffice.org/40484
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/textanim.hxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/textanim.cxx | 31 |
2 files changed, 21 insertions, 15 deletions
diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx index 8469f3601637..f4bd053d15b8 100644 --- a/cui/source/inc/textanim.hxx +++ b/cui/source/inc/textanim.hxx @@ -74,6 +74,11 @@ private: void SelectDirection( SdrTextAniDirection nValue ); sal_uInt16 GetSelectedDirection(); + TriState m_aUpState; + TriState m_aLeftState; + TriState m_aRightState; + TriState m_aDownState; + public: SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); virtual ~SvxTextAnimationPage() override; diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 9b89ce0c1237..c2d60b46e236 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -89,13 +89,14 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) |* \************************************************************************/ -SvxTextAnimationPage::SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ) : - SfxTabPage ( pWindow - ,"TextAnimation" - ,"cui/ui/textanimtabpage.ui" - ,&rInAttrs ), - rOutAttrs ( rInAttrs ), - eAniKind ( SdrTextAniKind::NONE ) +SvxTextAnimationPage::SvxTextAnimationPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs) + : SfxTabPage(pWindow, "TextAnimation", "cui/ui/textanimtabpage.ui", &rInAttrs) + , rOutAttrs(rInAttrs) + , eAniKind(SdrTextAniKind::NONE) + , m_aUpState(TRISTATE_INDET) + , m_aLeftState(TRISTATE_INDET) + , m_aRightState(TRISTATE_INDET) + , m_aDownState(TRISTATE_INDET) { get(m_pLbEffect, "LB_EFFECT"); get(m_pBoxDirection,"boxDIRECTION"); @@ -201,10 +202,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs ) m_pBtnRight->Check( false ); m_pBtnDown->Check( false ); } - m_pBtnUp->SaveValue(); - m_pBtnLeft->SaveValue(); - m_pBtnRight->SaveValue(); - m_pBtnDown->SaveValue(); + m_aUpState = m_pBtnUp->GetState(); + m_aLeftState = m_pBtnLeft->GetState(); + m_aRightState = m_pBtnRight->GetState(); + m_aDownState = m_pBtnDown->GetState(); // Start inside pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANISTARTINSIDE ); @@ -376,10 +377,10 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs) } // animation direction - if( m_pBtnUp->IsValueChangedFromSaved() || - m_pBtnLeft->IsValueChangedFromSaved() || - m_pBtnRight->IsValueChangedFromSaved() || - m_pBtnDown->IsValueChangedFromSaved() ) + if (m_aUpState != m_pBtnUp->GetState() || + m_aLeftState != m_pBtnLeft->GetState() || + m_aRightState != m_pBtnRight->GetState() || + m_aDownState != m_pBtnDown->GetState()) { SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); rAttrs->Put( SdrTextAniDirectionItem( eValue ) ); |