Fix SfxTabPage creation to use VclPtr.

Change-Id: Ia0e8b666daec7b5eaba119c758b9ca1ec8276128
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 7b9baed..c9f53c5 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -99,9 +99,9 @@ void SchAxisLabelTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SchAxisLabelTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SchAxisLabelTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs )
{
    return new SchAxisLabelTabPage( pParent, *rAttrs );
    return VclPtr<SchAxisLabelTabPage>::Create( pParent, *rAttrs );
}

bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 2f01f32..ef591d0 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -72,7 +72,7 @@ public:
    virtual ~SchAxisLabelTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;

diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 1807af7..2107e9c 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -108,9 +108,9 @@ void AxisPositionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* AxisPositionsTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> AxisPositionsTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
{
    return new AxisPositionsTabPage(pWindow, *rOutAttrs);
    return VclPtr<AxisPositionsTabPage>::Create(pWindow, *rOutAttrs);
}

bool AxisPositionsTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index ee73d52..b2bd45b 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -36,7 +36,7 @@ public:
    virtual ~AxisPositionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;
    using TabPage::DeactivatePage;
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx
index da3add7..432290d 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx
@@ -34,9 +34,9 @@ DataLabelsTabPage::DataLabelsTabPage(vcl::Window* pWindow, const SfxItemSet& rIn
{
}

SfxTabPage* DataLabelsTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> DataLabelsTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
{
    return new DataLabelsTabPage(pWindow, *rOutAttrs);
    return VclPtr<DataLabelsTabPage>::Create(pWindow, *rOutAttrs);
}

bool DataLabelsTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx
index a976306..0699b8a 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx
@@ -35,7 +35,7 @@ class DataLabelsTabPage : public SfxTabPage
public:
    DataLabelsTabPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs);

    static SfxTabPage* Create(vcl::Window* pWindow, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pWindow, const SfxItemSet* rInAttrs);

    void SetNumberFormatter( SvNumberFormatter* pFormatter );

diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
index 4d58bb7..adac35e 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
@@ -41,10 +41,10 @@ ErrorBarsTabPage::ErrorBarsTabPage( vcl::Window* pParent, const SfxItemSet& rInA
{
}

SfxTabPage* ErrorBarsTabPage::Create(
VclPtr<SfxTabPage> ErrorBarsTabPage::Create(
    vcl::Window* pParent, const SfxItemSet* rOutAttrs )
{
    return new ErrorBarsTabPage( pParent, *rOutAttrs );
    return VclPtr<ErrorBarsTabPage>::Create( pParent, *rOutAttrs );
}

bool ErrorBarsTabPage::FillItemSet( SfxItemSet* rOutAttrs )
diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.hxx b/chart2/source/controller/dialogs/tp_ErrorBars.hxx
index 6da7692..4ac8bdb 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.hxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.hxx
@@ -37,7 +37,7 @@ public:
        const ::com::sun::star::uno::Reference<
            ::com::sun::star::chart2::XChartDocument > & xChartDocument );

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;

diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 36df837..1a264f5 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -53,9 +53,9 @@ void SchLegendPosTabPage::dispose()
}


SfxTabPage* SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
{
    return new SchLegendPosTabPage(pWindow, *rOutAttrs);
    return VclPtr<SchLegendPosTabPage>::Create(pWindow, *rOutAttrs);
}

bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index bbf8e1d..13f46f2 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -40,7 +40,7 @@ public:
    virtual ~SchLegendPosTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;
};
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index dac67a6..5975806 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -49,10 +49,10 @@ void SchLayoutTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SchLayoutTabPage::Create(vcl::Window* pWindow,
                                        const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> SchLayoutTabPage::Create(vcl::Window* pWindow,
                                            const SfxItemSet* rOutAttrs)
{
    return new SchLayoutTabPage(pWindow, *rOutAttrs);
    return VclPtr<SchLayoutTabPage>::Create(pWindow, *rOutAttrs);
}

bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx
index 5c142c0..7283f5f 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx
@@ -32,7 +32,7 @@ public:
    virtual ~SchLayoutTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;

diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index 394c953..d01f02b 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -60,9 +60,9 @@ void PolarOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* PolarOptionsTabPage::Create( vcl::Window* pWindow,const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> PolarOptionsTabPage::Create( vcl::Window* pWindow,const SfxItemSet* rOutAttrs )
{
    return new PolarOptionsTabPage( pWindow, *rOutAttrs );
    return VclPtr<PolarOptionsTabPage>::Create( pWindow, *rOutAttrs );
}

bool PolarOptionsTabPage::FillItemSet( SfxItemSet* rOutAttrs )
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
index 29e6728..0b65cb7 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
@@ -36,7 +36,7 @@ public:
    virtual ~PolarOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;

diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 3803d59..fb02245 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -271,9 +271,9 @@ IMPL_LINK_NOARG(ScaleTabPage, SelectAxisTypeHdl)
    return 0;
}

SfxTabPage* ScaleTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> ScaleTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
{
    return new ScaleTabPage(pWindow, *rOutAttrs);
    return VclPtr<ScaleTabPage>::Create(pWindow, *rOutAttrs);
}

bool ScaleTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index 529641d..b8a5396 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -36,7 +36,7 @@ public:
    virtual ~ScaleTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;
    using TabPage::DeactivatePage;
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 350aad5..e6d3721 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -97,9 +97,10 @@ IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl)
    return 0;
}

SfxTabPage* SchOptionTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
VclPtr<SfxTabPage> SchOptionTabPage::Create(vcl::Window* pWindow,
                                            const SfxItemSet* rOutAttrs)
{
    return new SchOptionTabPage(pWindow, *rOutAttrs);
    return VclPtr<SchOptionTabPage>::Create(pWindow, *rOutAttrs);
}

bool SchOptionTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
index b50f90f..1d0b2e3 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
@@ -34,7 +34,7 @@ public:
    virtual ~SchOptionTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;

diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index 47c8966..25fa53d 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -74,16 +74,16 @@ void SchAlignmentTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SchAlignmentTabPage::Create(vcl::Window* pParent,
                                        const SfxItemSet* rInAttrs)
VclPtr<SfxTabPage> SchAlignmentTabPage::Create(vcl::Window* pParent,
                                               const SfxItemSet* rInAttrs)
{
    return new SchAlignmentTabPage(pParent, *rInAttrs);
    return VclPtr<SchAlignmentTabPage>::Create(pParent, *rInAttrs);
}

SfxTabPage* SchAlignmentTabPage::CreateWithoutRotation(vcl::Window* pParent,
                                        const SfxItemSet* rInAttrs)
VclPtr<SfxTabPage> SchAlignmentTabPage::CreateWithoutRotation(vcl::Window* pParent,
                                                              const SfxItemSet* rInAttrs)
{
    return new SchAlignmentTabPage(pParent, *rInAttrs, false);
    return VclPtr<SchAlignmentTabPage>::Create(pParent, *rInAttrs, false);
}

bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index 8450d6a..c7a20a2 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -45,8 +45,8 @@ public:
    virtual ~SchAlignmentTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static SfxTabPage* CreateWithoutRotation(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    static VclPtr<SfxTabPage> CreateWithoutRotation(vcl::Window* pParent, const SfxItemSet* rInAttrs);
    virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;
};
diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx
index 258876b..34939d4 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.cxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.cxx
@@ -31,10 +31,10 @@ TrendlineTabPage::TrendlineTabPage( vcl::Window* pParent, const SfxItemSet& rInA
{
}

SfxTabPage* TrendlineTabPage::Create(
VclPtr<SfxTabPage> TrendlineTabPage::Create(
    vcl::Window* pParent, const SfxItemSet* rOutAttrs )
{
    return new TrendlineTabPage( pParent, *rOutAttrs );
    return VclPtr<TrendlineTabPage>::Create( pParent, *rOutAttrs );
}

bool TrendlineTabPage::FillItemSet( SfxItemSet* rOutAttrs )
diff --git a/chart2/source/controller/dialogs/tp_Trendline.hxx b/chart2/source/controller/dialogs/tp_Trendline.hxx
index 077cc7c..bdd9848e 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.hxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.hxx
@@ -31,7 +31,7 @@ class TrendlineTabPage : public SfxTabPage
public:
    TrendlineTabPage ( vcl::Window* pParent, const SfxItemSet& rInAttrs );

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 89a79b7..05bbcd5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -735,24 +735,24 @@ ConvertToolbarEntry(
    return aPropSeq;
}

SfxTabPage *CreateSvxMenuConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> CreateSvxMenuConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
{
    return new SvxMenuConfigPage( pParent, *rSet );
    return VclPtr<SvxMenuConfigPage>::Create( pParent, *rSet );
}

SfxTabPage *CreateKeyboardConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> CreateKeyboardConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
{
       return new SfxAcceleratorConfigPage( pParent, *rSet );
       return VclPtr<SfxAcceleratorConfigPage>::Create( pParent, *rSet );
}

SfxTabPage *CreateSvxToolbarConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> CreateSvxToolbarConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
{
    return new SvxToolbarConfigPage( pParent, *rSet );
    return VclPtr<SvxToolbarConfigPage>::Create( pParent, *rSet );
}

SfxTabPage *CreateSvxEventConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> CreateSvxEventConfigPage( vcl::Window *pParent, const SfxItemSet* rSet )
{
    return new SvxEventConfigPage( pParent, *rSet, SvxEventConfigPage::EarlyInit() );
    return VclPtr<SvxEventConfigPage>::Create( pParent, *rSet, SvxEventConfigPage::EarlyInit() );
}

namespace {
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 45d1a930..f2e62e7 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -525,8 +525,8 @@ void SpellDialog::StartSpellOptDlg_Impl()
    aSet.Put(SfxSpellCheckItem( xSpell, SID_ATTR_SPELL ));
    VclPtr<SfxSingleTabDialog> pDlg(
        new SfxSingleTabDialog(this, aSet, "SpellOptionsDialog", "cui/ui/spelloptionsdialog.ui"));
    SfxTabPage* pPage = SvxLinguTabPage::Create( pDlg->get_content_area(), &aSet );
    static_cast<SvxLinguTabPage*>(pPage)->HideGroups( GROUP_MODULES );
    VclPtr<SfxTabPage> pPage = SvxLinguTabPage::Create( pDlg->get_content_area(), &aSet );
    static_cast<SvxLinguTabPage*>(pPage.get())->HideGroups( GROUP_MODULES );
    pDlg->SetTabPage( pPage );
    if(RET_OK == pDlg->Execute())
    {
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1683bdb..34a64c9 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -757,9 +757,9 @@ bool TPGalleryThemeGeneral::FillItemSet( SfxItemSet* /*rSet*/ )



SfxTabPage* TPGalleryThemeGeneral::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> TPGalleryThemeGeneral::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new TPGalleryThemeGeneral( pParent, *rSet );
    return VclPtr<TPGalleryThemeGeneral>::Create( pParent, *rSet );
}

// - TPGalleryThemeProperties -
@@ -854,13 +854,11 @@ void TPGalleryThemeProperties::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* TPGalleryThemeProperties::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> TPGalleryThemeProperties::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new TPGalleryThemeProperties( pParent, *rSet );
    return VclPtr<TPGalleryThemeProperties>::Create( pParent, *rSet );
}



OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, const OUString& _rExtension )
{
    OUString sAllFilter( "(*.*)" );
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 0be6bc6..31613ba 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -60,7 +60,7 @@ public:
    virtual             ~AlignmentTabPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static const sal_uInt16*  GetRanges() { return s_pRanges; }

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index bed9ffc..2d8eb1f 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -112,7 +112,7 @@ public:
    virtual ~OfaAutocorrOptionsPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -170,7 +170,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
        virtual void dispose() SAL_OVERRIDE;

public:
        static SfxTabPage*  Create( vcl::Window* pParent,
        static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
        virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
        virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -264,7 +264,7 @@ public:
                        virtual ~OfaAutocorrReplacePage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -323,7 +323,7 @@ public:
                        virtual ~OfaAutocorrExceptPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -390,7 +390,7 @@ public:
                        virtual ~OfaQuoteTabPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -442,7 +442,7 @@ private:
public:
    virtual ~OfaAutoCompleteTabPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -470,9 +470,6 @@ private:
    VclPtr<SvxCheckListBox>        m_pSmartTagTypesLB;
    VclPtr<PushButton>             m_pPropertiesPB;

    /// construction via Create()
    OfaSmartTagOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );

    /** Inserts items into m_aSmartTagTypesLB

        Reads out the smart tag types supported by the SmartTagMgr and
@@ -506,10 +503,12 @@ private:
    DECL_LINK(SelectHdl, void *);

public:
    /// construction via Create()
    OfaSmartTagOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~OfaSmartTagOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 57142af..9aeb906 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -47,7 +47,7 @@ class SvxBackgroundTabPage : public SvxTabPage
    using TabPage::DeactivatePage;
    static const sal_uInt16 pPageRanges[];
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    // returns the area of the which-values
    static const sal_uInt16* GetRanges() { return pPageRanges; }

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index ff4b48a..3c3a79b 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -47,7 +47,7 @@ class SvxBorderTabPage : public SfxTabPage
public:
    virtual ~SvxBorderTabPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static const sal_uInt16*      GetRanges() { return pRanges; }

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index f1075a9..8b185cd 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -155,7 +155,7 @@ public:
                        virtual ~SvxCharNamePage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pNameRanges; }

    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -236,7 +236,7 @@ public:
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pEffectsRanges; }

    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -319,7 +319,7 @@ public:
    virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;

public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges() { return pPositionRanges; }

    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -364,7 +364,7 @@ public:
    virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*  GetRanges() { return pTwoLinesRanges; }

    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
index aae2744..875ff89 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -65,7 +65,7 @@ public:
    virtual ~SvxConnectionPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage>  Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pRanges; }

    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index e02d6a1..a1855b1 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -235,7 +235,7 @@ public:
    void                SetXChgData( ExchangeData* pData );
    const ExchangeData* GetXChgData() const { return pData; }

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
};

typedef ::std::vector< FilterEntry* > FilterEntryList_impl;
@@ -303,7 +303,7 @@ public:

    void                StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult );

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
};

#endif // INCLUDED_CUI_SOURCE_INC_CUIGALDLG_HXX
diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index 2a4c295..15406bb 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -67,7 +67,7 @@ public:
    virtual ~SvxGeneralTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx
index 376f919..be75242 100644
--- a/cui/source/inc/cuisrchdlg.hxx
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -36,8 +36,8 @@ class SvxJSearchOptionsPage;

class SvxJSearchOptionsDialog : public SfxSingleTabDialog
{
    sal_Int32                   nInitialTlFlags;
    VclPtr<SvxJSearchOptionsPage>  pPage;
    sal_Int32                     nInitialTlFlags;
    VclPtr<SvxJSearchOptionsPage> pPage;

    SvxJSearchOptionsDialog( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION;
    SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION;
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 42e668c..c251259 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -163,7 +163,7 @@ public:
    virtual ~SvxTransparenceTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window*, const SfxItemSet*);
    static VclPtr<SfxTabPage> Create(vcl::Window*, const SfxItemSet*);
    static const sal_uInt16* GetRanges() { return pTransparenceRanges; }

    virtual bool FillItemSet(SfxItemSet*) SAL_OVERRIDE;
@@ -295,7 +295,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pAreaRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -363,7 +363,7 @@ public:
    virtual void dispose() SAL_OVERRIDE;

    void    Construct();
    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pShadowRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -445,7 +445,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

@@ -523,7 +523,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

@@ -610,7 +610,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

@@ -745,7 +745,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 6f19fb7..3aac793 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -208,7 +208,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pLineRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -308,7 +308,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

@@ -379,7 +379,7 @@ public:

    void    Construct();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index fa714753b..cf01421 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -93,7 +93,7 @@ namespace svx
        virtual ~DbRegistrationOptionsPage();
        virtual void dispose() SAL_OVERRIDE;

        static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
        static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
        static const sal_uInt16*      GetRanges();

        virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx
index 0d07317..46e1812 100644
--- a/cui/source/inc/dstribut.hxx
+++ b/cui/source/inc/dstribut.hxx
@@ -47,7 +47,7 @@ public:
    virtual ~SvxDistributePage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window*, const SfxItemSet&,
    static VclPtr<SfxTabPage> Create(vcl::Window*, const SfxItemSet&,
        SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
    virtual bool FillItemSet(SfxItemSet*) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet*) SAL_OVERRIDE;
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index e52d39c..165bd5d 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -112,7 +112,7 @@ class SvxGrfCropPage : public SfxTabPage

    Size            GetGrfOrigSize( const Graphic& ) const;
public:
    static SfxTabPage *Create( vcl::Window *pParent, const SfxItemSet *rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window *pParent, const SfxItemSet *rSet );

    virtual bool FillItemSet( SfxItemSet *rSet ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet *rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx
index 7b20283..610c63b 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -78,7 +78,7 @@ public:
    virtual ~SvxCaptionTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage>  Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16*  GetRanges() { return pCaptionRanges; }

    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index f05f6d5..696c8bf 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -97,7 +97,7 @@ public:
    );

    // --------- inherit from the base -------------
    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
};

class SfxMacroAssignDlg : public SfxSingleTabDialog
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 18b0fc6..28dbdfd 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -69,7 +69,7 @@ public:
    virtual ~SvxMeasurePage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage>  Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pRanges; }

    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 552f592..518feaf 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -72,7 +72,7 @@ public:
    virtual ~SvxNumberFormatTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet );
    // Returns area information.
    static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index f2cb95c..f996305 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -111,7 +111,7 @@ public:
    virtual ~SvxSingleNumPickTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
@@ -148,7 +148,7 @@ public:
    virtual ~SvxBulletPickTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
@@ -192,7 +192,7 @@ public:
    virtual ~SvxNumPickTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
@@ -238,7 +238,7 @@ public:
        virtual ~SvxBitmapPickTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
@@ -351,7 +351,7 @@ public:
        virtual ~SvxNumOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
@@ -460,7 +460,7 @@ public:
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    void                SetMetric(FieldUnit eSet);
diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx
index 5be6d80..39d18ef4 100644
--- a/cui/source/inc/optasian.hxx
+++ b/cui/source/inc/optasian.hxx
@@ -52,13 +52,12 @@ class SvxAsianLayoutPage : public SfxTabPage
    DECL_LINK(ChangeStandardHdl, CheckBox*);
    DECL_LINK(ModifyHdl, Edit*);

    SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:

    SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxAsianLayoutPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static const sal_uInt16*  GetRanges();
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 0dea8bc..f99e3bb 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -149,7 +149,7 @@ private:
public:
    virtual             ~SvxLinguTabPage();
    virtual void        dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 3e0ff7e..df078ce 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -73,7 +73,7 @@ public:
    virtual ~SvxPathTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges();

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 0b75959..24e14ce 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -188,7 +188,7 @@ protected:
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    // returns the range of the Which values
    static const sal_uInt16* GetRanges() { return pRanges; }

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 401158e..7f7bf66 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -103,7 +103,7 @@ public:

    DECL_LINK(ELRLoseFocusHdl, void *);

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pStdRanges; }

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -165,7 +165,7 @@ public:
    virtual ~SvxParaAlignTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pAlignRanges; }

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -198,7 +198,7 @@ public:
    virtual ~SvxExtParagraphTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pExtRanges; }

@@ -278,7 +278,7 @@ public:
    virtual ~SvxAsianTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges();

diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 5ed3ad7..0b61489 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -126,7 +126,7 @@ public:
    virtual ~SvxSwPosSizeTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16*     GetRanges();

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 4a67cd9..3590a17 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -51,7 +51,7 @@ class SvxTabulatorTabPage : public SfxTabPage
public:
    virtual ~SvxTabulatorTabPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return pRanges; }

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
index 8ba2ad2..875b4d2 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -79,7 +79,7 @@ public:
    virtual ~SvxTextAnimationPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage>  Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() { return pRanges; }

    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
index eacc826..9846f0d 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -80,7 +80,7 @@ public:
    virtual ~SvxTextAttrPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage>  Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16*  GetRanges() { return pRanges; }

    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index e2a5163..b3a56b2 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -149,7 +149,7 @@ public:
    virtual ~SvxPositionSizeTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() {  return pPosSizeRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -207,7 +207,7 @@ public:
    virtual ~SvxAngleTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16*  GetRanges() { return pAngleRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -254,7 +254,7 @@ public:
    virtual ~SvxSlantTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    static const sal_uInt16* GetRanges() {  return pSlantRanges; }

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index a8ae9c6..562c762 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -343,12 +343,11 @@ namespace offapp
        SfxTabPage::dispose();
    }

    SfxTabPage* ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet)
    VclPtr<SfxTabPage> ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet)
    {
        return new ConnectionPoolOptionsPage(_pParent, *_rAttrSet);
        return VclPtr<ConnectionPoolOptionsPage>::Create(_pParent, *_rAttrSet);
    }


    void ConnectionPoolOptionsPage::implInitControls(const SfxItemSet& _rSet, bool /*_bFromReset*/)
    {
        // the enabled flag
diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx
index 8650d12..d8e4c25 100644
--- a/cui/source/options/connpooloptions.hxx
+++ b/cui/source/options/connpooloptions.hxx
@@ -47,13 +47,11 @@ namespace offapp
        VclPtr<FixedText>              m_pTimeoutLabel;
        VclPtr<NumericField>           m_pTimeout;

    protected:
        ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet);

    public:
        ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet);
        virtual ~ConnectionPoolOptionsPage();
        virtual void dispose() SAL_OVERRIDE;
        static SfxTabPage*  Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet);
        static VclPtr<SfxTabPage>  Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet);

    protected:
        virtual bool        Notify( NotifyEvent& _rNEvt ) SAL_OVERRIDE;
diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx
index 805c8da..bff4d1a 100644
--- a/cui/source/options/cuisrchdlg.cxx
+++ b/cui/source/options/cuisrchdlg.cxx
@@ -54,8 +54,9 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(vcl::Window *pParent,
{
    // pPage will be implicitly destroyed by the
    // SfxSingleTabDialog destructor
    pPage = static_cast<SvxJSearchOptionsPage *>(
        SvxJSearchOptionsPage::Create(get_content_area(), &rOptionsSet ));
    pPage.reset( static_cast<SvxJSearchOptionsPage *>(
                        SvxJSearchOptionsPage::Create(
                                get_content_area(), &rOptionsSet ).get() ) );
    SetTabPage( pPage );    //! implicitly calls pPage->Reset(...)!
    pPage->EnableSaveOptions(false);
}
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index aa90f37..679e313 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -78,7 +78,7 @@ DatabaseRegistrationDialog::DatabaseRegistrationDialog( vcl::Window* pParent, co
    : RegistrationItemSetHolder(rInAttrs)
    , SfxSingleTabDialog(pParent, getRegistrationItems())
{
    SfxTabPage* page = DbRegistrationOptionsPage::Create(get_content_area(), &getRegistrationItems());
    VclPtr<SfxTabPage> page = DbRegistrationOptionsPage::Create(get_content_area(), &getRegistrationItems());
    SetTabPage(page);
    SetText(page->get<VclFrame>("frame1")->get_label());
}
@@ -180,10 +180,10 @@ void DbRegistrationOptionsPage::dispose()



SfxTabPage* DbRegistrationOptionsPage::Create( vcl::Window* pParent,
VclPtr<SfxTabPage> DbRegistrationOptionsPage::Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet )
{
    return ( new DbRegistrationOptionsPage( pParent, *rAttrSet ) );
    return VclPtr<DbRegistrationOptionsPage>::Create( pParent, *rAttrSet );
}


diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index ae6a02c..5fc134c 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -160,10 +160,10 @@ void SvxFontSubstTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxFontSubstTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxFontSubstTabPage::Create( vcl::Window* pParent,
                                                const SfxItemSet* rAttrSet)
{
    return new SvxFontSubstTabPage(pParent, *rAttrSet);
    return VclPtr<SvxFontSubstTabPage>::Create(pParent, *rAttrSet);
}

bool  SvxFontSubstTabPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 3a5b967..27847da 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -91,12 +91,12 @@ class SvxFontSubstTabPage : public SfxTabPage
    void            CheckEnable();


    SvxFontSubstTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxFontSubstTabPage();
    virtual void dispose() SAL_OVERRIDE;

public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    SvxFontSubstTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
};
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx
index d6b78b8..d781ed26 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -77,9 +77,9 @@ void SvxAccessibilityOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxAccessibilityOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxAccessibilityOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxAccessibilityOptionsTabPage(pParent, *rAttrSet);
    return VclPtr<SvxAccessibilityOptionsTabPage>::Create(pParent, *rAttrSet);
}

bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx
index 0a33851..16e4c3a 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -40,13 +40,12 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage

    SvxAccessibilityOptionsTabPage_Impl* m_pImpl;

    SvxAccessibilityOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:

    SvxAccessibilityOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxAccessibilityOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
};
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index fb2dc01..c16711f 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -174,9 +174,9 @@ void SvxAsianLayoutPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxAsianLayoutPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxAsianLayoutPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxAsianLayoutPage(pParent, *rAttrSet);
    return VclPtr<SvxAsianLayoutPage>::Create(pParent, *rAttrSet);
}

bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index fdc362a..913b8a2 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -148,9 +148,9 @@ void SvxBasicIDEOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
    pUseExtendedTypesChk->SaveValue();
}

SfxTabPage* SvxBasicIDEOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxBasicIDEOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new SvxBasicIDEOptionsPage( pParent, *rAttrSet ) );
    return VclPtr<SvxBasicIDEOptionsPage>::Create( pParent, *rAttrSet );
}

void SvxBasicIDEOptionsPage::FillUserData()
diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx
index 9aaced3..dc617b1 100644
--- a/cui/source/options/optbasic.hxx
+++ b/cui/source/options/optbasic.hxx
@@ -41,7 +41,7 @@ public:
    virtual ~SvxBasicIDEOptionsPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
    virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void FillUserData() SAL_OVERRIDE;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 68fe018..f9e3c0e 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -119,9 +119,9 @@ void SvxDefaultColorOptPage::Construct()
}


SfxTabPage* SvxDefaultColorOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxDefaultColorOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs )
{
    return new SvxDefaultColorOptPage( pParent, *rAttrs );
    return VclPtr<SvxDefaultColorOptPage>::Create( pParent, *rAttrs );
}

bool SvxDefaultColorOptPage::FillItemSet( SfxItemSet* rOutAttrs )
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index ff69706..506b9c8 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -59,7 +59,7 @@ public:

    void    Construct();

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
    virtual bool        FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE;
};
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 59ba76f..4c5834d 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1102,9 +1102,9 @@ void SvxColorOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxColorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxColorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new SvxColorOptionsTabPage( pParent, *rAttrSet ) );
    return VclPtr<SvxColorOptionsTabPage>::Create( pParent, *rAttrSet );
}

bool SvxColorOptionsTabPage::FillItemSet( SfxItemSet*  )
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index f5c31bdb..7ce24b8 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -51,7 +51,7 @@ public:
    virtual ~SvxColorOptionsTabPage(  );
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx
index ab25dfd1..652bba9 100644
--- a/cui/source/options/optctl.cxx
+++ b/cui/source/options/optctl.cxx
@@ -73,9 +73,9 @@ void SvxCTLOptionsPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxCTLOptionsPage( pParent, *rAttrSet );
    return VclPtr<SvxCTLOptionsPage>::Create( pParent, *rAttrSet );
}

bool SvxCTLOptionsPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx
index 4c086eb..ac2544d 100644
--- a/cui/source/options/optctl.hxx
+++ b/cui/source/options/optctl.hxx
@@ -41,12 +41,11 @@ private:

    DECL_LINK( SequenceCheckingCB_Hdl, void* );

    SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );

public:
    SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxCTLOptionsPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
};
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 13d81a9..4b56daa 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -85,10 +85,10 @@ IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl)
    return 0;
}

SfxTabPage* OfaMSFilterTabPage::Create( vcl::Window* pParent,
                                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaMSFilterTabPage::Create( vcl::Window* pParent,
                                               const SfxItemSet* rAttrSet )
{
    return new OfaMSFilterTabPage( pParent, *rAttrSet );
    return VclPtr<OfaMSFilterTabPage>::Create( pParent, *rAttrSet );
}

bool OfaMSFilterTabPage::FillItemSet( SfxItemSet* )
@@ -193,10 +193,10 @@ void OfaMSFilterTabPage2::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaMSFilterTabPage2::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaMSFilterTabPage2::Create( vcl::Window* pParent,
                                                const SfxItemSet* rAttrSet )
{
    return new OfaMSFilterTabPage2( pParent, *rAttrSet );
    return VclPtr<OfaMSFilterTabPage2>::Create( pParent, *rAttrSet );
}

bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index 8a38d43..221c705 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -36,15 +36,15 @@ class OfaMSFilterTabPage : public SfxTabPage
    VclPtr<CheckBox>       aPBasicCodeCB;
    VclPtr<CheckBox>       aPBasicStgCB;

    OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet );

    DECL_LINK(LoadWordBasicCheckHdl_Impl, void *);
    DECL_LINK(LoadExcelBasicCheckHdl_Impl, void *);
public:
    OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~OfaMSFilterTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -87,7 +87,6 @@ class OfaMSFilterTabPage2 : public SfxTabPage
    VclPtr<RadioButton> aHighlightingRB;
    VclPtr<RadioButton> aShadingRB;

    OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~OfaMSFilterTabPage2();
    virtual void dispose() SAL_OVERRIDE;

@@ -97,8 +96,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage
    SvTreeListEntry*    GetEntry4Type( sal_IntPtr _nType ) const;

public:

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index e33ee96..421fa06 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -328,9 +328,9 @@ void OfaMiscTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new OfaMiscTabPage( pParent, *rAttrSet );
    return VclPtr<OfaMiscTabPage>::Create( pParent, *rAttrSet );
}

bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
@@ -757,9 +757,9 @@ IMPL_LINK( OfaViewTabPage, OnSelectionToggled, void*, NOTINTERESTEDIN )
    return 0;
}

SfxTabPage* OfaViewTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaViewTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new OfaViewTabPage(pParent, *rAttrSet);
    return VclPtr<OfaViewTabPage>::Create(pParent, *rAttrSet);
}

bool OfaViewTabPage::FillItemSet( SfxItemSet* )
@@ -1274,9 +1274,9 @@ void OfaLanguagesTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaLanguagesTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaLanguagesTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new OfaLanguagesTabPage(pParent, *rAttrSet);
    return VclPtr<OfaLanguagesTabPage>::Create(pParent, *rAttrSet);
}

static void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[], sal_uInt16 nCount)
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 19ec2a0..dd9fe86 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -77,7 +77,7 @@ public:
    virtual ~OfaMiscTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -135,7 +135,7 @@ public:
    virtual ~OfaViewTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -180,7 +180,7 @@ public:
    virtual ~OfaLanguagesTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 5986df3..aca396d 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -301,9 +301,9 @@ void SvxGeneralTabPage::SetLinks ()



SfxTabPage* SvxGeneralTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxGeneralTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new SvxGeneralTabPage( pParent, *rAttrSet ) );
    return VclPtr<SvxGeneralTabPage>::Create( pParent, *rAttrSet );
}


diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 8860af6..8298bd6 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -110,10 +110,10 @@ void OfaHtmlTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaHtmlTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaHtmlTabPage::Create( vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet )
{
    return new OfaHtmlTabPage(pParent, *rAttrSet);
    return VclPtr<OfaHtmlTabPage>::Create(pParent, *rAttrSet);
}

bool OfaHtmlTabPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx
index 0e17f48..6977795 100644
--- a/cui/source/options/opthtml.hxx
+++ b/cui/source/options/opthtml.hxx
@@ -52,13 +52,13 @@ class OfaHtmlTabPage : public SfxTabPage
    DECL_LINK(ExportHdl_Impl, ListBox*);
    DECL_LINK(CheckBoxHdl_Impl, CheckBox*);

    OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
public:
    virtual ~OfaHtmlTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );
    OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 53b1ee2..766a474 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -241,9 +241,9 @@ void SvxProxyTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxProxyTabPage(pParent, *rAttrSet);
    return VclPtr<SvxProxyTabPage>::Create(pParent, *rAttrSet);
}

void SvxProxyTabPage::ReadConfigData_Impl()
@@ -914,9 +914,9 @@ void SvxSecurityTabPage::InitControls()
    }
}

SfxTabPage* SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxSecurityTabPage(pParent, *rAttrSet);
    return VclPtr<SfxTabPage>(new SvxSecurityTabPage(pParent, *rAttrSet), SAL_NO_ACQUIRE);
}

void SvxSecurityTabPage::ActivatePage( const SfxItemSet& )
@@ -1030,9 +1030,9 @@ void SvxEMailTabPage::dispose()

/* -------------------------------------------------------------------------*/

SfxTabPage*  SvxEMailTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage>  SvxEMailTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxEMailTabPage(pParent, *rAttrSet);
    return VclPtr<SvxEMailTabPage>::Create(pParent, *rAttrSet);
}

/* -------------------------------------------------------------------------*/
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 6aa6d4c..ee9b46a 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -98,12 +98,11 @@ private:
    DECL_LINK( ProxyHdl_Impl, ListBox * );
    DECL_LINK( LoseFocusHdl_Impl, Edit * );

    SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet );

public:
    SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxProxyTabPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
};
@@ -176,7 +175,7 @@ protected:
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
};
@@ -203,7 +202,7 @@ public:
    virtual ~SvxEMailTabPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 3e050b1..98eb903 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -651,9 +651,9 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )



SfxTabPage* SvxJavaOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new SvxJavaOptionsPage( pParent, *rAttrSet ) );
    return VclPtr<SvxJavaOptionsPage>::Create( pParent, *rAttrSet );
}


diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 68ed2442..ffe299b 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -109,7 +109,7 @@ public:
    virtual ~SvxJavaOptionsPage();
    virtual void            dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent, const SfxItemSet* rSet );

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void            Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx
index 4b1696f..2bd5401 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -84,9 +84,9 @@ void SvxJSearchOptionsPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxJSearchOptionsPage( pParent, *rSet );
    return VclPtr<SvxJSearchOptionsPage>::Create( pParent, *rSet );
}


diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx
index 70d03ac..26fed46 100644
--- a/cui/source/options/optjsearch.hxx
+++ b/cui/source/options/optjsearch.hxx
@@ -58,13 +58,11 @@ private:

    sal_Int32               GetTransliterationFlags_Impl();

protected:
                        SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );

public:
                        SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SvxJSearchOptionsPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );

    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 48a326b..54d4fe5 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1152,10 +1152,11 @@ void SvxLinguTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxLinguTabPage::Create( vcl::Window* pParent,
                                     const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxLinguTabPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rAttrSet )
{
    return ( new SvxLinguTabPage( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new SvxLinguTabPage( pParent, *rAttrSet ),
                               SAL_NO_ACQUIRE );
}


diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 0dc00ee..cfc0cbe 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -158,9 +158,9 @@ void OfaMemoryOptionsPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new OfaMemoryOptionsPage( pParent, *rAttrSet );
    return VclPtr<OfaMemoryOptionsPage>::Create( pParent, *rAttrSet );
}

bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet* rSet )
diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx
index 91559d9..74f2859 100644
--- a/cui/source/options/optmemory.hxx
+++ b/cui/source/options/optmemory.hxx
@@ -60,7 +60,7 @@ public:
    virtual ~OfaMemoryOptionsPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index c98ce9a..e83dcde 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -136,9 +136,9 @@ void SvxOpenCLTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxOpenCLTabPage(pParent, *rAttrSet);
    return VclPtr<SvxOpenCLTabPage>::Create(pParent, *rAttrSet);
}

bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 067b038..09eb09760 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -73,7 +73,7 @@ public:
    virtual ~SvxOpenCLTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent, const SfxItemSet* rSet );

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void            Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 8b1e967..dd87bbc 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -266,14 +266,12 @@ void SvxPathTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxPathTabPage::Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxPathTabPage::Create( vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet )
{
    return ( new SvxPathTabPage( pParent, *rAttrSet ) );
    return VclPtr<SvxPathTabPage>::Create( pParent, *rAttrSet );
}



bool SvxPathTabPage::FillItemSet( SfxItemSet* )
{
    for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index a8a9280..a57f3e0 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -226,13 +226,12 @@ void SvxSaveTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SfxSaveTabPage::Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SfxSaveTabPage::Create( vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet )
{
    return ( new SfxSaveTabPage( pParent, *rAttrSet ) );
    return VclPtr<SfxSaveTabPage>::Create( pParent, *rAttrSet );
}


void SfxSaveTabPage::DetectHiddenControls()
{
    SvtOptionsDialogOptions aOptionsDlgOpt;
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 0cb7526d..f64dc0a 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -75,7 +75,7 @@ public:
    virtual ~SvxSaveTabPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 536e444..5f66f5b 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -160,17 +160,12 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
    m_pLastChecked->SetText( aText );
}



SfxTabPage*
VclPtr<SfxTabPage>
SvxOnlineUpdateTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new SvxOnlineUpdateTabPage( pParent, *rAttrSet );
    return VclPtr<SvxOnlineUpdateTabPage>::Create( pParent, *rAttrSet );
}




bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* )
{
    bool bModified = false;
diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx
index 4324caf..ec749ad 100644
--- a/cui/source/options/optupdt.hxx
+++ b/cui/source/options/optupdt.hxx
@@ -55,7 +55,7 @@ public:
    virtual ~SvxOnlineUpdateTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent, const SfxItemSet* rSet );

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void            Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index eeabbcd..f19cfb4 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -330,9 +330,9 @@ void SvxPersonalizationTabPage::dispose()
}


SfxTabPage* SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
VclPtr<SfxTabPage> SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
    return new SvxPersonalizationTabPage( pParent, *rSet );
    return VclPtr<SvxPersonalizationTabPage>::Create( pParent, *rSet );
}

bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet * )
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index e491d8b..0ec920d 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -44,7 +44,7 @@ public:
    virtual ~SvxPersonalizationTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window *pParent, const SfxItemSet *rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window *pParent, const SfxItemSet *rSet );

    /// Apply the settings ([OK] button).
    virtual bool FillItemSet( SfxItemSet *rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index ab31348..02e2f17 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -291,7 +291,7 @@ void MailMergeCfg_Impl::Notify( const com::sun::star::uno::Sequence< OUString >&
}

//typedef SfxTabPage* (*FNCreateTabPage)( vcl::Window *pParent, const SfxItemSet &rAttrSet );
SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
{
    CreateTabPage fnCreate = 0;
    switch(nId)
@@ -332,7 +332,7 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const Sf
#endif
    }

    SfxTabPage* pRet = fnCreate ? (*fnCreate)( pParent, &rSet ) : NULL;
    VclPtr<SfxTabPage> pRet = fnCreate ? (*fnCreate)( pParent, &rSet ) : nullptr;
    return pRet;
}

@@ -1050,17 +1050,17 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()

        if(pPageInfo->m_nPageId == RID_SVXPAGE_COLOR)
        {
            pPageInfo->m_pPage = ::CreateGeneralTabPage(
                pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet );
            pPageInfo->m_pPage.reset( ::CreateGeneralTabPage(
                pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet ) );
            mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage.get());
            mpColorPage->SetupForViewFrame( SfxViewFrame::Current() );
        }
        else
        {
            pPageInfo->m_pPage = ::CreateGeneralTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet );
            pPageInfo->m_pPage.reset( ::CreateGeneralTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet ) );

            if(!pPageInfo->m_pPage && pGroupInfo->m_pModule)
                pPageInfo->m_pPage = pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet);
                pPageInfo->m_pPage.reset( pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet) );

        }

diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 9c0f52d..479913f 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -284,9 +284,10 @@ void AlignmentTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* AlignmentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> AlignmentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new AlignmentTabPage( pParent, *rAttrSet );
    return VclPtr<SfxTabPage>( new AlignmentTabPage( pParent, *rAttrSet ),
                               SAL_NO_ACQUIRE );
}

bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 7a7373b..e7aaccf 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -215,10 +215,10 @@ void OfaAutocorrOptionsPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaAutocorrOptionsPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rSet)
VclPtr<SfxTabPage> OfaAutocorrOptionsPage::Create( vcl::Window* pParent,
                                                   const SfxItemSet* rSet)
{
    return new OfaAutocorrOptionsPage(pParent, *rSet);
    return VclPtr<OfaAutocorrOptionsPage>::Create(pParent, *rSet);
}

bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* )
@@ -513,10 +513,10 @@ void OfaSwAutoFmtOptionsPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaSwAutoFmtOptionsPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> OfaSwAutoFmtOptionsPage::Create( vcl::Window* pParent,
                                                    const SfxItemSet* rAttrSet)
{
    return new OfaSwAutoFmtOptionsPage(pParent, *rAttrSet);
    return VclPtr<SfxTabPage>( new OfaSwAutoFmtOptionsPage(pParent, *rAttrSet), SAL_NO_ACQUIRE );
}

bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet*  )
@@ -956,9 +956,9 @@ void OfaAutocorrReplacePage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaAutocorrReplacePage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> OfaAutocorrReplacePage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
    return new OfaAutocorrReplacePage(pParent, *rSet);
    return VclPtr<OfaAutocorrReplacePage>::Create(pParent, *rSet);
}

void OfaAutocorrReplacePage::ActivatePage( const SfxItemSet& )
@@ -1472,10 +1472,10 @@ void OfaAutocorrExceptPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaAutocorrExceptPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rSet)
VclPtr<SfxTabPage> OfaAutocorrExceptPage::Create( vcl::Window* pParent,
                                                  const SfxItemSet* rSet)
{
    return new OfaAutocorrExceptPage(pParent, *rSet);
    return VclPtr<OfaAutocorrExceptPage>::Create(pParent, *rSet);
}

void    OfaAutocorrExceptPage::ActivatePage( const SfxItemSet& )
@@ -1909,10 +1909,11 @@ void OfaQuoteTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaQuoteTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> OfaQuoteTabPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rAttrSet)
{
    return new OfaQuoteTabPage(pParent, *rAttrSet);
    return VclPtr<SfxTabPage>( new OfaQuoteTabPage(pParent, *rAttrSet),
                               SAL_NO_ACQUIRE );
}

bool OfaQuoteTabPage::FillItemSet( SfxItemSet*  )
@@ -2249,10 +2250,10 @@ void OfaAutoCompleteTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaAutoCompleteTabPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rSet)
VclPtr<SfxTabPage> OfaAutoCompleteTabPage::Create( vcl::Window* pParent,
                                                   const SfxItemSet* rSet)
{
    return new OfaAutoCompleteTabPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new OfaAutoCompleteTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
}

bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
@@ -2507,9 +2508,9 @@ void OfaSmartTagOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* OfaSmartTagOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> OfaSmartTagOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
    return new OfaSmartTagOptionsTabPage( pParent, *rSet );
    return VclPtr<OfaSmartTagOptionsTabPage>::Create( pParent, *rSet );
}

/** This struct is used to associate list box entries with smart tag data
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 13d7a2d8..285618e 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -492,16 +492,10 @@ void SvxBackgroundTabPage::dispose()



SfxTabPage* SvxBackgroundTabPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet )

/*  [Description]

    create method for the TabDialog
*/

VclPtr<SfxTabPage> SvxBackgroundTabPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet )
{
    return ( new SvxBackgroundTabPage( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new SvxBackgroundTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
}


diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 8fbd975..724fb24 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -369,15 +369,13 @@ void SvxBorderTabPage::dispose()
    SfxTabPage::dispose();
}


SfxTabPage* SvxBorderTabPage::Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxBorderTabPage::Create( vcl::Window* pParent,
                                             const SfxItemSet* rAttrSet )
{
    return ( new SvxBorderTabPage( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>(new SvxBorderTabPage( pParent, *rAttrSet ),
                              SAL_NO_ACQUIRE);
}



void SvxBorderTabPage::ResetFrameLine_Impl( svx::FrameBorderType eBorder, const SvxBorderLine* pCoreLine, bool bValid )
{
    if( m_pFrameSel->IsBorderEnabled( eBorder ) )
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index fd8e5dd..2f445d3 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1219,9 +1219,10 @@ int SvxCharNamePage::DeactivatePage( SfxItemSet* _pSet )



SfxTabPage* SvxCharNamePage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxCharNamePage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxCharNamePage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxCharNamePage( pParent, *rSet ),
                              SAL_NO_ACQUIRE );
}


@@ -1784,9 +1785,10 @@ int SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet )



SfxTabPage* SvxCharEffectsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxCharEffectsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxCharEffectsPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxCharEffectsPage( pParent, *rSet ),
                               SAL_NO_ACQUIRE );
}


@@ -2974,9 +2976,10 @@ int SvxCharPositionPage::DeactivatePage( SfxItemSet* _pSet )



SfxTabPage* SvxCharPositionPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxCharPositionPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxCharPositionPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxCharPositionPage( pParent, *rSet ),
                               SAL_NO_ACQUIRE );
}


@@ -3546,9 +3549,10 @@ int SvxCharTwoLinesPage::DeactivatePage( SfxItemSet* _pSet )



SfxTabPage* SvxCharTwoLinesPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxCharTwoLinesPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxCharTwoLinesPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxCharTwoLinesPage( pParent, *rSet ),
                               SAL_NO_ACQUIRE );
}

void SvxCharTwoLinesPage::Reset( const SfxItemSet* rSet )
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index fdde385..ba48baa 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -390,10 +390,10 @@ void SvxConnectionPage::Construct()
|*
\************************************************************************/

SfxTabPage* SvxConnectionPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxConnectionPage::Create( vcl::Window* pWindow,
                                              const SfxItemSet* rAttrs )
{
    return new SvxConnectionPage( pWindow, *rAttrs );
    return VclPtr<SvxConnectionPage>::Create( pWindow, *rAttrs );
}

IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p )
diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx
index 3a001d1..61d4c9b 100644
--- a/cui/source/tabpages/dstribut.cxx
+++ b/cui/source/tabpages/dstribut.cxx
@@ -106,10 +106,10 @@ void SvxDistributePage::dispose()
|*
\************************************************************************/

SfxTabPage* SvxDistributePage::Create(vcl::Window* pWindow, const SfxItemSet& rAttrs,
VclPtr<SfxTabPage> SvxDistributePage::Create(vcl::Window* pWindow, const SfxItemSet& rAttrs,
    SvxDistributeHorizontal eHor, SvxDistributeVertical eVer)
{
    return new SvxDistributePage(pWindow, rAttrs, eHor, eVer);
    return VclPtr<SvxDistributePage>::Create(pWindow, rAttrs, eHor, eVer);
}

void SvxDistributePage::PointChanged(vcl::Window* /*pWindow*/, RECT_POINT /*eRP*/)
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 9d1a662..8f4ddcd 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -154,9 +154,10 @@ void SvxGrfCropPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxGrfCropPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SvxGrfCropPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return new SvxGrfCropPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxGrfCropPage( pParent, *rSet ),
                               SAL_NO_ACQUIRE );
}

void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index b2ffa26..d57e180 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -356,10 +356,10 @@ void SvxCaptionTabPage::Reset( const SfxItemSet*  )



SfxTabPage* SvxCaptionTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxCaptionTabPage::Create( vcl::Window* pWindow,
                                              const SfxItemSet* rOutAttrs )
{
    return new SvxCaptionTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxCaptionTabPage>::Create( pWindow, *rOutAttrs );
}


diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 17a3930..ced5718 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -460,13 +460,13 @@ SfxMacroTabPage::SfxMacroTabPage(vcl::Window* pParent, const Reference< XFrame >

namespace
{
    SfxMacroTabPage* CreateSfxMacroTabPage( vcl::Window* pParent, const SfxItemSet& rAttrSet )
    VclPtr<SfxMacroTabPage> CreateSfxMacroTabPage( vcl::Window* pParent, const SfxItemSet& rAttrSet )
    {
        return new SfxMacroTabPage( pParent, NULL, rAttrSet );
        return VclPtr<SfxMacroTabPage>( new SfxMacroTabPage( pParent, NULL, rAttrSet ), SAL_NO_ACQUIRE );
    }
}

SfxTabPage* SfxMacroTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SfxMacroTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return CreateSfxMacroTabPage(pParent, *rAttrSet);
}
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 05f690c..c9a54d9 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -602,16 +602,10 @@ void SvxMeasurePage::Construct()
    m_pCtlPreview->Invalidate();
}

/*************************************************************************
|*
|* create the tabpage
|*
\************************************************************************/

SfxTabPage* SvxMeasurePage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxMeasurePage::Create( vcl::Window* pWindow,
                                           const SfxItemSet* rAttrs )
{
    return new SvxMeasurePage( pWindow, *rAttrs );
    return VclPtr<SvxMeasurePage>::Create( pWindow, *rAttrs );
}

void SvxMeasurePage::PointChanged( vcl::Window* pWindow, RECT_POINT /*eRP*/ )
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 15edecd..c362ece 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -380,21 +380,10 @@ void SvxNumberFormatTabPage::Init_Impl()
    }
}

/*************************************************************************
#*  Method:        Create
#*------------------------------------------------------------------------
#*
#*  Class:      SvxNumberFormatTabPage
#*  Function:   Creates a new number format page.
#*  Input:      Window, SfxItemSet
#*  Output:     new TabPage
#*
#************************************************************************/

SfxTabPage* SvxNumberFormatTabPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxNumberFormatTabPage::Create( vcl::Window* pParent,
                                                   const SfxItemSet* rAttrSet )
{
    return ( new SvxNumberFormatTabPage( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new SvxNumberFormatTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
}


diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5e7ee87..12b1311 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -232,10 +232,10 @@ void SvxSingleNumPickTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxSingleNumPickTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxSingleNumPickTabPage::Create( vcl::Window* pParent,
                                                    const SfxItemSet* rAttrSet)
{
    return new SvxSingleNumPickTabPage(pParent, *rAttrSet);
    return VclPtr<SvxSingleNumPickTabPage>::Create(pParent, *rAttrSet);
}

bool  SvxSingleNumPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -402,10 +402,10 @@ void SvxBulletPickTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxBulletPickTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxBulletPickTabPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return new SvxBulletPickTabPage(pParent, *rAttrSet);
    return VclPtr<SvxBulletPickTabPage>::Create(pParent, *rAttrSet);
}

bool  SvxBulletPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -608,10 +608,10 @@ void SvxNumPickTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxNumPickTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxNumPickTabPage::Create( vcl::Window* pParent,
                                              const SfxItemSet* rAttrSet)
{
    return new SvxNumPickTabPage(pParent, *rAttrSet);
    return VclPtr<SvxNumPickTabPage>::Create(pParent, *rAttrSet);
}

bool  SvxNumPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -859,10 +859,10 @@ void SvxBitmapPickTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SvxBitmapPickTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxBitmapPickTabPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return new SvxBitmapPickTabPage(pParent, *rAttrSet);
    return VclPtr<SvxBitmapPickTabPage>::Create(pParent, *rAttrSet);
}

void  SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet)
@@ -1222,10 +1222,10 @@ void SvxNumOptionsTabPage::SetMetric(FieldUnit eMetric)
    m_pHeightMF->SetUnit( eMetric );
}

SfxTabPage* SvxNumOptionsTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxNumOptionsTabPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return new SvxNumOptionsTabPage(pParent, *rAttrSet);
    return VclPtr<SvxNumOptionsTabPage>::Create(pParent, *rAttrSet);
};

void    SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
@@ -3220,10 +3220,10 @@ void SvxNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode()
    m_pIndentAtMF->Show( bLabelAlignmentPosAndSpaceModeActive );
}

SfxTabPage* SvxNumPositionTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SvxNumPositionTabPage::Create( vcl::Window* pParent,
                                                  const SfxItemSet* rAttrSet)
{
    return new SvxNumPositionTabPage(pParent, *rAttrSet);
    return VclPtr<SvxNumPositionTabPage>::Create(pParent, *rAttrSet);
}

void    SvxNumPositionTabPage::SetMetric(FieldUnit eMetric)
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index c9ecb88..80c627d 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -164,9 +164,9 @@ bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )

// class SvxPageDescPage --------------------------------------------------

SfxTabPage* SvxPageDescPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxPageDescPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxPageDescPage( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SvxPageDescPage( pParent, *rSet ), SAL_NO_ACQUIRE );
}

SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr ) :
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 7bff769..e84a6e13 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -194,9 +194,9 @@ IMPL_LINK_NOARG(SvxStdParagraphTabPage, ELRLoseFocusHdl)
    return 0;
}

SfxTabPage* SvxStdParagraphTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SvxStdParagraphTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
    return new SvxStdParagraphTabPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxStdParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
}

bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -1071,9 +1071,9 @@ int SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet )
    return LEAVE_PAGE;
}

SfxTabPage* SvxParaAlignTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxParaAlignTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxParaAlignTabPage(pParent, *rSet);
    return VclPtr<SfxTabPage>( new SvxParaAlignTabPage(pParent, *rSet), SAL_NO_ACQUIRE );
}

bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -1344,10 +1344,10 @@ void SvxParaAlignTabPage::PageCreated (const SfxAllItemSet& aSet)
            EnableJustifyExt();
}

SfxTabPage* SvxExtParagraphTabPage::Create( vcl::Window* pParent,
VclPtr<SfxTabPage> SvxExtParagraphTabPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rSet )
{
    return new SvxExtParagraphTabPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SvxExtParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
}

bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -2192,9 +2192,9 @@ void SvxAsianTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SvxAsianTabPage::Create(    vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxAsianTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new SvxAsianTabPage(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SvxAsianTabPage(pParent, *rSet), SAL_NO_ACQUIRE );
}

const sal_uInt16*     SvxAsianTabPage::GetRanges()
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index bbe6bcb..9434db8 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -726,9 +726,9 @@ void SvxSwPosSizeTabPage::setOptimalRelWidth()
    m_pHoriLB->Clear();
}

SfxTabPage* SvxSwPosSizeTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SvxSwPosSizeTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
    return new SvxSwPosSizeTabPage(pParent, *rSet);
    return VclPtr<SvxSwPosSizeTabPage>::Create(pParent, *rSet);
}

const sal_uInt16* SvxSwPosSizeTabPage::GetRanges()
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 5659120..c0183bb 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -278,10 +278,11 @@ bool SvxTabulatorTabPage::FillItemSet( SfxItemSet* rSet )



SfxTabPage* SvxTabulatorTabPage::Create( vcl::Window* pParent,
VclPtr<SfxTabPage> SvxTabulatorTabPage::Create( vcl::Window* pParent,
                                         const SfxItemSet* rSet)
{
    return ( new SvxTabulatorTabPage( pParent, *rSet ) );
    return VclPtr<SfxTabPage>( new SvxTabulatorTabPage( pParent, *rSet ),
                               SAL_NO_ACQUIRE );
}


diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 05bc698..b2f2980 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -461,10 +461,10 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
|*
\************************************************************************/

SfxTabPage* SvxTextAnimationPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxTextAnimationPage::Create( vcl::Window* pWindow,
                                                 const SfxItemSet* rAttrs )
{
    return new SvxTextAnimationPage( pWindow, *rAttrs );
    return VclPtr<SvxTextAnimationPage>::Create( pWindow, *rAttrs );
}

IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl)
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 6345e45..78df018 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -529,16 +529,10 @@ void SvxTextAttrPage::Construct()
    m_pTsbWordWrapText->Enable( bWordWrapTextEnabled );
}

/*************************************************************************
|*
|* creates the page
|*
\************************************************************************/

SfxTabPage* SvxTextAttrPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxTextAttrPage::Create( vcl::Window* pWindow,
                                            const SfxItemSet* rAttrs )
{
    return new SvxTextAttrPage( pWindow, *rAttrs );
    return VclPtr<SvxTextAttrPage>::Create( pWindow, *rAttrs );
}

/** Check whether we have to uncheck the "Full width" check box.
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 7c2090d..c6d568c 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -314,9 +314,9 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(vcl::Window* pParent, const SfxIt
    SetExchangeSupport();
}

SfxTabPage* SvxTransparenceTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rAttrs)
VclPtr<SfxTabPage> SvxTransparenceTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rAttrs)
{
    return new SvxTransparenceTabPage(pWindow, *rAttrs);
    return VclPtr<SvxTransparenceTabPage>::Create(pWindow, *rAttrs);
}

bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
@@ -1821,10 +1821,10 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )



SfxTabPage* SvxAreaTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxAreaTabPage::Create( vcl::Window* pWindow,
                                           const SfxItemSet* rAttrs )
{
    return new SvxAreaTabPage( pWindow, *rAttrs );
    return VclPtr<SvxAreaTabPage>::Create( pWindow, *rAttrs );
}


diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 315ad1b..11c3464 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -310,10 +310,10 @@ void SvxBitmapTabPage::Reset( const SfxItemSet*  )



SfxTabPage* SvxBitmapTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxBitmapTabPage::Create( vcl::Window* pWindow,
                                             const SfxItemSet* rSet )
{
    return new SvxBitmapTabPage( pWindow, *rSet );
    return VclPtr<SvxBitmapTabPage>::Create( pWindow, *rSet );
}


diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index ff8d23a..13bb93b 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -647,10 +647,10 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )



SfxTabPage* SvxColorTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxColorTabPage::Create( vcl::Window* pWindow,
                                            const SfxItemSet* rOutAttrs )
{
    return new SvxColorTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxColorTabPage>::Create( pWindow, *rOutAttrs );
}

// is called when the content of the MtrFields is changed for color values
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 36a3318..3a72288 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -394,10 +394,10 @@ void SvxGradientTabPage::Reset( const SfxItemSet* )



SfxTabPage* SvxGradientTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxGradientTabPage::Create( vcl::Window* pWindow,
                                               const SfxItemSet* rOutAttrs )
{
    return new SvxGradientTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxGradientTabPage>::Create( pWindow, *rOutAttrs );
}


diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index cf939b8..3fecfd8 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -360,10 +360,10 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )



SfxTabPage* SvxHatchTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxHatchTabPage::Create( vcl::Window* pWindow,
                                            const SfxItemSet* rSet )
{
    return new SvxHatchTabPage( pWindow, *rSet );
    return VclPtr<SvxHatchTabPage>::Create( pWindow, *rSet );
}


diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 79ec9d3..b2225d0 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1529,10 +1529,10 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )



SfxTabPage* SvxLineTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxLineTabPage::Create( vcl::Window* pWindow,
                                           const SfxItemSet* rAttrs )
{
    return new SvxLineTabPage( pWindow, *rAttrs );
    return VclPtr<SvxLineTabPage>::Create( pWindow, *rAttrs );
}


diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 81c0fdb..b6ca76d 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -350,9 +350,9 @@ void SvxLineDefTabPage::Reset( const SfxItemSet* rAttrs )



SfxTabPage* SvxLineDefTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxLineDefTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
{
    return new SvxLineDefTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxLineDefTabPage>::Create( pWindow, *rOutAttrs );
}


diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 6b43ba9..b66c5f7c 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -280,9 +280,9 @@ void SvxLineEndDefTabPage::Reset( const SfxItemSet* )



SfxTabPage* SvxLineEndDefTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxLineEndDefTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rSet )
{
    return new SvxLineEndDefTabPage( pWindow, *rSet );
    return VclPtr<SvxLineEndDefTabPage>::Create( pWindow, *rSet );
}


diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 945f8f0..8f37b10 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -479,10 +479,10 @@ void SvxShadowTabPage::Reset( const SfxItemSet* rAttrs )



SfxTabPage* SvxShadowTabPage::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxShadowTabPage::Create( vcl::Window* pWindow,
                                             const SfxItemSet* rAttrs )
{
    return new SvxShadowTabPage( pWindow, *rAttrs );
    return VclPtr<SvxShadowTabPage>::Create( pWindow, *rAttrs );
}


diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index e820692..acf51ba 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -324,9 +324,9 @@ void SvxAngleTabPage::Reset(const SfxItemSet* rAttrs)



SfxTabPage* SvxAngleTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SvxAngleTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rSet)
{
    return new SvxAngleTabPage(pWindow, *rSet);
    return VclPtr<SvxAngleTabPage>::Create(pWindow, *rSet);
}


@@ -565,9 +565,9 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)



SfxTabPage* SvxSlantTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxSlantTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
{
    return new SvxSlantTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxSlantTabPage>::Create( pWindow, *rOutAttrs );
}


@@ -1024,9 +1024,9 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )



SfxTabPage* SvxPositionSizeTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SvxPositionSizeTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
{
    return new SvxPositionSizeTabPage( pWindow, *rOutAttrs );
    return VclPtr<SvxPositionSizeTabPage>::Create( pWindow, *rOutAttrs );
}


diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index eca7659..ed99f81 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -81,10 +81,11 @@ namespace dbaui
    using namespace ::dbtools;
    using namespace ::svt;

    SfxTabPage* OConnectionTabPage::Create( vcl::Window* pParent,    const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> OConnectionTabPage::Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OConnectionTabPage( pParent, *_rAttrSet ) );
        return VclPtr<SfxTabPage>(new OConnectionTabPage( pParent, *_rAttrSet ), SAL_NO_ACQUIRE);
    }

    // OConnectionTabPage
    OConnectionTabPage::OConnectionTabPage(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs)
        :OConnectionHelper(pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rCoreAttrs)
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 53befc0..2b4626d 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -57,7 +57,7 @@ namespace dbaui
    public:
        virtual ~OConnectionTabPage();
        virtual void dispose() SAL_OVERRIDE;
        static  SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
        static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
        virtual bool        FillItemSet (SfxItemSet* _rCoreAttrs) SAL_OVERRIDE;

        virtual void        implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx
index 6a6ed63..071c346 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.hxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.hxx
@@ -21,6 +21,7 @@

#include "dsntypes.hxx"
#include <svl/poolitem.hxx>
#include <vcl/vclptr.hxx>
#include <vector>

class SfxTabPage;
@@ -44,53 +45,53 @@ namespace dbaui

        /** Creates the detail page for Dbase
        */
        static  SfxTabPage* CreateDbase2( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateDbase2( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for ado
        */
        static  SfxTabPage* CreateDbase( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateDbase( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for ado
        */
        static  SfxTabPage* CreateAdo( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateAdo( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for ODBC
        */
        static  SfxTabPage* CreateODBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateODBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for user
        */
        static  SfxTabPage* CreateUser( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateUser( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for MySQLODBC
        */
        static  SfxTabPage* CreateMySQLODBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateMySQLODBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for MySQLJDBC
        */
        static  SfxTabPage* CreateMySQLJDBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateMySQLJDBC( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for MySQLNATIVE
        */
        static  SfxTabPage* CreateMySQLNATIVE( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateMySQLNATIVE( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for Oracle JDBC
        */
        static SfxTabPage*  CreateOracleJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
        static VclPtr<SfxTabPage>  CreateOracleJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet );

        /** Creates the detail page for LDAP
        */
        static  SfxTabPage* CreateLDAP( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateLDAP( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /// Creates the detail page for Text
        static  SfxTabPage* CreateText( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateText( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );


        /// creates the GeneratedValues page
        static  SfxTabPage* CreateGeneratedValuesPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateGeneratedValuesPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );

        /// creates the "Special Settings" page of the "Advanced Settings" dialog
        static  SfxTabPage* CreateSpecialSettingsPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
        static  VclPtr<SfxTabPage> CreateSpecialSettingsPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet );
    };
}

diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index a98dafd..8d621bca 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -202,9 +202,9 @@ void OUserAdmin::FillUserNames()

}

SfxTabPage* OUserAdmin::Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
VclPtr<SfxTabPage> OUserAdmin::Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
    return ( new OUserAdmin( pParent, *_rAttrSet ) );
    return VclPtr<SfxTabPage>(new OUserAdmin( pParent, *_rAttrSet ), SAL_NO_ACQUIRE);
}

IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx
index 5bed223..eeea260 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.hxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.hxx
@@ -62,7 +62,7 @@ protected:

    OUserAdmin( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
public:
    static  SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
    static  VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );

    virtual ~OUserAdmin();
    virtual void dispose() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index b138667..86c2e1a 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -205,9 +205,9 @@ namespace dbaui
        OCommonBehaviourTabPage::dispose();
    }

    SfxTabPage* ODriversSettings::CreateDbase( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateDbase( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new ODbaseDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<ODbaseDetailsPage>::Create( pParent, *_rAttrSet );
    }

    void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
@@ -267,9 +267,9 @@ namespace dbaui

    }

    SfxTabPage* ODriversSettings::CreateAdo( vcl::Window* pParent,   const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateAdo( vcl::Window* pParent,   const SfxItemSet* _rAttrSet )
    {
        return ( new OAdoDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OAdoDetailsPage>::Create( pParent, *_rAttrSet );
    }

    // OOdbcDetailsPage
@@ -291,9 +291,9 @@ namespace dbaui
        OCommonBehaviourTabPage::dispose();
    }

    SfxTabPage* ODriversSettings::CreateODBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateODBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OOdbcDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OOdbcDetailsPage>::Create( pParent, *_rAttrSet );
    }

    bool OOdbcDetailsPage::FillItemSet( SfxItemSet* _rSet )
@@ -344,10 +344,9 @@ namespace dbaui
        OCommonBehaviourTabPage::dispose();
    }


    SfxTabPage* ODriversSettings::CreateUser( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateUser( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OUserDriverDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OUserDriverDetailsPage>::Create( pParent, *_rAttrSet );
    }

    bool OUserDriverDetailsPage::FillItemSet( SfxItemSet* _rSet )
@@ -402,9 +401,9 @@ namespace dbaui
    {
    }

    SfxTabPage* ODriversSettings::CreateMySQLODBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateMySQLODBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OMySQLODBCDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OMySQLODBCDetailsPage>::Create( pParent, *_rAttrSet );
    }

    // OMySQLJDBCDetailsPage
@@ -641,18 +640,18 @@ namespace dbaui
        OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
    }

    SfxTabPage* ODriversSettings::CreateMySQLJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateMySQLJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OGeneralSpecialJDBCDetailsPage( pParent, *_rAttrSet,DSID_MYSQL_PORTNUMBER ) );
        return VclPtr<OGeneralSpecialJDBCDetailsPage>::Create( pParent, *_rAttrSet,DSID_MYSQL_PORTNUMBER );
    }
    SfxTabPage* ODriversSettings::CreateMySQLNATIVE( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateMySQLNATIVE( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new MySQLNativePage( pParent, *_rAttrSet ) );
        return VclPtr<MySQLNativePage>::Create( pParent, *_rAttrSet );
    }

    SfxTabPage* ODriversSettings::CreateOracleJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateOracleJDBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OGeneralSpecialJDBCDetailsPage( pParent, *_rAttrSet,DSID_ORACLE_PORTNUMBER, false) );
        return VclPtr<OGeneralSpecialJDBCDetailsPage>::Create( pParent, *_rAttrSet,DSID_ORACLE_PORTNUMBER, false);
    }

    // OLDAPDetailsPage
@@ -690,9 +689,9 @@ namespace dbaui
        OCommonBehaviourTabPage::dispose();
    }

    SfxTabPage* ODriversSettings::CreateLDAP( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateLDAP( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
    {
        return ( new OLDAPDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OLDAPDetailsPage>::Create( pParent, *_rAttrSet );
    }

    bool OLDAPDetailsPage::FillItemSet( SfxItemSet* _rSet )
@@ -765,9 +764,9 @@ namespace dbaui
        OCommonBehaviourTabPage::dispose();
    }

    SfxTabPage* ODriversSettings::CreateText( vcl::Window* pParent,  const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateText( vcl::Window* pParent,  const SfxItemSet* _rAttrSet )
    {
        return ( new OTextDetailsPage( pParent, *_rAttrSet ) );
        return VclPtr<OTextDetailsPage>::Create( pParent, *_rAttrSet );
    }
    void OTextDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
    {
@@ -803,16 +802,16 @@ namespace dbaui
        return m_pTextConnectionHelper->prepareLeave();
    }

    SfxTabPage* ODriversSettings::CreateGeneratedValuesPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateGeneratedValuesPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet )
    {
        return new GeneratedValuesPage( _pParent, *_rAttrSet );
        return VclPtr<GeneratedValuesPage>::Create( _pParent, *_rAttrSet );
    }

    SfxTabPage* ODriversSettings::CreateSpecialSettingsPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet )
    VclPtr<SfxTabPage> ODriversSettings::CreateSpecialSettingsPage( vcl::Window* _pParent, const SfxItemSet* _rAttrSet )
    {
        OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( *_rAttrSet );
        DataSourceMetaData aMetaData( eType );
        return new SpecialSettingsPage( _pParent, *_rAttrSet, aMetaData );
        return VclPtr<SpecialSettingsPage>::Create( _pParent, *_rAttrSet, aMetaData );
    }
}   // namespace dbaui

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 7f3a6ce..0fe010a 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -734,10 +734,10 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
}


SfxTabPage*  ImpPDFTabGeneralPage::Create( vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabGeneralPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabGeneralPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabGeneralPage>::Create( pParent, *rAttrSet );
}


@@ -905,10 +905,10 @@ void ImpPDFTabOpnFtrPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  ImpPDFTabOpnFtrPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabOpnFtrPage::Create( vcl::Window* pParent,
                                                const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabOpnFtrPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabOpnFtrPage>::Create( pParent, *rAttrSet );
}


@@ -1082,10 +1082,10 @@ IMPL_LINK( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, void*, )
    return 0;
}

SfxTabPage*  ImpPDFTabViewerPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabViewerPage::Create( vcl::Window* pParent,
                                                const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabViewerPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabViewerPage>::Create( pParent, *rAttrSet );
}


@@ -1199,10 +1199,10 @@ void ImpPDFTabSecurityPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  ImpPDFTabSecurityPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabSecurityPage::Create( vcl::Window* pParent,
                                                  const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabSecurityPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabSecurityPage>::Create( pParent, *rAttrSet );
}


@@ -1431,10 +1431,10 @@ void ImpPDFTabLinksPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  ImpPDFTabLinksPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabLinksPage::Create( vcl::Window* pParent,
                                               const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabLinksPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabLinksPage>::Create( pParent, *rAttrSet );
}


@@ -1742,10 +1742,10 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, SelectLBSignTSA )
    return 0;
}

SfxTabPage*  ImpPDFTabSigningPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> ImpPDFTabSigningPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return ( new  ImpPDFTabSigningPage( pParent, *rAttrSet ) );
    return VclPtr<ImpPDFTabSigningPage>::Create( pParent, *rAttrSet );
}


diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index b661eed..dc2f9d3 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -246,7 +246,7 @@ public:
    virtual ~ImpPDFTabGeneralPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*          Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>          Create( vcl::Window* pParent,
                                        const SfxItemSet* rAttrSet);

    void    GetFilterConfigItem(ImpPDFTabDialog* paParent);
@@ -286,7 +286,7 @@ public:

    virtual ~ImpPDFTabOpnFtrPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*          Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>          Create( vcl::Window* pParent,
                                        const SfxItemSet* rAttrSet );

    void                        GetFilterConfigItem( ImpPDFTabDialog* paParent);
@@ -320,7 +320,7 @@ public:

    virtual ~ImpPDFTabViewerPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*          Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>          Create( vcl::Window* pParent,
                                        const SfxItemSet* rAttrSet );

    void                        GetFilterConfigItem( ImpPDFTabDialog* paParent);
@@ -376,7 +376,7 @@ public:

    virtual ~ImpPDFTabSecurityPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*      Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet );

    void    GetFilterConfigItem( ImpPDFTabDialog* paParent);
@@ -408,7 +408,7 @@ public:

    virtual ~ImpPDFTabLinksPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*      Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet );

    void    GetFilterConfigItem( ImpPDFTabDialog* paParent);
@@ -440,7 +440,7 @@ public:

    virtual ~ImpPDFTabSigningPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*      Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>      Create( vcl::Window* pParent,
                                    const SfxItemSet* rAttrSet );

    void    GetFilterConfigItem( ImpPDFTabDialog* paParent);
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index a89065d..6e2ed62 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -223,7 +223,7 @@ protected:

public:
    SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );

    void                EnableUseUserData();
};
@@ -248,7 +248,7 @@ protected:

public:
    SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& );
    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};

// class SfxDocumentInfoDialog -------------------------------------------
@@ -529,7 +529,7 @@ protected:

public:
    SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};

struct CmisValue : public VclBuilderContainer
@@ -650,7 +650,7 @@ protected:

public:
    SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};

#endif // #ifndef _ INCLUDED_SFX2_DINFDLG_HXX
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index a47cac9..cc0f615 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -82,7 +82,7 @@ friend class SfxStyleDialog;
    virtual ~SfxManageStyleSheetPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window *pParent, const SfxItemSet *rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );

protected:
    virtual bool        FillItemSet(SfxItemSet *) SAL_OVERRIDE;
@@ -95,6 +95,7 @@ protected:
        virtual void        ActivatePage(const SfxItemSet &) SAL_OVERRIDE;
        using TabPage::DeactivatePage;
    virtual int     DeactivatePage(SfxItemSet * = 0) SAL_OVERRIDE;

public:
    SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
};
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 4c30e4f..d98b5c9 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -83,7 +83,7 @@ public:
    void                        RegisterStatusBarControl(SfxStbCtrlFactory*);
    void                        RegisterMenuControl(SfxMenuCtrlFactory*);

    virtual SfxTabPage*         CreateTabPage( sal_uInt16 nId,
    virtual VclPtr<SfxTabPage>  CreateTabPage( sal_uInt16 nId,
                                               vcl::Window* pParent,
                                               const SfxItemSet& rSet );
    virtual void                Invalidate(sal_uInt16 nId = 0) SAL_OVERRIDE;
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index ecb35c9..f6465ac 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -101,7 +101,7 @@ public:
    virtual vcl::Window*     GetParentLabeledBy( const vcl::Window* pLabel ) const SAL_OVERRIDE;
    virtual vcl::Window*     GetParentLabelFor( const vcl::Window* pLabel ) const SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};

#endif // INCLUDED_SFX2_PRINTOPT_HXX
diff --git a/include/sfx2/securitypage.hxx b/include/sfx2/securitypage.hxx
index a96bd93..84ad9dc 100644
--- a/include/sfx2/securitypage.hxx
+++ b/include/sfx2/securitypage.hxx
@@ -38,7 +38,7 @@ protected:

public:
    SfxSecurityPage( vcl::Window* pParent, const SfxItemSet& );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};


diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index d175887..2b80b28 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -37,7 +37,7 @@ class SfxViewFrame;
class SfxTabPage;
class SfxBindings;

typedef SfxTabPage* (*CreateTabPage)(vcl::Window *pParent, const SfxItemSet *rAttrSet);
typedef VclPtr<SfxTabPage> (*CreateTabPage)(vcl::Window *pParent, const SfxItemSet *rAttrSet);
typedef const sal_uInt16*     (*GetTabPageRanges)(); // provides international Which-value
struct TabPageImpl;

diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index ac98a75..01f6792 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -113,10 +113,10 @@ private:
class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
{
public:
    SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
    // returns the Which values to the range
    static const sal_uInt16*      GetRanges() { return pRanges; }
    static const sal_uInt16*  GetRanges() { return pRanges; }
    SVX_DLLPRIVATE SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet );
};

// class SvxFooterPage ---------------------------------------------------
@@ -124,9 +124,9 @@ public:
class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
{
public:
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*  GetRanges() { return pRanges; }
    SVX_DLLPRIVATE SvxFooterPage(   vcl::Window* pParent, const SfxItemSet& rSet );
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges() { return pRanges; }
};

class SVX_DLLPUBLIC DeleteHeaderDialog : public MessageDialog
diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index 29e7b62..438ade2 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -104,7 +104,7 @@ public:
    virtual ~SvxGridTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet& rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet& rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 080c807..87ada7a 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -42,8 +42,8 @@ namespace linguistic2{
}}}}

class SvxSpellWrapper;
typedef SfxTabPage* (*CreateSvxDistributePage)(vcl::Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
typedef const sal_uInt16*     (*DialogGetRanges)();
typedef VclPtr<SfxTabPage> (*CreateSvxDistributePage)(vcl::Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
typedef const sal_uInt16*  (*DialogGetRanges)();

struct ExchangeData;
class INetURLObject;
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index c2c921c..31d90b6 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -247,7 +247,7 @@ SC_DLLPUBLIC    void                    SetAppOptions   ( const ScAppOptions& rO
    // virtual methods for the options dialog
    virtual SfxItemSet*  CreateItemSet( sal_uInt16 nId ) SAL_OVERRIDE;
    virtual void         ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual SfxTabPage*  CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;

    void                SetInSharedDocLoading( bool bNew )  { mbIsInSharedDocLoading = bNew; }
    bool                IsInSharedDocLoading() const        { return mbIsInSharedDocLoading; }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 0df1158..116aada 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2094,9 +2094,9 @@ void ScModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
    }
}

SfxTabPage*  ScModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> ScModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
{
    SfxTabPage* pRet = NULL;
    VclPtr<SfxTabPage> pRet;
    ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
    OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
    switch(nId)
@@ -2105,7 +2105,7 @@ SfxTabPage*  ScModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, cons
                                {
                                    ::CreateTabPage ScTpLayoutOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_LAYOUT );
                                    if ( ScTpLayoutOptionsCreate )
                                        pRet =  (*ScTpLayoutOptionsCreate) (pParent, &rSet);
                                        pRet = (*ScTpLayoutOptionsCreate) (pParent, &rSet);
                                }
                                break;
        case SID_SC_TP_CONTENT:
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 83590dc..18f9e1e 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -73,9 +73,9 @@ void ScTabPageProtection::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTabPageProtection::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> ScTabPageProtection::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new ScTabPageProtection( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new ScTabPageProtection( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
}

void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs )
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 30ce19c..6622eae 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -142,10 +142,10 @@ void ScTabPageSortFields::Init()
    }
}

SfxTabPage* ScTabPageSortFields::Create( vcl::Window*    pParent,
                                         const SfxItemSet*  rArgSet )
VclPtr<SfxTabPage> ScTabPageSortFields::Create( vcl::Window*    pParent,
                                                const SfxItemSet*  rArgSet )
{
    return ( new ScTabPageSortFields( pParent, *rArgSet ) );
    return VclPtr<ScTabPageSortFields>::Create( pParent, *rArgSet );
}

void ScTabPageSortFields::Reset( const SfxItemSet* /* rArgSet */ )
@@ -635,11 +635,10 @@ void ScTabPageSortOptions::Init()
    m_pLbLanguage->InsertLanguage( LANGUAGE_SYSTEM );
}

SfxTabPage* ScTabPageSortOptions::Create(
                                            vcl::Window*             pParent,
                                            const SfxItemSet*   rArgSet )
VclPtr<SfxTabPage> ScTabPageSortOptions::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rArgSet )
{
    return ( new ScTabPageSortOptions( pParent, *rArgSet ) );
    return VclPtr<ScTabPageSortOptions>::Create( pParent, *rArgSet );
}

void ScTabPageSortOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index cc8c560..e3d0af4 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -385,17 +385,17 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, void *, pLb )

// Derived Group TabPages:

SfxTabPage* ScTpSubTotalGroup1::Create( vcl::Window*         pParent,
VclPtr<SfxTabPage> ScTpSubTotalGroup1::Create( vcl::Window*         pParent,
                                                 const SfxItemSet*  rArgSet )
    { return ( new ScTpSubTotalGroup1( pParent, *rArgSet ) ); }
    { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup1( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }

SfxTabPage* ScTpSubTotalGroup2::Create( vcl::Window*          pParent,
VclPtr<SfxTabPage> ScTpSubTotalGroup2::Create( vcl::Window*          pParent,
                                       const SfxItemSet*    rArgSet )
    { return ( new ScTpSubTotalGroup2( pParent, *rArgSet ) ); }
    { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup2( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }

SfxTabPage* ScTpSubTotalGroup3::Create( vcl::Window*          pParent,
VclPtr<SfxTabPage> ScTpSubTotalGroup3::Create( vcl::Window*          pParent,
                                       const SfxItemSet*    rArgSet )
    { return ( new ScTpSubTotalGroup3( pParent, *rArgSet ) ); }
    { return VclPtr<SfxTabPage>( new ScTpSubTotalGroup3( pParent, *rArgSet ), SAL_NO_ACQUIRE ); }

ScTpSubTotalGroup1::ScTpSubTotalGroup1( vcl::Window* pParent, const SfxItemSet& rArgSet ) :
    ScTpSubTotalGroup( pParent, rArgSet )
@@ -484,10 +484,10 @@ void ScTpSubTotalOptions::Init()
    FillUserSortListBox();
}

SfxTabPage* ScTpSubTotalOptions::Create( vcl::Window*                 pParent,
                                          const SfxItemSet*     rArgSet )
VclPtr<SfxTabPage> ScTpSubTotalOptions::Create( vcl::Window* pParent,
                                                const SfxItemSet* rArgSet )
{
    return ( new ScTpSubTotalOptions( pParent, *rArgSet ) );
    return VclPtr<SfxTabPage>( new ScTpSubTotalOptions( pParent, *rArgSet ), SAL_NO_ACQUIRE );
}

void ScTpSubTotalOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 7336e07..4a8d992 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -404,9 +404,9 @@ void ScTPValidationValue::Init()
    CheckHdl( NULL );
}

SfxTabPage* ScTPValidationValue::Create( vcl::Window* pParent, const SfxItemSet* rArgSet )
VclPtr<SfxTabPage> ScTPValidationValue::Create( vcl::Window* pParent, const SfxItemSet* rArgSet )
{
    return( new ScTPValidationValue( pParent, *rArgSet ) );
    return VclPtr<SfxTabPage>(new ScTPValidationValue( pParent, *rArgSet ), SAL_NO_ACQUIRE);
}

void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
@@ -703,10 +703,10 @@ void ScTPValidationHelp::Init()
    pTsbHelp->EnableTriState( false );
}

SfxTabPage* ScTPValidationHelp::Create( vcl::Window* pParent,
                                         const SfxItemSet*  rArgSet )
VclPtr<SfxTabPage> ScTPValidationHelp::Create( vcl::Window* pParent,
                                               const SfxItemSet*  rArgSet )
{
    return ( new ScTPValidationHelp( pParent, *rArgSet ) );
    return VclPtr<ScTPValidationHelp>::Create( pParent, *rArgSet );
}

void ScTPValidationHelp::Reset( const SfxItemSet* rArgSet )
@@ -785,10 +785,10 @@ void ScTPValidationError::Init()
    SelectActionHdl( NULL );
}

SfxTabPage* ScTPValidationError::Create( vcl::Window*    pParent,
                                         const SfxItemSet*  rArgSet )
VclPtr<SfxTabPage> ScTPValidationError::Create( vcl::Window*    pParent,
                                                const SfxItemSet*  rArgSet )
{
    return ( new ScTPValidationError( pParent, *rArgSet ) );
    return VclPtr<ScTPValidationError>::Create( pParent, *rArgSet );
}

void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 94e2d6c..7aca08e 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -27,9 +27,9 @@

// Dokumentinfo-Tabpage:

SfxTabPage* ScDocStatPage::Create( vcl::Window *pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> ScDocStatPage::Create( vcl::Window *pParent, const SfxItemSet* rSet )
{
    return new ScDocStatPage( pParent, *rSet );
    return VclPtr<SfxTabPage>( new ScDocStatPage ( pParent, *rSet ), SAL_NO_ACQUIRE );
}

ScDocStatPage::ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet )
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index 8b3ad3d..adfb406 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -48,7 +48,7 @@ public:
    ScRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~ScRedlineOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 846ba51..a5f25ec 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -105,7 +105,7 @@ private:
class ScRightHeaderEditPage : public ScHFEditPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );

private:
    ScRightHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
@@ -114,7 +114,7 @@ private:
class ScLeftHeaderEditPage : public ScHFEditPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );

private:
    ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
@@ -123,7 +123,7 @@ private:
class ScRightFooterEditPage : public ScHFEditPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );

private:
    ScRightFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
@@ -132,7 +132,7 @@ private:
class ScLeftFooterEditPage : public ScHFEditPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );

private:
    ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index f31f93a..777390c 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -28,7 +28,7 @@ class ScTabPageProtection : public SfxTabPage
{
    static const sal_uInt16 pProtectionRanges[];
public:
    static  SfxTabPage* Create          ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*               pParent,
                                          const SfxItemSet*     rAttrSet );
    static  const sal_uInt16* GetRanges () { return pProtectionRanges; }
    virtual bool        FillItemSet     ( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 0de929a8..ec4fe7f 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -32,7 +32,7 @@ class ScDocOptions;
class ScTpCalcOptions : public SfxTabPage
{
public:
    static  SfxTabPage* Create          ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*               pParent,
                                          const SfxItemSet*     rCoreSet );
    virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
    virtual void        Reset           ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index f0050aa..5c58a40 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -19,7 +19,7 @@ class ScTpCompatOptions : public SfxTabPage
public:
    using SfxTabPage::DeactivatePage;

    static  SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreAttrs);
    static  VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreAttrs);

    virtual bool FillItemSet(SfxItemSet* rCoreAttrs) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rCoreAttrs) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 2651711..ca1960a 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -19,7 +19,7 @@ class ScTpDefaultsOptions : public SfxTabPage
public:
    using SfxTabPage::DeactivatePage;

    static  SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreSet);
    static  VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreSet);

    virtual bool FillItemSet(SfxItemSet* rCoreSet) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet* rCoreSet) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 489c0af..46d71a7 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -33,7 +33,7 @@ class ScTpFormulaOptions : public SfxTabPage
public:
    using SfxTabPage::DeactivatePage;

    static  SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreSet);
    static  VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreSet);

    virtual bool FillItemSet(SfxItemSet* rCoreSet) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 2ffb018..5fdfd20 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -61,7 +61,7 @@ private:
class ScHeaderPage : public ScHFPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges();

private:
@@ -71,7 +71,7 @@ private:
class ScFooterPage : public ScHFPage
{
public:
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*      GetRanges();

private:
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 8959438..8e4cde1 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -33,7 +33,7 @@ class ScTpPrintOptions : public SfxTabPage
public:
    virtual ~ScTpPrintOptions();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
    virtual bool        FillItemSet( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
    using SfxTabPage::DeactivatePage;
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 9dc03c5..bd6ee2a 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -51,7 +51,7 @@ public:
            const SfxItemSet&   rArgSet );
    virtual ~ScTabPageSortFields();
    virtual void        dispose() SAL_OVERRIDE;
    static  SfxTabPage* Create      ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -113,7 +113,7 @@ public:

#undef SfxTabPage
#define SfxTabPage ::SfxTabPage
    static  SfxTabPage* Create      ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 70bd439..a5cbdf7 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -27,7 +27,7 @@
class ScDocStatPage: public SfxTabPage
{
public:
    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
    virtual         ~ScDocStatPage();
    virtual void    dispose() SAL_OVERRIDE;

diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index df47101..ecc8e03 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -83,7 +83,7 @@ protected:
public:
    virtual ~ScTpSubTotalGroup1();

    static  SfxTabPage* Create      ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -98,7 +98,7 @@ protected:
public:
    virtual ~ScTpSubTotalGroup2();

    static  SfxTabPage* Create      ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -113,7 +113,7 @@ protected:
public:
    virtual ~ScTpSubTotalGroup3();

