[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source

Caolán McNamara caolanm at redhat.com
Mon Apr 29 03:42:56 PDT 2013


 sc/source/ui/condformat/condformatdlg.cxx |   10 +++++++---
 sc/source/ui/inc/condformatdlg.hxx        |    4 ++--
 sc/source/ui/src/condformatdlg.src        |    4 ++++
 3 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 24eb9d6f32397dabf5e52671090fd7607bcc1cf2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 29 10:07:47 2013 +0100

    Resolves: fdo#51556 allow tab traversing into the conditional formatting list
    
    Change-Id: Ie08a7312df0d42efc3697089cf766ceeefd623b0
    (cherry picked from commit f0596516b943f90632ff4bbca83f4ce825e3b433)
    Reviewed-on: https://gerrit.libreoffice.org/3656
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 1af8118..d0052a0 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -128,7 +128,6 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
         maEntries.begin()->SetActive();
 
     RecalcAll();
-    FreeResource();
 }
 
 ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
@@ -343,6 +342,9 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
     if(pEntry->IsSelected())
         return 0;
 
+    //A child has focus, but we will hide that, so regrab to whatever new thing gets
+    //shown instead of leaving it stuck in the inaccessible hidden element
+    bool bReGrabFocus = HasChildPathFocus();
     for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
     {
         itr->SetInactive();
@@ -350,6 +352,8 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
     static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
     pEntry->SetActive();
     RecalcAll();
+    if (bReGrabFocus)
+        GrabFocus();
     return 0;
 }
 
@@ -368,11 +372,11 @@ ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScCond
     ScAnyRefModalDlg(pParent, ScResId(RID_SCDLG_CONDFORMAT) ),
     maBtnAdd( this, ScResId( BTN_ADD ) ),
     maBtnRemove( this, ScResId( BTN_REMOVE ) ),
-    maBtnOk( this, ScResId( BTN_OK ) ),
-    maBtnCancel( this, ScResId( BTN_CANCEL ) ),
     maFtRange( this, ScResId( FT_RANGE ) ),
     maEdRange( this, this, ScResId( ED_RANGE ) ),
     maRbRange( this, ScResId( RB_RANGE ), &maEdRange, this ),
+    maBtnOk( this, ScResId( BTN_OK ) ),
+    maBtnCancel( this, ScResId( BTN_CANCEL ) ),
     maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ),
     maPos(rPos),
     mpDoc(pDoc),
diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx
index 68651ff..0b0bdb9 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -101,11 +101,11 @@ class ScCondFormatDlg : public ScAnyRefModalDlg
 private:
     PushButton maBtnAdd;
     PushButton maBtnRemove;
-    OKButton maBtnOk;
-    CancelButton maBtnCancel;
     FixedText maFtRange;
     formula::RefEdit maEdRange;
     formula::RefButton maRbRange;
+    OKButton maBtnOk;
+    CancelButton maBtnCancel;
 
     ScCondFormatList maCondFormList;
 
diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src
index 53df59c..c280ddf 100644
--- a/sc/source/ui/src/condformatdlg.src
+++ b/sc/source/ui/src/condformatdlg.src
@@ -66,6 +66,7 @@ ModalDialog RID_SCDLG_CONDFORMAT
     {
         Pos = MAP_APPFONT( 5, 20 );
         Size = MAP_APPFONT( 290, 220 );
+        DialogControl = TRUE;
         Border = TRUE;
     };
     FixedText FT_RANGE
@@ -79,12 +80,14 @@ ModalDialog RID_SCDLG_CONDFORMAT
         Pos = MAP_APPFONT( 60, 262 );
         Size = MAP_APPFONT( 182, 14 );
         Border = TRUE;
+        TabStop = TRUE;
     };
     ImageButton RB_RANGE
     {
         Pos = MAP_APPFONT( 245, 262 );
         Size = MAP_APPFONT( 14, 14 );
         Border = TRUE;
+        TabStop = TRUE;
     };
 };
 
@@ -93,6 +96,7 @@ Control RID_COND_ENTRY
     Pos = MAP_APPFONT( 0, 0 );
     Size = MAP_APPFONT( 290, 40 );
     Border = TRUE;
+    DialogControl = TRUE;
 
     FixedText FT_COND_NR
     {


More information about the Libreoffice-commits mailing list