diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-30 19:35:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-03 08:41:11 +0200 |
commit | d3971ec256450e6783920b46f672048b29719949 (patch) | |
tree | f4722d0e2bc321cf71b49b7573cf38640e9b28fc /filter | |
parent | f50bf3c5225b49b3c6f77f882e35305e5dc5ccd3 (diff) |
new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/bitmap.cxx | 20 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 60 |
2 files changed, 38 insertions, 42 deletions
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx index 71a64eedcddc..86e70007e3ac 100644 --- a/filter/source/graphicfilter/icgm/bitmap.cxx +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -131,19 +131,17 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc ) case 24 : { + BitmapColor aBitmapColor; + for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) { - BitmapColor aBitmapColor; - for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + sal_uInt8* pTemp = rDesc.mpBuf; + nxC = nxCount; + for ( nx = 0; --nxC; nx++ ) { - sal_uInt8* pTemp = rDesc.mpBuf; - nxC = nxCount; - for ( nx = 0; --nxC; nx++ ) - { - aBitmapColor.SetRed( *pTemp++ ); - aBitmapColor.SetGreen( *pTemp++ ); - aBitmapColor.SetBlue( *pTemp++ ); - rDesc.mpAcc->SetPixel( ny, nx, aBitmapColor ); - } + aBitmapColor.SetRed( *pTemp++ ); + aBitmapColor.SetGreen( *pTemp++ ); + aBitmapColor.SetBlue( *pTemp++ ); + rDesc.mpAcc->SetPixel( ny, nx, aBitmapColor ); } } } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index dab4070a32f2..7d06983c4dbc 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1371,44 +1371,42 @@ void SVGTextWriter::implWriteBulletChars() for( ; it != end; ++it ) { // <g id="?" > (used by animations) + // As id we use the id of the text portion placeholder with prefix + // bullet-char-* + sId = "bullet-char-" + it->first; + mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", sId ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "BulletChar" ); + SvXMLElementExport aBulletCharElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ); + + // <g transform="translate(x,y)" > { - // As id we use the id of the text portion placeholder with prefix - // bullet-char-* - sId = "bullet-char-" + it->first; - mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", sId ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "BulletChar" ); - SvXMLElementExport aBulletCharElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ); + const BulletListItemInfo& rInfo = it->second; - // <g transform="translate(x,y)" > - { - const BulletListItemInfo& rInfo = it->second; + // Add positioning attribute through a translation + sPosition = "translate(" + + OUString::number( rInfo.aPos.X() ) + + "," + OUString::number( rInfo.aPos.Y() ) + ")"; + mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sPosition ); - // Add positioning attribute through a translation - sPosition = "translate(" + - OUString::number( rInfo.aPos.X() ) + - "," + OUString::number( rInfo.aPos.Y() ) + ")"; - mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sPosition ); + mrAttributeWriter.AddPaintAttr( COL_TRANSPARENT, rInfo.aColor ); - mrAttributeWriter.AddPaintAttr( COL_TRANSPARENT, rInfo.aColor ); + SvXMLElementExport aPositioningElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ); - SvXMLElementExport aPositioningElem( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true ); + // <use transform="scale(font-size)" xlink:ref="/" > + { + // Add size attribute through a scaling + sScaling = "scale(" + OUString::number( rInfo.nFontSize ) + + "," + OUString::number( rInfo.nFontSize )+ ")"; + mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sScaling ); - // <use transform="scale(font-size)" xlink:ref="/" > - { - // Add size attribute through a scaling - sScaling = "scale(" + OUString::number( rInfo.nFontSize ) + - "," + OUString::number( rInfo.nFontSize )+ ")"; - mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sScaling ); - - // Add ref attribute - sRefId = "#bullet-char-template-" + - OUString::number( ( rInfo.cBulletChar ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId ); + // Add ref attribute + sRefId = "#bullet-char-template-" + + OUString::number( ( rInfo.cBulletChar ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, sRefId ); - SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true ); - } - } // close aPositioningElem - } // close aBulletCharElem + SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true ); + } + } // close aPositioningElem } // clear the map |