[PATCH libreoffice-4-0] Resolves: fdo#51556 allow tab traversing into the conditiona...

Caolán McNamara (via_Code_Review) gerrit at gerrit.libreoffice.org
Mon Apr 29 02:12:39 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3656

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/3656/1

Resolves: fdo#51556 allow tab traversing into the conditional formatting list

Change-Id: Ie08a7312df0d42efc3697089cf766ceeefd623b0
(cherry picked from commit f0596516b943f90632ff4bbca83f4ce825e3b433)
---
M sc/source/ui/condformat/condformatdlg.cxx
M sc/source/ui/inc/condformatdlg.hxx
M sc/source/ui/src/condformatdlg.src
3 files changed, 13 insertions(+), 5 deletions(-)



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 @@
         maEntries.begin()->SetActive();
 
     RecalcAll();
-    FreeResource();
 }
 
 ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
@@ -343,6 +342,9 @@
     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 @@
     static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
     pEntry->SetActive();
     RecalcAll();
+    if (bReGrabFocus)
+        GrabFocus();
     return 0;
 }
 
@@ -368,11 +372,11 @@
     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 @@
 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 @@
     {
         Pos = MAP_APPFONT( 5, 20 );
         Size = MAP_APPFONT( 290, 220 );
+        DialogControl = TRUE;
         Border = TRUE;
     };
     FixedText FT_RANGE
@@ -79,12 +80,14 @@
         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 @@
     Pos = MAP_APPFONT( 0, 0 );
     Size = MAP_APPFONT( 290, 40 );
     Border = TRUE;
+    DialogControl = TRUE;
 
     FixedText FT_COND_NR
     {

-- 
To view, visit https://gerrit.libreoffice.org/3656
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie08a7312df0d42efc3697089cf766ceeefd623b0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Caolán McNamara <caolanm at redhat.com>



More information about the LibreOffice mailing list