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
7539a695
Kaydet (Commit)
7539a695
authored
Eyl 20, 2012
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xlsx fix cyclic referenced defined names partially fixes bnc#780296 bnc#781166
Change-Id: Ibad37ac05c608c0211063bfa73931427d48c11f9
üst
b5a1db96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
15 deletions
+37
-15
rangenam.hxx
sc/inc/rangenam.hxx
+2
-1
rangenam.cxx
sc/source/core/tool/rangenam.cxx
+24
-12
defnamesbuffer.cxx
sc/source/filter/oox/defnamesbuffer.cxx
+11
-2
No files found.
sc/inc/rangenam.hxx
Dosyayı görüntüle @
7539a695
...
...
@@ -87,7 +87,7 @@ private:
SCCOL
mnMaxCol
;
void
CompileRangeData
(
const
String
&
rSymbol
,
bool
bSetError
);
void
InitCode
();
public
:
typedef
::
std
::
map
<
sal_uInt16
,
sal_uInt16
>
IndexMap
;
...
...
@@ -120,6 +120,7 @@ public:
void
SetIndex
(
sal_uInt16
nInd
)
{
nIndex
=
nInd
;
}
sal_uInt16
GetIndex
()
const
{
return
nIndex
;
}
ScTokenArray
*
GetCode
()
{
return
pCode
;
}
SC_DLLPUBLIC
void
SetCode
(
ScTokenArray
&
);
const
ScTokenArray
*
GetCode
()
const
{
return
pCode
;
}
SC_DLLPUBLIC
sal_uInt16
GetErrCode
()
const
;
bool
HasReferences
()
const
;
...
...
sc/source/core/tool/rangenam.cxx
Dosyayı görüntüle @
7539a695
...
...
@@ -100,18 +100,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
mnMaxRow
(
-
1
),
mnMaxCol
(
-
1
)
{
if
(
!
pCode
->
GetCodeError
()
)
{
pCode
->
Reset
();
FormulaToken
*
p
=
pCode
->
GetNextReference
();
if
(
p
)
// exact one reference at first
{
if
(
p
->
GetType
()
==
svSingleRef
)
eType
=
eType
|
RT_ABSPOS
;
else
eType
=
eType
|
RT_ABSAREA
;
}
}
InitCode
();
}
ScRangeData
::
ScRangeData
(
ScDocument
*
pDok
,
...
...
@@ -648,6 +637,29 @@ void ScRangeData::ValidateTabRefs()
}
}
void
ScRangeData
::
SetCode
(
ScTokenArray
&
rArr
)
{
::
std
::
auto_ptr
<
ScTokenArray
>
pOldCode
(
pCode
);
// old pCode will be deleted
pCode
=
new
ScTokenArray
(
rArr
);
InitCode
();
}
void
ScRangeData
::
InitCode
()
{
if
(
!
pCode
->
GetCodeError
()
)
{
pCode
->
Reset
();
FormulaToken
*
p
=
pCode
->
GetNextReference
();
if
(
p
)
// exact one reference at first
{
if
(
p
->
GetType
()
==
svSingleRef
)
eType
=
eType
|
RT_ABSPOS
;
else
eType
=
eType
|
RT_ABSAREA
;
}
}
}
extern
"C"
int
SAL_CALL
ScRangeData_QsortNameCompare
(
const
void
*
p1
,
const
void
*
p2
)
...
...
sc/source/filter/oox/defnamesbuffer.cxx
Dosyayı görüntüle @
7539a695
...
...
@@ -382,9 +382,9 @@ void DefinedName::createNameObject( sal_Int32 nIndex )
// create the name and insert it into the document, maCalcName will be changed to the resulting name
if
(
maModel
.
mnSheet
>=
0
)
mpScRangeData
=
createLocalNamedRangeObject
(
maCalcName
,
getTokens
(),
nIndex
,
nNameFlags
,
maModel
.
mnSheet
);
mpScRangeData
=
createLocalNamedRangeObject
(
maCalcName
,
ApiTokenSequence
(),
nIndex
,
nNameFlags
,
maModel
.
mnSheet
);
else
mpScRangeData
=
createNamedRangeObject
(
maCalcName
,
getTokens
(),
nIndex
,
nNameFlags
);
mpScRangeData
=
createNamedRangeObject
(
maCalcName
,
ApiTokenSequence
(),
nIndex
,
nNameFlags
);
mnTokenIndex
=
nIndex
;
}
...
...
@@ -426,6 +426,15 @@ DefinedName::getTokens()
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
);
}
ScTokenArray
*
pTokenArray
=
mpScRangeData
->
GetCode
();
Sequence
<
FormulaToken
>
aFTokenSeq
;
(
void
)
ScTokenConversion
::
ConvertToTokenSequence
(
this
->
getScDocument
(),
aFTokenSeq
,
*
pTokenArray
);
...
...
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