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
884b73e9
Kaydet (Commit)
884b73e9
authored
Şub 28, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplified it a bit.
üst
daf87ab1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
dpitemdata.hxx
sc/inc/dpitemdata.hxx
+1
-1
dpitemdata.cxx
sc/source/core/data/dpitemdata.cxx
+2
-16
dptablecache.cxx
sc/source/core/data/dptablecache.cxx
+21
-2
No files found.
sc/inc/dpitemdata.hxx
Dosyayı görüntüle @
884b73e9
...
...
@@ -72,7 +72,7 @@ public:
ScDPItemData
(
sal_uLong
nNF
,
const
rtl
::
OUString
&
rS
,
double
fV
,
sal_uInt8
bF
);
ScDPItemData
(
const
rtl
::
OUString
&
rS
,
double
fV
=
0.0
,
bool
bHV
=
false
,
const
sal_uLong
nNumFormat
=
0
,
bool
bData
=
true
);
ScDPItemData
(
ScDocument
*
pDoc
,
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nDocTab
,
bool
bLabel
);
ScDPItemData
(
ScDocument
*
pDoc
,
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nDocTab
);
void
SetString
(
const
rtl
::
OUString
&
rS
);
bool
IsCaseInsEqual
(
const
ScDPItemData
&
r
)
const
;
...
...
sc/source/core/data/dpitemdata.cxx
Dosyayı görüntüle @
884b73e9
...
...
@@ -51,7 +51,7 @@ ScDPItemData::ScDPItemData(const rtl::OUString& rS, double fV, bool bHV, const s
{
}
ScDPItemData
::
ScDPItemData
(
ScDocument
*
pDoc
,
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nDocTab
,
bool
bLabel
)
:
ScDPItemData
::
ScDPItemData
(
ScDocument
*
pDoc
,
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nDocTab
)
:
mnNumFormat
(
0
),
mfValue
(
0.0
),
mbFlag
(
0
)
{
rtl
::
OUString
aDocStr
=
pDoc
->
GetString
(
nCol
,
nRow
,
nDocTab
);
...
...
@@ -78,22 +78,8 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocT
mnNumFormat
=
pDoc
->
GetNumberFormat
(
ScAddress
(
nCol
,
nRow
,
nDocTab
)
);
isDate
(
nFormat
)
?
(
mbFlag
|=
MK_DATE
)
:
(
mbFlag
&=
~
MK_DATE
);
}
else
if
(
bLabel
||
pDoc
->
HasData
(
nCol
,
nRow
,
nDocTab
))
else
if
(
pDoc
->
HasData
(
nCol
,
nRow
,
nDocTab
))
{
if
(
bLabel
&&
aDocStr
.
isEmpty
())
{
// Replace an empty label string with column name.
rtl
::
OUStringBuffer
aBuf
;
aBuf
.
append
(
ScGlobal
::
GetRscString
(
STR_COLUMN
));
aBuf
.
append
(
sal_Unicode
(
' '
));
ScAddress
aColAddr
(
nCol
,
0
,
0
);
rtl
::
OUString
aColStr
;
aColAddr
.
Format
(
aColStr
,
SCA_VALID_COL
,
NULL
);
aBuf
.
append
(
aColStr
);
aDocStr
=
aBuf
.
makeStringAndClear
();
}
SetString
(
aDocStr
);
}
}
...
...
sc/source/core/data/dptablecache.cxx
Dosyayı görüntüle @
884b73e9
...
...
@@ -276,6 +276,25 @@ private:
ScDocument
*
mpDoc
;
};
rtl
::
OUString
createLabelString
(
ScDocument
*
pDoc
,
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
)
{
rtl
::
OUString
aDocStr
=
pDoc
->
GetString
(
nCol
,
nRow
,
nTab
);
if
(
aDocStr
.
isEmpty
())
{
// Replace an empty label string with column name.
rtl
::
OUStringBuffer
aBuf
;
aBuf
.
append
(
ScGlobal
::
GetRscString
(
STR_COLUMN
));
aBuf
.
append
(
sal_Unicode
(
' '
));
ScAddress
aColAddr
(
nCol
,
0
,
0
);
rtl
::
OUString
aColStr
;
aColAddr
.
Format
(
aColStr
,
SCA_VALID_COL
,
NULL
);
aBuf
.
append
(
aColStr
);
aDocStr
=
aBuf
.
makeStringAndClear
();
}
return
aDocStr
;
}
}
bool
ScDPCache
::
InitFromDoc
(
ScDocument
*
pDoc
,
const
ScRange
&
rRange
)
...
...
@@ -316,9 +335,9 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
for
(
sal_uInt16
nCol
=
nStartCol
;
nCol
<=
nEndCol
;
++
nCol
)
{
AddLabel
(
ScDPItemData
(
pDoc
,
nCol
,
nStartRow
,
nDocTab
,
true
).
GetString
(
));
AddLabel
(
createLabelString
(
pDoc
,
nCol
,
nStartRow
,
nDocTab
));
for
(
SCROW
nRow
=
nStartRow
+
1
;
nRow
<=
nEndRow
;
++
nRow
)
AddData
(
nCol
-
nStartCol
,
new
ScDPItemData
(
pDoc
,
nCol
,
nRow
,
nDocTab
,
false
));
AddData
(
nCol
-
nStartCol
,
new
ScDPItemData
(
pDoc
,
nCol
,
nRow
,
nDocTab
));
}
return
true
;
}
...
...
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