summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--registry/source/keyimpl.cxx20
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx2
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx8
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlColumn.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlControlProperty.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlFixedContent.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlFormatCondition.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlFormattedField.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlFunction.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlImage.cxx8
-rw-r--r--reportdesign/source/filter/xml/xmlReport.cxx2
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx6
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx2
-rw-r--r--sal/osl/unx/file_misc.cxx2
-rw-r--r--sal/osl/unx/file_stat.cxx6
-rw-r--r--sal/osl/unx/file_url.cxx5
-rw-r--r--sal/osl/unx/pipe.cxx2
-rw-r--r--sal/osl/unx/process.cxx10
-rw-r--r--sal/osl/unx/profile.cxx8
-rw-r--r--sal/osl/unx/tempfile.cxx2
-rw-r--r--sal/osl/unx/thread.cxx16
-rw-r--r--sal/qa/osl/file/osl_File.cxx60
-rw-r--r--sal/qa/osl/mutex/osl_Mutex.cxx6
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx68
-rw-r--r--sal/qa/rtl/textenc/rtl_tencinfo.cxx4
-rw-r--r--sal/rtl/cmdargs.cxx2
-rw-r--r--sax/source/expatwrap/saxwriter.cxx2
29 files changed, 127 insertions, 132 deletions
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)