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
811d6ff5
Kaydet (Commit)
811d6ff5
authored
Kas 23, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Apply pimpl to SvKeyValueIterator, to hide ptr_vector from the header.
Change-Id: I16c25d28066fbc8d6357bf89b047763b67bc85bb
üst
96811dbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
36 deletions
+24
-36
svparser.hxx
include/svtools/svparser.hxx
+5
-10
svparser.cxx
svtools/source/svrtf/svparser.cxx
+19
-26
No files found.
include/svtools/svparser.hxx
Dosyayı görüntüle @
811d6ff5
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
#include <tools/ref.hxx>
#include <tools/ref.hxx>
#include <rtl/textenc.h>
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/noncopyable.hpp>
#include <boost/utility.hpp>
#include <vector>
#include <vector>
struct
SvParser_Impl
;
struct
SvParser_Impl
;
...
@@ -248,21 +247,17 @@ public:
...
@@ -248,21 +247,17 @@ public:
*
*
*======================================================================*/
*======================================================================*/
typedef
boost
::
ptr_vector
<
SvKeyValue
>
SvKeyValueList_Impl
;
class
SVT_DLLPUBLIC
SvKeyValueIterator
:
public
SvRefBase
,
class
SVT_DLLPUBLIC
SvKeyValueIterator
:
public
SvRefBase
,
private
boost
::
noncopyable
private
boost
::
noncopyable
{
{
/** Representation.
struct
Impl
;
*/
Impl
*
mpImpl
;
SvKeyValueList_Impl
*
m_pList
;
sal_uInt16
m_nPos
;
public
:
public
:
/** Construction/Destruction.
/** Construction/Destruction.
*/
*/
SvKeyValueIterator
(
void
);
SvKeyValueIterator
(
);
virtual
~
SvKeyValueIterator
(
void
);
virtual
~
SvKeyValueIterator
(
);
/** Operation.
/** Operation.
*/
*/
...
...
svtools/source/svrtf/svparser.cxx
Dosyayı görüntüle @
811d6ff5
...
@@ -17,13 +17,15 @@
...
@@ -17,13 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <stdio.h>
#include <svtools/svparser.hxx>
#include <svtools/svparser.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#include <rtl/textcvt.h>
#include <rtl/textcvt.h>
#include <rtl/tencinfo.h>
#include <rtl/tencinfo.h>
#include <stdio.h>
#include <boost/ptr_container/ptr_vector.hpp>
// structure to store the actuel data
// structure to store the actuel data
struct
SvParser_Impl
struct
SvParser_Impl
{
{
...
@@ -649,40 +651,34 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
...
@@ -649,40 +651,34 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
*
*
*======================================================================*/
*======================================================================*/
/*
typedef
boost
::
ptr_vector
<
SvKeyValue
>
SvKeyValueList_Impl
;
* SvKeyValueIterator.
*/
struct
SvKeyValueIterator
::
Impl
SvKeyValueIterator
::
SvKeyValueIterator
(
void
)
:
m_pList
(
new
SvKeyValueList_Impl
),
m_nPos
(
0
)
{
{
}
SvKeyValueList_Impl
maList
;
sal_uInt16
mnPos
;
/*
Impl
()
:
mnPos
(
0
)
{}
* ~SvKeyValueIterator.
};
*/
SvKeyValueIterator
::~
SvKeyValueIterator
(
void
)
SvKeyValueIterator
::
SvKeyValueIterator
()
:
mpImpl
(
new
Impl
)
{}
SvKeyValueIterator
::~
SvKeyValueIterator
()
{
{
delete
m
_pList
;
delete
m
pImpl
;
}
}
/*
* GetFirst.
*/
bool
SvKeyValueIterator
::
GetFirst
(
SvKeyValue
&
rKeyVal
)
bool
SvKeyValueIterator
::
GetFirst
(
SvKeyValue
&
rKeyVal
)
{
{
m
_nPos
=
m_pList
->
size
();
m
pImpl
->
mnPos
=
mpImpl
->
maList
.
size
();
return
GetNext
(
rKeyVal
);
return
GetNext
(
rKeyVal
);
}
}
/*
* GetNext.
*/
bool
SvKeyValueIterator
::
GetNext
(
SvKeyValue
&
rKeyVal
)
bool
SvKeyValueIterator
::
GetNext
(
SvKeyValue
&
rKeyVal
)
{
{
if
(
m
_
nPos
>
0
)
if
(
m
pImpl
->
m
nPos
>
0
)
{
{
rKeyVal
=
(
*
m_pList
)[
--
m_
nPos
];
rKeyVal
=
mpImpl
->
maList
[
--
mpImpl
->
m
nPos
];
return
true
;
return
true
;
}
}
else
else
...
@@ -692,12 +688,9 @@ bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
...
@@ -692,12 +688,9 @@ bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
}
}
}
}
/*
* Append.
*/
void
SvKeyValueIterator
::
Append
(
const
SvKeyValue
&
rKeyVal
)
void
SvKeyValueIterator
::
Append
(
const
SvKeyValue
&
rKeyVal
)
{
{
m
_pList
->
push_back
(
new
SvKeyValue
(
rKeyVal
));
m
pImpl
->
maList
.
push_back
(
new
SvKeyValue
(
rKeyVal
));
}
}
/* 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