diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/sidebar/PageColumnControl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.cxx | 22 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.hxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageSizeControl.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewling.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/condedit.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/utlui/numfmtlb.cxx | 19 | ||||
-rw-r--r-- | sw/source/uibase/utlui/unotools.cxx | 2 |
16 files changed, 56 insertions, 77 deletions
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx index 23676cbc43c1..39b6757771cd 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 e01c373221c8..6479a7f7baf8 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 d35ac67a880b..48c7b5af3a2c 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 d97d27a6dc00..05119bf2b34a 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 6eb4ea3501f2..bc9c0b9be335 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 a388d429b44b..76db6711d8fd 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 4c0291bc7114..bd1f27ad0931 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 de3d79d6ba3d..da971235a1d7 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 b1a1c7e22300..991232e3c166 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 77759cb41ea2..0c2dc9f36df3 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 637fdd0f9913..559b9ff747b7 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 11c4a574b96e..b362b67520bf 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 b15694b02b00..ca0c2521bab0 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 ed513a5c5795..5c7903261a53 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 64590d86aadf..7710c70a9193 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 227771f2b359..a7446c3a4096 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), |