summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-02 23:16:01 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-09 13:34:31 -0400
commitff4731fb89f3b9d394c3826ab8dbe9d77df90a5a (patch)
treea11637d23c6bd62202e1c6c5aac6e56039a28a9f /sc
parent433661f7fc76e82595944379b5f1739c1a275331 (diff)
Add new broadcaster storage in ScColumn. Not used yet.
Change-Id: I8e68de0e50fffc1df0545af16456cd4cdd3596d8
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/column.hxx9
-rw-r--r--sc/inc/mtvblockfunc.hxx35
-rw-r--r--sc/source/core/data/column.cxx1
3 files changed, 44 insertions, 1 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 290f45b642b8..ed1392a6936f 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -25,6 +25,7 @@
#include "address.hxx"
#include "rangenam.hxx"
#include "types.hxx"
+#include "mtvblockfunc.hxx"
#include "formula/types.hxx"
#include <set>
@@ -41,7 +42,7 @@
#endif
#include <mdds/multi_type_vector.hpp>
-#include <mdds/multi_type_vector_trait.hpp>
+#include <mdds/multi_type_vector_custom_func1.hpp>
namespace editeng { class SvxBorderLine; }
@@ -117,6 +118,10 @@ struct ColDoubleEntry
class ScColumn
{
+ // Broadcaster storage container
+ typedef mdds::mtv::custom_block_func1<sc::element_type_broadcaster, sc::custom_broadcaster_block> BroadcasterBlkFunc;
+ typedef mdds::multi_type_vector<BroadcasterBlkFunc> BroadcasterStoreType;
+
typedef mdds::multi_type_vector<mdds::mtv::element_block_func> TextWidthType;
typedef mdds::multi_type_vector<mdds::mtv::element_block_func> ScriptType;
@@ -128,6 +133,8 @@ class ScColumn
// Script types are stored as unsigned char.
ScriptType maScriptTypes;
+ BroadcasterStoreType maBroadcasters;
+
SCCOL nCol;
SCTAB nTab;
diff --git a/sc/inc/mtvblockfunc.hxx b/sc/inc/mtvblockfunc.hxx
new file mode 100644
index 000000000000..41c5175c0e09
--- /dev/null
+++ b/sc/inc/mtvblockfunc.hxx
@@ -0,0 +1,35 @@
+/* -*- 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_MTVBLOCKFUNC_HXX
+#define SC_MTVBLOCKFUNC_HXX
+
+#include "svl/broadcast.hxx"
+
+#include <mdds/multi_type_vector_macro.hpp>
+#include <mdds/multi_type_vector_types.hpp>
+
+namespace sc {
+
+// Custom element type IDs for multi_type_vector.
+
+const mdds::mtv::element_t element_type_broadcaster = mdds::mtv::element_type_user_start;
+
+// Custom element blocks.
+
+typedef mdds::mtv::noncopyable_managed_element_block<element_type_broadcaster, SvtBroadcaster> custom_broadcaster_block;
+
+}
+
+// This needs to be in global namespace just like SvtBroacaster is.
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(SvtBroadcaster, sc::element_type_broadcaster, NULL, sc::custom_broadcaster_block)
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index be9e5d6ef219..c98cc396288c 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -113,6 +113,7 @@ std::vector<ColEntry>::const_iterator ScColumn::Search( SCROW nRow ) const
ScColumn::ScColumn() :
maTextWidths(MAXROWCOUNT),
maScriptTypes(MAXROWCOUNT),
+ maBroadcasters(MAXROWCOUNT),
nCol( 0 ),
pAttrArray( NULL ),
pDocument( NULL ),