[Libreoffice-commits] core.git: cui/source

Norbert Thiebaud nthiebaud at gmail.com
Fri Jun 21 04:48:14 PDT 2013


 cui/source/tabpages/backgrnd.cxx |   52 +++++++++++++++++++++------------------
 1 file changed, 28 insertions(+), 24 deletions(-)

New commits:
commit def4471b3d5665bda3d323520cc16ce3d2ec7636
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Thu Jun 20 14:56:49 2013 -0500

    coverity#707511 Unitialized pointer read
    
    Change-Id: I2b8441dba51d0ed96dc60d6573d8b46e767fe23b
    Reviewed-on: https://gerrit.libreoffice.org/4411
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index a8ce0a7..e6c9933 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1631,17 +1631,20 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
         sal_uInt16 nWhich = 0;
         switch(pTableBck_Impl->nActPos)
         {
-            case TBL_DEST_CELL:
-                *pActItem = pTableBck_Impl->pCellBrush;
-                nWhich = pTableBck_Impl->nCellWhich;
+        case TBL_DEST_CELL:
+            *pActItem = pTableBck_Impl->pCellBrush;
+            nWhich = pTableBck_Impl->nCellWhich;
             break;
-            case TBL_DEST_ROW:
-                *pActItem = pTableBck_Impl->pRowBrush;
-                nWhich = pTableBck_Impl->nRowWhich;
+        case TBL_DEST_ROW:
+            *pActItem = pTableBck_Impl->pRowBrush;
+            nWhich = pTableBck_Impl->nRowWhich;
             break;
-            case TBL_DEST_TBL:
-                *pActItem = pTableBck_Impl->pTableBrush;
-                nWhich = pTableBck_Impl->nTableWhich;
+        case TBL_DEST_TBL:
+            *pActItem = pTableBck_Impl->pTableBrush;
+            nWhich = pTableBck_Impl->nTableWhich;
+            break;
+        default:
+            *pActItem = NULL;
             break;
         }
         pTableBck_Impl->nActPos = nSelPos;
@@ -1671,23 +1674,24 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
         }
         switch(nSelPos)
         {
-            case TBL_DEST_CELL:
-                *pActItem = pTableBck_Impl->pCellBrush;
-                m_pLbSelect->Enable();
-                nWhich = pTableBck_Impl->nCellWhich;
+        case TBL_DEST_CELL:
+            *pActItem = pTableBck_Impl->pCellBrush;
+            m_pLbSelect->Enable();
+            nWhich = pTableBck_Impl->nCellWhich;
             break;
-            case TBL_DEST_ROW:
-            {
-                if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_SOME_STYLES))
-                    m_pLbSelect->Disable();
-                *pActItem = pTableBck_Impl->pRowBrush;
-                nWhich = pTableBck_Impl->nRowWhich;
-            }
+        case TBL_DEST_ROW:
+            if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_SOME_STYLES))
+                m_pLbSelect->Disable();
+            *pActItem = pTableBck_Impl->pRowBrush;
+            nWhich = pTableBck_Impl->nRowWhich;
             break;
-            case TBL_DEST_TBL:
-                *pActItem = pTableBck_Impl->pTableBrush;
-                m_pLbSelect->Enable();
-                nWhich = pTableBck_Impl->nTableWhich;
+        case TBL_DEST_TBL:
+            *pActItem = pTableBck_Impl->pTableBrush;
+            m_pLbSelect->Enable();
+            nWhich = pTableBck_Impl->nTableWhich;
+            break;
+        default:
+            *pActItem = NULL;
             break;
         }
         String aUserData = GetUserData();


More information about the Libreoffice-commits mailing list