rpms/openoffice.org/F-12 workspace.sw33bf02.patch, NONE, 1.1 openoffice.org.spec, 1.2052, 1.2053

Caolan McNamara caolanm at fedoraproject.org
Wed Jan 13 15:05:02 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15327

Modified Files:
	openoffice.org.spec 
Added Files:
	workspace.sw33bf02.patch 
Log Message:
Resolves: rhbz#549573 improve document compare (caolanm)

workspace.sw33bf02.patch:
 doccomp.cxx |   52 ++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 40 insertions(+), 12 deletions(-)

--- NEW FILE workspace.sw33bf02.patch ---

# HG changeset patch
# User Michael Stahl <mst at openoffice.org>
# Date 1263384233 -3600
# Node ID 79345a5549be5d2fea5a46a3d29dcd49f698ff8e
# Parent  2c09866efc8c00ce7362750041f9b26dc3c2fef5
#i107826#: apply patch from cmc

diff -r 2c09866efc8c -r 79345a5549be sw/source/core/doc/doccomp.cxx
--- a/sw/source/core/doc/doccomp.cxx	Thu Jan 07 14:40:30 2010 +0100
+++ b/sw/source/core/doc/doccomp.cxx	Wed Jan 13 13:03:53 2010 +0100
@@ -969,6 +969,29 @@
 	return CompareNode( rNode, ((SwCompareLine&)rLine).rNode );
 }
 
+namespace
+{
+    static String SimpleTableToText(const SwNode &rNode)
+    {
+        String sRet;
+        const SwNode* pEndNd = rNode.EndOfSectionNode();
+        SwNodeIndex aIdx( rNode );
+        while (&aIdx.GetNode() != pEndNd)
+        {
+            if (aIdx.GetNode().IsTxtNode())
+            {
+                if (sRet.Len())
+                {
+                    sRet.Append( '\n' );
+                }
+                sRet.Append( aIdx.GetNode().GetTxtNode()->GetExpandTxt() );
+            }
+            aIdx++;
+        }
+        return sRet;
+    }
+}
+
 BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd )
 {
     if( rSrcNd.GetNodeType() != rDstNd.GetNodeType() )
@@ -989,6 +1012,13 @@
 
 			bRet = ( rTSrcNd.EndOfSectionIndex() - rTSrcNd.GetIndex() ) ==
 				   ( rTDstNd.EndOfSectionIndex() - rTDstNd.GetIndex() );
+
+            // --> #i107826#: compare actual table content
+            if (bRet)
+            {
+                bRet = (SimpleTableToText(rSrcNd) == SimpleTableToText(rDstNd));
+            }
+            // <--
 		}
 		break;
 
@@ -1043,6 +1073,15 @@
 	case ND_ENDNODE:
         bRet = rSrcNd.StartOfSectionNode()->GetNodeType() ==
                rDstNd.StartOfSectionNode()->GetNodeType();
+
+        // --> #i107826#: compare actual table content
+        if (bRet && rSrcNd.StartOfSectionNode()->GetNodeType() == ND_TABLENODE)
+        {
+            bRet = CompareNode(
+                *rSrcNd.StartOfSectionNode(), *rDstNd.StartOfSectionNode());
+        }
+        // <--
+
 		break;
 	}
 	return bRet;
@@ -1059,18 +1098,7 @@
 
 	case ND_TABLENODE:
 		{
-			const SwNode* pEndNd = rNode.EndOfSectionNode();
-			SwNodeIndex aIdx( rNode );
-			while( &aIdx.GetNode() != pEndNd )
-			{
-				if( aIdx.GetNode().IsTxtNode() )
-				{
-					if( sRet.Len() )
-						sRet.Append( '\n' );
-					sRet.Append( ((SwTxtNode&)rNode).GetExpandTxt() );
-				}
-				aIdx++;
-			}
+			sRet = SimpleTableToText(rNode);
 			sRet.InsertAscii( "Tabelle: ", 0 );
 		}
 		break;



Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-12/openoffice.org.spec,v
retrieving revision 1.2052
retrieving revision 1.2053
diff -u -p -r1.2052 -r1.2053
--- openoffice.org.spec	12 Jan 2010 09:13:56 -0000	1.2052
+++ openoffice.org.spec	13 Jan 2010 15:05:02 -0000	1.2053
@@ -188,6 +188,7 @@ Patch110: workspace.extmgr01.patch
 Patch111: openoffice.org-3.3.0.ooo108047.writerfilter.safer-field-context-handling.patch
 Patch112: workspace.impress182.patch
 Patch113: openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+Patch114: workspace.sw33bf02.patch
 
 %define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
 %define instdir %{_libdir}
@@ -1770,6 +1771,7 @@ cat %{PATCH11} >> svtools/source/dialogs
 %patch111 -p1 -b .ooo108047.writerfilter.safer-field-context-handling.patch
 %patch112 -p1 -b .workspace.impress182.patch
 %patch113 -p1 -b .ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+%patch114 -p1 -b .workspace.sw33bf02.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4309,7 +4311,7 @@ fi
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Fri Jan 01 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.25-UNBUILT
+* Wed Jan 13 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.25-UNBUILT
 - Resolves: rhbz#549890 add workspace.extmgr01.patch (dtardon)
 - Resolves: rhbz#551983 OpenOffice writer crashes when opening document
   with link in footnote (dtardon)
@@ -4318,6 +4320,7 @@ fi
 - Resolves: rhbz#554259 No autocorrect files for Lithuanian (dtardon)
 - Resolves: rhbz#553929 [abrt] crash in ColorConfigCtrl_Impl::ScrollHdl
   (dtardon)
+- Resolves: rhbz#549573 improve document compare (caolanm)
 
 * Tue Dec 22 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.1-19.24
 - Resolves: rhbz#545824 bustage in writer with emboldened fonts



More information about the scm-commits mailing list