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
d4f1b520
Kaydet (Commit)
d4f1b520
authored
Eyl 30, 2011
tarafından
Maciej Rumianowski
Kaydeden (comit)
David Tardon
Eki 04, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of SvNums
SvNums is a define for SvUShort and SvULong, both are replaced with std::vector
üst
ff76d292
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
itemset.cxx
svl/source/items/itemset.cxx
+0
-7
nranges.cxx
svl/source/items/nranges.cxx
+9
-6
No files found.
svl/source/items/itemset.cxx
Dosyayı görüntüle @
d4f1b520
...
@@ -32,10 +32,7 @@
...
@@ -32,10 +32,7 @@
#include <string.h>
#include <string.h>
#include <cstdarg>
#include <cstdarg>
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
#include <svl/itemset.hxx>
#include <svl/itemset.hxx>
#include <svl/itempool.hxx>
#include <svl/itempool.hxx>
#include <svl/itemiter.hxx>
#include <svl/itemiter.hxx>
...
@@ -58,19 +55,15 @@ DBG_NAME(SfxItemSet)
...
@@ -58,19 +55,15 @@ DBG_NAME(SfxItemSet)
//========================================================================
//========================================================================
#define NUMTYPE sal_uInt16
#define NUMTYPE sal_uInt16
#define SvNums SvUShorts
#define SfxNumRanges SfxUShortRanges
#define SfxNumRanges SfxUShortRanges
#include "nranges.cxx"
#include "nranges.cxx"
#undef NUMTYPE
#undef NUMTYPE
#undef SvNums
#undef SfxNumRanges
#undef SfxNumRanges
#define NUMTYPE sal_uLong
#define NUMTYPE sal_uLong
#define SvNums SvULongs
#define SfxNumRanges SfxULongRanges
#define SfxNumRanges SfxULongRanges
#include "nranges.cxx"
#include "nranges.cxx"
#undef NUMTYPE
#undef NUMTYPE
#undef SvNums
#undef SfxNumRanges
#undef SfxNumRanges
//========================================================================
//========================================================================
...
...
svl/source/items/nranges.cxx
Dosyayı görüntüle @
d4f1b520
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
#include "precompiled_svl.hxx"
#include <vector>
// compiled via include from itemset.cxx only!
// compiled via include from itemset.cxx only!
//========================================================================
//========================================================================
...
@@ -75,18 +76,20 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
...
@@ -75,18 +76,20 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
{
{
NUMTYPE
nSize
=
0
,
nIns
=
0
;
NUMTYPE
nSize
=
0
,
nIns
=
0
;
sal_uInt16
nCnt
=
0
;
sal_uInt16
nCnt
=
0
;
SvNums
aNumArr
(
11
,
8
)
;
std
::
vector
<
NUMTYPE
>
aNumArr
;
aNumArr
.
Insert
(
nWh1
,
nCnt
++
);
aNumArr
.
push_back
(
nWh1
);
aNumArr
.
Insert
(
nWh2
,
nCnt
++
);
aNumArr
.
push_back
(
nWh2
);
DBG_ASSERT
(
nWh1
<=
nWh2
,
"Ungueltiger Bereich"
);
DBG_ASSERT
(
nWh1
<=
nWh2
,
"Ungueltiger Bereich"
);
nSize
+=
nWh2
-
nWh1
+
1
;
nSize
+=
nWh2
-
nWh1
+
1
;
aNumArr
.
Insert
(
nNull
,
nCnt
++
);
aNumArr
.
push_back
(
nNull
);
nCnt
=
aNumArr
.
size
();
while
(
0
!=
while
(
0
!=
(
nIns
=
(
nIns
=
sal
::
static_int_cast
<
NUMTYPE
>
(
sal
::
static_int_cast
<
NUMTYPE
>
(
va_arg
(
pArgs
,
NUMTYPE_ARG
)
)
)
)
va_arg
(
pArgs
,
NUMTYPE_ARG
)
)
)
)
{
{
aNumArr
.
Insert
(
nIns
,
nCnt
++
);
aNumArr
.
push_back
(
nIns
);
++
nCnt
;
if
(
0
==
(
nCnt
&
1
)
)
// 4,6,8, usw.
if
(
0
==
(
nCnt
&
1
)
)
// 4,6,8, usw.
{
{
DBG_ASSERT
(
aNumArr
[
nCnt
-
2
]
<=
nIns
,
"Ungueltiger Bereich"
);
DBG_ASSERT
(
aNumArr
[
nCnt
-
2
]
<=
nIns
,
"Ungueltiger Bereich"
);
...
@@ -98,7 +101,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
...
@@ -98,7 +101,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
// so, jetzt sind alle Bereiche vorhanden und
// so, jetzt sind alle Bereiche vorhanden und
rpRanges
=
new
NUMTYPE
[
nCnt
+
1
];
rpRanges
=
new
NUMTYPE
[
nCnt
+
1
];
memcpy
(
rpRanges
,
aNumArr
.
GetData
(),
sizeof
(
NUMTYPE
)
*
nCnt
);
std
::
copy
(
aNumArr
.
begin
(),
aNumArr
.
begin
()
+
nCnt
,
rpRanges
);
*
(
rpRanges
+
nCnt
)
=
0
;
*
(
rpRanges
+
nCnt
)
=
0
;
return
nSize
;
return
nSize
;
...
...
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