Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bf28399d
Kaydet (Commit)
bf28399d
authored
Şub 07, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
auto_ptr -> heap_ptr
Change-Id: I401505ee15f71e8655570233b953951aa22ad668
üst
aef614d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
69 deletions
+32
-69
bastype2.cxx
basctl/source/basicide/bastype2.cxx
+22
-47
bastype2.hxx
basctl/source/basicide/bastype2.hxx
+2
-2
moduldl2.cxx
basctl/source/basicide/moduldl2.cxx
+4
-10
moduldlg.cxx
basctl/source/basicide/moduldlg.cxx
+4
-10
No files found.
basctl/source/basicide/bastype2.cxx
Dosyayı görüntüle @
bf28399d
...
@@ -17,9 +17,6 @@
...
@@ -17,9 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <memory>
#include <vcl/bitmap.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/builder.hxx>
#include <vcl/builder.hxx>
...
@@ -43,6 +40,7 @@
...
@@ -43,6 +40,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/dispatch.hxx>
#include <cassert>
#include <map>
#include <map>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
...
@@ -249,14 +247,11 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
...
@@ -249,14 +247,11 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
OUString
aRootName
(
GetRootEntryName
(
rDocument
,
eLocation
)
);
OUString
aRootName
(
GetRootEntryName
(
rDocument
,
eLocation
)
);
Image
aImage
;
Image
aImage
;
GetRootEntryBitmaps
(
rDocument
,
aImage
);
GetRootEntryBitmaps
(
rDocument
,
aImage
);
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
DocumentEntry
(
rDocument
,
eLocation
));
AddEntry
(
AddEntry
(
aRootName
,
aRootName
,
aImage
,
aImage
,
0
,
true
,
0
,
true
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
DocumentEntry
(
rDocument
,
eLocation
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
SetUpdateMode
(
true
);
SetUpdateMode
(
true
);
...
@@ -315,14 +310,11 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
...
@@ -315,14 +310,11 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons
}
}
else
else
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_LIBRARY
));
AddEntry
(
AddEntry
(
aLibName
,
aLibName
,
Image
(
IDEResId
(
nId
)
),
Image
(
IDEResId
(
nId
)
),
pDocumentRootEntry
,
true
,
pDocumentRootEntry
,
true
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_LIBRARY
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
}
}
}
}
...
@@ -354,14 +346,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
...
@@ -354,14 +346,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry
*
pModuleEntry
=
FindEntry
(
pLibRootEntry
,
aModName
,
OBJ_TYPE_MODULE
);
SvTreeListEntry
*
pModuleEntry
=
FindEntry
(
pLibRootEntry
,
aModName
,
OBJ_TYPE_MODULE
);
if
(
!
pModuleEntry
)
if
(
!
pModuleEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_MODULE
));
pModuleEntry
=
AddEntry
(
pModuleEntry
=
AddEntry
(
aModName
,
aModName
,
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
pLibRootEntry
,
false
,
pLibRootEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_MODULE
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
// methods
// methods
...
@@ -377,14 +366,12 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
...
@@ -377,14 +366,12 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry
*
pEntry
=
FindEntry
(
pModuleEntry
,
aName
,
OBJ_TYPE_METHOD
);
SvTreeListEntry
*
pEntry
=
FindEntry
(
pModuleEntry
,
aName
,
OBJ_TYPE_METHOD
);
if
(
!
pEntry
)
if
(
!
pEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_METHOD
));
pEntry
=
AddEntry
(
pEntry
=
AddEntry
(
aName
,
aName
,
Image
(
IDEResId
(
RID_IMG_MACRO
)
),
Image
(
IDEResId
(
RID_IMG_MACRO
)
),
pModuleEntry
,
false
,
pModuleEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_METHOD
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
}
}
}
}
...
@@ -418,14 +405,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
...
@@ -418,14 +405,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const
SvTreeListEntry
*
pDialogEntry
=
FindEntry
(
pLibRootEntry
,
aDlgName
,
OBJ_TYPE_DIALOG
);
SvTreeListEntry
*
pDialogEntry
=
FindEntry
(
pLibRootEntry
,
aDlgName
,
OBJ_TYPE_DIALOG
);
if
(
!
pDialogEntry
)
if
(
!
pDialogEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_DIALOG
));
pDialogEntry
=
AddEntry
(
pDialogEntry
=
AddEntry
(
aDlgName
,
aDlgName
,
Image
(
IDEResId
(
RID_IMG_DIALOG
)
),
Image
(
IDEResId
(
RID_IMG_DIALOG
)
),
pLibRootEntry
,
false
,
pLibRootEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_DIALOG
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
}
}
}
}
...
@@ -460,14 +444,11 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
...
@@ -460,14 +444,11 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr
}
}
else
else
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
eType
));
AddEntry
(
AddEntry
(
aEntryName
,
aEntryName
,
Image
(
IDEResId
(
RID_IMG_MODLIB
)
),
Image
(
IDEResId
(
RID_IMG_MODLIB
)
),
pLibRootEntry
,
true
,
pLibRootEntry
,
true
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
eType
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
}
}
}
}
...
@@ -525,14 +506,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
...
@@ -525,14 +506,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
SvTreeListEntry
*
pModuleEntry
=
FindEntry
(
pLibSubRootEntry
,
aEntryName
,
OBJ_TYPE_MODULE
);
SvTreeListEntry
*
pModuleEntry
=
FindEntry
(
pLibSubRootEntry
,
aEntryName
,
OBJ_TYPE_MODULE
);
if
(
!
pModuleEntry
)
if
(
!
pModuleEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_MODULE
));
pModuleEntry
=
AddEntry
(
pModuleEntry
=
AddEntry
(
aEntryName
,
aEntryName
,
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
pLibSubRootEntry
,
false
,
pLibSubRootEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_MODULE
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
// methods
// methods
...
@@ -548,14 +526,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
...
@@ -548,14 +526,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo
SvTreeListEntry
*
pEntry
=
FindEntry
(
pModuleEntry
,
aName
,
OBJ_TYPE_METHOD
);
SvTreeListEntry
*
pEntry
=
FindEntry
(
pModuleEntry
,
aName
,
OBJ_TYPE_METHOD
);
if
(
!
pEntry
)
if
(
!
pEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_METHOD
));
pEntry
=
AddEntry
(
pEntry
=
AddEntry
(
aName
,
aName
,
Image
(
IDEResId
(
RID_IMG_MACRO
)
),
Image
(
IDEResId
(
RID_IMG_MACRO
)
),
pModuleEntry
,
false
,
pModuleEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_METHOD
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
}
}
}
}
...
@@ -761,22 +736,22 @@ bool TreeListBox::IsEntryProtected( SvTreeListEntry* pEntry )
...
@@ -761,22 +736,22 @@ bool TreeListBox::IsEntryProtected( SvTreeListEntry* pEntry )
return
bProtected
;
return
bProtected
;
}
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
SvTreeListEntry
*
TreeListBox
::
AddEntry
(
SvTreeListEntry
*
TreeListBox
::
AddEntry
(
OUString
const
&
rText
,
OUString
const
&
rText
,
const
Image
&
rImage
,
const
Image
&
rImage
,
SvTreeListEntry
*
pParent
,
SvTreeListEntry
*
pParent
,
bool
bChildrenOnDemand
,
bool
bChildrenOnDemand
,
std
::
auto_ptr
<
Entry
>
aUserData
o3tl
::
heap_ptr
<
Entry
>
*
aUserData
)
)
{
{
assert
(
aUserData
!=
0
);
SvTreeListEntry
*
p
=
InsertEntry
(
SvTreeListEntry
*
p
=
InsertEntry
(
rText
,
rImage
,
rImage
,
pParent
,
bChildrenOnDemand
,
LIST_APPEND
,
rText
,
rImage
,
rImage
,
pParent
,
bChildrenOnDemand
,
LIST_APPEND
,
aUserData
.
release
()
// XXX possible leak
aUserData
->
get
()
);
);
aUserData
->
release
();
return
p
;
return
p
;
}
}
SAL_WNODEPRECATED_DECLARATIONS_POP
void
TreeListBox
::
SetEntryBitmaps
(
SvTreeListEntry
*
pEntry
,
const
Image
&
rImage
)
void
TreeListBox
::
SetEntryBitmaps
(
SvTreeListEntry
*
pEntry
,
const
Image
&
rImage
)
{
{
...
...
basctl/source/basicide/bastype2.hxx
Dosyayı görüntüle @
bf28399d
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "doceventnotifier.hxx"
#include "doceventnotifier.hxx"
#include <
memory
>
#include <
o3tl/heap_ptr.hxx
>
#include <tools/solar.h>
#include <tools/solar.h>
#include <svtools/treelistbox.hxx>
#include <svtools/treelistbox.hxx>
...
@@ -231,7 +231,7 @@ public:
...
@@ -231,7 +231,7 @@ public:
SvTreeListEntry
*
AddEntry
(
SvTreeListEntry
*
AddEntry
(
const
OUString
&
rText
,
const
Image
&
rImage
,
const
OUString
&
rText
,
const
Image
&
rImage
,
SvTreeListEntry
*
pParent
,
bool
bChildrenOnDemand
,
SvTreeListEntry
*
pParent
,
bool
bChildrenOnDemand
,
std
::
auto_ptr
<
Entry
>
aUserData
o3tl
::
heap_ptr
<
Entry
>
*
aUserData
);
);
void
RemoveEntry
(
SvTreeListEntry
*
);
void
RemoveEntry
(
SvTreeListEntry
*
);
void
RemoveEntry
(
ScriptDocument
const
&
);
void
RemoveEntry
(
ScriptDocument
const
&
);
...
...
basctl/source/basicide/moduldl2.cxx
Dosyayı görüntüle @
bf28399d
...
@@ -1597,26 +1597,20 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -1597,26 +1597,20 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
sal_uInt16
nMode
=
pBasicBox
->
GetMode
();
sal_uInt16
nMode
=
pBasicBox
->
GetMode
();
bool
bDlgMode
=
(
nMode
&
BROWSEMODE_DIALOGS
)
&&
!
(
nMode
&
BROWSEMODE_MODULES
);
bool
bDlgMode
=
(
nMode
&
BROWSEMODE_DIALOGS
)
&&
!
(
nMode
&
BROWSEMODE_MODULES
);
sal_uInt16
nId
=
bDlgMode
?
RID_IMG_DLGLIB
:
RID_IMG_MODLIB
;
sal_uInt16
nId
=
bDlgMode
?
RID_IMG_DLGLIB
:
RID_IMG_MODLIB
;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_LIBRARY
));
SvTreeListEntry
*
pNewLibEntry
=
pBasicBox
->
AddEntry
(
SvTreeListEntry
*
pNewLibEntry
=
pBasicBox
->
AddEntry
(
aLibName
,
aLibName
,
Image
(
IDEResId
(
nId
)
),
Image
(
IDEResId
(
nId
)
),
pRootEntry
,
false
,
pRootEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_LIBRARY
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
DBG_ASSERT
(
pNewLibEntry
,
"InsertEntry fehlgeschlagen!"
);
DBG_ASSERT
(
pNewLibEntry
,
"InsertEntry fehlgeschlagen!"
);
if
(
pNewLibEntry
)
if
(
pNewLibEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_MODULE
));
SvTreeListEntry
*
pEntry_
=
pBasicBox
->
AddEntry
(
SvTreeListEntry
*
pEntry_
=
pBasicBox
->
AddEntry
(
aModName
,
aModName
,
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
pNewLibEntry
,
false
,
pNewLibEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_MODULE
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
DBG_ASSERT
(
pEntry_
,
"InsertEntry fehlgeschlagen!"
);
DBG_ASSERT
(
pEntry_
,
"InsertEntry fehlgeschlagen!"
);
pBasicBox
->
SetCurEntry
(
pEntry_
);
pBasicBox
->
SetCurEntry
(
pEntry_
);
pBasicBox
->
Select
(
pBasicBox
->
GetCurEntry
()
);
// OV-Bug?!
pBasicBox
->
Select
(
pBasicBox
->
GetCurEntry
()
);
// OV-Bug?!
...
...
basctl/source/basicide/moduldlg.cxx
Dosyayı görüntüle @
bf28399d
...
@@ -855,14 +855,11 @@ void ObjectPage::NewDialog()
...
@@ -855,14 +855,11 @@ void ObjectPage::NewDialog()
SvTreeListEntry
*
pEntry
=
m_pBasicBox
->
FindEntry
(
pLibEntry
,
aDlgName
,
OBJ_TYPE_DIALOG
);
SvTreeListEntry
*
pEntry
=
m_pBasicBox
->
FindEntry
(
pLibEntry
,
aDlgName
,
OBJ_TYPE_DIALOG
);
if
(
!
pEntry
)
if
(
!
pEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_DIALOG
));
pEntry
=
m_pBasicBox
->
AddEntry
(
pEntry
=
m_pBasicBox
->
AddEntry
(
aDlgName
,
aDlgName
,
Image
(
IDEResId
(
RID_IMG_DIALOG
)
),
Image
(
IDEResId
(
RID_IMG_DIALOG
)
),
pLibEntry
,
false
,
pLibEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_DIALOG
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
DBG_ASSERT
(
pEntry
,
"InsertEntry fehlgeschlagen!"
);
DBG_ASSERT
(
pEntry
,
"InsertEntry fehlgeschlagen!"
);
}
}
m_pBasicBox
->
SetCurEntry
(
pEntry
);
m_pBasicBox
->
SetCurEntry
(
pEntry
);
...
@@ -1013,14 +1010,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
...
@@ -1013,14 +1010,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
SvTreeListEntry
*
pEntry
=
rBasicBox
.
FindEntry
(
pSubRootEntry
,
aModName
,
OBJ_TYPE_MODULE
);
SvTreeListEntry
*
pEntry
=
rBasicBox
.
FindEntry
(
pSubRootEntry
,
aModName
,
OBJ_TYPE_MODULE
);
if
(
!
pEntry
)
if
(
!
pEntry
)
{
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
o3tl
::
heap_ptr
<
Entry
>
e
(
new
Entry
(
OBJ_TYPE_MODULE
));
pEntry
=
rBasicBox
.
AddEntry
(
pEntry
=
rBasicBox
.
AddEntry
(
aModName
,
aModName
,
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
Image
(
IDEResId
(
RID_IMG_MODULE
)
),
pSubRootEntry
,
false
,
pSubRootEntry
,
false
,
&
e
);
std
::
auto_ptr
<
Entry
>
(
new
Entry
(
OBJ_TYPE_MODULE
))
);
SAL_WNODEPRECATED_DECLARATIONS_POP
DBG_ASSERT
(
pEntry
,
"InsertEntry fehlgeschlagen!"
);
DBG_ASSERT
(
pEntry
,
"InsertEntry fehlgeschlagen!"
);
}
}
rBasicBox
.
SetCurEntry
(
pEntry
);
rBasicBox
.
SetCurEntry
(
pEntry
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment