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
c91dec0d
Kaydet (Commit)
c91dec0d
authored
Eyl 24, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
comphelper: std::auto_ptr -> std::unique_ptr
Change-Id: I364d6252f470dcc6d71a191f1249e95ca1f284ce
üst
5de8a127
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
36 deletions
+27
-36
enumerablemap.cxx
comphelper/source/container/enumerablemap.cxx
+8
-7
anycompare.cxx
comphelper/source/misc/anycompare.cxx
+2
-4
MasterPropertySet.cxx
comphelper/source/property/MasterPropertySet.cxx
+5
-5
opropertybag.hxx
comphelper/source/property/opropertybag.hxx
+1
-1
eformshelper.cxx
extensions/source/propctrlr/eformshelper.cxx
+2
-6
propertyhandler.cxx
extensions/source/propctrlr/propertyhandler.cxx
+2
-4
anycompare.hxx
include/comphelper/anycompare.hxx
+1
-1
listenernotification.hxx
include/comphelper/listenernotification.hxx
+2
-4
namedvaluecollection.hxx
include/comphelper/namedvaluecollection.hxx
+1
-1
officeresourcebundle.hxx
include/comphelper/officeresourcebundle.hxx
+1
-1
propertybag.hxx
include/comphelper/propertybag.hxx
+1
-1
sortablegriddatamodel.cxx
toolkit/source/controls/grid/sortablegriddatamodel.cxx
+1
-1
No files found.
comphelper/source/container/enumerablemap.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -39,9 +39,10 @@
#include <typelib/typedescription.hxx>
#include <map>
#include <
boost/noncopyable.hpp
>
#include <
boost/shared_ptr.hpp
>
#include <
memory
>
#include <
utility
>
#include <boost/noncopyable.hpp>
namespace
comphelper
{
...
...
@@ -93,8 +94,8 @@ namespace comphelper
{
Type
m_aKeyType
;
Type
m_aValueType
;
::
std
::
auto_ptr
<
KeyedValues
>
m_pValues
;
::
boost
::
shared_ptr
<
IKeyPredicateLess
>
m_pKeyCompare
;
::
std
::
unique_ptr
<
KeyedValues
>
m_pValues
;
::
std
::
shared_ptr
<
IKeyPredicateLess
>
m_pKeyCompare
;
bool
m_bMutable
;
MapListeners
m_aModListeners
;
...
...
@@ -333,7 +334,7 @@ namespace comphelper
private
:
// since we share our mutex with the main map, we need to keep it alive as long as we live
Reference
<
XInterface
>
m_xKeepMapAlive
;
::
std
::
auto_ptr
<
MapData
>
m_pMapDataCopy
;
::
std
::
unique_ptr
<
MapData
>
m_pMapDataCopy
;
MapEnumerator
m_aEnumerator
;
};
...
...
@@ -388,14 +389,14 @@ namespace comphelper
throw
IllegalTypeException
(
"Unsupported value type."
,
*
this
);
// create the comparator for the KeyType, and throw if the type is not supported
::
std
::
auto
_ptr
<
IKeyPredicateLess
>
pComparator
(
getStandardLessPredicate
(
aKeyType
,
NULL
)
);
::
std
::
unique
_ptr
<
IKeyPredicateLess
>
pComparator
(
getStandardLessPredicate
(
aKeyType
,
NULL
)
);
if
(
!
pComparator
.
get
()
)
throw
IllegalTypeException
(
"Unsupported key type."
,
*
this
);
// init members
m_aData
.
m_aKeyType
=
aKeyType
;
m_aData
.
m_aValueType
=
aValueType
;
m_aData
.
m_pKeyCompare
=
pComparator
;
m_aData
.
m_pKeyCompare
=
std
::
move
(
pComparator
)
;
m_aData
.
m_pValues
.
reset
(
new
KeyedValues
(
*
m_aData
.
m_pKeyCompare
)
);
m_aData
.
m_bMutable
=
bMutable
;
...
...
comphelper/source/misc/anycompare.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -176,11 +176,9 @@ namespace comphelper
};
::
std
::
auto
_ptr
<
IKeyPredicateLess
>
getStandardLessPredicate
(
Type
const
&
i_type
,
Reference
<
XCollator
>
const
&
i_collator
)
::
std
::
unique
_ptr
<
IKeyPredicateLess
>
getStandardLessPredicate
(
Type
const
&
i_type
,
Reference
<
XCollator
>
const
&
i_collator
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
IKeyPredicateLess
>
pComparator
;
SAL_WNODEPRECATED_DECLARATIONS_POP
::
std
::
unique_ptr
<
IKeyPredicateLess
>
pComparator
;
switch
(
i_type
.
getTypeClass
()
)
{
case
TypeClass_CHAR
:
...
...
comphelper/source/property/MasterPropertySet.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -45,7 +45,7 @@ AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : mpGuardArray(new bo
AutoOGuardArray
::~
AutoOGuardArray
()
{
//!! release
auto
_ptr's and thus the mutexes locks
//!! release
scoped
_ptr's and thus the mutexes locks
delete
[]
mpGuardArray
;
}
...
...
@@ -216,9 +216,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
const
OUString
*
pString
=
aPropertyNames
.
getConstArray
();
PropertyDataHash
::
const_iterator
aEnd
=
mpInfo
->
maMap
.
end
(),
aIter
;
//!! have a
n auto
_ptr to an array of OGuards in order to have the
//!! have a
scoped
_ptr to an array of OGuards in order to have the
//!! allocated memory properly freed (exception safe!).
//!! Since the array itself has
auto
_ptrs as members we have to use a
//!! Since the array itself has
scoped
_ptrs as members we have to use a
//!! helper class 'AutoOGuardArray' in order to have
//!! the acquired locks properly released.
AutoOGuardArray
aOGuardArray
(
nCount
);
...
...
@@ -281,9 +281,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< O
const
OUString
*
pString
=
aPropertyNames
.
getConstArray
();
PropertyDataHash
::
const_iterator
aEnd
=
mpInfo
->
maMap
.
end
(),
aIter
;
//!! have an
auto
_ptr to an array of OGuards in order to have the
//!! have an
scoped
_ptr to an array of OGuards in order to have the
//!! allocated memory properly freed (exception safe!).
//!! Since the array itself has
auto
_ptrs as members we have to use a
//!! Since the array itself has
scoped
_ptrs as members we have to use a
//!! helper class 'AutoOGuardArray' in order to have
//!! the acquired locks properly released.
AutoOGuardArray
aOGuardArray
(
nCount
);
...
...
comphelper/source/property/opropertybag.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -77,7 +77,7 @@ namespace comphelper
{
private
:
/// our IPropertyArrayHelper implementation
::
std
::
auto
_ptr
<
::
cppu
::
OPropertyArrayHelper
>
::
std
::
unique
_ptr
<
::
cppu
::
OPropertyArrayHelper
>
m_pArrayHelper
;
::
comphelper
::
PropertyBag
m_aDynamicProperties
;
...
...
extensions/source/propctrlr/eformshelper.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -243,9 +243,7 @@ namespace pcr
{
if
(
!
_bDoListen
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pListenerIterator
=
m_aPropertyListeners
.
createIterator
();
SAL_WNODEPRECATED_DECLARATIONS_POP
::
std
::
unique_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pListenerIterator
=
m_aPropertyListeners
.
createIterator
();
while
(
pListenerIterator
->
hasMoreElements
()
)
{
PropertyEventTranslation
*
pTranslator
=
dynamic_cast
<
PropertyEventTranslation
*
>
(
pListenerIterator
->
next
()
);
...
...
@@ -279,9 +277,7 @@ namespace pcr
}
else
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pListenerIterator
=
m_aPropertyListeners
.
createIterator
();
SAL_WNODEPRECATED_DECLARATIONS_POP
::
std
::
unique_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pListenerIterator
=
m_aPropertyListeners
.
createIterator
();
while
(
pListenerIterator
->
hasMoreElements
()
)
{
Reference
<
XPropertyChangeListener
>
xListener
(
pListenerIterator
->
next
(),
UNO_QUERY
);
...
...
extensions/source/propctrlr/propertyhandler.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -78,10 +78,8 @@ namespace pcr
return
;
// remove all old property change listeners
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
removeListener
=
m_aPropertyListeners
.
createIterator
();
::
std
::
auto_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
readdListener
=
m_aPropertyListeners
.
createIterator
();
// will copy the container as needed
SAL_WNODEPRECATED_DECLARATIONS_POP
::
std
::
unique_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
removeListener
=
m_aPropertyListeners
.
createIterator
();
::
std
::
unique_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
readdListener
=
m_aPropertyListeners
.
createIterator
();
// will copy the container as needed
while
(
removeListener
->
hasMoreElements
()
)
removePropertyChangeListener
(
static_cast
<
XPropertyChangeListener
*
>
(
removeListener
->
next
()
)
);
OSL_ENSURE
(
m_aPropertyListeners
.
empty
(),
"PropertyHandler::inspect: derived classes are expected to forward the removePropertyChangeListener call to their base class (me)!"
);
...
...
include/comphelper/anycompare.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -204,7 +204,7 @@ namespace comphelper
a default implementation of IKeyPredicateLess, which is able to compare values of the given type. If no
such default implementation is known for the given type, then <NULL/> is returned.
*/
::
std
::
auto
_ptr
<
IKeyPredicateLess
>
COMPHELPER_DLLPUBLIC
::
std
::
unique
_ptr
<
IKeyPredicateLess
>
COMPHELPER_DLLPUBLIC
getStandardLessPredicate
(
::
com
::
sun
::
star
::
uno
::
Type
const
&
i_type
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
XCollator
>
const
&
i_collator
...
...
include/comphelper/listenernotification.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -84,13 +84,11 @@ namespace comphelper
/** creates an iterator for looping through all registered listeners
*/
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
createIterator
()
::
std
::
unique_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
createIterator
()
{
::
std
::
auto
_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pIterator
(
new
::
cppu
::
OInterfaceIteratorHelper
(
m_aListeners
)
);
::
std
::
unique
_ptr
<
::
cppu
::
OInterfaceIteratorHelper
>
pIterator
(
new
::
cppu
::
OInterfaceIteratorHelper
(
m_aListeners
)
);
return
pIterator
;
}
SAL_WNODEPRECATED_DECLARATIONS_POP
protected
:
OListenerContainer
(
::
osl
::
Mutex
&
_rMutex
);
...
...
include/comphelper/namedvaluecollection.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -45,7 +45,7 @@ namespace comphelper
class
COMPHELPER_DLLPUBLIC
NamedValueCollection
{
private
:
::
std
::
auto
_ptr
<
NamedValueCollection_Impl
>
m_pImpl
;
::
std
::
unique
_ptr
<
NamedValueCollection_Impl
>
m_pImpl
;
public
:
NamedValueCollection
();
...
...
include/comphelper/officeresourcebundle.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -41,7 +41,7 @@ namespace comphelper
class
COMPHELPER_DLLPUBLIC
OfficeResourceBundle
{
private
:
::
std
::
auto
_ptr
<
ResourceBundle_Impl
>
m_pImpl
;
::
std
::
unique
_ptr
<
ResourceBundle_Impl
>
m_pImpl
;
public
:
/** constructs a resource bundle with the resource bundle given as 8-bit ASCII name
...
...
include/comphelper/propertybag.hxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -42,7 +42,7 @@ namespace comphelper
class
COMPHELPER_DLLPUBLIC
PropertyBag
:
protected
OPropertyContainerHelper
{
private
:
::
std
::
auto
_ptr
<
PropertyBag_Impl
>
m_pImpl
;
::
std
::
unique
_ptr
<
PropertyBag_Impl
>
m_pImpl
;
public
:
PropertyBag
();
...
...
toolkit/source/controls/grid/sortablegriddatamodel.cxx
Dosyayı görüntüle @
c91dec0d
...
...
@@ -559,7 +559,7 @@ private:
}
// get predicate object
::
std
::
auto
_ptr
<
::
comphelper
::
IKeyPredicateLess
>
const
pPredicate
(
::
comphelper
::
getStandardLessPredicate
(
dataType
,
m_collator
)
);
::
std
::
unique
_ptr
<
::
comphelper
::
IKeyPredicateLess
>
const
pPredicate
(
::
comphelper
::
getStandardLessPredicate
(
dataType
,
m_collator
)
);
ENSURE_OR_RETURN_FALSE
(
pPredicate
.
get
(),
"SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!"
);
// then sort
...
...
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