    static  SfxTabPage* Create      ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -128,7 +128,7 @@ protected:
public:
    virtual ~ScTpSubTotalOptions();
    virtual void        dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create      ( vcl::Window*               pParent,
    static VclPtr<SfxTabPage>  Create      ( vcl::Window*               pParent,
                                      const SfxItemSet*     rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index 26701d6..3920d82a 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -29,7 +29,7 @@ class ScTablePage : public SfxTabPage
{
    static const sal_uInt16 pPageTableRanges[];
public:
    static  SfxTabPage* Create          ( vcl::Window*           pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*           pParent,
                                          const SfxItemSet* rCoreSet );
    static  const sal_uInt16* GetRanges () { return pPageTableRanges; }
    virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index c9833dc..477209f 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -33,7 +33,7 @@ class ScRangeUtil;
class ScTpUserLists : public SfxTabPage
{
public:
    static  SfxTabPage* Create          ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*               pParent,
                                          const SfxItemSet*     rAttrSet );
    virtual bool        FillItemSet     ( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
    virtual void        Reset           ( const SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 0112b39..cfbbef5 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -70,7 +70,7 @@ class ScTpContentOptions : public SfxTabPage
    virtual void dispose() SAL_OVERRIDE;

public:
    static  SfxTabPage* Create          ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*               pParent,
                                          const SfxItemSet*     rCoreSet );
    virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
    virtual void        Reset           ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
@@ -118,7 +118,7 @@ class ScTpLayoutOptions : public SfxTabPage
public:
    virtual ~ScTpLayoutOptions();
    virtual void        dispose() SAL_OVERRIDE;
    static  SfxTabPage* Create          ( vcl::Window*               pParent,
    static  VclPtr<SfxTabPage> Create          ( vcl::Window*               pParent,
                                          const SfxItemSet*     rCoreSet );
    virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
    virtual void        Reset           ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 5fe4179..0cf1d93 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -87,7 +87,7 @@ public:
    explicit                    ScTPValidationValue( vcl::Window* pParent, const SfxItemSet& rArgSet );
    virtual                     ~ScTPValidationValue();
    virtual void                dispose() SAL_OVERRIDE;
    static SfxTabPage*          Create( vcl::Window* pParent, const SfxItemSet* rArgSet );
    static VclPtr<SfxTabPage>          Create( vcl::Window* pParent, const SfxItemSet* rArgSet );
    static const sal_uInt16*    GetRanges() { return pValueRanges; }

    virtual bool                FillItemSet( SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -296,7 +296,7 @@ public:
            virtual ~ScTPValidationHelp();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create      ( vcl::Window* pParent, const SfxItemSet* rArgSet );
    static  VclPtr<SfxTabPage> Create      ( vcl::Window* pParent, const SfxItemSet* rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
};
@@ -322,7 +322,7 @@ public:
            virtual ~ScTPValidationError();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create      ( vcl::Window* pParent, const SfxItemSet* rArgSet );
    static  VclPtr<SfxTabPage> Create      ( vcl::Window* pParent, const SfxItemSet* rArgSet );
    virtual bool        FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
    virtual void        Reset       ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
};
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 0716fea..f0deec6 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -69,9 +69,9 @@ void ScRedlineOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> ScRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return new ScRedlineOptionsTabPage( pParent, *rSet );
    return VclPtr<ScRedlineOptionsTabPage>::Create( pParent, *rSet );
}

bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet* /* rSet */ )
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index eb203b2..4b65e50 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -101,9 +101,9 @@ void ScTpCalcOptions::Init()
    m_pBtnDate1904->SetClickHdl( LINK( this, ScTpCalcOptions, RadioClickHdl ) );
}

SfxTabPage* ScTpCalcOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> ScTpCalcOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new ScTpCalcOptions( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new ScTpCalcOptions ( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
}

void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 42c0902..3ca991f 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -32,9 +32,9 @@ void ScTpCompatOptions::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTpCompatOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
VclPtr<SfxTabPage> ScTpCompatOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
{
    return new ScTpCompatOptions(pParent, *rCoreAttrs);
    return VclPtr<SfxTabPage>(new ScTpCompatOptions(pParent, *rCoreAttrs), SAL_NO_ACQUIRE);
}

bool ScTpCompatOptions::FillItemSet(SfxItemSet *rCoreAttrs)
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index e2b3538..189b9dd 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -40,9 +40,9 @@ void ScTpDefaultsOptions::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTpDefaultsOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
VclPtr<SfxTabPage> ScTpDefaultsOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
{
    return new ScTpDefaultsOptions(pParent, *rCoreAttrs);
    return VclPtr<SfxTabPage>(new ScTpDefaultsOptions(pParent, *rCoreAttrs), SAL_NO_ACQUIRE);
}

bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index d3717aa..22dd077 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -237,9 +237,9 @@ IMPL_LINK( ScTpFormulaOptions, SepEditOnFocusHdl, Edit*, pEdit )
    return 0;
}

SfxTabPage* ScTpFormulaOptions::Create(vcl::Window* pParent, const SfxItemSet* rCoreSet)
VclPtr<SfxTabPage> ScTpFormulaOptions::Create(vcl::Window* pParent, const SfxItemSet* rCoreSet)
{
    return new ScTpFormulaOptions(pParent, *rCoreSet);
    return VclPtr<SfxTabPage>(new ScTpFormulaOptions(pParent, *rCoreSet), SAL_NO_ACQUIRE);
}

bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 1370a0e..8768b92 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -52,9 +52,9 @@ void ScTpPrintOptions::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTpPrintOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> ScTpPrintOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return new ScTpPrintOptions( pParent, *rAttrSet );
    return VclPtr<SfxTabPage>(new ScTpPrintOptions( pParent, *rAttrSet ), SAL_NO_ACQUIRE);
}

int ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP )
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 04ff831..077c9e0 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -153,9 +153,9 @@ void ScTpUserLists::Init()

}

SfxTabPage* ScTpUserLists::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> ScTpUserLists::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return ( new ScTpUserLists( pParent, *rAttrSet ) );
    return VclPtr<SfxTabPage>( new ScTpUserLists( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
}

void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index f8aa0e9..106a5ba3 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -125,10 +125,10 @@ void ScTpContentOptions::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTpContentOptions::Create( vcl::Window*     pParent,
                              const SfxItemSet*     rCoreSet )
VclPtr<SfxTabPage> ScTpContentOptions::Create( vcl::Window*     pParent,
                                               const SfxItemSet*     rCoreSet )
{
    return new ScTpContentOptions(pParent, *rCoreSet);
    return VclPtr<SfxTabPage>( new ScTpContentOptions (pParent, *rCoreSet), SAL_NO_ACQUIRE );
}

bool    ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
@@ -457,10 +457,10 @@ void ScTpLayoutOptions::dispose()
}


SfxTabPage* ScTpLayoutOptions::Create( vcl::Window*          pParent,
                                    const SfxItemSet*   rCoreSet )
VclPtr<SfxTabPage> ScTpLayoutOptions::Create( vcl::Window*          pParent,
                                              const SfxItemSet*   rCoreSet )
{
    ScTpLayoutOptions* pNew = new ScTpLayoutOptions(pParent, *rCoreSet);
    VclPtr<ScTpLayoutOptions> pNew( new ScTpLayoutOptions( pParent, *rCoreSet), SAL_NO_ACQUIRE );
    ScDocShell* pDocSh = PTR_CAST(ScDocShell,SfxObjectShell::Current());

    if(pDocSh!=NULL)
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 7fece05..f5c4fe8 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -860,8 +860,8 @@ ScRightHeaderEditPage::ScRightHeaderEditPage( vcl::Window* pParent, const SfxIte
                    true )
    {}

SfxTabPage* ScRightHeaderEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return ( new ScRightHeaderEditPage( pParent, *rCoreSet ) ); };
VclPtr<SfxTabPage> ScRightHeaderEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return VclPtr<SfxTabPage>( new ScRightHeaderEditPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE ); }

// class ScLeftHeaderEditPage

@@ -872,8 +872,8 @@ ScLeftHeaderEditPage::ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemS
                    true )
    {}

SfxTabPage* ScLeftHeaderEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return ( new ScLeftHeaderEditPage( pParent, *rCoreSet ) ); };
VclPtr<SfxTabPage> ScLeftHeaderEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return VclPtr<SfxTabPage>( new ScLeftHeaderEditPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE ); };

// class ScRightFooterEditPage

@@ -884,8 +884,8 @@ ScRightFooterEditPage::ScRightFooterEditPage( vcl::Window* pParent, const SfxIte
                    false )
    {}

SfxTabPage* ScRightFooterEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return ( new ScRightFooterEditPage( pParent, *rCoreSet ) ); };
VclPtr<SfxTabPage> ScRightFooterEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return VclPtr<SfxTabPage>( new ScRightFooterEditPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE ); };

// class ScLeftFooterEditPage

@@ -896,7 +896,7 @@ ScLeftFooterEditPage::ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemS
                    false )
    {}

SfxTabPage* ScLeftFooterEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return ( new ScLeftFooterEditPage( pParent, *rCoreSet ) ); };
VclPtr<SfxTabPage> ScLeftFooterEditPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
    { return VclPtr<SfxTabPage>( new ScLeftFooterEditPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE ); };

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 1f3b9be..0ff790d 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -247,9 +247,9 @@ ScHeaderPage::ScHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet )
{
}

SfxTabPage* ScHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
VclPtr<SfxTabPage> ScHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
{
    return ( new ScHeaderPage( pParent, *rCoreSet ) );
    return VclPtr<SfxTabPage>( new ScHeaderPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE );
}

const sal_uInt16* ScHeaderPage::GetRanges()
@@ -264,9 +264,9 @@ ScFooterPage::ScFooterPage( vcl::Window* pParent, const SfxItemSet& rSet )
{
}

SfxTabPage* ScFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
VclPtr<SfxTabPage> ScFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
{
    return ( new ScFooterPage( pParent, *rCoreSet ) );
    return VclPtr<SfxTabPage>( new ScFooterPage( pParent, *rCoreSet ), SAL_NO_ACQUIRE );
}

const sal_uInt16* ScFooterPage::GetRanges()
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 95baa7d..9160877 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -154,9 +154,9 @@ void ScTablePage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* ScTablePage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
VclPtr<SfxTabPage> ScTablePage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
{
    return ( new ScTablePage( pParent, *rCoreSet ) );
    return VclPtr<SfxTabPage>( new ScTablePage( pParent, *rCoreSet ), SAL_NO_ACQUIRE );
}

void ScTablePage::Reset( const SfxItemSet* rCoreSet )
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index a981363..2e0ee13 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -125,7 +125,7 @@ public:
    // virtual methods for the option dialog
    virtual SfxItemSet*  CreateItemSet( sal_uInt16 nId ) SAL_OVERRIDE;
    virtual void         ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual SfxTabPage*  CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;

    SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache;
    SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache;
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index fa5f4a0..c371a03 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -725,9 +725,9 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
        pViewShell->GetViewFrame()->GetBindings().InvalidateAll( true );
}

SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> SdModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
{
    SfxTabPage* pRet = NULL;
    VclPtr<SfxTabPage> pRet;
    SfxAllItemSet aSet(*(rSet.GetPool()));
    SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
    if( pFact )
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 3f79a00..29bc961 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -41,7 +41,7 @@ public:
    virtual ~SdParagraphNumTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
    static const sal_uInt16*  GetRanges();

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -84,9 +84,9 @@ void SdParagraphNumTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SdParagraphNumTabPage::Create(vcl::Window *pParent, const SfxItemSet * rAttrSet)
VclPtr<SfxTabPage> SdParagraphNumTabPage::Create(vcl::Window *pParent, const SfxItemSet * rAttrSet)
{
    return new SdParagraphNumTabPage( pParent, *rAttrSet );
    return VclPtr<SdParagraphNumTabPage>::Create( pParent, *rAttrSet );
}

const sal_uInt16* SdParagraphNumTabPage::GetRanges()
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 1591070..3785de3 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -207,10 +207,10 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
    ClickBookletHdl( NULL );
}

SfxTabPage* SdPrintOptions::Create( vcl::Window* pWindow,
                const SfxItemSet* rOutAttrs )
VclPtr<SfxTabPage> SdPrintOptions::Create( vcl::Window* pWindow,
                                           const SfxItemSet* rOutAttrs )
{
    return( new SdPrintOptions( pWindow, *rOutAttrs ) );
    return VclPtr<SdPrintOptions>::Create( pWindow, *rOutAttrs );
}

IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 553789b..f3cd248 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -83,12 +83,12 @@ SdActionDlg::SdActionDlg (
    , rOutAttrs(*pAttr)
{
    // FreeResource();
    SfxTabPage* pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs);
    VclPtr<SfxTabPage> pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs);
    assert(pNewPage); //Unable to create page

    // formerly in PageCreated
    static_cast<SdTPAction*>( pNewPage )->SetView( pView );
    static_cast<SdTPAction*>( pNewPage )->Construct();
    static_cast<SdTPAction*>( pNewPage.get() )->SetView( pView );
    static_cast<SdTPAction*>( pNewPage.get() )->Construct();

    SetTabPage( pNewPage );
}
@@ -378,10 +378,10 @@ int SdTPAction::DeactivatePage( SfxItemSet* pPageSet )
    return LEAVE_PAGE;
}

SfxTabPage* SdTPAction::Create( vcl::Window* pWindow,
                const SfxItemSet& rAttrs )
VclPtr<SfxTabPage> SdTPAction::Create( vcl::Window* pWindow,
                                       const SfxItemSet& rAttrs )
{
    return new SdTPAction( pWindow, rAttrs );
    return VclPtr<SdTPAction>::Create( pWindow, rAttrs );
}

void SdTPAction::UpdateTree()
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a6bcae7..27e4e7d 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -99,10 +99,10 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
    pCbxRotate->GetClickHdl().Call(0);
}

SfxTabPage* SdTpOptionsSnap::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SdTpOptionsSnap::Create( vcl::Window* pWindow,
                                            const SfxItemSet* rAttrs )
{
    return new SdTpOptionsSnap( pWindow, *rAttrs );
    return VclPtr<SdTpOptionsSnap>::Create( pWindow, *rAttrs );
}

/*************************************************************************
@@ -175,10 +175,10 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
    m_pCbxHandlesBezier->SaveValue();
}

SfxTabPage* SdTpOptionsContents::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SdTpOptionsContents::Create( vcl::Window* pWindow,
                                                const SfxItemSet* rAttrs )
{
    return new SdTpOptionsContents( pWindow, *rAttrs );
    return VclPtr<SdTpOptionsContents>::Create( pWindow, *rAttrs );
}

/*************************************************************************
@@ -529,10 +529,10 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
    UpdateCompatibilityControls ();
}

SfxTabPage* SdTpOptionsMisc::Create( vcl::Window* pWindow,
                const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SdTpOptionsMisc::Create( vcl::Window* pWindow,
                                            const SfxItemSet* rAttrs )
{
    return new SdTpOptionsMisc( pWindow, *rAttrs );
    return VclPtr<SdTpOptionsMisc>::Create( pWindow, *rAttrs );
}

IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl)
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index c64b4d7..4c013ce 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -65,7 +65,7 @@ public:
            virtual ~SdPrintOptions();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static  VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 576f647..1bf0948 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -99,7 +99,7 @@ public:
            virtual ~SdTPAction();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet& );
    static  VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet& );

    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 55f671d..f76e046 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -38,7 +38,7 @@ public:
            SdTpOptionsSnap( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
            virtual ~SdTpOptionsSnap();

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static  VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

@@ -60,7 +60,7 @@ public:
            virtual ~SdTpOptionsContents();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static  VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
};
@@ -134,7 +134,7 @@ public:
            virtual ~SdTpOptionsMisc();
    virtual void dispose() SAL_OVERRIDE;

    static  SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
    static  VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
    virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;

diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 7ea881f..1505634 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -33,6 +33,7 @@
#include <sfx2/docfac.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/tabdlg.hxx>
#include <svl/intitem.hxx>
#include <sfx2/taskpane.hxx>
#include <tools/diagnose_ex.h>
@@ -331,9 +332,9 @@ ImageList* SfxModule::GetImageList_Impl( bool bBig )
    return pImpl->GetImageList( pResMgr, bBig );
}

SfxTabPage*     SfxModule::CreateTabPage( sal_uInt16, vcl::Window*, const SfxItemSet& )
VclPtr<SfxTabPage> SfxModule::CreateTabPage( sal_uInt16, vcl::Window*, const SfxItemSet& )
{
    return NULL;
    return VclPtr<SfxTabPage>();
}

SfxModuleArr_Impl& SfxModule::GetModules_Impl()
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a40f652..79e6031 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -640,12 +640,11 @@ void SfxDocumentDescPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage *SfxDocumentDescPage::Create(vcl::Window *pParent, const SfxItemSet *rItemSet)
VclPtr<SfxTabPage> SfxDocumentDescPage::Create(vcl::Window *pParent, const SfxItemSet *rItemSet)
{
     return VclPtr<SfxDocumentDescPage>::Create(pParent, *rItemSet);
}


bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
{
    // Test whether a change is present
@@ -941,9 +940,7 @@ void SfxDocumentPage::ImplCheckPasswordState()
    m_pChangePassBtn->Disable();
}



SfxTabPage* SfxDocumentPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
VclPtr<SfxTabPage> SfxDocumentPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
{
     return VclPtr<SfxDocumentPage>::Create( pParent, *rItemSet );
}
@@ -2274,7 +2271,7 @@ int SfxCustomPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ )
    return nRet;
}

SfxTabPage* SfxCustomPropertiesPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
VclPtr<SfxTabPage> SfxCustomPropertiesPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
{
    return VclPtr<SfxCustomPropertiesPage>::Create( pParent, *rItemSet );
}
@@ -2770,7 +2767,7 @@ int SfxCmisPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ )
    return LEAVE_PAGE;
}

SfxTabPage* SfxCmisPropertiesPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
VclPtr<SfxTabPage> SfxCmisPropertiesPage::Create( vcl::Window* pParent, const SfxItemSet* rItemSet )
{
    return VclPtr<SfxCmisPropertiesPage>::Create( pParent, *rItemSet );
}
diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx
index dc434a3a..22b495c3 100644
--- a/sfx2/source/dialog/documentfontsdialog.cxx
+++ b/sfx2/source/dialog/documentfontsdialog.cxx
@@ -23,7 +23,7 @@

using namespace ::com::sun::star;

SfxTabPage* SfxDocumentFontsPage::Create( vcl::Window* parent, const SfxItemSet* set )
VclPtr<SfxTabPage> SfxDocumentFontsPage::Create( vcl::Window* parent, const SfxItemSet* set )
{
    return VclPtr<SfxDocumentFontsPage>::Create( parent, *set );
}
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 6db9e8e..c7f9245 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -27,6 +27,7 @@

#include <sfx2/styfitem.hxx>
#include <sfx2/styledlg.hxx>
#include <sfx2/tabdlg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/mgetempl.hxx>
#include <sfx2/objsh.hxx>
@@ -569,18 +570,8 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ )



SfxTabPage* SfxManageStyleSheetPage::Create( vcl::Window* pParent,
                                             const SfxItemSet *rAttrSet )

/*  [Description]

    Factory for the creation of the page.

    [Cross-reference]

    <class SfxTabDialog>
*/

