diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-06-10 17:22:26 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-06-11 10:18:55 +0200 |
commit | f62a353a7f8fa2cad365a47fc763781a86425e87 (patch) | |
tree | c38fd646b5220eb601d13c87f88ff2ec048ea4c9 /drawinglayer/source/tools/emfpbrush.cxx | |
parent | 3c325bd525d7726395db733e684b84b1659bd41a (diff) |
"drawinglayer" -> "drawinglayer.emf" log area for some emf code
Change-Id: I83fa2d40225f83b82cea7f8934f4afdee181abe3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117000
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'drawinglayer/source/tools/emfpbrush.cxx')
-rw-r--r-- | drawinglayer/source/tools/emfpbrush.cxx | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/drawinglayer/source/tools/emfpbrush.cxx b/drawinglayer/source/tools/emfpbrush.cxx index 24c3f281812b..4acc311345a8 100644 --- a/drawinglayer/source/tools/emfpbrush.cxx +++ b/drawinglayer/source/tools/emfpbrush.cxx @@ -67,8 +67,8 @@ namespace emfplushelper s.ReadUInt32(header).ReadUInt32(type); - SAL_INFO("drawinglayer", "EMF+\t\t\tHeader: 0x" << std::hex << header); - SAL_INFO("drawinglayer", "EMF+\t\t\tType: " << BrushTypeToString(type) << "(0x" << type << ")" << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\tHeader: 0x" << std::hex << header); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\tType: " << BrushTypeToString(type) << "(0x" << type << ")" << std::dec); switch (type) { @@ -78,7 +78,7 @@ namespace emfplushelper s.ReadUInt32(color); solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tSolid color: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tSolid color: 0x" << std::hex << color << std::dec); break; } case BrushTypeHatchFill: @@ -93,28 +93,28 @@ namespace emfplushelper hatchStyle = static_cast<EmfPlusHatchStyle>(style); solidColor = ::Color(ColorAlpha, (foregroundColor >> 24), (foregroundColor >> 16) & 0xff, (foregroundColor >> 8) & 0xff, foregroundColor & 0xff); secondColor = ::Color(ColorAlpha, (backgroundColor >> 24), (backgroundColor >> 16) & 0xff, (backgroundColor >> 8) & 0xff, backgroundColor & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tHatch style: 0x" << std::hex << style); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tForeground color: 0x" << solidColor.AsRGBHexString()); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tBackground color: 0x" << secondColor.AsRGBHexString()); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tHatch style: 0x" << std::hex << style); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tForeground color: 0x" << solidColor.AsRGBHexString()); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tBackground color: 0x" << secondColor.AsRGBHexString()); break; } case BrushTypeTextureFill: { - SAL_WARN("drawinglayer", "EMF+\tTODO: implement BrushTypeTextureFill brush"); + SAL_WARN("drawinglayer.emf", "EMF+\tTODO: implement BrushTypeTextureFill brush"); break; } case BrushTypePathGradient: { s.ReadUInt32(additionalFlags).ReadInt32(wrapMode); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tAdditional flags: 0x" << std::hex << additionalFlags << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tAdditional flags: 0x" << std::hex << additionalFlags << std::dec); sal_uInt32 color; s.ReadUInt32(color); solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tCenter color: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tCenter color: 0x" << std::hex << color << std::dec); s.ReadFloat(firstPointX).ReadFloat(firstPointY); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tCenter point: " << firstPointX << "," << firstPointY); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tCenter point: " << firstPointX << "," << firstPointY); s.ReadInt32(surroundColorsNumber); - SAL_INFO("drawinglayer", "EMF+\t\t\t\t number of surround colors: " << surroundColorsNumber); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\t number of surround colors: " << surroundColorsNumber); if (surroundColorsNumber<0 || o3tl::make_unsigned(surroundColorsNumber)>SAL_MAX_INT32 / sizeof(::Color)) { @@ -129,7 +129,7 @@ namespace emfplushelper surroundColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); if (i == 0) secondColor = surroundColors[0]; - SAL_INFO("drawinglayer", "EMF+\t\t\t\tSurround color[" << i << "]: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tSurround color[" << i << "]: 0x" << std::hex << color << std::dec); } if (additionalFlags & 0x01) @@ -137,7 +137,7 @@ namespace emfplushelper sal_Int32 pathLength; s.ReadInt32(pathLength); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPath length: " << pathLength); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPath length: " << pathLength); sal_uInt64 const pos = s.Tell(); @@ -145,10 +145,10 @@ namespace emfplushelper sal_Int32 pathPoints, pathFlags; s.ReadUInt32(pathHeader).ReadInt32(pathPoints).ReadInt32(pathFlags); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPath (brush path gradient)"); - SAL_INFO("drawinglayer", "EMF+\t\t\t\t\tHeader: 0x" << std::hex << pathHeader); - SAL_INFO("drawinglayer", "EMF+\t\t\t\t\tPoints: " << std::dec << pathPoints); - SAL_INFO("drawinglayer", "EMF+\t\t\t\t\tAdditional flags: 0x" << std::hex << pathFlags << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPath (brush path gradient)"); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\t\tHeader: 0x" << std::hex << pathHeader); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\t\tPoints: " << std::dec << pathPoints); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\t\tAdditional flags: 0x" << std::hex << pathFlags << std::dec); path.reset( new EMFPPath(pathPoints) ); path->Read(s, pathFlags); @@ -158,7 +158,7 @@ namespace emfplushelper const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); aWidth = aBounds.getWidth(); aHeight = aBounds.getHeight(); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPolygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPolygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); } else @@ -167,7 +167,7 @@ namespace emfplushelper s.ReadInt32(boundaryPointCount); sal_uInt64 const pos = s.Tell(); - SAL_INFO("drawinglayer", "EMF+\t use boundary, points: " << boundaryPointCount); + SAL_INFO("drawinglayer.emf", "EMF+\t use boundary, points: " << boundaryPointCount); path.reset( new EMFPPath(boundaryPointCount) ); path->Read(s, 0x0); @@ -176,7 +176,7 @@ namespace emfplushelper const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); aWidth = aBounds.getWidth(); aHeight = aBounds.getHeight(); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPolygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPolygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); } @@ -184,13 +184,13 @@ namespace emfplushelper { EmfPlusHelperData::readXForm(s, brush_transformation); hasTransformation = true; - SAL_INFO("drawinglayer", "EMF+\t\t\t\tUse brush transformation: " << brush_transformation); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tUse brush transformation: " << brush_transformation); } if (additionalFlags & 0x08) { s.ReadInt32(blendPoints); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tuse blend, points: " << blendPoints); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tuse blend, points: " << blendPoints); if (blendPoints<0 || o3tl::make_unsigned(blendPoints)>SAL_MAX_INT32 / (2 * sizeof(float))) blendPoints = SAL_MAX_INT32 / (2 * sizeof(float)); blendPositions.reset( new float[2 * blendPoints] ); @@ -199,20 +199,20 @@ namespace emfplushelper for (int i = 0; i < blendPoints; i++) { s.ReadFloat(blendPositions[i]); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tposition[" << i << "]: " << blendPositions[i]); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tposition[" << i << "]: " << blendPositions[i]); } for (int i = 0; i < blendPoints; i++) { s.ReadFloat(blendFactors[i]); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tFactor[" << i << "]: " << blendFactors[i]); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tFactor[" << i << "]: " << blendFactors[i]); } } if (additionalFlags & 0x04) { s.ReadInt32(colorblendPoints); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tUse color blend, points: " << colorblendPoints); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tUse color blend, points: " << colorblendPoints); if (colorblendPoints<0 || o3tl::make_unsigned(colorblendPoints)>SAL_MAX_INT32 / sizeof(float)) { @@ -230,14 +230,14 @@ namespace emfplushelper for (int i = 0; i < colorblendPoints; i++) { s.ReadFloat(colorblendPositions[i]); - SAL_INFO("drawinglayer", "EMF+\tposition[" << i << "]: " << colorblendPositions[i]); + SAL_INFO("drawinglayer.emf", "EMF+\tposition[" << i << "]: " << colorblendPositions[i]); } for (int i = 0; i < colorblendPoints; i++) { s.ReadUInt32(color); colorblendColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec); } } @@ -246,17 +246,17 @@ namespace emfplushelper case BrushTypeLinearGradient: { s.ReadUInt32(additionalFlags).ReadInt32(wrapMode); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tLinear gradient, additional flags: 0x" << std::hex << additionalFlags << std::dec << ", wrapMode: " << wrapMode); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tLinear gradient, additional flags: 0x" << std::hex << additionalFlags << std::dec << ", wrapMode: " << wrapMode); s.ReadFloat(firstPointX).ReadFloat(firstPointY).ReadFloat(aWidth).ReadFloat(aHeight); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tFirst gradient point: " << firstPointX << ":" << firstPointY + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tFirst gradient point: " << firstPointX << ":" << firstPointY << ", size " << aWidth << "x" << aHeight); sal_uInt32 color; s.ReadUInt32(color); solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tfirst color: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tfirst color: 0x" << std::hex << color << std::dec); s.ReadUInt32(color); secondColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tsecond color: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tsecond color: 0x" << std::hex << color << std::dec); // repeated colors, unknown meaning, see http://www.aces.uiuc.edu/~jhtodd/Metafile/MetafileRecords/ObjectBrush.html s.ReadUInt32(color); @@ -266,13 +266,13 @@ namespace emfplushelper { EmfPlusHelperData::readXForm(s, brush_transformation); hasTransformation = true; - SAL_INFO("drawinglayer", "EMF+\t\t\t\tUse brush transformation: " << brush_transformation); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tUse brush transformation: " << brush_transformation); } if (additionalFlags & 0x08) { s.ReadInt32(blendPoints); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tUse blend, points: " << blendPoints); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tUse blend, points: " << blendPoints); if (blendPoints<0 || o3tl::make_unsigned(blendPoints)>SAL_MAX_INT32 / (2 * sizeof(float))) blendPoints = SAL_MAX_INT32 / (2 * sizeof(float)); blendPositions.reset( new float[2 * blendPoints] ); @@ -281,20 +281,20 @@ namespace emfplushelper for (int i = 0; i < blendPoints; i++) { s.ReadFloat(blendPositions[i]); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPosition[" << i << "]: " << blendPositions[i]); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPosition[" << i << "]: " << blendPositions[i]); } for (int i = 0; i < blendPoints; i++) { s.ReadFloat(blendFactors[i]); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tFactor[" << i << "]: " << blendFactors[i]); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tFactor[" << i << "]: " << blendFactors[i]); } } if (additionalFlags & 0x04) { s.ReadInt32(colorblendPoints); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tUse color blend, points: " << colorblendPoints); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tUse color blend, points: " << colorblendPoints); if (colorblendPoints<0 || o3tl::make_unsigned(colorblendPoints)>SAL_MAX_INT32 / sizeof(float)) { @@ -312,14 +312,14 @@ namespace emfplushelper for (int i = 0; i < colorblendPoints; i++) { s.ReadFloat(colorblendPositions[i]); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tPosition[" << i << "]: " << colorblendPositions[i]); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tPosition[" << i << "]: " << colorblendPositions[i]); } for (int i = 0; i < colorblendPoints; i++) { s.ReadUInt32(color); colorblendColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); - SAL_INFO("drawinglayer", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec); + SAL_INFO("drawinglayer.emf", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec); } } @@ -327,7 +327,7 @@ namespace emfplushelper } default: { - SAL_WARN("drawinglayer", "EMF+\tunhandled brush type: " << std::hex << type << std::dec); + SAL_WARN("drawinglayer.emf", "EMF+\tunhandled brush type: " << std::hex << type << std::dec); } } } |