Author: alg
Date: Mon May  6 14:13:44 2013
New Revision: 1479578

URL: http://svn.apache.org/r1479578
Log:
i122216 Ensure FormControls get printed/PDFed, also ensure graphics are all 
visible in metafiles

Modified:
    
openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
    
openoffice/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
    openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
    openoffice/trunk/main/svx/source/sdr/contact/objectcontactofpageview.cxx

Modified: 
openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx?rev=1479578&r1=1479577&r2=1479578&view=diff
==============================================================================
--- 
openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
 (original)
+++ 
openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
 Mon May  6 14:13:44 2013
@@ -1342,7 +1342,10 @@ namespace drawinglayer
                                }
                                case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D :
                                {
-                    // direct draw of transformed BitmapEx primitive; use 
default processing
+                    // direct draw of transformed BitmapEx primitive; use 
default processing, but without
+                    // former testing if graphic content is inside discrete 
local viewport; this is not
+                    // setup for metafile targets (metafile renderer tries to 
render in logic coordinates,
+                    // the mapping is kept to the OutputDevice for better 
Metafile recording)
                                        RenderBitmapPrimitive2D(static_cast< 
const primitive2d::BitmapPrimitive2D& >(rCandidate));
                                        break;
                                }

Modified: 
openoffice/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx?rev=1479578&r1=1479577&r2=1479578&view=diff
==============================================================================
--- 
openoffice/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
(original)
+++ 
openoffice/trunk/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
Mon May  6 14:13:44 2013
@@ -182,7 +182,26 @@ namespace drawinglayer
                                }
                                case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D :
                                {
-                                       // direct draw of transformed BitmapEx 
primitive
+                    // direct draw of transformed BitmapEx primitive
+                    const primitive2d::BitmapPrimitive2D& rBitmapCandidate = 
static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate);
+
+                    // check if graphic content is inside discrete local 
ViewPort
+                    const basegfx::B2DRange& 
rDiscreteViewPort(getViewInformation2D().getDiscreteViewport());
+                    const basegfx::B2DHomMatrix 
aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform());
+
+                    if(!rDiscreteViewPort.isEmpty())
+                    {
+                        basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
+
+                        aUnitRange.transform(aLocalTransform);
+
+                        if(!aUnitRange.overlaps(rDiscreteViewPort))
+                        {
+                            // content is outside discrete local ViewPort
+                            break;
+                        }
+                    }
+
                                        RenderBitmapPrimitive2D(static_cast< 
const primitive2d::BitmapPrimitive2D& >(rCandidate));
                                        break;
                                }

Modified: 
openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx?rev=1479578&r1=1479577&r2=1479578&view=diff
==============================================================================
--- openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx 
(original)
+++ openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx 
Mon May  6 14:13:44 2013
@@ -387,24 +387,8 @@ namespace drawinglayer
                // direct draw of transformed BitmapEx primitive
                void VclProcessor2D::RenderBitmapPrimitive2D(const 
primitive2d::BitmapPrimitive2D& rBitmapCandidate)
                {
-            // check local ViewPort
-            const basegfx::B2DRange& 
rDiscreteViewPort(getViewInformation2D().getDiscreteViewport());
-            const basegfx::B2DHomMatrix 
aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform());
-
-            if(!rDiscreteViewPort.isEmpty())
-            {
-                // check if we are visible
-                basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
-
-                aUnitRange.transform(aLocalTransform);
-
-                if(!aUnitRange.overlaps(rDiscreteViewPort))
-                {
-                    return;
-                }
-            }
-
             BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx());
+            const basegfx::B2DHomMatrix 
aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform());
 
                        if(maBColorModifierStack.count())
                        {

Modified: 
openoffice/trunk/main/svx/source/sdr/contact/objectcontactofpageview.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sdr/contact/objectcontactofpageview.cxx?rev=1479578&r1=1479577&r2=1479578&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sdr/contact/objectcontactofpageview.cxx 
(original)
+++ openoffice/trunk/main/svx/source/sdr/contact/objectcontactofpageview.cxx 
Mon May  6 14:13:44 2013
@@ -178,7 +178,6 @@ namespace sdr
                        const double 
fCurrentTime(getPrimitiveAnimator().GetTime());
                        OutputDevice& rTargetOutDev = 
GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
             basegfx::B2DRange aViewRange;
-            basegfx::B2DHomMatrix aViewTransformation;
 
                        // create ViewRange
             if(isOutputToRecordingMetaFile())
@@ -228,16 +227,12 @@ namespace sdr
 
                                // transform to world coordinates
                 
aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
-
-                // for metafile, leave ViewTransformation empty, but for pixel 
renderer
-                // get it from OutputDevice
-                aViewTransformation = rTargetOutDev.GetViewTransformation();
                        }
 
                        // update local ViewInformation2D
                        const drawinglayer::geometry::ViewInformation2D 
aNewViewInformation2D(
                                basegfx::B2DHomMatrix(), 
-                               aViewTransformation, 
+                               rTargetOutDev.GetViewTransformation(), 
                                aViewRange, 
                                GetXDrawPageForSdrPage(GetSdrPage()),
                                fCurrentTime, 


Reply via email to