[Libreoffice-commits] .: Branch 'feature/matrix-new-backend' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Jul 17 13:43:23 PDT 2012


 sc/source/core/tool/scmatrix.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 536ba826092e5ae02670db0e69c4761e25f790f3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Jul 17 16:44:17 2012 -0400

    Some cleanup and comments.
    
    Change-Id: I38e9bbc0a55498e612665e90b5b1452e6c245c21

diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 8560c0d..039b289 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -53,6 +53,10 @@ typedef mdds::mtv::default_element_block<element_type_custom_string, rtl::OUStri
 
 namespace rtl {
 
+// Callback functions required for supporting rtl::OUString in
+// mdds::multi_type_vector.  They must be in the rtl namespace to satisfy
+// argument dependent lookup that mdds::multi_type_vector requires.
+
 mdds::mtv::element_t mdds_mtv_get_element_type(const OUString&)
 {
     return element_type_custom_string;
@@ -122,6 +126,10 @@ mdds::mtv::base_element_block* mdds_mtv_create_new_block(size_t init_size, const
 
 }
 
+/**
+ * Custom string trait struct to tell mdds::multi_type_matrix about the
+ * custom string type and how to handle blocks storing them.
+ */
 struct custom_string_trait
 {
     typedef OUString string_type;
@@ -279,7 +287,8 @@ struct custom_string_trait
             switch (mdds::mtv::get_block_type(block))
             {
                 case element_type_custom_string:
-                    // Do nothing.  The client code manages the life cycle of these cells.
+                    // Do nothing.  One needs to handle this only when the
+                    // block stores pointers and manages their life cycles.
                 break;
                 default:
                     mdds::mtv::element_block_func::overwrite_values(block, pos, len);
@@ -288,7 +297,6 @@ struct custom_string_trait
     };
 };
 
-
 // ============================================================================
 
 namespace {


More information about the Libreoffice-commits mailing list