[Libreoffice-commits] core.git: 22 commits - basctl/source basebmp/source basegfx/source basic/inc basic/source sc/inc sc/source sd/source sw/source

Caolán McNamara caolanm at redhat.com
Mon Jan 27 06:39:12 PST 2014


 basctl/source/accessibility/accessibledialogwindow.cxx    |    3 
 basctl/source/basicide/baside2.cxx                        |    6 
 basctl/source/basicide/bastypes.cxx                       |   29 -
 basctl/source/basicide/sbxitem.cxx                        |    3 
 basctl/source/inc/accessibledialogwindow.hxx              |    4 
 basebmp/source/bitmapdevice.cxx                           |   12 
 basegfx/source/polygon/b2dpolygontools.cxx                |  215 ++++++--------
 basic/inc/sbxbase.hxx                                     |    8 
 basic/source/comp/parser.cxx                              |    2 
 basic/source/comp/token.cxx                               |   16 -
 basic/source/inc/runtime.hxx                              |    9 
 basic/source/runtime/iosys.cxx                            |    8 
 basic/source/runtime/runtime.cxx                          |   31 +-
 basic/source/sbx/sbxform.cxx                              |   23 -
 sc/inc/dispuno.hxx                                        |    3 
 sc/inc/docuno.hxx                                         |   10 
 sc/inc/shapeuno.hxx                                       |    3 
 sc/source/ui/unoobj/dispuno.cxx                           |    2 
 sc/source/ui/unoobj/docuno.cxx                            |   11 
 sc/source/ui/unoobj/shapeuno.cxx                          |    9 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |    4 
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |    2 
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx           |    4 
 sd/source/ui/inc/AccessibleDrawDocumentView.hxx           |    3 
 sw/source/core/access/accpara.cxx                         |   67 ----
 sw/source/core/access/accpara.hxx                         |    4 
 26 files changed, 249 insertions(+), 242 deletions(-)

New commits:
commit c1b7a2feb435d8e738e0636d58f027c5db4e8201
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:37:28 2014 +0000

    coverity#1078535 Division or modulo by zero
    
    Change-Id: Iab9bb56ce7646955d2592d7e9abdaf829ee1ec78

diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 4b86231..f1d0c2b 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -1462,8 +1462,16 @@ namespace
                        const ::basegfx::B2IBox& rSourceBounds )
     {
         // extract inherent scale
-        const double nScaleX( io_rDestArea.getWidth() / (double)io_rSourceArea.getWidth() );
-        const double nScaleY( io_rDestArea.getHeight() / (double)io_rSourceArea.getHeight() );
+        double fWidth = io_rSourceArea.getWidth();
+        if (fWidth == 0.0)
+            return false;
+
+        double fHeight = io_rSourceArea.getHeight();
+        if (fHeight == 0.0)
+            return false;
+
+        const double nScaleX( io_rDestArea.getWidth() / fWidth );
+        const double nScaleY( io_rDestArea.getHeight() / fHeight );
 
         // extract range origins
         const basegfx::B2IPoint   aDestTopLeft(
commit 6b44c30bcb1f8387fd1848d0052cc809600950f4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:34:01 2014 +0000

    coverity#736985 Uncaught exception
    
    Change-Id: I58f2bc50a87ed07340caa148b4ade07062d730fc

diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index ee17047..6138f29 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -961,7 +961,8 @@ sal_Bool AccessibleDialogWindow::isAccessibleChildSelected( sal_Int32 nChildInde
 
 // -----------------------------------------------------------------------------
 
-void AccessibleDialogWindow::clearAccessibleSelection(  ) throw (RuntimeException)
+void AccessibleDialogWindow::clearAccessibleSelection()
+    throw (RuntimeException, std::exception)
 {
     OExternalLockGuard aGuard( this );
 
diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx
index 884cb64..ff0e4a3 100644
--- a/basctl/source/inc/accessibledialogwindow.hxx
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -155,7 +155,9 @@ public:
     // XAccessibleSelection
     virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL clearAccessibleSelection(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL clearAccessibleSelection()
+        throw (::com::sun::star::uno::RuntimeException,
+               std::exception);
     virtual void SAL_CALL selectAllAccessibleChildren(  ) throw (::com::sun::star::uno::RuntimeException);
     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
commit d76dc580a2cb60794e91b921008b8585d5a137e4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:31:56 2014 +0000

    coverity#982152 Unchecked return value
    
    Change-Id: I58fd11e38fa0b8ba7efeff8861aeec17742999c3

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index c9719ff..d8312b5 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -948,7 +948,11 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
         case SID_DELETE:
         {
             KeyEvent aFakeDelete( 0, KEY_DELETE );
-            GetEditView()->KeyInput( aFakeDelete );
+            bool bDone = GetEditView()->KeyInput( aFakeDelete );
+            if (!bDone)
+            {
+                BaseWindow::KeyInput(aFakeDelete);
+            }
             break;
         }
         case SID_SELECTALL:
commit ec7c8f4ed1893711313221dd5fc46b6b37433df9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:29:20 2014 +0000

    nPointCount test inside nPointCount test
    
    Change-Id: I4a78683cedd04d3daef52105d44638e3fc87d3c2

diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 1ab9d80..a931edf 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3546,145 +3546,142 @@ namespace basegfx
                 const bool bCurve(rPolygon.areControlPointsUsed());
                 const bool bClosed(rPolygon.isClosed());
 
-                if(nPointCount)
+                if(bCurve)
                 {
-                    if(bCurve)
+                    // calculate target point count
+                    const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1);
+
+                    if(nLoopCount)
                     {
-                        // calculate target point count
-                        const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1);
+                        // prepare target data. The real needed number of target points (and flags)
+                        // could only be calculated by using two loops, so use dynamic memory
+                        std::vector< com::sun::star::awt::Point > aCollectPoints;
+                        std::vector< com::sun::star::drawing::PolygonFlags > aCollectFlags;
 
-                        if(nLoopCount)
-                        {
-                            // prepare target data. The real needed number of target points (and flags)
-                            // could only be calculated by using two loops, so use dynamic memory
-                            std::vector< com::sun::star::awt::Point > aCollectPoints;
-                            std::vector< com::sun::star::drawing::PolygonFlags > aCollectFlags;
+                        // reserve maximum creatable points
+                        const sal_uInt32 nMaxTargetCount((nLoopCount * 3) + 1);
+                        aCollectPoints.reserve(nMaxTargetCount);
+                        aCollectFlags.reserve(nMaxTargetCount);
 
-                            // reserve maximum creatable points
-                            const sal_uInt32 nMaxTargetCount((nLoopCount * 3) + 1);
-                            aCollectPoints.reserve(nMaxTargetCount);
-                            aCollectFlags.reserve(nMaxTargetCount);
+                        // prepare current bezier segment by setting start point
+                        B2DCubicBezier aBezierSegment;
+                        aBezierSegment.setStartPoint(rPolygon.getB2DPoint(0));
 
-                            // prepare current bezier segment by setting start point
-                            B2DCubicBezier aBezierSegment;
-                            aBezierSegment.setStartPoint(rPolygon.getB2DPoint(0));
+                        for(sal_uInt32 a(0); a < nLoopCount; a++)
+                        {
+                            // add current point (always) and remember StartPointIndex for evtl. later corrections
+                            const sal_uInt32 nStartPointIndex(aCollectPoints.size());
+                            aCollectPoints.push_back(
+                                com::sun::star::awt::Point(
+                                    fround(aBezierSegment.getStartPoint().getX()),
+                                    fround(aBezierSegment.getStartPoint().getY())));
+                            aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
+
+                            // prepare next segment
+                            const sal_uInt32 nNextIndex((a + 1) % nPointCount);
+                            aBezierSegment.setEndPoint(rPolygon.getB2DPoint(nNextIndex));
+                            aBezierSegment.setControlPointA(rPolygon.getNextControlPoint(a));
+                            aBezierSegment.setControlPointB(rPolygon.getPrevControlPoint(nNextIndex));
 
-                            for(sal_uInt32 a(0); a < nLoopCount; a++)
+                            if(aBezierSegment.isBezier())
                             {
-                                // add current point (always) and remember StartPointIndex for evtl. later corrections
-                                const sal_uInt32 nStartPointIndex(aCollectPoints.size());
+                                // if bezier is used, add always two control points due to the old schema
                                 aCollectPoints.push_back(
                                     com::sun::star::awt::Point(
-                                        fround(aBezierSegment.getStartPoint().getX()),
-                                        fround(aBezierSegment.getStartPoint().getY())));
-                                aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
+                                        fround(aBezierSegment.getControlPointA().getX()),
+                                        fround(aBezierSegment.getControlPointA().getY())));
+                                aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_CONTROL);
 
-                                // prepare next segment
-                                const sal_uInt32 nNextIndex((a + 1) % nPointCount);
-                                aBezierSegment.setEndPoint(rPolygon.getB2DPoint(nNextIndex));
-                                aBezierSegment.setControlPointA(rPolygon.getNextControlPoint(a));
-                                aBezierSegment.setControlPointB(rPolygon.getPrevControlPoint(nNextIndex));
+                                aCollectPoints.push_back(
+                                    com::sun::star::awt::Point(
+                                        fround(aBezierSegment.getControlPointB().getX()),
+                                        fround(aBezierSegment.getControlPointB().getY())));
+                                aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_CONTROL);
+                            }
 
-                                if(aBezierSegment.isBezier())
+                            // test continuity with previous control point to set flag value
+                            if(aBezierSegment.getControlPointA() != aBezierSegment.getStartPoint() && (bClosed || a))
+                            {
+                                const B2VectorContinuity eCont(rPolygon.getContinuityInPoint(a));
+
+                                if(CONTINUITY_C1 == eCont)
                                 {
-                                    // if bezier is used, add always two control points due to the old schema
-                                    aCollectPoints.push_back(
-                                        com::sun::star::awt::Point(
-                                            fround(aBezierSegment.getControlPointA().getX()),
-                                            fround(aBezierSegment.getControlPointA().getY())));
-                                    aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_CONTROL);
-
-                                    aCollectPoints.push_back(
-                                        com::sun::star::awt::Point(
-                                            fround(aBezierSegment.getControlPointB().getX()),
-                                            fround(aBezierSegment.getControlPointB().getY())));
-                                    aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_CONTROL);
+                                    aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SMOOTH;
                                 }
-
-                                // test continuity with previous control point to set flag value
-                                if(aBezierSegment.getControlPointA() != aBezierSegment.getStartPoint() && (bClosed || a))
+                                else if(CONTINUITY_C2 == eCont)
                                 {
-                                    const B2VectorContinuity eCont(rPolygon.getContinuityInPoint(a));
-
-                                    if(CONTINUITY_C1 == eCont)
-                                    {
-                                        aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SMOOTH;
-                                    }
-                                    else if(CONTINUITY_C2 == eCont)
-                                    {
-                                        aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SYMMETRIC;
-                                    }
+                                    aCollectFlags[nStartPointIndex] = com::sun::star::drawing::PolygonFlags_SYMMETRIC;
                                 }
-
-                                // prepare next loop
-                                aBezierSegment.setStartPoint(aBezierSegment.getEndPoint());
-                            }
-
-                            if(bClosed)
-                            {
-                                // add first point again as closing point due to old definition
-                                aCollectPoints.push_back(aCollectPoints[0]);
-                                aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
                             }
-                            else
-                            {
-                                // add last point as closing point
-                                const B2DPoint aClosingPoint(rPolygon.getB2DPoint(nPointCount - 1L));
-                                aCollectPoints.push_back(
-                                    com::sun::star::awt::Point(
-                                        fround(aClosingPoint.getX()),
-                                        fround(aClosingPoint.getY())));
-                                aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
-                            }
-
-                            // copy collected data to target arrays
-                            const sal_uInt32 nTargetCount(aCollectPoints.size());
-                            OSL_ENSURE(nTargetCount == aCollectFlags.size(), "Unequal Point and Flag count (!)");
 
-                            rPointSequenceRetval.realloc((sal_Int32)nTargetCount);
-                            rFlagSequenceRetval.realloc((sal_Int32)nTargetCount);
-                            com::sun::star::awt::Point* pPointSequence = rPointSequenceRetval.getArray();
-                            com::sun::star::drawing::PolygonFlags* pFlagSequence = rFlagSequenceRetval.getArray();
+                            // prepare next loop
+                            aBezierSegment.setStartPoint(aBezierSegment.getEndPoint());
+                        }
 
