[Libreoffice-commits] core.git: 9 commits - sd/source sfx2/source svtools/source sw/source tools/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 8 02:00:59 PDT 2013
sd/source/ui/animations/CustomAnimationList.cxx | 8 ++++---
sfx2/source/appl/lnkbase2.cxx | 19 +++++++++++------
sfx2/source/bastyp/progress.cxx | 12 ++++++++++-
sfx2/source/dialog/filedlghelper.cxx | 4 +++
svtools/source/filter/exportdialog.cxx | 9 +++++---
sw/source/filter/html/htmlfldw.cxx | 26 ++++++++++++++----------
sw/source/ui/app/applab.cxx | 3 +-
tools/source/rc/rc.cxx | 1
8 files changed, 57 insertions(+), 25 deletions(-)
New commits:
commit 1c316e0b060b9c58ef726631d4b4b86cb4ef149e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 8 09:43:31 2013 +0100
CID#1079304 uninitialized members
and CID#1079303
Change-Id: I52e70424ca83ae7c9c73dd28d93912a1228ce2bd
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 49d175f..58d871b 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2250,6 +2250,7 @@ FileDialogHelper::FileDialogHelper(
const OUString& rFact,
SfxFilterFlags nMust,
SfxFilterFlags nDont )
+ : m_nError(0)
{
mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags );
mxImp = mpImp;
@@ -2268,6 +2269,7 @@ FileDialogHelper::FileDialogHelper(
SfxFilterFlags nDont,
const OUString& rStandardDir,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList)
+ : m_nError(0)
{
mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, NULL, rStandardDir, rBlackList );
mxImp = mpImp;
@@ -2281,6 +2283,7 @@ FileDialogHelper::FileDialogHelper(
sal_Int16 nDialogType,
sal_Int64 nFlags,
Window* _pPreferredParent )
+ : m_nError(0)
{
mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, _pPreferredParent );
mxImp = mpImp;
@@ -2294,6 +2297,7 @@ FileDialogHelper::FileDialogHelper(
const OUString& rStandardDir,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList,
Window* _pPreferredParent )
+ : m_nError(0)
{
mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, _pPreferredParent,rStandardDir, rBlackList );
mxImp = mpImp;
commit 4d19209880729327829451241c68c9508bc00c51
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 8 09:41:58 2013 +0100
CID#1079305 uninitialized members
Change-Id: I00d716a0f05d50fd7a7a1c43772af51224a6b15a
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 06661d9..ef4e335 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -103,7 +103,17 @@ void SfxProgress_Impl::Enable_Impl( sal_Bool bEnable )
// -----------------------------------------------------------------------
SfxProgress_Impl::SfxProgress_Impl( const OUString &/*rTitle*/ )
- : pActiveProgress(0), pWorkWin(0), pView(0)
+ : nMax(0)
+ , nCreate(0)
+ , nNextReschedule(0)
+ , bLocked(false)
+ , bAllDocs(false)
+ , bWaitMode(false)
+ , bAllowRescheduling(false)
+ , bRunning(false)
+ , pActiveProgress(0)
+ , pWorkWin(0)
+ , pView(0)
{
}
commit 009ddaf73b0458b3c08634e71042096d97e0a71d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 8 09:39:30 2013 +0100
CID#1079306 uninitialized members
Change-Id: I40838e5816439b95a33da6e6896f5ae0b89dbbef
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 4614e65..23f016a 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -124,6 +124,7 @@ public:
//--------------------------------------------------------------------------
SvBaseLink::SvBaseLink()
+ : m_bIsReadOnly(false)
{
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
@@ -135,6 +136,7 @@ SvBaseLink::SvBaseLink()
//--------------------------------------------------------------------------
SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
+ : m_bIsReadOnly(false)
{
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
@@ -152,6 +154,7 @@ SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
SvBaseLink::SvBaseLink( const OUString& rLinkName, sal_uInt16 nObjectType, SvLinkSource* pObj )
: pImpl(0)
+ , m_bIsReadOnly(false)
{
bVisible = bSynchron = bUseCache = sal_True;
bWasLastEditOK = sal_False;
commit 7cf32bbf4e13258f6572c2ac37949c7761b7061e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 8 09:39:11 2013 +0100
CID#1079314 uninitialized members
Change-Id: I3f10b7ae435f466752914ef6d98ce5f6e923b785
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 23ae228..7876abd 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -456,10 +456,12 @@ void CustomAnimationTriggerEntryItem::Clone( SvLBoxItem* )
// ====================================================================
CustomAnimationList::CustomAnimationList( ::Window* pParent )
-: SvTreeListBox( pParent, WB_TABSTOP | WB_BORDER ),
- mpController(0)
+ : SvTreeListBox( pParent, WB_TABSTOP | WB_BORDER )
+ , mbIgnorePaint(false)
+ , mpController(0)
+ , mnLastGroupId(0)
+ , mpLastParentEntry(0)
{
-
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCustomAnimationList( ::Window *pParent )
commit 4b96089c09a0fecf05ede4df702ea8e5a7d96322
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 8 09:26:22 2013 +0100
CID#1079187 try and silence this warning
Change-Id: Iee35eea6c9729e933feb9fa1c781c8b89566b7d8
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index 7ebdae0..af2cc3d 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -33,6 +33,7 @@ void Resource::GetRes( const ResId& rResId )
{
if( rResId.GetResMgr() )
m_pResMgr = rResId.GetResMgr();
+ assert(m_pResMgr);
m_pResMgr->GetResource( rResId, this );
IncrementRes( sizeof( RSHEADER_TYPE ) );
}
commit 8da3e7f63512662b2942176c32d324e6a68cc764
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 7 20:32:00 2013 +0100
CID#1078608 unlikely NULL deref case
Change-Id: I1f934512f2cf107d5ef72a30b85d569c9b97c640
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index b74374d..064af8e 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -376,7 +376,8 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
delete pFldMgr;
- pSh->GotoFly(pFirstFlyFmt->GetName(), FLYCNTTYPE_ALL, sal_False);
+ if (pFirstFlyFmt)
+ pSh->GotoFly(pFirstFlyFmt->GetName(), FLYCNTTYPE_ALL, sal_False);
pSh->EndAllAction();
pSh->DoUndo( sal_True );
commit 7d47931ec00ffcd906692e107c3c5797f4ec971e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 7 20:27:18 2013 +0100
CID#1078611 talk coverity down from the ledge
and CID#1078610
Change-Id: Ia680732a25ecf445a7de8b8cd6cd77115e29196d
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index b44c21c..e13818b 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -379,20 +379,26 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
rHTMLWrt.bTagOn = sal_True;
+
const SfxPoolItem *aItems[5];
sal_uInt16 nItems = 0;
- for( sal_uInt16 i=0; i<4; i++ )
+
+ assert(pWhichIds && pRefWhichIds);
+ if (pWhichIds && pRefWhichIds)
{
- const SfxPoolItem *pRefItem =
- aScriptItemSet.GetItem( pRefWhichIds[i] );
- const SfxPoolItem *pItem =
- aScriptItemSet.GetItem( pWhichIds[i] );
- if( pRefItem && pItem &&
- !(0==i ? swhtml_css1atr_equalFontItems( *pRefItem, *pItem )
- : *pRefItem == *pItem) )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- Out( aHTMLAttrFnTab, *pItem, rHTMLWrt );
- aItems[nItems++] = pItem;
+ const SfxPoolItem *pRefItem =
+ aScriptItemSet.GetItem( pRefWhichIds[i] );
+ const SfxPoolItem *pItem =
+ aScriptItemSet.GetItem( pWhichIds[i] );
+ if( pRefItem && pItem &&
+ !(0==i ? swhtml_css1atr_equalFontItems( *pRefItem, *pItem )
+ : *pRefItem == *pItem) )
+ {
+ Out( aHTMLAttrFnTab, *pItem, rHTMLWrt );
+ aItems[nItems++] = pItem;
+ }
}
}
commit 463970052cb81124724da71372e9c574d99fe903
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 7 20:22:42 2013 +0100
CID#1078684 ensure no -1 uses in replaceAt
Change-Id: Ic3a652aa38efe1bfaba81ba7d9103f40f093ed6a
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 97b4bf8..706715b 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -948,12 +948,14 @@ void ExportDialog::updateControls()
OUString aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 );
sal_Int64 nRawFileSize( GetRawFileSize() );
sal_Int32 nInd = aEst.indexOf( "%" );
- aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
+ if (nInd != -1)
+ aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
if ( nRealFileSize )
{
nInd = aEst.indexOf( "%", nInd );
- aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
+ if (nInd != -1)
+ aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
}
mpFtEstimatedSize->SetText( aEst );
}
@@ -963,7 +965,8 @@ void ExportDialog::updateControls()
{
OUString aEst( msEstimatedSizeVec );
sal_Int32 nInd = aEst.indexOf( "%" );
- aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
+ if (nInd != -1)
+ aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
mpFtEstimatedSize->SetText( aEst );
}
}
commit cadc3c17cbef5f9fcb5273128bbda57a6afd5cb5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 7 16:57:37 2013 +0100
CID#1078685 consider if there is < 3 %
Change-Id: I2807a16548af4202d42448c6ef66f240ab4cc920
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index c3adc26..4614e65 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -492,14 +492,16 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName )
{
sError = sError.replaceAt( nFndPos, 1, sApp );
nFndPos = nFndPos + sApp.getLength();
+
+ if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos )))
+ {
+ sError = sError.replaceAt( nFndPos, 1, sTopic );
+ nFndPos = nFndPos + sTopic.getLength();
+
+ if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos )))
+ sError = sError.replaceAt( nFndPos, 1, sItem );
+ }
}
- if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos )))
- {
- sError = sError.replaceAt( nFndPos, 1, sTopic );
- nFndPos = nFndPos + sTopic.getLength();
- }
- if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos )))
- sError = sError.replaceAt( nFndPos, 1, sItem );
}
else
return false;
More information about the Libreoffice-commits
mailing list