[Libreoffice-commits] core.git: dbaccess/source drawinglayer/source editeng/source extensions/source filter/source i18npool/source include/editeng lotuswordpro/source oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 16 13:32:06 UTC 2018
dbaccess/source/core/api/RowSet.cxx | 2
dbaccess/source/core/dataaccess/documentcontainer.cxx | 3 -
dbaccess/source/ui/misc/WCopyTable.cxx | 15 ++++---
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2
drawinglayer/source/tools/emfphelperdata.cxx | 28 ++++++-------
editeng/source/misc/svxacorr.cxx | 17 ++++----
extensions/source/propctrlr/newdatatype.cxx | 2
filter/source/graphicfilter/egif/giflzwc.cxx | 3 -
filter/source/graphicfilter/eps/eps.cxx | 3 -
filter/source/graphicfilter/etiff/etiff.cxx | 3 -
filter/source/graphicfilter/icgm/class5.cxx | 21 +++++----
filter/source/graphicfilter/idxf/dxf2mtf.cxx | 12 +++--
filter/source/msfilter/mstoolbar.cxx | 5 +-
filter/source/svg/svgfontexport.cxx | 3 -
filter/source/svg/svgwriter.cxx | 13 +++---
i18npool/source/calendar/calendar_gregorian.cxx | 38 +++++++++---------
i18npool/source/collator/collatorImpl.cxx | 3 -
include/editeng/boxitem.hxx | 8 ++-
lotuswordpro/source/filter/lwptools.cxx | 2
oox/source/drawingml/color.cxx | 2
oox/source/dump/dumperbase.cxx | 4 -
oox/source/vml/vmlformatting.cxx | 2
22 files changed, 113 insertions(+), 78 deletions(-)
New commits:
commit 890afecb45bfcd2e53599974fbcf61fffd8f8a7b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 16 14:05:25 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 16 14:31:38 2018 +0100
loplugin:buriedassign in dbaccess..oox
Change-Id: Ic0ca695a1d9d05418213475a68e233953136cc8e
Reviewed-on: https://gerrit.libreoffice.org/63468
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 8d6d7c60e798..a8d1a5721274 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1865,7 +1865,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
sal_Int32 searchIndex=1;
while(aColumnMap.find(sAlias) != aColumnMap.end())
{
- (sAlias = sName) += OUString::number(searchIndex++);
+ sAlias = sName + OUString::number(searchIndex++);
}
sName = sAlias;
}
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index d1a40470d067..d422506307fa 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -465,7 +465,8 @@ namespace
bool bRet = _xNameContainer->hasByName(sName);
if ( bRet )
{
- _rRet = _xNameContainer->getByName(_sSimpleName = sName);
+ _sSimpleName = sName;
+ _rRet = _xNameContainer->getByName(_sSimpleName);
while ( nIndex != -1 && bRet )
{
sName = _sName.getToken(0,'/',nIndex);
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 0660be262c9b..795e7e6a7eab 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -628,11 +628,16 @@ void OCopyTableWizard::construct()
{
SetSizePixel(Size(700, 350));
- AddButton( m_pbHelp = VclPtr<HelpButton>::Create(this, WB_TABSTOP) );
- AddButton( m_pbCancel = VclPtr<CancelButton>::Create(this, WB_TABSTOP) );
- AddButton( m_pbPrev = VclPtr<PushButton>::Create(this, WB_TABSTOP));
- AddButton( m_pbNext = VclPtr<PushButton>::Create(this, WB_TABSTOP));
- AddButton( m_pbFinish = VclPtr<PushButton>::Create(this, WB_TABSTOP));
+ m_pbHelp = VclPtr<HelpButton>::Create(this, WB_TABSTOP);
+ AddButton(m_pbHelp);
+ m_pbCancel = VclPtr<CancelButton>::Create(this, WB_TABSTOP);
+ AddButton(m_pbCancel);
+ m_pbPrev = VclPtr<PushButton>::Create(this, WB_TABSTOP);
+ AddButton(m_pbPrev);
+ m_pbNext = VclPtr<PushButton>::Create(this, WB_TABSTOP);
+ AddButton(m_pbNext);
+ m_pbFinish = VclPtr<PushButton>::Create(this, WB_TABSTOP);
+ AddButton(m_pbFinish);
m_pbHelp->SetSizePixel( LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)) );
m_pbCancel->SetSizePixel( LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)) );
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 046e851183c0..558cf3ee1315 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -334,7 +334,7 @@ namespace
bBrace = true;
_rJoin = _rJoin.replaceAt(_rJoin.getLength()-1,1,OUString(' '));
}
- (_rJoin += C_AND) += BuildJoinCriteria(_xConnection,&pData->GetConnLineDataList(),pData);
+ _rJoin += C_AND + BuildJoinCriteria(_xConnection,&pData->GetConnLineDataList(),pData);
if(bBrace)
_rJoin += ")";
_pEntryConn->SetVisited(true);
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 5f35ef931682..06a2d0a814b2 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -158,15 +158,15 @@ namespace emfplushelper
{
case EmfPlusObjectTypeBrush:
{
- EMFPBrush *brush;
- maEMFPObjects[index].reset(brush = new EMFPBrush());
+ EMFPBrush *brush = new EMFPBrush();
+ maEMFPObjects[index].reset(brush);
brush->Read(rObjectStream, *this);
break;
}
case EmfPlusObjectTypePen:
{
- EMFPPen *pen;
- maEMFPObjects[index].reset(pen = new EMFPPen());
+ EMFPPen *pen = new EMFPPen();
+ maEMFPObjects[index].reset(pen);
pen->Read(rObjectStream, *this);
break;
}
@@ -178,22 +178,22 @@ namespace emfplushelper
rObjectStream.ReadUInt32(header).ReadInt32(points).ReadUInt32(pathFlags);
SAL_INFO("drawinglayer", "EMF+\tpath");
SAL_INFO("drawinglayer", "EMF+\theader: 0x" << std::hex << header << " points: " << std::dec << points << " additional flags: 0x" << std::hex << pathFlags << std::dec);
- EMFPPath *path;
- maEMFPObjects[index].reset(path = new EMFPPath(points));
+ EMFPPath *path = new EMFPPath(points);
+ maEMFPObjects[index].reset(path);
path->Read(rObjectStream, pathFlags);
break;
}
case EmfPlusObjectTypeRegion:
{
- EMFPRegion *region;
- maEMFPObjects[index].reset(region = new EMFPRegion());
+ EMFPRegion *region = new EMFPRegion();
+ maEMFPObjects[index].reset(region);
region->ReadRegion(rObjectStream, *this);
break;
}
case EmfPlusObjectTypeImage:
{
- EMFPImage *image;
- maEMFPObjects[index].reset(image = new EMFPImage);
+ EMFPImage *image = new EMFPImage;
+ maEMFPObjects[index].reset(image);
image->type = 0;
image->width = 0;
image->height = 0;
@@ -204,8 +204,8 @@ namespace emfplushelper
}
case EmfPlusObjectTypeFont:
{
- EMFPFont *font;
- maEMFPObjects[index].reset(font = new EMFPFont);
+ EMFPFont *font = new EMFPFont;
+ maEMFPObjects[index].reset(font);
font->emSize = 0;
font->sizeUnit = 0;
font->fontFlags = 0;
@@ -214,8 +214,8 @@ namespace emfplushelper
}
case EmfPlusObjectTypeStringFormat:
{
- EMFPStringFormat *stringFormat;
- maEMFPObjects[index].reset(stringFormat = new EMFPStringFormat());
+ EMFPStringFormat *stringFormat = new EMFPStringFormat();
+ maEMFPObjects[index].reset(stringFormat);
stringFormat->Read(rObjectStream);
break;
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index f84fba00dfff..f5f1c9077853 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1252,12 +1252,15 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
if( bIsReplaceQuote )
{
sal_Unicode cPrev;
- bool bSttQuote = !nInsPos ||
- NonFieldWordDelim( ( cPrev = rTxt[ nInsPos-1 ])) ||
+ bool bSttQuote = !nInsPos;
+ if (!bSttQuote)
+ {
+ cPrev = rTxt[ nInsPos-1 ];
+ bSttQuote = NonFieldWordDelim(cPrev) ||
lcl_IsInAsciiArr( "([{", cPrev ) ||
( cEmDash == cPrev ) ||
( cEnDash == cPrev );
-
+ }
InsertQuote( rDoc, nInsPos, cChar, bSttQuote, bInsert );
break;
}
@@ -1890,15 +1893,15 @@ OUString SvxAutoCorrect::GetAutoCorrFileName( const LanguageTag& rLanguageTag,
sExt = "_" + sExt + ".dat";
if( bNewFile )
- ( sRet = sUserAutoCorrFile ) += sExt;
+ sRet = sUserAutoCorrFile + sExt;
else if( !bTst )
- ( sRet = sShareAutoCorrFile ) += sExt;
+ sRet = sShareAutoCorrFile + sExt;
else
{
// test first in the user directory - if not exist, then
- ( sRet = sUserAutoCorrFile ) += sExt;
+ sRet = sUserAutoCorrFile + sExt;
if( !FStatHelper::IsDocument( sRet ))
- ( sRet = sShareAutoCorrFile ) += sExt;
+ sRet = sShareAutoCorrFile + sExt;
}
return sRet;
}
diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx
index 8c2876e73b38..1b0f4e1c0947 100644
--- a/extensions/source/propctrlr/newdatatype.cxx
+++ b/extensions/source/propctrlr/newdatatype.cxx
@@ -55,7 +55,7 @@ namespace pcr
sal_Int32 nPostfixNumber = 1;
do
{
- ( sInitialName = sNameBase ) += OUString::number(nPostfixNumber++);
+ sInitialName = sNameBase + OUString::number(nPostfixNumber++);
}
while ( m_aProhibitedNames.find( sInitialName ) != m_aProhibitedNames.end() );
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
index 8b1950e526a2..3dc595a0923b 100644
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ b/filter/source/graphicfilter/egif/giflzwc.cxx
@@ -145,7 +145,8 @@ void GIFLZWCompressor::StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize )
for (i=0; i<4096; i++)
{
pTable[i].pBrother = pTable[i].pFirstChild = nullptr;
- pTable[i].nValue = static_cast<sal_uInt8>( pTable[i].nCode = i );
+ pTable[i].nCode = i;
+ pTable[i].nValue = static_cast<sal_uInt8>( i );
}
pPrefix = nullptr;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index c6a14bfeab0e..dac781d7fe87 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2507,7 +2507,8 @@ void PSWriter::StartCompression()
for ( i = 0; i < 4096; i++ )
{
pTable[ i ].pBrother = pTable[ i ].pFirstChild = nullptr;
- pTable[ i ].nValue = static_cast<sal_uInt8>( pTable[ i ].nCode = i );
+ pTable[ i ].nCode = i;
+ pTable[ i ].nValue = static_cast<sal_uInt8>( i );
}
pPrefix = nullptr;
WriteBits( nClearCode, nCodeSize );
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index 2c95f2c5712d..badcfff9f932 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -503,7 +503,8 @@ void TIFFWriter::StartCompression()
for ( i = 0; i < 4096; i++)
{
pTable[ i ].pBrother = pTable[ i ].pFirstChild = nullptr;
- pTable[ i ].nValue = static_cast<sal_uInt8>( pTable[ i ].nCode = i );
+ pTable[ i ].nCode = i;
+ pTable[ i ].nValue = static_cast<sal_uInt8>( i );
}
pPrefix = nullptr;
diff --git a/filter/source/graphicfilter/icgm/class5.cxx b/filter/source/graphicfilter/icgm/class5.cxx
index 15bd16bf4778..c74aee3497b4 100644
--- a/filter/source/graphicfilter/icgm/class5.cxx
+++ b/filter/source/graphicfilter/icgm/class5.cxx
@@ -53,9 +53,10 @@ void CGM::ImplDoClass5()
else
nWidth = static_cast<sal_uInt32>(ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize )) * 25; // scaling in 1/4 mm
- ( pElement->nAspectSourceFlags & ASF_LINEWIDTH )
- ? pElement->pLineBundle->nLineWidth = nWidth
- : pElement->aLineBundle.nLineWidth = nWidth;
+ if ( pElement->nAspectSourceFlags & ASF_LINEWIDTH )
+ pElement->pLineBundle->nLineWidth = nWidth;
+ else
+ pElement->aLineBundle.nLineWidth = nWidth;
}
break;
case 0x04 : /*Line Color*/
@@ -90,9 +91,10 @@ void CGM::ImplDoClass5()
}
else
nWidth = static_cast<sal_uInt32>(ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize )) * 25;
- ( pElement->nAspectSourceFlags & ASF_MARKERSIZE )
- ? pElement->pMarkerBundle->nMarkerSize = nWidth
- : pElement->aMarkerBundle.nMarkerSize = nWidth;
+ if ( pElement->nAspectSourceFlags & ASF_MARKERSIZE )
+ pElement->pMarkerBundle->nMarkerSize = nWidth;
+ else
+ pElement->aMarkerBundle.nMarkerSize = nWidth;
}
break;
case 0x08 : /*Marker Color*/
@@ -268,9 +270,10 @@ void CGM::ImplDoClass5()
}
else
nWidth = static_cast<sal_uInt32>(ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize )) * 25;
- ( pElement->nAspectSourceFlags & ASF_EDGEWIDTH )
- ? pElement->pEdgeBundle->nEdgeWidth = nWidth
- : pElement->aEdgeBundle.nEdgeWidth = nWidth;
+ if ( pElement->nAspectSourceFlags & ASF_EDGEWIDTH )
+ pElement->pEdgeBundle->nEdgeWidth = nWidth;
+ else
+ pElement->aEdgeBundle.nEdgeWidth = nWidth;
}
break;
case 0x1d : /*Edge Color*/
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index e5f312b743e0..1f70f450bda2 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -154,11 +154,13 @@ bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE)
aColor=ConvertColor(static_cast<sal_uInt8>(nColor));
if (aActLineColor!=aColor) {
- pVirDev->SetLineColor( aActLineColor = aColor );
+ aActLineColor = aColor;
+ pVirDev->SetLineColor( aActLineColor );
}
if (aActFillColor!=COL_TRANSPARENT) {
- pVirDev->SetFillColor(aActFillColor = COL_TRANSPARENT);
+ aActFillColor = COL_TRANSPARENT;
+ pVirDev->SetFillColor(aActFillColor);
}
return true;
}
@@ -174,11 +176,13 @@ bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE)
aColor=ConvertColor(static_cast<sal_uInt8>(nColor));
if (aActLineColor!=aColor) {
- pVirDev->SetLineColor( aActLineColor = aColor );
+ aActLineColor = aColor;
+ pVirDev->SetLineColor( aActLineColor );
}
if ( aActFillColor == COL_TRANSPARENT || aActFillColor != aColor) {
- pVirDev->SetFillColor( aActFillColor = aColor );
+ aActFillColor = aColor;
+ pVirDev->SetFillColor( aActFillColor );
}
return true;
}
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 5d985e60cc96..e6e085a06dce 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -336,7 +336,10 @@ void TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
TBCMenuSpecific* pMenu = getMenuSpecific();
if ( pMenu )
- aProp.Value <<= sMenuBar += pMenu->Name(); // name of popup
+ {
+ sMenuBar += pMenu->Name();
+ aProp.Value <<= sMenuBar; // name of popup
+ }
nStyle |= ui::ItemStyle::DROP_DOWN;
props.push_back( aProp );
}
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 69dbb720c2da..50de3e5fd89f 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -189,7 +189,8 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
pVDev->SetFont( aFont );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", aCurIdStr += OUString::number( ++mnCurFontId ) );
+ aCurIdStr += OUString::number( ++mnCurFontId );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", aCurIdStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", aUnitsPerEM );
{
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9565383dbb5d..1030c041ff1c 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -224,8 +224,8 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
aEndColor.SetGreen( static_cast<sal_uInt8>( ( aEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100 ) );
aEndColor.SetBlue( static_cast<sal_uInt8>( ( aEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100 ) );
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId,
- ( rGradientId = "Gradient_" ) += OUString::number( nCurGradientId++ ) );
+ rGradientId = "Gradient_" + OUString::number( nCurGradientId++ );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, rGradientId );
{
std::unique_ptr< SvXMLElementExport > apGradient;
@@ -3705,11 +3705,14 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm,
mpVDev->Push();
Size aSize( OutputDevice::LogicToLogic(rSize100thmm, MapMode(MapUnit::Map100thMM), aMapMode) );
- aMapMode.SetScaleX( aFractionX *= Fraction( aSize.Width(), aPrefSize.Width() ) );
- aMapMode.SetScaleY( aFractionY *= Fraction( aSize.Height(), aPrefSize.Height() ) );
+ aFractionX *= Fraction( aSize.Width(), aPrefSize.Width() );
+ aMapMode.SetScaleX( aFractionX );
+ aFractionY *= Fraction( aSize.Height(), aPrefSize.Height() );
+ aMapMode.SetScaleY( aFractionY );
Point aOffset( OutputDevice::LogicToLogic(rPos100thmm, MapMode(MapUnit::Map100thMM), aMapMode ) );
- aMapMode.SetOrigin( aOffset += aMapMode.GetOrigin() );
+ aOffset += aMapMode.GetOrigin();
+ aMapMode.SetOrigin( aOffset );
mpVDev->SetMapMode( aMapMode );
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 056d25dd2823..b8f1d15ee66f 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -167,8 +167,8 @@ Calendar_gregorian::init(const Era *_eraArray)
* */
icu::Locale aIcuLocale( "", nullptr, nullptr, "calendar=gregorian");
- UErrorCode status;
- body.reset( icu::Calendar::createInstance( aIcuLocale, status = U_ZERO_ERROR) );
+ UErrorCode status = U_ZERO_ERROR;
+ body.reset( icu::Calendar::createInstance( aIcuLocale, status) );
if (!body || !U_SUCCESS(status)) throw ERROR;
eraArray=_eraArray;
}
@@ -300,8 +300,8 @@ Calendar_gregorian::setDateTime( double fTimeInDays )
double fR = rtl::math::round( fM );
SAL_INFO_IF( fM != fR, "i18npool",
"Calendar_gregorian::setDateTime: " << std::fixed << fM << " rounded to " << fR);
- UErrorCode status;
- body->setTime( fR, status = U_ZERO_ERROR);
+ UErrorCode status = U_ZERO_ERROR;
+ body->setTime( fR, status);
if ( !U_SUCCESS(status) ) throw ERROR;
getValue();
}
@@ -313,8 +313,8 @@ Calendar_gregorian::getDateTime()
setValue();
getValue();
}
- UErrorCode status;
- double fR = body->getTime(status = U_ZERO_ERROR);
+ UErrorCode status = U_ZERO_ERROR;
+ double fR = body->getTime(status);
if ( !U_SUCCESS(status) ) throw ERROR;
return fR / U_MILLIS_PER_DAY;
}
@@ -328,10 +328,11 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays )
SAL_INFO_IF( fM != fR, "i18npool",
"Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " rounded to " << fR);
int32_t nZoneOffset, nDSTOffset;
- UErrorCode status;
- body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status = U_ZERO_ERROR );
+ UErrorCode status = U_ZERO_ERROR;
+ body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status );
if ( !U_SUCCESS(status) ) throw ERROR;
- body->setTime( fR - (nZoneOffset + nDSTOffset), status = U_ZERO_ERROR );
+ status = U_ZERO_ERROR;
+ body->setTime( fR - (nZoneOffset + nDSTOffset), status );
if ( !U_SUCCESS(status) ) throw ERROR;
getValue();
}
@@ -343,12 +344,14 @@ Calendar_gregorian::getLocalDateTime()
setValue();
getValue();
}
- UErrorCode status;
- double fTime = body->getTime( status = U_ZERO_ERROR );
+ UErrorCode status = U_ZERO_ERROR;
+ double fTime = body->getTime( status );
if ( !U_SUCCESS(status) ) throw ERROR;
- int32_t nZoneOffset = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR );
+ status = U_ZERO_ERROR;
+ int32_t nZoneOffset = body->get( UCAL_ZONE_OFFSET, status );
if ( !U_SUCCESS(status) ) throw ERROR;
- int32_t nDSTOffset = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR );
+ status = U_ZERO_ERROR;
+ int32_t nDSTOffset = body->get( UCAL_DST_OFFSET, status );
if ( !U_SUCCESS(status) ) throw ERROR;
return (fTime + (nZoneOffset + nDSTOffset)) / U_MILLIS_PER_DAY;
}
@@ -528,8 +531,9 @@ void Calendar_gregorian::getValue()
fieldIndex == CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS)
continue; // not ICU fields
- UErrorCode status; sal_Int32 value = body->get( fieldNameConverter(
- fieldIndex), status = U_ZERO_ERROR);
+ UErrorCode status = U_ZERO_ERROR;
+ sal_Int32 value = body->get( fieldNameConverter(
+ fieldIndex), status);
if ( !U_SUCCESS(status) ) throw ERROR;
// Convert millisecond to minute for ZONE and DST and set remainder in
@@ -579,8 +583,8 @@ void SAL_CALL
Calendar_gregorian::addValue( sal_Int16 fieldIndex, sal_Int32 value )
{
// since ZONE and DST could not be add, we don't need to convert value here
- UErrorCode status;
- body->add(fieldNameConverter(fieldIndex), value, status = U_ZERO_ERROR);
+ UErrorCode status = U_ZERO_ERROR;
+ body->add(fieldNameConverter(fieldIndex), value, status);
if ( !U_SUCCESS(status) ) throw ERROR;
getValue();
}
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index 9d779be08bd6..fb15a7b93c2b 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -86,7 +86,8 @@ CollatorImpl::loadCollatorAlgorithm(const OUString& impl, const lang::Locale& rL
if (!cachedItem)
throw RuntimeException(); // impl could not be loaded
- cachedItem->xC->loadCollatorAlgorithm(cachedItem->algorithm, nLocale = rLocale, collatorOptions);
+ nLocale = rLocale;
+ cachedItem->xC->loadCollatorAlgorithm(cachedItem->algorithm, nLocale, collatorOptions);
return 0;
}
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 14a30dfc4c70..103967578f20 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -227,8 +227,12 @@ public:
bool IsValid( SvxBoxInfoItemValidFlags nValid ) const
{ return bool( nValidFlags & nValid ); }
void SetValid( SvxBoxInfoItemValidFlags nValid, bool bValid = true )
- { bValid ? ( nValidFlags |= nValid )
- : ( nValidFlags &= ~nValid ); }
+ {
+ if (bValid)
+ nValidFlags |= nValid;
+ else
+ nValidFlags &= ~nValid;
+ }
void ResetFlags();
};
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index 7390eb1e3878..0f5ae98e7496 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -93,7 +93,7 @@ void LwpTools::QuickReadUnicode(LwpObjectStream* pObjStrm,
while(strlen)
{
- strlen>1023?len=1023 :len=strlen;
+ len = std::min(sal_uInt16(1023), strlen);
len = pObjStrm->QuickRead(buf, len);
buf[len] = '\0';
strBuf.append( OUString(buf, len, aEncoding) );
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 44662584da84..7008328c47ca 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -553,7 +553,7 @@ void Color::clearTransparence()
case XML_comp:
// comp: rotate hue by 180 degrees, do not change lum/sat
toHsl();
- (mnC1 += 180 * PER_DEGREE) %= MAX_DEGREE;
+ mnC1 = (mnC1 + (180 * PER_DEGREE)) % MAX_DEGREE;
break;
case XML_inv:
// invert percentual RGB values
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 2d8fb299c010..d754c6fa9cd9 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -682,7 +682,7 @@ bool StringHelper::convertFromDec( sal_Int64& ornData, const OUString& rData )
sal_Unicode cChar = rData[ nPos ];
if( (cChar < '0') || (cChar > '9') )
return false;
- (ornData *= 10) += (cChar - '0');
+ ornData = (ornData * 10) + (cChar - '0');
}
if( bNeg )
ornData *= -1;
@@ -703,7 +703,7 @@ bool StringHelper::convertFromHex( sal_Int64& ornData, const OUString& rData )
cChar -= ('a' - 10);
else
return false;
- (ornData <<= 4) += cChar;
+ ornData = (ornData << 4) + cChar;
}
return true;
}
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index c215cc577c7b..db9f008a5a99 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -785,7 +785,7 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper&
behaviour is reversed. This means that in this case
a focus of 0% swaps the gradient. */
if( fFocus < -0.5 || fFocus > 0.5 )
- (nVmlAngle += 180) %= 360;
+ nVmlAngle = (nVmlAngle + 180) % 360;
// set the start and stop colors
lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 0.0, aColor1 );
lcl_setGradientStop( aFillProps.maGradientProps.maGradientStops, 1.0, aColor2 );
More information about the Libreoffice-commits
mailing list