[Libreoffice-commits] core.git: sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Tue Feb 12 10:05:00 PST 2013


 sc/source/core/data/documen4.cxx               |    1 +
 sc/source/core/inc/interpre.hxx                |   25 +++++++++++--------------
 sc/source/core/tool/interpr4.cxx               |   24 ++++++++++++++++++++++++
 sc/source/filter/excel/xestream.cxx            |    1 +
 sc/source/filter/inc/biff.hxx                  |    1 -
 sc/source/filter/inc/excrecds.hxx              |    1 -
 sc/source/filter/inc/qpro.hxx                  |    1 -
 sc/source/filter/inc/qprostyle.hxx             |    1 -
 sc/source/ui/condformat/condformatdlgentry.cxx |    1 +
 sc/source/ui/inc/anyrefdg.hxx                  |    2 +-
 sc/source/ui/inc/formula.hxx                   |    1 -
 sc/source/ui/inc/funcpage.hxx                  |    1 -
 sc/source/ui/inc/undobase.hxx                  |    2 ++
 sc/source/ui/inc/undoblk.hxx                   |    6 +++---
 sc/source/ui/namedlg/namedefdlg.cxx            |    1 +
 sc/source/ui/namedlg/namedlg.cxx               |    1 +
 sc/source/ui/undo/undoblk3.cxx                 |    5 +++--
 17 files changed, 49 insertions(+), 26 deletions(-)

New commits:
commit 55b39ff42e6fe7424a106f590531af6717bd6e1e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Feb 12 13:05:05 2013 -0500

    Remove excessive inclusion of cell.hxx from other headers.
    
    In favor of forward delaration and/or inclusion of more specialized
    headers.
    
    Change-Id: I75f727cc50228b8958b60173ce14e5ce1fb7e6f7

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index b3bb256..a79552f 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -41,6 +41,7 @@
 #include "externalrefmgr.hxx"
 #include "colorscale.hxx"
 #include "attrib.hxx"
+#include "cell.hxx"
 
 using namespace formula;
 
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 0d10ab7..8cc48a8 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -24,18 +24,20 @@
 #include <rtl/math.hxx>
 #include <rtl/ustring.hxx>
 #include "formula/errorcodes.hxx"
-#include "cell.hxx"
+#include "formula/tokenarray.hxx"
 #include "scdll.hxx"
 #include "document.hxx"
 #include "scmatrix.hxx"
 #include "externalrefmgr.hxx"
 #include "calcconfig.hxx"
+#include "token.hxx"
 
 #include <map>
 
 class ScDocument;
 class SbxVariable;
 class ScBaseCell;
+class ScValueCell;
 class ScFormulaCell;
 class SvNumberFormatter;
 class ScDBRangeBase;
@@ -45,8 +47,11 @@ struct ScQueryEntry;
 
 struct ScCompare;
 struct ScCompareOptions;
+class ScSingleRefData;
+class ScComplexRefData;
 
 class ScToken;
+class ScJumpMatrix;
 
 #define MAXSTACK      (4096 / sizeof(formula::FormulaToken*))
 
@@ -187,19 +192,11 @@ double GetValueCellValue( const ScAddress&, const ScValueCell* );
 ScBaseCell* GetCell( const ScAddress& rPos )
     { return pDok->GetCell( rPos ); }
 void GetCellString( String& rStr, const ScBaseCell* pCell );
