include/svx/AccessibleControlShape.hxx | 2 +- oox/source/vml/vmlshape.cxx | 11 +++++++---- sc/source/ui/vba/excelvbahelper.cxx | 4 ++-- sc/source/ui/vba/excelvbahelper.hxx | 4 ++-- sc/source/ui/vba/vbaeventshelper.cxx | 2 +- sc/source/ui/vba/vbaeventshelper.hxx | 2 +- sd/source/ui/slideshow/slideshowimpl.cxx | 2 +- sd/source/ui/slideshow/slideshowimpl.hxx | 2 +- sfx2/source/dialog/templdlg.cxx | 1 + svx/source/accessibility/AccessibleControlShape.cxx | 2 +- svx/source/svdraw/sdrpaintwindow.cxx | 7 +++---- sw/qa/extras/uiwriter/uiwriter.cxx | 2 ++ vcl/source/fontsubset/sft.cxx | 2 +- 13 files changed, 24 insertions(+), 19 deletions(-)
New commits: commit 4999ebf208c5626ecb72fa6b2da11610268d8ad0 Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:24:26 2015 +0100 coverity#1213369 Untrusted value as argument Change-Id: I3560bc689b2ffd44662678b62e18ce047efb22cc diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 999a697..60eda64 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1721,7 +1721,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) for( i = 0; i <= (int)t->nglyphs; ++i ) t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) << 1; } else if( getTable(t, O_CFF) ) { /* PS-OpenType */ - int k = getTableSize(t, O_CFF); /* set a limit here, presumably much lower than the table size, but establishes some sort of physical bound */ + int k = (getTableSize(t, O_CFF) / 2) - 1; /* set a limit here, presumably much lower than the table size, but establishes some sort of physical bound */ if( k < (int)t->nglyphs ) t->nglyphs = k; t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32))); commit ba59a17f7caa5f02828b89b54df63fcc5b580fd4 Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:20:38 2015 +0100 coverity#1308596 Uncaught exception Change-Id: Iaa59e208ed383ed9805f30ec177dd27a38c95773 diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 70370df..055eb16 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -87,7 +87,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang } uno::Reference< XHelperInterface > -getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) +getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException, std::exception ) { uno::Reference< sheet::XSheetCellRange > xSheetRange( xRange, uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheet > xSheet( xSheetRange->getSpreadsheet(), uno::UNO_SET_THROW ); @@ -272,7 +272,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& x } uno::Reference< XHelperInterface > -getUnoSheetModuleObj( const uno::Reference< table::XCell >& xCell ) throw ( uno::RuntimeException ) +getUnoSheetModuleObj( const uno::Reference< table::XCell >& xCell ) throw ( uno::RuntimeException, std::exception ) { uno::Reference< sheet::XSheetCellRange > xSheetRange( xCell, uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheet > xSheet( xSheetRange->getSpreadsheet(), uno::UNO_SET_THROW ); diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 4bd4fdc..e11c104 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -52,8 +52,8 @@ css::uno::Reference< css::sheet::XUnnamedDatabaseRanges > GetUnnamedDataBaseRang css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( css::uno::RuntimeException ); css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException, std::exception ); css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException ); -css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException ); -css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException ); +css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException, std::exception ); +css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException, std::exception ); css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException, std::exception ); ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException ); commit 4e7a48f4cb1b54ce42c47c93fc28451fe6643d9a Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:19:59 2015 +0100 coverity#1309059 Uncaught exception Change-Id: Id7c9b359697613547040c9694c03a427f89f35c3 diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 72ef6ed..20cf5cf 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -3293,7 +3293,7 @@ PresentationSettingsEx::PresentationSettingsEx( PresentationSettings& r ) { } -void PresentationSettingsEx::SetArguments( const Sequence< PropertyValue >& rArguments ) throw (IllegalArgumentException) +void PresentationSettingsEx::SetArguments( const Sequence< PropertyValue >& rArguments ) throw (IllegalArgumentException, std::exception) { sal_Int32 nArguments = rArguments.getLength(); const PropertyValue* pValue = rArguments.getConstArray(); diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index c584a53..6e1c2f0 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -99,7 +99,7 @@ struct PresentationSettingsEx : public PresentationSettings PresentationSettingsEx( const PresentationSettingsEx& ); PresentationSettingsEx( PresentationSettings& ); - void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException); + void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException, std::exception); void SetPropertyValue( const OUString& rProperty, const css::uno::Any& rValue ) throw (css::lang::IllegalArgumentException, std::exception); }; commit 1c18489cd8eaf3ad7e2380cadc0a40621800b3bd Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:16:08 2015 +0100 coverity#1308604 Uninitialized pointer field Change-Id: Ib3265d3e3d997251b4c5503e17271b70c8378226 diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 7ffcd10..d4e01ca 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -104,6 +104,7 @@ public: StyleLBoxString::StyleLBoxString(SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, const SfxStyleFamily& eStyleFamily) : SvLBoxString(pEntry, nFlags, sText) , meStyleFamily(eStyleFamily) + , mpViewData(NULL) {} StyleLBoxString::~StyleLBoxString() commit a3f8a1c1df3e57b541e76156179f81972e845814 Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:13:25 2015 +0100 coverity#1309263 Improper use of negative value and coverity#1309264 Improper use of negative value Change-Id: I496e92211b9ca0a7a27a7f00d17cff428cb3b42b diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 2c2f6eb..41f4ebd 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -317,11 +317,14 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS sal_Int32 id = 0; sal_Int32 idPos = sLinkChainName.indexOf("_x"); sal_Int32 seq = 0; - sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos); - if( idPos >= 0 && idPos < seqPos ) + if (idPos >= 0) { - id = sLinkChainName.copy(idPos+2,seqPos-idPos+2).toInt32(); - seq = sLinkChainName.copy(seqPos+2).toInt32(); + sal_Int32 seqPos = sLinkChainName.indexOf("_s",idPos); + if (idPos < seqPos) + { + id = sLinkChainName.copy(idPos+2,seqPos-idPos+2).toInt32(); + seq = sLinkChainName.copy(seqPos+2).toInt32(); + } } OUString s_mso_next_textbox; commit 062fe87952c46217e46cbb14b9a6d4c0529fa943 Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:09:00 2015 +0100 coverity#1309262 Unchecked dynamic_cast Change-Id: I0d4f924ded1285b83adb0d9672a63d243c4df7e4 diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index c2966ef..980184d 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1033,6 +1033,7 @@ void SwUiWriterTest::testTdf69282() { mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"); SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); SwDoc* source = pTextDoc->GetDocShell()->GetDoc(); uno::Reference<lang::XComponent> xSourceDoc(mxComponent, uno::UNO_QUERY); mxComponent.clear(); commit 1bfb9dbb611b98b8a4df1e5bb3746a2e1ea6dead Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:08:09 2015 +0100 coverity#1309261 Unchecked dynamic_cast Change-Id: Idea3a9f3465387680b814dc53ed4c0b13265f9f6 diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index c583558..63c4c06 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -201,9 +201,9 @@ void SdrPaintWindow::impCreateOverlayManager() // is it a window? if(OUTDEV_WINDOW == GetOutputDevice().GetOutDevType()) { - vcl::Window* pWindow = dynamic_cast<vcl::Window*>(&GetOutputDevice()); + vcl::Window& rWindow = dynamic_cast<vcl::Window&>(GetOutputDevice()); // decide which OverlayManager to use - if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer && !pWindow->SupportsDoubleBuffering()) + if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer && !rWindow.SupportsDoubleBuffering()) { // buffered OverlayManager, buffers its background and refreshes from there // for pure overlay changes (no system redraw). The 3rd parameter specifies @@ -226,8 +226,7 @@ void SdrPaintWindow::impCreateOverlayManager() // Request a repaint so that the buffered overlay manager fills // its buffer properly. This is a workaround for missing buffer // updates. - if (pWindow != NULL) - pWindow->Invalidate(); + rWindow.Invalidate(); Color aColA(GetPaintView().getOptionsDrawinglayer().GetStripeColorA()); Color aColB(GetPaintView().getOptionsDrawinglayer().GetStripeColorB()); commit d03bdab6aab6376179aac6e666eccc035cc367f7 Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:04:09 2015 +0100 coverity#1309267 Uncaught exception Change-Id: I296e3b928577b521d6c21bbfe812a451e56822dc diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 5cb703b..c841469 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -850,7 +850,7 @@ bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rAr } uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const - throw (lang::IllegalArgumentException, uno::RuntimeException) + throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { // extract sheet index, will throw, if parameter is invalid SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex ); diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index 2503fd4..2ea89fb 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -55,7 +55,7 @@ private: bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); /** Creates a VBA Worksheet object (the argument must contain a sheet index). */ - css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); + css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). */ css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */ commit 0e17fa040368243ff760caa2173a26c87435b62f Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:03:46 2015 +0100 coverity#1309259 Unchecked dynamic_cast Change-Id: Ia2738454eebd768403ea19f7f231d43dabbb38e3 diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index a0c1bfe..c2966ef 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1093,6 +1093,7 @@ void SwUiWriterTest::testTdf69282WithMirror() { mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"); SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); SwDoc* source = pTextDoc->GetDocShell()->GetDoc(); uno::Reference<lang::XComponent> xSourceDoc(mxComponent, uno::UNO_QUERY); mxComponent.clear(); commit 70d2f78479b96cbc24b12fdff6593b4c95061f7a Author: Caolán McNamara <[email protected]> Date: Sat Jul 4 20:01:21 2015 +0100 coverity#1309266 Uncaught exception Change-Id: Ic13df34772a448f654924ca6076cb5bc92ea3883 diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx index 2388310..5644e5f 100644 --- a/include/svx/AccessibleControlShape.hxx +++ b/include/svx/AccessibleControlShape.hxx @@ -122,7 +122,7 @@ protected: */ virtual OUString CreateAccessibleName( ) - throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; /// Create a description string that contains the accessible description. virtual OUString diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 0e45e5f..fe3af84 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -605,7 +605,7 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessib return xSet; } -OUString AccessibleControlShape::CreateAccessibleName() throw (RuntimeException) +OUString AccessibleControlShape::CreateAccessibleName() throw (RuntimeException, std::exception) { ensureControlModelAccess();
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
