rpms/openoffice.org/devel workspace.sw33bf02.patch, NONE, 1.1 openoffice.org.spec, 1.2121, 1.2122

Caolan McNamara caolanm at fedoraproject.org
Wed Jan 13 15:04:55 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15288

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/devel/openoffice.org.spec,v
retrieving revision 1.2121
retrieving revision 1.2122
diff -u -p -r1.2121 -r1.2122
--- openoffice.org.spec	12 Jan 2010 09:23:09 -0000	1.2121
+++ openoffice.org.spec	13 Jan 2010 15:04:53 -0000	1.2122
@@ -127,6 +127,7 @@ Patch51: openoffice.org-3.2.0.ooo47279.s
 Patch52: openoffice.org-3.2.0.ooo107834.sw.pseudoattribs.patch
 Patch53: openoffice.org-3.3.0.ooo108047.writerfilter.safer-field-context-handling.patch
 Patch54: openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+Patch55: workspace.sw33bf02.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1681,6 +1682,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch52 -p0 -b .ooo107834.sw.pseudoattribs.patch
 %patch53 -p1 -b .ooo108047.writerfilter.safer-field-context-handling.patch
 %patch54 -p1 -b .ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+%patch55 -p1 -b .workspace.sw33bf02.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4163,9 +4165,10 @@ fi
 %endif
 
 %changelog
-* Tue Jan 12 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-9.3
+* Wed Jan 13 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-9.3
 - Resolves: rhbz#553929 [abrt] crash in ColorConfigCtrl_Impl::ScrollHdl
   (dtardon)
+- Resolves: rhbz#549573 improve document compare (caolanm)
 
 * Mon Jan 11 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-9.2
 - Resolves: rhbz#554259 No autocorrect files for Lithuanian (dtardon)



More information about the scm-commits mailing list