sw: convert new to ::Create.

Change-Id: I937aa67ee4a3b07bd180daaaa3c665245ea08b92
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index d97124d..5ad0bda 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -23,6 +23,7 @@
#include <rtl/ref.hxx>
#include <cstddef>
#include <utility>
#include <type_traits>

/// @cond INTERNAL
namespace vcl { namespace detail {
@@ -165,7 +166,16 @@ public:
        m_rInnerRef.set(pBody);
    }

    inline VclPtr<reference_type>& SAL_CALL operator= (reference_type * pBody)
    /** Up-casting conversion constructor: Copies interface reference.

        Does not work for up-casts to ambiguous bases.  For the special case of
        up-casting to Reference< XInterface >, see the corresponding conversion
        operator.

        @param rRef another reference
    */
    template< class derived_type, class = typename std::enable_if< ::vcl::detail::UpCast< reference_type, derived_type >::t >::type >
    inline VclPtr<reference_type>& SAL_CALL operator= (derived_type * pBody)
    {
        m_rInnerRef.set(pBody);
        return *this;
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index 23676cbc..39b6757 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -38,7 +38,7 @@ PageColumnControl::PageColumnControl(
    const bool bLandscape )
    : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_COLUMN) )
    , mpColumnValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_COLUMN) ) )
    , maMoreButton( new PushButton( this, SW_RES(CB_COLUMN_MORE) ) )
    , maMoreButton( VclPtr<PushButton>::Create( this, SW_RES(CB_COLUMN_MORE) ) )
    , mnColumnType( nColumnType )
    , mrPagePropPanel(rPanel)
{
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index e01c373..6479a7f 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -50,18 +50,18 @@ PageMarginControl::PageMarginControl(
    const SfxMapUnit eUnit )
    : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_MARGIN) )
    , mpMarginValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_MARGIN) ) )
    , maCustom(new FixedText(this, SW_RES(FT_CUSTOM)))
    , maLeft(new FixedText(this, SW_RES(FT_LEFT)))
    , maInner(new FixedText(this, SW_RES(FT_INNER)))
    , maLeftMarginEdit(new MetricField(this, SW_RES(MF_SWLEFT_MARGIN)))
    , maRight(new FixedText(this, SW_RES(FT_RIGHT)))
    , maOuter(new FixedText(this, SW_RES(FT_OUTER)))
    , maRightMarginEdit(new MetricField(this, SW_RES(MF_SWRIGHT_MARGIN)))
    , maTop(new FixedText(this, SW_RES(FT_TOP)))
    , maTopMarginEdit(new MetricField(this, SW_RES(MF_SWTOP_MARGIN)))
    , maBottom(new FixedText(this, SW_RES(FT_BOTTOM)))
    , maBottomMarginEdit(new MetricField(this, SW_RES(MF_SWBOTTOM_MARGIN)))
    , maWidthHeightField(new MetricField( this, SW_RES(FLD_WIDTH_HEIGHT) ) )
    , maCustom(VclPtr<FixedText>::Create(this, SW_RES(FT_CUSTOM)))
    , maLeft(VclPtr<FixedText>::Create(this, SW_RES(FT_LEFT)))
    , maInner(VclPtr<FixedText>::Create(this, SW_RES(FT_INNER)))
    , maLeftMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWLEFT_MARGIN)))
    , maRight(VclPtr<FixedText>::Create(this, SW_RES(FT_RIGHT)))
    , maOuter(VclPtr<FixedText>::Create(this, SW_RES(FT_OUTER)))
    , maRightMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWRIGHT_MARGIN)))
    , maTop(VclPtr<FixedText>::Create(this, SW_RES(FT_TOP)))
    , maTopMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWTOP_MARGIN)))
    , maBottom(VclPtr<FixedText>::Create(this, SW_RES(FT_BOTTOM)))
    , maBottomMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWBOTTOM_MARGIN)))
    , maWidthHeightField(VclPtr<MetricField>::Create( this, SW_RES(FLD_WIDTH_HEIGHT) ) )
    , mnPageLeftMargin( aPageLRMargin.GetLeft() )
    , mnPageRightMargin( aPageLRMargin.GetRight() )
    , mnPageTopMargin( aPageULMargin.GetUpper() )
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index d35ac67..48c7b5a 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -96,7 +96,8 @@ VclPtr<vcl::Window> PagePropertyPanel::Create (
        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);

    return VclPtr<vcl::Window>(
                new PagePropertyPanel(
                VclPtr<PagePropertyPanel>::Create(

                        pParent,
                        rxFrame,
                        pBindings),
@@ -294,9 +295,9 @@ void PagePropertyPanel::Initialize()
    mpBindings->Update( SID_ATTR_PAGE_SIZE );
}

::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent )
VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent )
{
    return new PageOrientationControl( pParent, *this , mpPageItem->IsLandscape() );
    return VclPtr<PageOrientationControl>::Create( pParent, *this , mpPageItem->IsLandscape() );
}

IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox )
@@ -371,9 +372,10 @@ void PagePropertyPanel::ClosePageOrientationPopup()
    maOrientationPopup.Hide();
}

::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent )
VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent )
{
    return new PageMarginControl(
    return VclPtr<PageMarginControl>::Create(

        pParent,
        *this,
        *mpPageLRMarginItem.get(),
@@ -421,9 +423,10 @@ void PagePropertyPanel::ClosePageMarginPopup()
    maMarginPopup.Hide();
}

::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent )
VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent )
{
    return new PageSizeControl(
    return VclPtr<PageSizeControl>::Create(

        pParent,
        *this,
        mePaper,
@@ -455,9 +458,10 @@ void PagePropertyPanel::ClosePageSizePopup()
    maSizePopup.Hide();
}

::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent )
VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent )
{
    return new PageColumnControl(
    return VclPtr<PageColumnControl>::Create(

        pParent,
        *this,
        mpPageColumnTypeItem->GetValue(),
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
index d97d27a..05119bf 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
@@ -72,11 +72,11 @@ namespace sw { namespace sidebar {
            return mpBindings;
        }

        ::svx::sidebar::PopupControl* CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent );
        VclPtr<::svx::sidebar::PopupControl> CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent );
        void ExecuteOrientationChange( const bool bLandscape );
        void ClosePageOrientationPopup();

        ::svx::sidebar::PopupControl* CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent );
        VclPtr<::svx::sidebar::PopupControl> CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent );
        void ExecuteMarginLRChange(
            const long nPageLeftMargin,
            const long nPageRightMargin );
@@ -86,22 +86,22 @@ namespace sw { namespace sidebar {
        void ExecutePageLayoutChange( const bool bMirrored );
        void ClosePageMarginPopup();

        ::svx::sidebar::PopupControl* CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent );
        VclPtr<::svx::sidebar::PopupControl> CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent );
        void ExecuteSizeChange( const Paper ePaper );
        void ClosePageSizePopup();

        ::svx::sidebar::PopupControl* CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent );
        VclPtr<::svx::sidebar::PopupControl> CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent );
        void ExecuteColumnChange( const sal_uInt16 nColumnType );
        void ClosePageColumnPopup();

        void StartUndo();
        void EndUndo();

    private:
        PagePropertyPanel(
            vcl::Window* pParent,
            const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
            SfxBindings* pBindings );
    private:
        virtual ~PagePropertyPanel();
        virtual void dispose() SAL_OVERRIDE;

diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 6eb4ea3..bc9c0b9 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -43,8 +43,8 @@ PageSizeControl::PageSizeControl(
    const FieldUnit eFUnit )
    : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_SIZE) )
    , mpSizeValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::TEXT_TEXT, this, SW_RES(VS_SIZE) ) )
    , maMoreButton( new PushButton( this, SW_RES(CB_SIZE_MORE) ) )
    , maWidthHeightField( new MetricField( this, SW_RES(FLD_WIDTH_HEIGHT) ) )
    , maMoreButton( VclPtr<PushButton>::Create( this, SW_RES(CB_SIZE_MORE) ) )
    , maWidthHeightField( VclPtr<MetricField>::Create( this, SW_RES(FLD_WIDTH_HEIGHT) ) )
    , mePaper( ePaper )
    , maPaperList()
    , mrPagePropPanel(rPanel)
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index a388d42..76db671 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -55,7 +55,8 @@ VclPtr<vcl::Window> WrapPropertyPanel::Create (
        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", NULL, 2);

    return VclPtr<vcl::Window>(
                new WrapPropertyPanel(
                VclPtr<WrapPropertyPanel>::Create(

                        pParent,
                        rxFrame,
                        pBindings),
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index 4c0291b..bd1f27a 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -49,13 +49,12 @@ namespace sw { namespace sidebar {

        virtual ~WrapPropertyPanel();
        virtual void dispose() SAL_OVERRIDE;
    private:

        WrapPropertyPanel(
            vcl::Window* pParent,
            const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
            SfxBindings* pBindings );


    private:
        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
        SfxBindings* mpBindings;

diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index de3d79d..da97123 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1159,12 +1159,12 @@ void SwPagePreview::Init(const SwViewOption * pPrefs)

SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
    SfxViewShell( pViewFrame, SWVIEWFLAGS ),
    pViewWin( new SwPagePreviewWin(&(GetViewFrame())->GetWindow(), *this ) ),
    pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ),
    nNewPage(USHRT_MAX),
    sPageStr(SW_RES(STR_PAGE)),
    pHScrollbar(0),
    pVScrollbar(0),
    pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(),
    pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(),
        pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
    mnPageCount( 0 ),
    mbResetFormDesignMode( false ),
@@ -1258,7 +1258,7 @@ int SwPagePreview::_CreateScrollbar( bool bHori )

    assert(!ppScrollbar.get()); //check beforehand!

    ppScrollbar = new SwScrollbar( pMDI, bHori );
    ppScrollbar = VclPtr<SwScrollbar>::Create( pMDI, bHori );

    ScrollDocSzChg();
    ppScrollbar->EnableDrag( true );
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index b1a1c7e..991232e 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -219,7 +219,7 @@ static OUString lcl_ConvertTabsToSpaces( const OUString& sLine )

SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
    SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
    aEditWin( new SwSrcEditWindow( &pViewFrame->GetWindow(), this ) ),
    aEditWin( VclPtr<SwSrcEditWindow>::Create( &pViewFrame->GetWindow(), this ) ),
    pSearchItem(0),
    bSourceSaved(false),
    eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 77759cb..0c2dc9f 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -693,14 +693,14 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
    m_nNewPage(USHRT_MAX),
    m_nOldPageNum(0),
    m_pNumRuleNodeFromDoc(0),
    m_pEditWin( new SwEditWin( &_pFrame->GetWindow(), *this ) ),
    m_pEditWin( VclPtr<SwEditWin>::Create( &_pFrame->GetWindow(), *this ) ),
    m_pWrtShell(0),
    m_pShell(0),
    m_pFormShell(0),
    m_pHScrollbar(0),
    m_pVScrollbar(0),
    m_pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
    m_pVRuler(new SvxRuler(&GetViewFrame()->GetWindow(), m_pEditWin,
    m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
    m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin,
                            SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL|
                                SVXRULER_SUPPORT_BORDERS | SVXRULER_SUPPORT_REDUCED_METRIC,
                            GetViewFrame()->GetBindings(),
@@ -847,7 +847,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
        }
    }
    SAL_INFO( "sw.ui", "after create WrtShell" );
    m_pHRuler = new SwCommentRuler(m_pWrtShell, &GetViewFrame()->GetWindow(), m_pEditWin,
    m_pHRuler = VclPtr<SwCommentRuler>::Create(m_pWrtShell, &GetViewFrame()->GetWindow(), m_pEditWin,
                SVXRULER_SUPPORT_TABS |
                SVXRULER_SUPPORT_PARAGRAPH_MARGINS |
                SVXRULER_SUPPORT_BORDERS |
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 637fdd0..559b9ff 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -812,7 +812,7 @@ public:

SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
    FloatingWindow( parent, WB_BORDER | WB_SYSTEMWINDOW ),
    aListBox(new ListBox(this)),
    aListBox(VclPtr<ListBox>::Create(this)),
    pFieldmark( fieldBM )
{
    if ( fieldBM != NULL )
@@ -896,7 +896,7 @@ void SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
{
    const Point aPixPos = GetEditWin().LogicToPixel( rPt );

    m_pFieldPopup = new SwFieldDialog( m_pEditWin, fieldBM );
    m_pFieldPopup = VclPtr<SwFieldDialog>::Create( m_pEditWin, fieldBM );
    m_pFieldPopup->SetPopupModeEndHdl( LINK( this, SwView, FieldPopupModeEndHdl ) );

    Rectangle aRect( m_pEditWin->OutputToScreenPixel( aPixPos ), Size( 0, 0 ) );
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 11c4a57..b362b67 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -294,7 +294,7 @@ int SwView::_CreateScrollbar( bool bHori )

    assert(!ppScrollbar.get()); //check beforehand!

    ppScrollbar = new SwScrollbar( pMDI, bHori );
    ppScrollbar = VclPtr<SwScrollbar>::Create( pMDI, bHori );
    UpdateScrollbars();
    if(bHori)
        ppScrollbar->SetScrollHdl( LINK( this, SwView, EndScrollHdl ));
diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx
index b15694b..ca0c252 100644
--- a/sw/source/uibase/utlui/condedit.cxx
+++ b/sw/source/uibase/utlui/condedit.cxx
@@ -34,12 +34,6 @@ ConditionEdit::ConditionEdit(vcl::Window* pParent, WinBits nStyle)
{
}

extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeConditionEdit(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
    VclBuilder::ensureDefaultWidthChars(rMap);
    return new ConditionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
}

// Drop possible, respectively format known?

sal_Int8 ConditionEdit::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index ed513a5..5c790326 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -647,12 +647,12 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
    Window( pParent, SW_RES(DLG_NAVIGATION_PI)),
    SfxControllerItem( SID_DOCFULLNAME, *_pBindings ),

    aContentToolBox(new SwNavHelpToolBox(this, SW_RES(TB_CONTENT))),
    aGlobalToolBox(new SwHelpToolBox(this, SW_RES(TB_GLOBAL))),
    aContentToolBox(VclPtr<SwNavHelpToolBox>::Create(this, SW_RES(TB_CONTENT))),
    aGlobalToolBox(VclPtr<SwHelpToolBox>::Create(this, SW_RES(TB_GLOBAL))),
    aContentImageList(SW_RES(IL_CONTENT)),
    aContentTree(new SwContentTree(this, SW_RES(TL_CONTENT))),
    aGlobalTree(new SwGlobalTree(this, SW_RES(TL_GLOBAL))),
    aDocListBox(new ListBox(this, SW_RES(LB_DOCS))),
    aContentTree(VclPtr<SwContentTree>::Create(this, SW_RES(TL_CONTENT))),
    aGlobalTree(VclPtr<SwGlobalTree>::Create(this, SW_RES(TL_GLOBAL))),
    aDocListBox(VclPtr<ListBox>::Create(this, SW_RES(LB_DOCS))),

    pxObjectShell(0),
    pContentView(0),
@@ -688,7 +688,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
    nZoomOutInit = nZoomOut = Resource::ReadShortRes();

    // Insert the numeric field in the toolbox.
    NumEditAction* pEdit = new NumEditAction(
    VclPtr<NumEditAction> pEdit = VclPtr<NumEditAction>::Create(
                    aContentToolBox.get(), SW_RES(NF_PAGE ));
    pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction));
    pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus));
@@ -1293,7 +1293,7 @@ SwNavigationChild::SwNavigationChild( vcl::Window* pParent,
                        SfxChildWinInfo* )
    : SfxChildWindowContext( nId )
{
    SwNavigationPI* pNavi  = new SwNavigationPI( _pBindings, this, pParent );
    VclPtr<SwNavigationPI> pNavi = VclPtr<SwNavigationPI>::Create( _pBindings, this, pParent );
    SetWindow( pNavi );
    _pBindings->Invalidate(SID_NAVIGATOR);

diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 64590d8..7710c70 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -68,25 +68,6 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) :
    Init(css::util::NumberFormat::NUMBER, true);
}

extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeNumFormatListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
    WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;

    bool bDropdown = VclBuilder::extractDropdown(rMap);

    if (bDropdown)
        nBits |= WB_DROPDOWN;
    else
        nBits |= WB_BORDER;

    NumFormatListBox* pListBox = new NumFormatListBox(pParent, nBits|WB_SIMPLEMODE);

    if (bDropdown)
        pListBox->EnableAutoSize(true);

    return pListBox;
}

void NumFormatListBox::Init(short nFormatType, bool bUsrFmts)
{
    SwView *pView = GetView();
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 227771f..a7446c3 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -66,7 +66,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin,
                                        sal_uInt32 nFlags,
                                        const Link* pInitializedLink,
                                        const OUString* pURL ) :
    aTopWindow(new SwFrmCtrlWindow(&rWin, this)),
    aTopWindow(VclPtr<SwFrmCtrlWindow>::Create(&rWin, this)),
    aMenuRes(SW_RES(RES_FRMEX_MENU)),
    pModuleView(SW_MOD()->GetView()),
    nStyleFlags(nFlags),