cppcheck: performing init in init list (comphelper/connectivity/cppu/cui)
Change-Id: I786c2c10e8b37b48adf6d619c0fa6a905de1bf7f Reviewed-on: https://gerrit.libreoffice.org/83584 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -39,8 +39,8 @@ class AnyCompare : public ::cppu::WeakImplHelper< XAnyCompare >
|
||||
|
||||
public:
|
||||
AnyCompare( Reference< XComponentContext > const & xContext, const Locale& rLocale )
|
||||
: m_xCollator(Collator::create( xContext ))
|
||||
{
|
||||
m_xCollator = Collator::create( xContext );
|
||||
m_xCollator->loadDefaultCollator( rLocale,
|
||||
0 ); //???
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace connectivity { namespace hsqldb
|
||||
|
||||
|
||||
LogFile::LogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix )
|
||||
: m_sFileName(StorageContainer::jstring2ustring(env,streamName) +
|
||||
"." + OUString::createFromAscii( _pAsciiSuffix ) )
|
||||
{
|
||||
m_sFileName = StorageContainer::jstring2ustring(env,streamName) +
|
||||
"." + OUString::createFromAscii( _pAsciiSuffix );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -78,10 +78,10 @@ void manageDuplicateGroups(std::vector<MacabGroup *> _xGroups)
|
||||
}
|
||||
|
||||
MacabAddressBook::MacabAddressBook( )
|
||||
: m_aAddressBook(ABGetSharedAddressBook()),
|
||||
m_xMacabRecords(nullptr),
|
||||
m_bRetrievedGroups(false)
|
||||
{
|
||||
m_aAddressBook = ABGetSharedAddressBook();
|
||||
m_xMacabRecords = nullptr;
|
||||
m_bRetrievedGroups = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,13 +33,14 @@ using namespace com::sun::star::util;
|
||||
using namespace ::dbtools;
|
||||
|
||||
|
||||
MacabRecord::MacabRecord()
|
||||
MacabRecord::MacabRecord() : size(0)
|
||||
{
|
||||
size = 0;
|
||||
}
|
||||
|
||||
|
||||
MacabRecord::MacabRecord(const sal_Int32 _size)
|
||||
: size(_size),
|
||||
fields(std::make_unique<macabfield *[]>(size))
|
||||
{
|
||||
size = _size;
|
||||
fields = std::make_unique<macabfield *[]>(size);
|
||||
|
||||
@@ -73,17 +73,9 @@ void manageDuplicateHeaders(macabfield **_headerNames, const sal_Int32 _length)
|
||||
}
|
||||
|
||||
MacabRecords::MacabRecords(const ABAddressBookRef _addressBook, MacabHeader *_header, MacabRecord **_records, sal_Int32 _numRecords)
|
||||
: recordsSize(_numRecords), currentRecord(_numRecords), recordType(kABPersonRecordType),
|
||||
header(_header), records(_records), addressBook(_addressBook)
|
||||
{
|
||||
/* Variables passed in... */
|
||||
header = _header;
|
||||
recordsSize = _numRecords;
|
||||
currentRecord = _numRecords;
|
||||
records = _records;
|
||||
addressBook = _addressBook;
|
||||
|
||||
/* Default variables... */
|
||||
recordType = kABPersonRecordType;
|
||||
|
||||
/* Variables constructed... */
|
||||
bootstrap_CF_types();
|
||||
bootstrap_requiredProperties();
|
||||
@@ -99,18 +91,10 @@ MacabRecords::MacabRecords(const ABAddressBookRef _addressBook, MacabHeader *_he
|
||||
* header.
|
||||
*/
|
||||
MacabRecords::MacabRecords(const MacabRecords *_copy)
|
||||
: recordsSize(_copy->recordsSize), currentRecord(0), recordType(kABPersonRecordType),
|
||||
header(nullptr), records(new MacabRecord *[recordsSize]), addressBook(_copy->addressBook),
|
||||
m_sName(_copy->m_sName)
|
||||
{
|
||||
/* Variables passed in... */
|
||||
recordsSize = _copy->recordsSize;
|
||||
addressBook = _copy->addressBook;
|
||||
m_sName = _copy->m_sName;
|
||||
|
||||
/* Default variables... */
|
||||
currentRecord = 0;
|
||||
header = nullptr;
|
||||
records = new MacabRecord *[recordsSize];
|
||||
recordType = kABPersonRecordType;
|
||||
|
||||
/* Variables constructed... */
|
||||
bootstrap_CF_types();
|
||||
bootstrap_requiredProperties();
|
||||
@@ -118,17 +102,9 @@ MacabRecords::MacabRecords(const MacabRecords *_copy)
|
||||
|
||||
|
||||
MacabRecords::MacabRecords(const ABAddressBookRef _addressBook)
|
||||
: recordsSize(0), currentRecord(0), recordType(kABPersonRecordType),
|
||||
header(nullptr), records(nullptr), addressBook(_addressBook)
|
||||
{
|
||||
/* Variables passed in... */
|
||||
addressBook = _addressBook;
|
||||
|
||||
/* Default variables... */
|
||||
recordsSize = 0;
|
||||
currentRecord = 0;
|
||||
records = nullptr;
|
||||
header = nullptr;
|
||||
recordType = kABPersonRecordType;
|
||||
|
||||
/* Variables constructed... */
|
||||
bootstrap_CF_types();
|
||||
bootstrap_requiredProperties();
|
||||
|
||||
@@ -53,9 +53,9 @@ MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt)
|
||||
m_xStatement(pStmt),
|
||||
m_aMacabRecords(),
|
||||
m_nRowPos(-1),
|
||||
m_bWasNull(true)
|
||||
m_bWasNull(true),
|
||||
m_sTableName(MacabAddressBook::getDefaultTableName())
|
||||
{
|
||||
m_sTableName = MacabAddressBook::getDefaultTableName();
|
||||
}
|
||||
|
||||
MacabResultSet::~MacabResultSet()
|
||||
|
||||
@@ -56,13 +56,13 @@ OStatement::OStatement( OConnection* _pConnection) : OCommonStatement( _pConnect
|
||||
OCommonStatement::OCommonStatement(OConnection* _pConnection )
|
||||
:OCommonStatement_IBASE(m_aMutex)
|
||||
,OPropertySetHelper(OCommonStatement_IBASE::rBHelper)
|
||||
,m_xDBMetaData (_pConnection->getMetaData())
|
||||
,m_pTable(nullptr)
|
||||
,m_pConnection(_pConnection)
|
||||
,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
|
||||
,m_pSQLIterator( new OSQLParseTreeIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser ) )
|
||||
,m_pParseTree(nullptr)
|
||||
{
|
||||
m_xDBMetaData = _pConnection->getMetaData();
|
||||
m_pParseTree = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -178,8 +178,8 @@ OPreparedResultSet::OPreparedResultSet(OConnection& rConn, OPreparedStatement* p
|
||||
, m_aStatement(static_cast<OWeakObject*>(pPrepared))
|
||||
, m_pStmt(pStmt)
|
||||
, m_encoding(rConn.getConnectionEncoding())
|
||||
, m_nColumnCount(mysql_stmt_field_count(pStmt))
|
||||
{
|
||||
m_nColumnCount = mysql_stmt_field_count(pStmt);
|
||||
m_pResult = mysql_stmt_result_metadata(m_pStmt);
|
||||
if (m_pResult != nullptr)
|
||||
mysql_stmt_store_result(m_pStmt);
|
||||
|
||||
@@ -909,8 +909,9 @@ private:
|
||||
sal_Int32 members;
|
||||
};
|
||||
|
||||
BaseList::BaseList(typelib_InterfaceTypeDescription const * desc) {
|
||||
members = 0;
|
||||
BaseList::BaseList(typelib_InterfaceTypeDescription const * desc)
|
||||
: members(0)
|
||||
{
|
||||
for (sal_Int32 i = 0; i < desc->nBaseTypes; ++i) {
|
||||
Set directBaseSet;
|
||||
sal_Int32 directBaseMembers = 0;
|
||||
|
||||
@@ -26,10 +26,10 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
|
||||
, m_xManualButton(m_xBuilder->weld_button("add"))
|
||||
, m_xOKButton(m_xBuilder->weld_button("ok"))
|
||||
, m_xCertPathList(m_xBuilder->weld_tree_view("paths"))
|
||||
, m_sAddDialogText(m_xBuilder->weld_label("certdir")->get_label())
|
||||
, m_sManualLabel(m_xBuilder->weld_label("manual")->get_label())
|
||||
{
|
||||
// these are just used to get translated strings
|
||||
m_sAddDialogText = m_xBuilder->weld_label("certdir")->get_label();
|
||||
m_sManualLabel = m_xBuilder->weld_label("manual")->get_label();
|
||||
|
||||
m_xCertPathList->set_size_request(m_xCertPathList->get_approximate_digit_width() * 70,
|
||||
m_xCertPathList->get_height_rows(6));
|
||||
|
||||
@@ -46,9 +46,9 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage(weld::Container* pPage, weld::Dialo
|
||||
, m_xIgnorePunctuation(m_xBuilder->weld_check_button("ignorepunctuation"))
|
||||
, m_xIgnoreWhitespace(m_xBuilder->weld_check_button("ignorewhitespace"))
|
||||
, m_xIgnoreMiddleDot(m_xBuilder->weld_check_button("ignoremiddledot"))
|
||||
, nTransliterationFlags(TransliterationFlags::NONE)
|
||||
, bSaveOptions(true)
|
||||
{
|
||||
bSaveOptions = true;
|
||||
nTransliterationFlags = TransliterationFlags::NONE;
|
||||
}
|
||||
|
||||
SvxJSearchOptionsPage::~SvxJSearchOptionsPage()
|
||||
|
||||
Reference in New Issue
Block a user