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
57efd69c
Kaydet (Commit)
57efd69c
authored
May 24, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove inherited number formats, related fdo#60215
Change-Id: I23d5e1b3baeb1499ada1fba1665027bdbe3fbb87
üst
fda007e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
11 deletions
+48
-11
formulacell.hxx
sc/inc/formulacell.hxx
+2
-0
column.cxx
sc/source/core/data/column.cxx
+8
-1
column2.cxx
sc/source/core/data/column2.cxx
+9
-0
column3.cxx
sc/source/core/data/column3.cxx
+11
-2
formulacell.cxx
sc/source/core/data/formulacell.cxx
+16
-8
xmlcelli.cxx
sc/source/filter/xml/xmlcelli.cxx
+2
-0
No files found.
sc/inc/formulacell.hxx
Dosyayı görüntüle @
57efd69c
...
@@ -90,6 +90,7 @@ private:
...
@@ -90,6 +90,7 @@ private:
bool
bInChangeTrack
:
1
;
// Cell is in ChangeTrack
bool
bInChangeTrack
:
1
;
// Cell is in ChangeTrack
bool
bTableOpDirty
:
1
;
// Dirty flag for TableOp
bool
bTableOpDirty
:
1
;
// Dirty flag for TableOp
bool
bNeedListening
:
1
;
// Listeners need to be re-established after UpdateReference
bool
bNeedListening
:
1
;
// Listeners need to be re-established after UpdateReference
bool
mbNeedsNumberFormat
:
1
;
// set the calculated number format as hard number format
enum
ScInterpretTailParameter
enum
ScInterpretTailParameter
{
{
...
@@ -152,6 +153,7 @@ public:
...
@@ -152,6 +153,7 @@ public:
void
ResetDirty
()
{
bDirty
=
false
;
}
void
ResetDirty
()
{
bDirty
=
false
;
}
bool
NeedsListening
()
const
{
return
bNeedListening
;
}
bool
NeedsListening
()
const
{
return
bNeedListening
;
}
void
SetNeedsListening
(
bool
bVar
)
{
bNeedListening
=
bVar
;
}
void
SetNeedsListening
(
bool
bVar
)
{
bNeedListening
=
bVar
;
}
void
SetNeedNumberFormat
(
bool
bVal
)
{
mbNeedsNumberFormat
=
bVal
;
}
void
Compile
(
const
OUString
&
rFormula
,
void
Compile
(
const
OUString
&
rFormula
,
bool
bNoListening
=
false
,
bool
bNoListening
=
false
,
const
formula
::
FormulaGrammar
::
Grammar
=
formula
::
FormulaGrammar
::
GRAM_DEFAULT
);
const
formula
::
FormulaGrammar
::
Grammar
=
formula
::
FormulaGrammar
::
GRAM_DEFAULT
);
...
...
sc/source/core/data/column.cxx
Dosyayı görüntüle @
57efd69c
...
@@ -2235,7 +2235,14 @@ void ScColumn::CompileXML( ScProgress& rProgress )
...
@@ -2235,7 +2235,14 @@ void ScColumn::CompileXML( ScProgress& rProgress )
if
(
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
if
(
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
{
{
SCROW
nRow
=
maItems
[
i
].
nRow
;
SCROW
nRow
=
maItems
[
i
].
nRow
;
static_cast
<
ScFormulaCell
*>
(
pCell
)
->
CompileXML
(
rProgress
);
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pCell
);
sal_uInt32
nCellFormat
=
GetNumberFormat
(
nRow
);
if
(
(
nCellFormat
%
SV_COUNTRY_LANGUAGE_OFFSET
)
!=
0
)
pFCell
->
SetNeedNumberFormat
(
false
);
else
pFCell
->
SetDirty
(
true
);
pFCell
->
CompileXML
(
rProgress
);
if
(
nRow
!=
maItems
[
i
].
nRow
)
if
(
nRow
!=
maItems
[
i
].
nRow
)
Search
(
nRow
,
i
);
// Listener deleted/inserted?
Search
(
nRow
,
i
);
// Listener deleted/inserted?
}
}
...
...
sc/source/core/data/column2.cxx
Dosyayı görüntüle @
57efd69c
...
@@ -1477,6 +1477,15 @@ void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& r
...
@@ -1477,6 +1477,15 @@ void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& r
void
ScColumn
::
SetCell
(
sc
::
ColumnBlockPosition
&
rBlockPos
,
SCROW
nRow
,
ScBaseCell
*
pNewCell
)
void
ScColumn
::
SetCell
(
sc
::
ColumnBlockPosition
&
rBlockPos
,
SCROW
nRow
,
ScBaseCell
*
pNewCell
)
{
{
if
(
pNewCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
{
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pNewCell
);
sal_uInt32
nCellFormat
=
GetNumberFormat
(
nRow
);
if
(
(
nCellFormat
%
SV_COUNTRY_LANGUAGE_OFFSET
)
==
0
)
pFCell
->
SetNeedNumberFormat
(
true
);
}
bool
bIsAppended
=
false
;
bool
bIsAppended
=
false
;
if
(
!
maItems
.
empty
()
)
if
(
!
maItems
.
empty
()
)
{
{
...
...
sc/source/core/data/column3.cxx
Dosyayı görüntüle @
57efd69c
...
@@ -1448,13 +1448,22 @@ void ScColumn::SetEditText( SCROW nRow, const EditTextObject& rEditText, const S
...
@@ -1448,13 +1448,22 @@ void ScColumn::SetEditText( SCROW nRow, const EditTextObject& rEditText, const S
void
ScColumn
::
SetFormula
(
SCROW
nRow
,
const
ScTokenArray
&
rArray
,
formula
::
FormulaGrammar
::
Grammar
eGram
)
void
ScColumn
::
SetFormula
(
SCROW
nRow
,
const
ScTokenArray
&
rArray
,
formula
::
FormulaGrammar
::
Grammar
eGram
)
{
{
ScAddress
aPos
(
nCol
,
nRow
,
nTab
);
ScAddress
aPos
(
nCol
,
nRow
,
nTab
);
Insert
(
nRow
,
new
ScFormulaCell
(
pDocument
,
aPos
,
&
rArray
,
eGram
));
ScFormulaCell
*
pCell
=
new
ScFormulaCell
(
pDocument
,
aPos
,
&
rArray
,
eGram
);
sal_uInt32
nCellFormat
=
GetNumberFormat
(
nRow
);
if
(
(
nCellFormat
%
SV_COUNTRY_LANGUAGE_OFFSET
)
!=
0
)
pCell
->
SetNeedNumberFormat
(
true
);
Insert
(
nRow
,
pCell
);
}
}
void
ScColumn
::
SetFormula
(
SCROW
nRow
,
const
OUString
&
rFormula
,
formula
::
FormulaGrammar
::
Grammar
eGram
)
void
ScColumn
::
SetFormula
(
SCROW
nRow
,
const
OUString
&
rFormula
,
formula
::
FormulaGrammar
::
Grammar
eGram
)
{
{
ScAddress
aPos
(
nCol
,
nRow
,
nTab
);
ScAddress
aPos
(
nCol
,
nRow
,
nTab
);
Insert
(
nRow
,
new
ScFormulaCell
(
pDocument
,
aPos
,
rFormula
,
eGram
));
ScFormulaCell
*
pCell
=
new
ScFormulaCell
(
pDocument
,
aPos
,
rFormula
,
eGram
);
sal_uInt32
nCellFormat
=
GetNumberFormat
(
nRow
);
if
(
(
nCellFormat
%
SV_COUNTRY_LANGUAGE_OFFSET
)
!=
0
)
pCell
->
SetNeedNumberFormat
(
true
);
Insert
(
nRow
,
pCell
);
}
}
void
ScColumn
::
SetFormulaCell
(
SCROW
nRow
,
ScFormulaCell
*
pCell
)
void
ScColumn
::
SetFormulaCell
(
SCROW
nRow
,
ScFormulaCell
*
pCell
)
...
...
sc/source/core/data/formulacell.cxx
Dosyayı görüntüle @
57efd69c
...
@@ -414,6 +414,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
...
@@ -414,6 +414,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
bInChangeTrack
(
false
),
bInChangeTrack
(
false
),
bTableOpDirty
(
false
),
bTableOpDirty
(
false
),
bNeedListening
(
false
),
bNeedListening
(
false
),
mbNeedsNumberFormat
(
false
),
aPos
(
rPos
)
aPos
(
rPos
)
{
{
Compile
(
rFormula
,
true
,
eGrammar
);
// bNoListening, Insert does that
Compile
(
rFormula
,
true
,
eGrammar
);
// bNoListening, Insert does that
...
@@ -448,6 +449,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
...
@@ -448,6 +449,7 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos,
bInChangeTrack
(
false
),
bInChangeTrack
(
false
),
bTableOpDirty
(
false
),
bTableOpDirty
(
false
),
bNeedListening
(
false
),
bNeedListening
(
false
),
mbNeedsNumberFormat
(
false
),
aPos
(
rPos
)
aPos
(
rPos
)
{
{
// UPN-Array generation
// UPN-Array generation
...
@@ -494,6 +496,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
...
@@ -494,6 +496,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
bInChangeTrack
(
false
),
bInChangeTrack
(
false
),
bTableOpDirty
(
false
),
bTableOpDirty
(
false
),
bNeedListening
(
false
),
bNeedListening
(
false
),
mbNeedsNumberFormat
(
false
),
aPos
(
rPos
)
aPos
(
rPos
)
{
{
pCode
=
rCell
.
pCode
->
Clone
();
pCode
=
rCell
.
pCode
->
Clone
();
...
@@ -1292,16 +1295,21 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
...
@@ -1292,16 +1295,21 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if
(
aResult
.
GetCellResultType
()
!=
svUnknown
)
if
(
aResult
.
GetCellResultType
()
!=
svUnknown
)
bContentChanged
=
true
;
bContentChanged
=
true
;
}
}
// Different number format?
if
(
nFormatType
!=
p
->
GetRetFormatType
()
)
if
(
mbNeedsNumberFormat
)
{
nFormatType
=
p
->
GetRetFormatType
();
bChanged
=
true
;
}
if
(
nFormatIndex
!=
p
->
GetRetFormatIndex
()
)
{
{
nFormatIndex
=
p
->
GetRetFormatIndex
();
sal_uInt16
nFormatType
=
p
->
GetRetFormatType
();
sal_Int32
nFormatIndex
=
p
->
GetRetFormatIndex
();
if
((
nFormatIndex
%
SV_COUNTRY_LANGUAGE_OFFSET
)
==
0
)
nFormatIndex
=
ScGlobal
::
GetStandardFormat
(
*
pDocument
->
GetFormatTable
(),
nFormatIndex
,
nFormatType
);
// set number format explicitly
pDocument
->
SetNumberFormat
(
aPos
,
nFormatIndex
);
bChanged
=
true
;
bChanged
=
true
;
mbNeedsNumberFormat
=
false
;
}
}
// In case of changes just obtain the result, no temporary and
// In case of changes just obtain the result, no temporary and
...
...
sc/source/filter/xml/xmlcelli.cxx
Dosyayı görüntüle @
57efd69c
...
@@ -1116,6 +1116,7 @@ void ScXMLTableRowCellContext::PutValueCell( const ScAddress& rCurrentPos )
...
@@ -1116,6 +1116,7 @@ void ScXMLTableRowCellContext::PutValueCell( const ScAddress& rCurrentPos )
{
{
ScFormulaCell
*
pFCell
=
rXMLImport
.
GetDocument
()
->
GetFormulaCell
(
rCurrentPos
);
ScFormulaCell
*
pFCell
=
rXMLImport
.
GetDocument
()
->
GetFormulaCell
(
rCurrentPos
);
SetFormulaCell
(
pFCell
);
SetFormulaCell
(
pFCell
);
pFCell
->
SetNeedNumberFormat
(
true
);
}
}
}
}
else
//regular value cell
else
//regular value cell
...
@@ -1347,6 +1348,7 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos )
...
@@ -1347,6 +1348,7 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos )
ScFormulaCell
*
pNewCell
=
new
ScFormulaCell
(
pDoc
,
rCellPos
,
pCode
.
get
(),
eGrammar
,
MM_NONE
);
ScFormulaCell
*
pNewCell
=
new
ScFormulaCell
(
pDoc
,
rCellPos
,
pCode
.
get
(),
eGrammar
,
MM_NONE
);
SetFormulaCell
(
pNewCell
);
SetFormulaCell
(
pNewCell
);
pDoc
->
SetFormulaCell
(
rCellPos
,
pNewCell
);
pDoc
->
SetFormulaCell
(
rCellPos
,
pNewCell
);
pNewCell
->
SetNeedNumberFormat
(
true
);
}
}
else
if
(
aText
[
0
]
==
'\''
&&
aText
.
getLength
()
>
1
)
else
if
(
aText
[
0
]
==
'\''
&&
aText
.
getLength
()
>
1
)
{
{
...
...
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