summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-18 23:15:26 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-19 13:40:25 -0400
commit307b9bfd17d34bcfc9a2ecdef7802413d79f3694 (patch)
treee23474e53d605c7731cca013d6fcdd9ab314fdf6 /sc
parentd6dbf417850e75cc3d4ac9e45ed9db3ffac507ed (diff)
Reduce dependency on document.hxx. Prefer forward declaration.
Change-Id: I9b0c86735284ec435cceb3acd9bad97a6e523a74
Diffstat (limited to 'sc')
-rw-r--r--sc/Library_sc.mk1
-rw-r--r--sc/inc/bigrange.hxx20
-rw-r--r--sc/inc/chgtrack.hxx3
-rw-r--r--sc/qa/unit/helper/debughelper.hxx1
-rw-r--r--sc/source/core/data/bigrange.cxx30
-rw-r--r--sc/source/core/inc/interpre.hxx4
-rw-r--r--sc/source/core/tool/chgviset.cxx1
-rw-r--r--sc/source/core/tool/interpr4.cxx4
-rw-r--r--sc/source/filter/inc/biff.hxx1
-rw-r--r--sc/source/filter/inc/qpro.hxx3
-rw-r--r--sc/source/filter/inc/qprostyle.hxx4
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx1
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx1
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx1
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx1
-rw-r--r--sc/source/ui/inc/condformatmgr.hxx1
-rw-r--r--sc/source/ui/view/viewutil.cxx1
17 files changed, 51 insertions, 27 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 066e0b6b87fe..48ebfd23d954 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/data/attrib \
sc/source/core/data/autonamecache \
sc/source/core/data/bcaslot \
+ sc/source/core/data/bigrange \
sc/source/core/data/cell \
sc/source/core/data/cell2 \
sc/source/core/data/clipparam \
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx
index 09aaf3b61070..d36fa9ab8d14 100644
--- a/sc/inc/bigrange.hxx
+++ b/sc/inc/bigrange.hxx
@@ -20,14 +20,12 @@
#ifndef SC_BIGRANGE_HXX
#define SC_BIGRANGE_HXX
-
#include "global.hxx"
-#include "document.hxx"
-
static const sal_Int32 nInt32Min = 0x80000000;
static const sal_Int32 nInt32Max = 0x7fffffff;
+class ScDocument;
class ScBigAddress
{
@@ -61,7 +59,7 @@ public:
{ nColP = nCol; nRowP = nRow; nTabP = nTab; }
inline void PutInOrder( ScBigAddress& r );
- inline sal_Bool IsValid( const ScDocument* ) const;
+ bool IsValid( const ScDocument* pDoc ) const;
inline ScAddress MakeAddress() const;
ScBigAddress& operator=( const ScBigAddress& r )
@@ -101,20 +99,6 @@ inline void ScBigAddress::PutInOrder( ScBigAddress& r )
}
}
-
-inline sal_Bool ScBigAddress::IsValid( const ScDocument* pDoc ) const
-{ // min/max interval bounds define whole col/row/tab
- return
- ((0 <= nCol && nCol <= MAXCOL)
- || nCol == nInt32Min || nCol == nInt32Max) &&
- ((0 <= nRow && nRow <= MAXROW)
- || nRow == nInt32Min || nRow == nInt32Max) &&
- ((0 <= nTab && nTab < pDoc->GetTableCount())
- || nTab == nInt32Min || nTab == nInt32Max)
- ;
-}
-
-
inline ScAddress ScBigAddress::MakeAddress() const
{
SCCOL nColA;
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 4c94932c2414..c4c22a992452 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -27,6 +27,7 @@
#include <tools/datetime.hxx>
#include <tools/mempool.hxx>
+#include "tools/link.hxx"
#include <unotools/options.hxx>
#include "global.hxx"
#include "bigrange.hxx"
@@ -39,7 +40,7 @@
class ScBaseCell;
class ScDocument;
-
+class ScFormulaCell;
enum ScChangeActionType
{
diff --git a/sc/qa/unit/helper/debughelper.hxx b/sc/qa/unit/helper/debughelper.hxx
index 2a560c68085f..4de5c9d72599 100644
--- a/sc/qa/unit/helper/debughelper.hxx
+++ b/sc/qa/unit/helper/debughelper.hxx
@@ -36,7 +36,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
-#include "document.hxx"
#ifdef WNT
#if !defined NOMINMAX
diff --git a/sc/source/core/data/bigrange.cxx b/sc/source/core/data/bigrange.cxx
new file mode 100644
index 000000000000..a48e02052b85
--- /dev/null
+++ b/sc/source/core/data/bigrange.cxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __SC_BIGRANGE_CXX__
+#define __SC_BIGRANGE_CXX__
+
+#include "bigrange.hxx"
+#include "document.hxx"
+
+bool ScBigAddress::IsValid( const ScDocument* pDoc ) const
+{ // min/max interval bounds define whole col/row/tab
+ return
+ ((0 <= nCol && nCol <= MAXCOL)
+ || nCol == nInt32Min || nCol == nInt32Max) &&
+ ((0 <= nRow && nRow <= MAXROW)
+ || nRow == nInt32Min || nRow == nInt32Max) &&
+ ((0 <= nTab && nTab < pDoc->GetTableCount())
+ || nTab == nInt32Min || nTab == nInt32Max)
+ ;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 16eb22cb0917..906f4d692d4c 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -26,7 +26,6 @@
#include "formula/errorcodes.hxx"
#include "formula/tokenarray.hxx"
#include "scdll.hxx"
-#include "document.hxx"
#include "scmatrix.hxx"
#include "externalrefmgr.hxx"
#include "calcconfig.hxx"
@@ -189,8 +188,7 @@ double ConvertStringToValue( const String& );
double GetCellValue( const ScAddress&, const ScBaseCell* );
double GetCellValueOrZero( const ScAddress&, const ScBaseCell* );
double GetValueCellValue( const ScAddress&, const ScValueCell* );
-ScBaseCell* GetCell( const ScAddress& rPos )
- { return pDok->GetCell( rPos ); }
+ScBaseCell* GetCell( const ScAddress& rPos );
void GetCellString( String& rStr, const ScBaseCell* pCell );
sal_uInt16 GetCellErrCode( const ScBaseCell* pCell );
CellType GetCellType( const ScBaseCell* pCell );
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 1f8547ffb4ef..2a63d4c1de00 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -22,6 +22,7 @@
#include "chgviset.hxx"
#include "rechead.hxx"
#include "chgtrack.hxx"
+#include "document.hxx"
// -----------------------------------------------------------------------
ScChangeViewSettings::~ScChangeViewSettings()
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 34e4d2bcc6cd..d78efe64ee83 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -545,6 +545,10 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, const ScBaseCel
return fValue;
}
+ScBaseCell* ScInterpreter::GetCell( const ScAddress& rPos )
+{
+ return pDok->GetCell( rPos );
+}
void ScInterpreter::GetCellString( String& rStr, const ScBaseCell* pCell )
{
diff --git a/sc/source/filter/inc/biff.hxx b/sc/source/filter/inc/biff.hxx
index 89ceb7211e05..ed739df6baf4 100644
--- a/sc/source/filter/inc/biff.hxx
+++ b/sc/source/filter/inc/biff.hxx
@@ -23,7 +23,6 @@
#include <sal/config.h>
#include "filter.hxx"
-#include "document.hxx"
#include "flttypes.hxx"
#include "ftools.hxx"
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index 5133952cd782..4e6d376d5ba5 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -22,7 +22,6 @@
#include <sal/config.h>
#include "filter.hxx"
-#include "document.hxx"
#include <tools/string.hxx>
#include "flttypes.hxx"
@@ -30,6 +29,8 @@
#include "qprostyle.hxx"
#include "biff.hxx"
+class ScDocument;
+
// Stream wrapper class
class ScQProReader : public ScBiffReader
{
diff --git a/sc/source/filter/inc/qprostyle.hxx b/sc/source/filter/inc/qprostyle.hxx
index 482687cf395a..145d14666d07 100644
--- a/sc/source/filter/inc/qprostyle.hxx
+++ b/sc/source/filter/inc/qprostyle.hxx
@@ -23,11 +23,13 @@
#include <sal/config.h>
#include "filter.hxx"
-#include "document.hxx"
#include <tools/string.hxx>
#include "flttypes.hxx"
#include "ftools.hxx"
+#include "address.hxx"
+
+class ScDocument;
class ScQProStyle
{
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 79a47fb378da..684d5e13f5f8 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -27,6 +27,7 @@
#include "xeformula.hxx"
#include "cell.hxx"
#include "xcl97rec.hxx"
+#include "document.hxx"
#include <oox/token/tokens.hxx>
#include <rtl/strbuf.hxx>
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 040b00571a06..e3e31a61f9f0 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -27,6 +27,7 @@
#include "xihelper.hxx"
#include "xilink.hxx"
#include "externalrefmgr.hxx"
+#include "document.hxx"
//___________________________________________________________________
// class XclImpChangeTrack
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index eea74aca39ec..d3b67dd67709 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -25,6 +25,7 @@
#include "cell.hxx"
#include "textuno.hxx"
#include "editutil.hxx"
+#include "document.hxx"
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/nmspmap.hxx>
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 977cc3647eb5..a18a0cae6002 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -32,6 +32,7 @@
#include "globstr.hrc"
#include "condformatdlg.hxx"
#include "vcl/msgbox.hxx"
+#include "document.hxx"
#define ITEMID_RANGE 1
#define ITEMID_CONDITION 2
diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx
index d3c9099a23c7..be736529aadf 100644
--- a/sc/source/ui/inc/condformatmgr.hxx
+++ b/sc/source/ui/inc/condformatmgr.hxx
@@ -35,7 +35,6 @@
#include <svtools/headbar.hxx>
#include "conditio.hxx"
-#include "document.hxx"
#include <map>
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index d24d080cfa4b..9aa5068e03ef 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -44,6 +44,7 @@
#include "chgtrack.hxx"
#include "chgviset.hxx"
#include "markdata.hxx"
+#include "document.hxx"
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>