summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-20 11:06:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-22 21:29:36 +0200
commit60f3e4b843da89678e022eed837ee66e726b1920 (patch)
tree4cffea5d364e3ed9bd3e68c7b471f313c237a98e /sd
parent4a7ebfea57094b914c4b1c3e46936dbf67dec499 (diff)
place an intermediate class as parent for SfxTabPages
so a SfxTabPage can be parented by a vcl::Window or a welded native notebook tabpage. That ways the same SfxTabPage can be used at the same time in both a native dialog or a vcl dialog. The impl can be changed to the weld api, and when hosted in a native dialog the vcl impl of that will be instantiated, while native otherwise. e.g. print options appearing in print options dialog and general options. This allows incremental changeover. Change-Id: I6f1fed1e8d0898b01853bb878757bad41cbf9bba Reviewed-on: https://gerrit.libreoffice.org/53193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdmod.hxx2
-rw-r--r--sd/source/ui/app/sdmod2.cxx2
-rw-r--r--sd/source/ui/dlg/paragr.cxx6
-rw-r--r--sd/source/ui/dlg/prntopts.cxx4
-rw-r--r--sd/source/ui/dlg/tpaction.cxx4
-rw-r--r--sd/source/ui/dlg/tpoption.cxx12
-rw-r--r--sd/source/ui/inc/prntopts.hxx2
-rw-r--r--sd/source/ui/inc/tpaction.hxx2
-rw-r--r--sd/source/ui/inc/tpoption.hxx6
9 files changed, 20 insertions, 20 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 1c5e3848711a..51085fcc1cf1 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -112,7 +112,7 @@ public:
// virtual methods for the option dialog
virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
- virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) override;
+ virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) override;
virtual SfxStyleFamilies* CreateStyleFamilies() override;
SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache;
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 37a862294b29..5429a9b69e1a 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -740,7 +740,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
pViewShell->GetViewFrame()->GetBindings().InvalidateAll( true );
}
-VclPtr<SfxTabPage> SdModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
+VclPtr<SfxTabPage> SdModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
{
VclPtr<SfxTabPage> pRet;
SfxAllItemSet aSet(*(rSet.GetPool()));
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 82c6a5f72daf..3b7aa7698cc6 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -39,7 +39,7 @@ public:
virtual ~SdParagraphNumTabPage() override;
virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
+ static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges();
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -82,9 +82,9 @@ void SdParagraphNumTabPage::dispose()
SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SdParagraphNumTabPage::Create(vcl::Window *pParent, const SfxItemSet * rAttrSet)
+VclPtr<SfxTabPage> SdParagraphNumTabPage::Create(TabPageParent pParent, const SfxItemSet * rAttrSet)
{
- return VclPtr<SdParagraphNumTabPage>::Create( pParent, *rAttrSet );
+ return VclPtr<SdParagraphNumTabPage>::Create( pParent.pParent, *rAttrSet );
}
const sal_uInt16* SdParagraphNumTabPage::GetRanges()
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 4673c0c25d71..ea553b13be7c 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -202,10 +202,10 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
ClickBookletHdl( nullptr );
}
-VclPtr<SfxTabPage> SdPrintOptions::Create( vcl::Window* pWindow,
+VclPtr<SfxTabPage> SdPrintOptions::Create( TabPageParent pWindow,
const SfxItemSet* rOutAttrs )
{
- return VclPtr<SdPrintOptions>::Create( pWindow, *rOutAttrs );
+ return VclPtr<SdPrintOptions>::Create( pWindow.pParent, *rOutAttrs );
}
IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, Button*, pCbx, void )
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 406062052629..188068ed595c 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -372,10 +372,10 @@ DeactivateRC SdTPAction::DeactivatePage( SfxItemSet* pPageSet )
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SdTPAction::Create( vcl::Window* pWindow,
+VclPtr<SfxTabPage> SdTPAction::Create( TabPageParent pWindow,
const SfxItemSet& rAttrs )
{
- return VclPtr<SdTPAction>::Create( pWindow, rAttrs );
+ return VclPtr<SdTPAction>::Create( pWindow.pParent, rAttrs );
}
void SdTPAction::UpdateTree()
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a7381b2abd38..53c4487681fb 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -100,10 +100,10 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
pCbxRotate->GetClickHdl().Call(nullptr);
}
-VclPtr<SfxTabPage> SdTpOptionsSnap::Create( vcl::Window* pWindow,
+VclPtr<SfxTabPage> SdTpOptionsSnap::Create( TabPageParent pWindow,
const SfxItemSet* rAttrs )
{
- return VclPtr<SdTpOptionsSnap>::Create( pWindow, *rAttrs );
+ return VclPtr<SdTpOptionsSnap>::Create( pWindow.pParent, *rAttrs );
}
/*************************************************************************
@@ -173,10 +173,10 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
m_pCbxHandlesBezier->SaveValue();
}
-VclPtr<SfxTabPage> SdTpOptionsContents::Create( vcl::Window* pWindow,
+VclPtr<SfxTabPage> SdTpOptionsContents::Create( TabPageParent pWindow,
const SfxItemSet* rAttrs )
{
- return VclPtr<SdTpOptionsContents>::Create( pWindow, *rAttrs );
+ return VclPtr<SdTpOptionsContents>::Create( pWindow.pParent, *rAttrs );
}
/*************************************************************************
@@ -526,10 +526,10 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
UpdateCompatibilityControls ();
}
-VclPtr<SfxTabPage> SdTpOptionsMisc::Create( vcl::Window* pWindow,
+VclPtr<SfxTabPage> SdTpOptionsMisc::Create( TabPageParent pWindow,
const SfxItemSet* rAttrs )
{
- return VclPtr<SdTpOptionsMisc>::Create( pWindow, *rAttrs );
+ return VclPtr<SdTpOptionsMisc>::Create( pWindow.pParent, *rAttrs );
}
IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl, ListBox&, void)
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 3b64109e1dc5..bf3074247f16 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -63,7 +63,7 @@ public:
virtual ~SdPrintOptions() override;
virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
+ static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 8ca9566ab438..fce151ba92a8 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -95,7 +95,7 @@ public:
virtual ~SdTPAction() override;
virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 11ecd30a78a5..7970c6c1b331 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -37,7 +37,7 @@ public:
SdTpOptionsSnap( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsSnap() override;
- static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
+ static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -59,7 +59,7 @@ public:
virtual ~SdTpOptionsContents() override;
virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
+ static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
};
@@ -133,7 +133,7 @@ public:
virtual ~SdTpOptionsMisc() override;
virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
+ static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;