diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-13 23:26:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-14 15:35:55 -0400 |
commit | 7a13e3dc20908bad26b65606ce6efbfeb97fca55 (patch) | |
tree | 11252506f21e427c5541295bac8b92644c1941df /sc | |
parent | bcc703f2b6bdfd1321f2599faa51e387c9ad3174 (diff) |
ScBaseCell::nTextWidth is no more.
Change-Id: I32368d39a21d44bef8ab7fe265077cd147a50024
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/cell.hxx | 5 | ||||
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/cell.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 7 |
4 files changed, 13 insertions, 11 deletions
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index c84e985f547c..5fbfb0b445b9 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -101,10 +101,6 @@ public: Returns false for formula cells returning nothing, use HasEmptyData() for that. */ bool IsBlank() const; -// for idle-calculations - inline sal_uInt16 GetTextWidth() const { return nTextWidth; } - inline void SetTextWidth( sal_uInt16 nNew ) { nTextWidth = nNew; } - inline sal_uInt8 GetScriptType() const { return nScriptType; } inline void SetScriptType( sal_uInt8 nNew ) { nScriptType = nNew; } @@ -148,7 +144,6 @@ private: SvtBroadcaster* mpBroadcaster; /// Broadcaster for changed values. Cell takes ownership! protected: - sal_uInt16 nTextWidth; sal_uInt8 eCellType; // enum CellType - sal_uInt8 spart Speicher sal_uInt8 nScriptType; }; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 8c3fac273d6d..2f59ef1cdc8b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1844,6 +1844,8 @@ public: void RemoveSubTotalCell(ScFormulaCell* pCell); void SetSubTotalCellsDirty(const ScRange& rDirtyRange); + void SetTextWidth( const ScAddress& rPos, sal_uInt16 nWidth ); + private: // CLOOK-Impl-methods /** diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 5ffd85e1382c..bc6367c1bed1 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -69,7 +69,6 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScNoteCell ) ScBaseCell::ScBaseCell( CellType eNewType ) : mpBroadcaster( 0 ), - nTextWidth( TEXTWIDTH_DIRTY ), eCellType( sal::static_int_cast<sal_uInt8>(eNewType) ), nScriptType( SC_SCRIPTTYPE_UNKNOWN ) { @@ -77,7 +76,6 @@ ScBaseCell::ScBaseCell( CellType eNewType ) : ScBaseCell::ScBaseCell( const ScBaseCell& rCell ) : mpBroadcaster( 0 ), - nTextWidth( rCell.nTextWidth ), eCellType( rCell.eCellType ), nScriptType( SC_SCRIPTTYPE_UNKNOWN ) { @@ -1002,7 +1000,7 @@ void ScFormulaCell::Compile( const rtl::OUString& rFormula, bool bNoListening, else { bChanged = true; - SetTextWidth( TEXTWIDTH_DIRTY ); + pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); SetScriptType( SC_SCRIPTTYPE_UNKNOWN ); } if ( bWasInFormulaTree ) @@ -1096,7 +1094,7 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) else { bChanged = true; - SetTextWidth( TEXTWIDTH_DIRTY ); + pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); SetScriptType( SC_SCRIPTTYPE_UNKNOWN ); } @@ -1367,7 +1365,7 @@ void ScFormulaCell::Interpret() pIterCell->bTableOpDirty = false; pIterCell->aResult.SetResultError( errNoConvergence); pIterCell->bChanged = true; - pIterCell->SetTextWidth( TEXTWIDTH_DIRTY); + pDocument->SetTextWidth(pIterCell->aPos, TEXTWIDTH_DIRTY); pIterCell->SetScriptType( SC_SCRIPTTYPE_UNKNOWN); } } @@ -1662,7 +1660,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) } if( bChanged ) { - SetTextWidth( TEXTWIDTH_DIRTY ); + pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); SetScriptType( SC_SCRIPTTYPE_UNKNOWN ); } if (bContentChanged && pDocument->IsStreamValid(aPos.Tab())) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 8cfc787a35f7..acce5985ef57 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -5695,6 +5695,13 @@ void ScDocument::SetSubTotalCellsDirty(const ScRange& rDirtyRange) maSubTotalCells.swap(aNewSet); // update the list. } +void ScDocument::SetTextWidth( const ScAddress& rPos, sal_uInt16 nWidth ) +{ + SCTAB nTab = rPos.Tab(); + if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) + maTabs[nTab]->SetTextWidth(rPos.Col(), rPos.Row(), nWidth); +} + void ScDocument::EnableUndo( bool bVal ) { // The undo manager increases lock count every time undo is disabled. |