-                            for(sal_uInt32 a(0); a < nTargetCount; a++)
-                            {
-                                *pPointSequence = aCollectPoints[a];
-                                *pFlagSequence = aCollectFlags[a];
-                                pPointSequence++;
-                                pFlagSequence++;
-                            }
+                        if(bClosed)
+                        {
+                            // add first point again as closing point due to old definition
+                            aCollectPoints.push_back(aCollectPoints[0]);
+                            aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
+                        }
+                        else
+                        {
+                            // add last point as closing point
+                            const B2DPoint aClosingPoint(rPolygon.getB2DPoint(nPointCount - 1L));
+                            aCollectPoints.push_back(
+                                com::sun::star::awt::Point(
+                                    fround(aClosingPoint.getX()),
+                                    fround(aClosingPoint.getY())));
+                            aCollectFlags.push_back(com::sun::star::drawing::PolygonFlags_NORMAL);
                         }
-                    }
-                    else
-                    {
-                        // straightforward point list creation
-                        const sal_uInt32 nTargetCount(nPointCount + (bClosed ? 1 : 0));
+
+                        // copy collected data to target arrays
+                        const sal_uInt32 nTargetCount(aCollectPoints.size());
+                        OSL_ENSURE(nTargetCount == aCollectFlags.size(), "Unequal Point and Flag count (!)");
 
                         rPointSequenceRetval.realloc((sal_Int32)nTargetCount);
                         rFlagSequenceRetval.realloc((sal_Int32)nTargetCount);
-
                         com::sun::star::awt::Point* pPointSequence = rPointSequenceRetval.getArray();
                         com::sun::star::drawing::PolygonFlags* pFlagSequence = rFlagSequenceRetval.getArray();
 
-                        for(sal_uInt32 a(0); a < nPointCount; a++)
+                        for(sal_uInt32 a(0); a < nTargetCount; a++)
                         {
-                            const B2DPoint aB2DPoint(rPolygon.getB2DPoint(a));
-                            const com::sun::star::awt::Point aAPIPoint(
-                                fround(aB2DPoint.getX()),
-                                fround(aB2DPoint.getY()));
-
-                            *pPointSequence = aAPIPoint;
-                            *pFlagSequence = com::sun::star::drawing::PolygonFlags_NORMAL;
+                            *pPointSequence = aCollectPoints[a];
+                            *pFlagSequence = aCollectFlags[a];
                             pPointSequence++;
                             pFlagSequence++;
                         }
+                    }
+                }
+                else
+                {
+                    // straightforward point list creation
+                    const sal_uInt32 nTargetCount(nPointCount + (bClosed ? 1 : 0));
 
-                        if(bClosed)
-                        {
-                            // add first point as closing point
-                            *pPointSequence = *rPointSequenceRetval.getConstArray();
-                            *pFlagSequence = com::sun::star::drawing::PolygonFlags_NORMAL;
-                        }
+                    rPointSequenceRetval.realloc((sal_Int32)nTargetCount);
+                    rFlagSequenceRetval.realloc((sal_Int32)nTargetCount);
+
+                    com::sun::star::awt::Point* pPointSequence = rPointSequenceRetval.getArray();
+                    com::sun::star::drawing::PolygonFlags* pFlagSequence = rFlagSequenceRetval.getArray();
+
+                    for(sal_uInt32 a(0); a < nPointCount; a++)
+                    {
+                        const B2DPoint aB2DPoint(rPolygon.getB2DPoint(a));
+                        const com::sun::star::awt::Point aAPIPoint(
+                            fround(aB2DPoint.getX()),
+                            fround(aB2DPoint.getY()));
+
+                        *pPointSequence = aAPIPoint;
+                        *pFlagSequence = com::sun::star::drawing::PolygonFlags_NORMAL;
+                        pPointSequence++;
+                        pFlagSequence++;
+                    }
+
+                    if(bClosed)
+                    {
+                        // add first point as closing point
+                        *pPointSequence = *rPointSequenceRetval.getConstArray();
+                        *pFlagSequence = com::sun::star::drawing::PolygonFlags_NORMAL;
                     }
                 }
             }
commit 8cccfb8f8f793ebae4c2d5feb2674b1b2c976d9f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:22:30 2014 +0000

    coverity#441077 Dereference after null check
    
    Change-Id: Ia6a04846068e0bc500942e9a2dc6ee2e72d9d527

diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index a132e89..ea51a48 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -585,7 +585,7 @@ void SbiParser::Set()
         Error( SbERR_INVALID_OBJECT );
     TestToken( EQ );
     SbiSymDef* pDef = aLvalue.GetRealVar();
-    if( pDef && pDef->GetConstDef() )
+    if( pDef->GetConstDef() )
         Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
 
     SbiToken eTok = Peek();
commit 4e8692a3bf45565cee8116ebe1ddc3c6728540f9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 14:20:01 2014 +0000

    coverity#984078 Uninitialized scalar field
    
    Change-Id: I36b4a8c7d047f392fdbbe167a0e801b9a6d80b03

diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx
index b7338d8..315b94d 100644
--- a/basic/source/sbx/sbxform.cxx
+++ b/basic/source/sbx/sbxform.cxx
@@ -112,17 +112,20 @@ SbxBasicFormater::SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousa
                       OUString _sFalseStrg,
                       OUString _sCurrencyStrg,
                       OUString _sCurrencyFormatStrg )
+    : cDecPoint(_cDecPoint)
+    , cThousandSep(_cThousandSep)
+    , sOnStrg(_sOnStrg)
+    , sOffStrg(_sOffStrg)
+    , sYesStrg(_sYesStrg)
+    , sNoStrg(_sNoStrg)
+    , sTrueStrg(_sTrueStrg)
+    , sFalseStrg(_sFalseStrg)
+    , sCurrencyStrg(_sCurrencyStrg)
+    , sCurrencyFormatStrg(_sCurrencyFormatStrg)
+    , dNum(0.0)
+    , nNumExp(0)
+    , nExpExp(0)
 {
-    cDecPoint = _cDecPoint;
-    cThousandSep = _cThousandSep;
-    sOnStrg = _sOnStrg;
-    sOffStrg = _sOffStrg;
-    sYesStrg = _sYesStrg;
-    sNoStrg = _sNoStrg;
-    sTrueStrg = _sTrueStrg;
-    sFalseStrg = _sFalseStrg;
-    sCurrencyStrg = _sCurrencyStrg;
-    sCurrencyFormatStrg = _sCurrencyFormatStrg;
 }
 
 // function for ouput of a error-text (for debugging)
commit 3848819cac3b951e60b42332ad87cd465b20d926
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 13:13:56 2014 +0000

    coverity#707652 Uninitialized scalar field
    
    Change-Id: I6d561955454b0619255296704812b41a10ffe962

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 21ae531..8e51eb0 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -297,20 +297,25 @@ void SbiInstance::CalcBreakCallLevel( sal_uInt16 nFlags )
 }
 
 SbiInstance::SbiInstance( StarBASIC* p )
+    : pIosys(new SbiIoSystem)
+    , pDdeCtrl(new SbiDdeControl)
+    , pDllMgr(0) // on demand
+    , pBasic(p)
+    , pNumberFormatter(0)
+    , meFormatterLangType(LANGUAGE_DONTKNOW)
+    , meFormatterDateFormat(YMD)
+    , nStdDateIdx(0)
+    , nStdTimeIdx(0)
+    , nStdDateTimeIdx(0)
+    , nErr(0)
+    , nErl(0)
+    , bReschedule(true)
+    , bCompatibility(false)
+    , pRun(NULL)
+    , pNext(NULL)
+    , nCallLvl(0)
+    , nBreakCallLvl(0)
 {
-    pBasic   = p;
-    pNext    = NULL;
-    pRun     = NULL;
-    pIosys   = new SbiIoSystem;
-    pDdeCtrl = new SbiDdeControl;
-    pDllMgr  = 0; // on demand
-    pNumberFormatter = 0; // on demand
-    nCallLvl = 0;
-    nBreakCallLvl = 0;
-    nErr     =
-    nErl     = 0;
-    bReschedule = sal_True;
-    bCompatibility = sal_False;
 }
 
 SbiInstance::~SbiInstance()
commit fd7dbe5a15c3393ea9ad7c26267056743099c506
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 13:07:25 2014 +0000

    coverity#707651 Uninitialized scalar field
    
    Change-Id: I6e497d60e72efd1df6c271ce6bf8d5e46ba09ea7

diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index bbdfcf9..5ed56b5 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -126,7 +126,13 @@ IMPL_LINK_INLINE_END( SbiInputDialog, Cancel, Window *, pWindow )
 
 
 SbiStream::SbiStream()
-    : pStrm( 0 )
+    : pStrm(0)
+    , nExpandOnWriteTo(0)
+    , nLine(0)
+    , nLen(0)
+    , nMode(0)
+    , nChan(0)
+    , nError(0)
 {
 }
 
commit 81926e66d18a085687f73babcd9c29142b4a48b1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 13:05:24 2014 +0000

    coverity#707650 Uninitialized pointer field
    
    Change-Id: I6843ce28f3e1395a2ab3c5515f393cce5096674b

diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 46fc0f8..673cd07 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -69,9 +69,12 @@ struct SbiForStack {                // for/next stack:
     css::uno::Reference< css::container::XEnumeration > xEnumeration;
 
     SbiForStack( void )
-        : pArrayCurIndices( NULL )
-        , pArrayLowerBounds( NULL )
-        , pArrayUpperBounds( NULL )
+        : pNext(NULL)
+        , eForType(FOR_TO)
+        , nCurCollectionIndex(0)
+        , pArrayCurIndices(NULL)
+        , pArrayLowerBounds(NULL)
+        , pArrayUpperBounds(NULL)
     {}
     ~SbiForStack()
     {
commit 7acea5ae4ccdfba7745660e39e04aaabe4254629
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 13:01:53 2014 +0000

    coverity#707649 Uninitialized scalar field
    
    Change-Id: I1a95a051463860dc9c7b087bfaf17f3b70f297ee

diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index d283f2e..bc09744 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -211,13 +211,19 @@ TokenLabelInfo::~TokenLabelInfo()
 // the constructor detects the length of the token table
 
 SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb )
-           : SbiScanner( rSrc, pb )
+    : SbiScanner(rSrc, pb)
+    , eCurTok(NIL)
+    , ePush(NIL)
+    , nPLine(0)
+    , nPCol1(0)
+    , nPCol2(0)
+    , bEof(false)
+    , bEos(true)
+    , bKeywords(true)
+    , bAs(false)
+    , bErrorIsSymbol(true)
 {
     pTokTable = aTokTable_Basic;
-    bEof = bAs = false;
-    eCurTok = NIL;
-    ePush = NIL;
-    bEos = bKeywords = bErrorIsSymbol = true;
     if( !nToken )
     {
         const TokenTable *tp;
commit a8d7c510b41d31321f3a88db6faa34a10803a6f1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:56:14 2014 +0000

    coverity#707629 Uninitialized scalar field
    
    Change-Id: I0e3d9d4dad46e9b88be11cc9ac2c7d3c0c4b6f6e

diff --git a/basic/inc/sbxbase.hxx b/basic/inc/sbxbase.hxx
index 597f292..de1152c 100644
--- a/basic/inc/sbxbase.hxx
+++ b/basic/inc/sbxbase.hxx
@@ -41,7 +41,13 @@ struct SbxAppData
     LanguageType        eBasicFormaterLangType;
     // It might be useful to store this class 'global' because some string reosurces are saved here
 
-    SbxAppData() : eSbxError( SbxERR_OK ), aFacs(), pBasicFormater( NULL ) {}
+    SbxAppData()
+        : eSbxError(SbxERR_OK)
+        , aFacs()
+        , pBasicFormater(NULL)
+        , eBasicFormaterLangType(LANGUAGE_DONTKNOW)
+    {
+    }
     ~SbxAppData();
 };
 
commit fdc28850c6c30be6e6ef956f9ca8760bcc6bffc4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:50:53 2014 +0000

    coverity#735667 Unchecked dynamic_cast
    
    Change-Id: I747b6bcfb1e57fd3f21250b274f2f179e1982d7c

diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx
index 7a1f2e9..f2a1909 100644
--- a/basctl/source/basicide/sbxitem.cxx
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -60,9 +60,10 @@ SfxPoolItem *SbxItem::Clone(SfxItemPool*) const
 bool SbxItem::operator==(const SfxPoolItem& rCmp) const
 {
     SbxItem const* pSbxItem = dynamic_cast<SbxItem const*>(&rCmp);
-    DBG_ASSERT(pSbxItem, "==: no SbxItem!" );
+    assert(pSbxItem); //no SbxItem!
     return
         SfxPoolItem::operator==(rCmp) &&
+        pSbxItem &&
         m_aDocument == pSbxItem->m_aDocument &&
         m_aLibName == pSbxItem->m_aLibName &&
         m_aName == pSbxItem->m_aName &&
commit 01c28e33bf9144a377f29e32bb1bce607cb0d8b9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:48:35 2014 +0000

    coverity#1130421 Improper use of negative value
    
    Change-Id: Iefdd854cb0348b187b95f4a89d52482381c73dfc

diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index da1cac7..5194385 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -664,22 +664,23 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
 
     DBG_ASSERTWARNING( nStartPos != -1, "CutLines: Startzeile nicht gefunden!" );
 
-    if ( nStartPos != -1 )
-    {
-        sal_Int32 nEndPos = nStartPos;
+    if ( nStartPos == -1 )
+        return;
 
-        for ( sal_Int32 i = 0; i < nLines; i++ )
-            nEndPos = searchEOL( rStr, nEndPos+1 );
+    sal_Int32 nEndPos = nStartPos;
 
-        if ( nEndPos == -1 ) // might happen at the last line
-            nEndPos = rStr.getLength();
-        else
-            nEndPos++;
+    for ( sal_Int32 i = 0; i < nLines; i++ )
+        nEndPos = searchEOL( rStr, nEndPos+1 );
+
+    if ( nEndPos == -1 ) // might happen at the last line
+        nEndPos = rStr.getLength();
+    else
+        nEndPos++;
+
+    OUString aEndStr = rStr.copy( nEndPos );
+    rStr = rStr.copy( 0, nStartPos );
+    rStr += aEndStr;
 
-        OUString aEndStr = rStr.copy( nEndPos );
-        rStr = rStr.copy( 0, nStartPos );
-        rStr += aEndStr;
-    }
     if ( bEraseTrailingEmptyLines )
     {
         sal_Int32 n = nStartPos;
@@ -692,7 +693,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
 
         if ( n > nStartPos )
         {
-            OUString aEndStr = rStr.copy( n );
+            aEndStr = rStr.copy( n );
             rStr = rStr.copy( 0, nStartPos );
             rStr += aEndStr;
         }
commit 391cb2a6c5f4f36e26ed9eb5d05da1123797cff4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:41:07 2014 +0000

    coverity#1158283 Uncaught exception
    
    Change-Id: I1e7a5ae62b8623259333cad1984946c93c4f01b8

diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 5e378b6..a7b4b78 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3672,7 +3672,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd
 }
 
 sal_Int32 SAL_CALL SwAccessibleParagraph::addSelection( sal_Int32, sal_Int32 startOffset, sal_Int32 endOffset)
-    throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+    throw (::com::sun::star::lang::IndexOutOfBoundsException,
+           ::com::sun::star::uno::RuntimeException,
+           std::exception)
 {
     SolarMutexGuard aGuard;
 
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index a758567..f83e43f 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -419,7 +419,9 @@ public:
     virtual sal_Bool SAL_CALL removeSelection( sal_Int32 selectionIndex )
         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     virtual sal_Int32 SAL_CALL  addSelection( sal_Int32 selectionIndex, sal_Int32 startOffset, sal_Int32 endOffset)
-        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        throw (::com::sun::star::lang::IndexOutOfBoundsException,
+               ::com::sun::star::uno::RuntimeException,
+               std::exception);
     // XAccessibleExtendedAttributes
     virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
commit 6b554dd8f6c9bd2ec9cc9b35b951f7499c6bd6f4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:38:02 2014 +0000

    coverity#1158303 Uncaught exception
    
    Change-Id: I8d718da4274c26a817643b0e2b0ccf38d9b54de1

diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 3eee56d..0e62b837 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -547,7 +547,7 @@ uno::Sequence< sal_Int32 > SAL_CALL
 }
 
 OUString AccessibleDrawDocumentView::getObjectLink( const uno::Any& rAny )
-    throw (uno::RuntimeException)
+    throw (uno::RuntimeException, std::exception)
 {
     OUString aRet;
     //get the xShape of the current selected drawing object
diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
index d6a3d02..1fd839c 100644
--- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
+++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
@@ -107,7 +107,8 @@ public:
         getGroupPosition( const ::com::sun::star::uno::Any& rAny )
         throw (::com::sun::star::uno::RuntimeException);
     virtual OUString SAL_CALL getObjectLink( const ::com::sun::star::uno::Any& accoject )
-        throw (::com::sun::star::uno::RuntimeException);
+        throw (::com::sun::star::uno::RuntimeException,
+               std::exception);
 
 protected:
 
commit 3858bddcd5fd56c83ae4d2089a24507e1d56ffed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:36:39 2014 +0000

    coverity#1158304 Uncaught exception
    
    Change-Id: Ia64eb628002ad239cbd86674c98719048cc53090

diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index cd41a1e..273e1a8 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -830,7 +830,9 @@ void
 }
 
 uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
-        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+    throw (::com::sun::star::lang::IndexOutOfBoundsException,
+           ::com::sun::star::uno::RuntimeException,
+           std::exception)
 {
     uno::Any anyAtrribute;
     OUString sValue;
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 2ffee94..687ae6f 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -259,7 +259,9 @@ public:
         throw (::com::sun::star::uno::RuntimeException);
     //----------------------------xAttribute----------------------------
     virtual com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
-        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+        throw (::com::sun::star::lang::IndexOutOfBoundsException,
+               ::com::sun::star::uno::RuntimeException,
+               std::exception);
      ::sd::ViewShell* mpViewShell;
 private:
 
commit 75d22a5d1f5fc587cd27ff715680d273449043ef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:34:47 2014 +0000

    coverity#1158321 Uncaught exception
    
    Change-Id: Ib3ef8f068cd8a366369cbb22dccc9c916439c2cd

diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx
index 07618ca..7916990 100644
--- a/sc/inc/shapeuno.hxx
+++ b/sc/inc/shapeuno.hxx
@@ -108,7 +108,8 @@ public:
                                     ::com::sun::star::beans::PropertyVetoException,
                                     ::com::sun::star::lang::IllegalArgumentException,
                                     ::com::sun::star::lang::WrappedTargetException,
-                                    ::com::sun::star::uno::RuntimeException);
+                                    ::com::sun::star::uno::RuntimeException,
+                                    std::exception);
     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
                                     const OUString& PropertyName )
                                 throw(::com::sun::star::beans::UnknownPropertyException,
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 10d3110..6d7d942 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -333,11 +333,10 @@ static awt::Point lcl_GetRelativePos( uno::Reference< drawing::XShape >& xShape,
     return aUnoPoint;
 }
 
-void SAL_CALL ScShapeObj::setPropertyValue(
-                        const OUString& aPropertyName, const uno::Any& aValue )
-                throw(beans::UnknownPropertyException, beans::PropertyVetoException,
-                        lang::IllegalArgumentException, lang::WrappedTargetException,
-                        uno::RuntimeException)
+void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const uno::Any& aValue)
+    throw(beans::UnknownPropertyException, beans::PropertyVetoException,
+          lang::IllegalArgumentException, lang::WrappedTargetException,
+          uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
     OUString aNameString(aPropertyName);
commit f8ca1aa514308db08bb6a6173d03ec5c1f0d2b2a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:33:32 2014 +0000

    coverity#1158322 Uncaught exception
    
    Change-Id: I213562d62f0b0e798f88ade4bc654c6d8a6c53fa

diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 952c1f5..56ec909 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -575,7 +575,8 @@ public:
                                     const OUString& PropertyName )
                                 throw(::com::sun::star::beans::UnknownPropertyException,
                                     ::com::sun::star::lang::WrappedTargetException,
-                                    ::com::sun::star::uno::RuntimeException);
+                                    ::com::sun::star::uno::RuntimeException,
+                                    std::exception);
     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
                                     const ::com::sun::star::uno::Reference<
                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4fba8de..c5eeff8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3124,8 +3124,8 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
 }
 
 uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const OUString& aPropertyName )
