[Libreoffice-commits] core.git: 5 commits - dbaccess/source filter/source sc/inc svtools/source vcl/source
Caolán McNamara
caolanm at redhat.com
Sun Jan 25 06:41:38 PST 2015
dbaccess/source/core/dataaccess/documentdefinition.cxx | 2 --
filter/source/msfilter/msdffimp.cxx | 3 +++
sc/inc/document.hxx | 16 +++++++++++-----
svtools/source/brwbox/brwbox1.cxx | 5 +++--
vcl/source/opengl/OpenGLHelper.cxx | 6 ++----
5 files changed, 19 insertions(+), 13 deletions(-)
New commits:
commit 164903c0441a2cd79bc06708fe7e69780bb85a09
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 25 14:40:42 2015 +0000
WaE: unused member
Change-Id: I3fe4cc5ba4c40b54718338ac4c02c67979486feb
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 5711294..09032e3 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -164,7 +164,6 @@ namespace dbaccess
Reference< XEmbeddedObject > m_xBroadCaster;
ODocumentDefinition* m_pDefinition;
bool m_bInStateChange;
- bool m_bInChangingState;
protected:
virtual void SAL_CALL disposing() SAL_OVERRIDE;
public:
@@ -173,7 +172,6 @@ namespace dbaccess
,m_xBroadCaster(_xBroadCaster)
,m_pDefinition(_pDefinition)
,m_bInStateChange(false)
- ,m_bInChangingState(false)
{
osl_atomic_increment( &m_refCount );
{
commit 09f38e21c1a69bc0b00a72b954bd88b9545bb1c5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 25 14:36:14 2015 +0000
coverity#1266483 String not null terminated
Change-Id: I4d22e5a621d36fa2e914891e82ce7e8e06f60b4c
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index af1d8e7..372f0bd 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -50,10 +50,8 @@ OString loadShader(const OUString& rFilename)
boost::scoped_array<char> content(new char[nSize+1]);
sal_uInt64 nBytesRead = 0;
aFile.read(content.get(), nSize, nBytesRead);
- if(nSize != nBytesRead)
- assert(false);
-
- content[nSize] = 0;
+ assert(nSize == nBytesRead);
+ content[nBytesRead] = 0;
return OString(content.get());
}
else
commit 18a1d996edde4845394090642ce03ec083c5761b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 25 14:34:19 2015 +0000
coverity#1266498 Uninitialized scalar variable
Change-Id: I203b9ff32cca1ca8d03911567290e534e082ee52
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index baf8c9c..e992b0f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -217,11 +217,11 @@ namespace com { namespace sun { namespace star {
#define SC_ASIANKERNING_INVALID 0xff
enum ScDocumentMode
- {
- SCDOCMODE_DOCUMENT,
- SCDOCMODE_CLIP,
- SCDOCMODE_UNDO
- };
+{
+ SCDOCMODE_DOCUMENT,
+ SCDOCMODE_CLIP,
+ SCDOCMODE_UNDO
+};
struct ScDocStat
{
@@ -229,6 +229,12 @@ struct ScDocStat
SCTAB nTableCount;
sal_uLong nCellCount;
sal_uInt16 nPageCount;
+ ScDocStat()
+ : nTableCount(0)
+ , nCellCount(0)
+ , nPageCount(0)
+ {
+ }
};
// DDE link modes
commit 05fcc0ff9f55e739871b3ad42b57935541f9a8a5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 25 14:29:26 2015 +0000
coverity#440858 Argument cannot be negative
Change-Id: Ia2725c54ef5850e5c66a79fbe54956769582b013
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 657d29c..334040c 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -299,7 +299,6 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const OUString& rText,
ColumnInserted( nPos );
}
-
sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
sal_uInt16 nSelectedColId = BROWSER_INVALIDID;
@@ -307,7 +306,9 @@ sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
DoHideCursor( "ToggleSelectedColumn" );
ToggleSelection();
- nSelectedColId = (*pCols)[ pColSel->FirstSelected() ]->GetId();
+ long nSelected = pColSel->FirstSelected();
+ if (nSelected != static_cast<long>(SFX_ENDOFSELECTION))
+ nSelectedColId = (*pCols)[nSelected]->GetId();
pColSel->SelectAll(false);
}
return nSelectedColId;
commit a6218ad20adf29675194ad7f422bfa0d5ddf5a73
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 25 14:24:57 2015 +0000
coverity#984091 Uninitialized scalar field
Change-Id: Ie0d90edb26fe2704192895a2b456a37f3d500a17
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 107b38a..77b6b80 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5527,6 +5527,9 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
nGroupShapeFlags(0), // ensure initialization here, as some corrupted
// files may yield to this being unitialized
maBaseURL( rBaseURL ),
+ mnCurMaxShapeId(0),
+ mnDrawingsSaved(0),
+ mnIdClusters(0),
rStCtrl( rStCtrl_ ),
pStData( pStData_ ),
pStData2( pStData2_ ),
More information about the Libreoffice-commits
mailing list