diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 22:26:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:41 +0100 |
commit | 2aa2a25157f11e1502e78abd8056b16540c76e3a (patch) | |
tree | 57b4f78d4d51a3c794b4a3071b6f4d586d0bcf4d /sfx2 | |
parent | Drop hard-coded layout for wordcount and use Gokul's .ui (diff) | |
download | core-2aa2a25157f11e1502e78abd8056b16540c76e3a.tar.gz core-2aa2a25157f11e1502e78abd8056b16540c76e3a.zip |
enable SfxModelessDialog to load from .ui as well
Change-Id: I31c93091778b9fd51521699c955df8834b9168ff
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/basedlgs.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 26 |
2 files changed, 22 insertions, 8 deletions
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx index c5c8f559059a..a3cd1eff3a19 100644 --- a/sfx2/inc/sfx2/basedlgs.hxx +++ b/sfx2/inc/sfx2/basedlgs.hxx @@ -99,9 +99,13 @@ class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined + void Init(SfxBindings *pBindinx, SfxChildWindow *pCW); + protected: SfxModelessDialog( SfxBindings*, SfxChildWindow*, Window*, const ResId& ); + SfxModelessDialog( SfxBindings*, SfxChildWindow*, + Window*, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription ); ~SfxModelessDialog(); virtual sal_Bool Close(); virtual void Resize(); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 552d358bc9a0..c784ab8a7f4c 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -339,19 +339,29 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl) return 0; } -// ----------------------------------------------------------------------- +SfxModelessDialog::SfxModelessDialog(SfxBindings *pBindinx, + SfxChildWindow *pCW, Window *pParent, const ResId& rResId) + : ModelessDialog(pParent, rResId) +{ + Init(pBindinx, pCW); + SetHelpId(""); +} -SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx, - SfxChildWindow *pCW, Window *pParent, - const ResId& rResId ) : - ModelessDialog(pParent, rResId), - pBindings(pBindinx), - pImp( new SfxModelessDialog_Impl ) +SfxModelessDialog::SfxModelessDialog(SfxBindings* pBindinx, + SfxChildWindow *pCW, Window *pParent, const rtl::OString& rID, + const rtl::OUString& rUIXMLDescription) + : ModelessDialog(pParent, rID, rUIXMLDescription) { + Init(pBindinx, pCW); +} + +void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW) +{ + pBindings = pBindinx; + pImp = new SfxModelessDialog_Impl; pImp->pMgr = pCW; pImp->bConstructed = sal_False; SetUniqueId( GetHelpId() ); - SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); pImp->aMoveTimer.SetTimeout(50); |