rpms/openoffice.org/devel openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch, NONE, 1.1 openoffice.org.spec, 1.2140, 1.2141

Caolan McNamara caolanm at fedoraproject.org
Sat Feb 6 12:26:15 UTC 2010


Author: caolanm

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

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch 
Log Message:
Resolves: rhbz#561989 openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch

openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch:
 app/inputhdl.cxx |   39 +++++++++++++++++++++++++++++++--------
 inc/inputhdl.hxx |    4 ++++
 2 files changed, 35 insertions(+), 8 deletions(-)

--- NEW FILE openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch ---
diff -ru sc.orig/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
--- sc.orig/source/ui/app/inputhdl.cxx	2010-02-05 15:10:03.000000000 +0000
+++ sc/source/ui/app/inputhdl.cxx	2010-02-05 20:49:17.000000000 +0000
@@ -419,7 +421,9 @@
 		pColumnData( NULL ),
 		pFormulaData( NULL ),
         pFormulaDataPara( NULL ),
+        pTipVisibleParent( NULL ),
 		nTipVisible( 0 ),
+        pTipVisibleSecParent( NULL ),
         nTipVisibleSec( 0 ),
 		nAutoPos( SCPOS_INVALID ),
 		bUseTab( FALSE ),
@@ -681,12 +687,29 @@
 	}
 }
 
+IMPL_LINK( ScInputHandler, ShowHideTipVisibleParentListener, VclWindowEvent*, pEvent )
+{
+    if( pEvent->GetId() == VCLEVENT_OBJECT_DYING || pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
+	HideTip();
+    return 0;
+}
+
+IMPL_LINK( ScInputHandler, ShowHideTipVisibleSecParentListener, VclWindowEvent*, pEvent )
+{
+    if( pEvent->GetId() == VCLEVENT_OBJECT_DYING || pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
+	HideTipBelow();
+    return 0;
+}
+
 void ScInputHandler::HideTip()
 {
 	if ( nTipVisible )
 	{
+		if (pTipVisibleParent)
+			pTipVisibleParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
 		Help::HideTip( nTipVisible );
 		nTipVisible = 0;
+		pTipVisibleParent = NULL;
 	}
 	aManualTip.Erase();
 }
@@ -694,6 +717,8 @@
 {
     if ( nTipVisibleSec )
     {
+		if (pTipVisibleSecParent)
+			pTipVisibleSecParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
         Help::HideTip( nTipVisibleSec );
         nTipVisibleSec = 0;
     }
@@ -887,15 +912,16 @@
 	if (pActiveView)
 	{
 		Point aPos;
-		Window* pWin = pActiveView->GetWindow();
+		pTipVisibleParent = pActiveView->GetWindow();
 		Cursor* pCur = pActiveView->GetCursor();
 		if (pCur)
-			aPos = pWin->LogicToPixel( pCur->GetPos() );
-		aPos = pWin->OutputToScreenPixel( aPos );
+			aPos = pTipVisibleParent->LogicToPixel( pCur->GetPos() );
+		aPos = pTipVisibleParent->OutputToScreenPixel( aPos );
 		Rectangle aRect( aPos, aPos );
 
 		USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
-		nTipVisible = Help::ShowTip(pWin, aRect, rText, nAlign);
+		nTipVisible = Help::ShowTip(pTipVisibleParent, aRect, rText, nAlign);
+		pTipVisibleParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
 	}
 }
 
@@ -907,18 +933,19 @@
     if ( pActiveView )
     {
         Point aPos;
-        Window* pWin = pActiveView->GetWindow();
+        pTipVisibleSecParent = pActiveView->GetWindow();
         Cursor* pCur = pActiveView->GetCursor();
         if ( pCur )
         {
             Point aLogicPos = pCur->GetPos();
             aLogicPos.Y() += pCur->GetHeight();
-            aPos = pWin->LogicToPixel( aLogicPos );
+            aPos = pTipVisibleSecParent->LogicToPixel( aLogicPos );
         }
-        aPos = pWin->OutputToScreenPixel( aPos );
+        aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
         Rectangle aRect( aPos, aPos );
         USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP;
-        nTipVisibleSec = Help::ShowTip(pWin, aRect, rText, nAlign);
+        nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign);
+        pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
     }
 }
 
diff -ru sc.orig/source/ui/inc/inputhdl.hxx sc/source/ui/inc/inputhdl.hxx
--- sc.orig/source/ui/inc/inputhdl.hxx	2010-02-05 15:10:03.000000000 +0000
+++ sc/source/ui/inc/inputhdl.hxx	2010-02-05 20:33:39.000000000 +0000
@@ -71,7 +71,9 @@
 	TypedScStrCollection*		pColumnData;
 	TypedScStrCollection*		pFormulaData;
     TypedScStrCollection*		pFormulaDataPara;
+	Window*					pTipVisibleParent;
 	ULONG					nTipVisible;
+	Window*					pTipVisibleSecParent;
     ULONG                   nTipVisibleSec;
 	String					aManualTip;
 	String					aAutoSearch;
@@ -152,6 +154,8 @@
 	BOOL			CursorAtClosingPar();
 	void			SkipClosingPar();
 	DECL_LINK( ModifyHdl, void* );
+	DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* );
+	DECL_LINK( ShowHideTipVisibleSecParentListener, VclWindowEvent* );
 #endif
 
 public:


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2140
retrieving revision 1.2141
diff -u -p -r1.2140 -r1.2141
--- openoffice.org.spec	5 Feb 2010 09:34:51 -0000	1.2140
+++ openoffice.org.spec	6 Feb 2010 12:26:13 -0000	1.2141
@@ -135,6 +135,7 @@ Patch59: workspace.s390xport02.patch
 Patch60: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
 Patch61: openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
 Patch62: openoffice.org-3.2.0.ooo108976.svx.safestyledelete.patch
+Patch63: openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1697,6 +1698,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch60 -p1 -b .ooo108637.sfx2.uisavedir.patch
 %patch61 -p1 -b .ooo108846.sfx2.qstartfixes.patch
 %patch62 -p0 -b .ooo108976.svx.safestyledelete.patch
+%patch63 -p0 -b .ooo109009.sc.tooltipcrash.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4181,6 +4183,9 @@ fi
 %endif
 
 %changelog
+* Sat Feb 06 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.3
+- Resolves: rhbz#561989 openoffice.org-3.2.0.ooo109009.sc.tooltipcrash.patch
+
 * Wed Feb 03 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.2
 - improve pyuno multilib
 - Resolves: rhbz#561778 openoffice.org-3.2.0.oooXXXXX.svx.safestyledelete.patch



More information about the scm-commits mailing list