[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 3 commits - canvas/source sfx2/source svtools/source vcl/source
Michael Meeks
michael.meeks at collabora.com
Tue Apr 14 06:05:29 PDT 2015
canvas/source/directx/dx_devicehelper.hxx | 4 ++--
sfx2/source/dialog/templdlg.cxx | 9 +++++++--
sfx2/source/sidebar/SidebarController.cxx | 1 -
svtools/source/brwbox/brwbox1.cxx | 12 +++++++-----
vcl/source/window/toolbox2.cxx | 3 +++
5 files changed, 19 insertions(+), 10 deletions(-)
New commits:
commit bd5c762e0702ad341bf3a87bb29c0218ffd957ab
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Apr 14 14:11:02 2015 +0100
More missing lifecycle pieces.
Change-Id: I45ea68d75b03389a1ac0cdb74486c3701c1730a8
diff --git a/canvas/source/directx/dx_devicehelper.hxx b/canvas/source/directx/dx_devicehelper.hxx
index 08669ba..da6091f 100644
--- a/canvas/source/directx/dx_devicehelper.hxx
+++ b/canvas/source/directx/dx_devicehelper.hxx
@@ -28,7 +28,7 @@
#include "dx_bitmap.hxx"
#include <canvas/rendering/isurfaceproxymanager.hxx>
-
+#include <vcl/outdev.hxx>
#include <boost/utility.hpp>
class OutputDevice;
@@ -105,7 +105,7 @@ namespace dxcanvas
*/
com::sun::star::rendering::XGraphicDevice* mpDevice;
HDC mnHDC;
- VclPtr<OutputDevice> mpOutDev;
+ VclPtr<OutputDevice> mpOutDev;
};
typedef ::rtl::Reference< com::sun::star::rendering::XGraphicDevice > DeviceRef;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 7cbc5be..b5cd56c 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -769,6 +769,8 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
delete pIdle;
if ( m_pDeletionWatcher )
m_pDeletionWatcher->signal();
+ aFmtLb.disposeAndClear();
+ aFilterLb.disposeAndClear();
}
namespace SfxTemplate
@@ -2064,8 +2066,8 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
: SfxCommonTemplateDialog_Impl( pB, pDlgWindow, true ),
m_pFloat ( pDlgWindow ),
m_bZoomIn ( false ),
- m_aActionTbL ( new DropToolBox_Impl(pDlgWindow, this) ),
- m_aActionTbR ( new ToolBox(pDlgWindow, SfxResId( TB_ACTION )) )
+ m_aActionTbL ( VclPtrInstance<DropToolBox_Impl>(pDlgWindow, this) ),
+ m_aActionTbR ( VclPtrInstance<ToolBox> (pDlgWindow, SfxResId( TB_ACTION ) ) )
{
pDlgWindow->FreeResource();
Initialize();
@@ -2160,6 +2162,9 @@ void SfxCommonTemplateDialog_Impl::InvalidateBindings()
SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl()
{
+ m_pFloat.clear();
+ m_aActionTbL.disposeAndClear();
+ m_aActionTbR.disposeAndClear();
}
void SfxTemplateDialog_Impl::LoadedFamilies()
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index b23d356..7153322 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -66,7 +66,7 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
pDataWin = 0;
pVScroll = 0;
- pDataWin = new BrowserDataWin( this );
+ pDataWin = VclPtr<BrowserDataWin>::Create( this ).get();
pCols = new BrowserColumns;
m_pImpl.reset( new ::svt::BrowseBoxImpl() );
@@ -117,7 +117,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode )
:Control( pParent, nBits | WB_3DLOOK )
,DragSourceHelper( this )
,DropTargetHelper( this )
- ,aHScroll( new ScrollBar(this, WinBits( WB_HSCROLL )) )
+ ,aHScroll( VclPtr<ScrollBar>::Create(this, WinBits( WB_HSCROLL )) )
{
ConstructImpl( nMode );
}
@@ -153,7 +153,7 @@ void BrowseBox::dispose()
Hide();
getDataWindow()->pHeaderBar.disposeAndClear();
getDataWindow()->pCornerWin.disposeAndClear();
- pDataWin.clear();
+ pDataWin.disposeAndClear();
pVScroll.disposeAndClear();
aHScroll.disposeAndClear();
@@ -2282,10 +2282,12 @@ void BrowseBox::SetMode( BrowserMode nMode )
WinBits nVScrollWinBits =
WB_VSCROLL | ( ( nMode & BROWSER_THUMBDRAGGING ) ? WB_DRAG : 0 );
- pVScroll = ( nMode & BROWSER_TRACKING_TIPS ) == BROWSER_TRACKING_TIPS
+ pVScroll = VclPtr<ScrollBar>(
+ ( nMode & BROWSER_TRACKING_TIPS ) == BROWSER_TRACKING_TIPS
? new BrowserScrollBar( this, nVScrollWinBits,
static_cast<BrowserDataWin*>( pDataWin.get() ) )
- : new ScrollBar( this, nVScrollWinBits );
+ : new ScrollBar( this, nVScrollWinBits ),
+ SAL_NO_ACQUIRE);
pVScroll->SetLineSize( 1 );
pVScroll->SetPageSize(1);
pVScroll->SetScrollHdl( LINK( this, BrowseBox, ScrollHdl ) );
commit ae5f75ab0515f8ee63813ec9284fbfb2124f0a5d
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Apr 14 13:42:45 2015 +0100
Allow a common op. on a disposed toolbox.
Change-Id: I4da1f4daaf94456bc951b1d7a96cb28cb7fba0e9
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 3b1ad8f..8394aae 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -937,6 +937,9 @@ sal_uInt16 ToolBox::GetItemId( const Point& rPos ) const
sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const
{
+ if (!mpData)
+ return TOOLBOX_ITEM_NOTFOUND;
+
for (std::vector<ImplToolItem>::const_iterator it = mpData->m_aItems.begin(); it != mpData->m_aItems.end(); ++it)
{
if (it->maCommandStr == rCommand)
commit 0a778c5ecba6a5a2149d1c0956725021f54d917f
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Apr 14 13:42:23 2015 +0100
Remove debugging snafu.
Change-Id: I5259b6dd930d6eda26211ed620d8d896a154cb78
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index d1acaaa..35cf2a9 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -641,7 +641,6 @@ void SidebarController::SwitchToDeck (
mpCurrentDeck->GetPanelParentWindow(),
rPanelContexDescriptor.mbIsInitiallyVisible,
rContext);
- aNewPanels[nWriteIndex].disposeAndClear();
bHasPanelSetChanged = true;
}
if (aNewPanels[nWriteIndex] != nullptr)
More information about the Libreoffice-commits
mailing list