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
5db48971
Kaydet (Commit)
5db48971
authored
Nis 26, 2016
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use unique_ptr
Change-Id: I047a2436ce5603a8642aa621694560aca669b2f1
üst
07a641b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
UnoNameItemTable.cxx
svx/source/unodraw/UnoNameItemTable.cxx
+5
-12
UnoNameItemTable.hxx
svx/source/unodraw/UnoNameItemTable.hxx
+2
-1
No files found.
svx/source/unodraw/UnoNameItemTable.cxx
Dosyayı görüntüle @
5db48971
...
@@ -19,6 +19,9 @@
...
@@ -19,6 +19,9 @@
#include <set>
#include <set>
#include <o3tl/make_unique.hxx>
#include <svl/itempool.hxx>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svl/itemset.hxx>
#include <svl/style.hxx>
#include <svl/style.hxx>
...
@@ -59,14 +62,6 @@ bool SvxUnoNameItemTable::isValid( const NameOrIndex* pItem ) const
...
@@ -59,14 +62,6 @@ bool SvxUnoNameItemTable::isValid( const NameOrIndex* pItem ) const
void
SvxUnoNameItemTable
::
dispose
()
void
SvxUnoNameItemTable
::
dispose
()
{
{
ItemPoolVector
::
iterator
aIter
=
maItemSetVector
.
begin
();
const
ItemPoolVector
::
iterator
aEnd
=
maItemSetVector
.
end
();
while
(
aIter
!=
aEnd
)
{
delete
(
*
aIter
++
);
}
maItemSetVector
.
clear
();
maItemSetVector
.
clear
();
}
}
...
@@ -85,13 +80,12 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::supportsService( const OUString& Service
...
@@ -85,13 +80,12 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::supportsService( const OUString& Service
void
SAL_CALL
SvxUnoNameItemTable
::
ImplInsertByName
(
const
OUString
&
aName
,
const
uno
::
Any
&
aElement
)
void
SAL_CALL
SvxUnoNameItemTable
::
ImplInsertByName
(
const
OUString
&
aName
,
const
uno
::
Any
&
aElement
)
{
{
SfxItemSet
*
pInSet
=
new
SfxItemSet
(
*
mpModelPool
,
mnWhich
,
mnWhich
);
maItemSetVector
.
push_back
(
o3tl
::
make_unique
<
SfxItemSet
>
(
*
mpModelPool
,
mnWhich
,
mnWhich
)
);
maItemSetVector
.
push_back
(
pInSet
);
std
::
unique_ptr
<
NameOrIndex
>
pNewItem
(
createItem
());
std
::
unique_ptr
<
NameOrIndex
>
pNewItem
(
createItem
());
pNewItem
->
SetName
(
aName
);
pNewItem
->
SetName
(
aName
);
pNewItem
->
PutValue
(
aElement
,
mnMemberId
);
pNewItem
->
PutValue
(
aElement
,
mnMemberId
);
pInSet
->
Put
(
*
pNewItem
,
mnWhich
);
maItemSetVector
.
back
()
->
Put
(
*
pNewItem
,
mnWhich
);
}
}
// XNameContainer
// XNameContainer
...
@@ -133,7 +127,6 @@ void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName )
...
@@ -133,7 +127,6 @@ void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName )
const
NameOrIndex
*
pItem
=
static_cast
<
const
NameOrIndex
*>
(
&
((
*
aIter
)
->
Get
(
mnWhich
)
));
const
NameOrIndex
*
pItem
=
static_cast
<
const
NameOrIndex
*>
(
&
((
*
aIter
)
->
Get
(
mnWhich
)
));
if
(
sName
.
equals
(
pItem
->
GetName
()))
if
(
sName
.
equals
(
pItem
->
GetName
()))
{
{
delete
(
*
aIter
);
maItemSetVector
.
erase
(
aIter
);
maItemSetVector
.
erase
(
aIter
);
return
;
return
;
}
}
...
...
svx/source/unodraw/UnoNameItemTable.hxx
Dosyayı görüntüle @
5db48971
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase.hxx>
#include <memory>
#include <vector>
#include <vector>
#include <svl/lstner.hxx>
#include <svl/lstner.hxx>
#include <svx/xit.hxx>
#include <svx/xit.hxx>
...
@@ -35,7 +36,7 @@ class SdrModel;
...
@@ -35,7 +36,7 @@ class SdrModel;
class
SfxItemPool
;
class
SfxItemPool
;
class
SfxItemSet
;
class
SfxItemSet
;
typedef
std
::
vector
<
SfxItemSet
*
>
ItemPoolVector
;
typedef
std
::
vector
<
std
::
unique_ptr
<
SfxItemSet
>
>
ItemPoolVector
;
class
SvxUnoNameItemTable
:
public
cppu
::
WeakImplHelper
<
css
::
container
::
XNameContainer
,
css
::
lang
::
XServiceInfo
>
,
class
SvxUnoNameItemTable
:
public
cppu
::
WeakImplHelper
<
css
::
container
::
XNameContainer
,
css
::
lang
::
XServiceInfo
>
,
public
SfxListener
public
SfxListener
{
{
...
...
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