[Libreoffice-commits] core.git: 12 commits - dbaccess/source l10ntools/source sc/source sdext/source sd/source sfx2/source sot/source starmath/source svx/source sw/source
Noel Grandin
noel at peralex.com
Wed Feb 19 23:31:52 PST 2014
dbaccess/source/ui/control/curledit.cxx | 3 -
l10ntools/source/helpmerge.cxx | 2 -
sc/source/core/data/dptabsrc.cxx | 2 -
sc/source/ui/view/output2.cxx | 2 -
sd/source/ui/slideshow/slideshowimpl.cxx | 2 -
sd/source/ui/view/outlnvsh.cxx | 2 -
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 5 --
sfx2/source/doc/objstor.cxx | 2 -
sot/source/sdstor/ucbstorage.cxx | 2 -
starmath/source/mathmlexport.cxx | 2 -
svx/source/svdraw/svdxcgv.cxx | 2 -
sw/source/filter/ww8/ww8graf.cxx | 50 +++++++++++--------------
12 files changed, 33 insertions(+), 43 deletions(-)
New commits:
commit 8f6a8be4ffe7c4c287528e5399767929c7712183
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 15:10:59 2014 +0200
cid#1103724 Dereference before null check
Change-Id: Ie90dbddc72224c014792f27ef98e6300d5225b7a
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index b437f58..9c6d7ff 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -201,7 +201,7 @@ sal_Bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_
ImpPasteObject(pObj,*pLst,aPos,aSiz,MapMode(eMap,Point(0,0),aMap,aMap),nOptions);
// b4967543
- if(pObj && pObj->GetModel() && pObj->GetOutlinerParaObject())
+ if(pObj->GetModel() && pObj->GetOutlinerParaObject())
{
SdrOutliner& rOutliner = pObj->GetModel()->GetHitTestOutliner();
rOutliner.SetText(*pObj->GetOutlinerParaObject());
commit bce04e519356a445489acd016c1c65a66d2f5fa6
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 15:09:53 2014 +0200
cid#1078827 Dereference before null check
Change-Id: Id35992113a8e8f2d06bda7f2287227afeec62313
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 54c4c02..3571942 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -916,7 +916,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// ---
OUString aPresSlide( maPresSettings.maPresPage );
- SdPage* pStartPage = mpViewShell ? mpViewShell->GetActualPage() : 0;
+ SdPage* pStartPage = mpViewShell->GetActualPage();
bool bStartWithActualSlide = pStartPage;
// times should be measured?
commit c39c621978cc2df1c30005abbedfc0711b76d153
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 15:08:31 2014 +0200
cid#1078825 Dereference before null check
Change-Id: I9daa1e3a294db0b205fe5b2ec247bbf550d2dca1
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 654a74c..3e5ed9b 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1504,7 +1504,7 @@ OUString OutlineViewShell::GetSelectionText(bool bCompleteWords)
::Outliner* pOl = pOlView->GetOutliner();
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
- if (pOl && pOlView)
+ if (pOl)
{
if (bCompleteWords)
{
commit c45f332e9e265e7e363e0f91f2fe69fb69683253
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 15:07:01 2014 +0200
cid#1078824 Dereference before null check
Change-Id: Ic68e7048786415a847a67723890a92cb542bbf80
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index a7adab3..d035427 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2661,7 +2661,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
}
aParams->ClearItem( SID_COPY_STREAM_IF_POSSIBLE );
- pImp->bPasswd = aParams && SFX_ITEM_SET == aParams->GetItemState(SID_PASSWORD);
+ pImp->bPasswd = SFX_ITEM_SET == aParams->GetItemState(SID_PASSWORD);
SfxMedium *pActMed = GetMedium();
const INetURLObject aActName(pActMed->GetName());
commit 91e7943cac7490c51bbc03eec2f90422f8e1598e
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 14:59:14 2014 +0200
cid#1078823 Dereference before null check
Change-Id: If1a3f54ee38cd97693cebaea680b46ba846b2e71
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 47158af..f9fd610 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2715,7 +2715,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode
}
}
- if ( pElement && !pElement->m_bIsFolder )
+ if ( !pElement->m_bIsFolder )
{
// check if stream is already created
if ( pElement->m_xStream.Is() )
commit 78f6d5f0913f0ab16dd3396658b6bb463a9ba857
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 14:53:54 2014 +0200
cid#1078821 Dereference before null check
Change-Id: I656df01fc38357de2073c36926c850eb87fed967
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 9efdae0..dbde76c 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -752,7 +752,7 @@ void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel,
// #i115443: nodes of type expression always need to be grouped with mrow statement
if (!bNoMrowContainer &&
- (nSize > 1 || (pNode && pNode->GetType() == NEXPRESSION)))
+ (nSize > 1 || pNode->GetType() == NEXPRESSION))
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
for (sal_uInt16 i = 0; i < nSize; i++)
commit cd210280162a52574f0d72f13e2a8e9fc922a5b9
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 14:51:54 2014 +0200
cid#1038312 Dereference before null check
Change-Id: I280d9382a47c0a934f5b1cd79eead59f9a50e52e
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 41bcf93..12a71c8 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -255,7 +255,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
aLangHM->erase( sCur );
}
}
- else if( pResData )
+ else
{
SAL_WARN(
"l10ntools",
commit 5212847db843396ff87eb3b29eade19db1e883a2
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 13:14:34 2014 +0200
cid#1028109 Dereference before null check
Change-Id: I2049cccef41eded984466856f2d928abafa00237
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 36dc6da..fecf9f7 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2570,42 +2570,38 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if (pRecord->bHidden)
return 0;
- if(pObject)
+ sal_uInt16 nCount = pObject->GetUserDataCount();
+ if(nCount)
{
- sal_uInt16 nCount = pObject->GetUserDataCount();
- if(nCount)
+ OUString lnName, aObjName, aTarFrm;
+ for (sal_uInt16 i = 0; i < nCount; i++ )
{
- OUString lnName, aObjName, aTarFrm;
- for (sal_uInt16 i = 0; i < nCount; i++ )
+ SdrObjUserData* pData = pObject->GetUserData( i );
+ if( pData && pData->GetInventor() == SW_DRAWLAYER
+ && pData->GetId() == SW_UD_IMAPDATA)
{
- SdrObjUserData* pData = pObject->GetUserData( i );
- if( pData && pData->GetInventor() == SW_DRAWLAYER
- && pData->GetId() == SW_UD_IMAPDATA)
+ SwMacroInfo* macInf = dynamic_cast<SwMacroInfo*>(pData);
+ if( macInf )// && macInf->GetShapeId() == pF->nSpId)
{
- SwMacroInfo* macInf = dynamic_cast<SwMacroInfo*>(pData);
-
- if( macInf )// && macInf->GetShapeId() == pF->nSpId)
+ sal_Int32 nShapeId = macInf->GetShapeId();
+ if ( nShapeId == pF->nSpId )
{
- sal_Int32 nShapeId = macInf->GetShapeId();
- if ( nShapeId == pF->nSpId )
- {
- lnName = macInf->GetHlink();
- aObjName = macInf->GetName();
- aTarFrm = macInf->GetTarFrm();
- break;
- }
+ lnName = macInf->GetHlink();
+ aObjName = macInf->GetName();
+ aTarFrm = macInf->GetTarFrm();
+ break;
}
}
}
- SwFmtURL* pFmtURL = new SwFmtURL();
- pFmtURL->SetURL( lnName, false );
- if (!aObjName.isEmpty())
- pFmtURL->SetName(aObjName);
- if (!aTarFrm.isEmpty())
- pFmtURL->SetTargetFrameName(aTarFrm);
- pFmtURL->SetMap(0);
- aFlySet.Put(*pFmtURL);
}
+ SwFmtURL* pFmtURL = new SwFmtURL();
+ pFmtURL->SetURL( lnName, false );
+ if (!aObjName.isEmpty())
+ pFmtURL->SetName(aObjName);
+ if (!aTarFrm.isEmpty())
+ pFmtURL->SetTargetFrameName(aTarFrm);
+ pFmtURL->SetMap(0);
+ aFlySet.Put(*pFmtURL);
}
// If we are to be "below text" then we are not to be opaque
commit 97a185d8b98976d638742d8a35a83597d239c678
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 12:41:08 2014 +0200
cid#983380 Dereference before null check
Change-Id: I9504738a5291b85362a80e630d9e413825fa6572
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 4cef688..6603368 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -666,11 +666,6 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const
{
unsigned int nOuterStreamLen = m_pStream->m_nEndOffset - m_pStream->m_nBeginOffset;
*ppStream = static_cast<char*>(rtl_allocateMemory( nOuterStreamLen ));
- if( ! ppStream )
- {
- *pBytes = 0;
- return false;
- }
unsigned int nRead = rContext.readOrigBytes( m_pStream->m_nBeginOffset, nOuterStreamLen, *ppStream );
if( nRead != nOuterStreamLen )
{
commit a46e4518e5c3bfd2fc425de928672f4e3df36fd3
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 12:35:36 2014 +0200
cid#983378 Dereference before null check
Change-Id: Iff8cd285d1b6443937f8ff725846b7d0fc4f39c3
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index ede02cc..5fc4d50 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -5206,7 +5206,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
long nAvailWidth = aCellSize.Width();
if (eType==OUTTYPE_WINDOW &&
eOrient!=SVX_ORIENTATION_STACKED &&
- pInfo && pInfo->bAutoFilter)
+ pInfo->bAutoFilter)
{
// filter drop-down width is now independent from row height
if (bPixelToLogic)
commit 64ed1e1c077e0023ad0b62a9d1c2e23ee5fb6618
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 11:23:05 2014 +0200
cid#983376 Dereference before null check
Change-Id: Ife25ca2199b9f4c997f2c7ad500b612b4703c07e
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 82a0c1d..979e7fa 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -773,7 +773,7 @@ void ScDPSource::FilterCacheByPageDimensions()
// there is at least one invisible item. Add this filter criterion to the mix.
aCriteria.push_back(aFilter);
- if (!pDim || !pDim->HasSelectedPage())
+ if (!pDim->HasSelectedPage())
continue;
const ScDPItemData& rData = pDim->GetSelectedData();
commit f74d458dc279990459de9ea998781ffa040d159d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 19 11:15:26 2014 +0200
cid#983368 dereference before null check
Change-Id: I6c2c69337ec5bdb2fa97c40479cddd418364d608
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 7f9b50d..98165e9 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -87,8 +87,7 @@ void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNew
}
// the fixed text gets the prefix
- if ( m_pForcedPrefix )
- m_pForcedPrefix->SetText(sPrefix);
+ m_pForcedPrefix->SetText(sPrefix);
// both subs have to be resized according to the text len of the prefix
Size aMySize = GetSizePixel();
More information about the Libreoffice-commits
mailing list