diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-29 10:07:47 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-04-29 10:42:36 +0000 |
commit | 24eb9d6f32397dabf5e52671090fd7607bcc1cf2 (patch) | |
tree | 2e551edc71e6cd0ae6068099ddf69be73c08c6e7 | |
parent | af435af8ad93f1616c3471bde70e36227cea8269 (diff) |
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@iki.fi>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/src/condformatdlg.src | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 1af811870589..d0052a01bfb1 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 68651ffc122f..0b0bdb97f2c9 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 53df59c280b7..c280ddf4e4e1 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 { |