[Libreoffice-commits] core.git: 8 commits - sdext/source sd/source svtools/source sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Fri May 16 08:43:27 PDT 2014
sd/source/ui/func/fuexpand.cxx | 4 +---
sd/source/ui/view/outlnvsh.cxx | 1 -
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2 +-
svtools/source/filter/SvFilterOptionsDialog.cxx | 4 +---
sw/source/core/docnode/nodes.cxx | 2 --
sw/source/filter/writer/writer.cxx | 2 +-
vcl/source/fontsubset/cff.cxx | 13 ++-----------
vcl/source/gdi/bitmap4.cxx | 2 +-
8 files changed, 7 insertions(+), 23 deletions(-)
New commits:
commit 4a9a10d169653e42028d32ee8e260692ead8cc36
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 13:30:38 2014 +0100
coverity#708868 Unused pointer value
Change-Id: I5d25f7de37df6fe79bb195e1cb68876fb3b4fcca
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index e1c9ced..4d8255b 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -198,7 +198,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
SwNodeIndex aStt( *pNds, nStartIdx );
SwCntntNode* pCNode = aStt.GetNode().GetCntntNode();
- if( !pCNode && 0 == ( pCNode = pNds->GoNext( &aStt )) )
+ if( !pCNode && 0 == pNds->GoNext( &aStt ) )
{
OSL_FAIL( "No more ContentNode at StartPos" );
}
commit 87ad02d5ad4e192fb9723830169f6ce0736ac2c3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 13:28:33 2014 +0100
coverity#708847 Unused pointer value
Change-Id: Id16ebc576834e418a3bf2d3d6eb3e2545e0aac2b
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index c8cc236..8282706 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1586,8 +1586,6 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pDestNd->SplitCntntNode( rPos );
}
- pDestNd = rPos.nNode.GetNode().GetTxtNode();
-
if ( bCorrEnd )
{
aEndIdx--;
commit e772a97e1b21ac67fa226578a52855b9d60fde94
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 13:25:23 2014 +0100
coverity#708815 Unused pointer value
Change-Id: Ie58034f0475dc9a876eeb54f3bc6a3c415c3e0a1
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 515e013..fcfb881 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1814,7 +1814,6 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
if( nParasInLayout )
{
// create an OutlinerParaObject
- pPara = pOutliner->GetParagraph( nTitlePara + 1 );
pOPO = pOutliner->CreateParaObject( nTitlePara + 1, nParasInLayout );
}
commit 65219ed0566e987651d3fc16d16f5b40dec418cd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 13:23:39 2014 +0100
coverity#708811 Unused pointer value
Change-Id: I18ed52cc6c00c5c462629c4fff7804ea22035e3a
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 95299d9..4ab706d 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -212,9 +212,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
if (pOutlineObj)
{
// create structuring text objects
- pPara = pOutl->GetParagraph( ++nParaPos );
-
- OutlinerParaObject* pOPO = pOutl->CreateParaObject( nParaPos, nChildCount);
+ OutlinerParaObject* pOPO = pOutl->CreateParaObject(++nParaPos, nChildCount);
SdrOutliner* pTempOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpDoc );
pTempOutl->SetText( *pOPO );
commit 0ff4909a55158cb9607986c88c44722ac2291632
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 12:20:59 2014 +0100
coverity#984442 Use after free
Change-Id: I28822f6b74cbf8ace8f7a194248840cb401679be
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 540885e..8d54a9e 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -879,9 +879,9 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
bRet = rWriteContext.write( pOutBytes, nOutBytes );
if( bRet )
bRet = rWriteContext.write( "\nendstream\nendobj\n", 18 );
- rtl_freeMemory( pStream );
if( pOutBytes != (sal_uInt8*)pStream )
rtl_freeMemory( pOutBytes );
+ rtl_freeMemory( pStream );
if( pEData )
pEData->setDecryptObject( 0, 0 );
return bRet;
commit cb6464fd73bc74af4952cf4dc39ffe6cb55a117f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 09:57:18 2014 +0100
coverity#705542 Unintentional integer overflow
Change-Id: I87712c71689d45259bc9e4e2f71c92375bc887ea
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 29d4e57..8ebf477 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -946,7 +946,7 @@ bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
{
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
- const sal_uLong nEntryCount = 1L << pWriteAcc->GetBitCount();
+ const sal_uLong nEntryCount = 1UL << pWriteAcc->GetBitCount();
sal_uLong n;
PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
commit 6c7f1e1b5ab55934966f81dc87fad9738bc7af64
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 16 09:39:06 2014 +0100
trivial cleanups
Change-Id: I50bc7ab36690e572825109de9f0b1bb11d26867f
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 6f5715d..c8267cc 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -249,9 +249,7 @@ sal_Int16 SvFilterOptionsDialog::execute()
FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit );
aFltCallDlgPara.aFilterData = maFilterDataSequence;
- ResMgr* pResMgr;
-
- pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() );
+ ResMgr* pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() );
aFltCallDlgPara.pResMgr = pResMgr;
aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat );
commit aa583636e35aa1d6ae03906eb0a2953247a71f66
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 15 15:53:56 2014 +0100
coverity#1202771 Operands don't affect result
Change-Id: I6a0228594d31cda252f299cad55469ad02c6b353
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 2ad874b..2d3ce61 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -678,16 +678,7 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
U8* pOut = mpWritePtr;
int nInt = static_cast<int>(aVal);
- static const int nOutCharstrType = 1;
- if( (nInt != aVal) && (nOutCharstrType == 2)) {
- // numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
- *(pOut++) = 255; // Fixed 16.16
- *(pOut++) = static_cast<U8>(nInt >> 8);
- *(pOut++) = static_cast<U8>(nInt);
- nInt = static_cast<int>(aVal * 0x10000) & 0xFFFF;
- *(pOut++) = static_cast<U8>(nInt >> 8);
- *(pOut++) = static_cast<U8>(nInt);
- } else if( (nInt >= -107) && (nInt <= +107)) {
+ if( (nInt >= -107) && (nInt <= +107)) {
*(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
} else if( (nInt >= -1131) && (nInt <= +1131)) {
if( nInt >= 0)
@@ -696,7 +687,7 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
nInt = 64148 - nInt; // -108..-1131
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
- } else if( nOutCharstrType == 1) {
+ } else {
// numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
*(pOut++) = 255;
*(pOut++) = static_cast<U8>(nInt >> 24);
More information about the Libreoffice-commits
mailing list