VclPtr<SfxTabPage> SfxManageStyleSheetPage::Create( vcl::Window* pParent,
                                                    const SfxItemSet *rAttrSet )
{
    return VclPtr<SfxManageStyleSheetPage>::Create( pParent, *rAttrSet );
}
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index da1a477..c2b1f00 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -115,9 +115,9 @@ void SfxCommonPrintOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SfxCommonPrintOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SfxCommonPrintOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return( VclPtr<SfxCommonPrintOptionsTabPage>::Create( pParent, *rAttrSet ) );
    return VclPtr<SfxCommonPrintOptionsTabPage>::Create( pParent, *rAttrSet );
}

vcl::Window* SfxCommonPrintOptionsTabPage::GetParentLabeledBy( const vcl::Window* pWindow ) const
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 897b201..b5e2681 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -420,7 +420,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl)
}


SfxTabPage* SfxSecurityPage::Create( vcl::Window * pParent, const SfxItemSet * rItemSet )
VclPtr<SfxTabPage> SfxSecurityPage::Create( vcl::Window * pParent, const SfxItemSet * rItemSet )
{
    return VclPtr<SfxSecurityPage>::Create( pParent, *rItemSet );
}
diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx
index 5b64db6..1ac6c6e 100644
--- a/sfx2/source/inc/documentfontsdialog.hxx
+++ b/sfx2/source/inc/documentfontsdialog.hxx
@@ -33,7 +33,7 @@ public:
    SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSet& set );
    virtual ~SfxDocumentFontsPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage* Create( vcl::Window* parent, const SfxItemSet* set );
    static VclPtr<SfxTabPage> Create( vcl::Window* parent, const SfxItemSet* set );
protected:
    virtual bool FillItemSet( SfxItemSet* set ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* set ) SAL_OVERRIDE;
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 640d20f..2bc53c7 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -137,7 +137,7 @@ public:
    //virtual methods for options dialog
    virtual SfxItemSet*  CreateItemSet( sal_uInt16 nId ) SAL_OVERRIDE;
    virtual void         ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual SfxTabPage*  CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
};

#define SM_MOD() ( *reinterpret_cast<SmModule**>(GetAppData(SHL_SM)) )
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 9390921..6508f74 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -293,9 +293,9 @@ void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
        GetConfig()->ItemSetToConfig(rSet);
    }
}
SfxTabPage*  SmModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> SmModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
{
    SfxTabPage*  pRet = 0;
    VclPtr<SfxTabPage> pRet;
    if(nId == SID_SM_TP_PRINTOPTIONS)
        pRet = SmPrintOptionsTabPage::Create( pParent, rSet );
    return pRet;
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index f30b449..de07786 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -115,14 +115,14 @@ namespace svx {
    }
}

SfxTabPage* SvxHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return VclPtr<SvxHeaderPage>::Create( pParent, *rSet );
}



SfxTabPage* SvxFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SvxFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return VclPtr<SvxFooterPage>::Create( pParent, *rSet );
}
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index df77329..c11ebb0 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -200,7 +200,7 @@ void SvxGridTabPage::dispose()
}


SfxTabPage* SvxGridTabPage::Create( vcl::Window* pParent, const SfxItemSet& rAttrSet )
VclPtr<SfxTabPage> SvxGridTabPage::Create( vcl::Window* pParent, const SfxItemSet& rAttrSet )
{
    return VclPtr<SvxGridTabPage>::Create( pParent, rAttrSet );
}
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index dfcc4b1..f016ac3 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -219,7 +219,7 @@ public:
    // Virtual methods for options dialog.
    virtual SfxItemSet*  CreateItemSet( sal_uInt16 nId ) SAL_OVERRIDE;
    virtual void         ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual SfxTabPage*  CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
    virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;

    // Pool is created here and set at SfxShell.
    void    InitAttrPool();
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 01e76c7..9e461fc 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -295,8 +295,8 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet)
    return bModified;
}

SfxTabPage* SwCharURLPage::Create(  vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwCharURLPage::Create(  vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet )
{
    return VclPtr<SwCharURLPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index d8534b6..9f302ba 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -520,7 +520,7 @@ void SwDropCapsPict::_InitPrinter()
SwDropCapsDlg::SwDropCapsDlg(vcl::Window *pParent, const SfxItemSet &rSet )
    : SfxSingleTabDialog(pParent, rSet)
{
    SwDropCapsPage* pNewPage = static_cast<SwDropCapsPage*>( SwDropCapsPage::Create(get_content_area(), &rSet));
    VclPtr<SwDropCapsPage> pNewPage( static_cast<SwDropCapsPage*>( SwDropCapsPage::Create(get_content_area(), &rSet).get() ) );
    pNewPage->SetFormat(false);
    SetTabPage(pNewPage);
}
@@ -605,10 +605,10 @@ int  SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
    return LEAVE_PAGE;
}

SfxTabPage*  SwDropCapsPage::Create(vcl::Window *pParent,
    const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwDropCapsPage::Create(vcl::Window *pParent,
                                          const SfxItemSet *rSet)
{
    return VclPtr<SwDropCapsPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwDropCapsPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

bool  SwDropCapsPage::FillItemSet(SfxItemSet *rSet)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 2f60612..659ad55 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -123,13 +123,14 @@ void SwParagraphNumTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwParagraphNumTabPage::Create(  vcl::Window* pParent,
                                const SfxItemSet* rSet )
VclPtr<SfxTabPage> SwParagraphNumTabPage::Create( vcl::Window* pParent,
                                                  const SfxItemSet* rSet )
{
    return VclPtr<SwParagraphNumTabPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>( new SwParagraphNumTabPage(pParent, *rSet),
                               SAL_NO_ACQUIRE );
}

bool    SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
{
    if( m_pOutlineLvLB->IsValueChangedFromSaved())
    {
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 0da72c2..8ce7206 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -153,9 +153,10 @@ int SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
    return LEAVE_PAGE;
}

SfxTabPage* SwCondCollPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwCondCollPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwCondCollPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwCondCollPage(pParent, *rSet),
                              SAL_NO_ACQUIRE);
}

bool SwCondCollPage::FillItemSet(SfxItemSet *rSet)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 6290542..1346480 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -157,7 +157,7 @@ void SwMailConfigPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*  SwMailConfigPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwMailConfigPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
{
    return VclPtr<SwMailConfigPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 526f587..f60ab88 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -410,7 +410,7 @@ void SwCompatibilityOptPage::WriteOptions()
            pItem->m_bExpandWordSpace );
}

SfxTabPage* SwCompatibilityOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwCompatibilityOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return VclPtr<SwCompatibilityOptPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 518252b..0ce66ad 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -149,8 +149,8 @@ void SwLoadOptPage::dispose()
}


SfxTabPage* SwLoadOptPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwLoadOptPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet )
{
    return VclPtr<SwLoadOptPage>::Create(pParent, *rAttrSet );
}
@@ -569,13 +569,13 @@ void SwCaptionOptPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwCaptionOptPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwCaptionOptPage::Create( vcl::Window* pParent,
                                             const SfxItemSet* rAttrSet )
{
    return VclPtr<SwCaptionOptPage>::Create(pParent, *rAttrSet );
    return VclPtr<SwCaptionOptPage>::Create( pParent, *rAttrSet );
}

bool SwCaptionOptPage::FillItemSet( SfxItemSet*  )
bool SwCaptionOptPage::FillItemSet( SfxItemSet* )
{
    bool bRet = false;
    SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index fa096c3..7aa839d 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -184,8 +184,8 @@ void SwContentOptPage::dispose()
}


SfxTabPage* SwContentOptPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwContentOptPage::Create( vcl::Window* pParent,
                                             const SfxItemSet* rAttrSet)
{
    return VclPtr<SwContentOptPage>::Create(pParent, *rAttrSet);
}
@@ -415,10 +415,11 @@ void SwAddPrinterTabPage::SetPreview(bool bPrev)
    m_pPagesFrame->Enable(!bPreview);
}

SfxTabPage* SwAddPrinterTabPage::Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwAddPrinterTabPage::Create( vcl::Window* pParent,
                                                const SfxItemSet* rAttrSet )
{
    return VclPtr<SwAddPrinterTabPage>::Create( pParent, *rAttrSet );
    return VclPtr<SfxTabPage>(new SwAddPrinterTabPage( pParent, *rAttrSet ),
                              SAL_NO_ACQUIRE);
}

bool    SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
@@ -653,10 +654,11 @@ void SwStdFontTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwStdFontTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwStdFontTabPage::Create( vcl::Window* pParent,
                                             const SfxItemSet* rAttrSet )
{
    return VclPtr<SwStdFontTabPage>::Create(pParent, *rAttrSet);
    return VclPtr<SfxTabPage>(new SwStdFontTabPage(pParent, *rAttrSet),
                              SAL_NO_ACQUIRE);
}

static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
@@ -1177,10 +1179,11 @@ void SwTableOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwTableOptionsTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwTableOptionsTabPage::Create( vcl::Window* pParent,
                                                  const SfxItemSet* rAttrSet )
{
    return VclPtr<SwTableOptionsTabPage>::Create(pParent, *rAttrSet );
    return VclPtr<SfxTabPage>( new SwTableOptionsTabPage(pParent, *rAttrSet ),
                               SAL_NO_ACQUIRE );
}

bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -1438,9 +1441,9 @@ void SwShdwCrsrOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwShdwCrsrOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
VclPtr<SfxTabPage> SwShdwCrsrOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
    return VclPtr<SwShdwCrsrOptionsTabPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwShdwCrsrOptionsTabPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

void SwShdwCrsrOptionsTabPage::PageCreated( const SfxAllItemSet& aSet )
@@ -1777,7 +1780,7 @@ namespace
}

SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( vcl::Window* pParent,
                                                    const SfxItemSet& rSet )
                                                  const SfxItemSet& rSet )
    : SfxTabPage(pParent, "OptRedLinePage",
        "modules/swriter/ui/optredlinepage.ui" , &rSet)
    , sNone(SW_RESSTR(SW_STR_NONE))
@@ -1869,9 +1872,9 @@ void SwRedlineOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwRedlineOptionsTabPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>( new SwRedlineOptionsTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
}

bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -2383,9 +2386,9 @@ void SwCompareOptionsTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwCompareOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwCompareOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
    return VclPtr<SwCompareOptionsTabPage>::Create( pParent, *rAttrSet );
    return VclPtr<SfxTabPage>(new SwCompareOptionsTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE);
}

bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -2536,8 +2539,8 @@ void SwTestTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwTestTabPage::Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwTestTabPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet )
{
    return VclPtr<SwTestTabPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 3477d25..de1d3d6 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -36,7 +36,7 @@
#include <unotools/localedatawrapper.hxx>
#include <vcl/settings.hxx>

SfxTabPage *  SwDocStatPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwDocStatPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwDocStatPage>::Create(pParent, *rSet);
}
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 199183e..d6f6bd6 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1686,8 +1686,8 @@ void SwInsertSectionTabPage::Reset( const SfxItemSet* )
{
}

SfxTabPage* SwInsertSectionTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwInsertSectionTabPage::Create( vcl::Window* pParent,
                                                   const SfxItemSet* rAttrSet)
{
    return VclPtr<SwInsertSectionTabPage>::Create(pParent, *rAttrSet);
}
@@ -2052,8 +2052,8 @@ void SwSectionFtnEndTabPage::Reset( const SfxItemSet* rSet )
                                    RES_END_AT_TXTEND, false )));
}

SfxTabPage* SwSectionFtnEndTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwSectionFtnEndTabPage::Create( vcl::Window* pParent,
                                                   const SfxItemSet* rAttrSet)
{
    return VclPtr<SwSectionFtnEndTabPage>::Create(pParent, *rAttrSet);
}
@@ -2223,7 +2223,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet)
    IndentModifyHdl(0);
}

SfxTabPage*  SwSectionIndentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwSectionIndentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
{
    return VclPtr<SwSectionIndentTabPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 2288a06..5084027 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -461,9 +461,9 @@ void SwEnvFmtPage::SetMinMax()
    m_pSizeHeightField->Reformat();
}

SfxTabPage* SwEnvFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwEnvFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwEnvFmtPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwEnvFmtPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwEnvFmtPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index f8a4e31..74fec72 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -61,7 +61,7 @@ public:
    virtual ~SwEnvFmtPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 2d9f861..17974f1 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -323,9 +323,9 @@ void SwEnvPage::InitDatabaseBox()
    }
}

SfxTabPage* SwEnvPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwEnvPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwEnvPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwEnvPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwEnvPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 42b65bc..02d8b90 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -144,9 +144,9 @@ IMPL_LINK_NOARG(SwEnvPrtPage, AlignHdl)
    return 0;
}

SfxTabPage* SwEnvPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwEnvPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwEnvPrtPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwEnvPrtPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwEnvPrtPage::ActivatePage(const SfxItemSet&)
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index a819832..ea09f71 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -61,7 +61,7 @@ public:
    virtual ~SwEnvPrtPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index dfd415e..829616d 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -488,9 +488,9 @@ void SwLabPage::InitDatabaseBox()
    }
}

SfxTabPage* SwLabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwLabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwLabPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwLabPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwLabPage::ActivatePage(const SfxItemSet& rSet)
@@ -633,9 +633,9 @@ void SwVisitingCardPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwVisitingCardPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwVisitingCardPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwVisitingCardPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwVisitingCardPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwVisitingCardPage::ActivatePage(const SfxItemSet& rSet)
@@ -794,9 +794,9 @@ void SwPrivateDataPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwPrivateDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwPrivateDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwPrivateDataPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwPrivateDataPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwPrivateDataPage::ActivatePage(const SfxItemSet& rSet)
@@ -907,9 +907,9 @@ void SwBusinessDataPage::dispose()
}


SfxTabPage* SwBusinessDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwBusinessDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwBusinessDataPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwBusinessDataPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwBusinessDataPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 95ac892..7b75b26 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -485,9 +485,9 @@ void SwLabFmtPage::ChangeMinMax()
    m_pPHeightField->Reformat();
}

SfxTabPage* SwLabFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwLabFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwLabFmtPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwLabFmtPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwLabFmtPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 4fbad48..e235ab7 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -104,7 +104,7 @@ public:
    virtual ~SwLabFmtPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 9c62af3..34c6c70 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -108,9 +108,9 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
    return 0;
}

SfxTabPage* SwLabPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SwLabPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
    return VclPtr<SwLabPrtPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwLabPrtPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

void SwLabPrtPage::ActivatePage( const SfxItemSet& rSet )
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 99b1649..be499b4 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -56,7 +56,7 @@ public:
    virtual ~SwLabPrtPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index a7ca3ea..152529c 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -66,7 +66,7 @@ public:
    virtual ~SwLabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
@@ -119,7 +119,7 @@ class SwVisitingCardPage : public SfxTabPage
public:
    SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet);

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
@@ -158,7 +158,7 @@ public:
    virtual ~SwPrivateDataPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
@@ -195,7 +195,7 @@ public:
    virtual ~SwBusinessDataPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 4e16079..edde375 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -264,8 +264,8 @@ bool SwFldDBPage::FillItemSet(SfxItemSet* )
    return false;
}

SfxTabPage* SwFldDBPage::Create(    vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldDBPage::Create( vcl::Window* pParent,
                                        const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldDBPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index a54efb9..bb18eb2 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -73,7 +73,7 @@ public:
                        virtual ~SwFldDBPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index d77fdf6..8814ceb 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -462,8 +462,8 @@ bool SwFldDokInfPage::FillItemSet(SfxItemSet* )
    return false;
}

SfxTabPage* SwFldDokInfPage::Create(    vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldDokInfPage::Create( vcl::Window* pParent,
                                            const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldDokInfPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 5b7f444..fc94520 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -64,7 +64,7 @@ public:
                        virtual ~SwFldDokInfPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index cd0be8b..f8dc98f 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -653,8 +653,8 @@ bool SwFldDokPage::FillItemSet(SfxItemSet* )
    return false;
}

SfxTabPage* SwFldDokPage::Create(   vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldDokPage::Create( vcl::Window* pParent,
                                         const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldDokPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index ab98dc5..3beb6a7 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -66,7 +66,7 @@ public:
                        virtual ~SwFldDokPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 2bcc08d..1b7906b 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -124,7 +124,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw)
// initialise controls
void SwFldEditDlg::Init()
{
    SwFldPage* pTabPage = static_cast<SwFldPage*>(GetTabPage());
    VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage());

    if( pTabPage )
    {
@@ -159,10 +159,10 @@ void SwFldEditDlg::Init()
                           !pSh->HasReadonlySel() );
}

SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
{
    // create TabPage
    SfxTabPage* pTabPage = 0;
    VclPtr<SfxTabPage> pTabPage;

    switch (nGroup)
    {
@@ -193,7 +193,7 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
            }
        case GRP_DB:
            pTabPage = SwFldDBPage::Create(get_content_area(), 0);
            static_cast<SwFldDBPage*>(pTabPage)->SetWrtShell(*pSh);
            static_cast<SwFldDBPage*>(pTabPage.get())->SetWrtShell(*pSh);
            break;
        case GRP_VAR:
            pTabPage = SwFldVarPage::Create(get_content_area(), 0);
@@ -205,7 +205,7 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)

    if (pTabPage)
    {
        static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh);
        static_cast<SwFldPage*>(pTabPage.get())->SetWrtShell(pSh);
        SetTabPage(pTabPage);
    }

@@ -244,12 +244,9 @@ IMPL_LINK_NOARG(SwFldEditDlg, OKHdl)
{
    if (GetOKButton()->IsEnabled())
    {
        SfxTabPage* pTabPage = GetTabPage();
        VclPtr<SfxTabPage> pTabPage = GetTabPage();
        if (pTabPage)
        {
            pTabPage->FillItemSet(0);

        }
        EndDialog( RET_OK );
    }

@@ -270,7 +267,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
    pSh->EnterStdMode();

    SwFieldType *pOldTyp = 0;
    SwFldPage* pTabPage = static_cast<SwFldPage*>(GetTabPage());
    VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage());

    //#112462# FillItemSet may delete the current field
    //that's why it has to be called before accessing the current field
@@ -290,7 +287,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
    sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());

    if (nGroup != pTabPage->GetGroup())
        pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup));
        pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup).get());

    pTabPage->EditNewField();

diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index b2cfeb3..f079e87 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -628,8 +628,8 @@ OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro)
    return rMacro;
}

SfxTabPage* SwFldFuncPage::Create(  vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldFuncPage::Create( vcl::Window* pParent,
                                          const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldFuncPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 6ec851b..fefc9db 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -88,7 +88,7 @@ public:
                        virtual ~SwFldFuncPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index e421f1f..f704afc 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -950,8 +950,8 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* )
    return false;
}

SfxTabPage* SwFldRefPage::Create(   vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldRefPage::Create( vcl::Window* pParent,
                                         const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldRefPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 959c1e0..24c540f 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -79,7 +79,7 @@ public:
                        virtual ~SwFldRefPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 257181a..27c60f8 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1247,8 +1247,8 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* )
    return false;
}

SfxTabPage* SwFldVarPage::Create(   vcl::Window* pParent,
                        const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SwFldVarPage::Create( vcl::Window* pParent,
                                         const SfxItemSet* rAttrSet )
{
    return VclPtr<SwFldVarPage>::Create( pParent, *rAttrSet );
}
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index bac7fc7..a37aa58 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -95,7 +95,7 @@ public:
                        virtual ~SwFldVarPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index f0ae9c4..12bcb52 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -161,7 +161,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
    assert(pColPgSet);

    // create TabPage
    pTabPage = static_cast<SwColumnPage*>( SwColumnPage::Create(get_content_area(), pColPgSet) );
    pTabPage = static_cast<SwColumnPage*>( SwColumnPage::Create(get_content_area(), pColPgSet).get() );
    pTabPage->get<vcl::Window>("applytoft")->Show();
    pTabPage->get(m_pApplyToLB, "applytolb");
    m_pApplyToLB->Show();
@@ -657,10 +657,11 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
}

// create TabPage
SfxTabPage* SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwColumnPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwColumnPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

// stuff attributes into the Set when OK
bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
{
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index bc4afce..7a36a36 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -858,9 +858,9 @@ void SwFrmPage::setOptimalRelWidth()
    m_pHoriRelationLB->Clear();
}

SfxTabPage* SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwFrmPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwFrmPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

void SwFrmPage::EnableGraficMode( void )
@@ -2421,9 +2421,9 @@ void SwGrfExtPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwGrfExtPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
VclPtr<SfxTabPage> SwGrfExtPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
    return VclPtr<SwGrfExtPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwGrfExtPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

void SwGrfExtPage::Reset(const SfxItemSet *rSet)
@@ -2847,9 +2847,9 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet)
    return bModified;
}

SfxTabPage* SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwFrmURLPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwFrmURLPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl)
@@ -2939,9 +2939,9 @@ void SwFrmAddPage::dispose()
}


SfxTabPage* SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwFrmAddPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwFrmAddPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwFrmAddPage::Reset(const SfxItemSet *rSet )
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 6eab290..666cd82 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -57,7 +57,7 @@ SwWrapDlg::SwWrapDlg(vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bo

{
    // create TabPage
    SwWrapTabPage* pNewPage = static_cast<SwWrapTabPage*>( SwWrapTabPage::Create(get_content_area(), &rSet) );
    VclPtr<SwWrapTabPage> pNewPage = static_cast<SwWrapTabPage*>( SwWrapTabPage::Create(get_content_area(), &rSet).get() );
    pNewPage->SetFormatUsed(false, bDrawMode);
    pNewPage->SetShell(pWrtShell);
    SetTabPage(pNewPage);
@@ -155,9 +155,9 @@ void SwWrapTabPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage* SwWrapTabPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwWrapTabPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwWrapTabPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwWrapTabPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwWrapTabPage::Reset(const SfxItemSet *rSet)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 90e1c73..e6f1993 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1313,7 +1313,7 @@ int SwTOXSelectTabPage::DeactivatePage( SfxItemSet* _pSet )
    return LEAVE_PAGE;
}

SfxTabPage* SwTOXSelectTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwTOXSelectTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
{
    return VclPtr<SwTOXSelectTabPage>::Create(pParent, *rAttrSet);
}
@@ -2210,7 +2210,7 @@ int SwTOXEntryTabPage::DeactivatePage( SfxItemSet* /*pSet*/)
    return LEAVE_PAGE;
}

SfxTabPage* SwTOXEntryTabPage::Create( vcl::Window* pParent,     const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwTOXEntryTabPage::Create( vcl::Window* pParent,     const SfxItemSet* rAttrSet)
{
    return VclPtr<SwTOXEntryTabPage>::Create(pParent, *rAttrSet);
}
@@ -3751,8 +3751,8 @@ int SwTOXStylesTabPage::DeactivatePage( SfxItemSet* /*pSet*/  )
    return LEAVE_PAGE;
}

SfxTabPage* SwTOXStylesTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwTOXStylesTabPage::Create( vcl::Window* pParent,
                                               const SfxItemSet* rAttrSet)
{
    return VclPtr<SwTOXStylesTabPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 5717b44..04467a3 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -246,7 +246,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* )
    m_pPageTemplBox->SelectEntry( pInf->GetPageDesc( *pSh->GetDoc() )->GetName());
}

SfxTabPage *SwEndNoteOptionPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
VclPtr<SfxTabPage> SwEndNoteOptionPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
    return VclPtr<SwEndNoteOptionPage>::Create( pParent, true, *rSet );
}
@@ -422,9 +422,9 @@ SwFootNoteOptionPage::~SwFootNoteOptionPage()
{
}

SfxTabPage *SwFootNoteOptionPage::Create(vcl::Window *pParent, const SfxItemSet *rSet )
VclPtr<SfxTabPage> SwFootNoteOptionPage::Create(vcl::Window *pParent, const SfxItemSet *rSet )
{
    return VclPtr<SwFootNoteOptionPage>::Create( pParent, *rSet );
    return VclPtr<SfxTabPage>(new SwFootNoteOptionPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 666db76..31b5f8a 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -72,7 +72,7 @@ public:
    virtual ~SwEndNoteOptionPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;

@@ -81,11 +81,11 @@ public:

class SwFootNoteOptionPage : public SwEndNoteOptionPage
{
    SwFootNoteOptionPage( vcl::Window *pParent, const SfxItemSet &rSet );
    virtual ~SwFootNoteOptionPage();

public:
    SwFootNoteOptionPage( vcl::Window *pParent, const SfxItemSet &rSet );
    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
};

#endif
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 40cc6c5d..dee150b 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -542,8 +542,8 @@ void SwNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode()
    m_pIndentAtMF->Show( bLabelAlignmentPosAndSpaceModeActive );
}

SfxTabPage* SwNumPositionTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwNumPositionTabPage::Create( vcl::Window* pParent,
                                                 const SfxItemSet* rAttrSet)
{
    return VclPtr<SwNumPositionTabPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 343a8de..b46ffe4 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -865,8 +865,8 @@ void SwOutlineSettingsTabPage::Reset( const SfxItemSet* rSet )
    ActivatePage(*rSet);
}

SfxTabPage* SwOutlineSettingsTabPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwOutlineSettingsTabPage::Create( vcl::Window* pParent,
                                                     const SfxItemSet* rAttrSet)
{
    return VclPtr<SwOutlineSettingsTabPage>::Create(pParent, *rAttrSet);
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index b1a6a20..2780aa8 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -153,10 +153,9 @@ void SwFootNotePage::dispose()
    SfxTabPage::dispose();
}


SfxTabPage* SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwFootNotePage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwFootNotePage(pParent, *rSet), SAL_NO_ACQUIRE);
}

void SwFootNotePage::Reset(const SfxItemSet *rSet)
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 8b90b64..15f9b39 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -180,12 +180,12 @@ void SwTextGridPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage *SwTextGridPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
VclPtr<SfxTabPage> SwTextGridPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
    return VclPtr<SwTextGridPage>::Create(pParent, *rSet);
    return VclPtr<SfxTabPage>(new SwTextGridPage(pParent, *rSet), SAL_NO_ACQUIRE);
}

bool    SwTextGridPage::FillItemSet(SfxItemSet *rSet)
bool SwTextGridPage::FillItemSet(SfxItemSet *rSet)
{
    bool bRet = false;
    if(m_pNoGridRB->IsValueChangedFromSaved() ||
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index f444029..61c01e2 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -396,8 +396,8 @@ void  SwFormatTablePage::ModifyHdl(const Edit * pEdit)
    bModified = true;
}

SfxTabPage*  SwFormatTablePage::Create( vcl::Window* pParent,
                                   const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwFormatTablePage::Create( vcl::Window* pParent,
                                              const SfxItemSet* rAttrSet)
{
    return VclPtr<SwFormatTablePage>::Create( pParent, *rAttrSet );
}
@@ -793,8 +793,8 @@ void SwTableColumnPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*   SwTableColumnPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwTableColumnPage::Create( vcl::Window* pParent,
                                              const SfxItemSet* rAttrSet)
{
    return VclPtr<SwTableColumnPage>::Create( pParent, *rAttrSet );
}
@@ -1377,10 +1377,10 @@ void SwTextFlowPage::dispose()
    SfxTabPage::dispose();
}

SfxTabPage*   SwTextFlowPage::Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet)
VclPtr<SfxTabPage> SwTextFlowPage::Create( vcl::Window* pParent,
                                           const SfxItemSet* rAttrSet)
{
    return VclPtr<SwTextFlowPage>::Create(pParent, *rAttrSet);
    return VclPtr<SfxTabPage>(new SwTextFlowPage(pParent, *rAttrSet), SAL_NO_ACQUIRE);
}

bool  SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index db3aeb3..4d4af5c 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -418,9 +418,9 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
    ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB);
}

SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
{
    SfxTabPage* pRet = NULL;
    VclPtr<SfxTabPage> pRet;
    SfxAllItemSet aSet(*(rSet.GetPool()));
    switch( nId )
    {
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 66914be..ff6f91b 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -83,8 +83,8 @@ public:

                        virtual ~SwCharURLPage();
    virtual void        dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index f354708..1b24826 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -175,7 +175,7 @@ public:
    virtual ~SwColumnPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges() { return aPageRg; }

    virtual bool    FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/docstdlg.hxx b/sw/source/uibase/inc/docstdlg.hxx
index 67c5d54..ce76947 100644
--- a/sw/source/uibase/inc/docstdlg.hxx
+++ b/sw/source/uibase/inc/docstdlg.hxx
@@ -34,7 +34,7 @@ public:
    virtual ~SwDocStatPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);

protected:
    virtual bool    FillItemSet(      SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index 3657ecb..d9dc4da 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -84,7 +84,7 @@ public:
    virtual ~SwDropCapsPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges() { return aPageRg; }


diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index f87db92..aad23d8 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -106,7 +106,7 @@ public:
    virtual ~SwEnvPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);

    virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
    virtual int  DeactivatePage(SfxItemSet* pSet = 0) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index cb7bd4f..626dc91 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -36,7 +36,7 @@ class SwFldEditDlg : public SfxSingleTabDialog
    DECL_LINK(NextPrevHdl, Button *pBt = 0);

    void            Init();
    SfxTabPage*     CreatePage(sal_uInt16 nGroup);
    VclPtr<SfxTabPage> CreatePage(sal_uInt16 nGroup);

    void EnsureSelection(SwField *pCurFld, SwFldMgr &rMgr);
public:
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index d1d81e0..cc335ca 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -186,7 +186,7 @@ public:
    virtual ~SwFrmPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges() { return aPageRg; }

    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
@@ -234,7 +234,7 @@ class SwGrfExtPage: public SfxTabPage
public:
    SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet);

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);

    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
@@ -263,7 +263,7 @@ public:
    virtual ~SwFrmURLPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);

    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
    virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
@@ -312,7 +312,7 @@ public:
    virtual ~SwFrmAddPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16*  GetRanges() { return aAddPgRg; }

    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx
index 96ecd24..e502ea9 100644
--- a/sw/source/uibase/inc/mailconfigpage.hxx
+++ b/sw/source/uibase/inc/mailconfigpage.hxx
@@ -59,8 +59,8 @@ public:
    virtual ~SwMailConfigPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx
index 6e565c1..fa1965fe 100644
--- a/sw/source/uibase/inc/num.hxx
+++ b/sw/source/uibase/inc/num.hxx
@@ -124,8 +124,8 @@ public:
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet);

    void                SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
    void                SetWrtShell(SwWrtShell* pSh);
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index 60e4ff2..a5fe54a 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -72,8 +72,8 @@ public:
    virtual ~SwParagraphNumTabPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rSet );
    static const sal_uInt16* GetRanges() { return aPageRg; }

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index 7e486c2..d48bf227e 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -64,7 +64,7 @@ public:
    virtual ~SwCompatibilityOptPage();
    virtual void            dispose() SAL_OVERRIDE;

    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void            Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 6b1e538..8c873f1 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -67,8 +67,8 @@ public:
    virtual ~SwLoadOptPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -169,8 +169,8 @@ public:
                        virtual ~SwCaptionOptPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
                                      const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index e324ab7..8fa45323 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -72,7 +72,7 @@ public:
                        virtual ~SwContentOptPage();
    virtual void        dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -121,7 +121,7 @@ public:
    virtual ~SwAddPrinterTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -188,13 +188,13 @@ class SwStdFontTabPage : public SfxTabPage
    DECL_LINK( ModifyHeightHdl, FontSizeBox * );
    DECL_LINK( LoseFocusHdl, ComboBox * );

     virtual ~SwStdFontTabPage();
     virtual void       dispose() SAL_OVERRIDE;
    SwStdFontTabPage( vcl::Window* pParent,
                      const SfxItemSet& rSet );
    virtual ~SwStdFontTabPage();
    virtual void       dispose() SAL_OVERRIDE;

public:
    SwStdFontTabPage( vcl::Window* pParent,
                                       const SfxItemSet& rSet );
    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -236,7 +236,7 @@ public:
    virtual ~SwTableOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -282,7 +282,7 @@ public:
    virtual ~SwShdwCrsrOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -362,7 +362,7 @@ public:
    virtual ~SwRedlineOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -380,8 +380,8 @@ public:
    virtual ~SwTestTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet );

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -425,7 +425,7 @@ public:
    virtual ~SwCompareOptionsTabPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
    static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );

    virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index 36e564e..9d89706 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -131,8 +131,8 @@ public:

    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet);
};

#endif
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 9f298eb..fa28122 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -32,9 +32,9 @@
class SwFootNotePage: public SfxTabPage
{
    static const sal_uInt16 aPageRg[];
public:
    SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet);
    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
public:
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges() { return aPageRg; }

    virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx
index 39a4d80..b0b07c7 100644
--- a/sw/source/uibase/inc/pggrid.hxx
+++ b/sw/source/uibase/inc/pggrid.hxx
@@ -85,7 +85,7 @@ public:
    virtual ~SwTextGridPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges();

    virtual bool    FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 5344404..633362531 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -192,7 +192,7 @@ public:
    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
};

@@ -235,7 +235,7 @@ public:
    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
};

@@ -254,7 +254,7 @@ public:
    virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    void    SetWrtShell(SwWrtShell& rSh);
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index a1bc1e1..565fa51 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -64,7 +64,7 @@ class SwCondCollPage : public SfxTabPage
public:
    SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet);

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static const sal_uInt16* GetRanges() { return aPageRg; }

    virtual bool FillItemSet(      SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 27e0430..927b7d4 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -230,7 +230,7 @@ public:
    virtual void        ActivatePage( const SfxItemSet& ) SAL_OVERRIDE;
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);

    void                SelectType(TOXTypes eSet);  //preset TOXType, GlobalDoc
@@ -447,8 +447,8 @@ public:
    virtual void        ActivatePage( const SfxItemSet& ) SAL_OVERRIDE;
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet);
    void                SetWrtShell(SwWrtShell& rSh);

    OUString            GetLevelHelp(sal_uInt16 nLevel) const;
@@ -495,8 +495,8 @@ public:
    virtual void        ActivatePage( const SfxItemSet& ) SAL_OVERRIDE;
    virtual int         DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent,
                                const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
                                       const SfxItemSet* rAttrSet);

};

diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index b01ede1..2de0350 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -100,7 +100,7 @@ class SwWrapTabPage: public SfxTabPage
public:
    SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet);

    static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
    static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);

    virtual bool    FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
    virtual void    Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index ef7c9ad..7d3916b 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -84,7 +84,7 @@ public:
    virtual ~SwFormatTablePage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
@@ -135,7 +135,7 @@ public:
    virtual ~SwTableColumnPage();
    virtual void dispose() SAL_OVERRIDE;

    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
@@ -184,7 +184,7 @@ public:
    SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet );
    virtual ~SwTextFlowPage();
    virtual void dispose() SAL_OVERRIDE;
    static SfxTabPage*  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;