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
024a0753
Kaydet (Commit)
024a0753
authored
Kas 12, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I2c43a1dd3bee277dfd79f1806233b4d27d6b5cac
üst
526f2f86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
xiname.cxx
sc/source/filter/excel/xiname.cxx
+9
-8
xiname.hxx
sc/source/filter/inc/xiname.hxx
+2
-2
No files found.
sc/source/filter/excel/xiname.cxx
Dosyayı görüntüle @
024a0753
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "excimp8.hxx"
#include "excimp8.hxx"
#include "scextopt.hxx"
#include "scextopt.hxx"
#include "document.hxx"
#include "document.hxx"
#include <o3tl/make_unique.hxx>
// *** Implementation ***
// *** Implementation ***
...
@@ -276,7 +277,7 @@ void XclImpNameManager::ReadName( XclImpStream& rStrm )
...
@@ -276,7 +277,7 @@ void XclImpNameManager::ReadName( XclImpStream& rStrm )
{
{
sal_uLong
nCount
=
maNameList
.
size
();
sal_uLong
nCount
=
maNameList
.
size
();
if
(
nCount
<
0xFFFF
)
if
(
nCount
<
0xFFFF
)
maNameList
.
push_back
(
new
XclImpName
(
rStrm
,
static_cast
<
sal_uInt16
>
(
nCount
+
1
)
)
);
maNameList
.
push_back
(
o3tl
::
make_unique
<
XclImpName
>
(
rStrm
,
static_cast
<
sal_uInt16
>
(
nCount
+
1
)
)
);
}
}
const
XclImpName
*
XclImpNameManager
::
FindName
(
const
OUString
&
rXclName
,
SCTAB
nScTab
)
const
const
XclImpName
*
XclImpNameManager
::
FindName
(
const
OUString
&
rXclName
,
SCTAB
nScTab
)
const
...
@@ -285,12 +286,12 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n
...
@@ -285,12 +286,12 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n
const
XclImpName
*
pLocalName
=
nullptr
;
// a found local name
const
XclImpName
*
pLocalName
=
nullptr
;
// a found local name
for
(
XclImpNameList
::
const_iterator
itName
=
maNameList
.
begin
();
itName
!=
maNameList
.
end
()
&&
!
pLocalName
;
++
itName
)
for
(
XclImpNameList
::
const_iterator
itName
=
maNameList
.
begin
();
itName
!=
maNameList
.
end
()
&&
!
pLocalName
;
++
itName
)
{
{
if
(
itName
->
GetXclName
()
==
rXclName
)
if
(
(
*
itName
)
->
GetXclName
()
==
rXclName
)
{
{
if
(
itName
->
GetScTab
()
==
nScTab
)
if
(
(
*
itName
)
->
GetScTab
()
==
nScTab
)
pLocalName
=
&
(
*
itName
);
pLocalName
=
itName
->
get
(
);
else
if
(
itName
->
IsGlobal
()
)
else
if
(
(
*
itName
)
->
IsGlobal
()
)
pGlobalName
=
&
(
*
itName
);
pGlobalName
=
itName
->
get
(
);
}
}
}
}
return
pLocalName
?
pLocalName
:
pGlobalName
;
return
pLocalName
?
pLocalName
:
pGlobalName
;
...
@@ -299,14 +300,14 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n
...
@@ -299,14 +300,14 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n
const
XclImpName
*
XclImpNameManager
::
GetName
(
sal_uInt16
nXclNameIdx
)
const
const
XclImpName
*
XclImpNameManager
::
GetName
(
sal_uInt16
nXclNameIdx
)
const
{
{
OSL_ENSURE
(
nXclNameIdx
>
0
,
"XclImpNameManager::GetName - index must be >0"
);
OSL_ENSURE
(
nXclNameIdx
>
0
,
"XclImpNameManager::GetName - index must be >0"
);
return
(
nXclNameIdx
<=
0
||
nXclNameIdx
>
maNameList
.
size
()
)
?
nullptr
:
&
(
maNameList
.
at
(
nXclNameIdx
-
1
)
);
return
(
nXclNameIdx
<=
0
||
nXclNameIdx
>
maNameList
.
size
()
)
?
nullptr
:
maNameList
.
at
(
nXclNameIdx
-
1
).
get
(
);
}
}
void
XclImpNameManager
::
ConvertAllTokens
()
void
XclImpNameManager
::
ConvertAllTokens
()
{
{
XclImpNameList
::
iterator
it
=
maNameList
.
begin
(),
itEnd
=
maNameList
.
end
();
XclImpNameList
::
iterator
it
=
maNameList
.
begin
(),
itEnd
=
maNameList
.
end
();
for
(;
it
!=
itEnd
;
++
it
)
for
(;
it
!=
itEnd
;
++
it
)
it
->
ConvertTokens
();
(
*
it
)
->
ConvertTokens
();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/filter/inc/xiname.hxx
Dosyayı görüntüle @
024a0753
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_XINAME_HXX
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_XINAME_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_XINAME_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_XINAME_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include "xlname.hxx"
#include "xlname.hxx"
#include "xiroot.hxx"
#include "xiroot.hxx"
#include "xistream.hxx"
#include "xistream.hxx"
...
@@ -29,6 +28,7 @@
...
@@ -29,6 +28,7 @@
#include <boost/noncopyable.hpp>
#include <boost/noncopyable.hpp>
#include <memory>
#include <memory>
#include <vector>
class
ScRangeData
;
class
ScRangeData
;
class
ScTokenArray
;
class
ScTokenArray
;
...
@@ -102,7 +102,7 @@ public:
...
@@ -102,7 +102,7 @@ public:
void
ConvertAllTokens
();
void
ConvertAllTokens
();
private
:
private
:
typedef
boost
::
ptr_vector
<
XclImpName
>
XclImpNameList
;
typedef
std
::
vector
<
std
::
unique_ptr
<
XclImpName
>
>
XclImpNameList
;
XclImpNameList
maNameList
;
XclImpNameList
maNameList
;
};
};
...
...
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