[Libreoffice-commits] core.git: include/svx svx/source

Caolán McNamara caolanm at redhat.com
Sun Aug 18 06:22:46 PDT 2013


 include/svx/ctredlin.hxx       |    6 ++++++
 svx/source/dialog/ctredlin.cxx |   20 +++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)

New commits:
commit 30ba8fa46aafb0868ada3b0092cd33524c145989
Author: Caolán McNamara <caolanm at 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

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 1958307..f3107d9 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 b9b6a08..082421e 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);
 }
 


More information about the Libreoffice-commits mailing list