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
88895416
Kaydet (Commit)
88895416
authored
Nis 14, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Nis 18, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL to boost::ptr_vector
üst
9013644f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
xmlnumfe.cxx
xmloff/source/style/xmlnumfe.cxx
+10
-14
No files found.
xmloff/source/style/xmlnumfe.cxx
Dosyayı görüntüle @
88895416
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmlexp.hxx>
#include <set>
#include <set>
#include <boost/ptr_container/ptr_vector.hpp>
using
::
rtl
::
OUString
;
using
::
rtl
::
OUString
;
using
::
rtl
::
OUStringBuffer
;
using
::
rtl
::
OUStringBuffer
;
...
@@ -114,12 +115,7 @@ struct SvXMLEmbeddedTextEntry
...
@@ -114,12 +115,7 @@ struct SvXMLEmbeddedTextEntry
nSourcePos
(
nSP
),
nFormatPos
(
nFP
),
aText
(
rT
)
{}
nSourcePos
(
nSP
),
nFormatPos
(
nFP
),
aText
(
rT
)
{}
};
};
typedef
SvXMLEmbeddedTextEntry
*
SvXMLEmbeddedTextEntryPtr
;
class
SvXMLEmbeddedTextEntryArr
:
public
boost
::
ptr_vector
<
SvXMLEmbeddedTextEntry
>
{};
SV_DECL_PTRARR_DEL
(
SvXMLEmbeddedTextEntryArr
,
SvXMLEmbeddedTextEntryPtr
,
4
)
//-------------------------------------------------------------------------
SV_IMPL_PTRARR
(
SvXMLEmbeddedTextEntryArr
,
SvXMLEmbeddedTextEntryPtr
);
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -614,10 +610,10 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
...
@@ -614,10 +610,10 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
// number:embedded-text as child elements
// number:embedded-text as child elements
sal_uInt16
nEntryCount
=
rEmbeddedEntries
.
Count
();
sal_uInt16
nEntryCount
=
rEmbeddedEntries
.
size
();
for
(
sal_uInt16
nEntry
=
0
;
nEntry
<
nEntryCount
;
nEntry
++
)
for
(
sal_uInt16
nEntry
=
0
;
nEntry
<
nEntryCount
;
nEntry
++
)
{
{
SvXMLEmbeddedTextEntry
*
pObj
=
rEmbeddedEntries
[
nEntry
];
const
SvXMLEmbeddedTextEntry
*
pObj
=
&
rEmbeddedEntries
[
nEntry
];
// position attribute
// position attribute
rExport
.
AddAttribute
(
XML_NAMESPACE_NUMBER
,
XML_POSITION
,
rExport
.
AddAttribute
(
XML_NAMESPACE_NUMBER
,
XML_POSITION
,
...
@@ -627,12 +623,12 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
...
@@ -627,12 +623,12 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
// text as element content
// text as element content
rtl
::
OUString
aContent
(
pObj
->
aText
);
rtl
::
OUString
aContent
(
pObj
->
aText
);
while
(
nEntry
+
1
<
nEntryCount
&&
rEmbeddedEntries
[
nEntry
+
1
]
->
nFormatPos
==
pObj
->
nFormatPos
)
while
(
nEntry
+
1
<
nEntryCount
&&
rEmbeddedEntries
[
nEntry
+
1
]
.
nFormatPos
==
pObj
->
nFormatPos
)
{
{
// The array can contain several elements for the same position in the number
// The array can contain several elements for the same position in the number
// (for example, literal text and space from underscores). They must be merged
// (for example, literal text and space from underscores). They must be merged
// into a single embedded-text element.
// into a single embedded-text element.
aContent
+=
rEmbeddedEntries
[
nEntry
+
1
]
->
aText
;
aContent
+=
rEmbeddedEntries
[
nEntry
+
1
]
.
aText
;
++
nEntry
;
++
nEntry
;
}
}
rExport
.
Characters
(
aContent
);
rExport
.
Characters
(
aContent
);
...
@@ -861,9 +857,9 @@ OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLa
...
@@ -861,9 +857,9 @@ OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLa
sal_Bool
lcl_IsInEmbedded
(
const
SvXMLEmbeddedTextEntryArr
&
rEmbeddedEntries
,
sal_uInt16
nPos
)
sal_Bool
lcl_IsInEmbedded
(
const
SvXMLEmbeddedTextEntryArr
&
rEmbeddedEntries
,
sal_uInt16
nPos
)
{
{
sal_uInt16
nCount
=
rEmbeddedEntries
.
Count
();
sal_uInt16
nCount
=
rEmbeddedEntries
.
size
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
if
(
rEmbeddedEntries
[
i
]
->
nSourcePos
==
nPos
)
if
(
rEmbeddedEntries
[
i
]
.
nSourcePos
==
nPos
)
return
sal_True
;
return
sal_True
;
return
sal_False
;
// not found
return
sal_False
;
// not found
...
@@ -1133,7 +1129,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
...
@@ -1133,7 +1129,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// format elements
// format elements
//
//
SvXMLEmbeddedTextEntryArr
aEmbeddedEntries
(
0
)
;
SvXMLEmbeddedTextEntryArr
aEmbeddedEntries
;
if
(
eBuiltIn
==
NF_NUMBER_STANDARD
)
if
(
eBuiltIn
==
NF_NUMBER_STANDARD
)
{
{
// default number format contains just one number element
// default number format contains just one number element
...
@@ -1259,7 +1255,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
...
@@ -1259,7 +1255,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
sal_Int32
nEmbedPos
=
nIntegerSymbols
-
nDigitsPassed
;
sal_Int32
nEmbedPos
=
nIntegerSymbols
-
nDigitsPassed
;
SvXMLEmbeddedTextEntry
*
pObj
=
new
SvXMLEmbeddedTextEntry
(
nPos
,
nEmbedPos
,
aEmbeddedStr
);
SvXMLEmbeddedTextEntry
*
pObj
=
new
SvXMLEmbeddedTextEntry
(
nPos
,
nEmbedPos
,
aEmbeddedStr
);
aEmbeddedEntries
.
Insert
(
pObj
,
aEmbeddedEntries
.
Count
()
);
aEmbeddedEntries
.
push_back
(
pObj
);
}
}
break
;
break
;
}
}
...
...
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