2006-09-17 02:17:37 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* $RCSfile: cairo_cairo.cxx,v $
|
2008-06-24 09:18:21 +00:00
|
|
|
* $Revision: 1.9 $
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
2008-04-11 07:49:15 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2006-09-17 02:17:37 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_canvas.hxx"
|
2008-04-02 08:40:35 +00:00
|
|
|
|
2006-02-28 09:32:45 +00:00
|
|
|
#include "cairo_cairo.hxx"
|
|
|
|
|
2008-06-24 09:18:21 +00:00
|
|
|
#ifdef WNT
|
|
|
|
# include <tools/prewin.h>
|
|
|
|
# include <windows.h>
|
|
|
|
# include <tools/postwin.h>
|
|
|
|
#endif
|
2006-02-28 09:32:45 +00:00
|
|
|
|
2008-06-24 09:18:21 +00:00
|
|
|
#include <vcl/sysdata.hxx>
|
|
|
|
#include <vcl/syschild.hxx>
|
2006-03-22 09:58:48 +00:00
|
|
|
|
2008-06-24 09:18:21 +00:00
|
|
|
namespace cairo
|
|
|
|
{
|
|
|
|
/****************************************************************************************
|
|
|
|
* Platform independent part of surface backends for OpenOffice.org Cairo Canvas *
|
|
|
|
* For the rest of the functions (and the platform-specific derived *
|
|
|
|
* Surface classes), see platform specific cairo_<platform>_cairo.cxx *
|
|
|
|
****************************************************************************************/
|
2007-07-17 13:19:36 +00:00
|
|
|
|
2008-06-24 09:18:21 +00:00
|
|
|
const SystemEnvData* GetSysData(const Window *pOutputWindow)
|
2006-03-22 09:58:48 +00:00
|
|
|
{
|
2008-06-24 09:18:21 +00:00
|
|
|
const SystemEnvData* pSysData = NULL;
|
|
|
|
// check whether we're a SysChild: have to fetch system data
|
|
|
|
// directly from SystemChildWindow, because the GetSystemData
|
|
|
|
// method is unfortunately not virtual
|
|
|
|
const SystemChildWindow* pSysChild = dynamic_cast< const SystemChildWindow* >( pOutputWindow );
|
|
|
|
if( pSysChild )
|
|
|
|
pSysData = pSysChild->GetSystemData();
|
|
|
|
else
|
|
|
|
pSysData = pOutputWindow->GetSystemData();
|
|
|
|
return pSysData;
|
2006-03-22 09:58:48 +00:00
|
|
|
}
|
2008-06-24 09:18:21 +00:00
|
|
|
}
|