[Libreoffice-commits] core.git: Branch 'feature/vclref' - sfx2/source
Michael Meeks
michael.meeks at collabora.com
Tue Mar 17 13:44:30 PDT 2015
sfx2/source/sidebar/Deck.cxx | 25 +++++--------------------
sfx2/source/sidebar/Panel.cxx | 13 +------------
sfx2/source/sidebar/SidebarController.cxx | 11 ++++++-----
sfx2/source/sidebar/TabBar.cxx | 6 +++---
4 files changed, 15 insertions(+), 40 deletions(-)
New commits:
commit c1428d403a4ed918e09e8f3bc2c7a92edc0f294e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Mar 17 20:36:34 2015 +0000
lingering smart_ptr 'reset' -> disposeAndClear.
Change-Id: Ia126588580b76cc69944bb974d93cb51ee0356dd
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 8042958..ec61351 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -93,17 +93,9 @@ void Deck::dispose()
maPanels[i]->dispose();
maPanels.clear();
- mpTitleBar.disposeAndClear();
- mpScrollClipWindow.disposeAndClear();
- mpScrollContainer.disposeAndClear();
- mpFiller.disposeAndClear();
- mpVerticalScrollBar.disposeAndClear();
vcl::Window::dispose();
}
-
-
-
void Deck::Dispose (void)
{
SharedPanelContainer aPanels;
@@ -121,20 +113,13 @@ void Deck::Dispose (void)
}
}
- mpTitleBar.reset();
- mpFiller.reset();
- mpVerticalScrollBar.reset();
- mpScrollContainer.reset();
- mpScrollClipWindow.reset();
+ mpTitleBar.disposeAndClear();
+ mpFiller.disposeAndClear();
+ mpVerticalScrollBar.disposeAndClear();
+ mpScrollContainer.disposeAndClear();
+ mpScrollClipWindow.disposeAndClear();
}
-
-
-
-
-
-
-
DeckTitleBar* Deck::GetTitleBar (void) const
{
return mpTitleBar.get();
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 4bbc478..fbb76e4 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -82,7 +82,6 @@ Panel::~Panel()
void Panel::dispose()
{
Dispose();
- mpTitleBar.disposeAndClear();
vcl::Window::dispose();
}
@@ -103,24 +102,14 @@ void Panel::Dispose (void)
xComponent->dispose();
}
- mpTitleBar.reset();
+ mpTitleBar.disposeAndClear();
}
-
-
-
PanelTitleBar* Panel::GetTitleBar (void) const
{
return mpTitleBar.get();
}
-
-
-
-
-
-
-
void Panel::SetUIElement (const Reference<ui::XUIElement>& rxElement)
{
mxElement = rxElement;
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 0f9c0ab..e198c5b 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -118,8 +118,7 @@ SidebarController::SidebarController (
mxReadOnlyModeDispatch(),
mbIsDocumentReadOnly(false),
mpSplitWindow(NULL),
- mnWidthOnSplitterButtonDown(0),
- mpCloseIndicator()
+ mnWidthOnSplitterButtonDown(0)
{
// Listen for context change events.
css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
@@ -174,6 +173,8 @@ SidebarController* SidebarController::GetSidebarControllerForFrame (
void SAL_CALL SidebarController::disposing (void)
{
+ mpCloseIndicator.disposeAndClear();
+
SidebarControllerContainer::iterator iEntry (maSidebarControllerContainer.find(mxFrame));
if (iEntry != maSidebarControllerContainer.end())
maSidebarControllerContainer.erase(iEntry);
@@ -205,10 +206,10 @@ void SAL_CALL SidebarController::disposing (void)
{
mpCurrentDeck->Dispose();
mpCurrentDeck->PrintWindowTree();
- mpCurrentDeck.reset();
+ mpCurrentDeck.disposeAndClear();
}
- mpTabBar.reset();
+ mpTabBar.disposeAndClear();
Theme::GetPropertySet()->removePropertyChangeListener(
OUString(""),
@@ -529,7 +530,7 @@ void SidebarController::SwitchToDeck (
if (mpCurrentDeck)
{
mpCurrentDeck->Dispose();
- mpCurrentDeck.reset();
+ mpCurrentDeck.disposeAndClear();
}
msCurrentDeckId = rDeckDescriptor.msId;
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 4415fca..708c104 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -77,7 +77,6 @@ TabBar::~TabBar()
void TabBar::dispose()
{
maItems.clear();
- mpMenuButton.reset();
mpMenuButton.disposeAndClear();
vcl::Window::dispose();
}
@@ -116,7 +115,7 @@ void TabBar::SetDecks (
iItem!=iEnd;
++iItem)
{
- iItem->mpButton.reset();
+ iItem->mpButton.disposeAndClear();
}
maItems.clear();
}
@@ -138,7 +137,8 @@ void TabBar::SetDecks (
Item& rItem (maItems[nIndex++]);
rItem.msDeckId = pDescriptor->msId;
- rItem.mpButton.reset(CreateTabItem(*pDescriptor));
+ rItem.mpButton.disposeAndClear();
+ rItem.mpButton = CreateTabItem(*pDescriptor);
rItem.mpButton->SetClickHdl(LINK(&rItem, TabBar::Item, HandleClick));
rItem.maDeckActivationFunctor = maDeckActivationFunctor;
rItem.mbIsHiddenByDefault = false;
More information about the Libreoffice-commits
mailing list