Hi Damjan,

On 18.10.2012 12:02, Damjan Jovanovic wrote:
On Thu, Oct 18, 2012 at 11:42 AM, Armin Le Grand <armin.le.gr...@me.com> wrote:
--snip--

Here they are in plain text then:

--snip--
Index: main/drawinglayer/source/texture/texture3d.cxx
===================================================================
--- main/drawinglayer/source/texture/texture3d.cxx      (revision 1399340)
+++ main/drawinglayer/source/texture/texture3d.cxx      (working copy)
@@ -134,7 +134,7 @@
                  {
                      const BitmapColor
aBitmapColor(mpReadBitmap->GetColor(rY, rX));

-                    if(maBitmapEx.GetTransparentColor() == Color(aBitmapColor))
+                    if(maBitmapEx.GetTransparentColor() ==
Color((ColorData)aBitmapColor))
                      {
                          return 255;
                      }
--snip--


which could be simpler (combine it with your previous patch), if it's
even correct, and

..but will convert BitmapColor to sal_uInt8 (because there is a inline operator in the class BitmapColor), then casting to sal_uInt32 (since ColorData is a typedef to sal_uInt32) and thus would be wrong. Sigh.

Herbert is right, these operators are dangerous. I found two ways:
(a) extract RGB by feet from BitmapColor and construct a Color with it
(b) use the 'operator Color()' : '== aBitmapColor.operator Color()'

Where (a) will need more code, and (b) looks ugly.
I tend to (b) currently...

Build nearly finished...

Sincerely,
        Armin


--snip--
Index: main/svx/source/sdr/contact/objectcontacttools.cxx
===================================================================
--- main/svx/source/sdr/contact/objectcontacttools.cxx  (revision 1399340)
+++ main/svx/source/sdr/contact/objectcontacttools.cxx  (working copy)
@@ -77,18 +77,18 @@
                                return new
drawinglayer::processor2d::VclPixelProcessor2D(rViewInformation2D,
rTargetOutDev);
                  //}
  #else
-                static bool bTryTestCanvas(false);
-
-                if(bTryTestCanvas)
-                {
-                               // create test-cancas-Processor
-                               return new
drawinglayer::processor2d::canvasProcessor2D(rViewInformation2D,
rTargetOutDev);
-                }
-                else
-                {
+//                static bool bTryTestCanvas(false);
+//
+//                if(bTryTestCanvas)
+//                {
+//                             // create test-cancas-Processor
+//                             return new
drawinglayer::processor2d::canvasProcessor2D(rViewInformation2D,
rTargetOutDev);
+//                }
+//                else
+//                {
                                // create Pixel Vcl-Processor
                                return new
drawinglayer::processor2d::VclPixelProcessor2D(rViewInformation2D,
rTargetOutDev);
-                }
+//                }
  #endif
                        }
                }
--snip--

Thank you and I appreciate your efforts
Damjan


--
ALG

Reply via email to