summaryrefslogtreecommitdiff
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
parent4e0c6a0ac78d3c68922e032eec7f9c05cc39023a (diff)
make link RefButton and widget for shrunk dialog title explicit
Change-Id: Ia6dd6cc4cf89b067310639bc3da72abbc6fa1ad2
-rw-r--r--formula/inc/formula/funcutl.hxx15
-rw-r--r--formula/source/ui/dlg/formula.cxx2
-rw-r--r--formula/source/ui/dlg/funcutl.cxx28
-rw-r--r--formula/source/ui/dlg/parawin.cxx2
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx4
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/validate.cxx37
-rw-r--r--sc/source/ui/inc/validate.hxx6
-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
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx3
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx6
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
23 files changed, 103 insertions, 94 deletions
diff --git a/formula/inc/formula/funcutl.hxx b/formula/inc/formula/funcutl.hxx
index b9e326786915..76a2287ed45c 100644
--- a/formula/inc/formula/funcutl.hxx
+++ b/formula/inc/formula/funcutl.hxx
@@ -62,9 +62,7 @@ public:
void StartUpdateData();
void SetRefDialog( IControlReferenceHandler* pDlg );
- inline IControlReferenceHandler* GetRefDialog() { return pAnyRefDlg; }
- Window* GetLabelWidgetForShrinkMode() { return m_pLabelWidget; }
- void SetLabelWidgetForShrinkMode(Window *pLabel) { m_pLabelWidget = pLabel; }
+ IControlReferenceHandler* GetRefDialog() { return pAnyRefDlg; }
};
@@ -79,6 +77,7 @@ private:
OUString aExpandQuickHelp;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
RefEdit* pRefEdit; // zugeordnetes Edit-Control
+ Window* pLabelWidget;
protected:
virtual void Click();
@@ -89,13 +88,17 @@ protected:
public:
RefButton(Window* _pParent, const ResId& rResId);
RefButton(Window* _pParent, WinBits nStyle = 0);
- RefButton(Window* _pParent, const ResId& rResId, RefEdit* pEdit ,IControlReferenceHandler* pDlg);
+ RefButton(Window* _pParent, const ResId& rResId,
+ RefEdit* pEdit, Window* pShrinkModeLabel,
+ IControlReferenceHandler* pDlg);
- void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
+ void SetReferences( IControlReferenceHandler* pDlg,
+ RefEdit* pEdit, Window* pShrinkModeLabel );
void SetStartImage();
void SetEndImage();
- inline void DoRef() { Click(); }
+ void DoRef() { Click(); }
+ Window* GetLabelWidgetForShrinkMode() { return pLabelWidget; }
};
} // formula
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 8ae904b2c07b..aec7824cae43 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -266,7 +266,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aBtnForward ( pParent, ModuleRes( BTN_FORWARD ) ),
aBtnEnd ( pParent, ModuleRes( BTN_END ) ),
aEdRef ( pParent, _pDlg, ModuleRes( ED_REF) ),
- aRefBtn ( pParent, ModuleRes( RB_REF),&aEdRef,_pDlg ),
+ aRefBtn ( pParent, ModuleRes( RB_REF),&aEdRef,&aFtEditName,_pDlg ),
aFtFormResult ( pParent, ModuleRes( FT_FORMULA_RESULT)),
aWndFormResult ( pParent, ModuleRes( WND_FORMULA_RESULT)),
pTheRefEdit (NULL),
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 64830d5d73e9..8d39ea91f556 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -847,19 +847,17 @@ void EditBox::UpdateOldSel()
#define SC_ENABLE_TIME 100
-RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId ) :
- Edit( _pParent, rResId ),
- pAnyRefDlg( pParent ),
- m_pLabelWidget(NULL)
+RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId )
+ : Edit( _pParent, rResId )
+ , pAnyRefDlg( pParent )
{
aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
aTimer.SetTimeout( SC_ENABLE_TIME );
}
-RefEdit::RefEdit( Window* _pParent, WinBits nStyle ) :
- Edit( _pParent, nStyle ),
- pAnyRefDlg( NULL ),
- m_pLabelWidget(NULL)
+RefEdit::RefEdit( Window* _pParent, WinBits nStyle )
+ : Edit( _pParent, nStyle )
+ , pAnyRefDlg( NULL )
{
aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
aTimer.SetTimeout( SC_ENABLE_TIME );
@@ -969,7 +967,8 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId) :
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
pAnyRefDlg( NULL ),
- pRefEdit( NULL )
+ pRefEdit( NULL ),
+ pLabelWidget( NULL )
{
SetStartImage();
}
@@ -981,7 +980,8 @@ RefButton::RefButton( Window* _pParent, WinBits nStyle ) :
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
pAnyRefDlg( NULL ),
- pRefEdit( NULL )
+ pRefEdit( NULL ),
+ pLabelWidget( NULL )
{
SetStartImage();
}
@@ -991,14 +991,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefButton(Window *pParent,
return new RefButton(pParent, 0);
}
-RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
+RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, Window* pShrinkModeLabel, IControlReferenceHandler* _pDlg ) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
pAnyRefDlg( _pDlg ),
- pRefEdit( pEdit )
+ pRefEdit( pEdit ),
+ pLabelWidget( pShrinkModeLabel )
{
SetStartImage();
}
@@ -1015,10 +1016,11 @@ void RefButton::SetEndImage()
SetQuickHelpText( aExpandQuickHelp );
}
-void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit )
+void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit, Window* pShrinkModeLabel )
{
pAnyRefDlg = pDlg;
pRefEdit = pEdit;
+ pLabelWidget = pShrinkModeLabel;
}
//----------------------------------------------------------------------------
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index 004dcf01f5db..4c68e6d471fd 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -387,7 +387,7 @@ void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBt
ArgEdit& rEdArg, RefButton& rRefBtn)
{
- rRefBtn.SetReferences(pMyParent,&rEdArg);
+ rRefBtn.SetReferences(pMyParent, &rEdArg, &rFtArg);
rEdArg.SetRefDialog(pMyParent);
aArgInput[nPos].InitArgInput (&rFtArg,&rBtnFx,&rEdArg,&rRefBtn);
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index d3e1bbff2109..4896f55b4234 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -377,7 +377,7 @@ ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScCond
maBtnCancel( this, ScResId( BTN_CANCEL ) ),
maFtRange( this, ScResId( FT_RANGE ) ),
maEdRange( this, this, ScResId( ED_RANGE ) ),
- maRbRange( this, ScResId( RB_RANGE ), &maEdRange, this ),
+ maRbRange( this, ScResId( RB_RANGE ), &maEdRange, &maFtRange, this ),
maCondFormList( this, ScResId( CTRL_LIST ), pDoc, pFormat, rRange, rPos, eType ),
maPos(rPos),
mpDoc(pDoc),
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index ce675a2e1fec..74673c7f6b46 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -78,12 +78,12 @@ ScConsolidateDlg::ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
aLbDataArea ( this, ScResId( LB_DATA_AREA ) ),
aFtDataArea ( this, ScResId( FT_DATA_AREA ) ),
aEdDataArea ( this, this, ScResId( ED_DATA_AREA ) ),
- aRbDataArea ( this, ScResId( RB_DATA_AREA ), &aEdDataArea, this ),
+ aRbDataArea ( this, ScResId( RB_DATA_AREA ), &aEdDataArea, &aFtDataArea, this ),
aLbDestArea ( this, ScResId( LB_DEST_AREA ) ),
aFtDestArea ( this, ScResId( FT_DEST_AREA ) ),
aEdDestArea ( this, this, ScResId( ED_DEST_AREA ) ),
- aRbDestArea ( this, ScResId( RB_DEST_AREA ), &aEdDestArea, this),
+ aRbDestArea ( this, ScResId( RB_DEST_AREA ), &aEdDestArea, &aFtDestArea, this),
aFlConsBy ( this, ScResId( FL_CONSBY ) ),
aBtnByRow ( this, ScResId( BTN_BYROW ) ),
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 95f22f570e8d..d4744c454ef1 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -129,7 +129,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aFlAssign ( this, ScResId( FL_ASSIGN ) ),
aEdAssign ( this, this, ScResId( ED_DBAREA ) ),
- aRbAssign ( this, ScResId( RB_DBAREA ), &aEdAssign, this ),
+ aRbAssign ( this, ScResId( RB_DBAREA ), &aEdAssign, &aFlAssign, this ),
aFlOptions ( this, ScResId( FL_OPTIONS ) ),
aBtnHeader ( this, ScResId( BTN_HEADER ) ),
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 921949c91d65..a5a45262ec43 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -94,7 +94,7 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ),
aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ),
aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ),
- aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, this ),
+ aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, NULL, this ),
aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ),
aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
aFtDbArea ( this, ScResId( FT_DBAREA ) ),
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index cc6f6f6a3883..e232de90d5a5 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -102,11 +102,11 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window
maFlAreas( this, ScResId( FL_OUTPUT ) ),
maFtInArea( this, ScResId( FT_INAREA) ),
maEdInPos( this, this, ScResId( ED_INAREA) ),
- maRbInPos( this, ScResId( RB_INAREA ), &maEdInPos, this ),
+ maRbInPos( this, ScResId( RB_INAREA ), &maEdInPos, &maFtInArea, this ),
maLbOutPos( this, ScResId( LB_OUTAREA ) ),
maFtOutArea( this, ScResId( FT_OUTAREA ) ),
maEdOutPos( this, this, ScResId( ED_OUTAREA ) ),
- maRbOutPos( this, ScResId( RB_OUTAREA ), &maEdOutPos, this ),
+ maRbOutPos( this, ScResId( RB_OUTAREA ), &maEdOutPos, &maFtOutArea, this ),
maBtnIgnEmptyRows( this, ScResId( BTN_IGNEMPTYROWS ) ),
maBtnDetectCat( this, ScResId( BTN_DETECTCAT ) ),
maBtnTotalCol( this, ScResId( BTN_TOTALCOL ) ),
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index a7c9107df783..19f72ec80611 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -57,7 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ),
aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ),
- aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ),
+ aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, &aFtFilterArea, this ),
//
aFlOptions ( this, ScResId( FL_OPTIONS ) ),
aBtnCase ( this, ScResId( BTN_CASE ) ),
@@ -67,7 +67,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ),
aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ),
aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ),
- aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, this ),
+ aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, NULL, this ),
aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ),
aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
aFtDbArea ( this, ScResId( FT_DBAREA ) ),
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 48cf1ab87ba0..23f6a60f8fdb 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -112,11 +112,6 @@ void ScTPValidationValue::RefInputStartPreHdl( formula::RefEdit* pEdi
Window *pNewParent = pValidationDlg->get_refinput_shrink_parent();
if( pEdit == m_pRefEdit )
{
- if( Window *pPreWnd = pEdit==&maEdMax?&maFtMax:(pEdit==&maEdMin?&maFtMin:NULL) )
- {
- m_pRefEdit->SetLabelWidgetForShrinkMode(pPreWnd);
- }
-
maRefEditPos = m_pRefEdit->GetPosPixel();
maRefEditSize = m_pRefEdit->GetSizePixel();
m_pRefEdit->SetParent(pNewParent);
@@ -485,6 +480,7 @@ ScValidationDlg * ScTPValidationValue::GetValidationDlg()
void ScTPValidationValue::SetupRefDlg()
{
if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ {
if( pValidationDlg->SetupRefDlg() )
{
pValidationDlg->SetHandler( this );
@@ -493,19 +489,34 @@ void ScTPValidationValue::SetupRefDlg()
pValidationDlg->SetRefInputStartPreHdl( (ScRefHandlerHelper::PINPUTSTARTDLTYPE)( &ScTPValidationValue::RefInputStartPreHdl ) );
pValidationDlg->SetRefInputDonePostHdl( (ScRefHandlerHelper::PCOMMONHDLTYPE)( &ScTPValidationValue::RefInputDonePostHdl ) );
- if ( maEdMax.IsVisible() ) { m_pRefEdit = &maEdMax; }
- else if ( maEdMin.IsVisible() ) { m_pRefEdit = &maEdMin; }
+ Window *pLabel = NULL;
- if( m_pRefEdit && !m_pRefEdit->HasFocus() ) m_pRefEdit->GrabFocus();
+ if ( maEdMax.IsVisible() )
+ {
+ m_pRefEdit = &maEdMax;
+ pLabel = &maFtMax;
+ }
+ else if ( maEdMin.IsVisible() )
+ {
+ m_pRefEdit = &maEdMin;
+ pLabel = &maFtMin;
+ }
- if( m_pRefEdit ) m_pRefEdit->SetRefDialog( pValidationDlg );
- m_btnRef.SetReferences( pValidationDlg, m_pRefEdit );
+ if( m_pRefEdit && !m_pRefEdit->HasFocus() )
+ m_pRefEdit->GrabFocus();
+
+ if( m_pRefEdit )
+ m_pRefEdit->SetRefDialog( pValidationDlg );
+
+ m_btnRef.SetReferences( pValidationDlg, m_pRefEdit, pLabel );
}
+ }
}
void ScTPValidationValue::RemoveRefDlg()
{
if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ {
if( pValidationDlg->RemoveRefDlg() )
{
pValidationDlg->SetHandler( NULL );
@@ -514,15 +525,17 @@ void ScTPValidationValue::RemoveRefDlg()
pValidationDlg->SetRefInputStartPreHdl( NULL );
pValidationDlg->SetRefInputDonePostHdl( NULL );
- if( m_pRefEdit ) m_pRefEdit->SetRefDialog( NULL );
+ if( m_pRefEdit )
+ m_pRefEdit->SetRefDialog( NULL );
m_pRefEdit = NULL;
- m_btnRef.SetReferences( NULL, NULL );
+ m_btnRef.SetReferences( NULL, NULL, NULL );
#if ! defined( WNT ) && !defined( _MSC_VER )
TidyListBoxes();
#endif
}
+ }
}
void ScTPValidationValue::TidyListBoxes()
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 353f71545577..6527bb4fcc85 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -227,7 +227,11 @@ private:
{
void Click();
public:
- ScRefButtonEx( Window* pParent, const ResId& rResId, formula::RefEdit* pEdit = NULL, ScRefHandler *pRefHdlr = NULL ): ::formula::RefButton( pParent, rResId, pEdit, pRefHdlr ){}
+ ScRefButtonEx( Window* pParent, const ResId& rResId, formula::RefEdit* pEdit = NULL,
+ Window* pShrinkLabel = NULL, ScRefHandler *pRefHdlr = NULL )
+ : ::formula::RefButton( pParent, rResId, pEdit, pShrinkLabel, pRefHdlr )
+ {
+ }
}m_btnRef;
friend class ScRefButtonEx;
void SetReferenceHdl( const ScRange& , ScDocument* );
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 ) ),
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 2743c3d8da48..67758d5d8801 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -68,8 +68,7 @@ ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParen
get(m_pEdName, "edit");
get(m_pEdRange, "range");
get(m_pRbRange, "refbutton");
- m_pRbRange->SetReferences(this, m_pEdRange);
- m_pEdRange->SetLabelWidgetForShrinkMode(m_pEdName);
+ m_pRbRange->SetReferences(this, m_pEdRange, m_pEdName);
get(m_pLbScope, "scope");
get(m_pBtnRowHeader, "rowheader");
get(m_pBtnColHeader, "colheader");
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index ec102ae66683..5ce90f0eda2a 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -56,7 +56,7 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
//
maEdName ( this, ScResId( ED_NAME2 ) ),
maEdAssign ( this, this, ScResId( ED_ASSIGN ) ),
- aRbAssign ( this, ScResId( RB_ASSIGN ), &maEdAssign, this ),
+ aRbAssign ( this, ScResId( RB_ASSIGN ), &maEdAssign, &maEdName, this ),
maLbScope( this, ScResId(LB_SCOPE) ),
//
maBtnMore ( this, ScResId( BTN_MORE ) ),
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index cc1b78b4c5ed..85e8c44f44eb 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -112,17 +112,17 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
aFlPrintArea ( this, ScResId( FL_PRINTAREA ) ),
aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aEdPrintArea ( this, this, ScResId( ED_PRINTAREA ) ),
- aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
+ aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, &aFlPrintArea, this ),
//
aFlRepeatRow ( this, ScResId( FL_REPEATROW ) ),
aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aEdRepeatRow ( this, this, ScResId( ED_REPEATROW ) ),
- aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
+ aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, &aFlRepeatRow, this ),
//
aFlRepeatCol ( this, ScResId( FL_REPEATCOL ) ),
aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aEdRepeatCol ( this, this, ScResId( ED_REPEATCOL ) ),
- aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
+ aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, &aFlRepeatCol, this ),
//
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 838b7d169f15..64d617362847 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -80,7 +80,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(
maFtMappedCellTitle(this, ScResId(FT_MAPPED_CELL_TITLE)),
maLbTree(this, ScResId(LB_SOURCE_TREE)),
maRefEdit(this, this, ScResId(ED_MAPPED_CELL)),
- maRefBtn(this, ScResId(BTN_MAPPED_CELL), &maRefEdit, this),
+ maRefBtn(this, ScResId(BTN_MAPPED_CELL), &maRefEdit, NULL, this),
maBtnOk(this, ScResId(BTN_OK)),
maBtnCancel(this, ScResId(BTN_CANCEL)),
maImgFileOpen(ScResId(IMG_FILE_OPEN)),