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
cc5ac726
Kaydet (Commit)
cc5ac726
authored
Tem 26, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix exporting of array formulas to xls.
Change-Id: I366f5ef21353d64561d82b025c7919a1dbdb3422
üst
e2472623
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
xetable.cxx
sc/source/filter/excel/xetable.cxx
+16
-15
xetable.hxx
sc/source/filter/inc/xetable.hxx
+1
-1
No files found.
sc/source/filter/excel/xetable.cxx
Dosyayı görüntüle @
cc5ac726
...
...
@@ -148,23 +148,24 @@ XclExpArrayRef XclExpArrayBuffer::CreateArray( const ScTokenArray& rScTokArr, co
return
rxRec
;
}
XclExpArrayRef
XclExpArrayBuffer
::
FindArray
(
const
ScTokenArray
&
rScTokArr
)
const
XclExpArrayRef
XclExpArrayBuffer
::
FindArray
(
const
ScTokenArray
&
rScTokArr
,
const
ScAddress
&
rBasePos
)
const
{
XclExpArrayRef
xRec
;
// try to extract a matrix reference token
if
(
rScTokArr
.
GetLen
()
==
1
)
{
const
formula
::
FormulaToken
*
pToken
=
rScTokArr
.
GetArray
()[
0
];
if
(
pToken
&&
(
pToken
->
GetOpCode
()
==
ocMatRef
)
)
{
const
ScSingleRefData
&
rRef
=
static_cast
<
const
ScToken
*>
(
pToken
)
->
GetSingleRef
();
ScAddress
aBasePos
(
rRef
.
nCol
,
rRef
.
nRow
,
GetCurrScTab
()
);
XclExpArrayMap
::
const_iterator
aIt
=
maRecMap
.
find
(
aBasePos
);
if
(
aIt
!=
maRecMap
.
end
()
)
xRec
=
aIt
->
second
;
}
}
return
xRec
;
if
(
rScTokArr
.
GetLen
()
!=
1
)
// Must consist of a single reference token.
return
xRec
;
const
formula
::
FormulaToken
*
pToken
=
rScTokArr
.
GetArray
()[
0
];
if
(
!
pToken
||
pToken
->
GetOpCode
()
!=
ocMatRef
)
// not a matrix reference token.
return
xRec
;
const
ScSingleRefData
&
rRef
=
static_cast
<
const
ScToken
*>
(
pToken
)
->
GetSingleRef
();
ScAddress
aAbsPos
=
rRef
.
toAbs
(
rBasePos
);
XclExpArrayMap
::
const_iterator
it
=
maRecMap
.
find
(
aAbsPos
);
return
(
it
==
maRecMap
.
end
())
?
xRec
:
xRec
=
it
->
second
;
}
// Shared formulas ============================================================
...
...
@@ -840,7 +841,7 @@ XclExpFormulaCell::XclExpFormulaCell(
case
MM_REFERENCE
:
{
// other formula cell covered by a matrix - find the ARRAY record
mxAddRec
=
rArrayBfr
.
FindArray
(
rScTokArr
);
mxAddRec
=
rArrayBfr
.
FindArray
(
rScTokArr
,
aScPos
);
// should always be found, if Calc document is not broken
OSL_ENSURE
(
mxAddRec
,
"XclExpFormulaCell::XclExpFormulaCell - no matrix found"
);
}
...
...
sc/source/filter/inc/xetable.hxx
Dosyayı görüntüle @
cc5ac726
...
...
@@ -135,7 +135,7 @@ public:
/** Inserts a new ARRAY record into the buffer and returns it. */
XclExpArrayRef
CreateArray
(
const
ScTokenArray
&
rScTokArr
,
const
ScRange
&
rScRange
);
/** Tries to find an ARRAY record that corresponds to an ocMatRef token. */
XclExpArrayRef
FindArray
(
const
ScTokenArray
&
rScTokArr
)
const
;
XclExpArrayRef
FindArray
(
const
ScTokenArray
&
rScTokArr
,
const
ScAddress
&
rBasePos
)
const
;
private
:
typedef
::
std
::
map
<
ScAddress
,
XclExpArrayRef
>
XclExpArrayMap
;
...
...
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