-                throw(beans::UnknownPropertyException, lang::WrappedTargetException,
-                        uno::RuntimeException)
+    throw(beans::UnknownPropertyException, lang::WrappedTargetException,
+          uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
     if (!pDocShell)
commit b9a2c2e58c1544b81d09a9c4dbe1d21d11c1f5ed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:32:32 2014 +0000

    coverity#1158323 Uncaught exception
    
    Change-Id: I26d1730636b172aa4b9f8b2b9593f408cd466118

diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 2d0c362..952c1f5 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -798,7 +798,9 @@ public:
                                 throw(::com::sun::star::uno::RuntimeException);
 
                             /// XIndexAccess
-    virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getCount()
+                                throw(::com::sun::star::uno::RuntimeException,
+                                      std::exception);
     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
                                 throw(::com::sun::star::lang::IndexOutOfBoundsException,
                                     ::com::sun::star::lang::WrappedTargetException,
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index bafc71e..4fba8de 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3596,7 +3596,8 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera
 
 // XIndexAccess
 
-sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException)
+sal_Int32 SAL_CALL ScAnnotationsObj::getCount()
+    throw(uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
     sal_Int32 nCount = 0;
commit c17d9288a8631f7cbe16134e7ccd1bfc8776b014
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:31:22 2014 +0000

    coverity#1158324 Uncaught exception
    
    Change-Id: Ia7ae803ebe1a0052de41c94a0015eaa079bdd090

diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index da23e4e..2d0c362 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -670,7 +670,8 @@ public:
                                     const OUString& PropertyName )
                                 throw(::com::sun::star::beans::UnknownPropertyException,
                                     ::com::sun::star::lang::WrappedTargetException,
-                                    ::com::sun::star::uno::RuntimeException);
+                                    ::com::sun::star::uno::RuntimeException,
+                                    std::exception);
     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
                                     const ::com::sun::star::uno::Reference<
                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 088a7a9..bafc71e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3397,8 +3397,8 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
 }
 
 uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyName )
