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
c43a25a7
Kaydet (Commit)
c43a25a7
authored
May 18, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
replace import with direct ScCompiler calls, related tdf#91367
Change-Id: Ib605536d002071ae753e7da87137deae00529272
üst
0a9b9978
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
defnamesbuffer.hxx
sc/source/filter/inc/defnamesbuffer.hxx
+5
-0
defnamesbuffer.cxx
sc/source/filter/oox/defnamesbuffer.cxx
+13
-4
No files found.
sc/source/filter/inc/defnamesbuffer.hxx
Dosyayı görüntüle @
c43a25a7
...
...
@@ -23,6 +23,10 @@
#include "formulabase.hxx"
#include "rangenam.hxx"
#include <memory>
class
ScTokenArray
;
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sheet
{
class
XNamedRange
;
}
}
}
}
...
...
@@ -111,6 +115,7 @@ public:
/** Converts the formula string or BIFF token array for this defined name. */
void
convertFormula
();
ApiTokenSequence
getTokens
();
std
::
unique_ptr
<
ScTokenArray
>
getScTokens
();
/** Returns true, if this defined name is global in the document. */
inline
bool
isGlobalName
()
const
{
return
mnCalcSheet
<
0
;
}
/** Returns true, if this defined name is a special builtin name. */
...
...
sc/source/filter/oox/defnamesbuffer.cxx
Dosyayı görüntüle @
c43a25a7
...
...
@@ -37,6 +37,7 @@
#include "worksheetbuffer.hxx"
#include "tokenarray.hxx"
#include "tokenuno.hxx"
#include "compiler.hxx"
namespace
oox
{
namespace
xls
{
...
...
@@ -380,6 +381,16 @@ DefinedName::getTokens()
return
aTokens
;
}
std
::
unique_ptr
<
ScTokenArray
>
DefinedName
::
getScTokens
()
{
ScTokenArray
aTokenArray
;
ScCompiler
aCompiler
(
&
getScDocument
(),
ScAddress
(
0
,
0
,
mnCalcSheet
));
aCompiler
.
SetGrammar
(
formula
::
FormulaGrammar
::
GRAM_OOXML
);
std
::
unique_ptr
<
ScTokenArray
>
pArray
(
aCompiler
.
CompileString
(
maModel
.
maFormula
));
return
pArray
;
}
void
DefinedName
::
convertFormula
()
{
// macro function or vba procedure
...
...
@@ -389,10 +400,8 @@ void DefinedName::convertFormula()
// convert and set formula of the defined name
if
(
getFilterType
()
==
FILTER_OOXML
)
{
ApiTokenSequence
aTokens
=
getTokens
();
ScTokenArray
aTokenArray
;
(
void
)
ScTokenConversion
::
ConvertToTokenArray
(
this
->
getScDocument
(),
aTokenArray
,
aTokens
);
mpScRangeData
->
SetCode
(
aTokenArray
);
std
::
unique_ptr
<
ScTokenArray
>
pTokenArray
=
getScTokens
();
mpScRangeData
->
SetCode
(
*
pTokenArray
);
}
ScTokenArray
*
pTokenArray
=
mpScRangeData
->
GetCode
();
...
...
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