-inline sal_uInt16 GetCellErrCode( const ScBaseCell* pCell )
-    { return pCell ? pCell->GetErrorCode() : 0; }
-inline CellType GetCellType( const ScBaseCell* pCell )
-    { return pCell ? pCell->GetCellType() : CELLTYPE_NONE; }
-/// Really empty or inherited emptiness.
-inline bool HasCellEmptyData( const ScBaseCell* pCell )
-    { return pCell ? pCell->HasEmptyData() : true; }
-/// This includes inherited emptiness, which usually is regarded as value!
-inline bool HasCellValueData( const ScBaseCell* pCell )
-    { return pCell ? pCell->HasValueData() : false; }
-/// Not empty and not value.
-inline bool HasCellStringData( const ScBaseCell* pCell )
-    { return pCell ? pCell->HasStringData() : false; }
+sal_uInt16 GetCellErrCode( const ScBaseCell* pCell );
+CellType GetCellType( const ScBaseCell* pCell );
+bool HasCellEmptyData( const ScBaseCell* pCell );
+bool HasCellValueData( const ScBaseCell* pCell );
+bool HasCellStringData( const ScBaseCell* pCell );
 
 bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                      SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8* pCellArr);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index d7df23f..d6f59f7 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -191,6 +191,30 @@ double ScInterpreter::GetValueCellValue( const ScAddress& rPos, const ScValueCel
     return fVal;
 }
 
