diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-18 14:16:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-18 14:22:19 +0100 |
commit | 30ba8fa46aafb0868ada3b0092cd33524c145989 (patch) | |
tree | 6fbf7508b22e05fc137d593a197b403a2f3d40fa | |
parent | 1fb69ba27999606db68915fe745629b2ed42c8b1 (diff) |
don't unconditionally enable buttons on switching to accept/reject page
we want to disable all of them when switch to the options page and *restore*
the original enable/disable state when switching back i.e. don't enable them if
they were disabled due to change tracking password protection
regression since 8655095a4910ca795dfd182e6796d9375727a694
Change-Id: I2dd6c83fd9613adf42571684a08bff81b86c9ee1
-rw-r--r-- | include/svx/ctredlin.hxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 20 |
2 files changed, 21 insertions, 5 deletions
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index 1958307acde1..f3107d9f05a6 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -305,6 +305,12 @@ private: PushButton* m_pRejectAll; PushButton* m_pUndo; + bool bEnableAccept; + bool bEnableAcceptAll; + bool bEnableReject; + bool bEnableRejectAll; + bool bEnableUndo; + DECL_LINK( PbClickHdl, PushButton* ); public: diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index b9b6a08212f7..082421eb4997 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -394,6 +394,11 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, SvxTPView::SvxTPView(Window * pParent) : TabPage(pParent, "RedlineViewPage", "svx/ui/redlineviewpage.ui") + , bEnableAccept(true) + , bEnableAcceptAll(true) + , bEnableReject(true) + , bEnableRejectAll(true) + , bEnableUndo(true) { Dialog *pTopLevel = GetParentDialog(); pTopLevel->get(m_pAccept, "accept"); @@ -422,11 +427,11 @@ SvxTPView::SvxTPView(Window * pParent) void SvxTPView::ActivatePage() { - m_pAccept->Enable(); - m_pReject->Enable(); - m_pAcceptAll->Enable(); - m_pRejectAll->Enable(); - m_pUndo->Enable(); + m_pAccept->Enable(bEnableAccept); + m_pReject->Enable(bEnableReject); + m_pAcceptAll->Enable(bEnableAcceptAll); + m_pRejectAll->Enable(bEnableRejectAll); + m_pUndo->Enable(bEnableUndo); TabPage::ActivatePage(); } @@ -477,21 +482,25 @@ void SvxTPView::InsertCalcHeader() void SvxTPView::EnableAccept(sal_Bool nFlag) { + bEnableAccept = nFlag; m_pAccept->Enable(nFlag); } void SvxTPView::EnableAcceptAll(sal_Bool nFlag) { + bEnableAcceptAll = nFlag; m_pAcceptAll->Enable(nFlag); } void SvxTPView::EnableReject(sal_Bool nFlag) { + bEnableReject = nFlag; m_pReject->Enable(nFlag); } void SvxTPView::EnableRejectAll(sal_Bool nFlag) { + bEnableRejectAll = nFlag; m_pRejectAll->Enable(nFlag); } @@ -502,6 +511,7 @@ void SvxTPView::ShowUndo(sal_Bool nFlag) void SvxTPView::EnableUndo(sal_Bool nFlag) { + bEnableUndo = nFlag; m_pUndo->Enable(nFlag); } |