summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-23 13:17:00 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-23 15:44:12 -0400
commit3347f41a9b13c317c1d001e7ff501a4b0ee8f896 (patch)
treeb4c9a82e46e52ad3a8d0969a10989b59bec457bd /sc/inc
parentc1cc1861ea6a656645885938dac9e4442d96510b (diff)
Avoid exposing the internal cell note storage outside ScDocument.
Let's try to avoid including mtvelements.hxx in document.hxx... mtvelements.hxx is very parser-heavy, and document.hxx is included everywhere... Change-Id: I2768ba6e25f8ff10f61f9cfd4a7cbc4844230630
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/column.hxx37
-rw-r--r--sc/inc/document.hxx30
-rw-r--r--sc/inc/postit.hxx12
-rw-r--r--sc/inc/table.hxx36
4 files changed, 74 insertions, 41 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 042cd7235813..ca0374e97c53 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -38,21 +38,24 @@ namespace editeng { class SvxBorderLine; }
namespace formula { struct VectorRefArray; }
namespace sc {
- struct FormulaGroupContext;
- class StartListeningContext;
- class EndListeningContext;
- class CopyFromClipContext;
- class CopyToClipContext;
- class CopyToDocContext;
- class MixDocContext;
- class ColumnSpanSet;
- struct ColumnBlockPosition;
- class SingleColumnSpanSet;
- struct RefUpdateContext;
- struct RefUpdateInsertTabContext;
- struct RefUpdateDeleteTabContext;
- struct RefUpdateMoveTabContext;
- class EditTextIterator;
+
+struct FormulaGroupContext;
+class StartListeningContext;
+class EndListeningContext;
+class CopyFromClipContext;
+class CopyToClipContext;
+class CopyToDocContext;
+class MixDocContext;
+class ColumnSpanSet;
+struct ColumnBlockPosition;
+class SingleColumnSpanSet;
+struct RefUpdateContext;
+struct RefUpdateInsertTabContext;
+struct RefUpdateDeleteTabContext;
+struct RefUpdateMoveTabContext;
+class EditTextIterator;
+struct NoteEntry;
+
}
class Fraction;
@@ -500,6 +503,10 @@ public:
void SetCellNote( SCROW nRow, ScPostIt* pNote);
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
+ size_t GetNoteCount() const;
+ SCROW GetNotePosition( size_t nIndex ) const;
+ void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
+
SCROW GetCellNotesMaxRow() const;
SCROW GetCellNotesMinRow() const;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 516ccc0d11e8..752984d3dd22 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -48,8 +48,6 @@
#include <boost/scoped_ptr.hpp>
#include "markdata.hxx"
-#include "mtvelements.hxx"
-
namespace editeng { class SvxBorderLine; }
namespace formula { struct VectorRefArray; }
namespace svl {
@@ -60,14 +58,17 @@ class SharedStringPool;
}
namespace sc {
- struct FormulaGroupContext;
- class StartListeningContext;
- class EndListeningContext;
- class CopyFromClipContext;
- class ColumnSpanSet;
- struct ColumnBlockPosition;
- struct RefUpdateContext;
- class EditTextIterator;
+
+struct FormulaGroupContext;
+class StartListeningContext;
+class EndListeningContext;
+class CopyFromClipContext;
+class ColumnSpanSet;
+struct ColumnBlockPosition;
+struct RefUpdateContext;
+class EditTextIterator;
+struct NoteEntry;
+
}
class SvxFontItem;
@@ -905,8 +906,13 @@ public:
SC_DLLPUBLIC ScPostIt* ReleaseNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
SC_DLLPUBLIC ScPostIt* GetOrCreateNote(const ScAddress& rPos);
SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos);
- sal_uLong CountNotes();
- SC_DLLPUBLIC sc::CellNoteStoreType& GetColNotes(SCCOL nCol, SCTAB nTab);
+ size_t CountNotes() const;
+ size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
+
+ ScAddress GetNotePosition( size_t nIndex ) const;
+ SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
+
+ SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab);
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 9a7c60a2d5ea..d31dcfd2b032 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -244,5 +244,17 @@ public:
};
+namespace sc {
+
+struct NoteEntry
+{
+ ScAddress maPos;
+ const ScPostIt* mpNote;
+
+ NoteEntry( const ScAddress& rPos, const ScPostIt* pNote );
+};
+
+}
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 586cf82c58d9..3c7aa0e6fd0c 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -51,20 +51,23 @@ namespace com { namespace sun { namespace star {
namespace formula { struct VectorRefArray; }
namespace sc {
- struct FormulaGroupContext;
- class StartListeningContext;
- class EndListeningContext;
- class CopyFromClipContext;
- class CopyToClipContext;
- class CopyToDocContext;
- class MixDocContext;
- class ColumnSpanSet;
- class ColumnSet;
- struct ColumnBlockPosition;
- struct RefUpdateContext;
- struct RefUpdateInsertTabContext;
- struct RefUpdateDeleteTabContext;
- struct RefUpdateMoveTabContext;
+
+struct FormulaGroupContext;
+class StartListeningContext;
+class EndListeningContext;
+class CopyFromClipContext;
+class CopyToClipContext;
+class CopyToDocContext;
+class MixDocContext;
+class ColumnSpanSet;
+class ColumnSet;
+struct ColumnBlockPosition;
+struct RefUpdateContext;
+struct RefUpdateInsertTabContext;
+struct RefUpdateDeleteTabContext;
+struct RefUpdateMoveTabContext;
+struct NoteEntry;
+
}
class SfxItemSet;
@@ -375,6 +378,11 @@ public:
ScPostIt* GetNote(const SCCOL nCol, const SCROW nRow);
+ size_t GetNoteCount( SCCOL nCol ) const;
+ SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const;
+
+ void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
+
bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ) const;
void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
void DeleteRow(