[Libreoffice-commits] core.git: vcl/headless

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Apr 13 12:31:08 UTC 2017


 vcl/headless/svpframe.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 4e74f1d5ae6da4f4d24ab96bca022cefec410db4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 11 02:10:22 2017 +0200

    fix issue related to using namespace with pch
    
    Just don't use using namespace at all. It is just causing in issues.
    
    In this case the using namespace basegfx; makes references to
    tools::Rectangle ambiguous with references to ::tools and
    ::basegfx::tools as options.
    
    Found by RandomConfig tb run #377.
    
    Change-Id: I0c2bacee0da44532045c13004d22477681f4ff25
    Reviewed-on: https://gerrit.libreoffice.org/36498
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index ef32f7dbae77..00f92f896d15 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -30,8 +30,6 @@
 #include <cairo.h>
 #endif
 
-using namespace basegfx;
-
 SvpSalFrame* SvpSalFrame::s_pFocusFrame = nullptr;
 
 #ifdef IOS
@@ -150,7 +148,7 @@ SalGraphics* SvpSalFrame::AcquireGraphics()
 {
     SvpSalGraphics* pGraphics = new SvpSalGraphics();
 #ifndef IOS
-    pGraphics->setSurface(m_pSurface, B2IVector(maGeometry.nWidth, maGeometry.nHeight));
+    pGraphics->setSurface(m_pSurface, basegfx::B2IVector(maGeometry.nWidth, maGeometry.nHeight));
 #endif
     m_aGraphics.push_back( pGraphics );
     return pGraphics;
@@ -257,7 +255,7 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
             maGeometry.nHeight = m_nMinHeight;
     }
 #ifndef IOS
-    B2IVector aFrameSize( maGeometry.nWidth, maGeometry.nHeight );
+    basegfx::B2IVector aFrameSize( maGeometry.nWidth, maGeometry.nHeight );
     if (!m_pSurface || cairo_image_surface_get_width(m_pSurface) != aFrameSize.getX() ||
                        cairo_image_surface_get_height(m_pSurface) != aFrameSize.getY() )
     {
@@ -271,7 +269,7 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
 
         // Creating backing surfaces for invisible windows costs a big chunk of RAM.
         if (Application::IsHeadlessModeEnabled())
-             aFrameSize = B2IVector( 1, 1 );
+             aFrameSize = basegfx::B2IVector( 1, 1 );
 
         m_pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
                                                 aFrameSize.getX(),


More information about the Libreoffice-commits mailing list