include/svx/ctredlin.hxx | 6 ++++++ svx/source/dialog/ctredlin.cxx | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-)
New commits: commit c373d4a7807581459a474ffc0a277d0d6c00447a Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 18 14:16:10 2013 +0100 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 (cherry picked from commit 30ba8fa46aafb0868ada3b0092cd33524c145989) Reviewed-on: https://gerrit.libreoffice.org/5502 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index c88b742..e8cb58b 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -311,6 +311,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 b201d8d..fcd153d 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -476,6 +476,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"); @@ -504,11 +509,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(); } @@ -559,21 +564,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); } @@ -584,6 +593,7 @@ void SvxTPView::ShowUndo(sal_Bool nFlag) void SvxTPView::EnableUndo(sal_Bool nFlag) { + bEnableUndo = nFlag; m_pUndo->Enable(nFlag); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits