rpms/openoffice.org/devel openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch, NONE, 1.1 openoffice.org.spec, 1.2126, 1.2127 openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch, 1.2, NONE

David Tardon dtardon at fedoraproject.org
Sat Jan 16 09:16:10 UTC 2010


Author: dtardon

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

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch 
Removed Files:
	openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch 
Log Message:
Related: rhbz#553929 fix the real cause of the crash

openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch:
 optcolor.cxx |   38 ++++++++++++++++++++++++++------------
 1 file changed, 26 insertions(+), 12 deletions(-)

--- NEW FILE openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch ---
diff -r aa65062d8d37 svx/source/cui/optcolor.cxx
--- a/svx/source/cui/optcolor.cxx	Mon Jan 11 19:41:39 2010 +0100
+++ b/svx/source/cui/optcolor.cxx	Sat Jan 16 10:03:24 2010 +0100
@@ -261,6 +261,9 @@
     virtual void    Command( const CommandEvent& rCEvt );
     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
 
+    // calculate position behind last chapter
+    sal_Int32 impl_getPosBehindLastChapter() const;
+
 public:
     ColorConfigWindow_Impl(Window* pParent, const ResId& rResId);
     ~ColorConfigWindow_Impl();
@@ -398,7 +401,7 @@
 
 /* -----------------------------25.03.2002 17:05------------------------------
 
- ---------------------------------------------------------------------------*/
+---------------------------------------------------------------------------*/
 ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rResId) :
         Window(pParent, rResId),
         aGeneralBackWN(this),
@@ -709,14 +712,14 @@
     aChapters[GROUP_CALC    ]->SetGroupHeight( aChapters[GROUP_DRAW]->GetPosPixel().Y() -  aChapters[GROUP_CALC]->GetPosPixel().Y() );
     aChapters[GROUP_DRAW    ]->SetGroupHeight( aChapters[GROUP_BASIC]->GetPosPixel().Y() - aChapters[GROUP_DRAW]->GetPosPixel().Y() );
 	aChapters[GROUP_BASIC   ]->SetGroupHeight( aChapters[GROUP_SQL]->GetPosPixel().Y() - aChapters[GROUP_BASIC]->GetPosPixel().Y() );
+    aChapters[GROUP_SQL]->SetGroupHeight(impl_getPosBehindLastChapter()
+            - aChapters[GROUP_SQL]->GetPosPixel().Y());
 
     ExtendedColorConfig aExtConfig;
 	sal_Int32 nExtCount = aExtConfig.GetComponentCount();
 	if ( nExtCount )
 	{
-        // calculate position behind last chapter
-        sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
-        nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+        const sal_Int32 nLastY(impl_getPosBehindLastChapter());
         // to calculate the number of lines
         sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height();
         sal_Int32 nLineNum = nLastY / nHeight;
@@ -898,6 +901,15 @@
 	aChapterWins.clear();
 	::std::vector< Window*>().swap(aChapterWins);
 }
+
+sal_Int32
+ColorConfigWindow_Impl::impl_getPosBehindLastChapter() const
+{
+    sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
+    nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
+    return nLastY;
+}
+
 /* -----------------------------2002/06/20 12:48------------------------------
 
  ---------------------------------------------------------------------------*/
@@ -1175,9 +1187,9 @@
 /* -----------------------------26.03.2002 12:55------------------------------
 
  ---------------------------------------------------------------------------*/
-sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow)
+sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, sal_Bool _bShow)
 {
-    BOOL bHide = TRUE;
+    sal_Bool bHide = TRUE;
     if(pWindow)
     {
         Point aPos = pWindow->GetPosPixel();
@@ -1206,12 +1218,14 @@
             continue;
         Point aPos;
         //controls outside of the view need to be hidden to speed up accessibility tools
-        bool bShowCtrl = ( lcl_isGroupVisible(
+        sal_Bool bShowCtrl = ( lcl_isGroupVisible(
             lcl_getGroup(i), aScrollWindow.GetModuleOptions() ) != sal_False );
-        lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl);
-        lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl);
-        lcl_MoveAndShow(aScrollWindow.aWindows[i]   , nOffset, nWindowHeight, bShowCtrl);
-        BOOL bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl);
+        // if any of the items on the current line is visible, the
+        // whole line should be visible
+        sal_Bool bShow(lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl));
+        bShow = lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
+        bShow = lcl_MoveAndShow(aScrollWindow.aWindows[i]   , nOffset, nWindowHeight, bShowCtrl) || bShow;
+        bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
         if(bShow)
         {
             if(nFirstVisible == -1)
@@ -1223,7 +1237,7 @@
     //show the one prior to the first visible and the first after the last visble control
     //to enable KEY_TAB travelling
 
-    if(nFirstVisible)
+    if(nFirstVisible > 0)
     {
         //skip gaps where no controls exist for the related ColorConfigEntry
         do


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2126
retrieving revision 1.2127
diff -u -p -r1.2126 -r1.2127
--- openoffice.org.spec	14 Jan 2010 17:25:14 -0000	1.2126
+++ openoffice.org.spec	16 Jan 2010 09:16:10 -0000	1.2127
@@ -126,7 +126,7 @@ Patch50: openoffice.org-3.2.0.ooo106502.
 Patch51: openoffice.org-3.2.0.ooo47279.sd.objectsave.safe.patch
 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
+Patch54: openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
 Patch55: workspace.sw33bf02.patch
 Patch56: openoffice.org-3.2.0.ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
 Patch57: openoffice.org-3.2.0.ooo96362.filter.nondeterministic.order.patch
@@ -1684,7 +1684,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch51 -p0 -b .ooo47279.sd.objectsave.safe.patch
 %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
+%patch54 -p1 -b .ooo108246.svx.hide-sql-group-when-inactive.patch
 %patch55 -p1 -b .workspace.sw33bf02.patch
 %patch56 -p0 -b .ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
 %patch57 -p0 -b .ooo96362.filter.nondeterministic.order.patch


--- openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch DELETED ---



More information about the scm-commits mailing list