[Libreoffice-commits] core.git: external/mdds

Kohei Yoshida kohei.yoshida at collabora.com
Tue Jan 7 12:50:40 PST 2014


 external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch |   54 ++++++++++
 external/mdds/UnpackedTarball_mdds.mk                                    |    1 
 2 files changed, 55 insertions(+)

New commits:
commit 47a7565315dcfc4271c2b2c205225d914a1a5094
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Jan 7 15:47:43 2014 -0500

    Patch mdds to make available a method to empty multiple elements in one call.
    
    This is for multi_type_matrix.
    
    Change-Id: I7b1fcf6b16b5addbb76078506536542cddede25f

diff --git a/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch b/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch
new file mode 100644
index 0000000..c905cea
--- /dev/null
+++ b/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch
@@ -0,0 +1,54 @@
+From d0a006ad2fcabd1e785787b9a5c84b32edbab780 Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida at gmail.com>
+Date: Tue, 7 Jan 2014 15:43:36 -0500
+Subject: [PATCH] Add a method to set empty to a span of elements.
+
+---
+ include/mdds/multi_type_matrix.hpp     |  9 +++++++++
+ include/mdds/multi_type_matrix_def.inl | 10 ++++++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/include/mdds/multi_type_matrix.hpp b/include/mdds/multi_type_matrix.hpp
+index a30393f..0574466 100644
+--- a/include/mdds/multi_type_matrix.hpp
++++ b/c/d/include/mdds/multi_type_matrix.hpp
+@@ -377,6 +377,15 @@ public:
+     void set_empty(size_type row, size_type col);
+ 
+     /**
++     * Set specified range of elements empty.
++     *
++     * @param row row position of the first element.
++     * @param col column position of the first element.
++     * @param length length of the range to set empty.
++     */
++    void set_empty(size_type row, size_type col, size_type length);
++
++    /**
+      * Set element referenced by the position object empty.
+      *
+      * @param pos position object that references element.
+diff --git a/include/mdds/multi_type_matrix_def.inl b/include/mdds/multi_type_matrix_def.inl
+index 21fe866..36f5448 100644
+--- a/include/mdds/multi_type_matrix_def.inl
++++ b/c/d/include/mdds/multi_type_matrix_def.inl
+@@ -240,6 +240,16 @@ void multi_type_matrix<_String>::set_empty(size_type row, size_type col)
+ }
+ 
+ template<typename _String>
++void multi_type_matrix<_String>::set_empty(size_type row, size_type col, size_type length)
++{
++    if (length == 0)
++        throw general_error("multi_type_matrix::set_empty: length of zero is not permitted.");
++
++    size_type pos1 = get_pos(row, col);
++    m_store.set_empty(pos1, pos1+length-1);
++}
++
++template<typename _String>
+ typename multi_type_matrix<_String>::position_type
+ multi_type_matrix<_String>::set_empty(const position_type& pos)
+ {
+-- 
+1.8.1.4
+
diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
index 1ccfc2a..6e9185b 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,3))
 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
 	external/mdds/mdds_0.6.0.patch \
 	external/mdds/0001-Workaround-for-an-old-gcc-bug.patch \
+	external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch \
 ))
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list