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
d5d96b15
Kaydet (Commit)
d5d96b15
authored
Agu 25, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#60740: Export multi-line formula results to ods without UNO API.
Change-Id: I69391a9d2ffb0afae7f40c8449196c986375db3f
üst
a8bf7099
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
3 deletions
+45
-3
formulacell.hxx
sc/inc/formulacell.hxx
+1
-0
formulacell.cxx
sc/source/core/data/formulacell.cxx
+5
-0
xmlexprt.cxx
sc/source/filter/xml/xmlexprt.cxx
+37
-3
xmlexprt.hxx
sc/source/filter/xml/xmlexprt.hxx
+2
-0
No files found.
sc/inc/formulacell.hxx
Dosyayı görüntüle @
d5d96b15
...
...
@@ -310,6 +310,7 @@ public:
void
SetResultToken
(
const
formula
::
FormulaToken
*
pToken
);
double
GetResultDouble
()
const
;
OUString
GetResultString
()
const
;
void
SetErrCode
(
sal_uInt16
n
);
bool
IsHyperLinkCell
()
const
;
...
...
sc/source/core/data/formulacell.cxx
Dosyayı görüntüle @
d5d96b15
...
...
@@ -1705,6 +1705,11 @@ double ScFormulaCell::GetResultDouble() const
return
aResult
.
GetDouble
();
}
OUString
ScFormulaCell
::
GetResultString
()
const
{
return
aResult
.
GetString
();
}
void
ScFormulaCell
::
SetResultMatrix
(
SCCOL
nCols
,
SCROW
nRows
,
const
ScConstMatrixRef
&
pMat
,
formula
::
FormulaToken
*
pUL
)
{
aResult
.
SetMatrix
(
nCols
,
nRows
,
pMat
,
pUL
);
...
...
sc/source/filter/xml/xmlexprt.cxx
Dosyayı görüntüle @
d5d96b15
...
...
@@ -3352,9 +3352,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
else
if
(
aCell
.
nType
==
table
::
CellContentType_FORMULA
&&
IsMultiLineFormulaCell
(
aCell
))
{
bEditCell
=
true
;
uno
::
Reference
<
text
::
XText
>
xText
(
xCurrentTableCellRange
->
getCellByPosition
(
aCell
.
aCellAddress
.
Column
,
aCell
.
aCellAddress
.
Row
),
uno
::
UNO_QUERY
);
if
(
xText
.
is
())
GetTextParagraphExport
()
->
exportText
(
xText
,
false
,
false
);
WriteMultiLineFormulaResult
(
aCell
.
maBaseCell
.
mpFormula
);
}
else
{
...
...
@@ -3404,6 +3402,42 @@ void ScXMLExport::WriteEditCell(const EditTextObject* pText)
flushParagraph
(
*
this
,
aParaTexts
[
nCurPara
],
xMapper
,
xStylePool
,
rAttrMap
,
itPara
,
itSecEnd
);
}
void
ScXMLExport
::
WriteMultiLineFormulaResult
(
const
ScFormulaCell
*
pCell
)
{
OUString
aElemName
=
GetNamespaceMap
().
GetQNameByKey
(
XML_NAMESPACE_TEXT
,
GetXMLToken
(
XML_P
));
OUString
aResStr
=
pCell
->
GetResultString
();
const
sal_Unicode
*
p
=
aResStr
.
getStr
();
const
sal_Unicode
*
pEnd
=
p
+
static_cast
<
size_t
>
(
aResStr
.
getLength
());
const
sal_Unicode
*
pPara
=
p
;
// paragraph head.
for
(;
p
!=
pEnd
;
++
p
)
{
if
(
*
p
!=
'\n'
)
continue
;
// flush the paragraph.
OUString
aContent
;
if
(
*
pPara
==
'\n'
)
++
pPara
;
if
(
p
>
pPara
)
aContent
=
OUString
(
pPara
,
p
-
pPara
);
SvXMLElementExport
aElem
(
*
this
,
aElemName
,
false
,
false
);
Characters
(
aContent
);
pPara
=
p
;
}
OUString
aContent
;
if
(
*
pPara
==
'\n'
)
++
pPara
;
if
(
pEnd
>
pPara
)
aContent
=
OUString
(
pPara
,
pEnd
-
pPara
);
SvXMLElementExport
aElem
(
*
this
,
aElemName
,
false
,
false
);
Characters
(
aContent
);
}
void
ScXMLExport
::
ExportShape
(
const
uno
::
Reference
<
drawing
::
XShape
>&
xShape
,
awt
::
Point
*
pPoint
)
{
uno
::
Reference
<
beans
::
XPropertySet
>
xShapeProps
(
xShape
,
uno
::
UNO_QUERY
);
...
...
sc/source/filter/xml/xmlexprt.hxx
Dosyayı görüntüle @
d5d96b15
...
...
@@ -61,6 +61,7 @@ class ScXMLCachedRowAttrAccess;
class
ScRangeName
;
class
ScXMLEditAttributeMap
;
class
EditTextObject
;
class
ScFormulaCell
;
typedef
std
::
vector
<
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
>
ScMyXShapesVec
;
...
...
@@ -180,6 +181,7 @@ class ScXMLExport : public SvXMLExport
void
WriteTable
(
sal_Int32
nTable
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sheet
::
XSpreadsheet
>&
xTable
);
void
WriteCell
(
ScMyCell
&
aCell
,
sal_Int32
nEqualCellCount
);
void
WriteEditCell
(
const
EditTextObject
*
pText
);
void
WriteMultiLineFormulaResult
(
const
ScFormulaCell
*
pCell
);
void
WriteAreaLink
(
const
ScMyCell
&
rMyCell
);
void
WriteAnnotation
(
ScMyCell
&
rMyCell
);
void
WriteDetective
(
const
ScMyCell
&
rMyCell
);
...
...
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