[Libreoffice-commits] .: 2 commits - config_host.mk.in configmgr/source configure.in

Stephan Bergmann sbergmann at kemper.freedesktop.org
Fri Feb 24 08:43:00 PST 2012


 config_host.mk.in            |    1 -
 configmgr/source/partial.cxx |   15 ++++++++++++++-
 configure.in                 |   17 -----------------
 3 files changed, 14 insertions(+), 19 deletions(-)

New commits:
commit 9cbef2656e07867fd84c9350d8b9e9baeb9bcef5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 24 17:40:30 2012 +0100

    Removed unused --enable-ugly

diff --git a/config_host.mk.in b/config_host.mk.in
index f7dd207..ff976a7 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -130,7 +130,6 @@ export ENABLE_SCRIPTING_PYTHON=@ENABLE_SCRIPTING_PYTHON@
 export ENABLE_SILENT_MSI=@ENABLE_SILENT_MSI@
 export ENABLE_SYMBOLS=@ENABLE_SYMBOLS@
 export ENABLE_SYSTRAY_GTK=@ENABLE_SYSTRAY_GTK@
-export ENABLE_UGLY=@ENABLE_UGLY@
 export ENABLE_XMLSEC=@ENABLE_XMLSEC@
 export ENABLE_ZENITY=@ENABLE_ZENITY@
 export EPM=@EPM@
diff --git a/configure.in b/configure.in
index 9c24409..3b27ac8 100644
--- a/configure.in
+++ b/configure.in
@@ -751,12 +751,6 @@ AC_ARG_ENABLE(binfilter,
 ,enable_binfilter=no
 )
 
-AC_ARG_ENABLE(ugly,
-    AS_HELP_STRING([--enable-ugly],
-        [Enables ugly pieces of functionality.]),
-,enable_ugly=no
-)
-
 AC_ARG_ENABLE(rpath,
     AS_HELP_STRING([--disable-rpath],
         [Disable the use of relative paths in shared libraries.]),
@@ -3439,17 +3433,6 @@ else
     AC_MSG_RESULT([no])
 fi
 
-dnl Enable ugly pieces of code we're better off without
-dnl ===================================================================
-if test "$enable_ugly" = "yes"; then
-    BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
-    SCPDEFS="$SCPDEFS -DWITH_UGLY"
-    ENABLE_UGLY=YES
-else
-    ENABLE_UGLY=NO
-fi
-AC_SUBST(ENABLE_UGLY)
-
 dnl Test whether to include MySpell dictionaries
 dnl ===================================================================
 AC_MSG_CHECKING([whether to include MySpell dictionaries])
commit f3f79cc9e6c265baf48955d53f7e888205e0b3e0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 24 17:19:32 2012 +0100

    Resolves fdo#46074: Fix Partial::contains for paths that go past a leaf node
    
    Paths that already "failed" at the root node were not reported as CONTAINS_NOT,
    so that they were erroneously migrated, but with broken content (values of set
    member properties were nil).

diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index 7922e2c..088de36 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -76,6 +76,12 @@ Partial::Partial(
     std::set< rtl::OUString > const & includedPaths,
     std::set< rtl::OUString > const & excludedPaths)
 {
+    // The Partial::Node tree built up here encodes the following information:
+    // * Inner node, startInclude: an include starts here that contains excluded
+    //   sub-trees
+    // * Inner node, !startInclude: contains in-/excluded sub-trees
+    // * Leaf node, startInclude: an include starts here
+    // * Leaf node, !startInclude: an exclude starts here
     for (std::set< rtl::OUString >::const_iterator i(includedPaths.begin());
          i != includedPaths.end(); ++i)
     {
@@ -119,12 +125,19 @@ Partial::~Partial() {}
 Partial::Containment Partial::contains(Path const & path) const {
     //TODO: For set elements, the segment names recorded in the node tree need
     // not match the corresponding path segments, so this function can fail.
+
+    // * If path ends at a leaf node or goes past a leaf node:
+    // ** If that leaf node is startInclude: => CONTAINS_NODE
+    // ** If that leaf node is !startInclude: => CONTAINS_NOT
+    // * If path ends at inner node:
+    // ** If there is some startInclude along its trace: => CONTAINS_NODE
+    // ** If there is no startInclude along its trace: => CONTAINS_SUBNODES
     Node const * p = &root_;
     bool includes = false;
     for (Path::const_iterator i(path.begin()); i != path.end(); ++i) {
         Node::Children::const_iterator j(p->children.find(*i));
         if (j == p->children.end()) {
-            break;
+            return p->startInclude ? CONTAINS_NODE : CONTAINS_NOT;
         }
         p = &j->second;
         includes |= p->startInclude;


More information about the Libreoffice-commits mailing list