cppcheck: useInitializationList in test to xmloff
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0 Reviewed-on: https://gerrit.libreoffice.org/58262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
c97df0d704
commit
01b4c5b27f
@@ -97,11 +97,10 @@ private:
|
||||
|
||||
|
||||
XMLDiff::XMLDiff( const char* pFileName, const char* pContent, int size, const char* pToleranceFile)
|
||||
: fileName(pFileName)
|
||||
: xmlFile1(xmlParseFile(pFileName))
|
||||
, xmlFile2(xmlParseMemory(pContent, size))
|
||||
, fileName(pFileName)
|
||||
{
|
||||
xmlFile1 = xmlParseFile(pFileName);
|
||||
xmlFile2 = xmlParseMemory(pContent, size);
|
||||
|
||||
if(pToleranceFile)
|
||||
{
|
||||
xmlDocPtr xmlToleranceFile = xmlParseFile(pToleranceFile);
|
||||
|
@@ -66,12 +66,12 @@ struct ImplPropertyInfo
|
||||
|
||||
ImplPropertyInfo( OUString const & theName, sal_uInt16 nId, const css::uno::Type& rType,
|
||||
sal_Int16 nAttrs, bool bDepends = false )
|
||||
: aName( theName )
|
||||
: aName(theName)
|
||||
, nPropId(nId)
|
||||
, aType(rType)
|
||||
, nAttribs(nAttrs)
|
||||
, bDependsOnOthers(bDepends)
|
||||
{
|
||||
nPropId = nId;
|
||||
aType = rType;
|
||||
nAttribs = nAttrs;
|
||||
bDependsOnOthers = bDepends;
|
||||
}
|
||||
|
||||
};
|
||||
|
@@ -19,10 +19,10 @@ struct Encoder
|
||||
bool m_bCapable;
|
||||
const char *m_pEncoding;
|
||||
Encoder(rtl_TextEncoding nEncoding, const char *pEncoding)
|
||||
: m_bCapable(true)
|
||||
: m_aConverter(rtl_createUnicodeToTextConverter(nEncoding))
|
||||
, m_bCapable(true)
|
||||
, m_pEncoding(pEncoding)
|
||||
{
|
||||
m_aConverter = rtl_createUnicodeToTextConverter(nEncoding);
|
||||
}
|
||||
~Encoder()
|
||||
{
|
||||
|
@@ -42,9 +42,8 @@ class StreamData
|
||||
public:
|
||||
HANDLE hFile;
|
||||
|
||||
StreamData()
|
||||
StreamData() : hFile(nullptr)
|
||||
{
|
||||
hFile = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -1680,10 +1680,10 @@ void SortedResultSet::ResortNew( EventList* pList )
|
||||
|
||||
|
||||
SortListData::SortListData( sal_IntPtr nPos )
|
||||
: mbModified(false)
|
||||
, mnCurPos(nPos)
|
||||
, mnOldPos(nPos)
|
||||
{
|
||||
mbModified = false;
|
||||
mnCurPos = nPos;
|
||||
mnOldPos = nPos;
|
||||
};
|
||||
|
||||
SortedEntryList::SortedEntryList()
|
||||
|
@@ -74,9 +74,8 @@ private:
|
||||
|
||||
|
||||
Prot::Prot()
|
||||
: m_xContext(cppu::defaultBootstrap_InitialComponentContext())
|
||||
{
|
||||
m_xContext = cppu::defaultBootstrap_InitialComponentContext();
|
||||
|
||||
uno::Reference<lang::XMultiComponentFactory> xFactory = m_xContext->getServiceManager();
|
||||
uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW);
|
||||
|
||||
|
@@ -65,9 +65,10 @@ public:
|
||||
};
|
||||
|
||||
SvtSearchOptions_Impl::SvtSearchOptions_Impl() :
|
||||
ConfigItem( "Office.Common/SearchOptions" )
|
||||
ConfigItem( "Office.Common/SearchOptions" ),
|
||||
nFlags(0x0003FFFF) // set all options values to 'true'
|
||||
|
||||
{
|
||||
nFlags = 0x0003FFFF; // set all options values to 'true'
|
||||
Load();
|
||||
SetModified( false );
|
||||
}
|
||||
|
@@ -1017,16 +1017,13 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
|
||||
SvXMLAutoStylePoolP& rASPool ) :
|
||||
mrExport( rExport ),
|
||||
mrAutoStylePool( rASPool ),
|
||||
mxPropertySetMapper( new XMLChartPropertySetMapper( true ) ),
|
||||
mxExpPropMapper( new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport ) ),
|
||||
msTableName("local-table"),
|
||||
mbHasCategoryLabels( false ),
|
||||
mbRowSourceColumns( true ),
|
||||
msCLSID( SvGlobalName( SO3_SCH_CLASSID ).GetHexName() )
|
||||
{
|
||||
msTableName = "local-table";
|
||||
|
||||
// create property set mapper
|
||||
mxPropertySetMapper = new XMLChartPropertySetMapper( true);
|
||||
mxExpPropMapper = new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport );
|
||||
|
||||
// register chart auto-style family
|
||||
mrAutoStylePool.AddFamily(
|
||||
XML_STYLE_FAMILY_SCH_CHART_ID,
|
||||
|
@@ -283,17 +283,14 @@ public:
|
||||
};
|
||||
|
||||
SvXMLExport_Impl::SvXMLExport_Impl()
|
||||
: mxUriReferenceFactory( uri::UriReferenceFactory::create(comphelper::getProcessComponentContext()) ),
|
||||
// Written OpenDocument file format doesn't fit to the created text document (#i69627#)
|
||||
: mbOutlineStyleAsNormalListStyle( false )
|
||||
,mbSaveBackwardCompatibleODF( true )
|
||||
,mStreamName()
|
||||
,mNamespaceMaps()
|
||||
,mDepth(0)
|
||||
,mpRDFaHelper() // lazy
|
||||
,mbExportTextNumberElement( false )
|
||||
,mbNullDateInitialized( false )
|
||||
mbOutlineStyleAsNormalListStyle( false ),
|
||||
mbSaveBackwardCompatibleODF( true ),
|
||||
mDepth( 0 ),
|
||||
mbExportTextNumberElement( false ),
|
||||
mbNullDateInitialized( false )
|
||||
{
|
||||
mxUriReferenceFactory = uri::UriReferenceFactory::create( comphelper::getProcessComponentContext() );
|
||||
}
|
||||
|
||||
void SvXMLExport::SetDocHandler( const uno::Reference< xml::sax::XDocumentHandler > &rHandler )
|
||||
|
@@ -92,34 +92,25 @@ public:
|
||||
|
||||
struct SvXMLNumberInfo
|
||||
{
|
||||
sal_Int32 nDecimals;
|
||||
sal_Int32 nInteger;
|
||||
sal_Int32 nExpDigits;
|
||||
sal_Int32 nExpInterval;
|
||||
sal_Int32 nMinNumerDigits;
|
||||
sal_Int32 nMinDenomDigits;
|
||||
sal_Int32 nMaxNumerDigits;
|
||||
sal_Int32 nMaxDenomDigits;
|
||||
sal_Int32 nFracDenominator;
|
||||
sal_Int32 nMinDecimalDigits;
|
||||
sal_Int32 nZerosNumerDigits;
|
||||
sal_Int32 nZerosDenomDigits;
|
||||
bool bGrouping;
|
||||
bool bDecReplace;
|
||||
bool bExpSign;
|
||||
bool bDecAlign;
|
||||
double fDisplayFactor;
|
||||
sal_Int32 nDecimals = -1;
|
||||
sal_Int32 nInteger = -1;
|
||||
sal_Int32 nExpDigits = -1;
|
||||
sal_Int32 nExpInterval = -1;
|
||||
sal_Int32 nMinNumerDigits = -1;
|
||||
sal_Int32 nMinDenomDigits = -1;
|
||||
sal_Int32 nMaxNumerDigits = -1;
|
||||
sal_Int32 nMaxDenomDigits = -1;
|
||||
sal_Int32 nFracDenominator = -1;
|
||||
sal_Int32 nMinDecimalDigits = -1;
|
||||
sal_Int32 nZerosNumerDigits = -1;
|
||||
sal_Int32 nZerosDenomDigits = -1;
|
||||
bool bGrouping = false;
|
||||
bool bDecReplace = false;
|
||||
bool bExpSign = true;
|
||||
bool bDecAlign = false;
|
||||
double fDisplayFactor = 1.0;
|
||||
OUString aIntegerFractionDelimiter;
|
||||
std::map<sal_Int32, OUString> m_EmbeddedElements;
|
||||
|
||||
SvXMLNumberInfo()
|
||||
{
|
||||
nDecimals = nInteger = nExpDigits = nExpInterval = nMinNumerDigits = nMinDenomDigits = nMaxNumerDigits = nMaxDenomDigits =
|
||||
nFracDenominator = nMinDecimalDigits = nZerosNumerDigits = nZerosDenomDigits = -1;
|
||||
bGrouping = bDecReplace = bDecAlign = false;
|
||||
bExpSign = true;
|
||||
fDisplayFactor = 1.0;
|
||||
}
|
||||
};
|
||||
|
||||
class SvXMLNumFmtElementContext : public SvXMLImportContext
|
||||
|
Reference in New Issue
Block a user