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
e7cd7030
Kaydet (Commit)
e7cd7030
authored
Eyl 13, 2011
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make it possible to est formula string in csv files
üst
7a60be6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
document.hxx
sc/inc/document.hxx
+1
-0
csv_handler.hxx
sc/qa/unit/helper/csv_handler.hxx
+18
-3
document.cxx
sc/source/core/data/document.cxx
+8
-0
No files found.
sc/inc/document.hxx
Dosyayı görüntüle @
e7cd7030
...
@@ -787,6 +787,7 @@ public:
...
@@ -787,6 +787,7 @@ public:
SC_DLLPUBLIC
void
GetNumberFormatInfo
(
short
&
nType
,
sal_uLong
&
nIndex
,
SC_DLLPUBLIC
void
GetNumberFormatInfo
(
short
&
nType
,
sal_uLong
&
nIndex
,
const
ScAddress
&
rPos
,
const
ScBaseCell
*
pCell
)
const
;
const
ScAddress
&
rPos
,
const
ScBaseCell
*
pCell
)
const
;
void
GetFormula
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
String
&
rFormula
)
const
;
void
GetFormula
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
String
&
rFormula
)
const
;
SC_DLLPUBLIC
void
GetFormula
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
rtl
::
OUString
&
rFormula
)
const
;
SC_DLLPUBLIC
void
GetCellType
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
CellType
&
rCellType
)
const
;
SC_DLLPUBLIC
void
GetCellType
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
CellType
&
rCellType
)
const
;
SC_DLLPUBLIC
CellType
GetCellType
(
const
ScAddress
&
rPos
)
const
;
SC_DLLPUBLIC
CellType
GetCellType
(
const
ScAddress
&
rPos
)
const
;
SC_DLLPUBLIC
void
GetCell
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
ScBaseCell
*&
rpCell
)
const
;
SC_DLLPUBLIC
void
GetCell
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
ScBaseCell
*&
rpCell
)
const
;
...
...
sc/qa/unit/helper/csv_handler.hxx
Dosyayı görüntüle @
e7cd7030
...
@@ -32,11 +32,15 @@
...
@@ -32,11 +32,15 @@
class
csv_handler
class
csv_handler
{
{
public
:
public
:
csv_handler
(
ScDocument
*
pDoc
,
SCTAB
nTab
)
:
enum
StringType
{
PureString
,
FormulaString
};
csv_handler
(
ScDocument
*
pDoc
,
SCTAB
nTab
,
StringType
aType
=
PureString
)
:
mpDoc
(
pDoc
),
mpDoc
(
pDoc
),
mnCol
(
0
),
mnCol
(
0
),
mnRow
(
0
),
mnRow
(
0
),
mnTab
(
nTab
)
{}
mnTab
(
nTab
),
maStringType
(
aType
)
{}
void
begin_parse
()
void
begin_parse
()
{
{
...
@@ -70,7 +74,17 @@ public:
...
@@ -70,7 +74,17 @@ public:
if
(
*
pRemainingChars
)
if
(
*
pRemainingChars
)
{
{
rtl
::
OUString
aString
;
rtl
::
OUString
aString
;
mpDoc
->
GetString
(
mnCol
,
mnRow
,
mnTab
,
aString
);
switch
(
maStringType
)
{
case
PureString
:
mpDoc
->
GetString
(
mnCol
,
mnRow
,
mnTab
,
aString
);
break
;
case
FormulaString
:
mpDoc
->
GetFormula
(
mnCol
,
mnRow
,
mnTab
,
aString
);
break
;
default
:
break
;
}
rtl
::
OUString
aCSVString
(
p
,
n
,
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aCSVString
(
p
,
n
,
RTL_TEXTENCODING_UTF8
);
#if DEBUG_CSV_HANDLER
#if DEBUG_CSV_HANDLER
std
::
cout
<<
"String: "
<<
rtl
::
OUStringToOString
(
aString
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
std
::
cout
<<
"String: "
<<
rtl
::
OUStringToOString
(
aString
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
...
@@ -94,4 +108,5 @@ private:
...
@@ -94,4 +108,5 @@ private:
SCCOL
mnCol
;
SCCOL
mnCol
;
SCROW
mnRow
;
SCROW
mnRow
;
SCTAB
mnTab
;
SCTAB
mnTab
;
StringType
maStringType
;
};
};
sc/source/core/data/document.cxx
Dosyayı görüntüle @
e7cd7030
...
@@ -3154,6 +3154,14 @@ void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormul
...
@@ -3154,6 +3154,14 @@ void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormul
}
}
void
ScDocument
::
GetFormula
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
rtl
::
OUString
&
rFormula
)
const
{
String
aString
;
GetFormula
(
nCol
,
nRow
,
nTab
,
aString
);
rFormula
=
aString
;
}
CellType
ScDocument
::
GetCellType
(
const
ScAddress
&
rPos
)
const
CellType
ScDocument
::
GetCellType
(
const
ScAddress
&
rPos
)
const
{
{
SCTAB
nTab
=
rPos
.
Tab
();
SCTAB
nTab
=
rPos
.
Tab
();
...
...
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