[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Mar 3 11:10:55 PST 2014


 writerfilter/source/rtftok/rtfvalue.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 4452fa9a2e741834a19c9b322fc8d9c8b06450de
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Mar 3 18:54:01 2014 +0100

    RTFValue::equals: consider the number of attributes/sprms as well
    
    Change-Id: Ic0cfa01f7a75c81130ac9ff39a971a678a820ee1

diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 2121358..9a582bf 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -223,7 +223,13 @@ RTFValue* RTFValue::Clone()
 
 bool RTFValue::equals(RTFValue& rOther)
 {
-    return m_nValue == rOther.m_nValue;
+    if (m_nValue != rOther.m_nValue)
+        return false;
+    if (m_pAttributes->size() != rOther.m_pAttributes->size())
+        return false;
+    if (m_pSprms->size() != rOther.m_pSprms->size())
+        return false;
+    return true;
 }
 
 RTFSprms& RTFValue::getAttributes()


More information about the Libreoffice-commits mailing list