[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source

Caolán McNamara caolanm at redhat.com
Mon Jan 6 07:29:38 PST 2014


 sc/inc/scabstdlg.hxx               |    6 ------
 sc/source/ui/attrdlg/scdlgfact.cxx |   21 ---------------------
 sc/source/ui/attrdlg/scdlgfact.hxx |    6 ------
 sc/source/ui/optdlg/tpusrlst.cxx   |    8 ++++----
 4 files changed, 4 insertions(+), 37 deletions(-)

New commits:
commit 8c0bb201382d839124fb9a9c8906e2c2018a6939
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 6 15:24:23 2014 +0000

    avoid out of bounds string access
    
    Change-Id: I0a0affea08528fc9bd729ab01cdb5fa6e9f8e18f

diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 2b986ce..89c9d19 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -333,14 +333,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
     while ( c < nLen )
     {
         rListStr += OUString(aStr[c]);
-        c++;
+        ++c;
 
-        if ( aStr[c] == cDelimiter )
+        if ((c < nLen) && (aStr[c] == cDelimiter))
         {
             rListStr += OUString(aStr[c]);
 
-            while ( (c < nLen) && (aStr[c] == cDelimiter) )
-                c++;
+            while ((c < nLen) && (aStr[c] == cDelimiter))
+                ++c;
         }
     }
 
commit 894a3598371c812604832bb1b698ede58cae4427
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 6 15:20:37 2014 +0000

    CreateScColOrRowDlg is unused
    
    Change-Id: I1194d111eff8eeafb656d743af12d71523a65ac8

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index dc1b17f..52d52bc 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -342,12 +342,6 @@ public:
                                                                 sal_Bool bCol = false,
                                                                 sal_Bool bRow = false) = 0;
 
-    virtual VclAbstractDialog * CreateScColOrRowDlg( Window*            pParent,
-                                                    const OUString&   rStrTitle,
-                                                    const OUString&   rStrLabel,
-                                                    int nId,
-                                                    sal_Bool                bColDefault = sal_True ) = 0;
-
     virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) = 0;
 
     virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 9e3f47e..cf1208e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -657,27 +657,6 @@ AbstractScColRowLabelDlg *  ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg
     return 0;
 }
 
-VclAbstractDialog *  ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*          pParent,
-                                                    const OUString&   rStrTitle,
-                                                    const OUString&   rStrLabel,
-                                                    int nId,
-                                                    sal_Bool                bColDefault)
-{
-    Dialog * pDlg=NULL;
-    switch ( nId )
-    {
-        case RID_SCDLG_COLORROW :
-            pDlg = new ScColOrRowDlg( pParent, rStrTitle,rStrLabel,bColDefault );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new ScVclAbstractDialog_Impl( pDlg );
-    return 0;
-}
-
 AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const OUString& rExtendText, const OUString& rCurrentText )
 {
     ScSortWarningDlg* pDlg = new ScSortWarningDlg(pParent, rExtendText, rCurrentText );
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 91c450b..6043574 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -411,12 +411,6 @@ public:
                                                                 sal_Bool bCol = false,
                                                                 sal_Bool bRow = false);
 
-    virtual VclAbstractDialog * CreateScColOrRowDlg( Window*            pParent,
-                                                    const OUString&   rStrTitle,
-                                                    const OUString&   rStrLabel,
-                                                    int nId,
-                                                    sal_Bool                bColDefault = sal_True );
-
     virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(Window* pParent, const OUString& rExtendText, const OUString& rCurrentText );
 
     virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,


More information about the Libreoffice-commits mailing list