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
942589b4
Kaydet (Commit)
942589b4
authored
Mar 27, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More on killing direct use of ScEditCell (and some of ScBaseCell).
Change-Id: I65d530333213f8b3db38a269e74a0beabcd1ff89
üst
47924382
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
46 deletions
+37
-46
dociter.hxx
sc/inc/dociter.hxx
+3
-2
dociter.cxx
sc/source/core/data/dociter.cxx
+12
-11
documen8.cxx
sc/source/core/data/documen8.cxx
+8
-11
docsh.cxx
sc/source/ui/docshell/docsh.cxx
+10
-14
docsh8.cxx
sc/source/ui/docshell/docsh8.cxx
+4
-8
No files found.
sc/inc/dociter.hxx
Dosyayı görüntüle @
942589b4
...
...
@@ -431,6 +431,7 @@ private:
SCSIZE
*
pNextIndices
;
SCCOL
nCol
;
SCROW
nRow
;
ScRefCellValue
maCurCell
;
bool
bMore
;
public
:
...
...
@@ -438,7 +439,7 @@ public:
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
);
~
ScHorizontalCellIterator
();
Sc
BaseCell
*
GetNext
(
SCCOL
&
rCol
,
SCROW
&
rRow
);
Sc
RefCellValue
*
GetNext
(
SCCOL
&
rCol
,
SCROW
&
rRow
);
bool
ReturnNext
(
SCCOL
&
rCol
,
SCROW
&
rRow
);
/// Set a(nother) sheet and (re)init.
void
SetTab
(
SCTAB
nTab
);
...
...
@@ -524,7 +525,7 @@ private:
SCCOL
nCellCol
;
SCROW
nCellRow
;
Sc
BaseCell
*
pCell
;
Sc
RefCellValue
*
pCell
;
SCCOL
nAttrCol1
;
SCCOL
nAttrCol2
;
SCROW
nAttrRow
;
...
...
sc/source/core/data/dociter.cxx
Dosyayı görüntüle @
942589b4
...
...
@@ -1797,7 +1797,7 @@ void ScHorizontalCellIterator::SetTab( SCTAB nTabP )
Advance
();
}
Sc
BaseCell
*
ScHorizontalCellIterator
::
GetNext
(
SCCOL
&
rCol
,
SCROW
&
rRow
)
Sc
RefCellValue
*
ScHorizontalCellIterator
::
GetNext
(
SCCOL
&
rCol
,
SCROW
&
rRow
)
{
if
(
bMore
)
{
...
...
@@ -1820,7 +1820,8 @@ ScBaseCell* ScHorizontalCellIterator::GetNext( SCCOL& rCol, SCROW& rRow )
}
Advance
();
return
pCell
;
maCurCell
.
assign
(
*
pCell
);
return
&
maCurCell
;
}
else
return
NULL
;
...
...
@@ -1917,7 +1918,7 @@ bool ScHorizontalValueIterator::GetNext( double& rValue, sal_uInt16& rErr )
bool
bFound
=
false
;
while
(
!
bFound
)
{
Sc
BaseCell
*
pCell
=
pCellIter
->
GetNext
(
nCurCol
,
nCurRow
);
Sc
RefCellValue
*
pCell
=
pCellIter
->
GetNext
(
nCurCol
,
nCurRow
);
while
(
!
pCell
)
{
if
(
nCurTab
<
nEndTab
)
...
...
@@ -1930,12 +1931,12 @@ bool ScHorizontalValueIterator::GetNext( double& rValue, sal_uInt16& rErr )
}
if
(
!
bSubTotal
||
!
pDoc
->
maTabs
[
nCurTab
]
->
RowFiltered
(
nCurRow
)
)
{
switch
(
pCell
->
GetCellType
()
)
switch
(
pCell
->
meType
)
{
case
CELLTYPE_VALUE
:
{
bNumValid
=
false
;
rValue
=
((
ScValueCell
*
)
pCell
)
->
GetValue
()
;
rValue
=
pCell
->
mfValue
;
rErr
=
0
;
if
(
bCalcAsShown
)
{
...
...
@@ -1949,12 +1950,12 @@ bool ScHorizontalValueIterator::GetNext( double& rValue, sal_uInt16& rErr )
break
;
case
CELLTYPE_FORMULA
:
{
if
(
!
bSubTotal
||
!
((
ScFormulaCell
*
)
pCell
)
->
IsSubTotal
())
if
(
!
bSubTotal
||
!
pCell
->
mpFormula
->
IsSubTotal
())
{
rErr
=
((
ScFormulaCell
*
)
pCell
)
->
GetErrCode
();
if
(
rErr
||
((
ScFormulaCell
*
)
pCell
)
->
IsValue
()
)
rErr
=
pCell
->
mpFormula
->
GetErrCode
();
if
(
rErr
||
pCell
->
mpFormula
->
IsValue
()
)
{
rValue
=
((
ScFormulaCell
*
)
pCell
)
->
GetValue
();
rValue
=
pCell
->
mpFormula
->
GetValue
();
bNumValid
=
false
;
bFound
=
true
;
}
...
...
@@ -2161,7 +2162,7 @@ bool ScUsedAreaIterator::GetNext()
if
(
pCell
&&
IsGreater
(
nNextCol
,
nNextRow
,
nCellCol
,
nCellRow
)
)
pCell
=
aCellIter
.
GetNext
(
nCellCol
,
nCellRow
);
while
(
pCell
&&
pCell
->
IsBlank
()
)
while
(
pCell
&&
pCell
->
isEmpty
()
)
pCell
=
aCellIter
.
GetNext
(
nCellCol
,
nCellRow
);
if
(
pPattern
&&
IsGreater
(
nNextCol
,
nNextRow
,
nAttrCol2
,
nAttrRow
)
)
...
...
@@ -2215,7 +2216,7 @@ bool ScUsedAreaIterator::GetNext()
if
(
bUseCell
)
// Cell position
{
if
(
pCell
)
maFoundCell
.
assign
(
*
pCell
)
;
maFoundCell
=
*
pCell
;
else
maFoundCell
.
clear
();
...
...
sc/source/core/data/documen8.cxx
Dosyayı görüntüle @
942589b4
...
...
@@ -752,7 +752,7 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
ScHorizontalCellIterator
aIter
(
this
,
nTab
,
rSpellRange
.
aStart
.
Col
(),
nRow
,
rSpellRange
.
aEnd
.
Col
(),
rSpellRange
.
aEnd
.
Row
()
);
Sc
BaseCell
*
pCell
=
aIter
.
GetNext
(
nCol
,
nRow
);
Sc
RefCellValue
*
pCell
=
aIter
.
GetNext
(
nCol
,
nRow
);
// skip everything left of rSpellPos:
while
(
pCell
&&
nRow
==
rSpellPos
.
Row
()
&&
nCol
<
rSpellPos
.
Col
()
)
pCell
=
aIter
.
GetNext
(
nCol
,
nRow
);
...
...
@@ -763,7 +763,7 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
// Don't spell check within pivot tables.
continue
;
CellType
eType
=
pCell
->
GetCellType
()
;
CellType
eType
=
pCell
->
meType
;
if
(
eType
==
CELLTYPE_STRING
||
eType
==
CELLTYPE_EDIT
)
{
if
(
!
pEngine
)
...
...
@@ -796,11 +796,12 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
if
(
eType
==
CELLTYPE_STRING
)
{
rtl
::
OUString
aText
=
static_cast
<
ScStringCell
*>
(
pCell
)
->
GetString
();
pEngine
->
SetText
(
aText
);
pEngine
->
SetText
(
*
pCell
->
mpString
);
}
else
if
(
pCell
->
mpEditText
)
pEngine
->
SetText
(
*
pCell
->
mpEditText
);
else
pEngine
->
SetText
(
*
(
static_cast
<
ScEditCell
*>
(
pCell
)
->
GetData
()
)
);
pEngine
->
SetText
(
EMPTY_OUSTRING
);
aStatus
.
bModified
=
false
;
pEngine
->
CompleteOnlineSpelling
();
...
...
@@ -815,12 +816,8 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe
if
(
bNeedEdit
)
{
if
(
eType
==
CELLTYPE_EDIT
)
// The cell will take ownership of pNewData.
static_cast
<
ScEditCell
*>
(
pCell
)
->
SetData
(
pEngine
->
CreateTextObject
());
else
// The cell will take ownership of pNewData.
SetEditText
(
ScAddress
(
nCol
,
nRow
,
nTab
),
pEngine
->
CreateTextObject
());
// The cell will take ownership of pNewData.
SetEditText
(
ScAddress
(
nCol
,
nRow
,
nTab
),
pEngine
->
CreateTextObject
());
}
else
{
...
...
sc/source/ui/docshell/docsh.cxx
Dosyayı görüntüle @
942589b4
...
...
@@ -1820,7 +1820,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScHorizontalCellIterator
aIter
(
&
aDocument
,
nTab
,
nStartCol
,
nStartRow
,
nEndCol
,
nEndRow
);
Sc
BaseCell
*
pCell
;
Sc
RefCellValue
*
pCell
;
while
(
(
pCell
=
aIter
.
GetNext
(
nCol
,
nRow
)
)
!=
NULL
)
{
bool
bProgress
=
false
;
// only upon line change
...
...
@@ -1879,7 +1879,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
else
nNextCol
=
nCol
+
1
;
CellType
eType
=
pCell
->
GetCellType
()
;
CellType
eType
=
pCell
->
meType
;
ScAddress
aPos
(
nCol
,
nRow
,
nTab
);
if
(
bTabProtect
)
{
...
...
@@ -1904,15 +1904,15 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
sal_uInt16
nErrCode
;
if
(
bShowFormulas
)
{
((
ScFormulaCell
*
)
pCell
)
->
GetFormula
(
aString
);
pCell
->
mpFormula
->
GetFormula
(
aString
);
bString
=
true
;
}
else
if
(
(
nErrCode
=
((
ScFormulaCell
*
)
pCell
)
->
GetErrCode
()
)
!=
0
)
else
if
(
(
nErrCode
=
pCell
->
mpFormula
->
GetErrCode
())
!=
0
)
{
aString
=
ScGlobal
::
GetErrorString
(
nErrCode
);
bString
=
true
;
}
else
if
(
((
ScFormulaCell
*
)
pCell
)
->
IsValue
()
)
else
if
(
pCell
->
mpFormula
->
IsValue
()
)
{
sal_uInt32
nFormat
=
aDocument
.
GetNumberFormat
(
aPos
);
if
(
bFixedWidth
||
bSaveAsShown
)
...
...
@@ -1923,9 +1923,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
{
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pCell
);
ScCellFormat
::
GetInputString
(
aCell
,
nFormat
,
aString
,
rFormatter
);
ScCellFormat
::
GetInputString
(
*
pCell
,
nFormat
,
aString
,
rFormatter
);
bString
=
false
;
}
}
...
...
@@ -1938,7 +1936,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
aString
=
ScCellFormat
::
GetString
(
aDocument
,
aPos
,
nFormat
,
&
pDummy
,
rFormatter
);
}
else
aString
=
((
ScFormulaCell
*
)
pCell
)
->
GetString
();
aString
=
pCell
->
mpFormula
->
GetString
();
bString
=
true
;
}
}
...
...
@@ -1951,12 +1949,12 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
aString
=
ScCellFormat
::
GetString
(
aDocument
,
aPos
,
nFormat
,
&
pDummy
,
rFormatter
);
}
else
aString
=
((
ScStringCell
*
)
pCell
)
->
GetString
()
;
aString
=
*
pCell
->
mpString
;
bString
=
true
;
break
;
case
CELLTYPE_EDIT
:
{
const
EditTextObject
*
pObj
=
static_cast
<
const
ScEditCell
*>
(
pCell
)
->
GetData
()
;
const
EditTextObject
*
pObj
=
pCell
->
mpEditText
;
EditEngine
&
rEngine
=
aDocument
.
GetEditEngine
();
rEngine
.
SetText
(
*
pObj
);
aString
=
rEngine
.
GetText
();
// including LF
...
...
@@ -1975,9 +1973,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
}
else
{
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pCell
);
ScCellFormat
::
GetInputString
(
aCell
,
nFormat
,
aString
,
rFormatter
);
ScCellFormat
::
GetInputString
(
*
pCell
,
nFormat
,
aString
,
rFormatter
);
bString
=
false
;
}
}
...
...
sc/source/ui/docshell/docsh8.cxx
Dosyayı görüntüle @
942589b4
...
...
@@ -1081,7 +1081,7 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e
const
sal_Int32
*
pColLengths
=
aColLengths
.
getConstArray
();
ScHorizontalCellIterator
aIter
(
&
aDocument
,
nTab
,
nFirstCol
,
nDocRow
,
nLastCol
,
nDocRow
);
Sc
BaseCell
*
pCell
=
NULL
;
Sc
RefCellValue
*
pCell
=
NULL
;
bool
bTest
=
true
;
while
(
bTest
&&
((
pCell
=
aIter
.
GetNext
(
nDocCol
,
nDocRow
))
!=
NULL
))
{
...
...
@@ -1090,14 +1090,10 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e
{
case
sdbc
:
:
DataType
::
LONGVARCHAR
:
{
if
(
pCell
->
GetCellType
()
!=
CELLTYPE_NOTE
)
if
(
pCell
->
meType
!=
CELLTYPE_NOTE
)
{
if
(
pCell
->
GetCellType
()
==
CELLTYPE_EDIT
)
{
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pCell
);
lcl_getLongVarCharEditString
(
aString
,
aCell
,
aEditEngine
);
}
if
(
pCell
->
meType
==
CELLTYPE_EDIT
)
lcl_getLongVarCharEditString
(
aString
,
*
pCell
,
aEditEngine
);
else
lcl_getLongVarCharString
(
aString
,
aDocument
,
nDocCol
,
nDocRow
,
nTab
,
*
pNumFmt
);
...
...
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