summaryrefslogtreecommitdiff
path: root/formula
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 /formula
parent4e0c6a0ac78d3c68922e032eec7f9c05cc39023a (diff)
make link RefButton and widget for shrunk dialog title explicit
Change-Id: Ia6dd6cc4cf89b067310639bc3da72abbc6fa1ad2
Diffstat (limited to 'formula')
-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
4 files changed, 26 insertions, 21 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);