basic/source/basmgr/basmgr.cxx | 31 ++++++++++++++++------- dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 10 ++++--- extensions/source/scanner/grid.cxx | 10 +++++++ filter/source/svg/svgexport.cxx | 20 +++++++-------- helpcompiler/inc/HelpLinker.hxx | 2 - helpcompiler/source/HelpLinker.cxx | 2 - include/svx/unoshape.hxx | 5 +++ sc/inc/cellsuno.hxx | 3 +- sc/source/ui/unoobj/cellsuno.cxx | 5 ++- sd/source/ui/unoidl/unopage.cxx | 4 +-- sd/source/ui/unoidl/unopage.hxx | 4 +-- sd/source/ui/view/sdview.cxx | 2 - svtools/source/misc/imagemgr.cxx | 31 ++++++++++++++--------- svx/source/unodraw/shapeimpl.hxx | 7 ++++- svx/source/unodraw/unoshap3.cxx | 7 ++++- svx/source/unodraw/unoshap4.cxx | 7 ++++- sw/inc/txtfld.hxx | 10 +++++++ sw/source/core/txtnode/atrfld.cxx | 34 ++++++++++++++++++++++++++ sw/source/core/unocore/unofield.cxx | 24 ++++++------------ uui/source/iahndl.cxx | 8 +----- 20 files changed, 156 insertions(+), 70 deletions(-)
New commits: commit 084358a72328d3d57760002664a1ce20e8873b62 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 10:25:15 2014 +0100 coverity#1209942 Uncaught exception Change-Id: Ice7a4802605fbe59dfb24a27408106756a3494ba diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index cdcd74f..f1db353 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -686,7 +686,10 @@ public: Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw(); // overide these for special property handling in subcasses. Return true if property is handled virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, + css::uno::Any& rValue ) + throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, + css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ~Svx3DSceneObject() throw(); diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 6dc7ed7..58e4af4 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -421,7 +421,12 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte -bool Svx3DSceneObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool Svx3DSceneObject::getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, + css::uno::Any& rValue) + throw (css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + css::uno::RuntimeException, + std::exception) { switch( pProperty->nWID ) { commit d9cd707a226baf157cc58f547228195eedcd6886 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 10:23:41 2014 +0100 coverity#1209943 Uncaught exception Change-Id: I3bb5ecb07d859a05337884a5b29d991b46382b48 diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index 0b8e2c6..9a42486 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -87,7 +87,12 @@ class SvxFrameShape : public SvxOle2Shape protected: // overide these for special property handling in subcasses. Return true if property is handled virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, + css::uno::Any& rValue) + throw (css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + css::uno::RuntimeException, + std::exception) SAL_OVERRIDE; public: SvxFrameShape( SdrObject* pObj ) throw(); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 36a161f..b4b2af1 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -766,7 +766,12 @@ bool SvxFrameShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr } } -bool SvxFrameShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) +bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, + css::uno::Any& rValue) + throw (css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + css::uno::RuntimeException, + std::exception) { if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) ) { commit 54f52a53ae844c86a29130d6db0feff695c0aba4 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 10:19:12 2014 +0100 coverity#1210044 Uncaught exception Change-Id: I3837f316a4b73eb508bfd4fca97fa741080df8c0 diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 1f6df45..9df68a7 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -376,20 +376,27 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol aExt = rObject.getExtension(); if ( aExt == "vor" ) { - SotStorageRef aStorage = new SotStorage( sURL, STREAM_STD_READ ); sal_uInt16 nId = IMG_WRITERTEMPLATE; - if ( !aStorage->GetError() ) + try { - SvGlobalName aGlobalName = aStorage->GetClassName(); - if ( aGlobalName == SvGlobalName(SO3_SC_CLASSID_50) || aGlobalName == SvGlobalName(SO3_SC_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SC_CLASSID_30) ) - nId = IMG_CALCTEMPLATE; - else if ( aGlobalName == SvGlobalName(SO3_SDRAW_CLASSID_50) ) - nId = IMG_DRAWTEMPLATE; - else if ( aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_50) || - aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_30) ) - nId = IMG_IMPRESSTEMPLATE; - else if ( aGlobalName == SvGlobalName(SO3_SM_CLASSID_50) || aGlobalName == SvGlobalName(SO3_SM_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SM_CLASSID_30) ) - nId = IMG_MATHTEMPLATE; + SotStorageRef aStorage = new SotStorage( sURL, STREAM_STD_READ ); + if ( !aStorage->GetError() ) + { + SvGlobalName aGlobalName = aStorage->GetClassName(); + if ( aGlobalName == SvGlobalName(SO3_SC_CLASSID_50) || aGlobalName == SvGlobalName(SO3_SC_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SC_CLASSID_30) ) + nId = IMG_CALCTEMPLATE; + else if ( aGlobalName == SvGlobalName(SO3_SDRAW_CLASSID_50) ) + nId = IMG_DRAWTEMPLATE; + else if ( aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_50) || + aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SIMPRESS_CLASSID_30) ) + nId = IMG_IMPRESSTEMPLATE; + else if ( aGlobalName == SvGlobalName(SO3_SM_CLASSID_50) || aGlobalName == SvGlobalName(SO3_SM_CLASSID_40) || aGlobalName == SvGlobalName(SO3_SM_CLASSID_30) ) + nId = IMG_MATHTEMPLATE; + } + } + catch (const css::ucb::ContentCreationException& e) + { + SAL_WARN("svtools.misc", "GetImageId_Impl: Caught exception: " << e.Message); } return nId; commit 136a2bc384cc5fa45d896266233b1b432921b858 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 10:16:22 2014 +0100 coverity#1210096 Uncaught exception Change-Id: I1d06c7a6a61556c2b501a16c224ccc6fe52307d0 diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index d51decd..b9fbecb 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1324,7 +1324,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) } catch (const css::ucb::ContentCreationException& e) { - SAL_WARN( "basic", "BasicManager::RemoveLib: Caught exception: " << e.Message ); + SAL_WARN("basic", "BasicManager::RemoveLib: Caught exception: " << e.Message); } if (xStorage.Is() && xStorage->IsStorage(OUString(szBasicStorage))) @@ -1527,12 +1527,18 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa { if( !LinkTargetURL.isEmpty()) { - SotStorageRef xStorage = new SotStorage( false, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); - if( !xStorage->GetError() ) + try { - pLib = AddLib( *xStorage, rLibName, true ); + SotStorageRef xStorage = new SotStorage(false, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE); + if (!xStorage->GetError()) + { + pLib = AddLib(*xStorage, rLibName, true); + } + } + catch (const css::ucb::ContentCreationException& e) + { + SAL_WARN("basic", "BasicManager::RemoveLib: Caught exception: " << e.Message); } - DBG_ASSERT( pLib, "XML Import: Linked basic library could not be loaded"); } else commit 66f98136fd80bef92a8abde99d14585cf1d9e316 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 10:14:04 2014 +0100 coverity#1210098 Uncaught exception Change-Id: I531891fa1cce10a331dd651ee9ce52d1f8d0c169 diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index ccc1490..d51decd 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1311,16 +1311,23 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) ( !pLibInfo->IsExtern() || SotStorage::IsStorageFile( pLibInfo->GetStorageName() ) ) ) { SotStorageRef xStorage; - if ( !pLibInfo->IsExtern() ) + try { - xStorage = new SotStorage( false, GetStorageName() ); + if (!pLibInfo->IsExtern()) + { + xStorage = new SotStorage(false, GetStorageName()); + } + else + { + xStorage = new SotStorage(false, pLibInfo->GetStorageName()); + } } - else + catch (const css::ucb::ContentCreationException& e) { - xStorage = new SotStorage( false, pLibInfo->GetStorageName() ); + SAL_WARN( "basic", "BasicManager::RemoveLib: Caught exception: " << e.Message ); } - if ( xStorage->IsStorage( OUString(szBasicStorage) ) ) + if (xStorage.Is() && xStorage->IsStorage(OUString(szBasicStorage))) { SotStorageRef xBasicStorage = xStorage->OpenSotStorage ( OUString(szBasicStorage), STREAM_STD_READWRITE, sal_False ); commit f162b156b03998bd695ed4f68bc03962a5299885 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:58:54 2014 +0100 coverity#736036 Missing break in switch someone's odd ": ;" habit Change-Id: I4a3e3b89bb31764056c844286561e31ae4621036 diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 00016cd..f04aed3 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -963,9 +963,9 @@ bool SVGFilter::implGenerateMetaData() sNumberingType = "roman-lower"; break; // arabic numbering type is the default, so we do not append any attribute for it - case SVX_ARABIC: ; + case SVX_ARABIC: // in case the numbering type is not handled we fall back on arabic numbering - default: ; + default: break; } if( !sNumberingType.isEmpty() ) @@ -2231,8 +2231,8 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) sDate += SvxDateField::GetFormatted( aDate, SVXDATEFORMAT_B, *pNumberFormatter, eLang ); switch( eDateFormat ) { - case SVXDATEFORMAT_E: ; // Tue, 13.February 1996 - case SVXDATEFORMAT_STDBIG: ; + case SVXDATEFORMAT_E: // Tue, 13.February 1996 + case SVXDATEFORMAT_STDBIG: case SVXDATEFORMAT_F: // Tuesday, 13.February 1996 for( sal_uInt16 i = 1; i <= 7; ++i ) // we get all days in a week { @@ -2240,7 +2240,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) sDate += SvxDateField::GetFormatted( aDate, eDateFormat, *pNumberFormatter, eLang ); } // No break here! We need months too! - case SVXDATEFORMAT_C: ; // 13.Feb 1996 + case SVXDATEFORMAT_C: // 13.Feb 1996 case SVXDATEFORMAT_D: // 13.February 1996 for( sal_uInt16 i = 1; i <= 12; ++i ) // we get all months in a year { @@ -2248,9 +2248,9 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) sDate += SvxDateField::GetFormatted( aDate, eDateFormat, *pNumberFormatter, eLang ); } break; - case SVXDATEFORMAT_STDSMALL: ; - case SVXDATEFORMAT_A: ; // 13.02.96 - case SVXDATEFORMAT_B: ; // 13.02.1996 + case SVXDATEFORMAT_STDSMALL: + case SVXDATEFORMAT_A: // 13.02.96 + case SVXDATEFORMAT_B: // 13.02.1996 default: // nothing to do here, we always collect the characters needed for these cases. break; @@ -2276,7 +2276,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) aRepresentation += "ivxlcdm"; break; // arabic numbering type is the default - case SVX_ARABIC: ; + case SVX_ARABIC: // in case the numbering type is not handled we fall back on arabic numbering default: aRepresentation += "0123456789"; @@ -2341,7 +2341,7 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo ) aRepresentation += SvxNumberFormat::CreateRomanString( nPageNumber, false /* lower */ ); break; // arabic numbering type is the default - case SVX_ARABIC: ; + case SVX_ARABIC: // in case the numbering type is not handled we fall back on arabic numbering default: aRepresentation += OUString::number( nPageNumber ); commit f829d088a6db46f8f921e7d80cf0d10bb4fd0744 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:48:17 2014 +0100 coverity#707138 Uncaught exception Change-Id: Ifd9a8ea49b48e81cdff859d2659fbd4d828afa90 diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 3e788c8..c7dc1d7 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1338,8 +1338,8 @@ void SAL_CALL SdGenericDrawPage::firePropertiesChangeEvent( const Sequence< OUSt { } -Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) const - throw (std::exception) +Reference< drawing::XShape > SdGenericDrawPage::_CreateShape(SdrObject *pObj) const + throw (RuntimeException, std::exception) { DBG_ASSERT( GetPage(), "SdGenericDrawPage::_CreateShape(), can't create shape for disposed page!" ); DBG_ASSERT( pObj, "SdGenericDrawPage::_CreateShape(), invalid call with pObj == 0!" ); diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index b2ea8aa..c19b212 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -108,8 +108,8 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // SvxFmDrawPage - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const - throw (std::exception) SAL_OVERRIDE; + virtual css::uno::Reference<css::drawing::XShape> _CreateShape(SdrObject *pObj) const + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; commit 4598bbe41d0906a34ceb1126c7fce2108642cd8e Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:45:57 2014 +0100 coverity#1223089 Dereference before null check Change-Id: I790a7bed0a2ac77c452638349008f4a34fd4ad0c diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 009fa7e..a4c6393 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -678,7 +678,7 @@ bool View::SdrBeginTextEdit( SdrOutliner* pOutl, OutlinerView* pGivenOutlinerView, bool bDontDeleteOutliner, bool bOnlyOneView, bool bGrabFocus ) { - SdrPage* pPage = pObj->GetPage(); + SdrPage* pPage = pObj ? pObj->GetPage() : NULL; bool bMasterPage = pPage && pPage->IsMasterPage(); GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent( commit 04a4671b2d417b196c98884f1cd5dc2d188078be Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:43:08 2014 +0100 coverity#1223090 Uncaught exception Change-Id: Iec100b86e2952a5efe4fa52bd85fbc00b51f78c3 diff --git a/helpcompiler/inc/HelpLinker.hxx b/helpcompiler/inc/HelpLinker.hxx index 9f016ed..113b427 100644 --- a/helpcompiler/inc/HelpLinker.hxx +++ b/helpcompiler/inc/HelpLinker.hxx @@ -89,7 +89,7 @@ private: bool m_bUseLangRoot; bool m_bCreateIndex; void initIndexerPreProcessor(); - void link() throw( HelpProcessingException ); + void link() throw(HelpProcessingException, BasicCodeTagger::TaggerException); void addBookmark( FILE* pFile_DBHelp, std::string thishid, const std::string& fileB, const std::string& anchorB, const std::string& jarfileB, const std::string& titleB ); diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index f98c9a2..4cc0585 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -281,7 +281,7 @@ void HelpLinker::initIndexerPreProcessor() /** * */ -void HelpLinker::link() throw( HelpProcessingException ) +void HelpLinker::link() throw(HelpProcessingException, BasicCodeTagger::TaggerException) { bool bIndexForExtension = true; commit edf57ee27b9cbc8eb544cc2f57d72f53e42c43a5 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:41:17 2014 +0100 coverity#1223091 Uncaught exception Change-Id: I7aacf97a32360ea3c7e17e19d7f5e51e96fcc070 diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index d7648f1..ce7fe84 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -679,7 +679,8 @@ public: virtual void SetArrayFormulaWithGrammar( const OUString& rFormula, const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar ) - throw(::com::sun::star::uno::RuntimeException); + throw (css::uno::RuntimeException, + std::exception); // XCellRangeAddressable virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getRangeAddress() diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 699bb65..276a2fe 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5090,8 +5090,9 @@ void SAL_CALL ScCellRangeObj::setArrayFormula( const OUString& aFormula ) SetArrayFormula_Impl( aFormula, OUString(), formula::FormulaGrammar::GRAM_PODF_A1); } -void ScCellRangeObj::SetArrayFormulaWithGrammar( const OUString& rFormula, - const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) throw(uno::RuntimeException) +void ScCellRangeObj::SetArrayFormulaWithGrammar(const OUString& rFormula, + const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar) + throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; SetArrayFormula_Impl( rFormula, rFormulaNmsp, eGrammar); commit e43c672597a4ec274c11f63c699c25c82988f80e Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:39:11 2014 +0100 coverity#1223092 Uninitialized scalar field Change-Id: Ibfbc85562d30c541eada430759a0bda9305d9850 diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 776d9a0..b82f719 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -91,10 +91,12 @@ namespace dbaui // IndexFieldsControl IndexFieldsControl::IndexFieldsControl( Window* _pParent, WinBits nWinStyle) - :EditBrowseBox(_pParent, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, nWinStyle, BROWSER_STANDARD_FLAGS) - ,m_aSeekRow(m_aFields.end()) - ,m_pSortingCell(NULL) - ,m_pFieldNameCell(NULL) + : EditBrowseBox(_pParent, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, nWinStyle, BROWSER_STANDARD_FLAGS) + , m_aSeekRow(m_aFields.end()) + , m_pSortingCell(NULL) + , m_pFieldNameCell(NULL) + , m_nMaxColumnsInIndex(0) + , m_bAddIndexAppendix(false) { SetUniqueId( UID_DLGINDEX_INDEXDETAILS_BACK ); commit 629bb797b9721b6305e337e3bf1ebfe53be361b1 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:37:33 2014 +0100 coverity#1223093 Uninitialized scalar field Change-Id: I5519b552507ab81e51f81996835467d353277a18 diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 51c25c4..98ab441 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -132,10 +132,20 @@ public: GridWindow::GridWindow(Window* pParent) : Window(pParent, 0) , m_aGridArea(50, 15, 100, 100) + , m_fMinX(0.0) + , m_fMinY(0.0) + , m_fMaxX(0.0) + , m_fMaxY(0.0) + , m_fChunkX(0.0) + , m_fMinChunkX(0.0) + , m_fChunkY(0.0) + , m_fMinChunkY(0.0) , m_pXValues(NULL) , m_pOrigYValues(NULL) , m_nValues(0) , m_pNewYValues(NULL) + , m_BmOffX(0) + , m_BmOffY(0) , m_bCutValues(false) , m_aHandles() , m_nDragIndex(0xffffffff) commit bc793cbaca2b961615201296216e0b556d0abb27 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 17 09:34:14 2014 +0100 coverity#1223095 Unused pointer value Change-Id: I94e55eefd35efd2daa8d3458022eeedfc05d9cb4 diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 4704d93..de4e70c 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -168,15 +168,13 @@ bool UUIInteractionHelper::handleRequest( uno::Reference< task::XInteractionRequest > const & rRequest) { - Application* pApp = 0; if( // be aware,it is the same type static_cast< oslThreadIdentifier >( Application::GetMainThreadIdentifier()) != osl::Thread::getCurrentIdentifier() && - (pApp = GetpApp()) - != 0 + GetpApp() ) { // we are not in the main thread, let it handle that stuff HandleData aHD(rRequest); @@ -227,15 +225,13 @@ beans::Optional< OUString > UUIInteractionHelper::getStringFromRequest( uno::Reference< task::XInteractionRequest > const & rRequest) { - Application* pApp = 0; if( // be aware,it is the same type static_cast< oslThreadIdentifier >( Application::GetMainThreadIdentifier()) != osl::Thread::getCurrentIdentifier() && - (pApp = GetpApp()) - != 0 + GetpApp() ) { // we are not in the main thread, let it handle that stuff HandleData aHD(rRequest); commit 41d43bc95b64e1907709141fcd8b6ce08b0841c8 Author: Oliver-Rainer Wittmann <o...@apache.org> Date: Mon Jun 16 12:01:46 2014 +0000 Resolves: #i125086# correct implementation of css::text::XTextField... in Writer to reflect changes made for the in-place editing of Input Fields (cherry picked from commit 90b633455a6e54300330e68e71e22e729b445f31) Conflicts: sw/source/core/txtnode/atrfld.cxx sw/source/core/unocore/unofield.cxx Change-Id: I39de2b5074c2e7d8671ad2c0a3c01a29ccfc7882 diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 44c5c5e..9758bd2 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -22,6 +22,9 @@ #include <txatbase.hxx> #include <rtl/ustring.hxx> +#include <boost/shared_ptr.hpp> + +class SwPaM; class SwTxtNode; class SwTxtFld : public SwTxtAttr @@ -61,6 +64,13 @@ public: // enable notification that field content has changed and needs reformatting virtual void NotifyContentChange( SwFmtFld& rFmtFld ); + // deletes the given field via removing the corresponding text selection from the document's content + static void DeleteTxtFld( const SwTxtFld& rTxtFld ); + + // return text selection for the given field + static void GetPamForTxtFld( const SwTxtFld& rTxtFld, + boost::shared_ptr< SwPaM >& rPamForTxtFld ); + }; class SwTxtInputFld : public SwTxtFld diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index e533eb5..dc7bc1d 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -434,6 +434,40 @@ void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld) } } +/*static*/ +void SwTxtFld::GetPamForTxtFld( + const SwTxtFld& rTxtFld, + boost::shared_ptr< SwPaM >& rPamForTxtFld ) +{ + if (rTxtFld.GetpTxtNode() == NULL) + { + SAL_WARN("sw.core", "<SwTxtFld::GetPamForField> - missing <SwTxtNode>"); + return; + } + + const SwTxtNode& rTxtNode = rTxtFld.GetTxtNode(); + + rPamForTxtFld.reset( new SwPaM( rTxtNode, + ( (rTxtFld.End() != NULL) ? *(rTxtFld.End()) : ( *(rTxtFld.GetStart()) + 1 ) ), + rTxtNode, + *(rTxtFld.GetStart()) ) ); + +} + +/*static*/ +void SwTxtFld::DeleteTxtFld( const SwTxtFld& rTxtFld ) +{ + if (rTxtFld.GetpTxtNode() != NULL) + { + boost::shared_ptr< SwPaM > pPamForTxtFld; + GetPamForTxtFld(rTxtFld, pPamForTxtFld); + if (pPamForTxtFld.get() != NULL) + { + rTxtFld.GetTxtNode().GetDoc()->DeleteAndJoin(*pPamForTxtFld); + } + } +} + // input field in-place editing SwTxtInputFld::SwTxtInputFld( SwFmtFld & rAttr, diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 68820e9..a89c8b3 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -984,15 +984,10 @@ throw (uno::RuntimeException, std::exception) SwFmtFld* pFld = aIter.First(); while(pFld) { - // Feld im Undo? SwTxtFld *pTxtFld = pFld->GetTxtFld(); if(pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() ) { - SwTxtNode& rTxtNode = (SwTxtNode&)*pTxtFld->GetpTxtNode(); - SwPaM aPam(rTxtNode, *pTxtFld->GetStart()); - aPam.SetMark(); - aPam.Move(); - m_pImpl->m_pDoc->DeleteAndJoin(aPam); + SwTxtFld::DeleteTxtFld(*pTxtFld); } pFld = aIter.Next(); } @@ -2038,12 +2033,14 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception) const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld(); if (!pTxtFld) throw uno::RuntimeException(); - const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode(); - SwPaM aPam(rTxtNode, *pTxtFld->GetStart() + 1, rTxtNode, *pTxtFld->GetStart()); + boost::shared_ptr< SwPaM > pPamForTxtFld; + SwTxtFld::GetPamForTxtFld(*pTxtFld, pPamForTxtFld); + if (pPamForTxtFld.get() == NULL) + return 0; uno::Reference<text::XTextRange> xRange = SwXTextRange::CreateXTextRange( - *m_pImpl->m_pDoc, *aPam.GetPoint(), aPam.GetMark()); + *m_pImpl->m_pDoc, *(pPamForTxtFld->GetPoint()), pPamForTxtFld->GetMark()); return xRange; } @@ -2054,12 +2051,9 @@ void SAL_CALL SwXTextField::dispose() throw (uno::RuntimeException, std::excepti if(pField) { UnoActionContext aContext(m_pImpl->m_pDoc); - const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld(); - SwTxtNode& rTxtNode = (SwTxtNode&)*pTxtFld->GetpTxtNode(); - SwPaM aPam(rTxtNode, *pTxtFld->GetStart()); - aPam.SetMark(); - aPam.Move(); - m_pImpl->m_pDoc->DeleteAndJoin(aPam); + + assert(m_pImpl->m_pFmtFld->GetTxtFld() && "<SwXTextField::dispose()> - missing <SwTxtFld> --> crash"); + SwTxtFld::DeleteTxtFld(*(m_pImpl->m_pFmtFld->GetTxtFld())); } if (m_pImpl->m_pTextObject)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits