summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-10-15 01:57:12 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 09:53:42 +0200
commitd51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch)
treefd1ab208d49e85371fc9bb321539ce137bdaf719 /sc
parentc8eaadb5d70f42723517bb028f363e37726be256 (diff)
Remove some memset calls
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xeroot.cxx3
-rw-r--r--sc/source/filter/inc/qprostyle.hxx10
-rw-r--r--sc/source/filter/qpro/qprostyle.cxx8
3 files changed, 6 insertions, 15 deletions
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 4268bbd97830..15082d46a226 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -317,8 +317,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const OUS
rtl_random_destroyPool( aRandomPool );
- sal_uInt16 pnPasswd[16];
- memset( pnPasswd, 0, sizeof( pnPasswd ) );
+ sal_uInt16 pnPasswd[16] = {};
for( sal_Int32 nChar = 0; nChar < aPass.getLength(); ++nChar )
pnPasswd[nChar] = aPass[nChar];
diff --git a/sc/source/filter/inc/qprostyle.hxx b/sc/source/filter/inc/qprostyle.hxx
index ea62390b0669..4912dcb6e986 100644
--- a/sc/source/filter/inc/qprostyle.hxx
+++ b/sc/source/filter/inc/qprostyle.hxx
@@ -29,14 +29,14 @@ class ScDocument;
class ScQProStyle
{
enum limits { maxsize = 256 };
- sal_uInt8 maAlign[ maxsize ];
- sal_uInt8 maFont[ maxsize ];
- sal_uInt16 maFontRecord[ maxsize ];
- sal_uInt16 maFontHeight[ maxsize ];
+ sal_uInt8 maAlign[ maxsize ] = {};
+ sal_uInt8 maFont[ maxsize ] = {};
+ sal_uInt16 maFontRecord[ maxsize ] = {};
+ sal_uInt16 maFontHeight[ maxsize ] = {};
OUString maFontType[ maxsize ];
public:
- ScQProStyle();
+ ScQProStyle() = default;
void SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, SCTAB nTab, sal_uInt16 nStyle );
void setFontRecord(sal_uInt16 nIndex, sal_uInt16 nData, sal_uInt16 nPtSize)
{
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 4a309b9eec54..af6628162e9a 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -35,14 +35,6 @@
#include <patattr.hxx>
#include <document.hxx>
-ScQProStyle::ScQProStyle()
-{
- memset (maAlign, 0, sizeof (maAlign));
- memset (maFont, 0, sizeof (maFont));
- memset (maFontRecord, 0, sizeof (maFontRecord));
- memset (maFontHeight, 0, sizeof (maFontHeight));
-}
-
void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, SCTAB nTab, sal_uInt16 nStyle )
{
if (nStyle >= maxsize)