You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/01/20 16:18:31 UTC

svn commit: r1233948 - /incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx

Author: alg
Date: Fri Jan 20 15:18:31 2012
New Revision: 1233948

URL: http://svn.apache.org/viewvc?rev=1233948&view=rev
Log:
svg: uses current system Dpi for Svg replacement image creation

Modified:
    incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx

Modified: incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx?rev=1233948&r1=1233947&r2=1233948&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx Fri Jan 20 15:18:31 2012
@@ -30,6 +30,8 @@
 #include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
 #include <vcl/canvastools.hxx>
 #include <comphelper/seqstream.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -62,13 +64,16 @@ void SvgData::ensureReplacement()
                 aRealRect.Y1 = rRange.getMinY();
                 aRealRect.X2 = rRange.getMaxX();
                 aRealRect.Y2 = rRange.getMaxY();
-                
+
+                // get system DPI
+                const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MAP_INCH));
+
                 const uno::Reference< rendering::XBitmap > xBitmap(
                     xPrimitive2DRenderer->rasterize( 
                         maSequence,
                         aViewParameters, 
-                        72, 
-                        72, 
+                        aDPI.getWidth(), 
+                        aDPI.getHeight(), 
                         aRealRect, 
                         500000));