diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2013-09-11 09:06:24 +0200 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-23 10:44:20 -0400 |
commit | 759bdbbc348d320994813a9de1a7927b795580a3 (patch) | |
tree | 897cb53c217866ce6b365f76943390e3e6368529 /sc/inc/mtvelements.hxx | |
parent | ae88290f87acf693fed02140ca384ec15589616b (diff) |
Re-implement cell note storage using mdds::multi_type_vector.
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
Diffstat (limited to 'sc/inc/mtvelements.hxx')
-rw-r--r-- | sc/inc/mtvelements.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx index 6279efaa03c0..a1532d4378b3 100644 --- a/sc/inc/mtvelements.hxx +++ b/sc/inc/mtvelements.hxx @@ -16,6 +16,7 @@ #include "svl/sharedstring.hxx" #include "editeng/editobj.hxx" #include "calcmacros.hxx" +#include "postit.hxx" #if DEBUG_COLUMN_STORAGE #ifdef NDEBUG @@ -55,12 +56,15 @@ const mdds::mtv::element_t element_type_string = mdds::mtv::element_type_user_st const mdds::mtv::element_t element_type_edittext = mdds::mtv::element_type_user_start + 3; const mdds::mtv::element_t element_type_formula = mdds::mtv::element_type_user_start + 4; +const mdds::mtv::element_t element_type_cellnote = mdds::mtv::element_type_user_start + 5; + /// Mapped standard element types (for convenience). const mdds::mtv::element_t element_type_numeric = mdds::mtv::element_type_numeric; const mdds::mtv::element_t element_type_empty = mdds::mtv::element_type_empty; /// Custom element blocks. +typedef mdds::mtv::default_element_block<element_type_cellnote, ScPostIt*> cellnote_block; typedef mdds::mtv::noncopyable_managed_element_block<element_type_broadcaster, SvtBroadcaster> broadcaster_block; typedef mdds::mtv::default_element_block<element_type_celltextattr, CellTextAttr> celltextattr_block; typedef mdds::mtv::default_element_block<element_type_string, svl::SharedString> string_block; @@ -72,10 +76,10 @@ typedef mdds::mtv::numeric_element_block numeric_block; /// This needs to be in the same namespace as CellTextAttr. MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(CellTextAttr, element_type_celltextattr, CellTextAttr(), celltextattr_block) - } /// These need to be in global namespace just like their respective types are. +MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScPostIt, sc::element_type_cellnote, NULL, sc::cellnote_block) MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(SvtBroadcaster, sc::element_type_broadcaster, NULL, sc::broadcaster_block) MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(ScFormulaCell, sc::element_type_formula, NULL, sc::formula_block) MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(EditTextObject, sc::element_type_edittext, NULL, sc::edittext_block) @@ -88,6 +92,10 @@ MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(SharedString, sc::element_type_string, SharedS namespace sc { +/// Cell note container +typedef mdds::mtv::custom_block_func1<sc::cellnote_block> CNoteFunc; +typedef mdds::multi_type_vector<CNoteFunc> CellNoteStoreType; + /// Broadcaster storage container typedef mdds::mtv::custom_block_func1<sc::broadcaster_block> BCBlkFunc; typedef mdds::multi_type_vector<BCBlkFunc> BroadcasterStoreType; @@ -105,6 +113,7 @@ typedef mdds::multi_type_vector<CellFunc> CellStoreType; */ struct ColumnBlockPosition { + CellNoteStoreType::iterator miCellNotePos; BroadcasterStoreType::iterator miBroadcasterPos; CellTextAttrStoreType::iterator miCellTextAttrPos; CellStoreType::iterator miCellPos; @@ -114,6 +123,7 @@ struct ColumnBlockPosition struct ColumnBlockConstPosition { + CellNoteStoreType::const_iterator miCellNotePos; BroadcasterStoreType::const_iterator miBroadcasterPos; CellTextAttrStoreType::const_iterator miCellTextAttrPos; CellStoreType::const_iterator miCellPos; |