Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3677

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/77/3677/1

Clang cleanup, unaligned if statement

The extra semi-colons were confusing clang. Just remove the macro,
it's not adding any real value.

Change-Id: I7f7c312d2c0167a17e31624e197ae75b77fa0c2f
---
M cppcanvas/source/mtfrenderer/emfplus.cxx
1 file changed, 3 insertions(+), 7 deletions(-)



diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 2a3d9de..52fc36b 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -870,10 +870,6 @@
                              (x >> 8) & 0xff, \
                              x & 0xff), \
                         rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace());
-#define SET_FILL_COLOR(x) \
-    rState.fillColor = COLOR(x);
-#define SET_TEXT_COLOR(x) \
-    rState.textColor = COLOR(x);
 
         void ImplRenderer::EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon& polygon, const 
ActionFactoryParameters& rParms,
                                                 OutDevState& rState, const CanvasSharedPtr& 
rCanvas, bool isColor, sal_uInt32 brushIndexOrColor)
@@ -891,7 +887,7 @@
                 rState.isFillColorSet = true;
                 rState.isLineColorSet = false;
 
-                SET_FILL_COLOR(brushIndexOrColor);
+                rState.fillColor = COLOR(brushIndexOrColor);
 
                 pPolyAction = ActionSharedPtr ( 
internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) );
 
@@ -1641,7 +1637,7 @@
                                 OUString text = read_uInt16s_ToOUString(rMF, stringLength);
 
                                 double cellSize = setFont (flags & 0xff, rFactoryParms, rState);
-                                SET_TEXT_COLOR( brushId );
+                                rState.textColor = COLOR( brushId );
 
                                 ActionSharedPtr pTextAction(
                                     TextActionFactory::createTextAction(
@@ -1881,7 +1877,7 @@
                             setFont (flags & 0xff, rFactoryParms, rState);
 
                             if( flags & 0x8000 )
-                                SET_TEXT_COLOR(brushIndexOrColor);
+                                rState.textColor = COLOR( brushIndexOrColor );
 
                             ActionSharedPtr pTextAction(
                                     TextActionFactory::createTextAction(

-- 
To view, visit https://gerrit.libreoffice.org/3677
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f7c312d2c0167a17e31624e197ae75b77fa0c2f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Noel Grandin <noelgrandin@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.