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
7086ed59
Kaydet (Commit)
7086ed59
authored
Ara 09, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I800f8d4facaa6dc8eb04b2544ce0e9035af66442
üst
14a0115b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
callform.hxx
sc/inc/callform.hxx
+5
-3
funcdesc.cxx
sc/source/core/data/funcdesc.cxx
+1
-1
callform.cxx
sc/source/core/tool/callform.cxx
+16
-8
No files found.
sc/inc/callform.hxx
Dosyayı görüntüle @
7086ed59
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <boost/ptr_container/ptr_map.hpp>
#include <memory>
#include <map>
#define MAXFUNCPARAM 16
#define MAXFUNCPARAM 16
#define MAXARRSIZE 0xfffe
#define MAXARRSIZE 0xfffe
...
@@ -86,8 +87,9 @@ public:
...
@@ -86,8 +87,9 @@ public:
class
LegacyFuncCollection
class
LegacyFuncCollection
{
{
typedef
boost
::
ptr_map
<
OUString
,
LegacyFuncData
>
MapType
;
typedef
std
::
map
<
OUString
,
std
::
unique_ptr
<
LegacyFuncData
>>
MapType
;
MapType
maData
;
MapType
m_Data
;
public
:
public
:
typedef
MapType
::
const_iterator
const_iterator
;
typedef
MapType
::
const_iterator
const_iterator
;
...
...
sc/source/core/data/funcdesc.cxx
Dosyayı görüntüle @
7086ed59
...
@@ -451,7 +451,7 @@ ScFunctionList::ScFunctionList() :
...
@@ -451,7 +451,7 @@ ScFunctionList::ScFunctionList() :
LegacyFuncCollection
::
const_iterator
it
=
rLegacyFuncColl
.
begin
(),
itEnd
=
rLegacyFuncColl
.
end
();
LegacyFuncCollection
::
const_iterator
it
=
rLegacyFuncColl
.
begin
(),
itEnd
=
rLegacyFuncColl
.
end
();
for
(;
it
!=
itEnd
;
++
it
)
for
(;
it
!=
itEnd
;
++
it
)
{
{
const
LegacyFuncData
*
pLegacyFuncData
=
it
->
second
;
const
LegacyFuncData
*
const
pLegacyFuncData
=
it
->
second
.
get
()
;
pDesc
=
new
ScFuncDesc
;
pDesc
=
new
ScFuncDesc
;
sal_uInt16
nArgs
=
pLegacyFuncData
->
GetParamCount
()
-
1
;
sal_uInt16
nArgs
=
pLegacyFuncData
->
GetParamCount
()
-
1
;
pLegacyFuncData
->
getParamDesc
(
aArgName
,
aArgDesc
,
0
);
pLegacyFuncData
->
getParamDesc
(
aArgName
,
aArgDesc
,
0
);
...
...
sc/source/core/tool/callform.cxx
Dosyayı görüntüle @
7086ed59
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include <osl/module.hxx>
#include <osl/module.hxx>
#include <osl/file.hxx>
#include <osl/file.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <boost/ptr_container/ptr_map.hpp>
#include <memory>
#include <memory>
#include "callform.hxx"
#include "callform.hxx"
...
@@ -398,34 +400,40 @@ bool LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16
...
@@ -398,34 +400,40 @@ bool LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16
}
}
LegacyFuncCollection
::
LegacyFuncCollection
()
{}
LegacyFuncCollection
::
LegacyFuncCollection
()
{}
LegacyFuncCollection
::
LegacyFuncCollection
(
const
LegacyFuncCollection
&
r
)
:
maData
(
r
.
maData
)
{}
LegacyFuncCollection
::
LegacyFuncCollection
(
const
LegacyFuncCollection
&
r
)
{
for
(
auto
const
&
it
:
r
.
m_Data
)
{
m_Data
.
insert
(
std
::
make_pair
(
it
.
first
,
o3tl
::
make_unique
<
LegacyFuncData
>
(
*
it
.
second
)));
}
}
const
LegacyFuncData
*
LegacyFuncCollection
::
findByName
(
const
OUString
&
rName
)
const
const
LegacyFuncData
*
LegacyFuncCollection
::
findByName
(
const
OUString
&
rName
)
const
{
{
MapType
::
const_iterator
it
=
m
a
Data
.
find
(
rName
);
MapType
::
const_iterator
it
=
m
_
Data
.
find
(
rName
);
return
it
==
m
aData
.
end
()
?
nullptr
:
it
->
second
;
return
it
==
m
_Data
.
end
()
?
nullptr
:
it
->
second
.
get
()
;
}
}
LegacyFuncData
*
LegacyFuncCollection
::
findByName
(
const
OUString
&
rName
)
LegacyFuncData
*
LegacyFuncCollection
::
findByName
(
const
OUString
&
rName
)
{
{
MapType
::
iterator
it
=
m
a
Data
.
find
(
rName
);
MapType
::
iterator
it
=
m
_
Data
.
find
(
rName
);
return
it
==
m
aData
.
end
()
?
nullptr
:
it
->
second
;
return
it
==
m
_Data
.
end
()
?
nullptr
:
it
->
second
.
get
()
;
}
}
void
LegacyFuncCollection
::
insert
(
LegacyFuncData
*
pNew
)
void
LegacyFuncCollection
::
insert
(
LegacyFuncData
*
pNew
)
{
{
OUString
aName
=
pNew
->
GetInternalName
();
OUString
aName
=
pNew
->
GetInternalName
();
m
aData
.
insert
(
aName
,
pNew
);
m
_Data
.
insert
(
std
::
make_pair
(
aName
,
std
::
unique_ptr
<
LegacyFuncData
>
(
pNew
))
);
}
}
LegacyFuncCollection
::
const_iterator
LegacyFuncCollection
::
begin
()
const
LegacyFuncCollection
::
const_iterator
LegacyFuncCollection
::
begin
()
const
{
{
return
m
a
Data
.
begin
();
return
m
_
Data
.
begin
();
}
}
LegacyFuncCollection
::
const_iterator
LegacyFuncCollection
::
end
()
const
LegacyFuncCollection
::
const_iterator
LegacyFuncCollection
::
end
()
const
{
{
return
m
a
Data
.
end
();
return
m
_
Data
.
end
();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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