oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 8 - oox/source/dump/oledumper.cxx | 4 oox/source/export/chartexport.cxx | 2 oox/source/export/drawingml.cxx | 2 oox/source/export/shapes.cxx | 2 oox/source/helper/propertymap.cxx | 82 +++++++++--------- oox/source/ppt/buildlistcontext.cxx | 2 oox/source/ppt/layoutfragmenthandler.cxx | 2 oox/source/ppt/pptshapecontext.cxx | 6 - oox/source/ppt/pptshapegroupcontext.cxx | 2 oox/source/ppt/slidetransition.cxx | 10 +- oox/source/vml/vmlshapecontainer.cxx | 4 package/source/xstor/owriteablestream.cxx | 8 - package/source/xstor/xstorage.cxx | 12 +- package/source/zipapi/ZipOutputEntry.cxx | 2 package/source/zippackage/ZipPackage.cxx | 14 +-- package/source/zippackage/ZipPackageBuffer.cxx | 2 package/source/zippackage/zipfileaccess.cxx | 2 registry/source/keyimpl.cxx | 20 +--- reportdesign/source/core/api/FormattedField.cxx | 2 reportdesign/source/core/api/ReportDefinition.cxx | 8 - reportdesign/source/core/sdr/UndoActions.cxx | 2 reportdesign/source/filter/xml/xmlColumn.cxx | 2 reportdesign/source/filter/xml/xmlControlProperty.cxx | 2 reportdesign/source/filter/xml/xmlFixedContent.cxx | 4 reportdesign/source/filter/xml/xmlFormatCondition.cxx | 2 reportdesign/source/filter/xml/xmlFormattedField.cxx | 2 reportdesign/source/filter/xml/xmlFunction.cxx | 2 reportdesign/source/filter/xml/xmlImage.cxx | 8 - reportdesign/source/filter/xml/xmlReport.cxx | 2 reportdesign/source/ui/dlg/AddField.cxx | 2 reportdesign/source/ui/report/ReportController.cxx | 6 - reportdesign/source/ui/report/propbrw.cxx | 2 sal/osl/unx/file_misc.cxx | 2 sal/osl/unx/file_stat.cxx | 6 - sal/osl/unx/file_url.cxx | 5 - sal/osl/unx/pipe.cxx | 2 sal/osl/unx/process.cxx | 10 +- sal/osl/unx/profile.cxx | 8 - sal/osl/unx/tempfile.cxx | 2 sal/osl/unx/thread.cxx | 16 +-- sal/qa/osl/file/osl_File.cxx | 60 ++++++------- sal/qa/osl/mutex/osl_Mutex.cxx | 6 - sal/qa/rtl/process/rtl_Process.cxx | 68 +++++++------- sal/qa/rtl/textenc/rtl_tencinfo.cxx | 4 sal/rtl/cmdargs.cxx | 2 sax/source/expatwrap/saxwriter.cxx | 2 47 files changed, 210 insertions(+), 215 deletions(-)
New commits: commit 4188ae6a093d935c7c983c7abb0a2fcb89f96c2a Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 8 13:53:08 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Feb 9 17:08:00 2019 +0100 loplugin:indentation in registry..sax Change-Id: I4b877751818febaec8e64018335dca691a476a43 Reviewed-on: https://gerrit.libreoffice.org/67561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 06bbda584c33..702a380038a1 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -257,21 +257,15 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy readUINT32(pBuffer.get()+VALUE_TYPEOFFSET, size); *pValueType = static_cast<RegValueType>(type); -// if (*pValueType == RegValueType::UNICODE) -// { -// *pValueSize = (size / 2) * sizeof(sal_Unicode); -// } else -// { - if (*pValueType > RegValueType::BINARY) - { - pBuffer.reset(new sal_uInt8[4]); - rValue.readAt(VALUE_HEADEROFFSET, pBuffer.get(), 4, readBytes); + if (*pValueType > RegValueType::BINARY) + { + pBuffer.reset(new sal_uInt8[4]); + rValue.readAt(VALUE_HEADEROFFSET, pBuffer.get(), 4, readBytes); - readUINT32(pBuffer.get(), size); - } + readUINT32(pBuffer.get(), size); + } - *pValueSize = size; -// } + *pValueSize = size; return RegError::NO_ERROR; } diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx index 6ba798b977ba..a50e79ab19fb 100644 --- a/reportdesign/source/core/api/FormattedField.cxx +++ b/reportdesign/source/core/api/FormattedField.cxx @@ -357,7 +357,7 @@ OUString SAL_CALL OFormattedField::getShapeType( ) ::osl::MutexGuard aGuard(m_aMutex); if ( m_aProps.aComponent.m_xShape.is() ) return m_aProps.aComponent.m_xShape->getShapeType(); - return OUString("com.sun.star.drawing.ControlShape"); + return OUString("com.sun.star.drawing.ControlShape"); } diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index c048d2ecb8b4..077a0cdee96b 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1654,11 +1654,11 @@ void SAL_CALL OReportDefinition::setVisualAreaSize( ::sal_Int64 _nAspect, const { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); - bool bChanged = + bool bChanged = (m_pImpl->m_aVisualAreaSize.Width != _aSize.Width || m_pImpl->m_aVisualAreaSize.Height != _aSize.Height); - m_pImpl->m_aVisualAreaSize = _aSize; - if( bChanged ) + m_pImpl->m_aVisualAreaSize = _aSize; + if( bChanged ) setModified( true ); m_pImpl->m_nAspect = _nAspect; } @@ -2227,7 +2227,7 @@ OUString SAL_CALL OReportDefinition::getShapeType( ) ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); if ( m_aProps->m_xShape.is() ) return m_aProps->m_xShape->getShapeType(); - return OUString("com.sun.star.drawing.OLE2Shape"); + return OUString("com.sun.star.drawing.OLE2Shape"); } typedef ::cppu::WeakImplHelper< container::XNameContainer, diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index c144edcf2100..db4418c4b34c 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -271,7 +271,7 @@ void OUndoGroupSectionAction::implReInsert( ) void OUndoGroupSectionAction::implReRemove( ) { - OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod ).GetUndoEnv(); + OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod ).GetUndoEnv(); try { OXUndoEnvironment::OUndoEnvLock aLock(rEnv); diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index 1fca8a23e08b..a5216aa7bc8e 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -60,7 +60,7 @@ OXMLRowColumn::OXMLRowColumn( ORptFilter& rImport const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0; for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 06455cc95339..a844ae79f149 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -70,7 +70,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0; for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index 72da5a31a7fc..94842e6bdb4c 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -185,14 +185,14 @@ void OXMLFixedContent::EndElement() uno::Reference< uno::XInterface> xInt = xFactor->createInstance(SERVICE_FORMATTEDFIELD); Reference< report::XFormattedField > xControl(xInt,uno::UNO_QUERY); xControl->setDataField("rpt:" + m_sPageText); - OSL_ENSURE(xControl.is(),"Could not create FormattedField!"); + OSL_ENSURE(xControl.is(),"Could not create FormattedField!"); m_pInP->m_xReportComponent = xControl.get(); m_xReportComponent = xControl.get(); } else { Reference< XFixedText > xControl(xFactor->createInstance(SERVICE_FIXEDTEXT),uno::UNO_QUERY); - OSL_ENSURE(xControl.is(),"Could not create FixedContent!"); + OSL_ENSURE(xControl.is(),"Could not create FixedContent!"); m_pInP->m_xReportComponent = xControl.get(); m_xReportComponent = xControl.get(); xControl->setLabel(m_sLabel); diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx index e232f9221fc5..676ee22896ae 100644 --- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx +++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx @@ -55,7 +55,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport, { for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx index 019eb3fa4054..0e268a99565d 100644 --- a/reportdesign/source/filter/xml/xmlFormattedField.cxx +++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx @@ -51,7 +51,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport, { for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx index 2fcf25de1d76..f2a5850eef0f 100644 --- a/reportdesign/source/filter/xml/xmlFunction.cxx +++ b/reportdesign/source/filter/xml/xmlFunction.cxx @@ -57,7 +57,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport static const OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE); for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx index 48cd7813f844..0c4f8b2137fc 100644 --- a/reportdesign/source/filter/xml/xmlImage.cxx +++ b/reportdesign/source/filter/xml/xmlImage.cxx @@ -57,7 +57,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport, { for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); /* const */ OUString sValue = _xAttrList->getValueByIndex( i ); @@ -66,9 +66,9 @@ OXMLImage::OXMLImage( ORptFilter& rImport, { case XML_TOK_IMAGE_DATA: { - SvtPathOptions aPathOptions; - sValue = aPathOptions.SubstituteVariable(sValue); - _xComponent->setImageURL(rImport.GetAbsoluteReference( sValue )); + SvtPathOptions aPathOptions; + sValue = aPathOptions.SubstituteVariable(sValue); + _xComponent->setImageURL(rImport.GetAbsoluteReference( sValue )); break; } case XML_TOK_PRESERVE_IRI: diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx index b5bc5d0db848..d33424691292 100644 --- a/reportdesign/source/filter/xml/xmlReport.cxx +++ b/reportdesign/source/filter/xml/xmlReport.cxx @@ -60,7 +60,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport, { for(sal_Int16 i = 0; i < nLength; ++i) { - OUString sLocalName; + OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( sAttrName,&sLocalName ); const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 09fb88ebd1bb..ec3297328428 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -367,7 +367,7 @@ void OAddFieldWindow::Update() m_aActions->EnableItem(m_aActions->GetItemId(i)); } } - OnSelectHdl(nullptr); + OnSelectHdl(nullptr); } } catch( const Exception& ) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index cefc45f953b3..5cbef2d2be07 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -4257,11 +4257,11 @@ void OReportController::openZoomDialog() void SAL_CALL OReportController::setVisualAreaSize( ::sal_Int64 _nAspect, const awt::Size& _aSize ) { ::osl::MutexGuard aGuard( getMutex() ); - bool bChanged = + bool bChanged = (m_aVisualAreaSize.Width != _aSize.Width || m_aVisualAreaSize.Height != _aSize.Height); - m_aVisualAreaSize = _aSize; - if( bChanged ) + m_aVisualAreaSize = _aSize; + if( bChanged ) setModified( true ); m_nAspect = _nAspect; } diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index a50d13d7a8db..fde1d48c69ca 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -455,7 +455,7 @@ void PropBrw::Resize() // adjust size if (m_xBrowserComponentWindow.is()) { - Size aSize = GetOutputSizePixel(); + Size aSize = GetOutputSizePixel(); m_xBrowserComponentWindow->setPosSize(0, 0, aSize.Width(), aSize.Height(), awt::PosSize::WIDTH | awt::PosSize::HEIGHT); } diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index fb12e4155e14..167877e5d670 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -557,7 +557,7 @@ static oslFileError create_dir_recursively_( if (osl_error != osl_File_E_None && osl_error != osl_File_E_EXIST) return osl_error; - dir_path[pos] = '/'; + dir_path[pos] = '/'; return create_dir_recursively_(dir_path, aDirectoryCreationCallbackFunc, pData); } diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index b25bc3f1ed14..f6a2299643cc 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -134,7 +134,7 @@ namespace { pStat->aAccessTime.Seconds = file_stat.st_atime; pStat->aAccessTime.Nanosec = 0; - pStat->uValidFields |= osl_FileStatus_Mask_AccessTime; + pStat->uValidFields |= osl_FileStatus_Mask_AccessTime; } void set_file_modify_time(const struct stat& file_stat, oslFileStatus* pStat) @@ -148,7 +148,7 @@ namespace { if (S_ISREG(file_stat.st_mode)) { - pStat->uFileSize = file_stat.st_size; + pStat->uFileSize = file_stat.st_size; pStat->uValidFields |= osl_FileStatus_Mask_FileSize; } } @@ -260,7 +260,7 @@ static oslFileError osl_psz_setFileAttributes( const sal_Char* pszFilePath, sal_ oslFileError osl_error = osl_File_E_None; mode_t nNewMode = 0; - OSL_ENSURE(!(osl_File_Attribute_Hidden & uAttributes), "osl_File_Attribute_Hidden doesn't work under Unix"); + OSL_ENSURE(!(osl_File_Attribute_Hidden & uAttributes), "osl_File_Attribute_Hidden doesn't work under Unix"); if (uAttributes & osl_File_Attribute_OwnRead) nNewMode |= S_IRUSR; diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 0661975926fe..20e40cb444c1 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -127,7 +127,8 @@ oslFileError getSystemPathFromFileUrl( } i = j + 1; break; - } if (!rtl::isAsciiAlphanumeric(c) && c != '+' && c != '-' + } + if (!rtl::isAsciiAlphanumeric(c) && c != '+' && c != '-' && c != '.') { break; @@ -418,7 +419,7 @@ namespace if (*p == '/') { p++; - *p = '\0'; + *p = '\0'; } else { diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index a4f1594a1896..f9037a14e4a7 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -461,7 +461,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, if (nRet <= 0) SAL_WARN("sal.osl.pipe", "send() failed: " << UnixErrnoString(errno)); - return nRet; + return nRet; } oslPipeError SAL_CALL osl_getLastPipeError(SAL_UNUSED_PARAMETER oslPipe) diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index fcb074d9b7c0..e40d53e4b279 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -610,7 +610,7 @@ oslProcessError osl_psz_executeProcess(sal_Char *pszImageName, { for (i = 0; ((i + 1) < MAX_ENVS) && (pszEnvironments[i] != nullptr); i++) Data.m_pszEnv[i] = strdup(pszEnvironments[i]); - Data.m_pszEnv[i+1] = nullptr; + Data.m_pszEnv[i+1] = nullptr; } else Data.m_pszEnv[0] = nullptr; @@ -657,14 +657,14 @@ oslProcessError osl_psz_executeProcess(sal_Char *pszImageName, if (Data.m_pProcImpl->m_pid != 0) { - assert(hThread != nullptr); + assert(hThread != nullptr); *pProcess = Data.m_pProcImpl; - if (Options & osl_Process_WAIT) + if (Options & osl_Process_WAIT) osl_joinProcess(*pProcess); - return osl_Process_E_None; + return osl_Process_E_None; } osl_destroyCondition(Data.m_pProcImpl->m_terminated); @@ -1072,7 +1072,7 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F userseconds = procstat.utime/hz; systemseconds = procstat.stime/hz; - pInfo->UserTime.Seconds = userseconds; + pInfo->UserTime.Seconds = userseconds; pInfo->UserTime.Nanosec = procstat.utime - (userseconds * hz); pInfo->SystemTime.Seconds = systemseconds; pInfo->SystemTime.Nanosec = procstat.stime - (systemseconds * hz); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 589662b9b62a..e06ff82aef32 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -911,7 +911,7 @@ static bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode) } #ifndef MACOSX - if ( fcntl(pFile->m_Handle, F_SETLKW, &lock) == -1 ) + if ( fcntl(pFile->m_Handle, F_SETLKW, &lock) == -1 ) #else /* Mac OSX will return ENOTSUP for webdav drives so we should ignore it */ if ( fcntl(pFile->m_Handle, F_SETLKW, &lock) == -1 && errno != ENOTSUP ) @@ -1477,9 +1477,9 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, sal_uInt32 *pNoEntry) { static sal_uInt32 Sect = 0; - sal_uInt32 i, n; - sal_uInt32 Len; - osl_TProfileSection* pSec=nullptr; + sal_uInt32 i, n; + sal_uInt32 Len; + osl_TProfileSection* pSec=nullptr; Len = strlen(Section); diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index b7630cb32f4c..cc29a6f59625 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -149,7 +149,7 @@ static oslFileError osl_setup_base_directory_impl_( rtl_uString** ppustr_base_dir, bool* b_delete_on_close) { - oslFileError osl_error; + oslFileError osl_error; OSL_PRECOND(((nullptr != pHandle) || (nullptr != ppustrTempFileURL)), "Invalid parameter!"); diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 8fbe04e46d91..aa05f6ef407a 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -584,16 +584,16 @@ static oslThreadIdentifier lookupThreadId (pthread_t hThread) pthread_mutex_lock(&HashLock); - pEntry = HashTable[HASHID(hThread)]; - while (pEntry != nullptr) + pEntry = HashTable[HASHID(hThread)]; + while (pEntry != nullptr) + { + if (pthread_equal(pEntry->Handle, hThread)) { - if (pthread_equal(pEntry->Handle, hThread)) - { - pthread_mutex_unlock(&HashLock); - return pEntry->Ident; - } - pEntry = pEntry->Next; + pthread_mutex_unlock(&HashLock); + return pEntry->Ident; } + pEntry = pEntry->Next; + } pthread_mutex_unlock(&HashLock); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index ecb65ae8cd3f..23ae3359961d 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -1757,7 +1757,7 @@ namespace osl_FileStatus #if (defined UNX) changeFileMode(aTypeURL, S_IXUSR | S_IXGRP | S_IXOTH); - FileStatus rFileStatus(osl_FileStatus_Mask_Attributes); + FileStatus rFileStatus(osl_FileStatus_Mask_Attributes); nError = rItem.getFileStatus(rFileStatus); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError); @@ -2068,7 +2068,7 @@ namespace osl_FileStatus void getFileURL_001() { - FileStatus rFileStatus(osl_FileStatus_Mask_FileURL); + FileStatus rFileStatus(osl_FileStatus_Mask_FileURL); nError = rItem.getFileStatus(rFileStatus); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError); @@ -2116,25 +2116,25 @@ namespace osl_FileStatus aUStr_LnkFileSys += aSlashURL + getCurrentPID() + "/link.file"; aUStr_SrcFileSys += aSlashURL + getCurrentPID() + "/tmpname"; - OString strLinkFileName, strSrcFileName; - strLinkFileName = OUStringToOString(aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US); - strSrcFileName = OUStringToOString(aUStr_SrcFileSys, RTL_TEXTENCODING_ASCII_US); + OString strLinkFileName, strSrcFileName; + strLinkFileName = OUStringToOString(aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US); + strSrcFileName = OUStringToOString(aUStr_SrcFileSys, RTL_TEXTENCODING_ASCII_US); sal_Int32 fd; - fd = symlink(strSrcFileName.getStr(), strLinkFileName.getStr()); + fd = symlink(strSrcFileName.getStr(), strLinkFileName.getStr()); CPPUNIT_ASSERT_EQUAL_MESSAGE("in creating link file", static_cast<sal_Int32>(0), fd); // get linkTarget URL nError = DirectoryItem::get(aLnkURL1, rItem); CPPUNIT_ASSERT_EQUAL_MESSAGE("in getting link file item", osl::FileBase::E_None, nError); - FileStatus rFileStatus(osl_FileStatus_Mask_LinkTargetURL); + FileStatus rFileStatus(osl_FileStatus_Mask_LinkTargetURL); nError = rItem.getFileStatus(rFileStatus); CPPUNIT_ASSERT_EQUAL_MESSAGE("in getting link file status", osl::FileBase::E_None, nError); OUString aFileURL = rFileStatus.getLinkTargetURL(); // remove link file - fd = remove(strLinkFileName.getStr()); + fd = remove(strLinkFileName.getStr()); CPPUNIT_ASSERT_EQUAL_MESSAGE("in deleting link file", static_cast<sal_Int32>(0), fd); CPPUNIT_ASSERT_MESSAGE("test for getLinkTargetURL function: Solaris version, create a file, and a link file link to it, get its LinkTargetURL and compare", @@ -2206,8 +2206,8 @@ namespace osl_File sal_Char buffer[30] = "Test for File constructor"; sal_uInt64 nCount; - osl::FileBase::RC nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); - osl::FileBase::RC nError2 = testFile.write(buffer, 30, nCount); + osl::FileBase::RC nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); + osl::FileBase::RC nError2 = testFile.write(buffer, 30, nCount); testFile.close(); CPPUNIT_ASSERT_EQUAL_MESSAGE("test for ctors function: test relative file URL, this test show that relative file URL is also acceptable", @@ -2402,7 +2402,7 @@ namespace osl_File nError2 = testFile.close(); - nError3 = testFile.setPos(osl_Pos_Absolut, 0); + nError3 = testFile.setPos(osl_Pos_Absolut, 0); CPPUNIT_ASSERT_EQUAL_MESSAGE("test for close function: manipulate a file after it has been closed", osl::FileBase::E_None, nError2); @@ -2446,7 +2446,7 @@ namespace osl_File CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); nError1 = testFile.write(pBuffer_Char, sizeof(pBuffer_Char), nCount_write); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); - nError1 = testFile.close(); + nError1 = testFile.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); } @@ -2624,7 +2624,7 @@ namespace osl_File CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); nError1 = testFile.write(pBuffer_Char, sizeof(pBuffer_Char), nCount_write); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); - nError1 = testFile.close(); + nError1 = testFile.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); } @@ -2932,10 +2932,10 @@ namespace osl_File nError1 = testFile.write(pBuffer_Char, 10, nCount_write); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); // get the current pointer; - nError1 = testFile.getPos(nFilePointer); + nError1 = testFile.getPos(nFilePointer); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); // reset pointer to the beginning; - nError1 = testFile.setPos(osl_Pos_Absolut, 0); + nError1 = testFile.setPos(osl_Pos_Absolut, 0); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); nError1 = testFile.read(buffer_read, 10, nCount_read); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); @@ -2993,7 +2993,7 @@ namespace osl_File CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); } - nError1 = testFile.close(); + nError1 = testFile.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); } @@ -3073,7 +3073,7 @@ namespace osl_File CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); nError1 = testFile.write(pBuffer_Char, sizeof(pBuffer_Char), nCount_write); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); - nError1 = testFile.close(); + nError1 = testFile.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); } @@ -3086,7 +3086,7 @@ namespace osl_File void copy_001() { - File testFile(aTmpName6); + File testFile(aTmpName6); // copy $TEMP/tmpdir/tmpname to $TEMP/tmpname. nError1 = File::copy(aTmpName4, aTmpName6); @@ -4016,7 +4016,7 @@ namespace osl_Directory // open a directory nError1 = testDirectory.open(); - CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); + CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); // close a directory nError2 = testDirectory.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError2); @@ -4099,7 +4099,7 @@ namespace osl_Directory Directory testDirectory(aTmpName6); nError1 = testDirectory.open(); - if (nError1 == osl::FileBase::E_None) + if (nError1 == osl::FileBase::E_None) { nError2 = testDirectory.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError2); @@ -4114,7 +4114,7 @@ namespace osl_Directory Directory testDirectory(aUserDirectorySys); nError1 = testDirectory.open(); - if (nError1 == osl::FileBase::E_None) + if (nError1 == osl::FileBase::E_None) { nError2 = testDirectory.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError2); @@ -4129,7 +4129,7 @@ namespace osl_Directory Directory testDirectory(aTmpName4); nError1 = testDirectory.open(); - if (nError1 == osl::FileBase::E_None) + if (nError1 == osl::FileBase::E_None) { nError2 = testDirectory.close(); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError2); @@ -4304,7 +4304,7 @@ namespace osl_Directory nError1 = testDirectory.getNextItem(rItem, 1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); // check the file name of first Item - FileStatus rFileStatusFirst(osl_FileStatus_Mask_FileName); + FileStatus rFileStatusFirst(osl_FileStatus_Mask_FileName); nError1 = rItem.getFileStatus(rFileStatusFirst); // get second Item @@ -4319,7 +4319,7 @@ namespace osl_Directory CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); // check the file name again - FileStatus rFileStatus(osl_FileStatus_Mask_FileName); + FileStatus rFileStatus(osl_FileStatus_Mask_FileName); nError1 = rItem.getFileStatus(rFileStatus); // close a directory nError1 = testDirectory.close(); @@ -4412,7 +4412,7 @@ namespace osl_Directory void getNextItem_001() { - Directory testDirectory(aTmpName3); // constructor + Directory testDirectory(aTmpName3); // constructor // open a directory nError1 = testDirectory.open(); @@ -4464,7 +4464,7 @@ namespace osl_Directory void getNextItem_002() { - Directory testDirectory(aTmpName3); // constructor + Directory testDirectory(aTmpName3); // constructor nError1 = testDirectory.getNextItem(rItem); CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getNextItem function: retrieve an item in a directory which is not opened, also test for nHint's default value.", @@ -4473,7 +4473,7 @@ namespace osl_Directory void getNextItem_003() { - Directory testDirectory(aTmpName3); // constructor + Directory testDirectory(aTmpName3); // constructor // open a directory nError1 = testDirectory.open(); @@ -4535,7 +4535,7 @@ namespace osl_Directory else break; }; - fd = std::remove(strLinkFileName.getStr()); + fd = std::remove(strLinkFileName.getStr()); CPPUNIT_ASSERT_EQUAL_MESSAGE("remove link file failed", static_cast<sal_Int32>(0), fd); CPPUNIT_ASSERT_MESSAGE("test for getNextItem function: check if can retrieve the link file name", bFoundOK); @@ -4569,9 +4569,9 @@ namespace osl_Directory { // get file system name OUString aFileSysName(aNullURL); - aFileSysName = _aVolumeInfo.getFileSystemName(); + aFileSysName = _aVolumeInfo.getFileSystemName(); - bool bRes2 = compareFileName(aFileSysName, aNullURL); + bool bRes2 = compareFileName(aFileSysName, aNullURL); CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getVolumeInfo function: getVolumeInfo of root directory.", osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_MESSAGE("test for getVolumeInfo function: getVolumeInfo of root directory.", diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index 701732756c53..d0b7b85b03b1 100644 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -145,7 +145,7 @@ protected: sal_Int8 nPos = pChain->pos; oslThreadIdentifier oId = getIdentifier( ); //write data - sal_Int8 i; + sal_Int8 i; for ( i = 0; i < 5; i++ ) { pChain->buffer[ nPos + i ] = oId; @@ -409,8 +409,8 @@ namespace osl_Mutex if (bRes2) aMutex.release(); - CPPUNIT_ASSERT_MESSAGE("Try to acquire Mutex", !bRes1); - CPPUNIT_ASSERT_MESSAGE("Try to acquire Mutex", bRes2); + CPPUNIT_ASSERT_MESSAGE("Try to acquire Mutex", !bRes1); + CPPUNIT_ASSERT_MESSAGE("Try to acquire Mutex", bRes2); } CPPUNIT_TEST_SUITE(tryToAcquire); diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 37e79825c739..eba07659ccff 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -71,9 +71,9 @@ public: void getAppCommandArg_001() { #if defined(_WIN32) - const OUString EXECUTABLE_NAME("child_process.exe"); + const OUString EXECUTABLE_NAME("child_process.exe"); #else - const OUString EXECUTABLE_NAME("child_process"); + const OUString EXECUTABLE_NAME("child_process"); #endif OUString suCWD = getModulePath(); // OUString suCWD2 = getExecutableDirectory(); @@ -116,19 +116,19 @@ public: // "osl_joinProcess returned with failure", // osl_Process_E_None == osl_error // ); - std::unique_ptr<oslProcessInfo> pInfo( new oslProcessInfo ); - //please pay attention to initial the Size to sizeof(oslProcessInfo), or else - //you will get unknown error when call osl_getProcessInfo - pInfo->Size = sizeof(oslProcessInfo); - osl_error = osl_getProcessInfo( hProcess, osl_Process_EXITCODE, pInfo.get() ); - CPPUNIT_ASSERT_EQUAL_MESSAGE - ( - "osl_getProcessInfo returned with failure", - osl_Process_E_None, osl_error - ); + std::unique_ptr<oslProcessInfo> pInfo( new oslProcessInfo ); + //please pay attention to initial the Size to sizeof(oslProcessInfo), or else + //you will get unknown error when call osl_getProcessInfo + pInfo->Size = sizeof(oslProcessInfo); + osl_error = osl_getProcessInfo( hProcess, osl_Process_EXITCODE, pInfo.get() ); + CPPUNIT_ASSERT_EQUAL_MESSAGE + ( + "osl_getProcessInfo returned with failure", + osl_Process_E_None, osl_error + ); - printf("the exit code is %" SAL_PRIuUINT32 ".\n", pInfo->Code ); - CPPUNIT_ASSERT_EQUAL_MESSAGE("rtl_getAppCommandArg or rtl_getAppCommandArgCount error.", static_cast<oslProcessExitCode>(2), pInfo->Code); + printf("the exit code is %" SAL_PRIuUINT32 ".\n", pInfo->Code ); + CPPUNIT_ASSERT_EQUAL_MESSAGE("rtl_getAppCommandArg or rtl_getAppCommandArgCount error.", static_cast<oslProcessExitCode>(2), pInfo->Code); } CPPUNIT_TEST_SUITE(getAppCommandArg); @@ -190,47 +190,47 @@ public: sal_uInt8 pTargetUUID2[16]; rtl_getGlobalProcessId( pTargetUUID1 ); rtl_getGlobalProcessId( pTargetUUID2 ); - CPPUNIT_ASSERT_MESSAGE("getGlobalProcessId: got two same ProcessIds.", !memcmp( pTargetUUID1 , pTargetUUID2 , 16 ) ); + CPPUNIT_ASSERT_MESSAGE("getGlobalProcessId: got two same ProcessIds.", !memcmp( pTargetUUID1 , pTargetUUID2 , 16 ) ); } //different processes different pids void getGlobalProcessId_002() { #if defined(_WIN32) - const OUString EXEC_NAME("child_process_id.exe"); + const OUString EXEC_NAME("child_process_id.exe"); #else - const OUString EXEC_NAME("child_process_id"); + const OUString EXEC_NAME("child_process_id"); #endif sal_uInt8 pTargetUUID1[16]; rtl_getGlobalProcessId( pTargetUUID1 ); printUuid( pTargetUUID1 ); sal_Char pUUID1[32]; - printUuidtoBuffer( pTargetUUID1, pUUID1 ); - printf("# UUID to String is %s\n", pUUID1); + printUuidtoBuffer( pTargetUUID1, pUUID1 ); + printf("# UUID to String is %s\n", pUUID1); - OUString suCWD = getModulePath(); + OUString suCWD = getModulePath(); oslProcess hProcess = nullptr; - OUString suFileURL = suCWD + "/" + EXEC_NAME; - oslFileHandle* pChildOutputRead = new oslFileHandle(); + OUString suFileURL = suCWD + "/" + EXEC_NAME; + oslFileHandle* pChildOutputRead = new oslFileHandle(); oslProcessError osl_error = osl_executeProcess_WithRedirectedIO( - suFileURL.pData, - nullptr, - 0, - osl_Process_WAIT, - nullptr, - suCWD.pData, + suFileURL.pData, + nullptr, + 0, + osl_Process_WAIT, + nullptr, + suCWD.pData, + nullptr, + 0, + &hProcess, nullptr, - 0, - &hProcess, - nullptr, - pChildOutputRead, - nullptr); + pChildOutputRead, + nullptr); CPPUNIT_ASSERT_EQUAL_MESSAGE ( "osl_createProcess failed", osl_Process_E_None, osl_error ); - //we could get return value only after the process terminated + //we could get return value only after the process terminated osl_joinProcess(hProcess); sal_Char pUUID2[33]; diff --git a/sal/qa/rtl/textenc/rtl_tencinfo.cxx b/sal/qa/rtl/textenc/rtl_tencinfo.cxx index 97719178f96f..d8c058582c75 100644 --- a/sal/qa/rtl/textenc/rtl_tencinfo.cxx +++ b/sal/qa/rtl/textenc/rtl_tencinfo.cxx @@ -1592,10 +1592,10 @@ namespace aInfo4.StructSize = 8; bool bRes4 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo4 ); bool bRes41 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_CYRILLIC, &aInfo4); - CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes4 && bRes41); + CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes4 && bRes41); // && aInfo2.MinimumCharSize >=1 ); - aInfo5.StructSize = sizeof aInfo5; + aInfo5.StructSize = sizeof aInfo5; bool bRes5 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo5 ); CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", !bRes5 && aInfo5.Flags == 0); diff --git a/sal/rtl/cmdargs.cxx b/sal/rtl/cmdargs.cxx index 3c3069f4fd6a..2d39aebd57c8 100644 --- a/sal/rtl/cmdargs.cxx +++ b/sal/rtl/cmdargs.cxx @@ -86,7 +86,7 @@ oslProcessError SAL_CALL rtl_getAppCommandArg ( oslProcessError result = osl_Process_E_NotFound; if( nArg < g_nCommandArgCount ) { - rtl_uString_assign( ppCommandArg, g_ppCommandArgs[nArg] ); + rtl_uString_assign( ppCommandArg, g_ppCommandArgs[nArg] ); result = osl_Process_E_None; } return result; diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index a2140bf81c26..52160629f574 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -1380,7 +1380,7 @@ void SAXWriter::allowLineBreak( ) throw SAXException(); } - m_bAllowLineBreak = true; + m_bAllowLineBreak = true; } void SAXWriter::unknown(const OUString& sString) commit 82b91027691a0a7138c0f70b94d6500e35bb8b44 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 8 13:19:12 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Feb 9 17:07:45 2019 +0100 loplugin:indentation in oox..package Change-Id: Ie50a1ad6e27786ccdaae2ba1ae96f5682c4a38f6 Reviewed-on: https://gerrit.libreoffice.org/67560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index d6a02570f535..1e7e9607172e 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -848,12 +848,12 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, double fAspectRatio = 0.32; awt::Size aChildSize = rShape->getSize(); - aChildSize.Width /= nCount; - aChildSize.Height /= nCount; + aChildSize.Width /= nCount; + aChildSize.Height /= nCount; awt::Point aCurrPos(0, 0); - aCurrPos.X = fAspectRatio*aChildSize.Width*(nCount-1); - aCurrPos.Y = fAspectRatio*aChildSize.Height; + aCurrPos.X = fAspectRatio*aChildSize.Width*(nCount-1); + aCurrPos.Y = fAspectRatio*aChildSize.Height; for (auto & aCurrShape : rShape->getChildren()) { diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index c878267eb8ad..aebb5ac681c3 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -1881,8 +1881,8 @@ bool VbaDirStreamObject::implIsValid() const bool VbaDirStreamObject::implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize ) { - ornRecId = rBaseStrm.readuInt16(); - ornRecSize = rBaseStrm.readInt32(); + ornRecId = rBaseStrm.readuInt16(); + ornRecSize = rBaseStrm.readInt32(); // for no obvious reason, PROJECTVERSION record contains size field of 4, but is 6 bytes long if( ornRecId == 9 ) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 78002bfdbeb0..624d1922a35a 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -832,7 +832,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x try { Any aAny( xProp->getPropertyValue( "Alignment" )); - aAny >>= aLegendPos; + aAny >>= aLegendPos; } catch( beans::UnknownPropertyException & ) { diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 361a17cd7ea4..d7697a3d8e7e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1579,7 +1579,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool } } - if (GetProperty(rXPropSet, "CharKerning")) + if (GetProperty(rXPropSet, "CharKerning")) nCharKerning = static_cast<sal_Int32>(*o3tl::doAccess<sal_Int16>(mAny)); /** While setting values in propertymap, * CharKerning converted using GetTextSpacingPoint diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 7544db053339..e16944af5b06 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -169,7 +169,7 @@ static void lcl_ConvertProgID(OUString const& rProgID, } else if (rProgID.startsWith("PowerPoint.Slide.12")) { - o_rMediaType = "application/vnd.openxmlformats-officedocument.presentationml.slide"; + o_rMediaType = "application/vnd.openxmlformats-officedocument.presentationml.slide"; o_rRelationType = oox::getRelationship(Relationship::PACKAGE); o_rFileExtension = "sldx"; } diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 8e7d3c505f98..a50ca358a6ee 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -286,24 +286,24 @@ Reference< XPropertySet > PropertyMap::makePropertySet() const #if OSL_DEBUG_LEVEL > 0 static void lclDumpAnyValue( const Any& value) { - OUString strValue; - Sequence< OUString > strArray; - Sequence< Any > anyArray; - Sequence< PropertyValue > propArray; - Sequence< Sequence< PropertyValue > > propArrayArray; - Sequence< EnhancedCustomShapeAdjustmentValue > adjArray; - Sequence< EnhancedCustomShapeSegment > segArray; - Sequence< EnhancedCustomShapeParameterPair > ppArray; - EnhancedCustomShapeSegment segment; - EnhancedCustomShapeParameterPair pp; - EnhancedCustomShapeParameter par; - HomogenMatrix3 aMatrix; - sal_Int32 intValue = 0; - sal_uInt32 uintValue = 0; - sal_Int16 int16Value = 0; - sal_uInt16 uint16Value = 0; - float floatValue = 0; - bool boolValue = false; + OUString strValue; + Sequence< OUString > strArray; + Sequence< Any > anyArray; + Sequence< PropertyValue > propArray; + Sequence< Sequence< PropertyValue > > propArrayArray; + Sequence< EnhancedCustomShapeAdjustmentValue > adjArray; + Sequence< EnhancedCustomShapeSegment > segArray; + Sequence< EnhancedCustomShapeParameterPair > ppArray; + EnhancedCustomShapeSegment segment; + EnhancedCustomShapeParameterPair pp; + EnhancedCustomShapeParameter par; + HomogenMatrix3 aMatrix; + sal_Int32 intValue = 0; + sal_uInt32 uintValue = 0; + sal_Int16 int16Value = 0; + sal_uInt16 uint16Value = 0; + float floatValue = 0; + bool boolValue = false; LineSpacing spacing; // RectanglePoint pointValue; WritingMode aWritingMode; @@ -311,73 +311,73 @@ static void lclDumpAnyValue( const Any& value) TextHorizontalAdjust aTextHorizAdj; Reference< XIndexReplace > xNumRule; - if( value >>= strValue ) + if( value >>= strValue ) fprintf (stderr,"\"%s\"\n", USS( strValue ) ); - else if( value >>= strArray ) { + else if( value >>= strArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<strArray.getLength(); i++ ) fprintf (stderr,"\t\t\t[%3d] \"%s\"\n", i, USS( strArray[i] ) ); - } else if( value >>= propArray ) { + } else if( value >>= propArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<propArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] %s (%s) ", i, USS( propArray[i].Name ), USS(propArray[i].Value.getValueTypeName()) ); lclDumpAnyValue( propArray[i].Value ); } - } else if( value >>= propArrayArray ) { + } else if( value >>= propArrayArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<propArrayArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i); lclDumpAnyValue( makeAny (propArrayArray[i]) ); } - } else if( value >>= anyArray ) { + } else if( value >>= anyArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<anyArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(value.getValueTypeName()) ); lclDumpAnyValue( anyArray[i] ); } - } else if( value >>= adjArray ) { + } else if( value >>= adjArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<adjArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] (%s) ", i, USS(adjArray[i].Value.getValueTypeName()) ); lclDumpAnyValue( adjArray[i].Value ); } - } else if( value >>= segArray ) { + } else if( value >>= segArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<segArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i ); lclDumpAnyValue( makeAny( segArray[i] ) ); } - } else if( value >>= ppArray ) { + } else if( value >>= ppArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<ppArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i ); lclDumpAnyValue( makeAny( ppArray[i] ) ); } - } else if( value >>= segment ) { + } else if( value >>= segment ) { fprintf (stderr,"Command: %d Count: %d\n", segment.Command, segment.Count); - } else if( value >>= pp ) { + } else if( value >>= pp ) { fprintf (stderr,"First: "); lclDumpAnyValue( makeAny (pp.First) ); fprintf (stderr,"\t\t\t Second: "); lclDumpAnyValue( makeAny (pp.Second) ); - } else if( value >>= par ) { + } else if( value >>= par ) { fprintf (stderr,"Parameter (%s): ", USS(par.Value.getValueTypeName())); lclDumpAnyValue( par.Value ); - } else if( value >>= aMatrix ) { + } else if( value >>= aMatrix ) { fprintf (stderr,"Matrix\n%f %f %f\n%f %f %f\n%f %f %f\n", aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3, aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3, aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3); - } else if( value >>= intValue ) + } else if( value >>= intValue ) fprintf (stderr,"%-10" SAL_PRIdINT32 " (hex: %" SAL_PRIxUINT32 ")\n", intValue, intValue); - else if( value >>= uintValue ) + else if( value >>= uintValue ) fprintf (stderr,"%-10" SAL_PRIuUINT32 " (hex: %" SAL_PRIxUINT32 ")\n", uintValue, uintValue); - else if( value >>= int16Value ) + else if( value >>= int16Value ) fprintf (stderr,"%-10d (hex: %x)\n", int16Value, int16Value); - else if( value >>= uint16Value ) + else if( value >>= uint16Value ) fprintf (stderr,"%-10d (hex: %x)\n", uint16Value, uint16Value); - else if( value >>= floatValue ) + else if( value >>= floatValue ) fprintf (stderr,"%f\n", floatValue); - else if( value >>= boolValue ) + else if( value >>= boolValue ) fprintf (stderr,"%-10d (bool)\n", boolValue); - else if( value >>= xNumRule ) { + else if( value >>= xNumRule ) { fprintf (stderr, "XIndexReplace\n"); if (xNumRule.is()) { for (int k=0; k<xNumRule->getCount(); k++) { @@ -393,9 +393,9 @@ static void lclDumpAnyValue( const Any& value) } else { fprintf (stderr, "empty reference\n"); } - } else if( value >>= aWritingMode ) + } else if( value >>= aWritingMode ) fprintf(stderr, "%d writing mode\n", static_cast<int>(aWritingMode)); - else if( value >>= aTextVertAdj ) { + else if( value >>= aTextVertAdj ) { const char* s = "unknown"; switch( aTextVertAdj ) { case TextVerticalAdjust_TOP: @@ -413,8 +413,8 @@ static void lclDumpAnyValue( const Any& value) case TextVerticalAdjust::TextVerticalAdjust_MAKE_FIXED_SIZE: s = "make_fixed_size"; break; - } - fprintf (stderr, "%s\n", s); + } + fprintf (stderr, "%s\n", s); } else if( value >>= aTextHorizAdj ) { const char* s = "unknown"; switch( aTextHorizAdj ) { diff --git a/oox/source/ppt/buildlistcontext.cxx b/oox/source/ppt/buildlistcontext.cxx index b220755984c5..ae38a0e09ee3 100644 --- a/oox/source/ppt/buildlistcontext.cxx +++ b/oox/source/ppt/buildlistcontext.cxx @@ -68,7 +68,7 @@ namespace oox { namespace ppt { // bool uiExpand = rAttribs.getBool( XML_uiExpand, true ); /* this is unsigned */ // sal_uInt32 nGroupId = rAttribs.getUnsignedInteger( XML_grpId, 0 ); - return this; + return this; } case A_TOKEN( bldDgm ): case A_TOKEN( bldOleChart ): diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx index 8faa5108037f..a405e13a0cdd 100644 --- a/oox/source/ppt/layoutfragmenthandler.cxx +++ b/oox/source/ppt/layoutfragmenthandler.cxx @@ -64,7 +64,7 @@ ContextHandlerRef LayoutFragmentHandler::onCreateContext( sal_Int32 aElementToke if( aShowMasterShapes.has() && !aShowMasterShapes.get() ) { mpSlidePersistPtr->hideShapesAsMasterShapes(); } - break; + break; } case PPT_TOKEN( hf ): // CT_HeaderFooter return new HeaderFooterContext( *this, rAttribs, mpSlidePersistPtr->getHeaderFooter() ); diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index caec14ffe1ba..c0c81effba0c 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -127,7 +127,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con default: break; } - if ( nFirstPlaceholder ) + if ( nFirstPlaceholder ) { oox::drawingml::ShapePtr pPlaceholder; if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree @@ -158,8 +158,8 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con } } - } - break; + } + break; } // nvSpPr CT_ShapeNonVisual end diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index 4caa76b1c1c7..199bb790efff 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -141,7 +141,7 @@ void PPTShapeGroupContext::importExtDrawings( ) if( pGraphicShape->getFontRefColorForNodes().isUsed() ) applyFontRefColor(mpGroupShapePtr, pGraphicShape->getFontRefColorForNodes()); } - pGraphicShape = oox::drawingml::ShapePtr( nullptr ); + pGraphicShape = oox::drawingml::ShapePtr( nullptr ); } } diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index b835b0f1ebb1..82eaeabf2eec 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -147,7 +147,7 @@ namespace oox { namespace ppt { sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType ) { - sal_Int16 nOdpDirection; + sal_Int16 nOdpDirection; nOdpDirection = ooxToOdpBorderDirections( nOoxType ); if( nOdpDirection == 0 ) { @@ -158,7 +158,7 @@ namespace oox { namespace ppt { sal_Int16 SlideTransition::ooxToOdpBorderDirections( ::sal_Int32 nOoxType ) { - sal_Int16 nOdpDirection; + sal_Int16 nOdpDirection; switch( nOoxType ) { case XML_d: @@ -182,7 +182,7 @@ namespace oox { namespace ppt { sal_Int16 SlideTransition::ooxToOdpSideDirections( ::sal_Int32 nOoxType ) { - sal_Int16 nOdpDirection; + sal_Int16 nOdpDirection; switch( nOoxType ) { case XML_d: @@ -215,7 +215,7 @@ namespace oox { namespace ppt { sal_Int16 SlideTransition::ooxToOdpCornerDirections( ::sal_Int32 nOoxType ) { - sal_Int16 nOdpDirection; + sal_Int16 nOdpDirection; switch( nOoxType ) { case XML_lu: @@ -239,7 +239,7 @@ namespace oox { namespace ppt { sal_Int16 SlideTransition::ooxToOdpDirection( ::sal_Int32 nOoxType ) { - sal_Int16 nOdpDir; + sal_Int16 nOdpDir; switch( nOoxType ) { case XML_vert: diff --git a/oox/source/vml/vmlshapecontainer.cxx b/oox/source/vml/vmlshapecontainer.cxx index 474c6ac2c86f..e8008a1f4638 100644 --- a/oox/source/vml/vmlshapecontainer.cxx +++ b/oox/source/vml/vmlshapecontainer.cxx @@ -86,7 +86,7 @@ const ShapeType* ShapeContainer::getShapeTypeById( const OUString& rShapeId ) co for (auto const& shape : maShapes) if( const ShapeType* pType = shape->getChildTypeById( rShapeId ) ) return pType; - return nullptr; + return nullptr; } const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId ) const @@ -98,7 +98,7 @@ const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId ) const for (auto const& shape : maShapes) if( const ShapeBase* pShape = shape->getChildById( rShapeId ) ) return pShape; - return nullptr; + return nullptr; } std::shared_ptr< ShapeBase > ShapeContainer::takeLastShape() diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 8fe6446b50db..f81c3af1c5eb 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -2378,7 +2378,7 @@ void SAL_CALL OWriteStream::dispose() // for now the listener is just notified at the end of the method to workaround the problem // in future a more elegant way should be found - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); m_pData->m_aListenersContainer.disposeAndClear( aSource ); } @@ -3096,12 +3096,12 @@ void OWriteStream::BroadcastTransaction( sal_Int8 nMessage ) throw lang::DisposedException(); } - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); - ::cppu::OInterfaceContainerHelper* pContainer = + ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( cppu::UnoType<embed::XTransactionListener>::get()); - if ( pContainer ) + if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); while ( pIterator.hasMoreElements( ) ) diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 2d2098df298a..a7cdc1de4d9e 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1933,12 +1933,12 @@ void OStorage::BroadcastModifiedIfNecessary() SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" ); - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); - ::cppu::OInterfaceContainerHelper* pContainer = + ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( cppu::UnoType<util::XModifyListener>::get()); - if ( pContainer ) + if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); while ( pIterator.hasMoreElements( ) ) @@ -1965,12 +1965,12 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage ) SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" ); - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); - ::cppu::OInterfaceContainerHelper* pContainer = + ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( cppu::UnoType<embed::XTransactionListener>::get()); - if ( pContainer ) + if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); while ( pIterator.hasMoreElements( ) ) diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx index 79f2bdbbd974..3fa6e2792752 100644 --- a/package/source/zipapi/ZipOutputEntry.cxx +++ b/package/source/zipapi/ZipOutputEntry.cxx @@ -183,7 +183,7 @@ void ZipOutputEntry::write( const Sequence< sal_Int8 >& rBuffer ) if (!m_aDeflater.finished()) { m_aDeflater.setInputSegment(rBuffer); - while (!m_aDeflater.needsInput()) + while (!m_aDeflater.needsInput()) doDeflate(); if (!m_bEncryptCurrentEntry) m_aCRC.updateSegment(rBuffer, rBuffer.getLength()); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 6cbd1807b6c9..b22b83ec7be0 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -618,7 +618,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) m_aURL = aParamUrl.copy( 0, nParam ); OUString aParam = aParamUrl.copy( nParam + 1 ); - sal_Int32 nIndex = 0; + sal_Int32 nIndex = 0; do { OUString aCommand = aParam.getToken( 0, '&', nIndex ); @@ -1337,7 +1337,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile() if( bUseTemp ) { // no information loss appears, thus no special handling is required - uno::Any aCaught( ::cppu::getCaughtException() ); + uno::Any aCaught( ::cppu::getCaughtException() ); // it is allowed to throw WrappedTargetException WrappedTargetException aException; @@ -1399,10 +1399,10 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput() } OpenCommandArgument2 aArg; - aArg.Mode = OpenMode::DOCUMENT; - aArg.Priority = 0; // unused - aArg.Sink = xSink; - aArg.Properties = uno::Sequence< Property >( 0 ); // unused + aArg.Mode = OpenMode::DOCUMENT; + aArg.Priority = 0; // unused + aArg.Sink = xSink; + aArg.Properties = uno::Sequence< Property >( 0 ); // unused aOriginalContent.executeCommand("open", makeAny( aArg ) ); } @@ -1436,7 +1436,7 @@ void SAL_CALL ZipPackage::commitChanges() } catch (const ucb::ContentCreationException&) { - css::uno::Any anyEx = cppu::getCaughtException(); + css::uno::Any anyEx = cppu::getCaughtException(); throw WrappedTargetException(THROW_WHERE "Temporary file should be creatable!", static_cast < OWeakObject * > ( this ), anyEx ); } diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx index b50ca89b8dac..810daa737a4a 100644 --- a/package/source/zippackage/ZipPackageBuffer.cxx +++ b/package/source/zippackage/ZipPackageBuffer.cxx @@ -96,7 +96,7 @@ void SAL_CALL ZipPackageBuffer::writeBytes( const Sequence< sal_Int8 >& aData ) } else if (m_bMustInitBuffer) { - m_aBuffer.realloc ( static_cast < sal_Int32 > ( m_nBufferSize ) ); + m_aBuffer.realloc ( static_cast < sal_Int32 > ( m_nBufferSize ) ); m_bMustInitBuffer = false; } memcpy( m_aBuffer.getArray() + m_nCurrent, aData.getConstArray(), static_cast < sal_Int32 > (nDataLen)); diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index 461da35829e3..b9167a9f3a2e 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -412,7 +412,7 @@ void SAL_CALL OZipFileAccess::dispose() if ( m_pListenersContainer ) { - lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); + lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) ); m_pListenersContainer->disposeAndClear( aSource ); m_pListenersContainer.reset(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits