[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 3 commits - accessibility/inc accessibility/source avmedia/source basctl/source chart2/source compilerplugins/clang cui/source dbaccess/source extensions/source framework/source include/avmedia include/svx reportdesign/source sc/source sd/source sfx2/source slideshow/source starmath/inc starmath/source svtools/source svx/inc svx/source
Noel Grandin
noel at peralex.com
Fri Apr 10 03:15:04 PDT 2015
accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx | 6
accessibility/inc/accessibility/extended/accessiblelistbox.hxx | 2
accessibility/source/extended/accessibleiconchoicectrl.cxx | 5
accessibility/source/extended/accessiblelistbox.cxx | 10 -
accessibility/source/helper/acc_factory.cxx | 4
accessibility/source/standard/vclxaccessiblebox.cxx | 12 -
accessibility/source/standard/vclxaccessiblebutton.cxx | 10 -
accessibility/source/standard/vclxaccessiblecheckbox.cxx | 4
accessibility/source/standard/vclxaccessiblecombobox.cxx | 9 -
accessibility/source/standard/vclxaccessibledropdowncombobox.cxx | 8 -
accessibility/source/standard/vclxaccessibledropdownlistbox.cxx | 9 -
accessibility/source/standard/vclxaccessibleedit.cxx | 8 -
accessibility/source/standard/vclxaccessiblelist.cxx | 22 +--
accessibility/source/standard/vclxaccessiblelistbox.cxx | 12 -
accessibility/source/standard/vclxaccessibleradiobutton.cxx | 2
accessibility/source/standard/vclxaccessiblescrollbar.cxx | 2
accessibility/source/standard/vclxaccessiblestatusbar.cxx | 2
accessibility/source/standard/vclxaccessibletabcontrol.cxx | 2
accessibility/source/standard/vclxaccessibletabpagewindow.cxx | 2
accessibility/source/standard/vclxaccessibletextcomponent.cxx | 4
accessibility/source/standard/vclxaccessibletextfield.cxx | 10 -
accessibility/source/standard/vclxaccessibletoolbox.cxx | 42 ++---
avmedia/source/viewer/mediawindow_impl.cxx | 4
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.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 | 6
extensions/source/propctrlr/formlinkdialog.hxx | 8 -
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 14 -
framework/source/uielement/popuptoolbarcontroller.cxx | 6
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 | 8 -
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 | 7
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 | 54 ++-----
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/appl/sfxhelp.cxx | 2
sfx2/source/dialog/backingcomp.cxx | 6
sfx2/source/sidebar/Deck.cxx | 6
sfx2/source/sidebar/Deck.hxx | 10 -
sfx2/source/sidebar/DeckLayouter.cxx | 4
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
143 files changed, 566 insertions(+), 571 deletions(-)
New commits:
commit c72fac269626cd4c2c3f62a6eed69e47b59256a4
Author: Noel Grandin <noel at 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 8646e4d..5ff2f06 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -204,7 +204,9 @@ void MediaWindowImpl::dispose()
mpEmptyBmpEx = NULL;
delete mpAudioBmpEx;
mpAudioBmpEx = NULL;
- mpMediaWindowControl.clear();
+ mpMediaWindowControl.disposeAndClear();
+ mpChildWindow.disposeAndClear();
+
Control::dispose();
}
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index 40131c3..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;
- std::unique_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 addef49..82e2825 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -109,7 +109,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 d943cec..66f5349 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 366cc7b..fa8399a 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -118,6 +118,7 @@ void BreakPointDialog::dispose()
m_pNewButton.clear();
m_pDelButton.clear();
m_pNumericField.clear();
+ m_pCheckBox.clear();
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 c475ab4..0c7a40d 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 0baeb57..2f154e9 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 f891593..ce2a54e 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -178,9 +178,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 118d6f7..e3cb545 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.clear();
+ m_xBrwData.disposeAndClear();
ModalDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 296fb6d..d5eeb35 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 cff3f4f..5bfceb1 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 c71b75e..41fb2d2 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 4043f8c..1210b8a 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1595,7 +1595,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.hxx b/cui/source/options/optaboutconfig.hxx
index 85a10de..b9ead63 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -50,7 +50,7 @@ private:
VclPtr<Edit> m_pSearchEdit;
std::vector< boost::shared_ptr< Prop_Impl > > m_vectorOfModified;
- boost::scoped_ptr< SvSimpleTable > m_pPrefBox;
+ VclPtr< SvSimpleTable > m_pPrefBox;
//for search
::com::sun::star::util::SearchOptions m_options;
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 5c0189f..bebc01f 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 )
@@ -586,7 +584,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 )
@@ -1226,7 +1224,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 90de8ea..9240fb9 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;
@@ -194,7 +194,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 2938126..d5b9cda 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 77c515e..0fd69e9 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.clear();
+ 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 001576a..c8408c0 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 a1ea459..b40f45a 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 91ed73b..fc7b229 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -216,6 +216,12 @@ namespace pcr
m_pMasterLabel.clear();
m_pOK.clear();
m_pSuggest.clear();
+
+ 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 b17ffe4..3eeb707 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
@@ -115,7 +116,7 @@ namespace avmedia
MediaWindow& operator =( const MediaWindow& ) SAL_DELETED_FUNCTION;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxIFace;
- std::unique_ptr<priv::MediaWindowImpl> mpImpl;
+ VclPtr<priv::MediaWindowImpl> mpImpl;
};
}
diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx
index 063e8e6..bcd0bde 100644
--- a/include/svx/sidebar/Popup.hxx
+++ b/include/svx/sidebar/Popup.hxx
@@ -77,7 +77,7 @@ public :
void SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback);
protected:
- std::unique_ptr<PopupControl> mxControl;
+ VclPtr<PopupControl> mxControl;
/** Make sure that both PopupContainer and PopupControl objects
exist. Calls the maControlCreator functor if necessary.
@@ -94,7 +94,7 @@ private:
::boost::function<PopupControl*(PopupContainer*)> maControlCreator;
::boost::function<void(void)> maPopupModeEndCallback;
const ::rtl::OUString msAccessibleName;
- std::unique_ptr<PopupContainer> mxContainer;
+ VclPtr<PopupContainer> mxContainer;
DECL_LINK(PopupModeEndHandler, void*);
};
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 7fdfaea..eda091e 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 ddd8ea1..7c59a31 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 76dabea..6a30ee8 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 f8e8332..e0ebc88 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 a8b8182..90faf2d 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -213,8 +213,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 7a282f2..6dc7b02 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -457,7 +457,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 1e0294d..7c974bd 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -180,8 +180,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 5ad8637..e45d9da 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 e8c1982..f16fd59 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 >
{
@@ -182,7 +181,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
*
@@ -236,7 +235,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
@@ -253,7 +252,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 9d15fa3..9829649 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -405,7 +405,7 @@ void ODesignView::GetFocus()
if ( !m_bDeleted )
{
- ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_aScrollWindow->getMarkedSection();
+ OSectionWindow* pSectionWindow = m_aScrollWindow->getMarkedSection();
if ( pSectionWindow )
pSectionWindow->GrabFocus();
}
@@ -566,12 +566,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);
}
@@ -649,7 +649,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 ca3029b..8ccfc48 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 a2ca68d..1255d68 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 c0d7373..520b5be 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();
}
@@ -2791,8 +2791,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() );
}
@@ -3159,7 +3159,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;
@@ -3337,7 +3337,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] )
@@ -3651,8 +3651,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;
}
@@ -3966,7 +3966,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);
@@ -3975,10 +3975,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
@@ -4219,16 +4219,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 25097bf..7d06b779 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -299,7 +299,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());
}
@@ -326,12 +326,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 7185223..b05541e 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -301,12 +301,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 b8e159f..543a612 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -226,8 +226,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;
@@ -235,7 +235,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 );
@@ -255,8 +255,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);
}
}
}
@@ -299,7 +299,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();
@@ -399,17 +399,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)
@@ -425,9 +425,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;
@@ -631,7 +631,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 );
@@ -888,7 +888,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);
}
@@ -929,9 +929,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 426c612..0fb2b0e 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -514,7 +514,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 c7c2ba7..4cddaa3 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 b43d19c..1076f7b 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.clear();
+ 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 49db670..f4f760c 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1578,11 +1578,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);
@@ -1620,12 +1620,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();
@@ -1645,7 +1645,7 @@ void ScIconSetFrmtEntry::SetActive()
for(ScIconSetFrmtDataEntriesType::iterator itr = maEntries.begin(),
itrEnd = maEntries.end(); itr != itrEnd; ++itr)
{
- itr->Show();
+ (*itr)->Show();
}
Select();
@@ -1658,7 +1658,7 @@ void ScIconSetFrmtEntry::SetInactive()
for(ScIconSetFrmtDataEntriesType::iterator itr = maEntries.begin(),
itrEnd = maEntries.end(); itr != itrEnd; ++itr)
{
- itr->Hide();
+ (*itr)->Hide();
}
Deselect();
@@ -1673,7 +1673,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 080ddb4..11dc8dd 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -149,7 +149,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 4d7949d..168b692 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -295,7 +295,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 94188c2..3c429d1 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -118,7 +118,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 8e7d47b..ef9b850 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -136,10 +136,10 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
std::unique_ptr<ScNoteMarker> mpNoteMarker;
- VclPtr<ScFilterListBox> pFilterBox;
- VclPtr<FloatingWindow> pFilterFloat;
- std::unique_ptr<ScCheckListMenuWindow> mpAutoFilterPopup;
- std::unique_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
+ VclPtr<ScFilterListBox> pFilterBox;
+ VclPtr<FloatingWindow> pFilterFloat;
+ VclPtr<ScCheckListMenuWindow> mpAutoFilterPopup;
+ VclPtr<ScCheckListMenuWindow> mpDPFieldPopup;
std::unique_ptr<ScDPFieldButton> mpFilterButton;
sal_uInt16 nCursorHideCount;
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index db96b99..f846d7b 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 37aed55..69f5ef7 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 a032722..eaff3e1 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 d75dea9..03e269b 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -448,6 +448,7 @@ ScConflictsDlg::~ScConflictsDlg()
void ScConflictsDlg::dispose()
{
m_pLbConflictsContainer.clear();
+ m_pLbConflicts.disposeAndClear();
m_pBtnKeepMine.clear();
m_pBtnKeepOther.clear();
m_pBtnKeepAllMine.clear();
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index fc996c9..2029fcd 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 6b9d272..fdbef2b 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 41ec52f..217cbbd 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -545,9 +545,12 @@ void ScGridWindow::dispose()
// #114409#
ImpDestroyOverlayObjects();
- pFilterBox.clear();
- pFilterFloat.clear();
+ mpFilterBox.disposeAndClear();
+ mpFilterFloat.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 57536ed..806ac81 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2231,17 +2231,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 e651d9a..0b5638d 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -178,16 +178,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 0fa755d..ed38c24 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1910,7 +1910,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();
@@ -1952,9 +1952,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 9beb864..f499b83 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.clear();
mpPane.clear();
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 ff2d662..a95c96c 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;
@@ -222,11 +220,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.
*/
@@ -240,10 +238,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 f0f643e..1e165c8 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -465,20 +465,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 7ee2a89..611c197 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*/)
@@ -75,7 +73,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 d14940f..e6ed405 100644
--- a/sd/source/ui/sidebar/PanelBase.hxx
+++ b/sd/source/ui/sidebar/PanelBase.hxx
@@ -59,7 +59,7 @@ public:
virtual void SetSidebar (const css::uno::Reference<css::ui::XSidebar>& rxSidebar) SAL_OVERRIDE;
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 ad76ae7..ed333f6 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)
{
@@ -502,7 +502,7 @@ void SlideSorterController::PostModelChange (void)
mbPostModelChangePending = false;
mrModel.Resync();
- SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ sd::Window *pWindow (mrSlideSorter.GetContentWindow());
if (pWindow)
{
GetCurrentSlideManager()->HandleModelChange();
@@ -541,7 +541,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:
@@ -557,12 +557,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();
@@ -584,7 +584,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();
@@ -714,7 +714,7 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
else
mbIsForcedRearrangePending = false;
- SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ sd::Window *pWindow (mrSlideSorter.GetContentWindow());
if (pWindow)
{
if (bForce)
@@ -864,7 +864,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 3338bfe..00dd465 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 971c7e7..2d9e298 100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -72,12 +72,12 @@ ScrollBarManager::~ScrollBarManager (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));
@@ -86,11 +86,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());
}
@@ -117,13 +117,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;
@@ -177,12 +177,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 (
@@ -212,7 +212,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
}
// The vertical scroll bar is always shown.
- if (mpVerticalScrollBar != 0 && mpVerticalScrollBar->IsVisible())
+ if (mpVerticalScrollBar != nullptr && mpVerticalScrollBar->IsVisible())
{
mpVerticalScrollBar->SetRange (
Range(aModelArea.Top(), aModelArea.Bottom()));
@@ -291,7 +291,7 @@ void ScrollBarManager::SetWindowOrigin (
mnHorizontalPosition = nHorizontalPosition;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list