summaryrefslogtreecommitdiff
path: root/canvas/source/vcl/textlayout.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-24 10:05:59 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-24 10:05:59 +0000
commit0d4e840976a18003a7dfe59e51d7011a8465c430 (patch)
tree1b72cd14e53d164abc2bda5fbc9b10670345c1f1 /canvas/source/vcl/textlayout.cxx
parentf6e6e4572f9aeb65bb2769a1e1b2dd138c92e5e9 (diff)
INTEGRATION: CWS canvas05 (1.8.68); FILE MERGED
2008/04/21 07:28:56 thb 1.8.68.3: RESYNC: (1.8-1.9); FILE MERGED 2007/12/20 22:19:00 thb 1.8.68.2: #i81092# #i78888# #i78925# #i79258# #i79437# #i84784# Large canvas rework, completing various areas such as color spaces, bitmap data access, true sprite and non-sprite implementations, and upstreaming the canvas parts of rodos emf+ rendering 2007/10/01 13:02:04 thb 1.8.68.1: #i78888# #i78925# #i79258# #i79437# Merge from CWS picom
Diffstat (limited to 'canvas/source/vcl/textlayout.cxx')
-rw-r--r--canvas/source/vcl/textlayout.cxx31
1 files changed, 18 insertions, 13 deletions
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 99d302bdd8b2..f9fa6f6dc4d2 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textlayout.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
@@ -32,6 +32,7 @@
#include "precompiled_canvas.hxx"
#include <canvas/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
#include <com/sun/star/rendering/TextDirection.hpp>
@@ -84,16 +85,18 @@ namespace vclcanvas
}
}
- TextLayout::TextLayout( const rendering::StringContext& aText,
- sal_Int8 nDirection,
- sal_Int64 nRandomSeed,
- const CanvasFont::Reference& rFont,
- const DeviceRef& rRefDevice ) :
+ TextLayout::TextLayout( const rendering::StringContext& aText,
+ sal_Int8 nDirection,
+ sal_Int64 nRandomSeed,
+ const CanvasFont::Reference& rFont,
+ const uno::Reference<rendering::XGraphicDevice>& xDevice,
+ const OutDevProviderSharedPtr& rOutDev ) :
TextLayout_Base( m_aMutex ),
maText( aText ),
maLogicalAdvancements(),
mpFont( rFont ),
- mpRefDevice( rRefDevice ),
+ mxDevice( xDevice ),
+ mpOutDevProvider( rOutDev ),
mnTextDirection( nDirection )
{
(void)nRandomSeed;
@@ -103,8 +106,9 @@ namespace vclcanvas
{
tools::LocalGuard aGuard;
+ mpOutDevProvider.reset();
+ mxDevice.clear();
mpFont.reset();
- mpRefDevice.clear();
}
// XTextLayout
@@ -143,7 +147,7 @@ namespace vclcanvas
{
tools::LocalGuard aGuard;
- CHECK_AND_THROW( aAdvancements.getLength() == maText.Length,
+ ENSURE_ARG_OR_THROW( aAdvancements.getLength() == maText.Length,
"TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
maLogicalAdvancements = aAdvancements;
@@ -153,11 +157,12 @@ namespace vclcanvas
{
tools::LocalGuard aGuard;
- OutputDevice* pOutDev = mpRefDevice->getOutDev();
- if( !pOutDev )
+ if( !mpOutDevProvider )
return geometry::RealRectangle2D();
- VirtualDevice aVDev( *pOutDev );
+ OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
+
+ VirtualDevice aVDev( rOutDev );
aVDev.SetFont( mpFont->getVCLFont() );
// need metrics for Y offset, the XCanvas always renders
@@ -364,7 +369,7 @@ namespace vclcanvas
const rendering::ViewState& viewState,
const rendering::RenderState& renderState ) const
{
- ENSURE_AND_THROW( outputOffsets!=NULL,
+ ENSURE_OR_THROW( outputOffsets!=NULL,
"TextLayout::setupTextOffsets offsets NULL" );
::basegfx::B2DHomMatrix aMatrix;