From ff4731fb89f3b9d394c3826ab8dbe9d77df90a5a Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 2 May 2013 23:16:01 -0400 Subject: Add new broadcaster storage in ScColumn. Not used yet. Change-Id: I8e68de0e50fffc1df0545af16456cd4cdd3596d8 --- sc/inc/column.hxx | 9 ++++++++- sc/inc/mtvblockfunc.hxx | 35 +++++++++++++++++++++++++++++++++++ sc/source/core/data/column.cxx | 1 + 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 sc/inc/mtvblockfunc.hxx (limited to 'sc') 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 @@ -41,7 +42,7 @@ #endif #include -#include +#include namespace editeng { class SvxBorderLine; } @@ -117,6 +118,10 @@ struct ColDoubleEntry class ScColumn { + // Broadcaster storage container + typedef mdds::mtv::custom_block_func1 BroadcasterBlkFunc; + typedef mdds::multi_type_vector BroadcasterStoreType; + typedef mdds::multi_type_vector TextWidthType; typedef mdds::multi_type_vector 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 +#include + +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 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::const_iterator ScColumn::Search( SCROW nRow ) const ScColumn::ScColumn() : maTextWidths(MAXROWCOUNT), maScriptTypes(MAXROWCOUNT), + maBroadcasters(MAXROWCOUNT), nCol( 0 ), pAttrArray( NULL ), pDocument( NULL ), -- cgit