[Libreoffice-commits] core.git: Branch 'feature/xtiledrenderable' - include/vcl sw/source vcl/source
László Németh
laszlo.nemeth at collabora.com
Thu Apr 30 02:22:43 PDT 2015
include/vcl/virdev.hxx | 3 +++
sw/source/uibase/uno/unotxdoc.cxx | 12 +-----------
vcl/source/gdi/virdev.cxx | 21 +++++++++++++++++++++
3 files changed, 25 insertions(+), 11 deletions(-)
New commits:
commit 7abc8b800a3bfea57866bdcd719e1ccde17aca3a
Author: László Németh <laszlo.nemeth at collabora.com>
Date: Thu Apr 30 11:21:17 2015 +0200
cleanup
Change-Id: I52e6c2bf0621b3d95e5a943bbebd8426e25e6d52
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 06dbae6..4dbfda7 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -117,6 +117,9 @@ public:
explicit VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
sal_uInt16 nBitCount);
+ explicit VirtualDevice(const ::css::uno::Any& Parent, const Size &rSize,
+ sal_uInt16 nBitCount);
+
virtual ~VirtualDevice();
virtual void EnableRTL( bool bEnable = true ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 23635e3..faa1b09 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -20,7 +20,6 @@
#include <osl/mutex.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/sysdata.hxx>
#include <vcl/svapp.hxx>
#include <vcl/print.hxx>
#include <sfx2/viewfrm.hxx>
@@ -3284,17 +3283,8 @@ void SwXTextDocument::resetSelection()
void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) throw (::css::uno::RuntimeException, ::std::exception)
{
- SystemGraphicsData aData;
- aData.nSize = sizeof(SystemGraphicsData);
- #if defined WNT
- sal_Int64 nWindowHandle;
- Parent >>= nWindowHandle;
- aData.hWnd = (HWND) nWindowHandle;
- VirtualDevice aDevice(&aData, Size(1, 1), (sal_uInt16)32);
+ VirtualDevice aDevice(Parent, Size(1, 1), (sal_uInt16)32);
paintTile( aDevice, nOutputWidth, nOutputHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight );
- #else
- // TODO: support other platforms
- #endif
}
void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index eec2fa9..3505a62 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -21,6 +21,7 @@
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/sysdata.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/virdev.hxx>
@@ -252,6 +253,26 @@ VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
nBitCount, pData);
}
+VirtualDevice::VirtualDevice(const ::css::uno::Any& Parent,
+ const Size &rSize, sal_uInt16 nBitCount)
+ : mpVirDev( NULL ),
+ meRefDevMode( REFDEV_NONE )
+{
+ SystemGraphicsData aData;
+ SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" );
+ aData.nSize = sizeof(SystemGraphicsData);
+ #if defined WNT
+ sal_Int64 nWindowHandle;
+ Parent >>= nWindowHandle;
+ aData.hWnd = (HWND) nWindowHandle;
+ #else
+ // TODO: support other platforms
+ #endif
+ ImplInitVirDev(Application::GetDefaultDevice(), rSize.Width(), rSize.Height(),
+ nBitCount, &aData);
+}
+
+
VirtualDevice::~VirtualDevice()
{
SAL_INFO( "vcl.gdi", "VirtualDevice::~VirtualDevice()" );
More information about the Libreoffice-commits
mailing list