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
003ba905
Kaydet (Commit)
003ba905
authored
Kas 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: I0cc3addefa436050259785ccf2ce540a84e9fcae
üst
e61465d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
xmlimprt.cxx
sc/source/filter/xml/xmlimprt.cxx
+7
-8
xmlimprt.hxx
sc/source/filter/xml/xmlimprt.hxx
+5
-4
No files found.
sc/source/filter/xml/xmlimprt.cxx
Dosyayı görüntüle @
003ba905
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include <sal/config.h>
#include <sal/config.h>
#include <o3tl/ptr_container.hxx>
#include <svl/zforlist.hxx>
#include <svl/zforlist.hxx>
#include <sal/macros.h>
#include <sal/macros.h>
...
@@ -2398,12 +2397,13 @@ bool ScXMLImport::GetValidation(const OUString& sName, ScMyImportValidation& aVa
...
@@ -2398,12 +2397,13 @@ bool ScXMLImport::GetValidation(const OUString& sName, ScMyImportValidation& aVa
void
ScXMLImport
::
AddNamedExpression
(
SCTAB
nTab
,
ScMyNamedExpression
*
pNamedExp
)
void
ScXMLImport
::
AddNamedExpression
(
SCTAB
nTab
,
ScMyNamedExpression
*
pNamedExp
)
{
{
::
std
::
unique_ptr
<
ScMyNamedExpression
>
p
(
pNamedExp
);
::
std
::
unique_ptr
<
ScMyNamedExpression
>
p
(
pNamedExp
);
SheetNamedExpMap
::
iterator
itr
=
m
a
SheetNamedExpressions
.
find
(
nTab
);
SheetNamedExpMap
::
iterator
itr
=
m
_
SheetNamedExpressions
.
find
(
nTab
);
if
(
itr
==
m
a
SheetNamedExpressions
.
end
())
if
(
itr
==
m
_
SheetNamedExpressions
.
end
())
{
{
// No chain exists for this sheet. Create one.
// No chain exists for this sheet. Create one.
::
std
::
unique_ptr
<
ScMyNamedExpressions
>
pNew
(
new
ScMyNamedExpressions
);
::
std
::
unique_ptr
<
ScMyNamedExpressions
>
pNew
(
new
ScMyNamedExpressions
);
::
std
::
pair
<
SheetNamedExpMap
::
iterator
,
bool
>
r
=
o3tl
::
ptr_container
::
insert
(
maSheetNamedExpressions
,
nTab
,
std
::
move
(
pNew
));
::
std
::
pair
<
SheetNamedExpMap
::
iterator
,
bool
>
r
=
m_SheetNamedExpressions
.
insert
(
std
::
make_pair
(
nTab
,
std
::
move
(
pNew
)));
if
(
!
r
.
second
)
if
(
!
r
.
second
)
// insertion failed.
// insertion failed.
return
;
return
;
...
@@ -3157,15 +3157,14 @@ void ScXMLImport::SetSheetNamedRanges()
...
@@ -3157,15 +3157,14 @@ void ScXMLImport::SetSheetNamedRanges()
if
(
!
pDoc
)
if
(
!
pDoc
)
return
;
return
;
SheetNamedExpMap
::
const_iterator
itr
=
maSheetNamedExpressions
.
begin
(),
itrEnd
=
maSheetNamedExpressions
.
end
();
for
(
auto
const
&
itr
:
m_SheetNamedExpressions
)
for
(;
itr
!=
itrEnd
;
++
itr
)
{
{
SCTAB
nTab
=
itr
->
first
;
const
SCTAB
nTab
=
itr
.
first
;
ScRangeName
*
pRangeNames
=
pDoc
->
GetRangeName
(
nTab
);
ScRangeName
*
pRangeNames
=
pDoc
->
GetRangeName
(
nTab
);
if
(
!
pRangeNames
)
if
(
!
pRangeNames
)
continue
;
continue
;
const
ScMyNamedExpressions
&
rNames
=
*
itr
->
second
;
const
ScMyNamedExpressions
&
rNames
=
*
itr
.
second
;
::
std
::
for_each
(
rNames
.
begin
(),
rNames
.
end
(),
RangeNameInserter
(
pDoc
,
*
pRangeNames
,
*
this
));
::
std
::
for_each
(
rNames
.
begin
(),
rNames
.
end
(),
RangeNameInserter
(
pDoc
,
*
pRangeNames
,
*
this
));
}
}
}
}
...
...
sc/source/filter/xml/xmlimprt.hxx
Dosyayı görüntüle @
003ba905
...
@@ -42,12 +42,13 @@
...
@@ -42,12 +42,13 @@
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
#include <boost/noncopyable.hpp>
#include <memory>
#include <memory>
#include <unordered_map>
#include <unordered_map>
#include <map>
#include <vector>
#include <vector>
#include <list>
#include <list>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/noncopyable.hpp>
class
ScMyStyleNumberFormats
;
class
ScMyStyleNumberFormats
;
class
XMLNumberFormatAttributesExportHelper
;
class
XMLNumberFormatAttributesExportHelper
;
...
@@ -823,7 +824,7 @@ class ScXMLEditAttributeMap;
...
@@ -823,7 +824,7 @@ class ScXMLEditAttributeMap;
class
ScXMLImport
:
public
SvXMLImport
,
boost
::
noncopyable
class
ScXMLImport
:
public
SvXMLImport
,
boost
::
noncopyable
{
{
typedef
std
::
unordered_map
<
OUString
,
sal_Int16
,
OUStringHash
>
CellTypeMap
;
typedef
std
::
unordered_map
<
OUString
,
sal_Int16
,
OUStringHash
>
CellTypeMap
;
typedef
::
boost
::
ptr_map
<
SCTAB
,
ScMyNamedExpressions
>
SheetNamedExpMap
;
typedef
::
std
::
map
<
SCTAB
,
std
::
unique_ptr
<
ScMyNamedExpressions
>
>
SheetNamedExpMap
;
CellTypeMap
aCellTypeMap
;
CellTypeMap
aCellTypeMap
;
...
@@ -939,7 +940,7 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable
...
@@ -939,7 +940,7 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable
ScMyTables
aTables
;
ScMyTables
aTables
;
ScMyNamedExpressions
*
m_pMyNamedExpressions
;
ScMyNamedExpressions
*
m_pMyNamedExpressions
;
SheetNamedExpMap
m
a
SheetNamedExpressions
;
SheetNamedExpMap
m
_
SheetNamedExpressions
;
ScMyLabelRanges
*
pMyLabelRanges
;
ScMyLabelRanges
*
pMyLabelRanges
;
ScMyImportValidations
*
pValidations
;
ScMyImportValidations
*
pValidations
;
...
...
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