summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-08 13:41:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-08 13:42:32 +0000
commit213524cf5a2351a2a022495d4988437720401760 (patch)
tree4ddd126f009b3b77c61f3f43a45c949ed2317124 /sc/source/ui/miscdlgs
parent4e0c6a0ac78d3c68922e032eec7f9c05cc39023a (diff)
make link RefButton and widget for shrunk dialog title explicit
Change-Id: Ia6dd6cc4cf89b067310639bc3da72abbc6fa1ad2
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx36
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx22
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx6
7 files changed, 32 insertions, 44 deletions
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 80983369ed08..e1b60ba70ef0 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -479,32 +479,23 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
pRefBtn->SetParent(m_pWindow);
}
- OUString sLabel;
- if (Window *pLabel = pRefEdit->GetLabelWidgetForShrinkMode())
- {
- sLabel = pLabel->GetText();
- }
- else
+ // Fenstertitel anpassen
+ sOldDialogText = m_pWindow->GetText();
+ if (pRefBtn)
{
- //find last widget before the edit widget to use as title bar contents
- for (Window* pChild = firstLogicalChildOfParent(m_pWindow); pChild; pChild = nextLogicalChildOfParent(m_pWindow, pChild))
+ if (Window *pLabel = pRefBtn->GetLabelWidgetForShrinkMode())
{
- Window *pWin = pChild->GetWindow(WINDOW_CLIENT);
- if (pWin == (Window*)pRefEdit || pWin == (Window*)pRefBtn)
- break;
- if (pWin->GetType() == WINDOW_EDIT || pWin->GetType() == WINDOW_FIXEDTEXT)
- sLabel = pWin->GetText();
+ OUString sLabel = pLabel->GetText();
+ if (!sLabel.isEmpty())
+ {
+ String sNewDialogText = sOldDialogText;
+ sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
+ sNewDialogText += sLabel;
+ m_pWindow->SetText( MnemonicGenerator::EraseAllMnemonicChars( sNewDialogText ) );
+ }
}
}
- sOldDialogText = m_pWindow->GetText();
- String sNewDialogText = sOldDialogText;
- if (!sLabel.isEmpty())
- {
- sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
- sNewDialogText += sLabel;
- }
-
Dialog* pResizeDialog = NULL;
if (!mbOldDlgLayoutEnabled)
@@ -583,9 +574,6 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
if( pRefBtn )
pRefBtn->SetEndImage();
- // Fenstertitel anpassen
- m_pWindow->SetText( MnemonicGenerator::EraseAllMnemonicChars( sNewDialogText ) );
-
if (!pAccel.get())
{
pAccel.reset( new Accelerator );
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index de5545e3045b..cb54ef3dc29f 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -74,12 +74,12 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
aLbRange ( this, ScResId( LB_RANGE ) ),
aEdAssign ( this, this, ScResId( ED_AREA ) ),
- aRbAssign ( this, ScResId( RB_AREA ), &aEdAssign, this ),
+ aRbAssign ( this, ScResId( RB_AREA ), &aEdAssign, &aFlAssign, this ),
aBtnColHead ( this, ScResId( BTN_COLHEAD ) ),
aBtnRowHead ( this, ScResId( BTN_ROWHEAD ) ),
aFtAssign2 ( this, ScResId( FT_DATA_LABEL ) ),
aEdAssign2 ( this, this, ScResId( ED_DATA ) ),
- aRbAssign2 ( this, ScResId( RB_DATA ), &aEdAssign2, this ),
+ aRbAssign2 ( this, ScResId( RB_DATA ), &aEdAssign2, &aFtAssign2, this ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 2e7ae0f5e144..6b0a227efe52 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -68,7 +68,7 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind
aCancelButton ( this, ScResId( BTN_CANCEL ) ),
aHelpButton ( this, ScResId( BTN_HELP ) ),
aEdAssign ( this, this, ScResId( ED_ASSIGN ) ),
- aRbAssign ( this, ScResId( RB_ASSIGN ), &aEdAssign, this ),
+ aRbAssign ( this, ScResId( RB_ASSIGN ), &aEdAssign, NULL, this ),
//
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index dbe35264d898..d5d973905c04 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -172,43 +172,43 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
//
maFtObjectiveCell ( this, ScResId( FT_OBJECTIVECELL ) ),
maEdObjectiveCell ( this, this, ScResId( ED_OBJECTIVECELL ) ),
- maRBObjectiveCell ( this, ScResId( IB_OBJECTIVECELL ), &maEdObjectiveCell, this ),
+ maRBObjectiveCell ( this, ScResId( IB_OBJECTIVECELL ), &maEdObjectiveCell, &maFtObjectiveCell, this ),
maFtDirection ( this, ScResId( FT_DIRECTION ) ),
maRbMax ( this, ScResId( RB_MAX ) ),
maRbMin ( this, ScResId( RB_MIN ) ),
maRbValue ( this, ScResId( RB_VALUE ) ),
maEdTargetValue ( this, this, ScResId( ED_TARGET ) ),
- maRBTargetValue ( this, ScResId( IB_TARGET ), &maEdTargetValue, this ),
+ maRBTargetValue ( this, ScResId( IB_TARGET ), &maEdTargetValue, NULL, this ),
maFtVariableCells ( this, ScResId( FT_VARIABLECELLS ) ),
maEdVariableCells ( this, this, ScResId( ED_VARIABLECELLS ) ),
- maRBVariableCells ( this, ScResId( IB_VARIABLECELLS ), &maEdVariableCells, this),
+ maRBVariableCells ( this, ScResId( IB_VARIABLECELLS ), &maEdVariableCells, &maFtVariableCells, this),
maFlConditions ( this, ScResId( FL_CONDITIONS ) ),
maFtCellRef ( this, ScResId( FT_CELLREF ) ),
maEdLeft1 ( this, ScResId( ED_LEFT1 ) ),
- maRBLeft1 ( this, ScResId( IB_LEFT1 ), &maEdLeft1, this ),
+ maRBLeft1 ( this, ScResId( IB_LEFT1 ), &maEdLeft1, NULL, this ),
maFtOperator ( this, ScResId( FT_OPERATOR ) ),
maLbOp1 ( this, ScResId( LB_OP1 ) ),
maFtConstraint ( this, ScResId( FT_CONSTRAINT ) ),
maEdRight1 ( this, ScResId( ED_RIGHT1 ) ),
- maRBRight1 ( this, ScResId( IB_RIGHT1 ), &maEdRight1, this ),
+ maRBRight1 ( this, ScResId( IB_RIGHT1 ), &maEdRight1, NULL, this ),
maBtnDel1 ( this, ScResId( IB_DELETE1 ) ),
maEdLeft2 ( this, ScResId( ED_LEFT2 ) ),
- maRBLeft2 ( this, ScResId( IB_LEFT2 ), &maEdLeft2, this ),
+ maRBLeft2 ( this, ScResId( IB_LEFT2 ), &maEdLeft2, NULL, this ),
maLbOp2 ( this, ScResId( LB_OP2 ) ),
maEdRight2 ( this, ScResId( ED_RIGHT2 ) ),
- maRBRight2 ( this, ScResId( IB_RIGHT2 ), &maEdRight2, this ),
+ maRBRight2 ( this, ScResId( IB_RIGHT2 ), &maEdRight2, NULL, this ),
maBtnDel2 ( this, ScResId( IB_DELETE2 ) ),
maEdLeft3 ( this, ScResId( ED_LEFT3 ) ),
- maRBLeft3 ( this, ScResId( IB_LEFT3 ), &maEdLeft3, this ),
+ maRBLeft3 ( this, ScResId( IB_LEFT3 ), &maEdLeft3, NULL, this ),
maLbOp3 ( this, ScResId( LB_OP3 ) ),
maEdRight3 ( this, ScResId( ED_RIGHT3 ) ),
- maRBRight3 ( this, ScResId( IB_RIGHT3 ), &maEdRight3, this ),
+ maRBRight3 ( this, ScResId( IB_RIGHT3 ), &maEdRight3, NULL, this ),
maBtnDel3 ( this, ScResId( IB_DELETE3 ) ),
maEdLeft4 ( this, ScResId( ED_LEFT4 ) ),
- maRBLeft4 ( this, ScResId( IB_LEFT4 ), &maEdLeft4, this ),
+ maRBLeft4 ( this, ScResId( IB_LEFT4 ), &maEdLeft4, NULL, this ),
maLbOp4 ( this, ScResId( LB_OP4 ) ),
maEdRight4 ( this, ScResId( ED_RIGHT4 ) ),
- maRBRight4 ( this, ScResId( IB_RIGHT4 ), &maEdRight4, this ),
+ maRBRight4 ( this, ScResId( IB_RIGHT4 ), &maEdRight4, NULL, this ),
maBtnDel4 ( this, ScResId( IB_DELETE4 ) ),
maScrollBar ( this, ScResId( SB_SCROLL ) ),
maFlButtons ( this, ScResId( FL_BUTTONS ) ),
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 8a96e0ecc728..60bc8eaf1c7b 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -54,7 +54,7 @@ ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
//
aFtAssign ( this, ScResId( FT_ASSIGN ) ),
aEdAssign ( this, this, ScResId( ED_ASSIGN ) ),
- aRbAssign ( this, ScResId( RB_ASSIGN ), &aEdAssign, this ),
+ aRbAssign ( this, ScResId( RB_ASSIGN ), &aEdAssign, &aFtAssign, this ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 248a05481561..1c210a37f219 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -50,12 +50,12 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aFlVariables ( this, ScResId( FL_VARIABLES ) ),
aFtFormulaCell ( this, ScResId( FT_FORMULACELL ) ),
aEdFormulaCell ( this, this, ScResId( ED_FORMULACELL ) ),
- aRBFormulaCell ( this, ScResId( RB_FORMULACELL ), &aEdFormulaCell, this ),
+ aRBFormulaCell ( this, ScResId( RB_FORMULACELL ), &aEdFormulaCell, &aFtFormulaCell, this ),
aFtTargetVal ( this, ScResId( FT_TARGETVAL ) ),
aEdTargetVal ( this, ScResId( ED_TARGETVAL ) ),
aFtVariableCell ( this, ScResId( FT_VARCELL ) ),
aEdVariableCell ( this, this, ScResId( ED_VARCELL ) ),
- aRBVariableCell ( this, ScResId( RB_VARCELL ), &aEdVariableCell, this ),
+ aRBVariableCell ( this, ScResId( RB_VARCELL ), &aEdVariableCell, &aFtVariableCell, this ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index b5d051ea7e18..cce3d59b009c 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -46,13 +46,13 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aFlVariables ( this, ScResId( FL_VARIABLES ) ),
aFtFormulaRange ( this, ScResId( FT_FORMULARANGE ) ),
aEdFormulaRange ( this, this, ScResId( ED_FORMULARANGE ) ),
- aRBFormulaRange ( this, ScResId( RB_FORMULARANGE ), &aEdFormulaRange, this ),
+ aRBFormulaRange ( this, ScResId( RB_FORMULARANGE ), &aEdFormulaRange, &aFtFormulaRange, this ),
aFtRowCell ( this, ScResId( FT_ROWCELL ) ),
aEdRowCell ( this, this, ScResId( ED_ROWCELL ) ),
- aRBRowCell ( this, ScResId( RB_ROWCELL ), &aEdRowCell, this ),
+ aRBRowCell ( this, ScResId( RB_ROWCELL ), &aEdRowCell, &aFtRowCell, this ),
aFtColCell ( this, ScResId( FT_COLCELL ) ),
aEdColCell ( this, this, ScResId( ED_COLCELL ) ),
- aRBColCell ( this, ScResId( RB_COLCELL ), &aEdColCell, this ),
+ aRBColCell ( this, ScResId( RB_COLCELL ), &aEdColCell, &aFtColCell, this ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),