summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-05-14 10:18:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-05-14 13:51:44 +0100
commita322988084878e428f013438720841771650a68e (patch)
tree6d83a0fc87cd247340bc028c268bdd6814d9d5c7 /sc
parentc4f46a2c9a70895c6f62016fcace824b01c5ed2b (diff)
refactor raw use of ScHFEditDlg to use ScAbstractDialogFactory
Change-Id: Id9591bef0845b65d496103f82b0af5a828c4eaac
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx11
2 files changed, 9 insertions, 4 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2c9bbc37e650..37a8a4cb1250 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1240,7 +1240,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF
const String& rPageStyle,
sal_uInt16 nResId )
{
- SfxTabDialog* pDlg = new ScHFEditDlg( pFrame, pParent, rCoreSet,rPageStyle, nResId );
+ SfxTabDialog* pDlg = new ScHFEditDlg( pFrame, pParent, rCoreSet, rPageStyle, nResId );
return new ScAbstractTabDialog_Impl( pDlg );
}
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index bcc4594e29cc..7c39776c0c9a 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -33,6 +33,7 @@
#include "tphf.hxx"
#include "sc.hrc"
+#include "scabstdlg.hxx"
#include "globstr.hrc"
#include "tabvwsh.hxx"
#include "viewdata.hxx"
@@ -204,10 +205,14 @@ IMPL_LINK_NOARG(ScHFPage, HFEditHdl)
? RID_SCDLG_HFED_HEADER
: RID_SCDLG_HFED_FOOTER;
- ScHFEditDlg* pDlg
- = new ScHFEditDlg( pViewSh->GetViewFrame(), this,
- aDataSet, aStrPageStyle, nResId );
+ ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+ OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
+
+ SfxAbstractTabDialog* pDlg = pFact->CreateScHFEditDlg(
+ pViewSh->GetViewFrame(), this, aDataSet, aStrPageStyle, nResId);
+
+ OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
aDataSet.Put( *pDlg->GetOutputItemSet() );