avmedia/source/viewer/mediawindow_impl.cxx | 1 avmedia/source/viewer/mediawindow_impl.hxx | 2 basctl/source/basicide/baside2.hxx | 2 basctl/source/basicide/baside2b.cxx | 1 basctl/source/basicide/brkdlg.cxx | 1 basctl/source/basicide/brkdlg.hxx | 2 basctl/source/basicide/layout.cxx | 2 basctl/source/basicide/layout.hxx | 2 basctl/source/inc/basidesh.hxx | 6 chart2/source/controller/dialogs/DataBrowser.cxx | 6 chart2/source/controller/dialogs/dlg_DataEditor.cxx | 1 chart2/source/controller/dialogs/tp_ChartType.cxx | 4 chart2/source/controller/inc/dlg_DataEditor.hxx | 4 chart2/source/controller/main/ElementSelector.hxx | 2 compilerplugins/clang/vclwidgets.cxx | 16 ++ cui/source/factory/dlgfact.cxx | 2 cui/source/options/optaboutconfig.cxx | 1 cui/source/options/optaboutconfig.hxx | 2 dbaccess/source/ui/app/AppDetailPageHelper.cxx | 10 - dbaccess/source/ui/app/AppDetailPageHelper.hxx | 4 dbaccess/source/ui/control/RelationControl.cxx | 4 dbaccess/source/ui/dlg/textconnectionsettings.cxx | 1 dbaccess/source/ui/inc/textconnectionsettings.hxx | 4 extensions/source/propctrlr/browserlistbox.cxx | 1 extensions/source/propctrlr/browserlistbox.hxx | 3 extensions/source/propctrlr/formlinkdialog.cxx | 4 extensions/source/propctrlr/formlinkdialog.hxx | 8 - include/avmedia/mediawindow.hxx | 3 include/svx/sidebar/Popup.hxx | 4 reportdesign/source/ui/dlg/AddField.cxx | 1 reportdesign/source/ui/dlg/CondFormat.cxx | 6 reportdesign/source/ui/dlg/Navigator.cxx | 2 reportdesign/source/ui/inc/AddField.hxx | 2 reportdesign/source/ui/inc/CondFormat.hxx | 3 reportdesign/source/ui/inc/DesignView.hxx | 4 reportdesign/source/ui/inc/MarkedSection.hxx | 2 reportdesign/source/ui/inc/ReportController.hxx | 2 reportdesign/source/ui/inc/ReportWindow.hxx | 4 reportdesign/source/ui/inc/ScrollHelper.hxx | 4 reportdesign/source/ui/inc/ViewsWindow.hxx | 9 - reportdesign/source/ui/report/DesignView.cxx | 8 - reportdesign/source/ui/report/FixedTextColor.cxx | 2 reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2 reportdesign/source/ui/report/ReportController.cxx | 31 ++-- reportdesign/source/ui/report/ReportWindow.cxx | 6 reportdesign/source/ui/report/ScrollHelper.cxx | 4 reportdesign/source/ui/report/ViewsWindow.cxx | 30 ++-- reportdesign/source/ui/report/propbrw.cxx | 2 sc/source/ui/app/inputwin.cxx | 1 sc/source/ui/condformat/condformatdlg.cxx | 71 +++++----- sc/source/ui/condformat/condformatdlgentry.cxx | 24 +-- sc/source/ui/inc/checklistmenu.hxx | 2 sc/source/ui/inc/condformatdlg.hxx | 6 sc/source/ui/inc/condformatdlgentry.hxx | 2 sc/source/ui/inc/conflictsdlg.hxx | 2 sc/source/ui/inc/datafdlg.hxx | 6 sc/source/ui/inc/gridwin.hxx | 4 sc/source/ui/inc/inputwin.hxx | 2 sc/source/ui/inc/optsolver.hxx | 8 - sc/source/ui/inc/tabview.hxx | 12 - sc/source/ui/inc/viewfunc.hxx | 2 sc/source/ui/miscdlgs/conflictsdlg.cxx | 1 sc/source/ui/miscdlgs/datafdlg.cxx | 38 ++--- sc/source/ui/miscdlgs/optsolver.cxx | 8 - sc/source/ui/view/gridwin.cxx | 4 sc/source/ui/view/tabview.cxx | 12 - sc/source/ui/view/tabview5.cxx | 10 - sc/source/ui/view/viewfun3.cxx | 6 sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 10 - sd/source/ui/animations/CustomAnimationCreateDialog.hxx | 2 sd/source/ui/annotations/annotationtag.hxx | 2 sd/source/ui/dlg/assclass.cxx | 4 sd/source/ui/framework/factories/BasicViewFactory.hxx | 3 sd/source/ui/framework/factories/FullScreenPane.cxx | 4 sd/source/ui/framework/factories/FullScreenPane.hxx | 2 sd/source/ui/inc/SlideSorter.hxx | 34 ++-- sd/source/ui/inc/ViewShell.hxx | 14 - sd/source/ui/inc/ViewTabBar.hxx | 6 sd/source/ui/inc/assclass.hxx | 2 sd/source/ui/sidebar/PanelBase.cxx | 8 - sd/source/ui/sidebar/PanelBase.hxx | 2 sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 16 +- sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx | 2 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 30 ++-- sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 4 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 14 - sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 4 sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx | 9 - sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx | 2 sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx | 4 sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx | 4 sd/source/ui/slidesorter/shell/SlideSorter.cxx | 60 +++----- sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 2 sd/source/ui/slidesorter/view/SlideSorterView.cxx | 24 +-- sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx | 4 sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 22 +-- sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx | 4 sd/source/ui/slidesorter/view/SlsLayouter.cxx | 20 +- sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx | 6 sd/source/ui/slidesorter/view/SlsToolTip.cxx | 8 - sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx | 2 sd/source/ui/view/ViewShellBase.cxx | 2 sfx2/source/sidebar/Deck.cxx | 6 sfx2/source/sidebar/Deck.hxx | 10 - sfx2/source/sidebar/DeckLayouter.cxx | 2 sfx2/source/sidebar/DeckLayouter.hxx | 2 sfx2/source/sidebar/Panel.cxx | 1 sfx2/source/sidebar/Panel.hxx | 5 sfx2/source/sidebar/SidebarController.cxx | 24 +-- sfx2/source/sidebar/SidebarController.hxx | 8 - sfx2/source/sidebar/TabBar.cxx | 3 sfx2/source/sidebar/TabBar.hxx | 4 slideshow/source/engine/shapes/viewmediashape.hxx | 5 starmath/inc/ElementsDockingWindow.hxx | 2 starmath/source/ElementsDockingWindow.cxx | 1 svtools/source/dialogs/addresstemplate.cxx | 32 ++-- svx/inc/GalleryControl.hxx | 8 - svx/source/gallery2/GalleryControl.cxx | 13 + svx/source/tbxctrls/tbcontrl.cxx | 7 119 files changed, 475 insertions(+), 442 deletions(-)
New commits: commit bb9e27e5514eeea714dec50e598614533b0780c0 Author: Noel Grandin <n...@peralex.com> Date: Mon Mar 16 12:17:44 2015 +0200 vclwidget: convert lots more sites to use VclPtr seems there was a lot of shared_ptr usage floating around... Change-Id: Icd05243170eb8493709275fc36bf986fc194b781 diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 400f1e2..786a594 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -205,6 +205,7 @@ void MediaWindowImpl::dispose() delete mpAudioBmpEx; mpAudioBmpEx = NULL; mpMediaWindowControl.disposeAndClear(); + mpChildWindow.disposeAndClear(); Control::dispose(); } diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index db962cb..c56558c 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -172,7 +172,7 @@ namespace avmedia ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxEventsIf; MediaEventListenersImpl* mpEvents; bool mbEventTransparent; - boost::scoped_ptr<MediaChildWindow> mpChildWindow; + VclPtr<MediaChildWindow> mpChildWindow; VclPtr<MediaWindowControl> mpMediaWindowControl; BitmapEx* mpEmptyBmpEx; BitmapEx* mpAudioBmpEx; diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 1e272cf..121c2ca 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -108,7 +108,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface(bool bCreate = true) SAL_OVERRIDE; CodeCompleteDataCache aCodeCompleteCache; - boost::scoped_ptr< CodeCompleteWindow > pCodeCompleteWnd; + VclPtr<CodeCompleteWindow> pCodeCompleteWnd; OUString GetActualSubName( sal_uLong nLine ); // gets the actual subroutine name according to line number void SetupAndShowCodeCompleteWnd(const std::vector< OUString >& aEntryVect, TextSelection aSel ); void HandleAutoCorrect(); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 4358e0b..fa48ae4 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -271,6 +271,7 @@ void EditorWindow::dispose() EndListening( *pEditEngine ); pEditEngine->RemoveView(pEditView.get()); } + pCodeCompleteWnd.disposeAndClear(); vcl::Window::dispose(); } diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index d6518bc..6056f9e 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -118,6 +118,7 @@ void BreakPointDialog::dispose() m_pNewButton.disposeAndClear(); m_pDelButton.disposeAndClear(); m_pNumericField.disposeAndClear(); + m_pCheckBox.disposeAndClear(); ModalDialog::dispose(); } diff --git a/basctl/source/basicide/brkdlg.hxx b/basctl/source/basicide/brkdlg.hxx index 5c78e7c..50d1854 100644 --- a/basctl/source/basicide/brkdlg.hxx +++ b/basctl/source/basicide/brkdlg.hxx @@ -35,7 +35,7 @@ private: VclPtr<OKButton> m_pOKButton; VclPtr<PushButton> m_pNewButton; VclPtr<PushButton> m_pDelButton; - ::VclPtr<CheckBox> m_pCheckBox; + VclPtr<CheckBox> m_pCheckBox; VclPtr<NumericField> m_pNumericField; BreakPointList & m_rOriginalBreakPointList; diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 8432228..e638f99 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -195,7 +195,7 @@ void Layout::SplittedSide::Add (DockingWindow* pWin, Size const& rSize) // splitter if (!vItems.empty()) { - aItem.pSplit = boost::make_shared<Splitter>(&rLayout, bVertical ? WB_VSCROLL : WB_HSCROLL); + aItem.pSplit = new Splitter(&rLayout, bVertical ? WB_VSCROLL : WB_HSCROLL); aItem.pSplit->SetSplitPosPixel(aItem.nStartPos - nSplitThickness); InitSplitter(*aItem.pSplit); } diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx index ad19ad93..e25cb11 100644 --- a/basctl/source/basicide/layout.hxx +++ b/basctl/source/basicide/layout.hxx @@ -113,7 +113,7 @@ private: long nStartPos, nEndPos; // splitter line window before the window // (the first one is always nullptr) - boost::shared_ptr<Splitter> pSplit; + VclPtr<Splitter> pSplit; }; std::vector<Item> vItems; private: diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 44b381f..84e76e7 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -74,12 +74,12 @@ private: VclPtr<ScrollBar> aHScrollBar; VclPtr<ScrollBar> aVScrollBar; VclPtr<ScrollBarBox> aScrollBarBox; - boost::scoped_ptr<TabBar> pTabBar; // basctl::TabBar + VclPtr<TabBar> pTabBar; // basctl::TabBar bool bTabBarSplitted; bool bCreatingWindow; // layout windows - boost::scoped_ptr<ModulWindowLayout> pModulLayout; - boost::scoped_ptr<DialogWindowLayout> pDialogLayout; + VclPtr<ModulWindowLayout> pModulLayout; + VclPtr<DialogWindowLayout> pDialogLayout; // the active layout window VclPtr<Layout> pLayout; // common object catalog window diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index c748537..e8b8210 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -175,9 +175,9 @@ public: bool HasFocus() const; private: - ::boost::shared_ptr< FixedImage > m_spSymbol; - ::boost::shared_ptr< SeriesHeaderEdit > m_spSeriesName; - ::boost::shared_ptr< FixedText > m_spColorBar; + VclPtr< FixedImage > m_spSymbol; + VclPtr< SeriesHeaderEdit > m_spSeriesName; + VclPtr< FixedText > m_spColorBar; OutputDevice * m_pDevice; Link m_aChangeLink; diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index fef3a78..d6d9aec 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -107,6 +107,7 @@ void DataEditor::dispose() OSL_TRACE( "DataEditor: DTOR" ); m_pTbxData.disposeAndClear(); + m_xBrwData.disposeAndClear(); ModalDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 7cb3e83..8d813d8 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -505,8 +505,8 @@ private: VclPtr<FixedText> m_pFT_LineType; VclPtr<ListBox> m_pLB_LineType; VclPtr<PushButton> m_pPB_DetailsDialog; - boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog; - boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog; + VclPtr< SplinePropertiesDialog > m_pSplinePropertiesDialog; + VclPtr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog; }; SplineResourceGroup::SplineResourceGroup(VclBuilderContainer* pWindow) diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx index e17aa9d..6ff25e7 100644 --- a/chart2/source/controller/inc/dlg_DataEditor.hxx +++ b/chart2/source/controller/inc/dlg_DataEditor.hxx @@ -66,8 +66,8 @@ private: sal_uInt16 TBI_DATA_SWAP_ROW; bool m_bReadOnly; - boost::scoped_ptr<DataBrowser> m_xBrwData; - VclPtr<ToolBox> m_pTbxData; + VclPtr<DataBrowser> m_xBrwData; + VclPtr<ToolBox> m_pTbxData; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDoc; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > diff --git a/chart2/source/controller/main/ElementSelector.hxx b/chart2/source/controller/main/ElementSelector.hxx index cc70f8a..aa9c182 100644 --- a/chart2/source/controller/main/ElementSelector.hxx +++ b/chart2/source/controller/main/ElementSelector.hxx @@ -110,7 +110,7 @@ private: private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; - boost::scoped_ptr< SelectorListBox > m_apSelectorListBox; + VclPtr< SelectorListBox > m_apSelectorListBox; }; } //namespace chart diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 72142e6..7686297 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -112,6 +112,10 @@ bool containsWindowSubclass(const Type* pType0) { if (pType->isPointerType()) { QualType pointeeType = pType->getPointeeType(); return containsWindowSubclass(pointeeType); + } else if (pType->isArrayType()) { + const ArrayType* pArrayType = dyn_cast<ArrayType>(pType); + QualType elementType = pArrayType->getElementType(); + return containsWindowSubclass(elementType); } else { return isDerivedFromWindow(pRecordDecl); } @@ -315,6 +319,12 @@ static void findDisposeAndClearStatements2(std::vector<std::string>& aVclPtrFiel findDisposeAndClearStatements(aVclPtrFields, dyn_cast<CompoundStmt>(pStmt)); return; } + if (isa<ForStmt>(pStmt)) { + const CompoundStmt *pBody = dyn_cast<CompoundStmt>(dyn_cast<ForStmt>(pStmt)->getBody()); + if (pBody) + findDisposeAndClearStatements(aVclPtrFields, pBody); + return; + } if (!isa<CallExpr>(pStmt)) return; const CallExpr *pCallExpr = dyn_cast<CallExpr>(pStmt); @@ -404,6 +414,12 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl ) return true; if (pMethodDecl->getQualifiedNameAsString() == "dbaui::DlgOrderCrit::dispose") return true; + if (pMethodDecl->getQualifiedNameAsString() == "SvxStyleBox_Impl::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "dbaui::OAppDetailPageHelper::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "sd::CustomAnimationCreateDialog::dispose") + return true; std::vector<std::string> aVclPtrFields; for(auto fieldDecl : pMethodDecl->getParent()->fields()) { diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 9ca1f74..5018c9c 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1613,7 +1613,7 @@ public: private: SfxItemSet m_aItems; - ::std::unique_ptr< SvxMacroAssignDlg > m_pDialog; + VclPtr< SvxMacroAssignDlg > m_pDialog; }; short SvxMacroAssignDialog::Execute() diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index a75f45b..0b4fd39 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -164,6 +164,7 @@ void CuiAboutConfigTabPage::dispose() m_pPrefCtrl.disposeAndClear(); m_pResetBtn.disposeAndClear(); m_pEditBtn.disposeAndClear(); + m_pPrefBox.disposeAndClear(); ModelessDialog::dispose(); } diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx index 83a80db..08364cd 100644 --- a/cui/source/options/optaboutconfig.hxx +++ b/cui/source/options/optaboutconfig.hxx @@ -47,7 +47,7 @@ private: VclPtr<PushButton> m_pEditBtn; std::vector< boost::shared_ptr< Prop_Impl > > m_vectorOfModified; - boost::scoped_ptr< SvSimpleTable > m_pPrefBox; + VclPtr< SvSimpleTable > m_pPrefBox; void AddToModifiedVector( const boost::shared_ptr< Prop_Impl >& rProp ); std::vector< OUString > commaStringToSequence( const OUString& rCommaSepString ); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 6cf01a5..554d97f 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -248,11 +248,9 @@ void OAppDetailPageHelper::dispose() { m_pLists[i]->clearCurrentSelection(); m_pLists[i]->Hide(); - boost::scoped_ptr<DBTreeListBox> aTemp(m_pLists[i]); m_pLists[i]->clearCurrentSelection(); // why a second time? - m_pLists[i] = NULL; + m_pLists[i].disposeAndClear(); } - } m_aFL.disposeAndClear(); m_aTBPreview.disposeAndClear(); @@ -369,7 +367,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _r void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { OSL_ENSURE( _eType < E_ELEMENT_TYPE_COUNT, "OAppDetailPageHelper::describeCurrentSelectionForType: invalid type!" ); - DBTreeListBox* pList = ( _eType < E_ELEMENT_TYPE_COUNT ) ? m_pLists[ _eType ] : NULL; + DBTreeListBox* pList = ( _eType < E_ELEMENT_TYPE_COUNT ) ? m_pLists[ _eType ].get() : NULL; OSL_ENSURE( pList, "OAppDetailPageHelper::describeCurrentSelectionForType: " "You really should ensure this type has already been viewed before!" ); if ( !pList ) @@ -613,7 +611,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon } if ( !m_pLists[E_TABLE]->GetEntryCount() ) { - static_cast<OTableTreeListBox*>(m_pLists[E_TABLE])->UpdateTableList(_xConnection); + static_cast<OTableTreeListBox*>(m_pLists[E_TABLE].get())->UpdateTableList(_xConnection); SvTreeListEntry* pEntry = m_pLists[E_TABLE]->First(); if ( pEntry ) @@ -1253,7 +1251,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) ImplInitSettings(); if ( m_pLists[ E_TABLE ] ) { - OTableTreeListBox* pTableTree = dynamic_cast< OTableTreeListBox* >( m_pLists[ E_TABLE ] ); + OTableTreeListBox* pTableTree = dynamic_cast< OTableTreeListBox* >( m_pLists[ E_TABLE ].get() ); OSL_ENSURE( pTableTree != NULL, "OAppDetailPageHelper::DataChanged: a tree list for tables which is no TableTreeList?" ); if ( pTableTree ) pTableTree->notifyHiContrastChanged(); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 9e8d5e9..c7c0cba 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -77,7 +77,7 @@ namespace dbaui // Combines general functionality. class OAppDetailPageHelper : public vcl::Window { - DBTreeListBox* m_pLists[ELEMENT_COUNT]; + VclPtr<DBTreeListBox> m_pLists[ELEMENT_COUNT]; OAppBorderWindow& m_rBorderWin; VclPtr<FixedLine> m_aFL; VclPtr<ToolBox> m_aTBPreview; @@ -201,7 +201,7 @@ namespace dbaui inline DBTreeListBox* getCurrentView() const { ElementType eType = getElementType(); - return (eType != E_NONE ) ? m_pLists[static_cast<sal_Int32>(eType)] : NULL; + return (eType != E_NONE ) ? m_pLists[static_cast<sal_Int32>(eType)].get() : NULL; } /// select all entries in the visible control diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 95827c5..944896f 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -59,7 +59,7 @@ namespace dbaui { friend class OTableListBoxControl; - ::std::unique_ptr< ::svt::ListBoxControl> m_pListCell; + VclPtr< ::svt::ListBoxControl> m_pListCell; TTableConnectionData::value_type m_pConnData; OTableListBoxControl* m_pBoxControl; long m_nDataPos; @@ -101,6 +101,8 @@ namespace dbaui void lateInit(); protected: + virtual ~ORelationControl() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE { m_pListCell.disposeAndClear(); ORelationControl_Base::dispose(); } virtual void Resize() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual bool PreNotify(NotifyEvent& rNEvt ) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx index feca57a7..7c81506 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx +++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx @@ -47,6 +47,7 @@ namespace dbaui void TextConnectionSettingsDialog::dispose() { m_pOK.disposeAndClear(); + m_pTextConnectionHelper.disposeAndClear(); ModalDialog::dispose(); } diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx index fdd5a94..89bcfc3 100644 --- a/dbaccess/source/ui/inc/textconnectionsettings.hxx +++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx @@ -49,8 +49,8 @@ namespace dbaui virtual short Execute() SAL_OVERRIDE; private: - ::std::unique_ptr< OTextConnectionHelper > m_pTextConnectionHelper; - VclPtr<OKButton> m_pOK; + VclPtr<OTextConnectionHelper> m_pTextConnectionHelper; + VclPtr<OKButton> m_pOK; SfxItemSet& m_rItems; private: diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index b8eeeef..9da2b01 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -390,6 +390,7 @@ namespace pcr Clear(); m_aLinesPlayground.disposeAndClear(); m_aVScroll.disposeAndClear(); + m_pHelpWindow.disposeAndClear(); Control::dispose(); } diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index 37b21a2..84d70a1 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -95,8 +95,7 @@ namespace pcr protected: VclPtr<Window> m_aLinesPlayground; VclPtr<ScrollBar> m_aVScroll; - ::std::unique_ptr< InspectorHelpWindow > - m_pHelpWindow; + VclPtr<InspectorHelpWindow> m_pHelpWindow; ListBoxLines m_aLines; IPropertyLineListener* m_pLineListener; IPropertyControlObserver* m_pControlObserver; diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 03d397d..24ad8a7 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -216,6 +216,10 @@ namespace pcr m_pMasterLabel.disposeAndClear(); m_pOK.disposeAndClear(); m_pSuggest.disposeAndClear(); + m_aRow1.disposeAndClear(); + m_aRow2.disposeAndClear(); + m_aRow3.disposeAndClear(); + m_aRow4.disposeAndClear(); ModalDialog::dispose(); } diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx index 7f563a2..e1c250e 100644 --- a/extensions/source/propctrlr/formlinkdialog.hxx +++ b/extensions/source/propctrlr/formlinkdialog.hxx @@ -47,10 +47,10 @@ namespace pcr VclPtr<FixedText> m_pExplanation; VclPtr<FixedText> m_pDetailLabel; VclPtr<FixedText> m_pMasterLabel; - ::std::unique_ptr< FieldLinkRow > m_aRow1; - ::std::unique_ptr< FieldLinkRow > m_aRow2; - ::std::unique_ptr< FieldLinkRow > m_aRow3; - ::std::unique_ptr< FieldLinkRow > m_aRow4; + VclPtr<FieldLinkRow> m_aRow1; + VclPtr<FieldLinkRow> m_aRow2; + VclPtr<FieldLinkRow> m_aRow3; + VclPtr<FieldLinkRow> m_aRow4; VclPtr<OKButton> m_pOK; VclPtr<PushButton> m_pSuggest; diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx index 1ab2c05..46d140c 100644 --- a/include/avmedia/mediawindow.hxx +++ b/include/avmedia/mediawindow.hxx @@ -28,6 +28,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/uno/XInterface.hpp> #include <vcl/bitmapex.hxx> +#include <vcl/vclptr.hxx> #include <avmedia/avmediadllapi.h> #define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME -1.0 @@ -117,7 +118,7 @@ namespace avmedia AVMEDIA_DLLPRIVATE MediaWindow& operator =( const MediaWindow& ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxIFace; - boost::scoped_ptr<priv::MediaWindowImpl> mpImpl; + VclPtr<priv::MediaWindowImpl> mpImpl; }; } diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx index 921dde8..76fb78d 100644 --- a/include/svx/sidebar/Popup.hxx +++ b/include/svx/sidebar/Popup.hxx @@ -78,7 +78,7 @@ public : void SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback); protected: - ::boost::scoped_ptr<PopupControl> mpControl; + VclPtr<PopupControl> mpControl; /** Make sure that both PopupContainer and PopupControl objects exist. Calls the maControlCreator functor if necessary. @@ -95,7 +95,7 @@ private: ::boost::function<PopupControl*(PopupContainer*)> maControlCreator; ::boost::function<void(void)> maPopupModeEndCallback; const ::rtl::OUString msAccessibleName; - ::boost::scoped_ptr<PopupContainer> mpContainer; + VclPtr<PopupContainer> mpContainer; DECL_LINK(PopupModeEndHandler, void*); }; diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index ddf5dad..b272682 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -239,6 +239,7 @@ void OAddFieldWindow::dispose() m_aFixedLine.disposeAndClear(); m_aHelpText.disposeAndClear(); m_aInsertButton.disposeAndClear(); + m_pListBox.disposeAndClear(); FloatingWindow::dispose(); } diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index d0c9cb7..fa70858 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -192,7 +192,7 @@ namespace rptui ::comphelper::copyProperties(m_xCopy.get(),xCond.get()); m_xCopy->insertByIndex( _nNewCondIndex, makeAny( xCond ) ); - ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); + Condition *pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); pCon->setCondition( xCond ); pCon->reorderWithinParent(_nNewCondIndex); m_aConditions.insert( m_aConditions.begin() + _nNewCondIndex, pCon ); @@ -273,7 +273,7 @@ namespace rptui // do this in two steps, so we don't become inconsistent if any of the UNO actions fails Any aMovedCondition; - ConditionPtr pMovedCondition; + Condition *pMovedCondition; try { aMovedCondition = m_xCopy->getByIndex( (sal_Int32)nOldConditionIndex ); @@ -351,7 +351,7 @@ namespace rptui sal_Int32 nCount = m_xCopy->getCount(); for ( sal_Int32 i = 0; i < nCount ; ++i ) { - ConditionPtr pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); + Condition *pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); Reference< XFormatCondition > xCond( m_xCopy->getByIndex(i), UNO_QUERY ); pCon->reorderWithinParent(i); pCon->setCondition( xCond ); diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index fb898fe..f3c745e 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -882,7 +882,7 @@ public: uno::Reference< report::XReportDefinition> m_xReport; ::rptui::OReportController& m_rController; - ::std::unique_ptr<NavigatorTree> m_pNavigatorTree; + VclPtr<NavigatorTree> m_pNavigatorTree; }; ONavigatorImpl::ONavigatorImpl(OReportController& _rController,ONavigator* _pParent) diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx index bf86e88..c177a62 100644 --- a/reportdesign/source/ui/inc/AddField.hxx +++ b/reportdesign/source/ui/inc/AddField.hxx @@ -56,7 +56,7 @@ class OAddFieldWindow :public FloatingWindow VclPtr<ToolBox> m_aActions; - ::std::unique_ptr<OAddFieldWindowListBox> m_pListBox; + VclPtr<OAddFieldWindowListBox> m_pListBox; VclPtr<FixedLine> m_aFixedLine; VclPtr<FixedText> m_aHelpText; diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx index df267ba..e8d3468 100644 --- a/reportdesign/source/ui/inc/CondFormat.hxx +++ b/reportdesign/source/ui/inc/CondFormat.hxx @@ -70,8 +70,7 @@ namespace rptui class ConditionalFormattingDialog :public ModalDialog ,public IConditionalFormatAction { - typedef ::boost::shared_ptr< Condition > ConditionPtr; - typedef ::std::vector< ConditionPtr > Conditions; + typedef ::std::vector< VclPtr<Condition> > Conditions; OModuleClient m_aModuleClient; VclPtr<vcl::Window> m_pConditionPlayground; diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index b9e8dea..b6cdadf 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -215,8 +215,8 @@ namespace rptui ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > getCurrentControlModel() const; // IMarkedSection - ::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; + OSectionWindow* getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; + OSectionWindow* getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; virtual void markSection(const sal_uInt16 _nPos) SAL_OVERRIDE; /** fills the positions of all collapsed sections. diff --git a/reportdesign/source/ui/inc/MarkedSection.hxx b/reportdesign/source/ui/inc/MarkedSection.hxx index 52ee1d3..84f9258 100644 --- a/reportdesign/source/ui/inc/MarkedSection.hxx +++ b/reportdesign/source/ui/inc/MarkedSection.hxx @@ -38,7 +38,7 @@ namespace rptui public: /** returns the section which is currently marked. */ - virtual ::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa) const =0; + virtual OSectionWindow* getMarkedSection(NearSectionAccess nsa) const =0; /** mark the section on the given position . * diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index f59c5c5..611acb2 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -458,7 +458,7 @@ namespace rptui // cppu::OPropertySetHelper virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE; - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; + OSectionWindow* getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getColumns() const; OUString getColumnLabel_throw(const OUString& i_sColumnName) const; diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx index 90bb0f9..13e52cb 100644 --- a/reportdesign/source/ui/inc/ReportWindow.hxx +++ b/reportdesign/source/ui/inc/ReportWindow.hxx @@ -183,8 +183,8 @@ namespace rptui void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape, bool _bMark); // IMarkedSection - ::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; + OSectionWindow* getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; + OSectionWindow* getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; virtual void markSection(const sal_uInt16 _nPos) SAL_OVERRIDE; diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index c7e5881..b3b2995 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -174,8 +174,8 @@ namespace rptui void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape, bool _bMark); // IMarkedSection - ::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; + OSectionWindow* getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; + OSectionWindow* getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; virtual void markSection(const sal_uInt16 _nPos) SAL_OVERRIDE; diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index 154d3e7..a2250a5 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -32,7 +32,6 @@ #include <unotools/options.hxx> #include <list> #include <vector> -#include <boost/shared_ptr.hpp> #include "MarkedSection.hxx" #include "SectionWindow.hxx" @@ -108,7 +107,7 @@ namespace rptui { typedef ::std::multimap<Rectangle,::std::pair<SdrObject*,OSectionView*>,RectangleLess> TRectangleMap; public: - typedef ::std::vector< ::boost::shared_ptr<OSectionWindow> > TSectionsMap; + typedef ::std::vector< VclPtr<OSectionWindow> > TSectionsMap; struct TReportPairHelper : public ::std::unary_function< TSectionsMap::value_type, OReportSection > { @@ -186,7 +185,7 @@ namespace rptui * \param _nPos * \return the section at this pos or an empty section */ - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const sal_uInt16 _nPos) const; + OSectionWindow* getSectionWindow(const sal_uInt16 _nPos) const; /** turns the grid on or off * @@ -240,7 +239,7 @@ namespace rptui /** returns the report section window for the given xsection @param _xSection the section */ - ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; + OSectionWindow* getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const; /** checks if the keycode is known by the child windows @param _rCode the keycode @@ -257,7 +256,7 @@ namespace rptui void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape, bool _bMark); // IMarkedSection - ::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; + OSectionWindow* getMarkedSection(NearSectionAccess nsa = CURRENT) const SAL_OVERRIDE; virtual void markSection(const sal_uInt16 _nPos) SAL_OVERRIDE; /** align all marked objects in all sections diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 69b95f1..b6bf640 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -410,7 +410,7 @@ void ODesignView::GetFocus() if ( !m_bDeleted ) { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_aScrollWindow->getMarkedSection(); + OSectionWindow* pSectionWindow = m_aScrollWindow->getMarkedSection(); if ( pSectionWindow ) pSectionWindow->GrabFocus(); } @@ -571,12 +571,12 @@ uno::Reference< report::XReportComponent > ODesignView::getCurrentControlModel() return xModel; } -::boost::shared_ptr<OSectionWindow> ODesignView::getMarkedSection(NearSectionAccess nsa) const +OSectionWindow* ODesignView::getMarkedSection(NearSectionAccess nsa) const { return m_aScrollWindow->getMarkedSection(nsa); } -::boost::shared_ptr<OSectionWindow> ODesignView::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const +OSectionWindow* ODesignView::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const { return m_aScrollWindow->getSectionWindow(_xSection); } @@ -654,7 +654,7 @@ void ODesignView::MouseButtonDown( const MouseEvent& rMEvt ) uno::Any ODesignView::getCurrentlyShownProperty() const { uno::Any aRet; - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getMarkedSection(); + OSectionWindow* pSectionWindow = getMarkedSection(); if ( pSectionWindow ) { ::std::vector< uno::Reference< uno::XInterface > > aSelection; diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index 17273c6..148747a 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -172,7 +172,7 @@ namespace rptui OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject); if ( pUnoObj ) // this doesn't need to be done for shapes { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = pController->getSectionWindow(xSection); + OSectionWindow* pSectionWindow = pController->getSectionWindow(xSection); if (pSectionWindow != 0) { OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 217d725..0313db5 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -173,7 +173,7 @@ namespace rptui OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject); if ( pUnoObj ) // this doesn't need to be done for shapes { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_rReportController.getSectionWindow(xSection); + OSectionWindow* pSectionWindow = m_rReportController.getSectionWindow(xSection); if (pSectionWindow != 0) { OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 7a42f3a..aa47270 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -362,7 +362,7 @@ void OReportController::disposing() { try { - ::boost::shared_ptr<OSectionWindow> pSectionWindow; + OSectionWindow* pSectionWindow = NULL; if ( getDesignView() ) pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) @@ -583,7 +583,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = isEditable() && getDesignView()->HasSelection() && !getDesignView()->isHandleEvent(_nId); if ( aReturn.bEnabled ) { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); + OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) aReturn.bEnabled = !pSectionWindow->getReportSection().isUiActive(); } @@ -1135,7 +1135,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > break; case SID_TERMINATE_INPLACEACTIVATION: { - ::boost::shared_ptr<OSectionWindow> pSection = getDesignView()->getMarkedSection(); + OSectionWindow* pSection = getDesignView()->getMarkedSection(); if ( pSection ) pSection->getReportSection().deactivateOle(); } @@ -2807,8 +2807,8 @@ uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeExcept aViewData.put( "CollapsedSections", aCollapsedSections ); } - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); - if ( pSectionWindow.get() ) + OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); + if ( pSectionWindow ) { aViewData.put( "MarkedSection", (sal_Int32)pSectionWindow->getReportSection().getPage()->GetPageNum() ); } @@ -3175,7 +3175,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co { SequenceAsHashMap aMap(_aArgs); getDesignView()->setMarked(_xSection, true); - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); + OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); if ( !pSectionWindow ) return; @@ -3353,7 +3353,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) getDesignView()->unmarkAllObjects(NULL); // Anhand des FormatKeys wird festgestellt, welches Feld benoetigt wird - ::boost::shared_ptr<OSectionWindow> pSectionWindow[2]; + OSectionWindow* pSectionWindow[2]; pSectionWindow[0] = getDesignView()->getMarkedSection(); if ( !pSectionWindow[0] ) @@ -3667,8 +3667,8 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) OSectionView* OReportController::getCurrentSectionView() const { OSectionView* pSectionView = NULL; - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); - if ( pSectionWindow.get() ) + OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); + if ( pSectionWindow ) pSectionView = &pSectionWindow->getReportSection().getSectionView(); return pSectionView; } @@ -3982,7 +3982,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader void OReportController::collapseSection(const bool _bCollapse) { - ::boost::shared_ptr<OSectionWindow> pSection = getDesignView()->getMarkedSection(); + OSectionWindow *pSection = getDesignView()->getMarkedSection(); if ( pSection ) { pSection->setCollapsed(_bCollapse); @@ -3991,10 +3991,10 @@ void OReportController::collapseSection(const bool _bCollapse) void OReportController::markSection(const bool _bNext) { - ::boost::shared_ptr<OSectionWindow> pSection = getDesignView()->getMarkedSection(); + OSectionWindow *pSection = getDesignView()->getMarkedSection(); if ( pSection ) { - ::boost::shared_ptr<OSectionWindow> pPrevSection = getDesignView()->getMarkedSection(_bNext ? POST : PREVIOUS); + OSectionWindow *pPrevSection = getDesignView()->getMarkedSection(_bNext ? POST : PREVIOUS); if ( pPrevSection != pSection && pPrevSection ) select(uno::makeAny(pPrevSection->getReportSection().getSection())); else @@ -4235,16 +4235,15 @@ void OReportController::impl_fillCustomShapeState_nothrow(const char* _pCustomSh } -::boost::shared_ptr<OSectionWindow> OReportController::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const +OSectionWindow* OReportController::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const { if ( getDesignView() ) { - return getDesignView()->getSectionWindow(_xSection); + return getDesignView()->getSectionWindow(_xSection); } // throw NullPointerException? - ::boost::shared_ptr<OSectionWindow> pEmpty; - return pEmpty; + return NULL; } diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 56f87c2..d834a34 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -305,7 +305,7 @@ void OReportWindow::unmarkAllObjects(OSectionView* _pSectionView) void OReportWindow::showProperties(const uno::Reference< report::XSection>& _xReportComponent) { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_aViewsWindow->getSectionWindow( _xReportComponent ); + OSectionWindow* pSectionWindow = m_aViewsWindow->getSectionWindow( _xReportComponent ); m_pView->UpdatePropertyBrowserDelayed(pSectionWindow->getReportSection().getSectionView()); } @@ -332,12 +332,12 @@ void OReportWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepo m_aViewsWindow->setMarked(_xShape,_bMark); } -::boost::shared_ptr<OSectionWindow> OReportWindow::getMarkedSection(NearSectionAccess nsa) const +OSectionWindow* OReportWindow::getMarkedSection(NearSectionAccess nsa) const { return m_aViewsWindow->getMarkedSection(nsa); } -::boost::shared_ptr<OSectionWindow> OReportWindow::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const +OSectionWindow* OReportWindow::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const { return m_aViewsWindow->getSectionWindow(_xSection); } diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 98ba003..5ac5d03 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -303,12 +303,12 @@ void OScrollWindowHelper::setMarked(const uno::Sequence< uno::Reference< report: m_aReportWindow->setMarked(_xShape,_bMark); } -::boost::shared_ptr<OSectionWindow> OScrollWindowHelper::getMarkedSection(NearSectionAccess nsa) const +OSectionWindow* OScrollWindowHelper::getMarkedSection(NearSectionAccess nsa) const { return m_aReportWindow->getMarkedSection(nsa); } -::boost::shared_ptr<OSectionWindow> OScrollWindowHelper::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const +OSectionWindow* OScrollWindowHelper::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const { return m_aReportWindow->getSectionWindow(_xSection); } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 8d7cef0..219af60 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -230,8 +230,8 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) TSectionsMap::iterator aEnd = m_aSections.end(); for (;aIter != aEnd ; ++aIter) { - const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter); - if ( pSectionWindow.get() == &_rSectionWindow ) + OSectionWindow* pSectionWindow = (*aIter); + if ( pSectionWindow == &_rSectionWindow ) { aStartPoint = pSectionWindow->GetPosPixel(); bSet = true; @@ -239,7 +239,7 @@ void OViewsWindow::resize(const OSectionWindow& _rSectionWindow) if ( bSet ) { - impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,bSet); + impl_resizeSectionWindow(*pSectionWindow,aStartPoint,bSet); static sal_Int32 nIn = INVALIDATE_UPDATE | INVALIDATE_TRANSPARENT; pSectionWindow->getStartMarker().Invalidate( nIn ); // INVALIDATE_NOERASE |INVALIDATE_NOCHILDREN| INVALIDATE_TRANSPARENT pSectionWindow->getEndMarker().Invalidate( nIn ); @@ -259,8 +259,8 @@ void OViewsWindow::Resize() TSectionsMap::iterator aEnd = m_aSections.end(); for (;aIter != aEnd ; ++aIter) { - const ::boost::shared_ptr<OSectionWindow> pSectionWindow = (*aIter); - impl_resizeSectionWindow(*pSectionWindow.get(),aStartPoint,true); + OSectionWindow* pSectionWindow = (*aIter); + impl_resizeSectionWindow(*pSectionWindow,aStartPoint,true); } } } @@ -303,7 +303,7 @@ void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry,sal_uInt16 _nPosition) { - ::boost::shared_ptr<OSectionWindow> pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); + OSectionWindow* pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow)); m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1); Resize(); @@ -403,17 +403,17 @@ void OViewsWindow::Paste() ::o3tl::compose1(::boost::bind(&OReportSection::Paste,_1,aCopies,false),TReportPairHelper())); else { - ::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection(); + OSectionWindow* pMarkedSection = getMarkedSection(); if ( pMarkedSection ) pMarkedSection->getReportSection().Paste(aCopies,true); } } -::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const uno::Reference< report::XSection>& _xSection) const +OSectionWindow* OViewsWindow::getSectionWindow(const uno::Reference< report::XSection>& _xSection) const { OSL_ENSURE(_xSection.is(),"Section is NULL!"); - ::boost::shared_ptr<OSectionWindow> pSectionWindow; + OSectionWindow* pSectionWindow = NULL; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); for (; aIter != aEnd ; ++aIter) @@ -429,9 +429,9 @@ void OViewsWindow::Paste() } -::boost::shared_ptr<OSectionWindow> OViewsWindow::getMarkedSection(NearSectionAccess nsa) const +OSectionWindow* OViewsWindow::getMarkedSection(NearSectionAccess nsa) const { - ::boost::shared_ptr<OSectionWindow> pRet; + OSectionWindow* pRet = NULL; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); sal_uInt32 nCurrentPosition = 0; @@ -635,7 +635,7 @@ void OViewsWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepor bFirst = false; m_pParent->setMarked(xSection,_bMark); } - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getSectionWindow(xSection); + OSectionWindow* pSectionWindow = getSectionWindow(xSection); if ( pSectionWindow ) { SvxShape* pShape = SvxShape::getImplementation( *pIter ); @@ -892,7 +892,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli void OViewsWindow::createDefault() { - ::boost::shared_ptr<OSectionWindow> pMarkedSection = getMarkedSection(); + OSectionWindow* pMarkedSection = getMarkedSection(); if ( pMarkedSection ) pMarkedSection->getReportSection().createDefault(m_sShapeType); } @@ -933,9 +933,9 @@ sal_uInt16 OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) cons return nPosition; } -::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const sal_uInt16 _nPos) const +OSectionWindow* OViewsWindow::getSectionWindow(const sal_uInt16 _nPos) const { - ::boost::shared_ptr<OSectionWindow> aReturn; + OSectionWindow* aReturn = NULL; if ( _nPos < m_aSections.size() ) aReturn = m_aSections[_nPos]; diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index cf9a682..c3c6e3b 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -515,7 +515,7 @@ void PropBrw::Update( OSectionView* pNewView ) const sal_uInt16 nSectionCount = pViews->getSectionCount(); for (sal_uInt16 i = 0; i < nSectionCount; ++i) { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = pViews->getSectionWindow(i); + OSectionWindow* pSectionWindow = pViews->getSectionWindow(i); if ( pSectionWindow ) { const SdrMarkList& rMarkList = pSectionWindow->getReportSection().getSectionView().GetMarkedObjectList(); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 0108b9c..179c807 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -292,6 +292,7 @@ void ScInputWindow::dispose() pRuntimeWindow.reset(); + pRuntimeWindow.disposeAndClear(); ToolBox::dispose(); } diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index c58586f..f406f02 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -55,6 +55,7 @@ ScCondFormatList::~ScCondFormatList() void ScCondFormatList::dispose() { mpDialogParent.disposeAndClear(); + mpScrollBar.disposeAndClear(); Control::dispose(); } @@ -106,7 +107,7 @@ void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent, } } if(nCount) - EntrySelectHdl(&maEntries[0]); + EntrySelectHdl(maEntries[0].get()); } else { @@ -133,7 +134,7 @@ void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent, } RecalcAll(); if (!maEntries.empty()) - maEntries.begin()->SetActive(); + (*maEntries.begin())->SetActive(); RecalcAll(); } @@ -169,7 +170,7 @@ ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const ScConditionalFormat* pFormat = new ScConditionalFormat(0, mpDoc); for(EntryContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - ScFormatEntry* pEntry = itr->GetEntry(); + ScFormatEntry* pEntry = (*itr)->GetEntry(); if(pEntry) pFormat->AddEntry(pEntry); } @@ -185,8 +186,8 @@ void ScCondFormatList::RecalcAll() sal_Int32 nIndex = 1; for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - nTotalHeight += itr->GetSizePixel().Height(); - itr->SetIndex( nIndex ); + nTotalHeight += (*itr)->GetSizePixel().Height(); + (*itr)->SetIndex( nIndex ); ++nIndex; } @@ -210,15 +211,15 @@ void ScCondFormatList::RecalcAll() Point aPoint(0,-1*mpScrollBar->GetThumbPos()); for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - itr->SetPosPixel(aPoint); - Size aSize = itr->GetSizePixel(); + (*itr)->SetPosPixel(aPoint); + Size aSize = (*itr)->GetSizePixel(); if(mbHasScrollBar) aSize.Width() = aCtrlSize.Width() - nSrcBarSize; else aSize.Width() = aCtrlSize.Width(); - itr->SetSizePixel(aSize); + (*itr)->SetSizePixel(aSize); - aPoint.Y() += itr->GetSizePixel().Height(); + aPoint.Y() += (*itr)->GetSizePixel().Height(); } } @@ -236,7 +237,7 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) EntryContainer::iterator itr = maEntries.begin(); for(; itr != maEntries.end(); ++itr) { - if(itr->IsSelected()) + if((*itr)->IsSelected()) break; } if(itr == maEntries.end()) @@ -246,34 +247,34 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) switch(nPos) { case 0: - if(itr->GetType() == condformat::entry::COLORSCALE2) + if((*itr)->GetType() == condformat::entry::COLORSCALE2) return 0; - maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) ); + *itr = new ScColorScale2FrmtEntry( this, mpDoc, maPos ); break; case 1: - if(itr->GetType() == condformat::entry::COLORSCALE3) + if((*itr)->GetType() == condformat::entry::COLORSCALE3) return 0; - maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) ); + *itr = new ScColorScale3FrmtEntry( this, mpDoc, maPos ); break; case 2: - if(itr->GetType() == condformat::entry::DATABAR) + if((*itr)->GetType() == condformat::entry::DATABAR) return 0; - maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) ); + *itr = new ScDataBarFrmtEntry( this, mpDoc, maPos ); break; case 3: - if(itr->GetType() == condformat::entry::ICONSET) + if((*itr)->GetType() == condformat::entry::ICONSET) return 0; - maEntries.replace( itr, new ScIconSetFrmtEntry( this, mpDoc, maPos ) ); + *itr = new ScIconSetFrmtEntry( this, mpDoc, maPos ); break; default: break; } mpDialogParent->InvalidateRefData(); - itr->SetActive(); + (*itr)->SetActive(); RecalcAll(); return 0; } @@ -293,7 +294,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) EntryContainer::iterator itr = maEntries.begin(); for(; itr != maEntries.end(); ++itr) { - if(itr->IsSelected()) + if((*itr)->IsSelected()) break; } if(itr == maEntries.end()) @@ -303,7 +304,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) switch(nPos) { case 0: - switch(itr->GetType()) + switch((*itr)->GetType()) { case condformat::entry::FORMULA: case condformat::entry::CONDITION: @@ -315,33 +316,33 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) case condformat::entry::ICONSET: return 0; } - maEntries.replace( itr, new ScColorScale3FrmtEntry(this, mpDoc, maPos)); + *itr = new ScColorScale3FrmtEntry(this, mpDoc, maPos); mpDialogParent->InvalidateRefData(); - itr->SetActive(); + (*itr)->SetActive(); break; case 1: - if(itr->GetType() == condformat::entry::CONDITION) + if((*itr)->GetType() == condformat::entry::CONDITION) return 0; - maEntries.replace( itr, new ScConditionFrmtEntry(this, mpDoc, mpDialogParent, maPos)); + *itr = new ScConditionFrmtEntry(this, mpDoc, mpDialogParent, maPos); mpDialogParent->InvalidateRefData(); - itr->SetActive(); + (*itr)->SetActive(); break; case 2: - if(itr->GetType() == condformat::entry::FORMULA) + if((*itr)->GetType() == condformat::entry::FORMULA) return 0; - maEntries.replace( itr, new ScFormulaFrmtEntry(this, mpDoc, mpDialogParent, maPos)); + *itr = new ScFormulaFrmtEntry(this, mpDoc, mpDialogParent, maPos); mpDialogParent->InvalidateRefData(); - itr->SetActive(); + (*itr)->SetActive(); break; case 3: - if(itr->GetType() == condformat::entry::DATE) + if((*itr)->GetType() == condformat::entry::DATE) return 0; - maEntries.replace( itr, new ScDateFrmtEntry( this, mpDoc )); + *itr = new ScDateFrmtEntry( this, mpDoc ); mpDialogParent->InvalidateRefData(); - itr->SetActive(); + (*itr)->SetActive(); break; } @@ -355,7 +356,7 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl ) maEntries.push_back( pNewEntry ); for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - itr->SetInactive(); + (*itr)->SetInactive(); } mpDialogParent->InvalidateRefData(); pNewEntry->SetActive(); @@ -367,7 +368,7 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl ) { for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - if(itr->IsSelected()) + if((*itr)->IsSelected()) { maEntries.erase(itr); break; @@ -388,7 +389,7 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry ) bool bReGrabFocus = HasChildPathFocus(); for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { - itr->SetInactive(); + (*itr)->SetInactive(); } mpDialogParent->InvalidateRefData(); pEntry->SetActive(); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 5f69baf..1d163dd 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1499,11 +1499,11 @@ ScIconSetFrmtEntry::ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, i < n; ++i) { maEntries.push_back( new ScIconSetFrmtDataEntry( this, eType, pDoc, i, &pIconSetFormatData->maEntries[i] ) ); - Point aPos = maEntries[0].GetPosPixel(); - aPos.Y() += maEntries[0].GetSizePixel().Height() * i * 1.2; - maEntries[i].SetPosPixel( aPos ); + Point aPos = maEntries[0]->GetPosPixel(); + aPos.Y() += maEntries[0]->GetSizePixel().Height() * i * 1.2; + maEntries[i]->SetPosPixel( aPos ); } - maEntries.begin()->SetFirstEntry(); + maEntries[0]->SetFirstEntry(); } else IconSetTypeHdl(NULL); @@ -1541,12 +1541,12 @@ IMPL_LINK_NOARG( ScIconSetFrmtEntry, IconSetTypeHdl ) for(size_t i = 0; i < nElements; ++i) { maEntries.push_back( new ScIconSetFrmtDataEntry( this, static_cast<ScIconSetType>(nPos), mpDoc, i ) ); - Point aPos = maEntries[0].GetPosPixel(); - aPos.Y() += maEntries[0].GetSizePixel().Height() * i * 1.2; - maEntries[i].SetPosPixel( aPos ); - maEntries[i].Show(); + Point aPos = maEntries[0]->GetPosPixel(); + aPos.Y() += maEntries[0]->GetSizePixel().Height() * i * 1.2; + maEntries[i]->SetPosPixel( aPos ); + maEntries[i]->Show(); } - maEntries.begin()->SetFirstEntry(); + maEntries[0]->SetFirstEntry(); SetHeight(); static_cast<ScCondFormatList*>(GetParent())->RecalcAll(); @@ -1566,7 +1566,7 @@ void ScIconSetFrmtEntry::SetActive() for(ScIconSetFrmtDataEntriesType::iterator itr = maEntries.begin(), itrEnd = maEntries.end(); itr != itrEnd; ++itr) { - itr->Show(); + (*itr)->Show(); } Select(); @@ -1579,7 +1579,7 @@ void ScIconSetFrmtEntry::SetInactive() for(ScIconSetFrmtDataEntriesType::iterator itr = maEntries.begin(), itrEnd = maEntries.end(); itr != itrEnd; ++itr) { - itr->Hide(); + (*itr)->Hide(); } Deselect(); @@ -1594,7 +1594,7 @@ ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const for(ScIconSetFrmtDataEntriesType::const_iterator itr = maEntries.begin(), itrEnd = maEntries.end(); itr != itrEnd; ++itr) { - pData->maEntries.push_back(itr->CreateEntry(mpDoc, maPos)); + pData->maEntries.push_back((*itr)->CreateEntry(mpDoc, maPos)); } pFormat->SetIconSetData(pData); diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 990fc8e..02afd8e 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -148,7 +148,7 @@ private: bool mbSeparator:1; ::boost::shared_ptr<Action> mpAction; - ::boost::shared_ptr<ScMenuFloatingWindow> mpSubMenuWin; + VclPtr<ScMenuFloatingWindow> mpSubMenuWin; MenuItemData(); }; diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 7bd9c84..eaf90aa 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -22,8 +22,6 @@ #include "rangelst.hxx" #include "condformathelper.hxx" -#include <boost/ptr_container/ptr_vector.hpp> -#include <boost/scoped_ptr.hpp> #include "anyrefdg.hxx" class ScDocument; @@ -56,11 +54,11 @@ class ScCondFormatDlg; class ScCondFormatList : public Control { private: - typedef boost::ptr_vector<ScCondFrmtEntry> EntryContainer; + typedef std::vector<VclPtr<ScCondFrmtEntry>> EntryContainer; EntryContainer maEntries; bool mbHasScrollBar; - boost::scoped_ptr<ScrollBar> mpScrollBar; + VclPtr<ScrollBar> mpScrollBar; ScDocument* mpDoc; ScAddress maPos; diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 396719a..9c1465c 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -289,7 +289,7 @@ class ScIconSetFrmtEntry : public ScCondFrmtEntry // icon set ui elements VclPtr<ListBox> maLbIconSetType; - typedef boost::ptr_vector<ScIconSetFrmtDataEntry> ScIconSetFrmtDataEntriesType; + typedef std::vector<VclPtr<ScIconSetFrmtDataEntry>> ScIconSetFrmtDataEntriesType; ScIconSetFrmtDataEntriesType maEntries; virtual OUString GetExpressionString() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index eafa07d..d62fc77 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -117,7 +117,7 @@ class ScConflictsDlg : public ModalDialog { private: VclPtr<SvSimpleTableContainer> m_pLbConflictsContainer; - boost::scoped_ptr<SvxRedlinTable> m_pLbConflicts; + VclPtr<SvxRedlinTable> m_pLbConflicts; VclPtr<PushButton> m_pBtnKeepMine; VclPtr<PushButton> m_pBtnKeepOther; VclPtr<PushButton> m_pBtnKeepAllMine; diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index 736c719..762b0cd 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -20,8 +20,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> -#include <boost/ptr_container/ptr_vector.hpp> - #define MAX_DATAFORM_COLS 256 #define MAX_DATAFORM_ROWS 32000 @@ -51,8 +49,8 @@ private: SCTAB nTab; bool bNoSelection; - boost::ptr_vector<boost::nullable<FixedText> > maFixedTexts; - boost::ptr_vector<boost::nullable<Edit> > maEdits; + std::vector<VclPtr<FixedText> > maFixedTexts; + std::vector<VclPtr<Edit> > maEdits; public: ScDataFormDlg( vcl::Window* pParent, ScTabViewShell* pTabViewShell); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 2029f56..3308db5 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -140,8 +140,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou VclPtr<ScFilterListBox> pFilterBox; VclPtr<FloatingWindow> pFilterFloat; - boost::scoped_ptr<ScCheckListMenuWindow> mpAutoFilterPopup; - boost::scoped_ptr<ScCheckListMenuWindow> mpDPFieldPopup; + VclPtr<ScCheckListMenuWindow> mpAutoFilterPopup; + VclPtr<ScCheckListMenuWindow> mpDPFieldPopup; boost::scoped_ptr<ScDPFieldButton> mpFilterButton; sal_uInt16 nCursorHideCount; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 5118264..53d227e 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -289,7 +289,7 @@ protected: bool IsPointerAtResizePos(); private: VclPtr<ScPosWnd> aWndPos; - std::unique_ptr<ScTextWndBase> pRuntimeWindow; + VclPtr<ScTextWndBase> pRuntimeWindow; ScTextWndBase& aTextWindow; ScInputHandler* pInputHdl; OUString aTextOk; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 8a7d1ce..1a9acfa 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -165,12 +165,12 @@ private: bool mbDlgLostFocus; static const sal_uInt16 EDIT_ROW_COUNT = 4; - ScCursorRefEdit* mpLeftEdit[EDIT_ROW_COUNT]; + VclPtr<ScCursorRefEdit> mpLeftEdit[EDIT_ROW_COUNT]; VclPtr<formula::RefButton> mpLeftButton[EDIT_ROW_COUNT]; - ScCursorRefEdit* mpRightEdit[EDIT_ROW_COUNT]; + VclPtr<ScCursorRefEdit> mpRightEdit[EDIT_ROW_COUNT]; VclPtr<formula::RefButton> mpRightButton[EDIT_ROW_COUNT]; - VclPtr<ListBox> mpOperator[EDIT_ROW_COUNT]; - VclPtr<PushButton> mpDelButton[EDIT_ROW_COUNT]; + VclPtr<ListBox> mpOperator[EDIT_ROW_COUNT]; + VclPtr<PushButton> mpDelButton[EDIT_ROW_COUNT]; std::vector<ScOptConditionRow> maConditions; long nScrollPos; diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 52a60dc..5ea48b3 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -104,11 +104,11 @@ private: FuPoor* pDrawActual; FuPoor* pDrawOld; - ScGridWindow* pGridWin[4]; - ScColBar* pColBar[2]; - ScRowBar* pRowBar[2]; - ScOutlineWindow* pColOutline[2]; - ScOutlineWindow* pRowOutline[2]; + VclPtr<ScGridWindow> pGridWin[4]; + VclPtr<ScColBar> pColBar[2]; + VclPtr<ScRowBar> pRowBar[2]; + VclPtr<ScOutlineWindow> pColOutline[2]; + VclPtr<ScOutlineWindow> pRowOutline[2]; VclPtr<ScTabSplitter> pHSplitter; VclPtr<ScTabSplitter> pVSplitter; VclPtr<ScTabControl> pTabControl; @@ -120,7 +120,7 @@ private: VclPtr<ScCornerButton> aTopButton; VclPtr<ScrollBarBox> aScrollBarBox; - boost::scoped_ptr<ScHintWindow> mpInputHintWindow; // popup window for data validation + VclPtr<ScHintWindow> mpInputHintWindow; // popup window for data validation ScPageBreakData* pPageBreakData; std::vector<ScHighlightEntry> maHighlightRanges; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 70c7e0f..8194c96 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -335,7 +335,7 @@ public: DataFormPutData( SCROW nCurrentRow , SCROW nStartRow , SCCOL nStartCol , SCROW nEndRow , SCCOL nEndCol , - boost::ptr_vector<boost::nullable<Edit> >& aEdits, + std::vector<VclPtr<Edit> >& aEdits, sal_uInt16 aColLength ); void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = NULL ); // Internal helper functions diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 9679593..2d461ed 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -452,6 +452,7 @@ void ScConflictsDlg::dispose() m_pBtnKeepOther.disposeAndClear(); m_pBtnKeepAllMine.disposeAndClear(); m_pBtnKeepAllOthers.disposeAndClear(); + m_pLbConflicts.disposeAndClear(); ModalDialog::dispose(); } diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index d2c7b1f..cb61d66 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -157,27 +157,27 @@ ScDataFormDlg::ScDataFormDlg(vcl::Window* pParent, ScTabViewShell* pTabViewShell maFixedTexts.push_back( new FixedText(m_pGrid) ); maEdits.push_back( new Edit(m_pGrid, WB_BORDER) ); - maFixedTexts[nIndex].set_grid_left_attach(0); - maEdits[nIndex].set_grid_left_attach(1); - maFixedTexts[nIndex].set_grid_top_attach(nGridRow); - maEdits[nIndex].set_grid_top_attach(nGridRow); + maFixedTexts[nIndex]->set_grid_left_attach(0); + maEdits[nIndex]->set_grid_left_attach(1); + maFixedTexts[nIndex]->set_grid_top_attach(nGridRow); + maEdits[nIndex]->set_grid_top_attach(nGridRow); - maEdits[nIndex].SetWidthInChars(32); - maEdits[nIndex].set_hexpand(true); + maEdits[nIndex]->SetWidthInChars(32); + maEdits[nIndex]->set_hexpand(true); ++nGridRow; - maFixedTexts[nIndex].SetText(aFieldName); - maFixedTexts[nIndex].Show(); - maEdits[nIndex].Show(); + maFixedTexts[nIndex]->SetText(aFieldName); + maFixedTexts[nIndex]->Show(); + maEdits[nIndex]->Show(); } else { maFixedTexts.push_back( NULL ); maEdits.push_back( NULL ); } - if (!maEdits.is_null(nIndex)) - maEdits[nIndex].SetModifyHdl( HDL(Impl_DataModifyHdl) ); + if (maEdits[nIndex] != nullptr) + maEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) ); } } @@ -225,15 +225,15 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/) { for (sal_uInt16 i = 0; i < aColLength; ++i) { - if (!maEdits.is_null(i)) + if (maEdits[i] != nullptr) { if (nCurrentRow<=nEndRow && pDoc) { OUString aFieldName(pDoc->GetString(i + nStartCol, nCurrentRow, nTab)); - maEdits[i].SetText(aFieldName); + maEdits[i]->SetText(aFieldName); } else - maEdits[i].SetText(OUString()); + maEdits[i]->SetText(OUString()); } } @@ -265,10 +265,10 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl) if ( pDoc ) { bool bHasData = false; - boost::ptr_vector<Edit>::iterator itr = maEdits.begin(), itrEnd = maEdits.end(); + auto itr = maEdits.begin(), itrEnd = maEdits.end(); for(; itr != itrEnd; ++itr) - if (!boost::is_null(itr)) - if ( !(*itr).GetText().isEmpty() ) + if ((*itr) != nullptr) + if ( !(*itr)->GetText().isEmpty() ) { bHasData = true; break; @@ -381,8 +381,8 @@ void ScDataFormDlg::SetButtonState() m_pBtnPrev->Enable( true ); m_pBtnRestore->Enable( false ); - if ( maEdits.size()>=1 && !maEdits.is_null(0) ) - maEdits[0].GrabFocus(); + if ( maEdits.size()>=1 && maEdits[0] != nullptr ) + maEdits[0]->GrabFocus(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 2eca0f2f..5a5f546 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -662,11 +662,11 @@ IMPL_LINK( ScOptSolverDlg, GetFocusHdl, Control*, pCtrl ) for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow ) { if( pCtrl == mpLeftEdit[nRow] || pCtrl == mpLeftButton[nRow] ) - pEdit = mpEdActive = mpLeftEdit[nRow]; + pEdit = mpEdActive = mpLeftEdit[nRow].get(); else if( pCtrl == mpRightEdit[nRow] || pCtrl == mpRightButton[nRow] ) - pEdit = mpEdActive = mpRightEdit[nRow]; + pEdit = mpEdActive = mpRightEdit[nRow].get(); else if( pCtrl == mpOperator[nRow] ) // focus on "operator" list box - mpEdActive = mpRightEdit[nRow]; // use right edit for ref input, but don't change selection + mpEdActive = mpRightEdit[nRow].get(); // use right edit for ref input, but don't change selection } if( pCtrl == m_pRbValue ) // focus on "Value of" radio button mpEdActive = m_pEdTargetValue; // use value edit for ref input, but don't change selection @@ -702,7 +702,7 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn ) // If the button is disabled, focus would normally move to the next control, // (left edit of the next row). Move it to left edit of this row instead. - mpEdActive = mpLeftEdit[nRow]; + mpEdActive = mpLeftEdit[nRow].get(); mpEdActive->GrabFocus(); } } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e68fafc..24ff487 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -539,9 +539,11 @@ void ScGridWindow::dispose() // #114409# ImpDestroyOverlayObjects(); + delete pNoteMarker; pFilterBox.disposeAndClear(); pFilterFloat.disposeAndClear(); - delete pNoteMarker; + mpAutoFilterPopup.disposeAndClear(); + mpDPFieldPopup.disposeAndClear(); vcl::Window::dispose(); } diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index c4ec4e3..63a2e08 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2228,17 +2228,17 @@ void ScTabView::EnableRefInput(bool bFlag) if(pTabControl!=nullptr) pTabControl->EnableInput(bFlag,true); - if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL) + if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=nullptr) pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,false); - if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=NULL) + if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=nullptr) pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,false); - if(pGridWin[SC_SPLIT_TOPLEFT]!=NULL) + if(pGridWin[SC_SPLIT_TOPLEFT]!=nullptr) pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,false); - if(pGridWin[SC_SPLIT_TOPRIGHT]!=NULL) + if(pGridWin[SC_SPLIT_TOPRIGHT]!=nullptr) pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,false); - if(pColBar[SC_SPLIT_RIGHT]!=NULL) + if(pColBar[SC_SPLIT_RIGHT]!=nullptr) pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,false); - if(pRowBar[SC_SPLIT_TOP]!=NULL) + if(pRowBar[SC_SPLIT_TOP]!=nullptr) pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,false); } diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 8035b0b..4b03d89 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -172,16 +172,16 @@ ScTabView::~ScTabView() // Delete this before the grid windows, since it's a child window of one of them. mpInputHintWindow.reset(); for (i=0; i<4; i++) - delete pGridWin[i]; + pGridWin[i].disposeAndClear(); delete pHdrSelEng; for (i=0; i<2; i++) { - delete pColBar[i]; - delete pRowBar[i]; - delete pColOutline[i]; - delete pRowOutline[i]; + pColBar[i].disposeAndClear(); + pRowBar[i].disposeAndClear(); + pColOutline[i].disposeAndClear(); + pRowOutline[i].disposeAndClear(); } pHSplitter.disposeAndClear(); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 55dc38c..d5d389e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1878,7 +1878,7 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, b void ScViewFunc::DataFormPutData( SCROW nCurrentRow , SCROW nStartRow , SCCOL nStartCol , SCROW nEndRow , SCCOL nEndCol , - boost::ptr_vector<boost::nullable<Edit> >& aEdits, + std::vector<VclPtr<Edit> >& aEdits, sal_uInt16 aColLength ) { ScDocument* pDoc = GetViewData().GetDocument(); @@ -1920,9 +1920,9 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow , for(sal_uInt16 i = 0; i < aColLength; i++) { - if (!aEdits.is_null(i)) + if (aEdits[i] != nullptr) { - OUString aFieldName=aEdits[i].GetText(); + OUString aFieldName=aEdits[i]->GetText(); pDoc->SetString( nStartCol + i, nCurrentRow, nTab, aFieldName ); } } diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 0e95da7..a778b08 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -554,11 +554,11 @@ void CustomAnimationCreateDialog::dispose() SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); pOptions->SetPreviewNewEffects( getCurrentPage()->getIsPreview() ); - delete mpTabPages[ENTRANCE]; - delete mpTabPages[EMPHASIS]; - delete mpTabPages[EXIT]; - delete mpTabPages[MOTIONPATH]; - delete mpTabPages[MISCEFFECTS]; + mpTabPages[ENTRANCE].disposeAndClear(); + mpTabPages[EMPHASIS].disposeAndClear(); + mpTabPages[EXIT].disposeAndClear(); + mpTabPages[MOTIONPATH].disposeAndClear(); + mpTabPages[MISCEFFECTS].disposeAndClear(); mpTabControl.disposeAndClear(); mpPane.disposeAndClear(); diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx index 974b3f3..68a5c81 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx @@ -65,7 +65,7 @@ private: VclPtr<TabControl> mpTabControl; - CustomAnimationCreateTabPage* mpTabPages[5]; + VclPtr<CustomAnimationCreateTabPage> mpTabPages[5]; sal_uInt16 mnEntranceId, mnEmphasisId, mnExitId, mnMPathId, mnMiscId; }; diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx index 3464527..d53c544 100644 --- a/sd/source/ui/annotations/annotationtag.hxx +++ b/sd/source/ui/annotations/annotationtag.hxx @@ -79,7 +79,7 @@ protected: private: AnnotationManagerImpl& mrManager; css::uno::Reference< css::office::XAnnotation > mxAnnotation; - std::unique_ptr<AnnotationWindow> mpAnnotationWindow; + VclPtr<AnnotationWindow> mpAnnotationWindow; Color maColor; int mnIndex; const ::vcl::Font& mrFont; diff --git a/sd/source/ui/dlg/assclass.cxx b/sd/source/ui/dlg/assclass.cxx index e77375b..7049c5b 100644 --- a/sd/source/ui/dlg/assclass.cxx +++ b/sd/source/ui/dlg/assclass.cxx @@ -86,8 +86,8 @@ bool Assistent::GotoPage(const int nPageToGo) { int nIndex=mnCurrentPage-1; - std::vector<vcl::Window*>::iterator iter = maPages[nIndex].begin(); - std::vector<vcl::Window*>::iterator iterEnd = maPages[nIndex].end(); + auto iter = maPages[nIndex].begin(); + auto iterEnd = maPages[nIndex].end(); for(; iter != iterEnd; ++iter) { diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx index fa62d325..d6251eb 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.hxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx @@ -34,6 +34,7 @@ #include <boost/shared_ptr.hpp> #include <boost/scoped_ptr.hpp> +#include <vcl/vclptr.hxx> namespace sd { class ViewShell; @@ -104,7 +105,7 @@ private: FrameView* mpFrameView; class ViewCache; - ::boost::shared_ptr<vcl::Window> mpWindow; + VclPtr<vcl::Window> mpWindow; ::boost::shared_ptr<ViewCache> mpViewCache; css::uno::Reference<css::drawing::framework::XPane> mxLocalPane; diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 7ef05cc..88c8320 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -135,7 +135,7 @@ void SAL_CALL FullScreenPane::setVisible (const sal_Bool bIsVisible) if (mpWindow != nullptr) mpWindow->Show(bIsVisible); - if (mpWorkWindow != 0) + if (mpWorkWindow != nullptr) mpWorkWindow->Show(bIsVisible); } @@ -144,7 +144,7 @@ Reference<css::accessibility::XAccessible> SAL_CALL FullScreenPane::getAccessibl { ThrowIfDisposed(); - if (mpWorkWindow != 0) + if (mpWorkWindow != nullptr) return mpWorkWindow->GetAccessible(false); else return NULL; diff --git a/sd/source/ui/framework/factories/FullScreenPane.hxx b/sd/source/ui/framework/factories/FullScreenPane.hxx index 1d7c348..c7f4d3e 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.hxx +++ b/sd/source/ui/framework/factories/FullScreenPane.hxx @@ -80,7 +80,7 @@ protected: private: css::uno::Reference<css::uno::XComponentContext> mxComponentContext; - ::boost::scoped_ptr<WorkWindow> mpWorkWindow; + VclPtr<WorkWindow> mpWorkWindow; void ExtractArguments ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId, diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx index 1af5619..ec65cd6 100644 --- a/sd/source/ui/inc/SlideSorter.hxx +++ b/sd/source/ui/inc/SlideSorter.hxx @@ -55,8 +55,6 @@ class SlotManager; class Properties; } } } -typedef ::boost::shared_ptr<sd::Window> SharedSdWindow; - namespace sd { namespace slidesorter { /** Show previews for all the slides in a document and allow the user to @@ -98,10 +96,10 @@ public: */ static ::boost::shared_ptr<SlideSorter> CreateSlideSorter ( ViewShell& rViewShell, - const ::boost::shared_ptr<sd::Window>& rpContentWindow, - const ::boost::shared_ptr<ScrollBar>& rpHorizontalScrollBar, - const ::boost::shared_ptr<ScrollBar>& rpVerticalScrollBar, - const ::boost::shared_ptr<ScrollBarBox>& rpScrollBarBox); + sd::Window* pContentWindow, + ScrollBar* pHorizontalScrollBar, + ScrollBar* pVerticalScrollBar, + ScrollBarBox* pScrollBarBox); /** Create a new slide sorter that is losely coupled to the given view shell. The view shell may even be missing. @@ -120,21 +118,21 @@ public: /** Return the control of the vertical scroll bar. */ - ::boost::shared_ptr<ScrollBar> GetVerticalScrollBar (void) const { return mpVerticalScrollBar;} + ScrollBar* GetVerticalScrollBar (void) const { return mpVerticalScrollBar;} /** Return the control of the horizontal scroll bar. */ - ::boost::shared_ptr<ScrollBar> GetHorizontalScrollBar (void) const { return mpHorizontalScrollBar;} + ScrollBar* GetHorizontalScrollBar (void) const { return mpHorizontalScrollBar;} /** Return the scroll bar filler that paints the little square that is enclosed by the two scroll bars. */ - ::boost::shared_ptr<ScrollBarBox> GetScrollBarFiller (void) const { return mpScrollBarBox;} + ScrollBarBox* GetScrollBarFiller (void) const { return mpScrollBarBox;} /** Return the content window. This is a sibling and is geometrically enclosed by the scroll bars. */ - SharedSdWindow GetContentWindow (void) const { return mpContentWindow;} + sd::Window* GetContentWindow (void) const { return mpContentWindow;} model::SlideSorterModel& GetModel (void) const; @@ -223,11 +221,11 @@ private: ::com::sun::star::uno::WeakReference<com::sun::star::frame::XController> mxControllerWeak; ViewShell* mpViewShell; ViewShellBase* mpViewShellBase; - SharedSdWindow mpContentWindow; + VclPtr<sd::Window> mpContentWindow; bool mbOwnesContentWindow; - ::boost::shared_ptr<ScrollBar> mpHorizontalScrollBar; - ::boost::shared_ptr<ScrollBar> mpVerticalScrollBar; - ::boost::shared_ptr<ScrollBarBox> mpScrollBarBox; + VclPtr<ScrollBar> mpHorizontalScrollBar; + VclPtr<ScrollBar> mpVerticalScrollBar; + VclPtr<ScrollBarBox> mpScrollBarBox; /** Set this flag to <TRUE/> to force a layout before the next paint. */ @@ -241,10 +239,10 @@ private: SlideSorter ( ViewShell& rViewShell, - const ::boost::shared_ptr<sd::Window>& rpContentWindow, - const ::boost::shared_ptr<ScrollBar>& rpHorizontalScrollBar, - const ::boost::shared_ptr<ScrollBar>& rpVerticalScrollBar, - const ::boost::shared_ptr<ScrollBarBox>& rpScrollBarBox); + sd::Window* pContentWindow, + ScrollBar* pHorizontalScrollBar, + ScrollBar* pVerticalScrollBar, + ScrollBarBox* pScrollBarBox); SlideSorter ( ViewShellBase& rBase, ViewShell* pViewShell, diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 0cc3253f..f72a44f 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -458,20 +458,20 @@ protected: document. */ - ::boost::shared_ptr<sd::Window> mpContentWindow; + VclPtr<sd::Window> mpContentWindow; /// Horizontal scroll bar for the current slide is displayed when needed. - ::boost::shared_ptr<ScrollBar> mpHorizontalScrollBar; + VclPtr<ScrollBar> mpHorizontalScrollBar; /// Vertical scroll bar for whole document is always visible. - ::boost::shared_ptr<ScrollBar> mpVerticalScrollBar; + VclPtr<ScrollBar> mpVerticalScrollBar; /// Horizontal ruler is not shown by default. - ::std::unique_ptr<SvxRuler> mpHorizontalRuler; + VclPtr<SvxRuler> mpHorizontalRuler; /// Vertical ruler is not shown by default. - ::std::unique_ptr<SvxRuler> mpVerticalRuler; + VclPtr<SvxRuler> mpVerticalRuler; /// Filler of the little square enclosed by the two scroll bars. - ::boost::shared_ptr<ScrollBarBox> mpScrollBarBox; + VclPtr<ScrollBarBox> mpScrollBarBox; /// Layer tab bar. - ::std::unique_ptr<LayerTabBar> mpLayerTabBar; + VclPtr<LayerTabBar> mpLayerTabBar; /// This flag controls whether the rulers are visible. bool mbHasRulers; diff --git a/sd/source/ui/inc/ViewTabBar.hxx b/sd/source/ui/inc/ViewTabBar.hxx index b259f3f..3c73bd9 100644 --- a/sd/source/ui/inc/ViewTabBar.hxx +++ b/sd/source/ui/inc/ViewTabBar.hxx @@ -67,7 +67,7 @@ public: virtual void SAL_CALL disposing (void) SAL_OVERRIDE; - ::boost::shared_ptr< ::TabControl> GetTabControl (void) const { return mpTabControl;} + ::TabControl* GetTabControl (void) const { return mpTabControl;} bool ActivatePage (void); @@ -149,14 +149,14 @@ public: GetTabBarButtons (void); private: - ::boost::shared_ptr< ::TabControl> mpTabControl; + VclPtr< ::TabControl> mpTabControl; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController> mxController; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XConfigurationController> mxConfigurationController; typedef ::std::vector<com::sun::star::drawing::framework::TabBarButton> TabBarButtonList; TabBarButtonList maTabBarButtons; - ::boost::scoped_ptr<TabPage> mpTabPage; + VclPtr<TabPage> mpTabPage; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId> mxViewTabBarId; ViewShellBase* mpViewShellBase; diff --git a/sd/source/ui/inc/assclass.hxx b/sd/source/ui/inc/assclass.hxx index 3e95415..6a0709d 100644 --- a/sd/source/ui/inc/assclass.hxx +++ b/sd/source/ui/inc/assclass.hxx @@ -33,7 +33,7 @@ class SD_DLLPUBLIC Assistent { /** contains for every page the controls, which have to be connected? correctly */ - std::vector<vcl::Window*> maPages[MAX_PAGES]; + std::vector<VclPtr<vcl::Window> > maPages[MAX_PAGES]; /// number of pages int mnPages; diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx index 27981b5..00f1062 100644 --- a/sd/source/ui/sidebar/PanelBase.cxx +++ b/sd/source/ui/sidebar/PanelBase.cxx @@ -43,16 +43,14 @@ PanelBase::~PanelBase (void) void PanelBase::dispose() { - OSL_TRACE("deleting wrapped control at %p", mpWrappedControl.get()); - mpWrappedControl.reset(); - OSL_TRACE("deleting PanelBase at %p from parent %p", this, GetParent()); + mpWrappedControl.disposeAndClear(); Control::dispose(); } void PanelBase::Dispose (void) { OSL_TRACE("PanelBase::DisposeL: deleting wrapped control at %p", mpWrappedControl.get()); - mpWrappedControl.reset(); + mpWrappedControl.disposeAndClear(); } css::ui::LayoutSize PanelBase::GetHeightForWidth (const sal_Int32 /*nWidth*/) @@ -86,7 +84,7 @@ void PanelBase::Resize (void) void PanelBase::SetSidebar (const css::uno::Reference<css::ui::XSidebar>& rxSidebar) { mxSidebar = rxSidebar; - if (mxSidebar.is() && mpWrappedControl!=0) + if (mxSidebar.is() && mpWrappedControl!=nullptr) mxSidebar->requestLayout(); } diff --git a/sd/source/ui/sidebar/PanelBase.hxx b/sd/source/ui/sidebar/PanelBase.hxx index 033f1b2..a081bf1 100644 --- a/sd/source/ui/sidebar/PanelBase.hxx +++ b/sd/source/ui/sidebar/PanelBase.hxx @@ -64,7 +64,7 @@ public: ::com::sun::star::accessibility::XAccessible>& rxParent); protected: - ::boost::scoped_ptr< vcl::Window> mpWrappedControl; + VclPtr< vcl::Window> mpWrappedControl; virtual vcl::Window* CreateWrappedControl ( vcl::Window* pParentWindow, ViewShellBase& rViewShellBase) = 0; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 0a78e7e..83408ee 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -118,7 +118,7 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter) mnPaintEntranceCount(0), mbIsContextMenuOpen(false) { - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow()); OSL_ASSERT(pWindow); if (pWindow) { @@ -504,7 +504,7 @@ void SlideSorterController::PostModelChange (void) mbPostModelChangePending = false; mrModel.Resync(); - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow()); if (pWindow) { GetCurrentSlideManager()->HandleModelChange(); @@ -543,7 +543,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) if (pEvent != NULL) { ::vcl::Window* pWindow = pEvent->GetWindow(); - SharedSdWindow pActiveWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pActiveWindow (mrSlideSorter.GetContentWindow()); switch (pEvent->GetId()) { case VCLEVENT_WINDOW_ACTIVATE: @@ -559,12 +559,12 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) case VCLEVENT_WINDOW_GETFOCUS: if (pActiveWindow) - if (pWindow == pActiveWindow.get()) + if (pWindow == pActiveWindow) GetFocusManager().ShowFocus(false); break; case VCLEVENT_WINDOW_LOSEFOCUS: - if (pActiveWindow && pWindow == pActiveWindow.get()) + if (pActiveWindow && pWindow == pActiveWindow) { GetFocusManager().HideFocus(); mrView.GetToolTip().Hide(); @@ -586,7 +586,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) : ViewShell::OUTPUT_DRAWMODE_COLOR); if (mrSlideSorter.GetViewShell() != NULL) mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode); - if (pActiveWindow != 0) + if (pActiveWindow != nullptr) pActiveWindow->SetDrawMode(nDrawMode); mrView.HandleDrawModeChange(); @@ -720,7 +720,7 @@ Rectangle SlideSorterController::Rearrange (bool bForce) else mbIsForcedRearrangePending = false; - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow()); if (pWindow) { if (bForce) @@ -870,7 +870,7 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& // Get a pointer to the corresponding accessible object and notify // that of the name change. - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow()); if ( ! pWindow) return; diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx index 43eb665..eb0622d 100644 --- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx +++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx @@ -87,7 +87,7 @@ void DragAndDropContext::UpdatePosition ( // Convert window coordinates into model coordinates (we need the // window coordinates for auto-scrolling because that remains // constant while scrolling.) - SharedSdWindow pWindow (mpTargetSlideSorter->GetContentWindow()); + sd::Window *pWindow (mpTargetSlideSorter->GetContentWindow()); const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition)); ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler ( mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 3430527..ad95135 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -76,12 +76,12 @@ void ScrollBarManager::LateInitialization (void) void ScrollBarManager::Connect (void) { - if (mpVerticalScrollBar != 0) + if (mpVerticalScrollBar != nullptr) { mpVerticalScrollBar->SetScrollHdl ( LINK(this, ScrollBarManager, VerticalScrollBarHandler)); } - if (mpHorizontalScrollBar != 0) + if (mpHorizontalScrollBar != nullptr) { mpHorizontalScrollBar->SetScrollHdl( LINK(this, ScrollBarManager, HorizontalScrollBarHandler)); @@ -90,11 +90,11 @@ void ScrollBarManager::Connect (void) void ScrollBarManager::Disconnect (void) { - if (mpVerticalScrollBar != 0) + if (mpVerticalScrollBar != nullptr) { mpVerticalScrollBar->SetScrollHdl (Link()); } - if (mpHorizontalScrollBar != 0) + if (mpHorizontalScrollBar != nullptr) { mpHorizontalScrollBar->SetScrollHdl (Link()); } @@ -121,13 +121,13 @@ Rectangle ScrollBarManager::PlaceScrollBars ( bIsHorizontalScrollBarAllowed, bIsVerticalScrollBarAllowed)); - if (mpHorizontalScrollBar!=0 && mpHorizontalScrollBar->IsVisible()) + if (mpHorizontalScrollBar!=nullptr && mpHorizontalScrollBar->IsVisible()) PlaceHorizontalScrollBar (rAvailableArea); - if (mpVerticalScrollBar!=0 && mpVerticalScrollBar->IsVisible()) + if (mpVerticalScrollBar!=nullptr && mpVerticalScrollBar->IsVisible()) PlaceVerticalScrollBar (rAvailableArea); - if (mpScrollBarFiller!=0 && mpScrollBarFiller->IsVisible()) + if (mpScrollBarFiller!=nullptr && mpScrollBarFiller->IsVisible()) PlaceFiller (rAvailableArea); return aRemainingSpace; @@ -181,12 +181,12 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea) void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling) { Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); - SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); + sd::Window *pWindow (mrSlideSorter.GetContentWindow()); Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel())); // The horizontal scroll bar is only shown when the window is // horizontally smaller than the view. - if (mpHorizontalScrollBar != 0 && mpHorizontalScrollBar->IsVisible()) + if (mpHorizontalScrollBar != nullptr && mpHorizontalScrollBar->IsVisible()) { mpHorizontalScrollBar->Show(); mpHorizontalScrollBar->SetRange ( @@ -216,7 +216,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits