summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-29 10:07:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-29 10:09:15 +0100
commitf0596516b943f90632ff4bbca83f4ce825e3b433 (patch)
treeca1e531d556882a5468dadece49d6f00cd47dc9d
parent93b578693050646af8b5b757c59db875a6635dd9 (diff)
Resolves: fdo#51556 allow tab traversing into the conditional formatting list
Change-Id: Ie08a7312df0d42efc3697089cf766ceeefd623b0
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx10
-rw-r--r--sc/source/ui/inc/condformatdlg.hxx4
-rw-r--r--sc/source/ui/src/condformatdlg.src4
3 files changed, 13 insertions, 5 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index cc92c3175b02..bfea6e0bcec6 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -114,7 +114,6 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
maEntries.begin()->SetActive();
RecalcAll();
- FreeResource();
}
ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
@@ -329,6 +328,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();
@@ -336,6 +338,8 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
pEntry->SetActive();
RecalcAll();
+ if (bReGrabFocus)
+ GrabFocus();
return 0;
}
@@ -354,11 +358,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, &maFtRange, 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 45d831162907..d93dfafde470 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -84,11 +84,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 6c7447a267dd..da9601d486c2 100644
--- a/sc/source/ui/src/condformatdlg.src
+++ b/sc/source/ui/src/condformatdlg.src
@@ -47,6 +47,7 @@ ModalDialog RID_SCDLG_CONDFORMAT
{
Pos = MAP_APPFONT( 5, 20 );
Size = MAP_APPFONT( 290, 220 );
+ DialogControl = TRUE;
Border = TRUE;
};
FixedText FT_RANGE
@@ -60,12 +61,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;
};
};
@@ -74,6 +77,7 @@ Control RID_COND_ENTRY
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 290, 40 );
Border = TRUE;
+ DialogControl = TRUE;
FixedText FT_COND_NR
{