diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-16 20:41:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-17 10:25:10 +0100 |
commit | 02179ab7e771fae9d012724b8ff1397f4265cfc1 (patch) | |
tree | 2f56bf55fcfe40f2833a4d028b90e6c80e8cd532 /formula/source | |
parent | a59565f855cb30fff56eb3d889376bfd27dc728f (diff) |
stash the label widget for shrink mode in the edit, not the button
because we always have we a refedit, but sometimes not a refbutton, so set the
label widget to use for the dialog shrink mode on the refedit instead of the
refbutton. This way we get the shrunken dialog title bar updated with the label
contents regardless of using the shrink button or clicking in the editbox and
dragging the mouse around the spreadsheet triggering the shrink mode
Change-Id: Ifdff01a30d5c65aa964d4bf544017a2927757d67
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 4 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 28 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.cxx | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index df893f624b8c..6f98e56b31aa 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -265,8 +265,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aBtnBackward ( pParent, ModuleRes( BTN_BACKWARD ) ), aBtnForward ( pParent, ModuleRes( BTN_FORWARD ) ), aBtnEnd ( pParent, ModuleRes( BTN_END ) ), - aEdRef ( pParent, _pDlg, ModuleRes( ED_REF) ), - aRefBtn ( pParent, ModuleRes( RB_REF),&aEdRef,&aFtEditName,_pDlg ), + aEdRef ( pParent, _pDlg, &aFtEditName, ModuleRes( ED_REF) ), + aRefBtn ( pParent, ModuleRes( RB_REF), &aEdRef, _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 8d39ea91f556..01fc78b45d92 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -87,7 +87,7 @@ void ValWnd::SetValue( const String& rStrVal ) //---------------------------------------------------------------------------- ArgEdit::ArgEdit( Window* pParent, const ResId& rResId ) - : RefEdit( pParent, NULL, rResId ), + : RefEdit( pParent, NULL, NULL, rResId ), pEdPrev ( NULL ), pEdNext ( NULL ), pSlider ( NULL ), @@ -847,17 +847,20 @@ void EditBox::UpdateOldSel() #define SC_ENABLE_TIME 100 -RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId ) +RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, + Window* pShrinkModeLabel, const ResId& rResId ) : Edit( _pParent, rResId ) , pAnyRefDlg( pParent ) + , pLabelWidget(pShrinkModeLabel) { aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); aTimer.SetTimeout( SC_ENABLE_TIME ); } -RefEdit::RefEdit( Window* _pParent, WinBits nStyle ) +RefEdit::RefEdit( Window* _pParent, Window* pShrinkModeLabel, WinBits nStyle ) : Edit( _pParent, nStyle ) , pAnyRefDlg( NULL ) + , pLabelWidget(pShrinkModeLabel) { aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); aTimer.SetTimeout( SC_ENABLE_TIME ); @@ -865,7 +868,7 @@ RefEdit::RefEdit( Window* _pParent, WinBits nStyle ) extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefEdit(Window *pParent, VclBuilder::stringmap &) { - return new RefEdit(pParent, WB_BORDER); + return new RefEdit(pParent, NULL, WB_BORDER); } RefEdit::~RefEdit() @@ -904,9 +907,10 @@ void RefEdit::StartUpdateData() aTimer.Start(); } -void RefEdit::SetRefDialog( IControlReferenceHandler* pDlg ) +void RefEdit::SetReferences( IControlReferenceHandler* pDlg, Window* pLabel ) { pAnyRefDlg = pDlg; + pLabelWidget = pLabel; if( pDlg ) { @@ -967,8 +971,7 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId) : aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ), aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ), pAnyRefDlg( NULL ), - pRefEdit( NULL ), - pLabelWidget( NULL ) + pRefEdit( NULL ) { SetStartImage(); } @@ -980,8 +983,7 @@ RefButton::RefButton( Window* _pParent, WinBits nStyle ) : aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ), aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ), pAnyRefDlg( NULL ), - pRefEdit( NULL ), - pLabelWidget( NULL ) + pRefEdit( NULL ) { SetStartImage(); } @@ -991,15 +993,14 @@ 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, Window* pShrinkModeLabel, IControlReferenceHandler* _pDlg ) : +RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, 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 ), - pLabelWidget( pShrinkModeLabel ) + pRefEdit( pEdit ) { SetStartImage(); } @@ -1016,11 +1017,10 @@ void RefButton::SetEndImage() SetQuickHelpText( aExpandQuickHelp ); } -void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit, Window* pShrinkModeLabel ) +void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit ) { pAnyRefDlg = pDlg; pRefEdit = pEdit; - pLabelWidget = pShrinkModeLabel; } //---------------------------------------------------------------------------- diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 50a2d0ded967..77e8935b118b 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -387,8 +387,8 @@ void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBt ArgEdit& rEdArg, RefButton& rRefBtn) { - rRefBtn.SetReferences(pMyParent, &rEdArg, &rFtArg); - rEdArg.SetRefDialog(pMyParent); + rRefBtn.SetReferences(pMyParent, &rEdArg); + rEdArg.SetReferences(pMyParent, &rFtArg); aArgInput[nPos].InitArgInput (&rFtArg,&rBtnFx,&rEdArg,&rRefBtn); |