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
372cfda4
Kaydet (Commit)
372cfda4
authored
Mar 10, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Store only one number format per field.
üst
3a30ced6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
dpcache.hxx
sc/inc/dpcache.hxx
+1
-1
dpcache.cxx
sc/source/core/data/dpcache.cxx
+6
-12
No files found.
sc/inc/dpcache.hxx
Dosyayı görüntüle @
372cfda4
...
...
@@ -100,7 +100,7 @@ public:
*/
mutable
IndexArrayType
maIndexOrder
;
s
td
::
vector
<
sal_uLong
>
maNumFormats
;
s
al_uLong
mnNumFormat
;
Field
();
};
...
...
sc/source/core/data/dpcache.cxx
Dosyayı görüntüle @
372cfda4
...
...
@@ -226,7 +226,7 @@ bool ScDPCache::operator== ( const ScDPCache& r ) const
return
true
;
}
ScDPCache
::
Field
::
Field
()
{}
ScDPCache
::
Field
::
Field
()
:
mnNumFormat
(
0
)
{}
ScDPCache
::
ScDPCache
(
ScDocument
*
pDoc
)
:
mpDoc
(
pDoc
),
...
...
@@ -637,7 +637,6 @@ bool ScDPCache::AddData(long nDim, const ScDPItemData& rData, sal_uLong nNumForm
rField
.
maGlobalOrder
.
begin
()
+
nIndex
,
rField
.
maItems
.
size
()
-
1
);
OSL_ENSURE
(
rField
.
maGlobalOrder
[
nIndex
]
==
sal
::
static_int_cast
<
SCROW
>
(
rField
.
maItems
.
size
())
-
1
,
"ScDPTableDataCache::AddData "
);
rField
.
maData
.
push_back
(
rField
.
maItems
.
size
()
-
1
);
rField
.
maNumFormats
.
push_back
(
nNumFormat
);
}
else
rField
.
maData
.
push_back
(
rField
.
maGlobalOrder
[
nIndex
]);
...
...
@@ -645,7 +644,10 @@ bool ScDPCache::AddData(long nDim, const ScDPItemData& rData, sal_uLong nNumForm
size_t
nCurRow
=
maFields
[
nDim
].
maData
.
size
()
-
1
;
if
(
!
rData
.
IsEmpty
())
{
maEmptyRows
.
insert_back
(
nCurRow
,
nCurRow
+
1
,
false
);
rField
.
mnNumFormat
=
nNumFormat
;
}
return
true
;
}
...
...
@@ -813,13 +815,9 @@ sal_uLong ScDPCache::GetNumberFormat( long nDim ) const
if
(
nDim
>=
mnColumnCount
)
return
0
;
const
std
::
vector
<
sal_uLong
>&
rNumFormats
=
maFields
[
nDim
].
maNumFormats
;
if
(
rNumFormats
.
empty
())
return
0
;
// TODO: Find a way to determine the dominant number format in presence of
// multiple number formats in the same field.
return
*
rNumFormats
.
begin
()
;
return
maFields
[
nDim
].
mnNumFormat
;
}
bool
ScDPCache
::
IsDateDimension
(
long
nDim
)
const
...
...
@@ -831,11 +829,7 @@ bool ScDPCache::IsDateDimension( long nDim ) const
if
(
!
pFormatter
)
return
false
;
const
std
::
vector
<
sal_uLong
>&
rNumFormats
=
maFields
[
nDim
].
maNumFormats
;
if
(
rNumFormats
.
empty
())
return
false
;
short
eType
=
pFormatter
->
GetType
(
rNumFormats
[
0
]);
short
eType
=
pFormatter
->
GetType
(
maFields
[
nDim
].
mnNumFormat
);
return
(
eType
==
NUMBERFORMAT_DATE
)
||
(
eType
==
NUMBERFORMAT_DATETIME
);
}
...
...
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