+sal_uInt16 ScInterpreter::GetCellErrCode( const ScBaseCell* pCell )
+{
+    return pCell ? pCell->GetErrorCode() : 0;
+}
+
+CellType ScInterpreter::GetCellType( const ScBaseCell* pCell )
+{
+    return pCell ? pCell->GetCellType() : CELLTYPE_NONE;
+}
+
+bool ScInterpreter::HasCellEmptyData( const ScBaseCell* pCell )
+{
+    return pCell ? pCell->HasEmptyData() : true;
+}
+
+bool ScInterpreter::HasCellValueData( const ScBaseCell* pCell )
+{
+    return pCell ? pCell->HasValueData() : false;
+}
+
+bool ScInterpreter::HasCellStringData( const ScBaseCell* pCell )
+{
+    return pCell ? pCell->HasStringData() : false;
+}
 
 /** Convert string content to numeric value.
 
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index e1faa9b..c031418 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -37,6 +37,7 @@
 #include "xcl97rec.hxx"
 #include "rangelst.hxx"
 #include "compiler.hxx"
+#include "cell.hxx"
 
 #include <../../ui/inc/docsh.hxx>
 #include <../../ui/inc/viewdata.hxx>
diff --git a/sc/source/filter/inc/biff.hxx b/sc/source/filter/inc/biff.hxx
index 1c1ffe8..89ceb72 100644
--- a/sc/source/filter/inc/biff.hxx
+++ b/sc/source/filter/inc/biff.hxx
@@ -24,7 +24,6 @@
 #include <sal/config.h>
 #include "filter.hxx"
 #include "document.hxx"
-#include "cell.hxx"
 
 #include "flttypes.hxx"
 #include "ftools.hxx"
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 3948e3b..45dba0db 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -36,7 +36,6 @@
 #include "xestring.hxx"
 #include "root.hxx"
 #include "excdefs.hxx"
-#include "cell.hxx"
 #include <boost/shared_ptr.hpp>
 
 //------------------------------------------------------------------ Forwards -
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index a437add..5133952 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -23,7 +23,6 @@
 #include <sal/config.h>
 #include "filter.hxx"
 #include "document.hxx"
-#include "cell.hxx"
 #include <tools/string.hxx>
 
 #include "flttypes.hxx"
diff --git a/sc/source/filter/inc/qprostyle.hxx b/sc/source/filter/inc/qprostyle.hxx
index b6ff310..482687c 100644
--- a/sc/source/filter/inc/qprostyle.hxx
+++ b/sc/source/filter/inc/qprostyle.hxx
@@ -24,7 +24,6 @@
 #include <sal/config.h>
 #include "filter.hxx"
 #include "document.hxx"
-#include "cell.hxx"
 #include <tools/string.hxx>
 
 #include "flttypes.hxx"
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 66c7f26..e66ab7e 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -22,6 +22,7 @@
 #include <svx/xtable.hxx>
 #include <svx/drawitem.hxx>
 #include <vcl/msgbox.hxx>
+#include "tokenarray.hxx"
 #include "stlpool.hxx"
 #include "tabvwsh.hxx"
 
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 2040767..8901fb5 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -26,7 +26,6 @@
 #include <sfx2/basedlgs.hxx>
 #include <sfx2/tabdlg.hxx>
 #include "address.hxx"
-#include "cell.hxx"
 #include "compiler.hxx"
 #include "formula/funcutl.hxx"
 #include "IAnyRefDialog.hxx"
@@ -41,6 +40,7 @@ class ScDocument;
 class ScTabViewShell;
 class ScRefHandler;
 class ScRangeList;
+class ScFormulaCell;
 
 class ScFormulaReferenceHelper
 {
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 8e44ea1..d55ade8 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -29,7 +29,6 @@
 #include <vcl/tabpage.hxx>
 
 #include "compiler.hxx"
-#include "cell.hxx"
 
 #include "formula/formula.hxx"
 #include "IAnyRefDialog.hxx"
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index f3e7c51..5c00f1f 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -32,7 +32,6 @@
 #include "parawin.hxx"
 #include <svtools/treelistbox.hxx>
 #include "compiler.hxx"
-#include "cell.hxx"
 
 class ScFuncDesc;
 
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 8befcc6..c6e6b95 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -35,6 +35,8 @@ class ScDBData;
 
 class ScSimpleUndo: public SfxUndoAction
 {
+    ScSimpleUndo(const ScSimpleUndo&); // disabled
+
 public:
                     TYPEINFO();
                     ScSimpleUndo( ScDocShell* pDocSh );
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 8debbe9..f5c17cd 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -25,9 +25,8 @@
 #include "spellparam.hxx"
 #include "cellmergeoption.hxx"
 
-#include "cell.hxx"
-
 #include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
 
 class ScDocShell;
 class ScDocument;
@@ -38,6 +37,7 @@ class SvxBoxItem;
 class SvxBoxInfoItem;
 class SvxSearchItem;
 class SdrUndoAction;
+class ScEditDataArray;
 
 //----------------------------------------------------------------------------
 
@@ -347,7 +347,7 @@ public:
 private:
     ScMarkData      aMarkData;
     ScRange         aRange;
-    ScEditDataArray aDataArray;
+    boost::scoped_ptr<ScEditDataArray> mpDataArray;
     ScDocument*     pUndoDoc;
     sal_Bool            bMulti;
     ScPatternAttr*  pApplyPattern;
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 3500d02..cb2f6f7 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -38,6 +38,7 @@
 #include "reffact.hxx"
 #include "undorangename.hxx"
 #include "tabvwsh.hxx"
+#include "tokenarray.hxx"
 
 // defines -------------------------------------------------------------------
 
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index bc6c63e..04a44a8 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -29,6 +29,7 @@
 #include "tabvwsh.hxx"
 
 #include "globalnames.hxx"
+#include "tokenarray.hxx"
 
 #include "sfx2/app.hxx"
 
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 969beb7..10392dd 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -360,6 +360,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell,
     :   ScSimpleUndo( pNewDocShell ),
         aMarkData   ( rMark ),
         aRange      ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ),
+        mpDataArray(new ScEditDataArray),
         pUndoDoc    ( pNewUndoDoc ),
         bMulti      ( bNewMulti )
 {
@@ -389,7 +390,7 @@ rtl::OUString ScUndoSelectionAttr::GetComment() const
 
 ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
 {
-    return &aDataArray;
+    return mpDataArray.get();
 }
 
 void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo )
@@ -435,7 +436,7 @@ void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo )
 void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
 {
     ScDocument* pDoc = pDocShell->GetDocument();
-    for (const ScEditDataArray::Item* pItem = aDataArray.First(); pItem; pItem = aDataArray.Next())
+    for (const ScEditDataArray::Item* pItem = mpDataArray->First(); pItem; pItem = mpDataArray->Next())
     {
         ScBaseCell* pCell;
         pDoc->GetCell(pItem->GetCol(), pItem->GetRow(), pItem->GetTab(), pCell);


More information about the Libreoffice-commits mailing list