cui/source/options/optaboutconfig.cxx | 1 sc/source/ui/vba/excelvbahelper.cxx | 2 - sc/source/ui/vba/excelvbahelper.hxx | 2 - sc/source/ui/vba/vbaapplication.cxx | 2 - sc/source/ui/vba/vbaeventshelper.cxx | 4 +-- sc/source/ui/vba/vbaeventshelper.hxx | 4 +-- sc/source/ui/vba/vbarange.cxx | 4 +-- sc/source/ui/vba/vbarange.hxx | 2 - sd/qa/unit/data/odp/pass/test-slide-name-fields.odp |binary sd/source/ui/unoidl/unomodel.cxx | 26 ++++++++++++++++++-- 10 files changed, 35 insertions(+), 12 deletions(-)
New commits: commit 6793eaa4fa77292b23e9b86221e598f438d45b8e Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:23:55 2015 +0100 coverity#1311335 Uncaught exception Change-Id: Idd654a49457c89598e45e0eb17336297b6745703 diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index f1cf9fc..2135014 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1066,7 +1066,7 @@ void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg ) uno::Reference< excel::XRange > lclCreateVbaRange( const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< frame::XModel >& rxModel, - const ListOfScRange& rList ) throw (uno::RuntimeException) + const ListOfScRange& rList ) throw (uno::RuntimeException, std::exception) { ScDocShell* pDocShell = excel::getDocShell( rxModel ); if( !pDocShell ) throw uno::RuntimeException(); commit 1e40c6459fd0dd64cd27c7b2ffc093045cdbe78d Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:23:26 2015 +0100 coverity#1311334 Uncaught exception Change-Id: I70c8fb0a30eb8185a5fe326d0ce11fcac7aa7e4f diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index ea428c1..e471839 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -858,7 +858,7 @@ uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rA } uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const - throw (lang::IllegalArgumentException, uno::RuntimeException) + throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { // it is possible to pass an existing VBA Range object uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex ); diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index e9020b0..7a86674 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -57,7 +57,7 @@ private: /** 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, 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); + css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */ css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); /** Creates a VBA Window object (the argument must contain a model controller). */ commit 856583492785d3c332f5ad4092a8196d590f930b Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:22:29 2015 +0100 coverity#1311333 Uncaught exception Change-Id: I692712d7a5a84efdec383c5d1ec7bd492a2e1aca diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index ef83fae..dc5b1f2 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1235,7 +1235,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang } ScVbaRange* -getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException ) +getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException, std::exception ) { ScRangeList aCellRanges; ScRange refRange; commit ca55180d74d9e6f40071f453c4b0280ae768e5a0 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:21:20 2015 +0100 coverity#1311332 Uncaught exception Change-Id: I96fbdb219fa59db54a7a2fc496e6d41f5d34385f diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index c841469..ea428c1 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -886,7 +886,7 @@ uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, } uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const - throw (lang::IllegalArgumentException, uno::RuntimeException) + throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false ); uno::Sequence< uno::Any > aArgs( 2 ); diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index 2ea89fb..e9020b0 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -59,7 +59,7 @@ private: /** 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). */ - css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); + css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); /** Creates a VBA Window object (the argument must contain a model controller). */ css::uno::Any createWindow( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); commit 9c54c5c0b3ee934bffeb3bb52a84c08c09a0dcdc Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:20:17 2015 +0100 coverity#1311331 Uncaught exception Change-Id: Ic5a42560e30bac18c90f4008eb593357f3539ee1 diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 50df307..ef83fae 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4188,7 +4188,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeException, std::exception) // #TODO remove this ugly application processing // Process an application Range request e.g. 'Range("a1,b2,a4:b6") uno::Reference< excel::XRange > -ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException) +ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception) { // Although the documentation seems clear that Range without a // qualifier then it's a shortcut for ActiveSheet.Range diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 254a5bc..35faac7 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -287,7 +287,7 @@ public: // * or a list of address ( multi-area ) // * object should be a lightweight as possible // * we shouldn't need hacks like this below - static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException); + static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception); static bool getCellRangesForAddress( sal_uInt16& rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 ); virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) commit f596abe5b2ce4009e3339919292e74ba7c2dc4c0 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 14:07:04 2015 +0100 test-case for crash loading a page name field Change-Id: I5ef8fbf8b6711ca8950b5a0a210bc0c74ae1bd53 diff --git a/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp b/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp new file mode 100644 index 0000000..3de53f9 Binary files /dev/null and b/sd/qa/unit/data/odp/pass/test-slide-name-fields.odp differ commit a88bf8fd10c42a15e5d6e66da656889c82b4933a Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 13:43:40 2015 +0100 coverity#1308596 Uncaught exception Change-Id: I1a59d18546eab664d5148af544cd3657df2d5318 diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 055eb16..c42b9cd 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -263,7 +263,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro } uno::Reference< XHelperInterface > -getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException ) +getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException, std::exception ) { uno::Reference< container::XEnumerationAccess > xEnumAccess( xRanges, uno::UNO_QUERY_THROW ); uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration(); diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index e11c104..82ac810 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -51,7 +51,7 @@ 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::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException, std::exception ); 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 ); commit cc97d4ff08d65a96121296836629f39d7c0bf0e8 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 13:37:29 2015 +0100 coverity#1311336 Uninitialized scalar field Change-Id: I112e57bd6938d601e01dcd1f8b318db73a43b00c diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 38941bb..2d74ce2 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -65,6 +65,7 @@ struct UserData explicit UserData( OUString const & rPropertyPath ) : bIsPropertyPath( true ) , sPropertyPath(rPropertyPath) + , aLineage(0) {} explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex = 0 ) commit 57e5bf760fa84ec84abd3a93e1623aa045d410e1 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jul 8 12:32:10 2015 +0100 when skipping hidden pages to pdf adjust dest page indexes when setting the page bookmarks. three slides, set second to hidden, export to pdf (without toggling on include hidden slides), in evince/acroread click on the "slide 3" title, and the viewers will not jump to that slide, seeing as the index is mis-calculated assuming 1-1 export-import pages Change-Id: I5784100c2444ca480984914e67c8b7e376a2ec47 diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index dd71a82..04c61c1 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1855,6 +1855,25 @@ bool ImplRenderPaintProc::IsPrintable( const SdrObject* pObj ) const return bPrintable; } + +namespace +{ + sal_Int16 CalcOutputPageNum(vcl::PDFExtOutDevData* pPDFExtOutDevData, SdDrawDocument *pDoc, sal_Int16 nPageNumber) + { + //export all pages, simple one to one case + if (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) + return nPageNumber-1; + //check all preceding pages, and only count non-hidden ones + sal_Int16 nRet = 0; + for (sal_Int16 i = 0; i < nPageNumber-1; ++i) + { + if (!(pDoc->GetSdPage(i, PK_STANDARD))->IsExcluded()) + ++nRet; + } + return nRet; + } +} + void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& rSelection, const uno::Sequence< beans::PropertyValue >& rxOptions ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) @@ -2139,9 +2158,12 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r OUString aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName(); if( !aPageName.isEmpty() ) { + // Destination PageNum + const sal_Int32 nDestPageNum = CalcOutputPageNum(pPDFExtOutDevData, mpDoc, nPageNumber); + // insert the bookmark to this page into the NamedDestinations if( pPDFExtOutDevData->GetIsExportNamedDestinations() ) - pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect, nPageNumber - 1 ); + pPDFExtOutDevData->CreateNamedDest(aPageName, aPageRect, nDestPageNum); // add the name to the outline, (almost) same code as in sc/source/ui/unoobj/docuno.cxx // issue #i40318. @@ -2150,7 +2172,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r { // Destination Export const sal_Int32 nDestId = - pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber - 1 ); + pPDFExtOutDevData->CreateDest(aPageRect , nDestPageNum); // Create a new outline item: pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName, nDestId );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits