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
ce29dbb4
Kaydet (Commit)
ce29dbb4
authored
Eyl 08, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make data member names consistent.
Change-Id: Icd949d84bb7a575b0e4adbe5c1c6f4d30e9b5213
üst
c31d3ed9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
25 deletions
+28
-25
formulabuffer.hxx
sc/source/filter/inc/formulabuffer.hxx
+9
-7
formulabuffer.cxx
sc/source/filter/oox/formulabuffer.cxx
+19
-18
No files found.
sc/source/filter/inc/formulabuffer.hxx
Dosyayı görüntüle @
ce29dbb4
...
...
@@ -86,14 +86,16 @@ class FormulaBuffer : public WorkbookHelper
typedef
::
std
::
pair
<
::
com
::
sun
::
star
::
table
::
CellAddress
,
double
>
ValueAddressPair
;
typedef
::
std
::
map
<
sal_Int32
,
std
::
vector
<
ValueAddressPair
>
>
FormulaValueMap
;
::
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
table
::
XCellRange
>
getRange
(
const
::
com
::
sun
::
star
::
table
::
CellRangeAddress
&
rRange
);
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
sheet
::
XSpreadsheet
>
mxCurrSheet
;
FormulaDataMap
cellFormulas
;
ArrayFormulaDataMap
cellArrayFormulas
;
SheetToFormulaEntryMap
sharedFormulas
;
SheetToSharedFormulaid
sharedFormulaIds
;
SheetToSharedIdToTokenIndex
tokenIndexes
;
FormulaValueMap
cellFormulaValues
;
FormulaDataMap
maCellFormulas
;
ArrayFormulaDataMap
maCellArrayFormulas
;
SheetToFormulaEntryMap
maSharedFormulas
;
SheetToSharedFormulaid
maSharedFormulaIds
;
SheetToSharedIdToTokenIndex
maTokenIndexes
;
FormulaValueMap
maCellFormulaValues
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
table
::
XCellRange
>
getRange
(
const
com
::
sun
::
star
::
table
::
CellRangeAddress
&
rRange
);
void
applyArrayFormulas
(
const
std
::
vector
<
TokenRangeAddressItem
>&
rVector
);
void
applyCellFormula
(
ScDocument
&
rDoc
,
const
ApiTokenSequence
&
rTokens
,
const
::
com
::
sun
::
star
::
table
::
CellAddress
&
rAddress
);
...
...
sc/source/filter/oox/formulabuffer.cxx
Dosyayı görüntüle @
ce29dbb4
...
...
@@ -47,12 +47,13 @@ FormulaBuffer::FormulaBuffer( const WorkbookHelper& rHelper ) : WorkbookHelper(
{
}
Reference
<
XCellRange
>
FormulaBuffer
::
getRange
(
const
CellRangeAddress
&
rRange
)
Reference
<
XCellRange
>
FormulaBuffer
::
getRange
(
const
CellRangeAddress
&
rRange
)
{
Reference
<
XCellRange
>
xRange
;
Reference
<
XCellRange
>
xRange
;
try
{
xRange
=
mxCurrSheet
->
getCellRangeByPosition
(
rRange
.
StartColumn
,
rRange
.
StartRow
,
rRange
.
EndColumn
,
rRange
.
EndRow
);
xRange
=
mxCurrSheet
->
getCellRangeByPosition
(
rRange
.
StartColumn
,
rRange
.
StartRow
,
rRange
.
EndColumn
,
rRange
.
EndRow
);
}
catch
(
Exception
&
)
{
...
...
@@ -75,20 +76,20 @@ void FormulaBuffer::finalizeImport()
applySharedFormulas
(
nTab
);
FormulaDataMap
::
iterator
cellIt
=
c
ellFormulas
.
find
(
nTab
);
if
(
cellIt
!=
c
ellFormulas
.
end
()
)
FormulaDataMap
::
iterator
cellIt
=
maC
ellFormulas
.
find
(
nTab
);
if
(
cellIt
!=
maC
ellFormulas
.
end
()
)
{
applyCellFormulas
(
cellIt
->
second
);
}
ArrayFormulaDataMap
::
iterator
itArray
=
c
ellArrayFormulas
.
find
(
nTab
);
if
(
itArray
!=
c
ellArrayFormulas
.
end
()
)
ArrayFormulaDataMap
::
iterator
itArray
=
maC
ellArrayFormulas
.
find
(
nTab
);
if
(
itArray
!=
maC
ellArrayFormulas
.
end
()
)
{
applyArrayFormulas
(
itArray
->
second
);
}
FormulaValueMap
::
iterator
itValues
=
c
ellFormulaValues
.
find
(
nTab
);
if
(
itValues
!=
c
ellFormulaValues
.
end
()
)
FormulaValueMap
::
iterator
itValues
=
maC
ellFormulaValues
.
find
(
nTab
);
if
(
itValues
!=
maC
ellFormulaValues
.
end
()
)
{
std
::
vector
<
ValueAddressPair
>
&
rVector
=
itValues
->
second
;
applyCellFormulaValues
(
rVector
);
...
...
@@ -140,13 +141,13 @@ void FormulaBuffer::applyCellFormulaValues( const std::vector< ValueAddressPair
void
FormulaBuffer
::
applySharedFormulas
(
sal_Int32
nTab
)
{
SheetToFormulaEntryMap
::
const_iterator
itShared
=
s
haredFormulas
.
find
(
nTab
);
if
(
itShared
==
s
haredFormulas
.
end
())
SheetToFormulaEntryMap
::
const_iterator
itShared
=
maS
haredFormulas
.
find
(
nTab
);
if
(
itShared
==
maS
haredFormulas
.
end
())
// There is no shared formulas for this sheet.
return
;
SheetToSharedFormulaid
::
const_iterator
itCells
=
s
haredFormulaIds
.
find
(
nTab
);
if
(
itCells
==
s
haredFormulaIds
.
end
())
SheetToSharedFormulaid
::
const_iterator
itCells
=
maS
haredFormulaIds
.
find
(
nTab
);
if
(
itCells
==
maS
haredFormulaIds
.
end
())
// There is no formula cells that use shared formulas for this sheet.
return
;
...
...
@@ -280,20 +281,20 @@ void FormulaBuffer::createSharedFormulaMapEntry(
const
table
::
CellAddress
&
rAddress
,
const
table
::
CellRangeAddress
&
rRange
,
sal_Int32
nSharedId
,
const
OUString
&
rTokens
)
{
std
::
vector
<
SharedFormulaEntry
>&
rSharedFormulas
=
s
haredFormulas
[
rAddress
.
Sheet
];
std
::
vector
<
SharedFormulaEntry
>&
rSharedFormulas
=
maS
haredFormulas
[
rAddress
.
Sheet
];
SharedFormulaEntry
aEntry
(
rAddress
,
rRange
,
rTokens
,
nSharedId
);
rSharedFormulas
.
push_back
(
aEntry
);
}
void
FormulaBuffer
::
setCellFormula
(
const
::
com
::
sun
::
star
::
table
::
CellAddress
&
rAddress
,
const
OUString
&
rTokenStr
)
{
c
ellFormulas
[
rAddress
.
Sheet
].
push_back
(
TokenAddressItem
(
rTokenStr
,
rAddress
)
);
maC
ellFormulas
[
rAddress
.
Sheet
].
push_back
(
TokenAddressItem
(
rTokenStr
,
rAddress
)
);
}
void
FormulaBuffer
::
setCellFormula
(
const
table
::
CellAddress
&
rAddress
,
sal_Int32
nSharedId
,
const
OUString
&
rCellValue
,
sal_Int32
nValueType
)
{
s
haredFormulaIds
[
rAddress
.
Sheet
].
push_back
(
maS
haredFormulaIds
[
rAddress
.
Sheet
].
push_back
(
SharedFormulaDesc
(
rAddress
,
nSharedId
,
rCellValue
,
nValueType
));
}
...
...
@@ -301,12 +302,12 @@ void FormulaBuffer::setCellArrayFormula( const ::com::sun::star::table::CellRang
{
TokenAddressItem
tokenPair
(
rTokenStr
,
rTokenAddress
);
c
ellArrayFormulas
[
rRangeAddress
.
Sheet
].
push_back
(
TokenRangeAddressItem
(
tokenPair
,
rRangeAddress
)
);
maC
ellArrayFormulas
[
rRangeAddress
.
Sheet
].
push_back
(
TokenRangeAddressItem
(
tokenPair
,
rRangeAddress
)
);
}
void
FormulaBuffer
::
setCellFormulaValue
(
const
::
com
::
sun
::
star
::
table
::
CellAddress
&
rAddress
,
double
fValue
)
{
c
ellFormulaValues
[
rAddress
.
Sheet
].
push_back
(
ValueAddressPair
(
rAddress
,
fValue
)
);
maC
ellFormulaValues
[
rAddress
.
Sheet
].
push_back
(
ValueAddressPair
(
rAddress
,
fValue
)
);
}
}}
...
...
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