rpms/openoffice.org/F-12 openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch, NONE, 1.1 openoffice.org.spec, 1.2054, 1.2055 openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch, 1.1, NONE

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


Author: dtardon

Update of /cvs/extras/rpms/openoffice.org/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22081

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 0fa6864c75c3 svx/source/dialog/optcolor.cxx
--- a/svx/source/dialog/optcolor.cxx	Mon Jan 04 19:54:38 2010 +0100
+++ b/svx/source/dialog/optcolor.cxx	Sat Jan 16 09:15:45 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/F-12/openoffice.org.spec,v
retrieving revision 1.2054
retrieving revision 1.2055
diff -u -p -r1.2054 -r1.2055
--- openoffice.org.spec	14 Jan 2010 15:53:53 -0000	1.2054
+++ openoffice.org.spec	16 Jan 2010 09:14:15 -0000	1.2055
@@ -187,7 +187,7 @@ Patch109: openoffice.org-3.2.0.ooo107834
 Patch110: workspace.extmgr01.patch
 Patch111: openoffice.org-3.3.0.ooo108047.writerfilter.safer-field-context-handling.patch
 Patch112: workspace.impress182.patch
-Patch113: openoffice.org-3.3.0.ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+Patch113: openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
 Patch114: workspace.sw33bf02.patch
 Patch115: openoffice.org-3.3.0.ooo80674.cmyk-for-jpeg-images.patch
 
@@ -1771,7 +1771,7 @@ cat %{PATCH11} >> svtools/source/dialogs
 %patch110 -p1 -b .workspace.extmgr01.patch
 %patch111 -p1 -b .ooo108047.writerfilter.safer-field-context-handling.patch
 %patch112 -p1 -b .workspace.impress182.patch
-%patch113 -p1 -b .ooo108246.svx.check-for-possible-out-of-bounds-index.patch
+%patch113 -p1 -b .ooo108246.svx.hide-sql-group-when-inactive.patch
 %patch114 -p1 -b .workspace.sw33bf02.patch
 %patch115 -p1 -b .ooo80674.cmyk-for-jpeg-images.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