[openoffice.org/f14] Resolves: rhbz#697176 framework crash in dock restoration
Caolan McNamara
caolanm at fedoraproject.org
Wed Aug 3 08:16:59 UTC 2011
commit 2f28090ed0645736fe1f3e72fb86328dc5f26b22
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 3 09:16:42 2011 +0100
Resolves: rhbz#697176 framework crash in dock restoration
...office.org-3.3.0.rh697176.framework.crash.patch | 78 ++++++++++++++++++++
openoffice.org.spec | 5 +-
2 files changed, 82 insertions(+), 1 deletions(-)
---
diff --git a/openoffice.org-3.3.0.rh697176.framework.crash.patch b/openoffice.org-3.3.0.rh697176.framework.crash.patch
new file mode 100644
index 0000000..2cbb197
--- /dev/null
+++ b/openoffice.org-3.3.0.rh697176.framework.crash.patch
@@ -0,0 +1,78 @@
+--- framework/source/layoutmanager/layoutmanager.cxx 2011-08-03 09:07:32.131578407 +0100
++++ framework/source/layoutmanager/layoutmanager.cxx 2011-08-03 09:09:19.423765428 +0100
+@@ -6057,9 +6057,12 @@
+ Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_TOP] );
+ aReadLock.unlock();
+
+- xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, css::awt::PosSize::POSSIZE );
+- xDockAreaWindow->setVisible( sal_True );
+- nLeftRightDockingAreaHeight -= rBorderSpace.Y;
++ if (xDockAreaWindow.is())
++ {
++ xDockAreaWindow->setPosSize( 0, 0, aContainerClientSize.Width, rBorderSpace.Y, css::awt::PosSize::POSSIZE );
++ xDockAreaWindow->setVisible( sal_True );
++ nLeftRightDockingAreaHeight -= rBorderSpace.Y;
++ }
+ }
+
+ if ( rBorderSpace.Height >= 0 )
+@@ -6072,9 +6075,12 @@
+ Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] );
+ aReadLock.unlock();
+
+- xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, css::awt::PosSize::POSSIZE );
+- xDockAreaWindow->setVisible( sal_True );
+- nLeftRightDockingAreaHeight -= nHeight;
++ if (xDockAreaWindow.is())
++ {
++ xDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, css::awt::PosSize::POSSIZE );
++ xDockAreaWindow->setVisible( sal_True );
++ nLeftRightDockingAreaHeight -= nHeight;
++ }
+ }
+
+ nLeftRightDockingAreaHeight -= aStatusBarSize.Height();
+@@ -6085,11 +6091,15 @@
+ Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_LEFT] );
+ aReadLock.unlock();
+
+- // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
+- sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
++ if (xDockAreaWindow.is())
++ {
++ // We also have to change our right docking area window if the top
++ // or bottom area has changed. They have a higher priority!
++ sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
+
+- xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE );
+- xDockAreaWindow->setVisible( sal_True );
++ xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE );
++ xDockAreaWindow->setVisible( sal_True );
++ }
+ }
+ if ( rBorderSpace.Width >= 0 || nLeftRightDockingAreaHeight > 0 )
+ {
+@@ -6098,13 +6108,17 @@
+ Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_RIGHT] );
+ aReadLock.unlock();
+
+- // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
+- sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width ));
+- sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
+- sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width;
++ if (xDockAreaWindow.is())
++ {
++ // We also have to change our right docking area window if the top
++ // or bottom area has changed. They have a higher priority!
++ sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width ));
++ sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
++ sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width;
+
+- xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE );
+- xDockAreaWindow->setVisible( sal_True );
++ xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE );
++ xDockAreaWindow->setVisible( sal_True );
++ }
+ }
+
+ // Position the status bar
diff --git a/openoffice.org.spec b/openoffice.org.spec
index 13077a2..176b445 100644
--- a/openoffice.org.spec
+++ b/openoffice.org.spec
@@ -175,6 +175,7 @@ Patch91: 0001-Resolves-rhbz-695509-crash-in-RefreshDocumentLB.patch
Patch92: 0001-Related-rhbz-652604-better-survive-exceptions-thrown.patch
Patch93: 0001-Related-rhbz-702833-addEventListener-without-removeE.patch
Patch94: 0001-Resolves-rhbz-693265-fix-crash-from-unhandled-except.patch
+Patch95: openoffice.org-3.3.0.rh697176.framework.crash.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@@ -1766,6 +1767,7 @@ cp -p %{SOURCE5} external/unowinreg/unowinreg.dll
%patch92 -p1 -b .rhbz652604-better-survive-exceptions-thrown.patch
%patch93 -p1 -b .rhbz702833-addEventListener-without-removeE.patch
%patch94 -p1 -b .rhbz693265-fix-crash-from-unhandled-except.patch
+%patch95 -p1 -b .rh697176.framework.crash.patch
touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip
@@ -3961,9 +3963,10 @@ unopkg remove --shared org.openoffice.legacy.ScriptProviderForPython.zip > /dev/
%endif
%changelog
-* Tue Aug 02 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-20.7-UNBUILT
+* Wed Aug 02 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-20.7-UNBUILT
- Related: rhbz#702833 addEventListener without removeEventListener
- Resolves: rhbz#693265 fix crash from unhandled exception
+- Resolves: rhbz#697176 framework crash in dock restoration
* Wed Jun 08 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-20.6
- Resolves: rhbz#695509 crash in RefreshDocumentLB
More information about the scm-commits
mailing list