summaryrefslogtreecommitdiffstats
path: root/sc/inc/mtvelements.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-09 17:49:24 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 20:13:04 -0400
commitc9bfa396e32b07d88eec742232636a517032b108 (patch)
tree75b9ee1bdddd9cbbddcdf63a4db38ba396b9cf1f /sc/inc/mtvelements.hxx
parentRename header: mtvelement -> multi_type_vector (mtv) elements. (diff)
downloadcore-c9bfa396e32b07d88eec742232636a517032b108.tar.gz
core-c9bfa396e32b07d88eec742232636a517032b108.zip
Block definition for CellTextAttr.
This block will be used to merge the text width and script type vectors that are currently separate. Text widths and script types should really be stored together. Change-Id: I6783769cc03180b513319e0a98a0773bd20ba941
Diffstat (limited to 'sc/inc/mtvelements.hxx')
-rw-r--r--sc/inc/mtvelements.hxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index 41c5175c0e09..9fc5947ea2e1 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef SC_MTVBLOCKFUNC_HXX
-#define SC_MTVBLOCKFUNC_HXX
+#ifndef SC_MTVELEMENTS_HXX
+#define SC_MTVELEMENTS_HXX
#include "svl/broadcast.hxx"
@@ -17,13 +17,28 @@
namespace sc {
+struct CellTextAttr
+{
+ sal_uInt16 mnTextWidth;
+ sal_uInt8 mnScriptType;
+
+ CellTextAttr();
+ CellTextAttr(const CellTextAttr& r);
+ CellTextAttr(sal_uInt16 nTextWidth, sal_uInt8 nScriptType);
+};
+
// Custom element type IDs for multi_type_vector.
const mdds::mtv::element_t element_type_broadcaster = mdds::mtv::element_type_user_start;
+const mdds::mtv::element_t element_type_celltextattr = mdds::mtv::element_type_user_start + 1;
// Custom element blocks.
typedef mdds::mtv::noncopyable_managed_element_block<element_type_broadcaster, SvtBroadcaster> custom_broadcaster_block;
+typedef mdds::mtv::default_element_block<element_type_celltextattr, CellTextAttr> custom_celltextattr_block;
+
+// This needs to be in the same namespace as CellTextAttr.
+MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(CellTextAttr, element_type_celltextattr, CellTextAttr(), custom_celltextattr_block)
}