Kaydet (Commit) 24760772 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#109289 move PushButton::IsValueChangedFromSaved to consumer

inheriting the IsValueChangedFromSaved from PushButton has allowed
undesirable behaviour to be selected

Change-Id: Ifccb1657d2565005e6f9e239c6118f2e5ae7970c
üst 620d032b
...@@ -74,6 +74,11 @@ private: ...@@ -74,6 +74,11 @@ private:
void SelectDirection( SdrTextAniDirection nValue ); void SelectDirection( SdrTextAniDirection nValue );
sal_uInt16 GetSelectedDirection(); sal_uInt16 GetSelectedDirection();
TriState m_aUpState;
TriState m_aLeftState;
TriState m_aRightState;
TriState m_aDownState;
public: public:
SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
virtual ~SvxTextAnimationPage() override; virtual ~SvxTextAnimationPage() override;
......
...@@ -88,13 +88,14 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ...@@ -88,13 +88,14 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|* |*
\************************************************************************/ \************************************************************************/
SvxTextAnimationPage::SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ) : SvxTextAnimationPage::SvxTextAnimationPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
SfxTabPage ( pWindow : SfxTabPage(pWindow, "TextAnimation", "cui/ui/textanimtabpage.ui", &rInAttrs)
,"TextAnimation" , rOutAttrs(rInAttrs)
,"cui/ui/textanimtabpage.ui" , eAniKind(SdrTextAniKind::NONE)
,&rInAttrs ), , m_aUpState(TRISTATE_INDET)
rOutAttrs ( rInAttrs ), , m_aLeftState(TRISTATE_INDET)
eAniKind ( SdrTextAniKind::NONE ) , m_aRightState(TRISTATE_INDET)
, m_aDownState(TRISTATE_INDET)
{ {
get(m_pLbEffect, "LB_EFFECT"); get(m_pLbEffect, "LB_EFFECT");
get(m_pBoxDirection,"boxDIRECTION"); get(m_pBoxDirection,"boxDIRECTION");
...@@ -200,10 +201,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs ) ...@@ -200,10 +201,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
m_pBtnRight->Check( false ); m_pBtnRight->Check( false );
m_pBtnDown->Check( false ); m_pBtnDown->Check( false );
} }
m_pBtnUp->SaveValue(); m_aUpState = m_pBtnUp->GetState();
m_pBtnLeft->SaveValue(); m_aLeftState = m_pBtnLeft->GetState();
m_pBtnRight->SaveValue(); m_aRightState = m_pBtnRight->GetState();
m_pBtnDown->SaveValue(); m_aDownState = m_pBtnDown->GetState();
// Start inside // Start inside
pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANISTARTINSIDE ); pItem = GetItem( *rAttrs, SDRATTR_TEXT_ANISTARTINSIDE );
...@@ -375,10 +376,10 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs) ...@@ -375,10 +376,10 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
} }
// animation direction // animation direction
if( m_pBtnUp->IsValueChangedFromSaved() || if (m_aUpState != m_pBtnUp->GetState() ||
m_pBtnLeft->IsValueChangedFromSaved() || m_aLeftState != m_pBtnLeft->GetState() ||
m_pBtnRight->IsValueChangedFromSaved() || m_aRightState != m_pBtnRight->GetState() ||
m_pBtnDown->IsValueChangedFromSaved() ) m_aDownState != m_pBtnDown->GetState())
{ {
SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection();
rAttrs->Put( SdrTextAniDirectionItem( eValue ) ); rAttrs->Put( SdrTextAniDirectionItem( eValue ) );
......
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