[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 25 21:45:31 PST 2009


 patches/dev300/cws-kohei03-sc.diff |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 0625305d4b2f965db07ab990175b535cffb4c9db
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Nov 26 00:44:08 2009 -0500

    Fixed a crash when removing filter.
    
    * patches/dev300/cws-kohei03-sc.diff: I forgot to append an empty
      query entry after removing one, which reduced the number of
      query entries.  The number of query entries is not supposed to
      change because other code expect it to be constant. (n#558564)

diff --git a/patches/dev300/cws-kohei03-sc.diff b/patches/dev300/cws-kohei03-sc.diff
index 0b1f33b..046a8f7 100644
--- a/patches/dev300/cws-kohei03-sc.diff
+++ b/patches/dev300/cws-kohei03-sc.diff
@@ -2684,7 +2684,7 @@ new file mode 100644
 index 0000000..d9d477d
 --- /dev/null
 +++ sc/source/core/tool/queryparam.cxx
-@@ -0,0 +1,361 @@
+@@ -0,0 +1,365 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2774,11 +2774,15 @@ index 0000000..d9d477d
 +
 +    size_t n = maEntries.size();
 +    vector<ScQueryEntry> aNewEntries;
-+    aNewEntries.reserve(n-1);
++    aNewEntries.reserve(n);
 +    for (size_t i = 0; i < n; ++i)
 +        if (i != nPos)
 +            aNewEntries.push_back(maEntries[i]);
 +
++    // Don't forget to append an empty entry to make up for the removed one.
++    // The size of the entries is not supposed to change.
++    aNewEntries.push_back(ScQueryEntry());
++
 +    maEntries.swap(aNewEntries);
 +}
 +


More information about the ooo-build-commit mailing list