summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-24 14:54:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-24 14:54:51 +0200
commit9703cc63cea3c47d13afe5f9b0eb22c631000958 (patch)
tree65456e93a12de0f7f7303f7de7f72f683142b5e0 /basctl
parentb39a778b5efa73936893a91b3223bb350bae1fb2 (diff)
Remove o3tl/heap_ptr.hxx, use std::unique_ptr instead
Change-Id: Iac70c9be13892a36bfb5975f62e5345b88d4f144
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastype2.cxx20
-rw-r--r--basctl/source/basicide/bastype2.hxx8
-rw-r--r--basctl/source/basicide/moduldl2.cxx4
-rw-r--r--basctl/source/basicide/moduldlg.cxx8
4 files changed, 25 insertions, 15 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 4c9f52abc237..42f7b0d9deb1 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -41,6 +41,8 @@
#include <sfx2/dispatch.hxx>
#include <cassert>
+#include <memory>
+
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -246,7 +248,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
Image aImage;
GetRootEntryBitmaps( rDocument, aImage );
- o3tl::heap_ptr<Entry> e(new DocumentEntry(rDocument, eLocation));
+ std::unique_ptr<Entry> e(new DocumentEntry(rDocument, eLocation));
AddEntry(
aRootName,
aImage,
@@ -309,7 +311,7 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
}
else
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY));
AddEntry(
aLibName,
Image( IDEResId( nId ) ),
@@ -345,7 +347,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
pModuleEntry = AddEntry(
aModName,
Image( IDEResId( RID_IMG_MODULE ) ),
@@ -365,7 +367,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
{
- o3tl::heap_ptr<Entry> e(
+ std::unique_ptr<Entry> e(
new Entry(OBJ_TYPE_METHOD));
pEntry = AddEntry(
aName,
@@ -404,7 +406,7 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pDialogEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG));
pDialogEntry = AddEntry(
aDlgName,
Image( IDEResId( RID_IMG_DIALOG ) ),
@@ -443,7 +445,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
}
else
{
- o3tl::heap_ptr<Entry> e(new Entry(eType));
+ std::unique_ptr<Entry> e(new Entry(eType));
AddEntry(
aEntryName,
Image( IDEResId( RID_IMG_MODLIB ) ),
@@ -505,7 +507,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
pModuleEntry = AddEntry(
aEntryName,
Image( IDEResId( RID_IMG_MODULE ) ),
@@ -525,7 +527,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_METHOD));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_METHOD));
pEntry = AddEntry(
aName,
Image( IDEResId( RID_IMG_MACRO ) ),
@@ -740,7 +742,7 @@ SvTreeListEntry* TreeListBox::AddEntry(
const Image& rImage,
SvTreeListEntry* pParent,
bool bChildrenOnDemand,
- o3tl::heap_ptr<Entry> * aUserData
+ std::unique_ptr<Entry> * aUserData
)
{
assert(aUserData != 0);
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 0eac7b8875a9..b9913cf74d39 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -19,9 +19,11 @@
#ifndef INCLUDED_BASCTL_SOURCE_BASICIDE_BASTYPE2_HXX
#define INCLUDED_BASCTL_SOURCE_BASICIDE_BASTYPE2_HXX
-#include "doceventnotifier.hxx"
+#include <sal/config.h>
+
+#include <memory>
-#include <o3tl/heap_ptr.hxx>
+#include "doceventnotifier.hxx"
#include <svtools/treelistbox.hxx>
#include <svl/lstner.hxx>
@@ -232,7 +234,7 @@ public:
SvTreeListEntry* AddEntry(
const OUString& rText, const Image& rImage,
SvTreeListEntry* pParent, bool bChildrenOnDemand,
- o3tl::heap_ptr<Entry> * aUserData
+ std::unique_ptr<Entry> * aUserData
);
void RemoveEntry (SvTreeListEntry*);
void RemoveEntry (ScriptDocument const&);
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index a889ca2d7adb..04281824073a 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -64,6 +64,8 @@
#include <com/sun/star/script/ModuleSizeExceededRequest.hpp>
#include <cassert>
+#include <memory>
+
#include <boost/scoped_ptr.hpp>
namespace basctl
@@ -1508,7 +1510,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
sal_uInt16 nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES );
sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB;
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY));
SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry(
aLibName,
Image( IDEResId( nId ) ),
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 7f6359212a51..9269d47739fb 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <memory>
+
#include "baside2.hrc"
#include "basidesh.hrc"
@@ -843,7 +847,7 @@ void ObjectPage::NewDialog()
SvTreeListEntry* pEntry = m_pBasicBox->FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG));
pEntry = m_pBasicBox->AddEntry(
aDlgName,
Image( IDEResId( RID_IMG_DIALOG ) ),
@@ -999,7 +1003,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
SvTreeListEntry* pEntry = rBasicBox.FindEntry( pSubRootEntry, aModName, OBJ_TYPE_MODULE );
if ( !pEntry )
{
- o3tl::heap_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
+ std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE));
pEntry = rBasicBox.AddEntry(
aModName,
Image( IDEResId( RID_IMG_MODULE ) ),