-                throw(beans::UnknownPropertyException, lang::WrappedTargetException,
-                        uno::RuntimeException)
+    throw(beans::UnknownPropertyException, lang::WrappedTargetException,
+          uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
     if (!pDocShell)
commit 08b39627dfd1ce9732643e9a5b2187e40f6212fc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 12:29:36 2014 +0000

    coverity#1158325 Uncaught exception
    
    Change-Id: Ic84faeda99242240c160a9925f37a631a1f294ae

diff --git a/sc/inc/dispuno.hxx b/sc/inc/dispuno.hxx
index 841d234..2676e7d 100644
--- a/sc/inc/dispuno.hxx
+++ b/sc/inc/dispuno.hxx
@@ -132,7 +132,8 @@ public:
 
                             /// XSelectionChangeListener
     virtual void SAL_CALL   selectionChanged( const ::com::sun::star::lang::EventObject& aEvent )
-                                throw (::com::sun::star::uno::RuntimeException);
+                                throw (::com::sun::star::uno::RuntimeException,
+                                       std::exception);
 
                             /// XEventListener
     virtual void SAL_CALL   disposing( const ::com::sun::star::lang::EventObject& Source )
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 2ac9435..787a1d2 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -347,7 +347,7 @@ void SAL_CALL ScDispatch::removeStatusListener(
 // XSelectionChangeListener
 
 void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventObject& /* aEvent */ )
-                                throw (::com::sun::star::uno::RuntimeException)
+    throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
     //  currently only called for URL cURLDocDataSource
 
commit ca59c9f3ec5a5e4a68cba6d0393908953891f851
Author: Steve Yin <steve_y at apache.org>
Date:   Mon Jan 27 10:52:11 2014 +0000

    Resolves: #i123745# [IA2] Eventual crash in Writer documents containing...
    
    cross-references
    
    Removed some unused lines and comments
    (cherry picked from commit c5e03eac50d6c20e41aa4e60cf46c898653329d1)
    
    Conflicts:
    	sw/source/core/access/accpara.cxx
    
    Change-Id: Ie4d68bdeac048f8ee345fc3e831be6a1edae452c

diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 3911782..5e378b6 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1814,11 +1814,11 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
         {
             aValues.realloc( aValues.getLength() + 1 );
             pValues = aValues.getArray();
-            rValue = pValues[aValues.getLength() - 1];
-            rValue.Name = OUString("FieldType");
-            rValue.Value <<= strTypeName.toAsciiLowerCase();
-            rValue.Handle = -1;
-            rValue.State = PropertyState_DIRECT_VALUE;
+            PropertyValue& rValueFT = pValues[aValues.getLength() - 1];
+            rValueFT.Name = OUString("FieldType");
+            rValueFT.Value <<= strTypeName.toAsciiLowerCase();
+            rValueFT.Handle = -1;
+            rValueFT.State = PropertyState_DIRECT_VALUE;
         }
 
         //sort property values
@@ -2241,9 +2241,6 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl(
 
     tAccParaPropValMap aSupplementalAttrSeq;
     {
-//        const SfxItemPropertySet& rPropSet =
-//                    aSwMapProvider.GetPropertyMap( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE );
-//        const SfxItemPropertyMap* pPropMap( rPropSet.getPropertyMap() );
         const SfxItemPropertyMapEntry* pPropMap(
                 aSwMapProvider.GetPropertyMapEntries( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
         while ( !pPropMap->aName.isEmpty() )
@@ -3278,14 +3275,6 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
     while( aIter.next() )
         nCount++;
 
-    /* Can't fin the function "GetTOCFirstWordEndIndex" declaration in sym2.0 (Added by yanjun)
-    if( GetTOXSortTabBase()  )
-    {
-        SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());
-        if(pNode && pNode->GetTOCFirstWordEndIndex() > 0)
-            nCount++;
-    }
-    */
     return nCount;
 }
 
@@ -4096,45 +4085,6 @@ sal_Int16 SAL_CALL SwAccessibleParagraph::getAccessibleRole (void) throw (::com:
     }
 }
 
-// End Add
-
-
-/* This funcion is already defined in accpara.cxx(Added by yanjun)
-sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground()
-        throw (::com::sun::star::uno::RuntimeException)
-{
-// Test Code
-//     Sequence<OUString> seNames(1);
-//     OUString* pStrings = seNames.getArray();
-//  pStrings[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("ParaBackColor"));
-//
-//     Sequence<Any> aAnys(1);
-//  Reference<XMultiPropertySet> xPortion = CreateUnoPortion( 0, 0 );
-//     aAnys = xPortion->getPropertyValues( seNames );
-//  const Any* pAnys = aAnys.getConstArray();
-//
-//  sal_uInt32 crColorT=0;
-//  pAnys[0] >>= crColorT;
-// End Test Code
-
-    const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
-    sal_uInt32 crBack = rBack.GetColor().GetColor();
-
-    if (COL_AUTO == crBack)
-    {
-        Reference<XAccessible> xAccDoc = getAccessibleParent();
-        if (xAccDoc.is())
-        {
-            Reference<XAccessibleComponent> xCompoentDoc(xAccDoc,UNO_QUERY);
-            if (xCompoentDoc.is())
-            {
-                crBack = (sal_uInt32)xCompoentDoc->getBackground();
-            }
-        }
-    }
-    return crBack;
-}
-*/
 
 //Get the real heading level, Heading1 ~ Heading10
 sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
@@ -4145,8 +4095,7 @@ sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
     OUString sValue;
     if (styleAny >>= sValue)
     {
-        //Modified by yanjun for acc migration
-        sal_Int32 length = sValue.getLength/*GetCharCount*/();
+        sal_Int32 length = sValue.getLength();
         if (length == 9 || length == 10)
         {
             OUString headStr = sValue.copy(0, 7);


More information about the Libreoffice-commits mailing list