summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-28 15:34:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-28 19:05:09 +0200
commit990ced77a5a8c27d69d40a702b3122850dcb04f0 (patch)
tree6fecb21dd2cc9e72349e38232cec4a7fd22566f4 /chart2
parent7f5cc838f055c0b083cca1d90a5b2d00b5a44ad5 (diff)
weld NumberFormatDialog
Change-Id: I82f3574142bbcdfba5277a7ad5db82e3a33fdbd8 Reviewed-on: https://gerrit.libreoffice.org/61092 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.cxx14
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.hxx6
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx10
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.cxx2
6 files changed, 19 insertions, 19 deletions
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
index 646ba40b8699..4bfb943fddc9 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
@@ -27,7 +27,7 @@ DataLabelsDialog::DataLabelsDialog(vcl::Window* pWindow, const SfxItemSet& rInAt
ModalDialog(pWindow
,"dlg_DataLabels"
,"modules/schart/ui/dlg_DataLabel.ui"),
- m_apDataLabelResources( new DataLabelResources(this, this, rInAttrs) )
+ m_apDataLabelResources( new DataLabelResources(this, GetFrameWeld(), rInAttrs) )
{
m_apDataLabelResources->SetNumberFormatter( pFormatter );
m_apDataLabelResources->Reset(rInAttrs);
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index bcffbbdfe7c2..ca9a74146cc9 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -30,17 +30,17 @@ namespace chart
{
using namespace ::com::sun::star;
-NumberFormatDialog::NumberFormatDialog(vcl::Window* pParent, SfxItemSet& rSet)
- : SfxSingleTabDialog(pParent, rSet, "FormatNumberDialog",
- "cui/ui/formatnumberdialog.ui")
+NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, SfxItemSet& rSet)
+ : SfxSingleTabDialogController(pParent, rSet, "cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
- if ( fnCreatePage )
+ if (fnCreatePage)
{
- VclPtr<SfxTabPage> pTabPage = (*fnCreatePage)( get_content_area(), &rSet );
- pTabPage->PageCreated(rSet);
- SetTabPage(pTabPage);
+ TabPageParent pPageParent(get_content_area(), this);
+ VclPtr<SfxTabPage> xTabPage = (*fnCreatePage)(pPageParent, &rSet);
+ xTabPage->PageCreated(rSet);
+ SetTabPage(xTabPage);
}
}
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
index 1aff53582645..6bd79a00e837 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
@@ -21,16 +21,16 @@
#include <sfx2/basedlgs.hxx>
-namespace vcl { class Window; }
+namespace weld { class Window; }
class SfxItemSet;
namespace chart
{
-class NumberFormatDialog : public SfxSingleTabDialog
+class NumberFormatDialog : public SfxSingleTabDialogController
{
public:
- NumberFormatDialog(vcl::Window* pParent, SfxItemSet& rSet);
+ NumberFormatDialog(weld::Window* pParent, SfxItemSet& rSet);
static SfxItemSet CreateEmptyItemSetForNumberFormatDialog( SfxItemPool& rItemPool );
};
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 547f081e155c..95094b4b8d8a 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -85,7 +85,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId,
}//end anonymous namespace
-DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window* pParent, const SfxItemSet& rInAttrs )
+DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, weld::Window* pParent, const SfxItemSet& rInAttrs )
:
m_pNumberFormatter(nullptr),
m_bNumberFormatMixedState(true),
@@ -204,12 +204,12 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, Button *, pButton, void )
aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey ));
aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat ));
- ScopedVclPtrInstance< NumberFormatDialog > aDlg(m_pWindow, aNumberSet);
+ NumberFormatDialog aDlg(m_pWindow, aNumberSet);
if( bPercent )
- aDlg->SetText( m_pFT_NumberFormatForPercent->GetText());
- if( aDlg->Execute() == RET_OK )
+ aDlg.set_title(m_pFT_NumberFormatForPercent->GetText());
+ if (aDlg.run() == RET_OK)
{
- const SfxItemSet* pResult = aDlg->GetOutputItemSet();
+ const SfxItemSet* pResult = aDlg.GetOutputItemSet();
if( pResult )
{
bool bOldSource = rUseSourceFormat;
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 94dd92696871..807c3fc70dc1 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -34,7 +34,7 @@ namespace chart
class DataLabelResources final
{
public:
- DataLabelResources( VclBuilderContainer* pWindow, vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ DataLabelResources( VclBuilderContainer* pWindow, weld::Window* pParent, const SfxItemSet& rInAttrs );
~DataLabelResources();
void FillItemSet(SfxItemSet* rOutAttrs) const;
@@ -80,7 +80,7 @@ private:
bool m_bSourceFormatForValue;
bool m_bSourceFormatForPercent;
- VclPtr<vcl::Window> m_pWindow;
+ weld::Window* m_pWindow;
SfxItemPool* m_pPool;
DECL_LINK(NumberFormatDialogHdl, Button *, void );
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx
index 88365d9a5572..30d35707789b 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx
@@ -29,7 +29,7 @@ DataLabelsTabPage::DataLabelsTabPage(vcl::Window* pWindow, const SfxItemSet& rIn
, "tp_DataLabel"
, "modules/schart/ui/tp_DataLabel.ui"
, &rInAttrs)
- , m_aDataLabelResources(this, this, rInAttrs)
+ , m_aDataLabelResources(this, GetFrameWeld(), rInAttrs)
{
}