rpms/openoffice.org/devel openoffice.org-2.0.0.ooo56536.sw.rtfcrash.patch, NONE, 1.1 openoffice.org.spec, 1.515, 1.516

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Oct 24 14:45:14 UTC 2005


Author: caolanm

Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8721

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.0.0.ooo56536.sw.rtfcrash.patch 
Log Message:
rh#171425#/ooo#56536# weird SwTxtNode is not a SwTxtNode problem

openoffice.org-2.0.0.ooo56536.sw.rtfcrash.patch:
 doc/notxtfrm.cxx   |   13 +++++++------
 layout/fly.cxx     |    2 +-
 txtnode/txtedt.cxx |   14 +++++++++++++-
 3 files changed, 21 insertions(+), 8 deletions(-)

--- NEW FILE openoffice.org-2.0.0.ooo56536.sw.rtfcrash.patch ---
Index: source/core/doc/notxtfrm.cxx
===================================================================
RCS file: /cvs/sw/sw/source/core/doc/notxtfrm.cxx,v
retrieving revision 1.31
diff -u -p -u -r1.31 notxtfrm.cxx
--- source/core/doc/notxtfrm.cxx	9 Sep 2005 03:17:50 -0000	1.31
+++ source/core/doc/notxtfrm.cxx	24 Oct 2005 14:24:57 -0000
@@ -507,13 +507,14 @@ void SwNoTxtFrm::Paint( const SwRect &rR
     // OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> to
     // method call <FindFlyFrm().GetContour(..)> to indicate that it is called
     // for paint in order to avoid load of the intrinsic graphic.
-    if ( ( !pOut->GetConnectMetaFile() ||
-           !pSh->GetWin() ) &&
-         FindFlyFrm()->GetContour( aPoly, sal_True )
-       )
+    if ( ( !pOut->GetConnectMetaFile() || !pSh->GetWin() ) )
 	{
-		pOut->SetClipRegion( aPoly );
-		bClip = FALSE;
+		const SwFlyFrm *pFly = FindFlyFrm();
+    	if (pFly && pFly->GetContour( aPoly, sal_True ))
+		{
+			pOut->SetClipRegion( aPoly );
+			bClip = FALSE;
+		}
 	}
 
 	SwRect aOrigPaint( rRect );
Index: source/core/layout/fly.cxx
===================================================================
RCS file: /cvs/sw/sw/source/core/layout/fly.cxx,v
retrieving revision 1.69
diff -u -p -u -r1.69 fly.cxx
--- source/core/layout/fly.cxx	9 Sep 2005 04:11:01 -0000	1.69
+++ source/core/layout/fly.cxx	24 Oct 2005 14:25:01 -0000
@@ -2492,7 +2492,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& 
                            const sal_Bool _bForPaint ) const
 {
 	BOOL bRet = FALSE;
-	if( GetFmt()->GetSurround().IsContour() && Lower() &&
+	if( GetFmt() && GetFmt()->GetSurround().IsContour() && Lower() &&
 		Lower()->IsNoTxtFrm() )
 	{
 		SwNoTxtNode *pNd = (SwNoTxtNode*)((SwCntntFrm*)Lower())->GetNode();
Index: source/core/txtnode/txtedt.cxx
===================================================================
RCS file: /cvs/sw/sw/source/core/txtnode/txtedt.cxx,v
retrieving revision 1.67
diff -u -p -u -r1.67 txtedt.cxx
--- source/core/txtnode/txtedt.cxx	9 Sep 2005 05:15:16 -0000	1.67
+++ source/core/txtnode/txtedt.cxx	24 Oct 2005 14:25:17 -0000
@@ -843,7 +850,7 @@ USHORT SwTxtNode::Convert( SwConversionA
 
     sal_Bool    bFound  = sal_False;
     xub_StrLen  nBegin  = nTextBegin;
-    xub_StrLen  nLen;
+    xub_StrLen  nLen=0;
 	LanguageType nLangFound = LANGUAGE_NONE;
     if (aText.Len())
     {
@@ -906,6 +913,12 @@ SwRect SwTxtFrm::_AutoSpell( SwCntntNode
 	if( pNode != pActNode || !nActPos )
 		nActPos = STRING_LEN;
 
+    ASSERT( pNode && pNode->IsTxtNode(), "now isn't that strange, txtnode that isn't");
+
+    if (!pNode || !pNode->IsTxtNode())
+    	return aRect;
+
+
     SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
 
     // modify string according to redline information and hidden text
@@ -1165,6 +1178,12 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCn
 									BOOL bIsVisArea )
 {
 	SwTxtNode *pNode = GetTxtNode();
+
+    ASSERT( pNode && pNode->IsTxtNode(), "now isn't that strange, txtnode that isn't");
+
+	if (!pNode || !pNode->IsTxtNode())
+		return;
+
 	if( pNode != pActNode || !nActPos )
 		nActPos = STRING_LEN;
 



Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.515
retrieving revision 1.516
diff -u -r1.515 -r1.516
--- openoffice.org.spec	21 Oct 2005 07:41:31 -0000	1.515
+++ openoffice.org.spec	24 Oct 2005 14:45:05 -0000	1.516
@@ -1,5 +1,5 @@
 %define ooo2ver 3
-%define ooo_rpm_release 5
+%define ooo_rpm_release 6
 %define ooo_base_name OOO680_m%{ooo2ver}
 %define build_fc5 1
 %define build_fc4 0
@@ -211,6 +211,7 @@
 Patch60: workspace.atkbridge.patch
 Patch61: openoffice.org-1.9.130.oooXXXXX.sysui.linkforce.patch
 Patch62: openoffice.org-2.0.0.ooo55603.mythes.crash.patch
+Patch63: openoffice.org-2.0.0.ooo56536.sw.rtfcrash.patch
 
 %define instdir %{_libdir}/openoffice.org2.0
 
@@ -888,6 +889,7 @@
 %patch60 -p1 -b .workspace.atkbridge.patch
 %patch61 -p1 -b .oooXXXXX.sysui.linkforce.patch
 %patch62 -p1 -b .ooo55603.mythes.crash.patch
+%patch63 -p1 -b .ooo56536.sw.rtfcrash.patch
 
 %if %{includingexternals}
 #start ludicrous workaround
@@ -3247,6 +3249,9 @@
 %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
 
 %changelog
+* Fri Oct 14 2005 Caolan McNamara <caolanm at redhat.com> - 1:2.0.0-3.6
+- rh#171425#/ooo#56536# weird SwTxtNode is not a SwTxtNode problem
+
 * Fri Oct 14 2005 Caolan McNamara <caolanm at redhat.com> - 1:2.0.0-3.5
 - get RPM_OPT_FLAGS in operation minus -fasynchronous-unwind-tables
 




More information about the fedora-cvs-commits mailing list