summaryrefslogtreecommitdiff
path: root/canvas/source
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source')
-rw-r--r--canvas/source/cairo/cairo_cachedbitmap.cxx3
-rw-r--r--canvas/source/cairo/cairo_cachedbitmap.hxx3
-rw-r--r--canvas/source/cairo/cairo_cairo.cxx9
-rw-r--r--canvas/source/cairo/cairo_cairo.hxx3
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx13
-rw-r--r--canvas/source/cairo/cairo_canvas.hxx13
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.cxx7
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.hxx7
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.cxx7
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.hxx9
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx36
-rw-r--r--canvas/source/cairo/cairo_canvasfont.hxx3
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx14
-rw-r--r--canvas/source/cairo/cairo_canvashelper.hxx3
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx3
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx3
-rw-r--r--canvas/source/cairo/cairo_devicehelper.hxx3
-rw-r--r--canvas/source/cairo/cairo_quartz_cairo.cxx5
-rw-r--r--canvas/source/cairo/cairo_quartz_cairo.hxx3
-rw-r--r--canvas/source/cairo/cairo_repainttarget.hxx5
-rw-r--r--canvas/source/cairo/cairo_services.cxx3
-rw-r--r--canvas/source/cairo/cairo_sprite.hxx3
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.cxx7
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.hxx13
-rw-r--r--canvas/source/cairo/cairo_spritecanvashelper.cxx3
-rw-r--r--canvas/source/cairo/cairo_spritecanvashelper.hxx2
-rw-r--r--canvas/source/cairo/cairo_spritedevicehelper.cxx7
-rw-r--r--canvas/source/cairo/cairo_spritedevicehelper.hxx3
-rw-r--r--canvas/source/cairo/cairo_spritehelper.cxx3
-rw-r--r--canvas/source/cairo/cairo_spritehelper.hxx3
-rw-r--r--canvas/source/cairo/cairo_spritesurface.hxx3
-rw-r--r--canvas/source/cairo/cairo_surfaceprovider.hxx3
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx25
-rw-r--r--canvas/source/cairo/cairo_textlayout.hxx3
-rw-r--r--canvas/source/cairo/cairo_win32_cairo.cxx11
-rw-r--r--canvas/source/cairo/cairo_win32_cairo.hxx11
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.cxx7
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_5rm.cxx6
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_9rm.cxx6
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_bitmap.cxx2
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_bitmap.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_bitmapcanvashelper.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_bitmapcanvashelper.hxx3
-rw-r--r--canvas/source/directx/dx_bitmapprovider.hxx3
-rw-r--r--canvas/source/directx/dx_canvas.cxx11
-rw-r--r--canvas/source/directx/dx_canvas.hxx13
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvasbitmap.cxx7
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvasbitmap.hxx9
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvascustomsprite.cxx7
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvascustomsprite.hxx9
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvasfont.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvasfont.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvashelper.cxx6
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvashelper.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_canvashelper_texturefill.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_config.cxx9
-rw-r--r--canvas/source/directx/dx_config.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_devicehelper.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_devicehelper.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_gdiplususer.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_gdiplususer.hxx3
-rw-r--r--canvas/source/directx/dx_graphicsprovider.hxx3
-rw-r--r--canvas/source/directx/dx_ibitmap.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_impltools.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_impltools.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_linepolypolygon.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_linepolypolygon.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_rendermodule.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_sprite.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritecanvas.cxx7
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritecanvas.hxx9
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritecanvashelper.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritecanvashelper.hxx3
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.cxx7
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritehelper.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_spritehelper.hxx3
-rw-r--r--canvas/source/directx/dx_surfacebitmap.cxx2
-rw-r--r--canvas/source/directx/dx_surfacebitmap.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_surfacegraphics.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_surfacegraphics.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_textlayout.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_textlayout.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_textlayout_drawhelper.cxx4
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_textlayout_drawhelper.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_vcltools.cxx12
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_vcltools.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/directx/dx_winstuff.hxx11
-rw-r--r--canvas/source/factory/cf_service.cxx14
-rw-r--r--canvas/source/null/null_canvasbitmap.cxx7
-rw-r--r--canvas/source/null/null_canvasbitmap.hxx8
-rw-r--r--canvas/source/null/null_canvascustomsprite.cxx7
-rw-r--r--canvas/source/null/null_canvascustomsprite.hxx11
-rw-r--r--canvas/source/null/null_canvasfont.cxx3
-rw-r--r--canvas/source/null/null_canvasfont.hxx3
-rw-r--r--canvas/source/null/null_canvashelper.cxx3
-rw-r--r--canvas/source/null/null_canvashelper.hxx3
-rw-r--r--canvas/source/null/null_devicehelper.cxx3
-rw-r--r--canvas/source/null/null_devicehelper.hxx3
-rw-r--r--canvas/source/null/null_spritecanvas.cxx7
-rw-r--r--canvas/source/null/null_spritecanvas.hxx13
-rw-r--r--canvas/source/null/null_spritecanvashelper.cxx3
-rw-r--r--canvas/source/null/null_spritecanvashelper.hxx2
-rw-r--r--canvas/source/null/null_spritehelper.cxx3
-rw-r--r--canvas/source/null/null_spritehelper.hxx3
-rw-r--r--canvas/source/null/null_textlayout.cxx3
-rw-r--r--canvas/source/null/null_textlayout.hxx3
-rw-r--r--canvas/source/null/null_usagecounter.hxx3
-rw-r--r--canvas/source/null/sprite.hxx3
-rw-r--r--canvas/source/simplecanvas/simplecanvasimpl.cxx3
-rw-r--r--canvas/source/tools/bitmap.cxx838
-rw-r--r--canvas/source/tools/cachedprimitivebase.cxx3
-rw-r--r--canvas/source/tools/canvascustomspritehelper.cxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/tools/canvastools.cxx3
-rw-r--r--canvas/source/tools/canvastools.flt1
-rw-r--r--canvas/source/tools/elapsedtime.cxx3
-rw-r--r--canvas/source/tools/image.cxx2394
-rw-r--r--canvas/source/tools/image.hxx298
-rw-r--r--canvas/source/tools/image_sysprereq.h102
-rw-r--r--canvas/source/tools/imagecachedprimitive.hxx3
-rw-r--r--canvas/source/tools/page.cxx3
-rw-r--r--canvas/source/tools/page.hxx3
-rw-r--r--canvas/source/tools/pagemanager.cxx3
-rw-r--r--canvas/source/tools/pagemanager.hxx3
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx29
-rw-r--r--canvas/source/tools/prioritybooster.cxx8
-rw-r--r--canvas/source/tools/propertysethelper.cxx11
-rw-r--r--canvas/source/tools/spriteredrawmanager.cxx9
-rw-r--r--canvas/source/tools/surface.cxx2
-rw-r--r--canvas/source/tools/surface.hxx3
-rw-r--r--canvas/source/tools/surfaceproxy.cxx3
-rw-r--r--canvas/source/tools/surfaceproxy.hxx3
-rw-r--r--canvas/source/tools/surfaceproxymanager.cxx3
-rw-r--r--canvas/source/tools/surfacerect.hxx3
-rw-r--r--canvas/source/tools/verifyinput.cxx133
-rw-r--r--canvas/source/vcl/backbuffer.cxx3
-rw-r--r--canvas/source/vcl/backbuffer.hxx3
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx6
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.hxx2
-rw-r--r--canvas/source/vcl/cachedbitmap.cxx3
-rw-r--r--canvas/source/vcl/cachedbitmap.hxx3
-rw-r--r--canvas/source/vcl/canvas.cxx13
-rw-r--r--canvas/source/vcl/canvas.hxx13
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx13
-rw-r--r--canvas/source/vcl/canvasbitmap.hxx8
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx23
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.hxx3
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx17
-rw-r--r--canvas/source/vcl/canvascustomsprite.hxx9
-rw-r--r--canvas/source/vcl/canvasfont.cxx15
-rw-r--r--canvas/source/vcl/canvasfont.hxx3
-rw-r--r--canvas/source/vcl/canvashelper.cxx20
-rw-r--r--canvas/source/vcl/canvashelper.hxx3
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx3
-rw-r--r--canvas/source/vcl/devicehelper.cxx3
-rw-r--r--canvas/source/vcl/devicehelper.hxx3
-rw-r--r--canvas/source/vcl/impltools.cxx17
-rw-r--r--canvas/source/vcl/impltools.hxx12
-rw-r--r--canvas/source/vcl/outdevprovider.hxx3
-rw-r--r--canvas/source/vcl/repainttarget.hxx3
-rw-r--r--canvas/source/vcl/services.cxx3
-rw-r--r--canvas/source/vcl/sprite.hxx3
-rw-r--r--canvas/source/vcl/spritecanvas.cxx15
-rw-r--r--canvas/source/vcl/spritecanvas.hxx13
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx3
-rw-r--r--canvas/source/vcl/spritecanvashelper.hxx2
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx7
-rw-r--r--canvas/source/vcl/spritedevicehelper.hxx3
-rw-r--r--[-rwxr-xr-x]canvas/source/vcl/spritehelper.cxx6
-rw-r--r--canvas/source/vcl/spritehelper.hxx3
-rw-r--r--canvas/source/vcl/textlayout.cxx41
-rw-r--r--canvas/source/vcl/textlayout.hxx3
-rw-r--r--canvas/source/vcl/windowoutdevholder.cxx3
-rw-r--r--canvas/source/vcl/windowoutdevholder.hxx3
175 files changed, 786 insertions, 4005 deletions
diff --git a/canvas/source/cairo/cairo_cachedbitmap.cxx b/canvas/source/cairo/cairo_cachedbitmap.cxx
index 53b0bb02d76d..3ad8ec111ef3 100644
--- a/canvas/source/cairo/cairo_cachedbitmap.cxx
+++ b/canvas/source/cairo/cairo_cachedbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ namespace cairocanvas
return rendering::RepaintResult::REDRAWN;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_cachedbitmap.hxx b/canvas/source/cairo/cairo_cachedbitmap.hxx
index a704a0d6c20f..cf33a3c22889 100644
--- a/canvas/source/cairo/cairo_cachedbitmap.hxx
+++ b/canvas/source/cairo/cairo_cachedbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_CACHEDBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_cairo.cxx b/canvas/source/cairo/cairo_cairo.cxx
index f855a4f1700c..19a1cad75aa5 100644
--- a/canvas/source/cairo/cairo_cairo.cxx
+++ b/canvas/source/cairo/cairo_cairo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,12 +32,6 @@
#include "cairo_cairo.hxx"
-#ifdef WNT
-# include <tools/prewin.h>
-# include <windows.h>
-# include <tools/postwin.h>
-#endif
-
#include <vcl/sysdata.hxx>
#include <vcl/syschild.hxx>
@@ -62,3 +57,5 @@ namespace cairo
return pSysData;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_cairo.hxx b/canvas/source/cairo/cairo_cairo.hxx
index 10832ac27be6..a14d107fcc3f 100644
--- a/canvas/source/cairo/cairo_cairo.hxx
+++ b/canvas/source/cairo/cairo_cairo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ namespace cairo {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 54d04158c993..802006d59110 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,12 +48,6 @@
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/numeric/ftools.hxx>
-#ifdef WNT
-# include <tools/prewin.h>
-# include <windows.h>
-# include <tools/postwin.h>
-#endif
-
#include <vcl/sysdata.hxx>
#include "cairo_canvas.hxx"
@@ -136,14 +131,14 @@ namespace cairocanvas
OSL_TRACE( "CairoCanvas destroyed" );
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
@@ -193,3 +188,5 @@ namespace cairocanvas
return maDeviceHelper.getOutputDevice();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index bbcb89c54c7d..aec8713f8fe9 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include <basegfx/vector/b2isize.hxx>
@@ -68,7 +69,7 @@ namespace cairocanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase_Base;
@@ -121,12 +122,8 @@ namespace cairocanvas
/// For resource tracking
~Canvas();
-#if defined __SUNPRO_CC
- using CanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -159,3 +156,5 @@ namespace cairocanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 445839ca0127..63761b848af8 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,7 +102,7 @@ namespace cairocanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpSurfaceProvider.clear();
@@ -109,7 +110,7 @@ namespace cairocanvas
mpBufferSurface.reset();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
SurfaceSharedPtr CanvasBitmap::getSurface()
@@ -284,3 +285,5 @@ namespace cairocanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index 5597a5ade004..1626c9240ff6 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,7 @@ namespace cairocanvas
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
class CanvasBitmapSpriteSurface_Base :
- public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
+ public ::canvas::DisambiguationHelper<CanvasBitmapBase_Base>,
public SurfaceProvider
{
};
@@ -86,7 +87,7 @@ namespace cairocanvas
bool bHasAlpha );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -136,3 +137,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_CANVASBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index ad9a743da885..5c7852c41dec 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,7 +78,7 @@ namespace cairocanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -85,7 +86,7 @@ namespace cairocanvas
mpBufferSurface.reset();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
void CanvasCustomSprite::redraw( const CairoSharedPtr& pCairo,
@@ -173,3 +174,5 @@ namespace cairocanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx
index abebdc85d917..52dac5233138 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.hxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "cairo_sprite.hxx"
@@ -75,7 +76,7 @@ namespace cairocanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite,
public SurfaceProvider
{
@@ -110,7 +111,7 @@ namespace cairocanvas
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -154,3 +155,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_CANVASCUSTOMSPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 5da2e10e7969..8f4f992aa808 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,27 +46,6 @@ using namespace ::com::sun::star;
namespace cairocanvas
{
- namespace
- {
- // Little helper to encapsulate locking into policy class
- class LocalGuard
- {
- public:
- LocalGuard() :
- aGuard( Application::GetSolarMutex() )
- {
- }
-
- /// To be compatible with CanvasBase mutex concept
- LocalGuard( const ::osl::Mutex& ) :
- aGuard( Application::GetSolarMutex() )
- {
- }
-
- private:
- ::vos::OGuard aGuard;
- };
- }
CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest,
const uno::Sequence< beans::PropertyValue >& /*rExtraFontProperties*/,
@@ -120,14 +100,14 @@ namespace cairocanvas
void SAL_CALL CanvasFont::disposing()
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mpRefDevice.clear();
}
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (uno::RuntimeException)
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
if( !mpRefDevice.is() )
return uno::Reference< rendering::XTextLayout >(); // we're disposed
@@ -141,14 +121,14 @@ namespace cairocanvas
rendering::FontRequest SAL_CALL CanvasFont::getFontRequest( ) throw (uno::RuntimeException)
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maFontRequest;
}
rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( ) throw (uno::RuntimeException)
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return rendering::FontMetrics();
@@ -156,7 +136,7 @@ namespace cairocanvas
uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException)
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return uno::Sequence< double >();
@@ -164,7 +144,7 @@ namespace cairocanvas
uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException)
{
- LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return uno::Sequence< beans::PropertyValue >();
@@ -196,3 +176,5 @@ namespace cairocanvas
return *maFont;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx
index 9b59ca57fa52..d471082c70ff 100644
--- a/canvas/source/cairo/cairo_canvasfont.hxx
+++ b/canvas/source/cairo/cairo_canvasfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_CANVASFONT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 60647d4f8224..2f1e39b8a19e 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -787,7 +788,12 @@ namespace cairocanvas
else if ( aTexture.RepeatModeX == rendering::TexturingMode::CLAMP &&
aTexture.RepeatModeY == rendering::TexturingMode::CLAMP )
{
+#if CAIRO_VERSION >= 10200
cairo_pattern_set_extend( pPattern, CAIRO_EXTEND_PAD );
+#else
+#warning "fallback for cairo before version 1.2"
+ cairo_pattern_set_extend( pPattern, CAIRO_EXTEND_NONE );
+#endif
}
aScaledTextureMatrix.x0 = basegfx::fround( aScaledTextureMatrix.x0 );
@@ -1064,7 +1070,7 @@ namespace cairocanvas
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount + 1: nPointCount);
+ const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount: nPointCount - 1);
basegfx::B2DPolygon aEdge;
aEdge.append(aCandidate.getB2DPoint(0));
aEdge.append(basegfx::B2DPoint(0.0, 0.0));
@@ -1073,7 +1079,7 @@ namespace cairocanvas
{
const sal_uInt32 nNextIndex((b + 1) % nPointCount);
aEdge.setB2DPoint(1, aCandidate.getB2DPoint(nNextIndex));
- aEdge.setNextControlPoint(0, aCandidate.getNextControlPoint(b));
+ aEdge.setNextControlPoint(0, aCandidate.getNextControlPoint(b % nPointCount));
aEdge.setPrevControlPoint(1, aCandidate.getPrevControlPoint(nNextIndex));
doPolyPolygonImplementation( basegfx::B2DPolyPolygon(aEdge),
@@ -1395,7 +1401,9 @@ namespace cairocanvas
::rtl::math::approxEqual( aMatrix.x0, 0 ) &&
::rtl::math::approxEqual( aMatrix.y0, 0 ) )
cairo_set_operator( mpCairo.get(), CAIRO_OPERATOR_SOURCE );
+#if CAIRO_VERSION >= 10200
cairo_pattern_set_extend( cairo_get_source(mpCairo.get()), CAIRO_EXTEND_PAD );
+#endif
cairo_rectangle( mpCairo.get(), 0, 0, aBitmapSize.Width, aBitmapSize.Height );
cairo_clip( mpCairo.get() );
@@ -1994,3 +2002,5 @@ namespace cairocanvas
return true;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvashelper.hxx b/canvas/source/cairo/cairo_canvashelper.hxx
index d89429b77a25..89d26a941dec 100644
--- a/canvas/source/cairo/cairo_canvashelper.hxx
+++ b/canvas/source/cairo/cairo_canvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -333,3 +334,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_CANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 7e60d912e1ca..91d98103d041 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -396,3 +397,5 @@ namespace cairocanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 36f7a2452aa5..f6b5e24c5a63 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -300,3 +301,5 @@ namespace cairocanvas
return SurfaceSharedPtr();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_devicehelper.hxx b/canvas/source/cairo/cairo_devicehelper.hxx
index 84c5a84926ca..56c430aca318 100644
--- a/canvas/source/cairo/cairo_devicehelper.hxx
+++ b/canvas/source/cairo/cairo_devicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -141,3 +142,5 @@ namespace cairocanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx
index 52626a0ae849..e24ba9c3ab80 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.cxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -187,7 +188,7 @@ namespace cairo
**/
void QuartzSurface::Resize( int width, int height )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
@@ -345,3 +346,5 @@ namespace cairo
#endif // CAIRO_HAS_QUARTZ_SURFACE
#endif // QUARTZ
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_quartz_cairo.hxx b/canvas/source/cairo/cairo_quartz_cairo.hxx
index 104016751293..0c6a7d56db95 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.hxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ namespace cairo {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_repainttarget.hxx b/canvas/source/cairo/cairo_repainttarget.hxx
index 3e4d40f1efe7..87a663c0dac1 100644
--- a/canvas/source/cairo/cairo_repainttarget.hxx
+++ b/canvas/source/cairo/cairo_repainttarget.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _CAIROCANVAS_REPAINTTARGET_HXX
#define _CAIROCANVAS_REPAINTTARGET_HXX
-#ifndef _RTL_REF_HXX_
#include <rtl/ref.hxx>
-#endif
#include "cairo_cairo.hxx"
@@ -58,3 +57,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_REPAINTTARGET_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_services.cxx b/canvas/source/cairo/cairo_services.cxx
index a43b281c56bf..77f053dcb305 100644
--- a/canvas/source/cairo/cairo_services.cxx
+++ b/canvas/source/cairo/cairo_services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,5 @@ namespace cairocanvas
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS2(cairocanvas::cairoCanvasDecl, cairocanvas::cairoSpriteCanvasDecl)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_sprite.hxx b/canvas/source/cairo/cairo_sprite.hxx
index 8f5a0d2d3ddd..b5ecb85b6b97 100644
--- a/canvas/source/cairo/cairo_sprite.hxx
+++ b/canvas/source/cairo/cairo_sprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_SPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index 43911c1113d6..f55f861d3839 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,14 +125,14 @@ namespace cairocanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
@@ -230,3 +231,5 @@ namespace cairocanvas
return maCanvasHelper.repaint( pSurface, viewState, renderState );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index fcc0ae76839b..b64fd1474c6e 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include <basegfx/vector/b2isize.hxx>
@@ -68,7 +69,7 @@ namespace cairocanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -120,12 +121,8 @@ namespace cairocanvas
void initialize();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -172,3 +169,5 @@ namespace cairocanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx
index bb4b44201043..cdac16cbf8b7 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -542,3 +543,5 @@ namespace cairocanvas
return mpCompositingSurface;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.hxx b/canvas/source/cairo/cairo_spritecanvashelper.hxx
index 2adc245fe4e1..8e3e60901302 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.hxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,4 @@ namespace cairocanvas
#endif /* _CAIROCANVAS_SPRITECANVASHELPER_HXX_ */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx
index ef345cd60eaf..91cceeeea4d3 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.cxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,13 +99,13 @@ namespace cairocanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
@@ -199,3 +200,5 @@ namespace cairocanvas
pWinSurface->flush();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.hxx b/canvas/source/cairo/cairo_spritedevicehelper.hxx
index 3e46014f28b0..e0736379bb2a 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.hxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ namespace cairocanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritehelper.cxx b/canvas/source/cairo/cairo_spritehelper.cxx
index a3ba84648f3b..711cc45c504b 100644
--- a/canvas/source/cairo/cairo_spritehelper.cxx
+++ b/canvas/source/cairo/cairo_spritehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -181,3 +182,5 @@ namespace cairocanvas
return ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPoly);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritehelper.hxx b/canvas/source/cairo/cairo_spritehelper.hxx
index 0d770e25003e..8d31fa61dd31 100644
--- a/canvas/source/cairo/cairo_spritehelper.hxx
+++ b/canvas/source/cairo/cairo_spritehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_SPRITEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_spritesurface.hxx b/canvas/source/cairo/cairo_spritesurface.hxx
index 343d51e5d816..1c84e3842ffd 100644
--- a/canvas/source/cairo/cairo_spritesurface.hxx
+++ b/canvas/source/cairo/cairo_spritesurface.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ namespace cairocanvas
}
#endif /* _VCLCANVAS_SPRITESURFACE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_surfaceprovider.hxx b/canvas/source/cairo/cairo_surfaceprovider.hxx
index a6ec53be333f..923fc8b8c0d2 100644
--- a/canvas/source/cairo/cairo_surfaceprovider.hxx
+++ b/canvas/source/cairo/cairo_surfaceprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ namespace cairocanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 7556e76fba42..9c1501a8245b 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,6 @@
#include <vcl/virdev.hxx>
#ifdef WNT
-#include <tools/prewin.h>
-#include <windows.h>
-#include <tools/postwin.h>
#ifdef max
#undef max
#endif
@@ -416,14 +414,14 @@ namespace cairocanvas
typedef std::pair<SystemFontData,int> FontLevel;
typedef std::vector<FontLevel> FontLevelVector;
FontLevelVector aFontData;
- SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
- const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
- for( ; aIter != aEnd; ++aIter )
+ SystemGlyphDataVector::const_iterator aGlyphIter=aSysLayoutData.rGlyphData.begin();
+ const SystemGlyphDataVector::const_iterator aGlyphEnd=aSysLayoutData.rGlyphData.end();
+ for( ; aGlyphIter != aGlyphEnd; ++aGlyphIter )
{
- if( aFontData.empty() || aIter->fallbacklevel != aFontData.back().second )
+ if( aFontData.empty() || aGlyphIter->fallbacklevel != aFontData.back().second )
{
- aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aIter->fallbacklevel),
- aIter->fallbacklevel));
+ aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aGlyphIter->fallbacklevel),
+ aGlyphIter->fallbacklevel));
if( !isCairoRenderable(aFontData.back().first) )
{
bCairoRenderable = false;
@@ -476,11 +474,10 @@ namespace cairocanvas
std::vector<cairo_glyph_t> cairo_glyphs;
cairo_glyphs.reserve( 256 );
- SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
- const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
- for( ; aIter != aEnd; ++aIter )
+ aGlyphIter=aSysLayoutData.rGlyphData.begin();
+ for( ; aGlyphIter != aGlyphEnd; ++aGlyphIter )
{
- SystemGlyphData systemGlyph = *aIter;
+ SystemGlyphData systemGlyph = *aGlyphIter;
if( systemGlyph.fallbacklevel != aFontDataIter->second )
continue;
@@ -695,3 +692,5 @@ namespace cairocanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx
index 6e14907c01bb..57ee24835f44 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ namespace cairocanvas
}
#endif /* _CAIROCANVAS_TEXTLAYOUT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx
index d0d6558c2fdd..e3826f600228 100644
--- a/canvas/source/cairo/cairo_win32_cairo.cxx
+++ b/canvas/source/cairo/cairo_win32_cairo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,6 +26,8 @@
*
************************************************************************/
+#define _WIN32_WINNT 0x0500
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_canvas.hxx"
@@ -33,10 +36,6 @@
* Win32 surface backend for OpenOffice.org Cairo Canvas *
************************************************************************/
-#include <tools/prewin.h>
-#include <windows.h>
-#include <tools/postwin.h>
-
#include <osl/diagnose.h>
#include <vcl/bitmap.hxx>
#include <vcl/virdev.hxx>
@@ -170,7 +169,7 @@ namespace cairo
**/
void Win32Surface::Resize( int /*width*/, int /*height*/ )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
void Win32Surface::flush() const
@@ -323,3 +322,5 @@ namespace cairo
#endif // CAIRO_HAS_WIN32_SURFACE
#endif // WNT
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_win32_cairo.hxx b/canvas/source/cairo/cairo_win32_cairo.hxx
index 3b083d28e748..337dbc5025de 100644
--- a/canvas/source/cairo/cairo_win32_cairo.hxx
+++ b/canvas/source/cairo/cairo_win32_cairo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,9 @@
#ifndef _CAIROCANVAS_WIN32_CAIRO_HXX
#define _CAIROCANVAS_WIN32_CAIRO_HXX
-#ifdef WNT
-# include <tools/prewin.h>
-# include <windows.h>
-# include <tools/postwin.h>
-#endif
-
#include "cairo_cairo.hxx"
+#include <prewin.h>
+#include <postwin.h>
namespace cairo {
@@ -68,3 +65,5 @@ namespace cairo {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index 823ad05e426f..a0569ab5a442 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,7 +76,7 @@ namespace cairo
nScreen(pSysDat.nScreen),
nDepth(pSysDat.nDepth),
aColormap(pSysDat.aColormap),
- pRenderFormat(pSysDat.pRenderFormat)
+ pRenderFormat(pSysDat.pXRenderFormat)
{}
X11SysData::X11SysData( const SystemEnvData& pSysDat ) :
@@ -262,7 +263,7 @@ namespace cairo
aSystemGraphicsData.nSize = sizeof(SystemGraphicsData);
aSystemGraphicsData.hDrawable = getDrawable();
- aSystemGraphicsData.pRenderFormat = getRenderFormat();
+ aSystemGraphicsData.pXRenderFormat = getRenderFormat();
return boost::shared_ptr<VirtualDevice>(
new VirtualDevice( &aSystemGraphicsData, getDepth() ));
@@ -350,3 +351,5 @@ namespace cairo
return SurfaceSharedPtr();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_xlib_cairo.hxx b/canvas/source/cairo/cairo_xlib_cairo.hxx
index aa5cfa67a2b6..92ca044a72ff 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.hxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ namespace cairo {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index ecc8e6af2a9b..25ac0bd828b9 100755..100644
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2175,8 +2176,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE( false,
- "DXRenderModule::pushVertex(): unexpected primitive types" );
+ OSL_FAIL( "DXRenderModule::pushVertex(): unexpected primitive types" );
break;
}
}
@@ -2281,3 +2281,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 6a2d218e936c..4464d1fb7781 100755..100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1182,8 +1183,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE(false,
- "DXRenderModule::pushVertex(): unexpected primitive type");
+ OSL_FAIL("DXRenderModule::pushVertex(): unexpected primitive type");
break;
}
}
@@ -1361,3 +1361,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_bitmap.cxx b/canvas/source/directx/dx_bitmap.cxx
index d1468105a22b..2c4cfef53eb6 100755..100644
--- a/canvas/source/directx/dx_bitmap.cxx
+++ b/canvas/source/directx/dx_bitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -217,3 +218,4 @@ namespace dxcanvas
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_bitmap.hxx b/canvas/source/directx/dx_bitmap.hxx
index 5e767994e16c..9543a794202b 100755..100644
--- a/canvas/source/directx/dx_bitmap.hxx
+++ b/canvas/source/directx/dx_bitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index 860b56401873..997f2eac24a6 100755..100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -244,3 +245,5 @@ namespace dxcanvas
return mpTarget ? mpTarget->hasAlpha() : false;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.hxx b/canvas/source/directx/dx_bitmapcanvashelper.hxx
index 411d8764dfc7..019bfcb152b5 100755..100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.hxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_BITMAPCANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_bitmapprovider.hxx b/canvas/source/directx/dx_bitmapprovider.hxx
index 3eccf3c4939e..c4e472fc2b70 100644
--- a/canvas/source/directx/dx_bitmapprovider.hxx
+++ b/canvas/source/directx/dx_bitmapprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index f55467c1af50..c29319b3974e 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -123,14 +124,14 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
@@ -200,7 +201,7 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL BitmapCanvas::disposing()
+ void BitmapCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -208,7 +209,7 @@ namespace dxcanvas
mxComponentContext.clear();
// forward to parent
- BitmapCanvasBaseT::disposing();
+ BitmapCanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL BitmapCanvas::getServiceName( ) throw (uno::RuntimeException)
@@ -253,3 +254,5 @@ namespace dxcanvas
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS2(dxcanvas::dxCanvasDecl,
dxcanvas::dxBitmapCanvasDecl);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvas.hxx b/canvas/source/directx/dx_canvas.hxx
index be15b875c4b6..32810ede36e5 100644
--- a/canvas/source/directx/dx_canvas.hxx
+++ b/canvas/source/directx/dx_canvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/integerbitmapbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/graphicdevicebase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -62,7 +63,7 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase1_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase1_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase1_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase1_Base;
@@ -91,7 +92,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -119,7 +120,7 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase2_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase2_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase2_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase2_Base;
@@ -148,7 +149,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -173,3 +174,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index f15af7745422..7ad5b18800de 100755..100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,13 +60,13 @@ namespace dxcanvas
maCanvasHelper.setTarget( mpBitmap );
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpBitmap.reset();
mpDevice.clear();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
struct AlphaDIB
@@ -275,3 +276,5 @@ namespace dxcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvasbitmap.hxx b/canvas/source/directx/dx_canvasbitmap.hxx
index 75800f3c8abd..7a80e2b96796 100755..100644
--- a/canvas/source/directx/dx_canvasbitmap.hxx
+++ b/canvas/source/directx/dx_canvasbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <cppuhelper/compbase3.hxx>
#include <comphelper/uno3.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/integerbitmapbase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -59,7 +60,7 @@ namespace dxcanvas
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
BitmapCanvasHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -79,7 +80,7 @@ namespace dxcanvas
const DeviceRef& rDevice );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
@@ -102,3 +103,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_CANVASBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index 9c8309d5e39f..138b2c36dc3c 100755..100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,7 +83,7 @@ namespace dxcanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -90,7 +91,7 @@ namespace dxcanvas
mpSpriteCanvas.clear();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
#define IMPLEMENTATION_NAME "DXCanvas.CanvasCustomSprite"
@@ -121,3 +122,5 @@ namespace dxcanvas
maSpriteHelper.redraw( mbSurfaceDirty );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvascustomsprite.hxx b/canvas/source/directx/dx_canvascustomsprite.hxx
index be83b26e1b52..8e6c534683ce 100755..100644
--- a/canvas/source/directx/dx_canvascustomsprite.hxx
+++ b/canvas/source/directx/dx_canvascustomsprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "dx_sprite.hxx"
@@ -74,7 +75,7 @@ namespace dxcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite
{
};
@@ -110,7 +111,7 @@ namespace dxcanvas
const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
bool bShowSpriteBounds );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -137,3 +138,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_CANVASCUSTOMSPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvasfont.cxx b/canvas/source/directx/dx_canvasfont.cxx
index d87079b34c0f..e2b69d5bc122 100755..100644
--- a/canvas/source/directx/dx_canvasfont.cxx
+++ b/canvas/source/directx/dx_canvasfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,5 @@ namespace dxcanvas
return maFontMatrix;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvasfont.hxx b/canvas/source/directx/dx_canvasfont.hxx
index 4a6c8b779ad0..488edecb736e 100755..100644
--- a/canvas/source/directx/dx_canvasfont.hxx
+++ b/canvas/source/directx/dx_canvasfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_CANVASFONT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index 866cc0f03ec3..5cb18200991d 100755..100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,8 +91,7 @@ namespace dxcanvas
switch( nJoinType )
{
case rendering::PathJoinType::NONE:
- OSL_ENSURE( false,
- "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
+ OSL_FAIL( "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
// FALLTHROUGH intended
case rendering::PathJoinType::MITER:
return Gdiplus::LineJoinMiter;
@@ -812,3 +812,5 @@ namespace dxcanvas
mpGraphicsProvider->getGraphics()->Flush( Gdiplus::FlushIntentionSync );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvashelper.hxx b/canvas/source/directx/dx_canvashelper.hxx
index 2f175cce88e5..727002a51b99 100755..100644
--- a/canvas/source/directx/dx_canvashelper.hxx
+++ b/canvas/source/directx/dx_canvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,3 +256,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_CANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 17d5a2983f7c..bd269a6aab66 100755..100644
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -623,3 +624,5 @@ namespace dxcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index bfbb46a42d09..13cda074ec1a 100755..100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,8 +93,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -134,8 +134,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -174,3 +173,5 @@ namespace dxcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_config.hxx b/canvas/source/directx/dx_config.hxx
index a1499a64f44f..de29655a4bb9 100644
--- a/canvas/source/directx/dx_config.hxx
+++ b/canvas/source/directx/dx_config.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,5 @@ namespace dxcanvas
}
#endif /* #ifndef _DXCANVAS_DXCONFIG_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_devicehelper.cxx b/canvas/source/directx/dx_devicehelper.cxx
index 731e28e2700f..b5b9fa129615 100755..100644
--- a/canvas/source/directx/dx_devicehelper.cxx
+++ b/canvas/source/directx/dx_devicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -234,3 +235,5 @@ namespace dxcanvas
return DeviceColorSpace::get();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_devicehelper.hxx b/canvas/source/directx/dx_devicehelper.hxx
index 7c85f7a8f8de..0122542230f6 100755..100644
--- a/canvas/source/directx/dx_devicehelper.hxx
+++ b/canvas/source/directx/dx_devicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_DEVICEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_gdiplususer.cxx b/canvas/source/directx/dx_gdiplususer.cxx
index f11965ac6860..cccb93905e42 100755..100644
--- a/canvas/source/directx/dx_gdiplususer.cxx
+++ b/canvas/source/directx/dx_gdiplususer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ namespace dxcanvas
++n_gdiPlusUsageCount;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_gdiplususer.hxx b/canvas/source/directx/dx_gdiplususer.hxx
index 409449aab954..f6871ab6bc42 100755..100644
--- a/canvas/source/directx/dx_gdiplususer.hxx
+++ b/canvas/source/directx/dx_gdiplususer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_GDIPLUSUSER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_graphicsprovider.hxx b/canvas/source/directx/dx_graphicsprovider.hxx
index 74c47e26a99a..e677bd4249d6 100644
--- a/canvas/source/directx/dx_graphicsprovider.hxx
+++ b/canvas/source/directx/dx_graphicsprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_GRAPHICSPROVIDER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_ibitmap.hxx b/canvas/source/directx/dx_ibitmap.hxx
index 6419d5a198fc..83c55bca9e6c 100644
--- a/canvas/source/directx/dx_ibitmap.hxx
+++ b/canvas/source/directx/dx_ibitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx
index c298fb9238f9..3781d2687fde 100755..100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -666,3 +667,5 @@ namespace dxcanvas
} // namespace tools
} // namespace dxcanvas
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_impltools.hxx b/canvas/source/directx/dx_impltools.hxx
index 6eb0bc415ea5..316029ba304d 100755..100644
--- a/canvas/source/directx/dx_impltools.hxx
+++ b/canvas/source/directx/dx_impltools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_IMPLTOOLS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_linepolypolygon.cxx b/canvas/source/directx/dx_linepolypolygon.cxx
index 12bd4e98ae31..6fbf20949783 100755..100644
--- a/canvas/source/directx/dx_linepolypolygon.cxx
+++ b/canvas/source/directx/dx_linepolypolygon.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ namespace dxcanvas
mpPath.reset();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_linepolypolygon.hxx b/canvas/source/directx/dx_linepolypolygon.hxx
index cb2d76587169..7909659ce7fe 100755..100644
--- a/canvas/source/directx/dx_linepolypolygon.hxx
+++ b/canvas/source/directx/dx_linepolypolygon.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_LINEPOLYPOLYGON_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_rendermodule.hxx b/canvas/source/directx/dx_rendermodule.hxx
index e6bd8a7b5701..48a128740321 100755..100644
--- a/canvas/source/directx/dx_rendermodule.hxx
+++ b/canvas/source/directx/dx_rendermodule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_sprite.hxx b/canvas/source/directx/dx_sprite.hxx
index 56c984439f45..5405d587acc7 100755..100644
--- a/canvas/source/directx/dx_sprite.hxx
+++ b/canvas/source/directx/dx_sprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ namespace dxcanvas
}
#endif /* INCLUDED_DXCANVAS_SPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index 43350287d92a..430f4639cb92 100755..100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,14 +126,14 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
@@ -209,3 +210,5 @@ namespace dxcanvas
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS1(dxcanvas::dxSpriteCanvasDecl);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritecanvas.hxx b/canvas/source/directx/dx_spritecanvas.hxx
index b14d79050ccf..3b306f23675b 100755..100644
--- a/canvas/source/directx/dx_spritecanvas.hxx
+++ b/canvas/source/directx/dx_spritecanvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -65,7 +66,7 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -116,7 +117,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -153,3 +154,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx
index 211fd5502919..30bf9040634c 100755..100644
--- a/canvas/source/directx/dx_spritecanvashelper.cxx
+++ b/canvas/source/directx/dx_spritecanvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -380,3 +381,5 @@ namespace dxcanvas
maUpdateRect.expand( aActualArea );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritecanvashelper.hxx b/canvas/source/directx/dx_spritecanvashelper.hxx
index 5015818e0c77..20a6294363a4 100755..100644
--- a/canvas/source/directx/dx_spritecanvashelper.hxx
+++ b/canvas/source/directx/dx_spritecanvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -159,3 +160,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_SPRITECANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index 0437634a8d1e..4680cd3428df 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,13 +205,13 @@ namespace dxcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
@@ -257,3 +258,5 @@ namespace dxcanvas
mpRenderModule->screenShot();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritedevicehelper.hxx b/canvas/source/directx/dx_spritedevicehelper.hxx
index f697b246929e..cf343e3f9306 100644
--- a/canvas/source/directx/dx_spritedevicehelper.hxx
+++ b/canvas/source/directx/dx_spritedevicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_SPRITEDEVICEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx
index d0b0c3e2101e..3c791f4ba1e1 100755..100644
--- a/canvas/source/directx/dx_spritehelper.cxx
+++ b/canvas/source/directx/dx_spritehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -214,3 +215,5 @@ namespace dxcanvas
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritehelper.hxx b/canvas/source/directx/dx_spritehelper.hxx
index b83b8b6a988c..9a8449c99385 100755..100644
--- a/canvas/source/directx/dx_spritehelper.hxx
+++ b/canvas/source/directx/dx_spritehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_SPRITEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx
index 258c10c4dd5c..3841a117affa 100644
--- a/canvas/source/directx/dx_surfacebitmap.cxx
+++ b/canvas/source/directx/dx_surfacebitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -802,3 +803,4 @@ namespace dxcanvas
//////////////////////////////////////////////////////////////////////////////////
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_surfacebitmap.hxx b/canvas/source/directx/dx_surfacebitmap.hxx
index c3f1f9ed9074..3b40c7879862 100644
--- a/canvas/source/directx/dx_surfacebitmap.hxx
+++ b/canvas/source/directx/dx_surfacebitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,5 @@ namespace dxcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_surfacegraphics.cxx b/canvas/source/directx/dx_surfacegraphics.cxx
index 97a89b7e66cf..e8267ef54fe7 100755..100644
--- a/canvas/source/directx/dx_surfacegraphics.cxx
+++ b/canvas/source/directx/dx_surfacegraphics.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,5 @@ namespace dxcanvas
throw uno::RuntimeException();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_surfacegraphics.hxx b/canvas/source/directx/dx_surfacegraphics.hxx
index 29b84ed81670..3f8d6e73e48a 100755..100644
--- a/canvas/source/directx/dx_surfacegraphics.hxx
+++ b/canvas/source/directx/dx_surfacegraphics.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_SURFACEGRAPHICS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 1516b49d1620..ae0f84b4e225 100755..100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -278,3 +279,5 @@ namespace dxcanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_textlayout.hxx b/canvas/source/directx/dx_textlayout.hxx
index ca8c6793fe87..f14d8c6f04df 100755..100644
--- a/canvas/source/directx/dx_textlayout.hxx
+++ b/canvas/source/directx/dx_textlayout.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_TEXTLAYOUT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 7fd29805e2f7..0d2991bcdaff 100755..100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,6 +42,7 @@
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/scopeguard.hxx>
#include <tools/color.hxx>
@@ -317,3 +319,5 @@ namespace dxcanvas
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.hxx b/canvas/source/directx/dx_textlayout_drawhelper.hxx
index c484867055af..49f8f5f8feee 100755..100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.hxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ namespace dxcanvas
#endif /* _TEXTLAYOUT_DRAWHELPER_HXX */
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index c48931b87eae..aec1b4307791 100755..100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -177,8 +178,7 @@ namespace dxcanvas
Bitmap aBitmap( rBmpEx.GetBitmap() );
- ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
- aBitmap );
+ Bitmap::ScopedReadAccess pReadAccess( aBitmap );
const sal_Int32 nWidth( aBmpSize.Width() );
const sal_Int32 nHeight( aBmpSize.Height() );
@@ -191,8 +191,7 @@ namespace dxcanvas
{
Bitmap aAlpha( rBmpEx.GetAlpha().GetBitmap() );
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.AcquireReadAccess(),
- aAlpha );
+ Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha );
// By convention, the access buffer always has
// one of the following formats:
@@ -334,8 +333,7 @@ namespace dxcanvas
{
Bitmap aMask( rBmpEx.GetMask() );
- ScopedBitmapReadAccess pMaskReadAccess( aMask.AcquireReadAccess(),
- aMask );
+ Bitmap::ScopedReadAccess pMaskReadAccess( aMask );
// By convention, the access buffer always has
// one of the following formats:
@@ -521,3 +519,5 @@ namespace dxcanvas
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_vcltools.hxx b/canvas/source/directx/dx_vcltools.hxx
index fab96cb79e5a..96968301fb90 100755..100644
--- a/canvas/source/directx/dx_vcltools.hxx
+++ b/canvas/source/directx/dx_vcltools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ namespace dxcanvas
}
#endif /* _DXCANVAS_VCLTOOLS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index f4dc1fcd0496..595022e10182 100755..100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,6 +56,7 @@
#endif
+#define ULONG win32ULONG
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
#define PolyPolygon win32PolyPolygon
@@ -81,9 +83,14 @@
#else
+ #include <dxsdkver.h>
#include <d3d9.h>
#include <d3dx9.h>
-// #include <dxerr9.h> #i107614# removing include, it has been changed in the latest sdk fron August2009 from dxerr9.h into dxerr.h
+ #if _DXSDK_BUILD_MAJOR < 1734 /* Earlier than the August 2009 DXSDK */
+ #include <dxerr9.h>
+ #else
+ #include <dxerr.h>
+ #endif
typedef IDirect3DSurface9 surface_type;
@@ -211,3 +218,5 @@ namespace dxcanvas
#undef PolyPolygon
#endif /* _DXCANVAS_WINSTUFF_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index b2b72620af00..e96f31f5ba7a 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@
#include <boost/bind.hpp>
#include <vector>
#include <utility>
-#include <functional>
+#include <o3tl/compat_functional.hxx>
#include <algorithm>
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
@@ -269,7 +270,7 @@ Sequence<OUString> CanvasFactory::getAvailableServiceNames()
std::transform(m_aAvailableImplementations.begin(),
m_aAvailableImplementations.end(),
aServiceNames.getArray(),
- std::select1st<AvailPair>());
+ o3tl::select1st<AvailPair>());
return aServiceNames;
}
@@ -354,7 +355,7 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
boost::bind(&OUString::equals,
boost::cref(serviceName),
boost::bind(
- std::select1st<CachePair>(),
+ o3tl::select1st<CachePair>(),
_1)))) != aEnd )
{
Reference<XInterface> xCanvas( use( aMatch->second, args, xContext ) );
@@ -370,7 +371,7 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
boost::bind(&OUString::equals,
boost::cref(serviceName),
boost::bind(
- std::select1st<AvailPair>(),
+ o3tl::select1st<AvailPair>(),
_1)))) == aAvailEnd )
{
return Reference<XInterface>();
@@ -383,7 +384,7 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
boost::bind(&OUString::equals,
boost::cref(serviceName),
boost::bind(
- std::select1st<AvailPair>(),
+ o3tl::select1st<AvailPair>(),
_1)))) == aAAEnd )
{
return Reference<XInterface>();
@@ -396,7 +397,7 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
boost::bind(&OUString::equals,
boost::cref(serviceName),
boost::bind(
- std::select1st<AvailPair>(),
+ o3tl::select1st<AvailPair>(),
_1)))) == aAccelEnd )
{
return Reference<XInterface>();
@@ -543,3 +544,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvasbitmap.cxx b/canvas/source/null/null_canvasbitmap.cxx
index 9bd2058a6d74..92ee7b8094f5 100644
--- a/canvas/source/null/null_canvasbitmap.cxx
+++ b/canvas/source/null/null_canvasbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,12 +53,12 @@ namespace nullcanvas
bHasAlpha );
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpDevice.clear();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
#define IMPLEMENTATION_NAME "NullCanvas.CanvasBitmap"
@@ -82,3 +83,5 @@ namespace nullcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvasbitmap.hxx b/canvas/source/null/null_canvasbitmap.hxx
index 3fa0c15cd314..fa0577c8c02a 100644
--- a/canvas/source/null/null_canvasbitmap.hxx
+++ b/canvas/source/null/null_canvasbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,6 +40,7 @@
#include <boost/shared_ptr.hpp>
#include <canvas/base/integerbitmapbase.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include "null_canvashelper.hxx"
#include "null_spritecanvas.hxx"
@@ -52,7 +54,7 @@ namespace nullcanvas
typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
CanvasHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -74,7 +76,7 @@ namespace nullcanvas
bool bHasAlpha );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
@@ -90,3 +92,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_CANVASBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvascustomsprite.cxx b/canvas/source/null/null_canvascustomsprite.cxx
index 9c45c50954f9..36dbc9a69871 100644
--- a/canvas/source/null/null_canvascustomsprite.cxx
+++ b/canvas/source/null/null_canvascustomsprite.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,14 +66,14 @@ namespace nullcanvas
rRefDevice );
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mpSpriteCanvas.clear();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
void CanvasCustomSprite::redraw() const
@@ -103,3 +104,5 @@ namespace nullcanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvascustomsprite.hxx b/canvas/source/null/null_canvascustomsprite.hxx
index 554fb3033b05..17aa1f92d9a7 100644
--- a/canvas/source/null/null_canvascustomsprite.hxx
+++ b/canvas/source/null/null_canvascustomsprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "sprite.hxx"
@@ -74,8 +75,8 @@ namespace nullcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
- public Sprite
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+ public Sprite
{
};
@@ -108,7 +109,7 @@ namespace nullcanvas
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -134,3 +135,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_CANVASCUSTOMSPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvasfont.cxx b/canvas/source/null/null_canvasfont.cxx
index a8c6f027e40d..78691beed295 100644
--- a/canvas/source/null/null_canvasfont.cxx
+++ b/canvas/source/null/null_canvasfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ namespace nullcanvas
return maFontMatrix;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvasfont.hxx b/canvas/source/null/null_canvasfont.hxx
index 01dc5cac5720..8e3a0f3b44c1 100644
--- a/canvas/source/null/null_canvasfont.hxx
+++ b/canvas/source/null/null_canvasfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_CANVASFONT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvashelper.cxx b/canvas/source/null/null_canvashelper.cxx
index 21e2c74f6b95..f7f1958af4f0 100644
--- a/canvas/source/null/null_canvashelper.cxx
+++ b/canvas/source/null/null_canvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -334,3 +335,5 @@ namespace nullcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_canvashelper.hxx b/canvas/source/null/null_canvashelper.hxx
index 976eb529b56f..383e47c5ffcd 100644
--- a/canvas/source/null/null_canvashelper.hxx
+++ b/canvas/source/null/null_canvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -271,3 +272,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_CANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_devicehelper.cxx b/canvas/source/null/null_devicehelper.cxx
index b04820b15716..7d5748d2a3cf 100644
--- a/canvas/source/null/null_devicehelper.cxx
+++ b/canvas/source/null/null_devicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -237,3 +238,5 @@ namespace nullcanvas
BOOST_CURRENT_FUNCTION );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_devicehelper.hxx b/canvas/source/null/null_devicehelper.hxx
index 2e6298c2e2b6..bd6be098b340 100644
--- a/canvas/source/null/null_devicehelper.hxx
+++ b/canvas/source/null/null_devicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_WINDOWGRAPHICDEVICE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritecanvas.cxx b/canvas/source/null/null_spritecanvas.cxx
index ac41b3fe149a..509e3656f8fa 100644
--- a/canvas/source/null/null_spritecanvas.cxx
+++ b/canvas/source/null/null_spritecanvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,14 +100,14 @@ namespace nullcanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
@@ -164,3 +165,5 @@ namespace nullcanvas
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS1(nullcanvas::nullCanvasDecl)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritecanvas.hxx b/canvas/source/null/null_spritecanvas.hxx
index 136e09a291db..165d73aa4db4 100644
--- a/canvas/source/null/null_spritecanvas.hxx
+++ b/canvas/source/null/null_spritecanvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "null_spritecanvashelper.hxx"
@@ -62,7 +63,7 @@ namespace nullcanvas
::com::sun::star::awt::XWindowListener,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -113,12 +114,8 @@ namespace nullcanvas
void initialize();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -147,3 +144,5 @@ namespace nullcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritecanvashelper.cxx b/canvas/source/null/null_spritecanvashelper.cxx
index 60a81726b196..6f9f35d854eb 100644
--- a/canvas/source/null/null_spritecanvashelper.cxx
+++ b/canvas/source/null/null_spritecanvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,5 @@ namespace nullcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritecanvashelper.hxx b/canvas/source/null/null_spritecanvashelper.hxx
index 4fd7f6764779..596bb17c3569 100644
--- a/canvas/source/null/null_spritecanvashelper.hxx
+++ b/canvas/source/null/null_spritecanvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,4 @@ namespace nullcanvas
#endif /* _NULLCANVAS_SPRITECANVASHELPER_HXX_ */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritehelper.cxx b/canvas/source/null/null_spritehelper.cxx
index 94a4fa6b6578..8e2c614d65ac 100644
--- a/canvas/source/null/null_spritehelper.cxx
+++ b/canvas/source/null/null_spritehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ namespace nullcanvas
return ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPoly );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_spritehelper.hxx b/canvas/source/null/null_spritehelper.hxx
index 18585374ad9a..10762aea0204 100644
--- a/canvas/source/null/null_spritehelper.hxx
+++ b/canvas/source/null/null_spritehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_SPRITEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_textlayout.cxx b/canvas/source/null/null_textlayout.cxx
index 991de3421958..6b51c01d90ed 100644
--- a/canvas/source/null/null_textlayout.cxx
+++ b/canvas/source/null/null_textlayout.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -259,3 +260,5 @@ namespace nullcanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_textlayout.hxx b/canvas/source/null/null_textlayout.hxx
index 4e348b2f5fa8..7c3c47570223 100644
--- a/canvas/source/null/null_textlayout.hxx
+++ b/canvas/source/null/null_textlayout.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_TEXTLAYOUT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/null_usagecounter.hxx b/canvas/source/null/null_usagecounter.hxx
index 28e3c6b2c176..9225dd80237a 100644
--- a/canvas/source/null/null_usagecounter.hxx
+++ b/canvas/source/null/null_usagecounter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ namespace nullcanvas
}
#endif /* _NULLCANVAS_USAGECOUNTER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/null/sprite.hxx b/canvas/source/null/sprite.hxx
index d34070848765..56a38be96914 100644
--- a/canvas/source/null/sprite.hxx
+++ b/canvas/source/null/sprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ namespace nullcanvas
}
#endif /* INCLUDED_NULLCANVAS_SPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx
index 2c87eb6d5621..f41ee45269f2 100644
--- a/canvas/source/simplecanvas/simplecanvasimpl.cxx
+++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -398,3 +399,5 @@ namespace
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS1(simpleCanvasDecl)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/bitmap.cxx b/canvas/source/tools/bitmap.cxx
deleted file mode 100644
index eb7732b9a8f6..000000000000
--- a/canvas/source/tools/bitmap.cxx
+++ /dev/null
@@ -1,838 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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).
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_canvas.hxx"
-
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <canvas/rendering/bitmap.hxx>
-#include <canvas/rendering/isurfaceproxy.hxx>
-#include <basegfx/vector/b2isize.hxx>
-#include "image.hxx"
-#include <algorithm>
-#include <iterator>
-
-
-using namespace ::com::sun::star;
-
-namespace canvas
-{
- class ImplBitmap
- {
- public:
- ImplBitmap( const ::basegfx::B2IVector& rSize,
- const ISurfaceProxyManagerSharedPtr& rMgr,
- bool bWithAlpha ) :
- mpImage(),
- mpSurfaceProxy(),
- mbIsSurfaceDirty( true )
- {
- ENSURE_OR_THROW( rMgr,
- "Bitmap::Bitmap(): Invalid surface proxy manager" );
-
- Image::Description desc;
-
- desc.eFormat = bWithAlpha ? Image::FMT_A8R8G8B8 : Image::FMT_R8G8B8;
- desc.nWidth = rSize.getX();
- desc.nHeight = rSize.getY();
- desc.nStride = 0;
- desc.pBuffer = NULL;
-
- mpImage.reset( new Image(desc) );
-
- // clear the surface [fill with opaque black]
- mpImage->clear(0,255,255,255);
-
- // create a (possibly hardware accelerated) mirror surface.
- mpSurfaceProxy = rMgr->createSurfaceProxy( mpImage );
- }
-
- bool hasAlpha() const
- {
- if( !mpImage )
- return false;
-
- return (mpImage->getDescription().eFormat == Image::FMT_A8R8G8B8);
- }
-
- ::basegfx::B2IVector getSize() const
- {
- return ::basegfx::B2IVector( mpImage->getWidth(),
- mpImage->getHeight() );
- }
-
- ::com::sun::star::uno::Sequence< sal_Int8 > getData( ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect )
- {
- const IColorBuffer::Format format = mpImage->getFormat();
- const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
- const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
-
- if(!(dwNumBytesPerPixel))
- return uno::Sequence< sal_Int8 >();
-
- const sal_uInt32 dwWidth = rect.X2-rect.X1;
- const sal_uInt32 dwHeight = rect.Y2-rect.Y1;
-
- uno::Sequence< sal_Int8 > aRes(dwWidth*dwHeight*4);
- sal_uInt8 *pDst = reinterpret_cast<sal_uInt8 *>(aRes.getArray());
-
- const sal_uInt8 *pSrc = mpImage->lock()+(rect.Y1*dwPitch)+(rect.X1*dwNumBytesPerPixel);
- const sal_uInt32 dwSpanSizeInBytes = dwNumBytesPerPixel*dwWidth;
- for(sal_uInt32 y=0; y<dwHeight; ++y)
- {
- rtl_copyMemory(pDst,pSrc,dwSpanSizeInBytes);
- pDst += dwSpanSizeInBytes;
- pSrc += dwPitch;
- }
- mpImage->unlock();
-
- return aRes;
- }
-
- void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
- const ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect )
- {
- const IColorBuffer::Format format = mpImage->getFormat();
- const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
- const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
-
- if(!(dwNumBytesPerPixel))
- return;
-
- const sal_uInt32 dwWidth = rect.X2-rect.X1;
- const sal_uInt32 dwHeight = rect.Y2-rect.Y1;
- const sal_uInt8 *pSrc = reinterpret_cast<const sal_uInt8 *>(data.getConstArray());
-
- sal_uInt8 *pDst = mpImage->lock()+(rect.Y1*dwPitch)+(rect.X1*dwNumBytesPerPixel);
- const sal_uInt32 dwSpanSizeInBytes = dwNumBytesPerPixel*dwWidth;
- for(sal_uInt32 y=0; y<dwHeight; ++y)
- {
- rtl_copyMemory(pDst,pSrc,dwSpanSizeInBytes);
- pSrc += dwSpanSizeInBytes;
- pDst += dwPitch;
- }
- mpImage->unlock();
- }
-
- void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
- const ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
- const ::com::sun::star::geometry::IntegerPoint2D& pos )
- {
- struct ARGBColor
- {
- sal_uInt8 a;
- sal_uInt8 r;
- sal_uInt8 g;
- sal_uInt8 b;
- };
-
- union ARGB
- {
- ARGBColor Color;
- sal_uInt32 color;
-
- inline ARGB( sal_uInt32 _color ) : color(_color) {}
- };
-
- ARGB argb(0xFFFFFFFF);
-
- if(color.getLength() > 2)
- {
- argb.Color.r = static_cast<sal_uInt8>(color[0]);
- argb.Color.g = static_cast<sal_uInt8>(color[1]);
- argb.Color.b = static_cast<sal_uInt8>(color[2]);
- if(color.getLength() > 3)
- argb.Color.a = static_cast<sal_uInt8>(255.0f*color[3]);
- }
-
- const IColorBuffer::Format format = mpImage->getFormat();
- const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
- const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
-
- if(!(dwNumBytesPerPixel))
- return;
-
- sal_uInt8 *pDst = mpImage->lock()+(pos.Y*dwPitch)+(pos.X*dwNumBytesPerPixel);
-
- switch(format)
- {
- case IColorBuffer::FMT_R8G8B8:
- pDst[0] = argb.Color.r;
- pDst[1] = argb.Color.g;
- pDst[2] = argb.Color.b;
- break;
- case IColorBuffer::FMT_A8R8G8B8:
- case IColorBuffer::FMT_X8R8G8B8:
- pDst[0] = argb.Color.a;
- pDst[1] = argb.Color.r;
- pDst[2] = argb.Color.g;
- pDst[3] = argb.Color.b;
- break;
- default:
- break;
- }
-
- mpImage->unlock();
- }
-
- uno::Sequence< sal_Int8 > getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& /*bitmapLayout*/,
- const ::com::sun::star::geometry::IntegerPoint2D& pos )
- {
- const IColorBuffer::Format format = mpImage->getFormat();
- const sal_uInt32 dwNumBytesPerPixel = getNumBytes(format);
- const sal_uInt32 dwPitch = mpImage->getWidth()*dwNumBytesPerPixel;
-
- if(!(dwNumBytesPerPixel))
- return uno::Sequence< sal_Int8 >();
-
- uno::Sequence< sal_Int8 > aRet(dwNumBytesPerPixel);
- const sal_uInt8 *pSrc = mpImage->lock()+(pos.Y*dwPitch)+(pos.X*dwNumBytesPerPixel);
-
- switch(format)
- {
- case IColorBuffer::FMT_R8G8B8:
- aRet[0] = pSrc[0];
- aRet[1] = pSrc[1];
- aRet[2] = pSrc[2];
- break;
- case IColorBuffer::FMT_A8R8G8B8:
- case IColorBuffer::FMT_X8R8G8B8:
- aRet[0] = pSrc[1];
- aRet[1] = pSrc[2];
- aRet[2] = pSrc[3];
- aRet[3] = pSrc[0];
- break;
- default:
- break;
- }
-
- mpImage->unlock();
-
- return aRet;
- }
-
- // the IColorBuffer interface
- // ==========================
-
- bool draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- if( mbIsSurfaceDirty )
- {
- mpSurfaceProxy->setColorBufferDirty();
- mbIsSurfaceDirty = false;
- }
-
- return mpSurfaceProxy->draw( fAlpha, rPos, rTransform );
- }
-
- bool draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DRange& rArea,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- if( mbIsSurfaceDirty )
- {
- mpSurfaceProxy->setColorBufferDirty();
- mbIsSurfaceDirty = false;
- }
-
- return mpSurfaceProxy->draw( fAlpha, rPos, rArea, rTransform );
- }
-
-
- bool draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DPolyPolygon& rClipPoly,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- if( mbIsSurfaceDirty )
- {
- mpSurfaceProxy->setColorBufferDirty();
- mbIsSurfaceDirty = false;
- }
-
- return mpSurfaceProxy->draw( fAlpha, rPos, rClipPoly, rTransform );
- }
-
- void clear( const uno::Sequence< double >& color )
- {
- if(color.getLength() > 2)
- {
- mbIsSurfaceDirty = true;
-
- if(color.getLength() > 3)
- {
- mpImage->clear( static_cast<sal_uInt8>(255.0f*color[0]),
- static_cast<sal_uInt8>(255.0f*color[1]),
- static_cast<sal_uInt8>(255.0f*color[2]),
- static_cast<sal_uInt8>(255.0f*color[3]) );
- }
- else
- {
- mpImage->clear( static_cast<sal_uInt8>(255.0f*color[0]),
- static_cast<sal_uInt8>(255.0f*color[1]),
- static_cast<sal_uInt8>(255.0f*color[2]),
- 255 );
- }
- }
- }
-
- void fillB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- mpImage->fillB2DPolyPolygon( rPolyPolygon,
- viewState,
- renderState );
- }
-
-
- // the XCanvas-render interface
- // ============================
-
- void drawPoint( const geometry::RealPoint2D& aPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- mpImage->drawPoint( aPoint, viewState, renderState );
- }
-
- void drawLine( const geometry::RealPoint2D& aStartPoint,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- mpImage->drawLine( aStartPoint, aEndPoint, viewState, renderState );
- }
-
- void drawBezier( const geometry::RealBezierSegment2D& aBezierSegment,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- mpImage->drawBezier( aBezierSegment, aEndPoint, viewState, renderState );
- }
-
- ICachedPrimitiveSharedPtr drawPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->drawPolyPolygon( xPolyPolygon, viewState, renderState ) );
- }
-
- ICachedPrimitiveSharedPtr strokePolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->strokePolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- strokeAttributes ) );
- }
-
- ICachedPrimitiveSharedPtr strokeTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- mbIsSurfaceDirty = true;
-
- ::std::vector< ImageSharedPtr > aTextureAnnotations;
- convertTextureAnnotations( aTextureAnnotations,
- textureAnnotations );
-
- return setupCachedPrimitive(
- mpImage->strokeTexturedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- aTextureAnnotations,
- strokeAttributes ) );
- }
-
- ICachedPrimitiveSharedPtr strokeTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const uno::Reference< geometry::XMapping2D >& xMapping,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- mbIsSurfaceDirty = true;
-
- ::std::vector< ImageSharedPtr > aTextureAnnotations;
- convertTextureAnnotations( aTextureAnnotations,
- textureAnnotations );
-
- return setupCachedPrimitive(
- mpImage->strokeTextureMappedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- aTextureAnnotations,
- xMapping,
- strokeAttributes ) );
- }
-
-
- ICachedPrimitiveSharedPtr fillPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->fillPolyPolygon( xPolyPolygon,
- viewState,
- renderState ) );
- }
-
- ICachedPrimitiveSharedPtr fillTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations )
- {
- mbIsSurfaceDirty = true;
-
- ::std::vector< ImageSharedPtr > aTextureAnnotations;
- convertTextureAnnotations( aTextureAnnotations,
- textureAnnotations );
-
- return setupCachedPrimitive(
- mpImage->fillTexturedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- aTextureAnnotations ) );
- }
-
-
- ICachedPrimitiveSharedPtr fillTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const uno::Reference< geometry::XMapping2D >& xMapping )
- {
- mbIsSurfaceDirty = true;
-
- ::std::vector< ImageSharedPtr > aTextureAnnotations;
- convertTextureAnnotations( aTextureAnnotations,
- textureAnnotations );
-
- return setupCachedPrimitive(
- mpImage->fillTextureMappedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- aTextureAnnotations,
- xMapping ) );
- }
-
- ICachedPrimitiveSharedPtr drawBitmap(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->drawBitmap( xBitmap,
- viewState,
- renderState ) );
- }
-
- ICachedPrimitiveSharedPtr drawBitmap(
- const ::boost::shared_ptr<Bitmap>& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->drawBitmap( rImage->mpImpl->mpImage,
- viewState,
- renderState ) );
- }
-
- ICachedPrimitiveSharedPtr drawBitmapModulated(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->drawBitmapModulated( xBitmap,
- viewState,
- renderState ) );
- }
-
-
- ICachedPrimitiveSharedPtr drawBitmapModulated(
- const ::boost::shared_ptr<Bitmap>& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mbIsSurfaceDirty = true;
-
- return setupCachedPrimitive(
- mpImage->drawBitmapModulated( rImage->mpImpl->mpImage,
- viewState,
- renderState ) );
- }
-
- private:
- ICachedPrimitiveSharedPtr setupCachedPrimitive(
- const ImageCachedPrimitiveSharedPtr& rCachedPrimitive ) const
- {
- if( rCachedPrimitive )
- rCachedPrimitive->setImage( mpImage );
-
- return rCachedPrimitive;
- }
-
- void convertTextureAnnotations( ::std::vector< ImageSharedPtr >& o_rTextureAnnotations,
- const ::std::vector< BitmapSharedPtr >& textureAnnotations )
- {
- ::std::vector< BitmapSharedPtr >::const_iterator aCurr( textureAnnotations.begin() );
- const ::std::vector< BitmapSharedPtr >::const_iterator aEnd( textureAnnotations.end() );
- while( aCurr != aEnd )
- {
- if( aCurr->get() != NULL )
- o_rTextureAnnotations.push_back( (*aCurr)->mpImpl->mpImage );
- else
- o_rTextureAnnotations.push_back( ImageSharedPtr() );
-
- ++aCurr;
- }
- }
-
- sal_uInt32 getNumBytes( IColorBuffer::Format format )
- {
- switch(format)
- {
- case IColorBuffer::FMT_R8G8B8:
- return 3;
- case IColorBuffer::FMT_A8R8G8B8:
- case IColorBuffer::FMT_X8R8G8B8:
- return 4;
- default:
- return 0;
- }
- }
-
- ImageSharedPtr mpImage;
- ISurfaceProxySharedPtr mpSurfaceProxy;
- bool mbIsSurfaceDirty;
- };
-
-
- /////////////////////////////////////////////////////////////////
- // Actual Bitmap pimpl forwarding functions
- /////////////////////////////////////////////////////////////////
-
- Bitmap::Bitmap( const ::basegfx::B2IVector& rSize,
- const ISurfaceProxyManagerSharedPtr& rMgr,
- bool bWithAlpha ) :
- mpImpl( new ImplBitmap( rSize,
- rMgr,
- bWithAlpha ) )
- {
- }
-
- Bitmap::~Bitmap()
- {
- // outline destructor is _necessary_, because ImplBitmap is an
- // incomplete type outside this file.
- }
-
- // forward all methods to ImplBitmap
- // ==================================================
-
- bool Bitmap::hasAlpha() const
- {
- return mpImpl->hasAlpha();
- }
-
- ::basegfx::B2IVector Bitmap::getSize() const
- {
- return mpImpl->getSize();
- }
-
- ::com::sun::star::uno::Sequence< sal_Int8 > Bitmap::getData(
- ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect )
- {
- return mpImpl->getData(bitmapLayout,rect);
- }
-
- void Bitmap::setData(
- const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect )
- {
- mpImpl->setData(data,bitmapLayout,rect);
- }
-
- void Bitmap::setPixel(
- const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerPoint2D& pos )
- {
- mpImpl->setPixel(color,bitmapLayout,pos);
- }
-
- uno::Sequence< sal_Int8 > Bitmap::getPixel(
- ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerPoint2D& pos )
- {
- return mpImpl->getPixel(bitmapLayout,pos);
- }
-
- bool Bitmap::draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- return mpImpl->draw( fAlpha, rPos, rTransform );
- }
-
- bool Bitmap::draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DRange& rArea,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- return mpImpl->draw( fAlpha, rPos, rArea, rTransform );
- }
-
-
- bool Bitmap::draw( double fAlpha,
- const ::basegfx::B2DPoint& rPos,
- const ::basegfx::B2DPolyPolygon& rClipPoly,
- const ::basegfx::B2DHomMatrix& rTransform )
- {
- return mpImpl->draw( fAlpha, rPos, rClipPoly, rTransform );
- }
-
- void Bitmap::clear( const uno::Sequence< double >& color )
- {
- mpImpl->clear( color );
- }
-
- void Bitmap::fillB2DPolyPolygon(
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- mpImpl->fillB2DPolyPolygon( rPolyPolygon, viewState, renderState );
- }
-
- void Bitmap::drawPoint( const geometry::RealPoint2D& aPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawPoint( aPoint, viewState, renderState );
- }
-
- void Bitmap::drawLine( const geometry::RealPoint2D& aStartPoint,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawLine( aStartPoint, aEndPoint, viewState, renderState );
- }
-
- void Bitmap::drawBezier( const geometry::RealBezierSegment2D& aBezierSegment,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawBezier( aBezierSegment, aEndPoint, viewState, renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::drawPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawPolyPolygon( xPolyPolygon, viewState, renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::strokePolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- return mpImpl->strokePolyPolygon( xPolyPolygon, viewState, renderState, strokeAttributes );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::strokeTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- return mpImpl->strokeTexturedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- textureAnnotations,
- strokeAttributes );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::strokeTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const uno::Reference< geometry::XMapping2D >& xMapping,
- const rendering::StrokeAttributes& strokeAttributes )
- {
- return mpImpl->strokeTextureMappedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- textureAnnotations,
- xMapping,
- strokeAttributes );
- }
-
-
- ICachedPrimitiveSharedPtr Bitmap::fillPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->fillPolyPolygon( xPolyPolygon,
- viewState,
- renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::fillTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations )
- {
- return mpImpl->fillTexturedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- textureAnnotations );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::fillTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Bitmap> >& textureAnnotations,
- const uno::Reference< geometry::XMapping2D >& xMapping )
- {
- return mpImpl->fillTextureMappedPolyPolygon( xPolyPolygon,
- viewState,
- renderState,
- textures,
- textureAnnotations,
- xMapping );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::drawBitmap(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawBitmap( xBitmap,
- viewState,
- renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::drawBitmap(
- const ::boost::shared_ptr<Bitmap>& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawBitmap( rImage,
- viewState,
- renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::drawBitmapModulated(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawBitmapModulated( xBitmap,
- viewState,
- renderState );
- }
-
- ICachedPrimitiveSharedPtr Bitmap::drawBitmapModulated(
- const ::boost::shared_ptr<Bitmap>& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- return mpImpl->drawBitmapModulated( rImage,
- viewState,
- renderState );
- }
-}
diff --git a/canvas/source/tools/cachedprimitivebase.cxx b/canvas/source/tools/cachedprimitivebase.cxx
index 0d850b842007..ce8ce1d4ece6 100644
--- a/canvas/source/tools/cachedprimitivebase.cxx
+++ b/canvas/source/tools/cachedprimitivebase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,5 @@ namespace canvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/canvascustomspritehelper.cxx b/canvas/source/tools/canvascustomspritehelper.cxx
index f9d4f186d7a7..f9e84acfdfe0 100644
--- a/canvas/source/tools/canvascustomspritehelper.cxx
+++ b/canvas/source/tools/canvascustomspritehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -494,3 +495,5 @@ namespace canvas
maSize.getY() ) );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index ad833cc3ca40..87668bb58516 100755..100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1042,3 +1043,5 @@ namespace canvas
} // namespace tools
} // namespace canvas
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/canvastools.flt b/canvas/source/tools/canvastools.flt
index a230939309da..67e713474bf1 100644
--- a/canvas/source/tools/canvastools.flt
+++ b/canvas/source/tools/canvastools.flt
@@ -1,4 +1,3 @@
__CT
__real
internal
-agg \ No newline at end of file
diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx
index 6c3d3284cb82..26f0894fa29a 100644
--- a/canvas/source/tools/elapsedtime.cxx
+++ b/canvas/source/tools/elapsedtime.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -222,3 +223,5 @@ void ElapsedTime::releaseTimer()
} // namespace tools
} // namespace canvas
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/image.cxx b/canvas/source/tools/image.cxx
deleted file mode 100644
index 4b8a2a334873..000000000000
--- a/canvas/source/tools/image.cxx
+++ /dev/null
@@ -1,2394 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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).
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_canvas.hxx"
-
-#include <canvas/debug.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <canvas/canvastools.hxx>
-#include <canvas/parametricpolypolygon.hxx>
-
-#include <com/sun/star/rendering/RepaintResult.hpp>
-#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
-
-#include <vcl/canvastools.hxx>
-#include <vcl/bitmapex.hxx>
-#include <vcl/bmpacc.hxx>
-
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
-#include <basegfx/polygon/b2dpolygontriangulator.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolygonclipper.hxx>
-#include <basegfx/tools/canvastools.hxx>
-#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
-#include <basegfx/polygon/b2dpolygonclipper.hxx>
-
-#include "image.hxx"
-
-#define CANVAS_IMAGE_CXX
-#include "image_sysprereq.h"
-
-//////////////////////////////////////////////////////////////////////////////////
-// platform-dependend includes [wrapped into their own namepsaces]
-//////////////////////////////////////////////////////////////////////////////////
-
-#if defined(WNT)
-# if defined _MSC_VER
-# pragma warning(push,1)
-# endif
-
- namespace win32
- {
- #undef DECLARE_HANDLE
- #undef WB_LEFT
- #undef WB_RIGHT
- #undef APIENTRY
- #define WIN32_LEAN_AND_MEAN
- #define NOMINMAX
- #include <windows.h>
- }
-
-# if defined _MSC_VER
-# pragma warning(pop)
-# endif
-#elif defined(OS2)
- namespace os2
- {
- #include <svpm.h>
- }
-#else
-#if !defined(QUARTZ)
- namespace unx
- {
- #include <X11/Xlib.h>
- }
-#endif
-#endif
-
-#include <algorithm>
-
-using namespace ::com::sun::star;
-
-namespace canvas { namespace
-{
- //////////////////////////////////////////////////////////////////////////////////
- // TransAffineFromAffineMatrix
- //////////////////////////////////////////////////////////////////////////////////
-
- ::agg::trans_affine transAffineFromAffineMatrix( const geometry::AffineMatrix2D& m )
- {
- return agg::trans_affine(m.m00,
- m.m10,
- m.m01,
- m.m11,
- m.m02,
- m.m12);
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // TransAffineFromB2DHomMatrix
- //////////////////////////////////////////////////////////////////////////////////
-
- ::agg::trans_affine transAffineFromB2DHomMatrix( const ::basegfx::B2DHomMatrix& m )
- {
- return agg::trans_affine(m.get(0,0),
- m.get(1,0),
- m.get(0,1),
- m.get(1,1),
- m.get(0,2),
- m.get(1,2));
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // ARGB
- //////////////////////////////////////////////////////////////////////////////////
-
- struct ARGBColor
- {
- sal_uInt8 a;
- sal_uInt8 r;
- sal_uInt8 g;
- sal_uInt8 b;
- };
-
- /// ARGB color
- union ARGB
- {
- ARGBColor Color;
- sal_uInt32 color;
-
- ARGB() :
- color(0)
- {
- }
-
- explicit ARGB( sal_uInt32 _color ) :
- color(_color)
- {
- }
-
- ARGB( sal_uInt8 _a,
- sal_uInt8 _r,
- sal_uInt8 _g,
- sal_uInt8 _b )
- {
- Color.a = _a;
- Color.r = _r;
- Color.g = _g;
- Color.b = _b;
- }
-
- ARGB( sal_uInt32 default_color,
- const ::com::sun::star::uno::Sequence< double >& sequence ) :
- color(default_color)
- {
- if(sequence.getLength() > 2)
- {
- Color.r = static_cast<sal_uInt8>(255.0f*sequence[0]);
- Color.g = static_cast<sal_uInt8>(255.0f*sequence[1]);
- Color.b = static_cast<sal_uInt8>(255.0f*sequence[2]);
- if(sequence.getLength() > 3)
- Color.a = static_cast<sal_uInt8>(255.0f*sequence[3]);
- }
- }
-
- ARGB( const ARGB& rhs ) :
- color( rhs.color )
- {
- }
-
- ARGB &operator=( const ARGB &rhs )
- {
- color=rhs.color;
- return *this;
- }
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // setupState
- //////////////////////////////////////////////////////////////////////////////////
-
- /// Calc common output state from XCanvas parameters
- void setupState( ::basegfx::B2DHomMatrix& o_rViewTransform,
- ::basegfx::B2DHomMatrix& o_rRenderTransform,
- ::std::auto_ptr< ::basegfx::B2DPolyPolygon >& o_rViewClip,
- ::std::auto_ptr< ::basegfx::B2DPolyPolygon >& o_rRenderClip,
- ARGB& o_rRenderColor,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- ::basegfx::unotools::homMatrixFromAffineMatrix(o_rRenderTransform,
- renderState.AffineTransform);
- ::basegfx::unotools::homMatrixFromAffineMatrix(o_rViewTransform,
- viewState.AffineTransform);
-
- o_rRenderColor = ARGB(0xFFFFFFFF,
- renderState.DeviceColor);
-
- // TODO(F3): handle compositing modes
-
- if( viewState.Clip.is() )
- {
- ::basegfx::B2DPolyPolygon aViewClip(
- ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( viewState.Clip ));
-
- if(aViewClip.areControlPointsUsed())
- aViewClip = ::basegfx::tools::adaptiveSubdivideByAngle(aViewClip);
-
- o_rViewClip.reset( new ::basegfx::B2DPolyPolygon( aViewClip ) );
- }
-
- if( renderState.Clip.is() )
- {
- ::basegfx::B2DPolyPolygon aRenderClip(
- ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( viewState.Clip ) );
-
- if(aRenderClip.areControlPointsUsed())
- aRenderClip = ::basegfx::tools::adaptiveSubdivideByAngle(aRenderClip);
-
- o_rRenderClip.reset( new ::basegfx::B2DPolyPolygon( aRenderClip ) );
- }
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // clipAndTransformPolygon
- //////////////////////////////////////////////////////////////////////////////////
-
- /** Clip and transform given polygon
-
- @param io_rClippee
- Polygon to clip
-
- @param bIsFilledPolyPolygon
- When true, the polygon is clipped as if it was to be rendered
- with fill, when false, the polygon is clipped as if it was to
- be rendered with stroking.
- */
- void clipAndTransformPolygon( ::basegfx::B2DPolyPolygon& io_rClippee,
- bool bIsFilledPolyPolygon,
- const ::basegfx::B2DHomMatrix& rViewTransform,
- const ::basegfx::B2DHomMatrix& rRenderTransform,
- const ::basegfx::B2DPolyPolygon* pViewClip,
- const ::basegfx::B2DPolyPolygon* pRenderClip )
- {
- ::basegfx::B2DPolyPolygon aPolyPolygon(io_rClippee);
- io_rClippee.clear();
-
- // clip contour against renderclip
- if( pRenderClip )
- {
- // AW: Simplified
- aPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
- aPolyPolygon, *pRenderClip, true, !bIsFilledPolyPolygon);
- }
-
- if( !aPolyPolygon.count() )
- return;
-
- // transform result into view space
- aPolyPolygon.transform(rRenderTransform);
-
- // clip contour against viewclip
- if( pViewClip )
- {
- // AW: Simplified
- aPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
- aPolyPolygon, *pViewClip, true, !bIsFilledPolyPolygon);
- }
-
- if(!(aPolyPolygon.count()))
- return;
-
- // transform result into device space
- aPolyPolygon.transform(rViewTransform);
-
- io_rClippee = aPolyPolygon;
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // setupPolyPolygon
- //////////////////////////////////////////////////////////////////////////////////
-
- void setupPolyPolygon( ::basegfx::B2DPolyPolygon& io_rClippee,
- bool bIsFilledPolyPolygon,
- ARGB& o_rRenderColor,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
- {
- ::basegfx::B2DHomMatrix aViewTransform;
- ::basegfx::B2DHomMatrix aRenderTransform;
- ::std::auto_ptr< ::basegfx::B2DPolyPolygon > pViewClip;
- ::std::auto_ptr< ::basegfx::B2DPolyPolygon > pRenderClip;
-
- setupState( aViewTransform,
- aRenderTransform,
- pViewClip,
- pRenderClip,
- o_rRenderColor,
- viewState,
- renderState );
-
- clipAndTransformPolygon( io_rClippee,
- bIsFilledPolyPolygon,
- aViewTransform,
- aRenderTransform,
- pViewClip.get(),
- pRenderClip.get() );
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // RawABGRBitmap
- //////////////////////////////////////////////////////////////////////////////////
-
- // Raw ABGR [AABBGGRR] 32bit continous
- struct RawABGRBitmap
- {
- sal_Int32 mnWidth;
- sal_Int32 mnHeight;
- sal_uInt8* mpBitmapData;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // vclBitmapEx2Raw
- //////////////////////////////////////////////////////////////////////////////////
-
- void vclBitmapEx2Raw( const ::BitmapEx& rBmpEx, RawABGRBitmap& rBmpData )
- {
- Bitmap aBitmap( rBmpEx.GetBitmap() );
-
- ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
- aBitmap );
-
- const sal_Int32 nWidth( rBmpData.mnWidth );
- const sal_Int32 nHeight( rBmpData.mnHeight );
-
- ENSURE_OR_THROW( pReadAccess.get() != NULL,
- "vclBitmapEx2Raw(): "
- "Unable to acquire read acces to bitmap" );
-
- if( rBmpEx.IsTransparent())
- {
- if( rBmpEx.IsAlpha() )
- {
- // 8bit alpha mask
- Bitmap aAlpha( rBmpEx.GetAlpha().GetBitmap() );
-
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.AcquireReadAccess(),
- aAlpha );
-
- // By convention, the access buffer always has
- // one of the following formats:
- //
- // BMP_FORMAT_1BIT_MSB_PAL
- // BMP_FORMAT_4BIT_MSN_PAL
- // BMP_FORMAT_8BIT_PAL
- // BMP_FORMAT_16BIT_TC_LSB_MASK
- // BMP_FORMAT_24BIT_TC_BGR
- // BMP_FORMAT_32BIT_TC_MASK
- //
- // and is always BMP_FORMAT_BOTTOM_UP
- //
- // This is the way
- // WinSalBitmap::AcquireBuffer() sets up the
- // buffer
-
- ENSURE_OR_THROW( pAlphaReadAccess.get() != NULL,
- "vclBitmapEx2Raw(): "
- "Unable to acquire read acces to alpha" );
-
- ENSURE_OR_THROW( pAlphaReadAccess->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ||
- pAlphaReadAccess->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
- "vclBitmapEx2Raw(): "
- "Unsupported alpha scanline format" );
-
- BitmapColor aCol;
- sal_uInt8* pCurrOutput( rBmpData.mpBitmapData );
- int x, y;
-
- for( y=0; y<nHeight; ++y )
- {
- switch( pReadAccess->GetScanlineFormat() )
- {
- case BMP_FORMAT_8BIT_PAL:
- {
- Scanline pScan = pReadAccess->GetScanline( y );
- Scanline pAScan = pAlphaReadAccess->GetScanline( y );
-
- for( x=0; x<nWidth; ++x )
- {
- aCol = pReadAccess->GetPaletteColor( *pScan++ );
-
- *pCurrOutput++ = aCol.GetBlue();
- *pCurrOutput++ = aCol.GetGreen();
- *pCurrOutput++ = aCol.GetRed();
-
- // out notion of alpha is
- // different from the rest
- // of the world's
- *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
- }
- }
- break;
-
- case BMP_FORMAT_24BIT_TC_BGR:
- {
- Scanline pScan = pReadAccess->GetScanline( y );
- Scanline pAScan = pAlphaReadAccess->GetScanline( y );
-
- for( x=0; x<nWidth; ++x )
- {
- // store as RGBA
- *pCurrOutput++ = *pScan++;
- *pCurrOutput++ = *pScan++;
- *pCurrOutput++ = *pScan++;
-
- // out notion of alpha is
- // different from the rest
- // of the world's
- *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
- }
- }
- break;
-
- // TODO(P2): Might be advantageous
- // to hand-formulate the following
- // formats, too.
- case BMP_FORMAT_1BIT_MSB_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_4BIT_MSN_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_16BIT_TC_LSB_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_MASK:
- {
- Scanline pAScan = pAlphaReadAccess->GetScanline( y );
-
- // using fallback for those
- // seldom formats
- for( x=0; x<nWidth; ++x )
- {
- // yes. x and y are swapped on Get/SetPixel
- aCol = pReadAccess->GetColor(y,x);
-
- *pCurrOutput++ = aCol.GetBlue();
- *pCurrOutput++ = aCol.GetGreen();
- *pCurrOutput++ = aCol.GetRed();
-
- // out notion of alpha is
- // different from the rest
- // of the world's
- *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
- }
- }
- break;
-
- case BMP_FORMAT_1BIT_LSB_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_4BIT_LSN_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_8BIT_TC_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_24BIT_TC_RGB:
- // FALLTHROUGH intended
- case BMP_FORMAT_24BIT_TC_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_16BIT_TC_MSB_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_ABGR:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_ARGB:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_BGRA:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_RGBA:
- // FALLTHROUGH intended
- default:
- ENSURE_OR_THROW( false,
- "vclBitmapEx2Raw(): "
- "Unexpected scanline format - has "
- "WinSalBitmap::AcquireBuffer() changed?" );
- }
- }
- }
- else
- {
- // 1bit alpha mask
- Bitmap aMask( rBmpEx.GetMask() );
-
- ScopedBitmapReadAccess pMaskReadAccess( aMask.AcquireReadAccess(),
- aMask );
-
- // By convention, the access buffer always has
- // one of the following formats:
- //
- // BMP_FORMAT_1BIT_MSB_PAL
- // BMP_FORMAT_4BIT_MSN_PAL
- // BMP_FORMAT_8BIT_PAL
- // BMP_FORMAT_16BIT_TC_LSB_MASK
- // BMP_FORMAT_24BIT_TC_BGR
- // BMP_FORMAT_32BIT_TC_MASK
- //
- // and is always BMP_FORMAT_BOTTOM_UP
- //
- // This is the way
- // WinSalBitmap::AcquireBuffer() sets up the
- // buffer
-
- ENSURE_OR_THROW( pMaskReadAccess.get() != NULL,
- "vclBitmapEx2Raw(): "
- "Unable to acquire read acces to mask" );
-
- ENSURE_OR_THROW( pMaskReadAccess->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL,
- "vclBitmapEx2Raw(): "
- "Unsupported mask scanline format" );
-
- BitmapColor aCol;
- int nCurrBit;
- const int nMask( 1L );
- const int nInitialBit(7);
- sal_uInt32 *pBuffer = reinterpret_cast<sal_uInt32 *>(rBmpData.mpBitmapData);
- int x, y;
-
- // mapping table, to get from mask index color to
- // alpha value (which depends on the mask's palette)
- sal_uInt8 aColorMap[2];
-
- const BitmapColor& rCol0( pMaskReadAccess->GetPaletteColor( 0 ) );
- const BitmapColor& rCol1( pMaskReadAccess->GetPaletteColor( 1 ) );
-
- // shortcut for true luminance calculation
- // (assumes that palette is grey-level). Note the
- // swapped the indices here, to account for the
- // fact that VCL's notion of alpha is inverted to
- // the rest of the world's.
- aColorMap[0] = rCol1.GetRed();
- aColorMap[1] = rCol0.GetRed();
-
- for( y=0; y<nHeight; ++y )
- {
- switch( pReadAccess->GetScanlineFormat() )
- {
- case BMP_FORMAT_8BIT_PAL:
- {
- Scanline pScan = pReadAccess->GetScanline( y );
- Scanline pMScan = pMaskReadAccess->GetScanline( y );
-
- for( x=0, nCurrBit=nInitialBit; x<nWidth; ++x )
- {
- aCol = pReadAccess->GetPaletteColor( *pScan++ );
-
- // RGB -> ABGR
- unsigned int color = aCol.GetRed();
- color |= aCol.GetGreen()<<8;
- color |= aCol.GetBlue()<<16;
- color |= aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ]<<24;
- *pBuffer++ = color;
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
- }
- }
- break;
-
- case BMP_FORMAT_24BIT_TC_BGR:
- {
- Scanline pScan = pReadAccess->GetScanline( y );
- Scanline pMScan = pMaskReadAccess->GetScanline( y );
-
- for( x=0, nCurrBit=nInitialBit; x<nWidth; ++x )
- {
- // BGR -> ABGR
- unsigned int color = (*pScan++)<<16;
- color |= (*pScan++)<<8;
- color |= (*pScan++);
- color |= (aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ])<<24;
- *pBuffer++ = color;
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
- }
- }
- break;
-
- // TODO(P2): Might be advantageous
- // to hand-formulate the following
- // formats, too.
- case BMP_FORMAT_1BIT_MSB_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_4BIT_MSN_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_16BIT_TC_LSB_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_MASK:
- {
- Scanline pMScan = pMaskReadAccess->GetScanline( y );
-
- // using fallback for those
- // seldom formats
- for( x=0, nCurrBit=nInitialBit; x<nWidth; ++x )
- {
- // yes. x and y are swapped on Get/SetPixel
- aCol = pReadAccess->GetColor(y,x);
-
- // -> ABGR
- unsigned int color = aCol.GetBlue()<<16;
- color |= aCol.GetGreen()<<8;
- color |= aCol.GetRed();
- color |= (aColorMap[ (pMScan[ (x & ~7L) >> 3L ] >> nCurrBit ) & nMask ])<<24;
- *pBuffer++ = color;
- nCurrBit = ((nCurrBit - 1) % 8L) & 7L;
- }
- }
- break;
-
- case BMP_FORMAT_1BIT_LSB_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_4BIT_LSN_PAL:
- // FALLTHROUGH intended
- case BMP_FORMAT_8BIT_TC_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_24BIT_TC_RGB:
- // FALLTHROUGH intended
- case BMP_FORMAT_24BIT_TC_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_16BIT_TC_MSB_MASK:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_ABGR:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_ARGB:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_BGRA:
- // FALLTHROUGH intended
- case BMP_FORMAT_32BIT_TC_RGBA:
- // FALLTHROUGH intended
- default:
- ENSURE_OR_THROW( false,
- "vclBitmapEx2Raw(): "
- "Unexpected scanline format - has "
- "WinSalBitmap::AcquireBuffer() changed?" );
- }
- }
- }
- }
- else
- {
- // *no* alpha mask
- sal_uIntPtr nFormat = pReadAccess->GetScanlineFormat();
- sal_uInt8 *pBuffer = reinterpret_cast<sal_uInt8 *>(rBmpData.mpBitmapData);
-
- switch(nFormat)
- {
- case BMP_FORMAT_24BIT_TC_BGR:
-
- {
- sal_Int32 height = pReadAccess->Height();
- for(sal_Int32 y=0; y<height; ++y)
- {
- sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
- sal_Int32 width = pReadAccess->Width();
- for(sal_Int32 x=0; x<width; ++x)
- {
- // BGR -> RGB
- sal_uInt8 b(*pScanline++);
- sal_uInt8 g(*pScanline++);
- sal_uInt8 r(*pScanline++);
- *pBuffer++ = r;
- *pBuffer++ = g;
- *pBuffer++ = b;
- }
- }
- }
- break;
-
- case BMP_FORMAT_24BIT_TC_RGB:
-
- {
- sal_Int32 height = pReadAccess->Height();
- for(sal_Int32 y=0; y<height; ++y)
- {
- sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
- sal_Int32 width = pReadAccess->Width();
- for(sal_Int32 x=0; x<width; ++x)
- {
- // RGB -> RGB
- sal_uInt8 r(*pScanline++);
- sal_uInt8 g(*pScanline++);
- sal_uInt8 b(*pScanline++);
- *pBuffer++ = r;
- *pBuffer++ = g;
- *pBuffer++ = b;
- }
- }
- }
- break;
-
- case BMP_FORMAT_1BIT_MSB_PAL:
- case BMP_FORMAT_1BIT_LSB_PAL:
- case BMP_FORMAT_4BIT_MSN_PAL:
- case BMP_FORMAT_4BIT_LSN_PAL:
- case BMP_FORMAT_8BIT_PAL:
-
- {
- sal_Int32 height = pReadAccess->Height();
- for(sal_Int32 y=0; y<height; ++y)
- {
- sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
- sal_Int32 width = pReadAccess->Width();
- for(sal_Int32 x=0; x<width; ++x)
- {
- BitmapColor aCol(pReadAccess->GetPaletteColor(*pScanline++));
-
- *pBuffer++ = aCol.GetRed();
- *pBuffer++ = aCol.GetGreen();
- *pBuffer++ = aCol.GetBlue();
- }
- }
- }
- break;
- }
- }
- }
-
- //////////////////////////////////////////////////////////////////////////////////
- // color_generator_linear
- //////////////////////////////////////////////////////////////////////////////////
-
- template<typename T> struct color_generator_linear
- {
- typedef typename T::value_type value_type;
-
- color_generator_linear( const T &c1,
- const T &c2,
- unsigned int aSteps ) : maSteps(aSteps),
- maColor1(c1),
- maColor2(c2)
- {
- }
-
- unsigned size() const { return maSteps; }
- const T operator [] (unsigned v) const
- {
- const double w = double(v)/maSteps;
- return T( static_cast<value_type>(maColor1.r+(maColor2.r-maColor1.r)*w),
- static_cast<value_type>(maColor1.g+(maColor2.g-maColor1.g)*w),
- static_cast<value_type>(maColor1.b+(maColor2.b-maColor1.b)*w),
- static_cast<value_type>(maColor1.a+(maColor2.a-maColor1.a)*w));
- }
-
- unsigned int maSteps;
- const T maColor1;
- const T maColor2;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // color_generator_axial
- //////////////////////////////////////////////////////////////////////////////////
-
- template<typename T> struct color_generator_axial
- {
- typedef typename T::value_type value_type;
-
- color_generator_axial( const T &c1,
- const T &c2,
- unsigned int aSteps ) : maSteps(aSteps),
- maColor1(c1),
- maColor2(c2)
- {
- }
-
- unsigned size() const { return maSteps; }
- const T operator [] (unsigned v) const
- {
- const double aHalfSteps = maSteps/2.0;
- const double w = (v >= aHalfSteps) ?
- 1.0-((double(v)-aHalfSteps)/aHalfSteps) :
- (double(v)*2.0)/maSteps;
- return T( static_cast<value_type>(maColor1.r+(maColor2.r-maColor1.r)*w),
- static_cast<value_type>(maColor1.g+(maColor2.g-maColor1.g)*w),
- static_cast<value_type>(maColor1.b+(maColor2.b-maColor1.b)*w),
- static_cast<value_type>(maColor1.a+(maColor2.a-maColor1.a)*w));
- }
-
- unsigned int maSteps;
- const T maColor1;
- const T maColor2;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // color_generator_adaptor
- //////////////////////////////////////////////////////////////////////////////////
-
- template<typename T> struct color_generator_adaptor
- {
- color_generator_adaptor( const T &c1,
- const T &c2,
- unsigned int aSteps ) : linear_generator(c1,c2,aSteps),
- axial_generator(c1,c2,aSteps),
- mbLinear(true) {}
- void set_linear( bool bLinear ) { mbLinear=bLinear; }
- unsigned size() const { return mbLinear ? linear_generator.size() : axial_generator.size(); }
- const T operator [] (unsigned v) const
- {
- return mbLinear ?
- linear_generator.operator [] (v) :
- axial_generator.operator [] (v);
- }
-
- color_generator_linear<T> linear_generator;
- color_generator_axial<T> axial_generator;
- bool mbLinear;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // gradient_polymorphic_wrapper_base
- //////////////////////////////////////////////////////////////////////////////////
-
- struct gradient_polymorphic_wrapper_base
- {
- virtual int calculate(int x, int y, int) const = 0;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // gradient_polymorphic_wrapper
- //////////////////////////////////////////////////////////////////////////////////
-
- template<class GradientF> struct gradient_polymorphic_wrapper :
- public gradient_polymorphic_wrapper_base
- {
- virtual int calculate(int x, int y, int d) const
- {
- return m_gradient.calculate(x, y, d);
- }
- GradientF m_gradient;
- };
-
- //////////////////////////////////////////////////////////////////////////////////
- // gradient_rect
- //////////////////////////////////////////////////////////////////////////////////
-
- class gradient_rect
- {
- public:
-
- int width;
- int height;
-
- inline int calculate(int x, int y, int d) const
- {
- int ax = abs(x);
- int ay = abs(y);
- int clamp_x = height>width ? 0 : (width-height);
- int clamp_y = height>width ? (height-width) : 0;
- int value_x = (ax-clamp_x)*d/(width-clamp_x);
- int value_y = (ay-clamp_y)*d/(height-clamp_y);
- if(ax < (clamp_x))
- value_x = 0;
- if(ay < (clamp_y))
- value_y = 0;
- return value_x > value_y ? value_x : value_y;
- }
- };
-
- sal_uInt32 getBytesPerPixel( IColorBuffer::Format eFormat )
- {
- switch(eFormat)
- {
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- // FALLTHROUGH intended
- case IColorBuffer::FMT_R8G8B8:
- return 3L;
- case IColorBuffer::FMT_A8R8G8B8:
- return 4L;
- }
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawLinePolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class pixel_format>
-void Image::drawLinePolyPolygonImpl( const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- double fStrokeWidth,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- ::basegfx::B2DPolyPolygon aPolyPolygon( rPolyPolygon );
- ARGB aRenderColor;
-
- setupPolyPolygon( aPolyPolygon, false, aRenderColor, viewState, renderState );
-
- if( !aPolyPolygon.count() )
- return;
-
- // Class template pixel_formats_rgb24 has full knowledge about this
- // particular pixel format in memory. The only template parameter
- // can be order_rgb24 or order_bgr24 that determines the order of color channels.
- //typedef agg::pixfmt_rgba32 pixel_format;
- pixel_format pixf(maRenderingBuffer);
-
- // There are two basic renderers with almost the same functionality:
- // renderer_base and renderer_mclip. The first one is used most often
- // and it performs low level clipping.
- // This simply adds clipping to the graphics buffer, the clip rect
- // will be initialized to the area of the framebuffer.
- typedef agg::renderer_base<pixel_format> renderer_base;
- agg::renderer_base<pixel_format> renb(pixf);
-
- // To draw Anti-Aliased primitives one shoud *rasterize* them first.
- // The primary rasterization technique in AGG is scanline based.
- // That is, a polygon is converted into a number of horizontal
- // scanlines and then the scanlines are being rendered one by one.
- // To transfer information from a rasterizer to the scanline renderer
- // there scanline containers are used. A scanline consists of a
- // number of horizontal, non-intersecting spans. All spans must be ordered by X.
- // --> *packed* scanline container
- agg::scanline_p8 sl;
-
- typedef agg::renderer_outline_aa<renderer_base> renderer_type;
- typedef agg::rasterizer_outline_aa<renderer_type> rasterizer_type;
- agg::line_profile_aa profile;
- profile.width(fStrokeWidth);
- renderer_type ren(renb, profile);
- rasterizer_type ras(ren);
-
- const agg::rgba8 fillcolor(aRenderColor.Color.r,
- aRenderColor.Color.g,
- aRenderColor.Color.b,
- aRenderColor.Color.a);
- ren.color(fillcolor);
-
- agg::path_storage path;
- agg::conv_curve<agg::path_storage> curve(path);
-
- for(sal_uInt32 nPolygon=0; nPolygon<aPolyPolygon.count(); ++nPolygon)
- {
- const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(nPolygon));
- const sal_uInt32 nPointCount(aPolygon.count());
-
- if(nPointCount)
- {
- if(aPolygon.areControlPointsUsed())
- {
- // prepare edge-based loop
- basegfx::B2DPoint aCurrentPoint(aPolygon.getB2DPoint(0));
- const sal_uInt32 nEdgeCount(aPolygon.isClosed() ? nPointCount - 1 : nPointCount);
-
- // first vertex
- path.move_to(aCurrentPoint.getX(), aCurrentPoint.getY());
-
- for(sal_uInt32 a(0); a < nEdgeCount; a++)
- {
- // access next point
- const sal_uInt32 nNextIndex((a + 1) % nPointCount);
- const basegfx::B2DPoint aNextPoint(aPolygon.getB2DPoint(nNextIndex));
-
- // get control points
- const basegfx::B2DPoint aControlNext(aPolygon.getNextControlPoint(a));
- const basegfx::B2DPoint aControlPrev(aPolygon.getPrevControlPoint(nNextIndex));
-
- // specify first cp, second cp, next vertex
- path.curve4(
- aControlNext.getX(), aControlNext.getY(),
- aControlPrev.getX(), aControlPrev.getY(),
- aNextPoint.getX(), aNextPoint.getY());
-
- // prepare next step
- aCurrentPoint = aNextPoint;
- }
- }
- else
- {
- const basegfx::B2DPoint aStartPoint(aPolygon.getB2DPoint(0));
- ras.move_to_d(aStartPoint.getX(), aStartPoint.getY());
-
- for(sal_uInt32 a(1); a < nPointCount; a++)
- {
- const basegfx::B2DPoint aVertexPoint(aPolygon.getB2DPoint(a));
- ras.line_to_d(aVertexPoint.getX(), aVertexPoint.getY());
- }
-
- ras.render(aPolygon.isClosed());
- }
- }
- }
-
- ras.add_path(curve);
- ras.render(false);
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawLinePolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::drawLinePolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
- double fStrokeWidth,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- switch(maDesc.eFormat)
- {
- case FMT_R8G8B8:
- drawLinePolyPolygonImpl<agg::pixfmt_rgb24>(rPoly,fStrokeWidth,viewState,renderState);
- break;
- case FMT_A8R8G8B8:
- drawLinePolyPolygonImpl<agg::pixfmt_rgba32>(rPoly,fStrokeWidth,viewState,renderState);
- break;
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::implDrawBitmap
-//////////////////////////////////////////////////////////////////////////////////
-
-/** internal utility function to draw one image into another one.
- the source image will be drawn with respect to the given
- transform and clip settings.
- */
-ImageCachedPrimitiveSharedPtr Image::implDrawBitmap(
- const Image& rBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- ::basegfx::B2DPolyPolygon aPoly(
- ::basegfx::tools::createPolygonFromRect(
- ::basegfx::B2DRange(0.0, 0.0,
- rBitmap.maDesc.nWidth,
- rBitmap.maDesc.nHeight ) ) );
- ARGB aFillColor;
-
- setupPolyPolygon( aPoly, true, aFillColor, viewState, renderState );
-
- if( !aPoly.count() )
- return ImageCachedPrimitiveSharedPtr();
-
- ::basegfx::B2DHomMatrix aViewTransform;
- ::basegfx::B2DHomMatrix aRenderTransform;
- ::basegfx::B2DHomMatrix aTextureTransform;
-
- ::basegfx::unotools::homMatrixFromAffineMatrix(aRenderTransform,
- renderState.AffineTransform);
- ::basegfx::unotools::homMatrixFromAffineMatrix(aViewTransform,
- viewState.AffineTransform);
- aTextureTransform *= aRenderTransform;
-
- // TODO(F2): Fill in texture
- rendering::Texture aTexture;
-
- return fillTexturedPolyPolygon( rBitmap,
- aPoly,
- aTextureTransform,
- aViewTransform,
- aTexture );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// cachedPrimitiveFTPP [cachedPrimitive for [F]ill[T]extured[P]oly[P]olygon]
-//////////////////////////////////////////////////////////////////////////////////
-
-#if AGG_VERSION >= 2400
-template<class pixel_format_dst,class span_gen_type>
-#else
-template<class pixel_format,class span_gen_type>
-#endif
-class cachedPrimitiveFTPP : public ImageCachedPrimitive
-{
- public:
-
- cachedPrimitiveFTPP( const ::basegfx::B2DHomMatrix &rTransform,
- const ::basegfx::B2DHomMatrix &rViewTransform,
- agg::rendering_buffer &dst,
- const agg::rendering_buffer& src ) :
- aTransform(rTransform),
- inter(tm),
- filter(filter_kernel),
-#if AGG_VERSION >= 2400
- pixs(const_cast<agg::rendering_buffer&>(src)),
- source(pixs),
- sg(source,inter,filter),
- pixd(dst),
- rb(pixd),
- ren(rb,sa,sg)
-#else
- sg(sa,src,inter,filter),
- pixf(dst),
- rb(pixf),
- ren(rb,sg)
-#endif
- {
- ::basegfx::B2DHomMatrix aFinalTransform(aTransform);
- aFinalTransform *= rViewTransform;
- tm = transAffineFromB2DHomMatrix(aFinalTransform);
- tm.invert();
- }
-
- virtual void setImage( const ::boost::shared_ptr< class Image >& rTargetImage )
- {
- pImage=rTargetImage;
- }
-
- virtual sal_Int8 redraw( const ::com::sun::star::rendering::ViewState& aState ) const
- {
- ::basegfx::B2DHomMatrix aViewTransform;
- ::basegfx::unotools::homMatrixFromAffineMatrix(aViewTransform,aState.AffineTransform);
- ::basegfx::B2DHomMatrix aFinalTransform(aTransform);
- aFinalTransform *= aViewTransform;
- tm = transAffineFromB2DHomMatrix(aFinalTransform);
- tm.invert();
- redraw();
- return ::com::sun::star::rendering::RepaintResult::REDRAWN;
- }
-
- inline void redraw() const { agg::render_scanlines(ras, sl, ren); }
-
- mutable agg::rasterizer_scanline_aa<> ras;
-
- private:
-
- typedef agg::span_interpolator_linear<> interpolator_type;
-#if AGG_VERSION >= 2400
- typedef agg::renderer_base<pixel_format_dst> renderer_base;
- typedef agg::span_allocator< typename span_gen_type::color_type > span_alloc_type;
- typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
- typedef typename span_gen_type::source_type source_type;
- typedef typename span_gen_type::source_type::pixfmt_type pixel_format_src;
-#else
- typedef agg::renderer_base<pixel_format> renderer_base;
- typedef agg::renderer_scanline_aa<renderer_base, span_gen_type> renderer_type;
-#endif
-
- ::basegfx::B2DHomMatrix aTransform;
- interpolator_type inter;
- agg::image_filter_bilinear filter_kernel;
- agg::image_filter_lut filter;
-#if AGG_VERSION >= 2400
- span_alloc_type sa;
- pixel_format_src pixs;
- source_type source;
-#else
- agg::span_allocator< typename span_gen_type::color_type > sa;
-#endif
- span_gen_type sg;
-#if AGG_VERSION >= 2400
- pixel_format_dst pixd;
-#else
- pixel_format pixf;
-#endif
- renderer_base rb;
- mutable renderer_type ren;
- mutable agg::scanline_p8 sl;
- mutable agg::trans_affine tm;
- ImageSharedPtr pImage;
-};
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillTexturedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class pixel_format,class span_gen_type>
-ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl(
- const Image& rTexture,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::basegfx::B2DHomMatrix& rViewTransform,
- const rendering::Texture& )
-{
- // calculate final overall transform.
- ::basegfx::B2DHomMatrix aOverallTransform(rOverallTransform);
- aOverallTransform *= rViewTransform;
-
- // instead of always using the full-blown solution we
- // first check to see if this is a simple rectangular
- // 1-to-1 copy from source to destination image.
- ::basegfx::B2DTuple aTranslate(aOverallTransform.get(0,2),aOverallTransform.get(1,2));
- ::basegfx::B2DTuple aSize(rTexture.maDesc.nWidth,rTexture.maDesc.nHeight);
- ::basegfx::B2DRange aRange(aTranslate,aTranslate+aSize);
- ::basegfx::B2DPolyPolygon aPolyPolygon(rPolyPolygon);
- aPolyPolygon.transform(aOverallTransform);
- if(::basegfx::tools::isPolyPolygonEqualRectangle(aPolyPolygon,aRange))
- {
- // yes, we can take the shortcut.
- // but we need to clip the destination rectangle
- // against the boundary of the destination image.
- sal_Int32 dwSrcX(0);
- sal_Int32 dwSrcY(0);
- sal_Int32 dwDstX(static_cast<sal_Int32>(aTranslate.getX()));
- sal_Int32 dwDstY(static_cast<sal_Int32>(aTranslate.getY()));
- sal_Int32 dwWidth(rTexture.maDesc.nWidth);
- sal_Int32 dwHeight(rTexture.maDesc.nHeight);
-
- // prevent fast copy if destination position is not an
- // integer coordinate. otherwise we would most probably
- // introduce visual glitches while combining this with
- // high-accuracy rendering stuff.
- if( ::basegfx::fTools::equalZero(aTranslate.getX()-dwDstX) &&
- ::basegfx::fTools::equalZero(aTranslate.getY()-dwDstY))
- {
- // clip against destination boundary. shrink size if
- // necessary, modify destination position if we need to.
- if(dwDstX < 0) { dwWidth-=dwDstX; dwSrcX=-dwDstX; dwDstX=0; }
- if(dwDstY < 0) { dwHeight-=dwDstY; dwSrcY=-dwDstY; dwDstY=0; }
- const sal_Int32 dwRight(dwDstX+dwWidth);
- const sal_Int32 dwBottom(dwDstY+dwHeight);
- if(dwRight > dwWidth)
- dwWidth -= dwRight-dwWidth;
- if(dwBottom > dwHeight)
- dwHeight -= dwBottom-dwHeight;
-
- // calculate source buffer
- const Description &srcDesc = rTexture.maDesc;
- const sal_uInt32 dwSrcBytesPerPixel(getBytesPerPixel(srcDesc.eFormat));
- const sal_uInt32 dwSrcPitch(srcDesc.nWidth*dwSrcBytesPerPixel+srcDesc.nStride);
- sal_uInt8 *pSrcBuffer = rTexture.maDesc.pBuffer+(dwSrcPitch*dwSrcX)+(dwSrcBytesPerPixel*dwSrcY);
-
- // calculate destination buffer
- const Description &dstDesc = maDesc;
- const sal_uInt32 dwDstBytesPerPixel(getBytesPerPixel(dstDesc.eFormat));
- const sal_uInt32 dwDstPitch(dstDesc.nWidth*dwDstBytesPerPixel+dstDesc.nStride);
- sal_uInt8 *pDstBuffer = maDesc.pBuffer+(dwDstPitch*dwDstY)+(dwDstBytesPerPixel*dwDstX);
-
- // if source and destination format match, we can simply
- // copy whole scanlines.
- if(srcDesc.eFormat == dstDesc.eFormat)
- {
- const sal_Size dwNumBytesPerScanline(dwSrcBytesPerPixel*dwWidth);
- for(sal_Int32 y=0; y<dwHeight; ++y)
- {
- rtl_copyMemory(pDstBuffer,pSrcBuffer,dwNumBytesPerScanline);
- pSrcBuffer += dwSrcPitch;
- pDstBuffer += dwDstPitch;
- }
- }
- else
- {
- // otherwise [formats do not match], we need to copy
- // each pixel one by one and convert from source to destination format.
- if(srcDesc.eFormat == FMT_A8R8G8B8 && dstDesc.eFormat == FMT_R8G8B8)
- {
- for(sal_Int32 y=0; y<dwHeight; ++y)
- {
- sal_uInt8 *pSrc=pSrcBuffer;
- sal_uInt8 *pDst=pDstBuffer;
- for(sal_Int32 x=0; x<dwWidth; ++x)
- {
- sal_uInt8 r(*pSrc++);
- sal_uInt8 g(*pSrc++);
- sal_uInt8 b(*pSrc++);
- sal_uInt8 Alpha(*pSrc++);
- sal_uInt8 OneMinusAlpha(0xFF-Alpha);
- *pDst=(((r*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
- ++pDst;
- *pDst=(((g*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
- ++pDst;
- *pDst=(((b*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
- ++pDst;
- }
- pSrcBuffer += dwSrcPitch;
- pDstBuffer += dwDstPitch;
- }
- }
- else if(srcDesc.eFormat == FMT_R8G8B8 && dstDesc.eFormat == FMT_A8R8G8B8)
- {
- for(sal_Int32 y=0; y<dwHeight; ++y)
- {
- sal_uInt8 *pSrc=pSrcBuffer;
- sal_uInt8 *pDst=pDstBuffer;
- for(sal_Int32 x=0; x<dwWidth; ++x)
- {
- sal_uInt8 r(*pSrc++);
- sal_uInt8 g(*pSrc++);
- sal_uInt8 b(*pSrc++);
- *pDst++=r;
- *pDst++=g;
- *pDst++=b;
- *pDst++=0xFF;
- }
- pSrcBuffer += dwSrcPitch;
- pDstBuffer += dwDstPitch;
- }
- }
- }
-
- return ImageCachedPrimitiveSharedPtr();
- }
- }
-
- typedef cachedPrimitiveFTPP<pixel_format,span_gen_type> cachedPrimitive_t;
- cachedPrimitive_t *pPrimitive = new cachedPrimitive_t( rOverallTransform,
- rViewTransform,
- maRenderingBuffer,
- rTexture.maRenderingBuffer);
-
- agg::path_storage path;
- agg::conv_curve<agg::path_storage> curve(path);
-
- for(sal_uInt32 nPolygon(0); nPolygon < rPolyPolygon.count(); nPolygon++)
- {
- const basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nPolygon));
- const sal_uInt32 nPointCount(aPolygon.count());
-
- if(nPointCount)
- {
- if(aPolygon.areControlPointsUsed())
- {
- // prepare edge-based loop
- basegfx::B2DPoint aCurrentPoint(aPolygon.getB2DPoint(0));
- const sal_uInt32 nEdgeCount(aPolygon.isClosed() ? nPointCount - 1 : nPointCount);
-
- // first vertex
- path.move_to(aCurrentPoint.getX(), aCurrentPoint.getY());
-
- for(sal_uInt32 a(0); a < nEdgeCount; a++)
- {
- // access next point
- const sal_uInt32 nNextIndex((a + 1) % nPointCount);
- const basegfx::B2DPoint aNextPoint(aPolygon.getB2DPoint(nNextIndex));
-
- // get control points
- const basegfx::B2DPoint aControlNext(aPolygon.getNextControlPoint(a));
- const basegfx::B2DPoint aControlPrev(aPolygon.getPrevControlPoint(nNextIndex));
-
- // specify first cp, second cp, next vertex
- path.curve4(
- aControlNext.getX(), aControlNext.getY(),
- aControlPrev.getX(), aControlPrev.getY(),
- aNextPoint.getX(), aNextPoint.getY());
-
- // prepare next step
- aCurrentPoint = aNextPoint;
- }
- }
- else
- {
- const basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(0));
- pPrimitive->ras.move_to_d(aPoint.getX(), aPoint.getY());
-
- for(sal_uInt32 a(1); a < nPointCount; a++)
- {
- const basegfx::B2DPoint aVertexPoint(aPolygon.getB2DPoint(a));
- pPrimitive->ras.line_to_d(aVertexPoint.getX(), aVertexPoint.getY());
- }
-
- if(aPolygon.isClosed())
- {
- pPrimitive->ras.close_polygon();
- }
- }
- }
- }
-
- pPrimitive->ras.add_path(curve);
- pPrimitive->redraw();
-
- return ImageCachedPrimitiveSharedPtr(pPrimitive);
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillTexturedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygon(
- const Image& rTexture,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::basegfx::B2DHomMatrix& rViewTransform,
- const rendering::Texture& texture )
-{
- typedef agg::wrap_mode_repeat wrap_x_type;
- typedef agg::wrap_mode_repeat wrap_y_type;
- typedef agg::pixfmt_rgb24 pixfmt_rgb24;
- typedef agg::pixfmt_rgba32 pixfmt_rgba32;
-#if AGG_VERSION >= 2400
- typedef agg::image_accessor_wrap< pixfmt_rgba32, wrap_x_type, wrap_y_type > img_source_type_rgba;
- typedef agg::image_accessor_wrap< pixfmt_rgb24, wrap_x_type, wrap_y_type > img_source_type_rgb;
-
- typedef agg::span_image_resample_rgba_affine< img_source_type_rgba > span_gen_type_rgba;
- typedef agg::span_image_resample_rgb_affine< img_source_type_rgb > span_gen_type_rgb;
-#else
- typedef agg::span_pattern_resample_rgba_affine< pixfmt_rgba32::color_type,
- pixfmt_rgba32::order_type,
- wrap_x_type,
- wrap_y_type> span_gen_type_rgba;
- typedef agg::span_pattern_resample_rgb_affine< pixfmt_rgb24::color_type,
- pixfmt_rgb24::order_type,
- wrap_x_type,
- wrap_y_type> span_gen_type_rgb;
-#endif
-
- const Format nDest = maDesc.eFormat;
- const Format nSource = rTexture.maDesc.eFormat;
-
- if(nDest == FMT_R8G8B8 && nSource == FMT_R8G8B8)
- {
- return fillTexturedPolyPolygonImpl< agg::pixfmt_rgb24,
- span_gen_type_rgb >(
- rTexture,
- rPolyPolygon,
- rOverallTransform,
- rViewTransform,
- texture );
- }
- else if(nDest == FMT_R8G8B8 && nSource == FMT_A8R8G8B8)
- {
- return fillTexturedPolyPolygonImpl< agg::pixfmt_rgb24,
- span_gen_type_rgba >(
- rTexture,
- rPolyPolygon,
- rOverallTransform,
- rViewTransform,
- texture );
- }
- else if(nDest == FMT_A8R8G8B8 && nSource == FMT_R8G8B8)
- {
- return fillTexturedPolyPolygonImpl< agg::pixfmt_rgba32,
- span_gen_type_rgb >(
- rTexture,
- rPolyPolygon,
- rOverallTransform,
- rViewTransform,
- texture );
- }
- else if(nDest == FMT_A8R8G8B8 && nSource == FMT_A8R8G8B8)
- {
- return fillTexturedPolyPolygonImpl< agg::pixfmt_rgba32,
- span_gen_type_rgba >(
- rTexture,
- rPolyPolygon,
- rOverallTransform,
- rViewTransform,
- texture );
- }
- else
- {
- OSL_ENSURE(false, "Unexpected pixel format");
- }
-
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillGradient
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class pixel_format>
-void Image::fillGradientImpl( const ParametricPolyPolygon::Values& rValues,
- const uno::Sequence< double >& rUnoColor1,
- const uno::Sequence< double >& rUnoColor2,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const rendering::Texture& )
-{
- const ARGB aColor1(0xFFFFFFFF,
- rUnoColor1);
- const ARGB aColor2(0xFFFFFFFF,
- rUnoColor2);
-
- // first of all we need to provide the framebuffer we want to render to.
- // the properties of the framebuffer are
- // 1) memory & layout [width, height, stride]
- // 2) pixelformat
- // 3) clipping
-
- // Class template pixel_formats_rgb24 has full knowledge about this
- // particular pixel format in memory. The only template parameter
- // can be order_rgb24 or order_bgr24 that determines the order of color channels.
- pixel_format pixf(maRenderingBuffer);
-
- // There are two basic renderers with almost the same functionality:
- // renderer_base and renderer_mclip. The first one is used most often
- // and it performs low level clipping.
- // This simply adds clipping to the graphics buffer, the clip rect
- // will be initialized to the area of the framebuffer.
- typedef agg::renderer_base<pixel_format> renderer_base;
- renderer_base rb(pixf);
-
- // bounding rectangle of untransformed polypolygon
- const ::basegfx::B2DRange& rBounds(::basegfx::tools::getRange(rPolyPolygon));
-
- // the color generator produces a specific color from
- // some given interpolation value.
- // number of steps for color interpolation
- typedef typename pixel_format::color_type color_type;
- color_type color1(agg::rgba8(aColor1.Color.r,
- aColor1.Color.g,
- aColor1.Color.b,
- 255));
- color_type color2(agg::rgba8(aColor2.Color.r,
- aColor2.Color.g,
- aColor2.Color.b,
- 255));
- typedef color_generator_adaptor<color_type> color_generator_type;
- unsigned int dwNumSteps = static_cast<unsigned int>(rBounds.getWidth());
- color_generator_type colors(color1,color2,dwNumSteps);
- colors.set_linear(true);
-
- // color = f(x,y)
- gradient_polymorphic_wrapper<agg::gradient_x> gf_x;
- gradient_polymorphic_wrapper<agg::gradient_radial> gf_radial;
- gradient_polymorphic_wrapper<gradient_rect> gf_rectangular;
- gf_rectangular.m_gradient.width = static_cast<int>(rBounds.getWidth())<<4;
- gf_rectangular.m_gradient.height = static_cast<int>(rBounds.getHeight())<<4;
- const gradient_polymorphic_wrapper_base *gf[] = { &gf_x, // GRADIENT_LINEAR
- &gf_x, // GRADIENT_AXIAL
- &gf_radial, // GRADIENT_ELLIPTICAL
- &gf_rectangular // GRADIENT_RECTANGULAR
- };
-
- // how do texture coordinates change when the pixel coordinate change?
- typedef agg::span_interpolator_linear<> interpolator_type;
- agg::trans_affine tm;
- tm *= agg::trans_affine_scaling(1.0f/rBounds.getWidth(),
- 1.0f/rBounds.getHeight());
- if(rValues.meType == ParametricPolyPolygon::GRADIENT_ELLIPTICAL ||
- rValues.meType == ParametricPolyPolygon::GRADIENT_RECTANGULAR)
- {
- //tm *= trans_affine_scaling(mnAspectRatio,+1.0f);
- //const double fAspect = aBounds.getWidth()/aBounds.getHeight();
- //tm *= trans_affine_scaling(+0.5f,+0.5f*(1.0f/fAspect));
- //tm *= trans_affine_translation(+0.5f,+0.5f);
- tm *= agg::trans_affine_scaling(+0.5f,+0.5f);
- tm *= agg::trans_affine_translation(+0.5f,+0.5f);
- }
- tm *= transAffineFromB2DHomMatrix(rOverallTransform);
- tm.invert();
- interpolator_type inter(tm);
-
- // spanline allocators reserve memory for the color values
- // filled up by the spanline generators.
- typedef agg::span_allocator<color_type> gradient_span_alloc;
- gradient_span_alloc span_alloc;
-
- // scanline generators create the actual color values for
- // some specific coordinate range of a scanline.
- typedef agg::span_gradient<color_type,
- interpolator_type,
- gradient_polymorphic_wrapper_base,
- color_generator_type > gradient_span_gen;
-#if AGG_VERSION >= 2400
- gradient_span_gen span_gen(inter,
- *gf[rValues.meType],
- colors,
- 0,
- dwNumSteps);
-#else
- gradient_span_gen span_gen(span_alloc,
- inter,
- *gf[rValues.meType],
- colors,
- 0,
- dwNumSteps);
-#endif
-
- // To draw Anti-Aliased primitives one shoud *rasterize* them first.
- // The primary rasterization technique in AGG is scanline based.
- // That is, a polygon is converted into a number of horizontal
- // scanlines and then the scanlines are being rendered one by one.
- // To transfer information from a rasterizer to the scanline renderer
- // there scanline containers are used. A scanline consists of a
- // number of horizontal, non-intersecting spans. All spans must be ordered by X.
- // --> packed scanline container
- agg::scanline_p8 sl;
-
- // antialiased scanline renderer with pattern filling capability
- // [in contrast to solid renderers, that is]
- // the instance of this particular renderer combines the
- // renderbuffer [i.e. destination] and the spanline generator [i.e. source]
-#if AGG_VERSION >= 2400
- typedef agg::renderer_scanline_aa<renderer_base, gradient_span_alloc, gradient_span_gen> renderer_gradient;
- renderer_gradient r1(rb, span_alloc, span_gen);
-#else
- typedef agg::renderer_scanline_aa<renderer_base, gradient_span_gen> renderer_gradient;
- renderer_gradient r1(rb, span_gen);
-#endif
-
- // instantiate the rasterizer and feed the incoming polypolygon.
- agg::rasterizer_scanline_aa<> ras;
- agg::path_storage path;
- agg::conv_curve<agg::path_storage> curve(path);
-
- for(sal_uInt32 nPolygon(0); nPolygon < rPolyPolygon.count(); nPolygon++)
- {
- const basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nPolygon));
- const sal_uInt32 nPointCount(aPolygon.count());
-
- if(nPointCount)
- {
- if(aPolygon.areControlPointsUsed())
- {
- // prepare edge-based loop
- basegfx::B2DPoint aCurrentPoint(aPolygon.getB2DPoint(0));
- const sal_uInt32 nEdgeCount(aPolygon.isClosed() ? nPointCount - 1 : nPointCount);
-
- // first vertex
- path.move_to(aCurrentPoint.getX(), aCurrentPoint.getY());
-
- for(sal_uInt32 a(0); a < nEdgeCount; a++)
- {
- // access next point
- const sal_uInt32 nNextIndex((a + 1) % nPointCount);
- const basegfx::B2DPoint aNextPoint(aPolygon.getB2DPoint(nNextIndex));
-
- // get control points
- const basegfx::B2DPoint aControlNext(aPolygon.getNextControlPoint(a));
- const basegfx::B2DPoint aControlPrev(aPolygon.getPrevControlPoint(nNextIndex));
-
- // specify first cp, second cp, next vertex
- path.curve4(
- aControlNext.getX(), aControlNext.getY(),
- aControlPrev.getX(), aControlPrev.getY(),
- aNextPoint.getX(), aNextPoint.getY());
-
- // prepare next step
- aCurrentPoint = aNextPoint;
- }
- }
- else
- {
- const basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(0));
- ras.move_to_d(aPoint.getX(), aPoint.getY());
-
- for(sal_uInt32 a(1); a < nPointCount; a++)
- {
- const basegfx::B2DPoint aVertexPoint(aPolygon.getB2DPoint(a));
- ras.line_to_d(aVertexPoint.getX(), aVertexPoint.getY());
- }
-
- if(aPolygon.isClosed())
- {
- ras.close_polygon();
- }
- }
- }
- }
-
- // everything is up and running, go...
- ras.add_path(curve);
- render_scanlines(ras,sl,r1);
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillGradient
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::fillGradient( const ParametricPolyPolygon::Values& rValues,
- const uno::Sequence< double >& rUnoColor1,
- const uno::Sequence< double >& rUnoColor2,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const rendering::Texture& texture )
-{
- switch(maDesc.eFormat)
- {
- case FMT_R8G8B8:
- fillGradientImpl<agg::pixfmt_rgb24>(rValues,rUnoColor1,rUnoColor2,rPolyPolygon,rOverallTransform,texture);
- break;
- case FMT_A8R8G8B8:
- fillGradientImpl<agg::pixfmt_rgba32>(rValues,rUnoColor1,rUnoColor2,rPolyPolygon,rOverallTransform,texture);
- break;
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fromVCLBitmap
-//////////////////////////////////////////////////////////////////////////////////
-
-bool Image::fromVCLBitmap( ::BitmapEx& rBmpEx )
-{
- const ::Size aBmpSize( rBmpEx.GetSizePixel() );
- Image::Description desc;
- desc.eFormat = rBmpEx.IsTransparent() ? FMT_A8R8G8B8 : FMT_R8G8B8;
- desc.nWidth = aBmpSize.Width();
- desc.nHeight = aBmpSize.Height();
- desc.nStride = 0;
- const sal_uInt32 nPitch(desc.nWidth*getBytesPerPixel(desc.eFormat)+desc.nStride);
- desc.pBuffer = new sal_uInt8 [nPitch*desc.nHeight];
- maDesc = desc;
- mbBufferHasUserOwnership = false;
- maRenderingBuffer.attach(static_cast<agg::int8u *>(desc.pBuffer),
- desc.nWidth,
- desc.nHeight,
- nPitch);
- RawABGRBitmap aBmpData;
- aBmpData.mnWidth = aBmpSize.Width();
- aBmpData.mnHeight = aBmpSize.Height();
- aBmpData.mpBitmapData = static_cast<sal_uInt8 *>(desc.pBuffer);
- vclBitmapEx2Raw(rBmpEx,aBmpData);
-
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::Image
-//////////////////////////////////////////////////////////////////////////////////
-
-Image::Image( const Description& rDesc ) :
- maDesc( rDesc ),
- maRenderingBuffer(),
- mbBufferHasUserOwnership( rDesc.pBuffer != NULL )
-{
-#if defined(PROFILER)
- for(int i=0; i<TIMER_MAX; ++i)
- maElapsedTime[i]=0.0;
-#endif
-
- // allocate own buffer memory, if not provided
- sal_uInt8* pBuffer = maDesc.pBuffer;
- const sal_uInt32 nWidth(maDesc.nWidth);
- const sal_uInt32 nHeight(maDesc.nHeight);
- const sal_uInt32 nStride(maDesc.nStride);
- const sal_uInt32 nPitch(nWidth*getBytesPerPixel(maDesc.eFormat)
- + nStride);
-
- if( !pBuffer )
- pBuffer = new sal_uInt8 [nPitch*nHeight];
-
- maDesc.pBuffer = pBuffer;
-
- // attach graphics buffer
- maRenderingBuffer.attach(
- static_cast<agg::int8u *>(pBuffer),
- nWidth,
- nHeight,
- nPitch );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::Image
-//////////////////////////////////////////////////////////////////////////////////
-
-Image::Image( const uno::Reference< rendering::XBitmap >& xBitmap ) :
- maDesc(),
- maRenderingBuffer(),
- mbBufferHasUserOwnership( false )
-{
-#if defined(PROFILER)
- for(int i=0; i<TIMER_MAX; ++i)
- maElapsedTime[i]=0.0;
-#endif
-
- // TODO(F1): Add support for floating point bitmap formats
- uno::Reference<rendering::XIntegerReadOnlyBitmap> xIntBmp(xBitmap,
- uno::UNO_QUERY_THROW);
- ::BitmapEx aBmpEx = ::vcl::unotools::bitmapExFromXBitmap(xIntBmp);
- if( !!aBmpEx )
- fromVCLBitmap(aBmpEx);
-
- // TODO(F2): Fallback to XIntegerBitmap interface for import
- OSL_ENSURE(false,
- "Image::Image(): Cannot retrieve bitmap data!" );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::~Image
-//////////////////////////////////////////////////////////////////////////////////
-
-Image::~Image()
-{
-#if defined(PROFILER)
-
- double aAccumulatedTime(0.0);
- for(int i=0; i<TIMER_MAX; ++i)
- aAccumulatedTime += maElapsedTime[i];
-
- OSL_TRACE("Image %d - %d %d %d %d %d\n",(int)(aAccumulatedTime*1000.0),
- (int)(maElapsedTime[TIMER_FILLTEXTUREDPOLYPOLYGON]*1000.0),
- (int)(maElapsedTime[TIMER_FILLB2DPOLYPOLYGON]*1000.0),
- (int)(maElapsedTime[TIMER_DRAWPOLYPOLYGON]*1000.0),
- (int)(maElapsedTime[TIMER_FILLPOLYPOLYGON]*1000.0),
- (int)(maElapsedTime[TIMER_DRAWBITMAP]*1000.0));
-
-#endif
-
- if( !mbBufferHasUserOwnership )
- delete [] maDesc.pBuffer;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::clear
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class pixel_format>
-void Image::clearImpl( sal_uInt8 a,
- sal_uInt8 r,
- sal_uInt8 g,
- sal_uInt8 b )
-{
- pixel_format pixf(maRenderingBuffer);
- agg::renderer_base<pixel_format> renb(pixf);
-
- renb.clear(agg::rgba8(r,g,b,a));
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::clear
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::clear( sal_uInt8 a,
- sal_uInt8 r,
- sal_uInt8 g,
- sal_uInt8 b )
-{
- switch(maDesc.eFormat)
- {
- case FMT_R8G8B8:
- return clearImpl<agg::pixfmt_rgb24>(a,r,g,b);
- case FMT_A8R8G8B8:
- return clearImpl<agg::pixfmt_rgba32>(a,r,g,b);
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillB2DPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::fillB2DPolyPolygon(
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_FILLB2DPOLYPOLYGON,this);
-#endif
-
- switch(maDesc.eFormat)
- {
- case FMT_R8G8B8:
- fillPolyPolygonImpl<agg::pixfmt_rgb24>(rPolyPolygon,viewState,renderState);
- break;
- case FMT_A8R8G8B8:
- fillPolyPolygonImpl<agg::pixfmt_rgba32>(rPolyPolygon,viewState,renderState);
- break;
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- break;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::lock
-//////////////////////////////////////////////////////////////////////////////////
-
-sal_uInt8* Image::lock() const
-{
- return maDesc.pBuffer;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::unlock
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::unlock() const
-{
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::getWidth
-//////////////////////////////////////////////////////////////////////////////////
-
-sal_uInt32 Image::getWidth() const
-{
- return maDesc.nWidth;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::getHeight
-//////////////////////////////////////////////////////////////////////////////////
-
-sal_uInt32 Image::getHeight() const
-{
- return maDesc.nHeight;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::getStride
-//////////////////////////////////////////////////////////////////////////////////
-
-sal_uInt32 Image::getStride() const
-{
- return maDesc.nWidth*getBytesPerPixel(maDesc.eFormat)+maDesc.nStride;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::getFormat
-//////////////////////////////////////////////////////////////////////////////////
-
-IColorBuffer::Format Image::getFormat() const
-{
- return maDesc.eFormat;
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawPoint
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::drawPoint( const geometry::RealPoint2D& /*aPoint*/,
- const rendering::ViewState& /*viewState*/,
- const rendering::RenderState& /*renderState*/ )
-{
- OSL_ENSURE(false,
- "Image::drawPoint(): NYI" );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawLine
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::drawLine( const geometry::RealPoint2D& aStartPoint,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- ::basegfx::B2DPolygon aLinePoly;
- aLinePoly.append(
- ::basegfx::unotools::b2DPointFromRealPoint2D( aStartPoint ) );
- aLinePoly.append(
- ::basegfx::unotools::b2DPointFromRealPoint2D( aEndPoint ) );
-
- drawLinePolyPolygon( ::basegfx::B2DPolyPolygon( aLinePoly ),
- 1.0,
- viewState,
- renderState );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawBezier
-//////////////////////////////////////////////////////////////////////////////////
-
-void Image::drawBezier( const geometry::RealBezierSegment2D& aBezierSegment,
- const geometry::RealPoint2D& aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- basegfx::B2DPolygon aBezierPoly;
-
- aBezierPoly.append(basegfx::B2DPoint(aBezierSegment.Px, aBezierSegment.Py));
- aBezierPoly.appendBezierSegment(
- basegfx::B2DPoint(aBezierSegment.C1x, aBezierSegment.C1y),
- basegfx::B2DPoint(aBezierSegment.C2x, aBezierSegment.C2y),
- basegfx::unotools::b2DPointFromRealPoint2D(aEndPoint));
-
- drawLinePolyPolygon( ::basegfx::B2DPolyPolygon( aBezierPoly ),
- 1.0,
- viewState,
- renderState );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::drawPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_DRAWPOLYPOLYGON,this);
-#endif
-
- if( !xPolyPolygon.is() )
- return ImageCachedPrimitiveSharedPtr();
-
- drawLinePolyPolygon( ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPolyPolygon ),
- 1.0,
- viewState,
- renderState );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::strokePolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::strokePolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const rendering::StrokeAttributes& strokeAttributes )
-{
- if( !xPolyPolygon.is() )
- return ImageCachedPrimitiveSharedPtr();
-
- drawLinePolyPolygon( ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPolyPolygon ),
- strokeAttributes.StrokeWidth,
- viewState,
- renderState );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::strokeTexturedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::strokeTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
- const rendering::ViewState& /*viewState*/,
- const rendering::RenderState& /*renderState*/,
- const uno::Sequence< rendering::Texture >& /*textures*/,
- const ::std::vector< ::boost::shared_ptr<Image> >& /*textureAnnotations*/,
- const rendering::StrokeAttributes& /*strokeAttributes*/ )
-{
- OSL_ENSURE(false,
- "Image::strokeTexturedPolyPolygon(): NYI" );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::strokeTextureMappedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::strokeTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
- const rendering::ViewState& /*viewState*/,
- const rendering::RenderState& /*renderState*/,
- const uno::Sequence< rendering::Texture >& /*textures*/,
- const ::std::vector< ::boost::shared_ptr<Image> >& /*textureAnnotations*/,
- const uno::Reference< geometry::XMapping2D >& /*xMapping*/,
- const rendering::StrokeAttributes& /*strokeAttributes*/ )
-{
- OSL_ENSURE(false,
- "Image::strokeTextureMappedPolyPolygon(): NYI" );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class pixel_format>
-ImageCachedPrimitiveSharedPtr Image::fillPolyPolygonImpl(
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_FILLPOLYPOLYGON,this);
-#endif
-
- ARGB aFillColor;
-
- ::basegfx::B2DPolyPolygon aPolyPolygon(rPolyPolygon);
- setupPolyPolygon( aPolyPolygon, true, aFillColor, viewState, renderState );
-
- if( !aPolyPolygon.count() )
- return ImageCachedPrimitiveSharedPtr();
-
- pixel_format pixf(maRenderingBuffer);
- agg::renderer_base<pixel_format> renb(pixf);
-
- // Scanline renderer for solid filling.
- agg::renderer_scanline_aa_solid<agg::renderer_base<pixel_format> > ren(renb);
-
- // Rasterizer & scanline
- agg::rasterizer_scanline_aa<> ras;
- agg::scanline_p8 sl;
-
- agg::path_storage path;
- agg::conv_curve<agg::path_storage> curve(path);
-
- for(sal_uInt32 nPolygon(0); nPolygon < aPolyPolygon.count(); nPolygon++)
- {
- const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(nPolygon));
- const sal_uInt32 nPointCount(aPolygon.count());
-
- if(nPointCount)
- {
- if(aPolygon.areControlPointsUsed())
- {
- // prepare edge-based loop
- basegfx::B2DPoint aCurrentPoint(aPolygon.getB2DPoint(0));
- const sal_uInt32 nEdgeCount(aPolygon.isClosed() ? nPointCount - 1 : nPointCount);
-
- // first vertex
- path.move_to(aCurrentPoint.getX(), aCurrentPoint.getY());
-
- for(sal_uInt32 a(0); a < nEdgeCount; a++)
- {
- // access next point
- const sal_uInt32 nNextIndex((a + 1) % nPointCount);
- const basegfx::B2DPoint aNextPoint(aPolygon.getB2DPoint(nNextIndex));
-
- // get control points
- const basegfx::B2DPoint aControlNext(aPolygon.getNextControlPoint(a));
- const basegfx::B2DPoint aControlPrev(aPolygon.getPrevControlPoint(nNextIndex));
-
- // specify first cp, second cp, next vertex
- path.curve4(
- aControlNext.getX(), aControlNext.getY(),
- aControlPrev.getX(), aControlPrev.getY(),
- aNextPoint.getX(), aNextPoint.getY());
-
- // prepare next step
- aCurrentPoint = aNextPoint;
- }
- }
- else
- {
- const basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(0));
- ras.move_to_d(aPoint.getX(), aPoint.getY());
-
- for(sal_uInt32 a(1); a < nPointCount; a++)
- {
- const basegfx::B2DPoint aVertexPoint(aPolygon.getB2DPoint(a));
- ras.line_to_d(aVertexPoint.getX(), aVertexPoint.getY());
- }
-
- if(aPolygon.isClosed())
- {
- ras.close_polygon();
- }
- }
- }
- }
-
- ras.add_path(curve);
- agg::rgba8 fillcolor(aFillColor.Color.r,aFillColor.Color.g,aFillColor.Color.b,aFillColor.Color.a);
- ren.color(fillcolor);
- agg::render_scanlines(ras, sl, ren);
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::fillPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- if( !xPolyPolygon.is() )
- return ImageCachedPrimitiveSharedPtr();
-
- ::basegfx::B2DPolyPolygon aPoly(
- ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPolyPolygon ) );
-
- switch(maDesc.eFormat)
- {
- case FMT_R8G8B8:
- return fillPolyPolygonImpl<agg::pixfmt_rgb24>(aPoly,viewState,renderState);
- case FMT_A8R8G8B8:
- return fillPolyPolygonImpl<agg::pixfmt_rgba32>(aPoly,viewState,renderState);
- default:
- OSL_ENSURE(false, "Unexpected pixel format");
- break;
- }
-
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillTexturedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Image> >& textureAnnotations )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_FILLTEXTUREDPOLYPOLYGON,this);
-#endif
-
- if( !xPolyPolygon.is() )
- return ImageCachedPrimitiveSharedPtr();
-
- ::basegfx::B2DPolyPolygon aPoly(
- ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPolyPolygon ) );
- ARGB aFillColor;
-
- setupPolyPolygon( aPoly, true, aFillColor, viewState, renderState );
-
- if( !aPoly.count() )
- return ImageCachedPrimitiveSharedPtr();
-
- ::basegfx::B2DHomMatrix aViewTransform;
- ::basegfx::B2DHomMatrix aRenderTransform;
- ::basegfx::B2DHomMatrix aTextureTransform;
-
- ::basegfx::unotools::homMatrixFromAffineMatrix(aTextureTransform,
- textures[0].AffineTransform);
- ::basegfx::unotools::homMatrixFromAffineMatrix(aRenderTransform,
- renderState.AffineTransform);
- ::basegfx::unotools::homMatrixFromAffineMatrix(aViewTransform,
- viewState.AffineTransform);
- aTextureTransform *= aRenderTransform;
-
- // TODO(F1): Multi-texturing
- if( textures[0].Gradient.is() )
- {
- aTextureTransform *= aViewTransform;
-
- // try to cast XParametricPolyPolygon2D reference to
- // our implementation class.
- ::canvas::ParametricPolyPolygon* pGradient =
- dynamic_cast< ::canvas::ParametricPolyPolygon* >( textures[0].Gradient.get() );
-
- if( pGradient )
- {
- const ParametricPolyPolygon::Values& rValues(
- pGradient->getValues() );
-
- // TODO: use all the colors and place them on given positions/stops
- // TODO(E1): Return value
- // TODO(F1): FillRule
- fillGradient( rValues,
- rValues.maColors [0],
- rValues.maColors [rValues.maColors.getLength () - 1],
- aPoly,
- aTextureTransform,
- textures[0] );
- }
- }
- else if( textures[0].Bitmap.is() )
- {
- ImageSharedPtr pTexture;
-
- if( textureAnnotations[0].get() != NULL )
- pTexture = textureAnnotations[0];
- else
- pTexture.reset( new Image( textures[0].Bitmap ) );
-
- const sal_uInt32 nWidth(pTexture->maDesc.nWidth);
- const sal_uInt32 nHeight(pTexture->maDesc.nHeight);
-
- // scale texture into one-by-one unit rect.
- aTextureTransform.scale(1.0f/nWidth,
- 1.0f/nHeight);
-
- // TODO(E1): Return value
- // TODO(F1): FillRule
- return fillTexturedPolyPolygon( *pTexture,
- aPoly,
- aTextureTransform,
- aViewTransform,
- textures[0] );
- }
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::fillTextureMappedPolyPolygon
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::fillTextureMappedPolyPolygon(
- const uno::Reference< rendering::XPolyPolygon2D >& /*xPolyPolygon*/,
- const rendering::ViewState& /*viewState*/,
- const rendering::RenderState& /*renderState*/,
- const uno::Sequence< rendering::Texture >& /*textures*/,
- const ::std::vector< ::boost::shared_ptr<Image> >& /*textureAnnotations*/,
- const uno::Reference< geometry::XMapping2D >& /*xMapping*/ )
-{
- OSL_ENSURE(false,
- "Image::fillTextureMappedPolyPolygon(): NYI" );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawBitmap
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::drawBitmap(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_DRAWBITMAP,this);
-#endif
-
- // TODO(P3): Implement bitmap caching
- if( !xBitmap.is() )
- return ImageCachedPrimitiveSharedPtr();
-/*
- XBitmapAccessor accessor( xBitmap );
- if(accessor.isValid())
- {
- Image aImage( accessor.getDesc() );
-
- implDrawBitmap( aImage,
- viewState,
- renderState );
-
- // TODO(F2): Implement sensible ImageCachedPrimitive
- return ImageCachedPrimitiveSharedPtr();
- }
-*/
- Image aImage( xBitmap );
-
- return implDrawBitmap( aImage,viewState,renderState );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawBitmap
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::drawBitmap(
- const ImageSharedPtr& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
-#if defined(PROFILER)
- ScopeTimer aTimer(TIMER_DRAWBITMAP,this);
-#endif
-
- // TODO(P3): Implement bitmap caching
- if( !rImage )
- return ImageCachedPrimitiveSharedPtr();
-
- return implDrawBitmap( *rImage,
- viewState,
- renderState );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawBitmapModulated
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::drawBitmapModulated(
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- // TODO(P3): Implement bitmap caching
- if( !xBitmap.is() )
- return ImageCachedPrimitiveSharedPtr();
-
- Image aImage( xBitmap );
-
- // TODO(F2): Distinguish modulated and unmodulated bitmap output
- return implDrawBitmap( aImage,viewState,renderState );
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-// Image::drawBitmapModulated
-//////////////////////////////////////////////////////////////////////////////////
-
-ImageCachedPrimitiveSharedPtr Image::drawBitmapModulated(
- const ImageSharedPtr& rImage,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
-{
- // TODO(P3): Implement bitmap caching
- if( !rImage )
- return ImageCachedPrimitiveSharedPtr();
-
- // TODO(F2): Distinguish modulated and unmodulated bitmap output
- return implDrawBitmap( *rImage,viewState,renderState );
-}
-
-}
diff --git a/canvas/source/tools/image.hxx b/canvas/source/tools/image.hxx
deleted file mode 100644
index 1c62c7d6276b..000000000000
--- a/canvas/source/tools/image.hxx
+++ /dev/null
@@ -1,298 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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).
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_CANVAS_IMAGE_HXX
-#define INCLUDED_CANVAS_IMAGE_HXX
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/rendering/XCanvas.hpp>
-#include <canvas/rendering/icolorbuffer.hxx>
-#include <canvas/parametricpolypolygon.hxx>
-#include "imagecachedprimitive.hxx"
-
-#include <canvas/elapsedtime.hxx>
-
-#include "image_sysprereq.h"
-
-struct BitmapSystemData;
-class BitmapEx;
-
-namespace canvas
-{
- class Image : public IColorBuffer
- {
- public:
- /// The description of the image
- struct Description
- {
- IColorBuffer::Format eFormat;
- sal_uInt32 nWidth;
- sal_uInt32 nHeight;
- sal_uInt32 nStride;
- sal_uInt8* pBuffer;
- };
-
- /** Create a new image with the attributes passed as argument.
- */
- explicit Image( const Description& desc );
-
- /** Create a new image from the XBitmap passed as argument
- */
- explicit Image( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap );
-
-
- virtual ~Image();
-
- /** Retrieve desciption of image layout
- */
- const Description& getDescription() const { return maDesc; }
-
- /** Clear image with uniform color
- */
- void clear( sal_uInt8 a,
- sal_uInt8 r,
- sal_uInt8 g,
- sal_uInt8 b );
-
- void fillB2DPolyPolygon(
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
-
- // IColorBuffer interface implementation
- // =====================================
-
- virtual sal_uInt8* lock() const;
- virtual void unlock() const;
- virtual sal_uInt32 getWidth() const;
- virtual sal_uInt32 getHeight() const;
- virtual sal_uInt32 getStride() const;
- virtual Format getFormat() const;
-
-
- // High-level drawing operations (from the XCanvas interface)
- // ==========================================================
-
- void drawPoint( const ::com::sun::star::geometry::RealPoint2D& aPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- void drawLine( const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
- const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- void drawBezier( const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
- const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ImageCachedPrimitiveSharedPtr drawPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- ImageCachedPrimitiveSharedPtr strokePolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ImageCachedPrimitiveSharedPtr strokeTexturedPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Image> >& textureAnnotations,
- const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ImageCachedPrimitiveSharedPtr strokeTextureMappedPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Image> >& textureAnnotations,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::geometry::XMapping2D >& xMapping,
- const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ImageCachedPrimitiveSharedPtr fillPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ImageCachedPrimitiveSharedPtr fillTexturedPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Image> >& textureAnnotations );
- ImageCachedPrimitiveSharedPtr fillTextureMappedPolyPolygon(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::std::vector< ::boost::shared_ptr<Image> >& textureAnnotations,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::geometry::XMapping2D >& xMapping );
-
- ImageCachedPrimitiveSharedPtr drawBitmap(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ImageCachedPrimitiveSharedPtr drawBitmap(
- const ::boost::shared_ptr<Image>& rImage,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- ImageCachedPrimitiveSharedPtr drawBitmapModulated(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ImageCachedPrimitiveSharedPtr drawBitmapModulated(
- const ::boost::shared_ptr<Image>& rImage,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- private:
- void drawLinePolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
- double fStrokeWidth,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- ImageCachedPrimitiveSharedPtr implDrawBitmap(
- const Image& rBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- ImageCachedPrimitiveSharedPtr fillTexturedPolyPolygon(
- const Image& rTexture,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::basegfx::B2DHomMatrix& rViewTransform,
- const ::com::sun::star::rendering::Texture& texture );
-
- void fillGradient( const ParametricPolyPolygon::Values& rValues,
- const ::com::sun::star::uno::Sequence< double >& rColor1,
- const ::com::sun::star::uno::Sequence< double >& rColor2,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::com::sun::star::rendering::Texture& texture );
- bool fromVCLBitmap( ::BitmapEx& rBmpEx );
-
- template<class pixel_format>
- void drawLinePolyPolygonImpl( const ::basegfx::B2DPolyPolygon& rPoly,
- double fStrokeWidth,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- template<class pixel_format,class span_gen_type>
- ImageCachedPrimitiveSharedPtr fillTexturedPolyPolygonImpl(
- const Image& rTexture,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::basegfx::B2DHomMatrix& rViewTransform,
- const ::com::sun::star::rendering::Texture& texture );
-
- template<class pixel_format>
- void fillGradientImpl( const ParametricPolyPolygon::Values& rValues,
- const ::com::sun::star::uno::Sequence< double >& rUnoColor1,
- const ::com::sun::star::uno::Sequence< double >& rUnoColor2,
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::basegfx::B2DHomMatrix& rOverallTransform,
- const ::com::sun::star::rendering::Texture& texture );
-
- template<class pixel_format>
- ImageCachedPrimitiveSharedPtr fillPolyPolygonImpl(
- const ::basegfx::B2DPolyPolygon& rPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- template<class pixel_format> void clearImpl( sal_uInt8 a,
- sal_uInt8 r,
- sal_uInt8 g,
- sal_uInt8 b );
-
- /** Image description
- */
- Description maDesc;
-
- /** the graphics buffer is a simple array
- where each element points to the start
- of a scanline in consecutive order.
- */
- agg::rendering_buffer maRenderingBuffer;
-
- /// Whether maRenderingBuffer is owned by the client of this object
- bool mbBufferHasUserOwnership;
-
-#if defined(PROFILER)
-
- enum constant
- {
- TIMER_FILLTEXTUREDPOLYPOLYGON,
- TIMER_FILLB2DPOLYPOLYGON,
- TIMER_DRAWPOLYPOLYGON,
- TIMER_FILLPOLYPOLYGON,
- TIMER_DRAWBITMAP,
- TIMER_MAX
- };
-
- double maElapsedTime[TIMER_MAX];
-
- struct ScopeTimer
- {
- ScopeTimer( constant aConstant, Image *pImage ) :
- maConstant(aConstant),mpImage(pImage)
- {}
-
- ~ScopeTimer()
- {
- mpImage->maElapsedTime[maConstant] += maTimer.getElapsedTime();
- }
-
- constant maConstant;
- Image* mpImage;
- ::canvas::tools::ElapsedTime maTimer;
- };
-
-#endif
- };
-
- typedef ::boost::shared_ptr< Image > ImageSharedPtr;
-
-}
-
-#endif /* INCLUDED_CANVAS_IMAGE_HXX */
diff --git a/canvas/source/tools/image_sysprereq.h b/canvas/source/tools/image_sysprereq.h
deleted file mode 100644
index ad81259c75c7..000000000000
--- a/canvas/source/tools/image_sysprereq.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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).
- *
- * 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.
- *
- ************************************************************************/
-
-#if defined __GNUC__
-#pragma GCC system_header
-#elif defined __SUNPRO_CC
-#pragma disable_warn
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-
-#include <agg2/agg_rendering_buffer.h>
-
-#ifdef CANVAS_IMAGE_CXX
-
-//////////////////////////////////////////////////////////////////////////////////
-// includes from antigrain [i would love to write this stuff by myself]
-//////////////////////////////////////////////////////////////////////////////////
-
-#include <agg2/agg_rendering_buffer.h>
-#include <agg2/agg_pixfmt_rgb.h>
-#include <agg2/agg_pixfmt_rgba.h>
-#include <agg2/agg_renderer_base.h>
-#include <agg2/agg_color_rgba.h>
-#include <agg2/agg_rasterizer_outline_aa.h>
-#include <agg2/agg_rasterizer_scanline_aa.h>
-#include <agg2/agg_scanline_p.h>
-#include <agg2/agg_scanline_u.h>
-#include <agg2/agg_renderer_scanline.h>
-#include <agg2/agg_renderer_outline_aa.h>
-#include <agg2/agg_renderer_primitives.h>
-#include <agg2/agg_path_storage.h>
-#if AGG_VERSION == 2300
-#include <agg2/agg_span_pattern.h>
-#endif
-#include <agg2/agg_span_pattern_rgba.h>
-#if AGG_VERSION >= 2400
-#include <agg2/agg_span_image_filter_rgb.h>
-#include <agg2/agg_span_image_filter_rgba.h>
-#else
-#include <agg2/agg_span_pattern_resample_rgb.h>
-#include <agg2/agg_span_pattern_resample_rgba.h>
-#endif
-#include <agg2/agg_span_interpolator_linear.h>
-#include <agg2/agg_span_gradient.h>
-#if AGG_VERSION == 2300
-#include <agg2/agg_span_image_resample_rgb.h>
-#include <agg2/agg_span_image_resample_rgba.h>
-#endif
-#if AGG_VERSION >= 2400
-#include <agg2/agg_span_allocator.h>
-#endif
-#include <agg2/agg_image_filters.h>
-#if AGG_VERSION >= 2400
-#include <agg2/agg_image_accessors.h>
-#endif
-#include <agg2/agg_dda_line.h>
-#include <agg2/agg_scanline_storage_aa.h>
-#include <agg2/agg_scanline_storage_bin.h>
-#include <agg2/agg_scanline_bin.h>
-#include <agg2/agg_path_storage_integer.h>
-#include <agg2/agg_conv_contour.h>
-#include <agg2/agg_conv_curve.h>
-#include <agg2/agg_conv_stroke.h>
-#include <agg2/agg_conv_transform.h>
-#include <agg2/agg_trans_affine.h>
-#include <agg2/agg_font_cache_manager.h>
-#include <agg2/agg_bitset_iterator.h>
-#include <agg2/agg_path_storage.h>
-
-#endif // CANVAS_IMAGE_CXX
-
-#if defined __SUNPRO_CC
-#pragma enable_warn
-#elif defined _MSC_VER
-#pragma warning(pop)
-#endif
-
diff --git a/canvas/source/tools/imagecachedprimitive.hxx b/canvas/source/tools/imagecachedprimitive.hxx
index dfcf2bc6a831..59cf43ac4ee5 100644
--- a/canvas/source/tools/imagecachedprimitive.hxx
+++ b/canvas/source/tools/imagecachedprimitive.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ namespace canvas
}
#endif /* INCLUDED_CANVAS_IMAGECACHEDPRIMITIVE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/page.cxx b/canvas/source/tools/page.cxx
index 5035c0e81916..831233dc4cab 100644
--- a/canvas/source/tools/page.cxx
+++ b/canvas/source/tools/page.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -150,3 +151,5 @@ namespace canvas
return true;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/page.hxx b/canvas/source/tools/page.hxx
index 51b770ad4ade..8c92bec141bf 100644
--- a/canvas/source/tools/page.hxx
+++ b/canvas/source/tools/page.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,3 +156,5 @@ namespace canvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/pagemanager.cxx b/canvas/source/tools/pagemanager.cxx
index b2a71bf86cd3..733c3fd21877 100644
--- a/canvas/source/tools/pagemanager.cxx
+++ b/canvas/source/tools/pagemanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -220,3 +221,5 @@ namespace canvas
return mpRenderModule;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/pagemanager.hxx b/canvas/source/tools/pagemanager.hxx
index bf20b1d61e43..1ca7f6e9c199 100644
--- a/canvas/source/tools/pagemanager.hxx
+++ b/canvas/source/tools/pagemanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ namespace canvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index 368f04a572e3..41b0fe29e11d 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,9 +54,9 @@ namespace canvas
uno::Sequence<rtl::OUString> ParametricPolyPolygon::getAvailableServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
- aRet[0] = rtl::OUString::createFromAscii("LinearGradient");
- aRet[1] = rtl::OUString::createFromAscii("EllipticalGradient");
- aRet[2] = rtl::OUString::createFromAscii("RectangularGradient");
+ aRet[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LinearGradient" ));
+ aRet[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EllipticalGradient" ));
+ aRet[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RectangularGradient" ));
return aRet;
}
@@ -84,46 +85,46 @@ namespace canvas
beans::PropertyValue aProp;
if( (rArgs[i] >>= aProp) )
{
- if( aProp.Name.equalsAscii("Colors") )
+ if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Colors")) )
{
aProp.Value >>= colorSequence;
}
- else if( aProp.Name.equalsAscii("Stops") )
+ else if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Stops")) )
{
aProp.Value >>= colorStops;
}
- else if( aProp.Name.equalsAscii("AspectRatio") )
+ else if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AspectRatio")) )
{
aProp.Value >>= fAspectRatio;
}
}
}
- if( rServiceName.equalsAscii("LinearGradient") )
+ if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LinearGradient")) )
{
return createLinearHorizontalGradient(rDevice, colorSequence, colorStops);
}
- else if( rServiceName.equalsAscii("EllipticalGradient") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EllipticalGradient")) )
{
return createEllipticalGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if( rServiceName.equalsAscii("RectangularGradient") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("RectangularGradient")) )
{
return createRectangularGradient(rDevice, colorSequence, colorStops, fAspectRatio);
}
- else if( rServiceName.equalsAscii("VerticalLineHatch") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("VerticalLineHatch")) )
{
// TODO: NYI
}
- else if( rServiceName.equalsAscii("OrthogonalLinesHatch") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OrthogonalLinesHatch")) )
{
// TODO: NYI
}
- else if( rServiceName.equalsAscii("ThreeCrossingLinesHatch") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ThreeCrossingLinesHatch")) )
{
// TODO: NYI
}
- else if( rServiceName.equalsAscii("FourCrossingLinesHatch") )
+ else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FourCrossingLinesHatch")) )
{
// TODO: NYI
}
@@ -288,3 +289,5 @@ namespace canvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/prioritybooster.cxx b/canvas/source/tools/prioritybooster.cxx
index 984003ebc984..d9a7e5593e95 100644
--- a/canvas/source/tools/prioritybooster.cxx
+++ b/canvas/source/tools/prioritybooster.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,11 +64,10 @@ namespace canvas
if ( 0 == SetThreadPriority( aCurrThread, mpImpl->mnOldPriority + nDelta ) )
{
- OSL_ENSURE( false,
- "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
+ OSL_FAIL( "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
}
#else
- nDelta = 0; // #i55991# placate gcc warning
+ (void)nDelta;
#endif
}
@@ -81,3 +81,5 @@ namespace canvas
} // namespace tools
} // namespace canvas
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/propertysethelper.cxx b/canvas/source/tools/propertysethelper.cxx
index c95eae045ee5..127048261ae9 100644
--- a/canvas/source/tools/propertysethelper.cxx
+++ b/canvas/source/tools/propertysethelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,9 @@ namespace canvas
void throwUnknown( const ::rtl::OUString& aPropertyName )
{
throw beans::UnknownPropertyException(
- ::rtl::OUString::createFromAscii("PropertySetHelper: property ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) +
aPropertyName +
- ::rtl::OUString::createFromAscii(" not found."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not found." )),
uno::Reference< uno::XInterface >()
);
}
@@ -49,9 +50,9 @@ namespace canvas
void throwVeto( const ::rtl::OUString& aPropertyName )
{
throw beans::PropertyVetoException(
- ::rtl::OUString::createFromAscii("PropertySetHelper: property ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) +
aPropertyName +
- ::rtl::OUString::createFromAscii(" access was vetoed."),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " access was vetoed." )),
uno::Reference< uno::XInterface >() );
}
@@ -185,3 +186,5 @@ namespace canvas
// ignore request, no listener added in the first place
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index 7027a9d263df..32faba6eaec4 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@
#include <basegfx/range/rangeexpander.hxx>
#include <algorithm>
-#include <functional>
+#include <o3tl/compat_functional.hxx>
#include <boost/bind.hpp>
@@ -425,7 +426,7 @@ namespace canvas
aEnd,
::boost::bind( ::basegfx::B2DRangeExpander(aTrueArea),
::boost::bind( &SpriteInfo::getUpdateArea,
- ::boost::bind( ::std::select2nd<AreaComponent>(),
+ ::boost::bind( ::o3tl::select2nd<AreaComponent>(),
_1 ) ) ) );
// and check whether _any_ of the sprites tells that its area
@@ -451,7 +452,7 @@ namespace canvas
aEnd,
::boost::bind( &SpriteInfo::needsUpdate,
::boost::bind(
- ::std::select2nd<SpriteConnectedRanges::ComponentType>(),
+ ::o3tl::select2nd<SpriteConnectedRanges::ComponentType>(),
_1 ) ) ) != aEnd );
}
@@ -518,3 +519,5 @@ namespace canvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx
index aaef28ba489f..3f1108de2e76 100644
--- a/canvas/source/tools/surface.cxx
+++ b/canvas/source/tools/surface.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -494,3 +495,4 @@ namespace canvas
//////////////////////////////////////////////////////////////////////////////////
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surface.hxx b/canvas/source/tools/surface.hxx
index 9acda579803a..eece70b61641 100644
--- a/canvas/source/tools/surface.hxx
+++ b/canvas/source/tools/surface.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,3 +161,5 @@ namespace canvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx
index f4c31d4a2dc6..3c9479cd5ece 100644
--- a/canvas/source/tools/surfaceproxy.cxx
+++ b/canvas/source/tools/surfaceproxy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,5 @@ namespace canvas
return true;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surfaceproxy.hxx b/canvas/source/tools/surfaceproxy.hxx
index 7e42096c541b..7d5ea1f98094 100644
--- a/canvas/source/tools/surfaceproxy.hxx
+++ b/canvas/source/tools/surfaceproxy.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,5 @@ namespace canvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surfaceproxymanager.cxx b/canvas/source/tools/surfaceproxymanager.cxx
index dcc2ff574b57..e6bb97309f7b 100644
--- a/canvas/source/tools/surfaceproxymanager.cxx
+++ b/canvas/source/tools/surfaceproxymanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ namespace canvas
rRenderModule));
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/surfacerect.hxx b/canvas/source/tools/surfacerect.hxx
index cbeaa5e144d7..f4082d03b097 100644
--- a/canvas/source/tools/surfacerect.hxx
+++ b/canvas/source/tools/surfacerect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,3 +134,5 @@ namespace canvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx
index 42ab1c7aee19..e8469ba47aa0 100644
--- a/canvas/source/tools/verifyinput.cxx
+++ b/canvas/source/tools/verifyinput.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,7 +81,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): point X value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): point X value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -89,7 +90,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): point X value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): point X value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -114,7 +115,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): size.Width value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): size.Width value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -123,7 +124,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): size.Height value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): size.Height value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -148,7 +149,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's Px value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's Px value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -157,7 +158,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's Py value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's Py value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -166,7 +167,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's C1x value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's C1x value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -175,7 +176,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's C1y value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's C1y value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -184,7 +185,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's C2x value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's C2x value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -193,7 +194,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bezier segment's C2y value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bezier segment's C2y value contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -222,7 +223,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): rectangle point X1 contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): rectangle point X1 contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -231,7 +232,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): rectangle point Y1 contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): rectangle point Y1 contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -240,7 +241,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): rectangle point X2 contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): rectangle point X2 contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -249,7 +250,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): rectangle point Y2 contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): rectangle point Y2 contains infinite or NAN" )),
xIf,
nArgPos );
}
@@ -284,7 +285,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): AffineMatrix2D contains infinite or NAN value(s) at the following positions (m00-m12): ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): AffineMatrix2D contains infinite or NAN value(s) at the following positions (m00-m12): " )) +
::rtl::OUString::valueOf(nBinaryState),
xIf,
nArgPos );
@@ -320,7 +321,7 @@ namespace canvas
{
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): Matrix2D contains infinite or NAN value(s) at the following positions (m00-m11): ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): Matrix2D contains infinite or NAN value(s) at the following positions (m00-m11): " )) +
::rtl::OUString::valueOf(nBinaryState),
xIf,
nArgPos );
@@ -359,11 +360,11 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): render state's device color has too few components (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): render state's device color has too few components (" )) +
::rtl::OUString::valueOf(nMinColorComponents) +
- ::rtl::OUString::createFromAscii(" expected, ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " expected, " )) +
::rtl::OUString::valueOf(renderState.DeviceColor.getLength()) +
- ::rtl::OUString::createFromAscii(" provided)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " provided)" )),
xIf,
nArgPos );
#else
@@ -377,9 +378,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): render state's CompositeOperation value out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): render state's CompositeOperation value out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(renderState.CompositeOperation)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -403,9 +404,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): textures' alpha value out of range (is ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): textures' alpha value out of range (is " )) +
::rtl::OUString::valueOf(texture.Alpha) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
nArgPos );
#else
@@ -418,7 +419,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): textures' NumberOfHatchPolygons is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): textures' NumberOfHatchPolygons is negative" )),
xIf,
nArgPos );
#else
@@ -432,9 +433,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): textures' RepeatModeX value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): textures' RepeatModeX value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(texture.RepeatModeX)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -448,9 +449,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): textures' RepeatModeY value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): textures' RepeatModeY value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(texture.RepeatModeY)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -479,9 +480,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(mpStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): one of stroke attributes' DashArray value out of range (is ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): one of stroke attributes' DashArray value out of range (is " )) +
::rtl::OUString::valueOf(rVal) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
mrIf,
mnArgPos );
#else
@@ -507,9 +508,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): stroke attributes' StrokeWidth value out of range (is ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): stroke attributes' StrokeWidth value out of range (is " )) +
::rtl::OUString::valueOf(strokeAttributes.StrokeWidth) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
nArgPos );
#else
@@ -523,9 +524,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): stroke attributes' MiterLimit value out of range (is ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): stroke attributes' MiterLimit value out of range (is " )) +
::rtl::OUString::valueOf(strokeAttributes.MiterLimit) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
nArgPos );
#else
@@ -547,9 +548,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): stroke attributes' StartCapType value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): stroke attributes' StartCapType value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.StartCapType)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -563,9 +564,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): stroke attributes' StartCapType value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): stroke attributes' StartCapType value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.EndCapType)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -579,9 +580,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): stroke attributes' JoinType value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): stroke attributes' JoinType value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(strokeAttributes.JoinType)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -602,7 +603,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ScanLines is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLines is negative" )),
xIf,
nArgPos );
#else
@@ -615,7 +616,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ScanLineBytes is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLineBytes is negative" )),
xIf,
nArgPos );
#else
@@ -628,7 +629,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ColorSpace is invalid"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ColorSpace is invalid" )),
xIf,
nArgPos );
#else
@@ -642,7 +643,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ColorSpace getBitsPerPixel() is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ColorSpace getBitsPerPixel() is negative" )),
xIf,
nArgPos );
#else
@@ -656,9 +657,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ColorSpace getEndianness() value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ColorSpace getEndianness() value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.ColorSpace->getEndianness())) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -680,7 +681,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ScanLines is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLines is negative" )),
xIf,
nArgPos );
#else
@@ -693,7 +694,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ScanLineBytes is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLineBytes is negative" )),
xIf,
nArgPos );
#else
@@ -706,7 +707,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's ColorSpace is invalid"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ColorSpace is invalid" )),
xIf,
nArgPos );
#else
@@ -719,7 +720,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's NumComponents is negative"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's NumComponents is negative" )),
xIf,
nArgPos );
#else
@@ -733,9 +734,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's Endianness value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's Endianness value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.Endianness)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -749,9 +750,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): bitmap layout's Format value is out of range (") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's Format value is out of range (" )) +
::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.Format)) +
- ::rtl::OUString::createFromAscii(" not known)"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )),
xIf,
nArgPos );
#else
@@ -782,7 +783,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): font request's CellSize value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): font request's CellSize value contains infinite or NAN" )),
xIf,
nArgPos );
#else
@@ -795,7 +796,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): font request's ReferenceAdvancement value contains infinite or NAN"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): font request's ReferenceAdvancement value contains infinite or NAN" )),
xIf,
nArgPos );
#else
@@ -809,7 +810,7 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyInput(): font request's CellSize and ReferenceAdvancement are mutually exclusive, one of them must be 0.0"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): font request's CellSize and ReferenceAdvancement are mutually exclusive, one of them must be 0.0" )),
xIf,
nArgPos );
#else
@@ -857,9 +858,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyBitmapSize(): size has 0 or negative width (value: ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyBitmapSize(): size has 0 or negative width (value: " )) +
::rtl::OUString::valueOf(size.Width) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
0 );
#else
@@ -872,9 +873,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifyBitmapSize(): size has 0 or negative height (value: ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyBitmapSize(): size has 0 or negative height (value: " )) +
::rtl::OUString::valueOf(size.Height) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
0 );
#else
@@ -894,9 +895,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifySpriteSize(): size has 0 or negative width (value: ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifySpriteSize(): size has 0 or negative width (value: " )) +
::rtl::OUString::valueOf(size.Width) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
0 );
#else
@@ -909,9 +910,9 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0
throw lang::IllegalArgumentException(
::rtl::OUString::createFromAscii(pStr) +
- ::rtl::OUString::createFromAscii(": verifySpriteSize(): size has 0 or negative height (value: ") +
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifySpriteSize(): size has 0 or negative height (value: " )) +
::rtl::OUString::valueOf(size.Height) +
- ::rtl::OUString::createFromAscii(")"),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" )),
xIf,
0 );
#else
@@ -924,3 +925,5 @@ namespace canvas
} // namespace tools
} // namespace canvas
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index 36888d038ceb..0cb4556fb851 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/backbuffer.hxx b/canvas/source/vcl/backbuffer.hxx
index 4f4dfa1f638c..a359bcfaa3b8 100644
--- a/canvas/source/vcl/backbuffer.hxx
+++ b/canvas/source/vcl/backbuffer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ namespace vclcanvas
}
#endif /* #ifndef _VCLCANVAS_BACKBUFFER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index 53bb67dc32c2..37130b575dc1 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include "bitmapbackbuffer.hxx"
#include <osl/mutex.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/bitmapex.hxx>
@@ -54,7 +55,7 @@ namespace vclcanvas
{
// make sure solar mutex is held on deletion (other methods
// are supposed to be called with already locked solar mutex)
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if( mpVDev )
delete mpVDev;
@@ -163,3 +164,4 @@ namespace vclcanvas
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/bitmapbackbuffer.hxx b/canvas/source/vcl/bitmapbackbuffer.hxx
index 96dd525b98a4..dcb9038f8ee9 100644
--- a/canvas/source/vcl/bitmapbackbuffer.hxx
+++ b/canvas/source/vcl/bitmapbackbuffer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ namespace vclcanvas
#endif /* #ifndef _VCLCANVAS_BITMAPBACKBUFFER_HXX_ */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/cachedbitmap.cxx b/canvas/source/vcl/cachedbitmap.cxx
index 70ca3a3e67ed..964e02414a5b 100644
--- a/canvas/source/vcl/cachedbitmap.cxx
+++ b/canvas/source/vcl/cachedbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ namespace vclcanvas
return rendering::RepaintResult::REDRAWN;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/cachedbitmap.hxx b/canvas/source/vcl/cachedbitmap.hxx
index c45720c086c8..9b4ea2b3af7e 100644
--- a/canvas/source/vcl/cachedbitmap.hxx
+++ b/canvas/source/vcl/cachedbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CACHEDBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 837c064b4411..c3dd0c569f89 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,7 +98,7 @@ namespace vclcanvas
4: XWindow for creating Window (or empty for VirtualDevice)
5: SystemGraphicsData as a streamed Any
*/
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
VERBOSE_TRACE( "VCLCanvas::initialize called" );
@@ -132,14 +133,14 @@ namespace vclcanvas
OSL_TRACE( "Canvas destroyed" );
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException)
@@ -154,8 +155,10 @@ namespace vclcanvas
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index adda8d8eea40..16d5c5abd5b3 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@
#include <cppuhelper/compbase7.hxx>
#include <comphelper/uno3.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/integerbitmapbase.hxx>
#include <canvas/base/graphicdevicebase.hxx>
@@ -63,7 +64,7 @@ namespace vclcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
DeviceHelper,
tools::LocalGuard,
::cppu::OWeakObject > CanvasBase_Base;
@@ -95,12 +96,8 @@ namespace vclcanvas
/// For resource tracking
~Canvas();
-#if defined __SUNPRO_CC
- using CanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -129,3 +126,5 @@ namespace vclcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 2b244602e3fd..84f5a8db58c3 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,12 +82,6 @@ namespace vclcanvas
maCanvasHelper.init( rBitmap, rDevice, rOutDevProvider );
}
- void SAL_CALL CanvasBitmap::disposing()
- {
- // forward to base
- CanvasBitmap_Base::disposing();
- }
-
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasBitmap"
#define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap"
@@ -110,7 +105,7 @@ namespace vclcanvas
BitmapEx CanvasBitmap::getBitmap() const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(T3): Rework to use shared_ptr all over the place for
// BmpEx. This is highly un-threadsafe
@@ -124,7 +119,7 @@ namespace vclcanvas
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mbSurfaceDirty = true;
@@ -142,3 +137,5 @@ namespace vclcanvas
return uno::Any( sal_Int64(0) );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index 6440b830c3ee..540b190b76a1 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,7 +57,7 @@ namespace vclcanvas
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
CanvasBitmapHelper,
tools::LocalGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -86,9 +87,6 @@ namespace vclcanvas
::com::sun::star::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
- // overridden because of mpDevice
- virtual void SAL_CALL disposing();
-
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
@@ -127,3 +125,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CANVASBITMAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 5b8f9fd84d94..2c5a9ff0f220 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,9 +149,8 @@ namespace vclcanvas
Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() );
Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() );
- ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
- aBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
+ Bitmap::ScopedReadAccess pReadAccess( aBitmap );
+ Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha );
@@ -228,9 +228,8 @@ namespace vclcanvas
// actually changed a pixel
{
- ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
- aBitmap );
- ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
+ Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
+ Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha );
@@ -470,9 +469,8 @@ namespace vclcanvas
// actually changed a pixel
{
- ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
- aBitmap );
- ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
+ Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
+ Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha );
@@ -524,9 +522,8 @@ namespace vclcanvas
Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() );
Bitmap aAlpha( mpBackBuffer->getBitmapReference().GetAlpha().GetBitmap() );
- ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
- aBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
+ Bitmap::ScopedReadAccess pReadAccess( aBitmap );
+ Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha );
ENSURE_OR_THROW( pReadAccess.get() != NULL,
@@ -565,3 +562,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasbitmaphelper.hxx b/canvas/source/vcl/canvasbitmaphelper.hxx
index 196d53d7b58a..f49acdd19c16 100644
--- a/canvas/source/vcl/canvasbitmaphelper.hxx
+++ b/canvas/source/vcl/canvasbitmaphelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,3 +128,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CANVASBITMAPHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index a55109a9749f..2fcf6311485b 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,14 +129,6 @@ namespace vclcanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
- {
- tools::LocalGuard aGuard;
-
- // forward to parent
- CanvasCustomSpriteBaseT::disposing();
- }
-
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasCustomSprite"
#define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite"
@@ -161,7 +154,7 @@ namespace vclcanvas
void CanvasCustomSprite::redraw( OutputDevice& rOutDev,
bool bBufferedUpdate ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
redraw( rOutDev, maSpriteHelper.getPosPixel(), bBufferedUpdate );
}
@@ -170,7 +163,7 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOrigOutputPos,
bool bBufferedUpdate ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
maSpriteHelper.redraw( rOutDev,
rOrigOutputPos,
@@ -187,7 +180,7 @@ namespace vclcanvas
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mbSurfaceDirty = true;
@@ -195,3 +188,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx
index 21202b75368d..6acaddafd545 100644
--- a/canvas/source/vcl/canvascustomsprite.hxx
+++ b/canvas/source/vcl/canvascustomsprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@
#include <vcl/virdev.hxx>
#include <canvas/vclwrapper.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/spritesurface.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
@@ -76,7 +77,7 @@ namespace vclcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite
{
};
@@ -99,8 +100,6 @@ namespace vclcanvas
const OutDevProviderSharedPtr& rOutDevProvider,
bool bShowSpriteBounds );
- virtual void SAL_CALL disposing();
-
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
// Classname Base doing refcount Base implementing the XComponent interface
@@ -131,3 +130,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CANVASCUSTOMSPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 9f10c788bd24..4d1cb2b087c3 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,7 +98,7 @@ namespace vclcanvas
void SAL_CALL CanvasFont::disposing()
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mpOutDevProvider.reset();
mpRefDevice.clear();
@@ -105,7 +106,7 @@ namespace vclcanvas
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
if( !mpRefDevice.is() )
return uno::Reference< rendering::XTextLayout >(); // we're disposed
@@ -120,14 +121,14 @@ namespace vclcanvas
rendering::FontRequest SAL_CALL CanvasFont::getFontRequest( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maFontRequest;
}
rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
VirtualDevice aVDev( rOutDev );
@@ -146,7 +147,7 @@ namespace vclcanvas
uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return uno::Sequence< double >();
@@ -154,7 +155,7 @@ namespace vclcanvas
uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return uno::Sequence< beans::PropertyValue >();
@@ -186,3 +187,5 @@ namespace vclcanvas
return *maFont;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx
index e0c9a567a29a..44cc9631f4f9 100644
--- a/canvas/source/vcl/canvasfont.hxx
+++ b/canvas/source/vcl/canvasfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CANVASFONT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index e135ec494fdf..38185d812fb5 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,8 +157,8 @@ namespace vclcanvas
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
rOutDev.EnableMapMode( sal_False );
- rOutDev.SetLineColor( COL_WHITE );
- rOutDev.SetFillColor( COL_WHITE );
+ rOutDev.SetLineColor( COL_TRANSPARENT );
+ rOutDev.SetFillColor( COL_TRANSPARENT );
rOutDev.DrawRect( Rectangle( Point(),
rOutDev.GetOutputSizePixel()) );
@@ -167,8 +168,8 @@ namespace vclcanvas
rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
rOutDev2.EnableMapMode( sal_False );
- rOutDev2.SetLineColor( COL_WHITE );
- rOutDev2.SetFillColor( COL_WHITE );
+ rOutDev2.SetLineColor( COL_TRANSPARENT );
+ rOutDev2.SetFillColor( COL_TRANSPARENT );
rOutDev2.DrawRect( Rectangle( Point(),
rOutDev2.GetOutputSizePixel()) );
rOutDev2.SetDrawMode( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_BLACKTEXT |
@@ -947,8 +948,7 @@ namespace vclcanvas
Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) );
- ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
- aBitmap );
+ Bitmap::ScopedReadAccess pReadAccess( aBitmap );
ENSURE_OR_THROW( pReadAccess.get() != NULL,
"Could not acquire read access to OutDev bitmap" );
@@ -1013,8 +1013,7 @@ namespace vclcanvas
Bitmap aTmpBitmap( rOutDev.GetBitmap( aEmptyPoint,
aSize ) );
- ScopedBitmapReadAccess pReadAccess( aTmpBitmap.AcquireReadAccess(),
- aTmpBitmap );
+ Bitmap::ScopedReadAccess pReadAccess( aTmpBitmap );
pPalette = &pReadAccess->GetPalette();
}
@@ -1025,8 +1024,7 @@ namespace vclcanvas
bool bCopyBack( false ); // only copy something back, if we
// actually changed some pixel
{
- ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
- aBitmap );
+ Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
ENSURE_OR_THROW( pWriteAccess.get() != NULL,
"Could not acquire write access to OutDev bitmap" );
@@ -1426,3 +1424,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvashelper.hxx b/canvas/source/vcl/canvashelper.hxx
index ef5eafa0c9ef..ebc0d58624c7 100644
--- a/canvas/source/vcl/canvashelper.hxx
+++ b/canvas/source/vcl/canvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -342,3 +343,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_CANVASHELPER_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 00eb7c1ba071..e7ffe0e41356 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1184,3 +1185,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 699a2ebfe9b8..96b14e2cfb73 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -240,3 +241,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/devicehelper.hxx b/canvas/source/vcl/devicehelper.hxx
index aa17e98b8070..1c2d7b930320 100644
--- a/canvas/source/vcl/devicehelper.hxx
+++ b/canvas/source/vcl/devicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_DEVICEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 97a825f48f01..a8187766e15b 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,6 +60,7 @@
#include <basegfx/numeric/ftools.hxx>
#include <canvas/canvastools.hxx>
+#include <o3tl/compat_functional.hxx>
#include "impltools.hxx"
#include "canvasbitmap.hxx"
@@ -275,9 +277,8 @@ namespace vclcanvas
aSrcAlpha = rBitmap.GetMask();
}
- ScopedBitmapReadAccess pReadAccess( aSrcBitmap.AcquireReadAccess(),
- aSrcBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
+ Bitmap::ScopedReadAccess pReadAccess( aSrcBitmap );
+ Bitmap::ScopedReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
aSrcAlpha.AcquireReadAccess() :
(BitmapReadAccess*)NULL,
aSrcAlpha );
@@ -301,7 +302,7 @@ namespace vclcanvas
{
// source already has alpha channel - 1:1 mapping,
// i.e. aAlphaMap[0]=0,...,aAlphaMap[255]=255.
- ::std::iota( aAlphaMap, &aAlphaMap[256], 0 );
+ ::o3tl::iota( aAlphaMap, &aAlphaMap[256], 0 );
}
else
{
@@ -332,10 +333,8 @@ namespace vclcanvas
// copy-constructing the resulting bitmap. This will
// rule out the possibility that cached accessor data
// is not yet written back.
- ScopedBitmapWriteAccess pWriteAccess( aDstBitmap.AcquireWriteAccess(),
- aDstBitmap );
- ScopedBitmapWriteAccess pAlphaWriteAccess( aDstAlpha.AcquireWriteAccess(),
- aDstAlpha );
+ Bitmap::ScopedWriteAccess pWriteAccess( aDstBitmap );
+ Bitmap::ScopedWriteAccess pAlphaWriteAccess( aDstAlpha );
if( pWriteAccess.get() != NULL &&
@@ -542,3 +541,5 @@ namespace vclcanvas
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index e79ddb8496df..8b9293acb44d 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,10 +30,11 @@
#define _VCLCANVAS_TOOLS_HXX
#include <osl/mutex.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
+#include <vcl/solarmutex.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -122,18 +124,18 @@ namespace vclcanvas
{
public:
LocalGuard() :
- aGuard( Application::GetSolarMutex() )
+ aSolarGuard()
{
}
/// To be compatible with CanvasBase mutex concept
LocalGuard( const ::osl::Mutex& ) :
- aGuard( Application::GetSolarMutex() )
+ aSolarGuard()
{
}
private:
- ::vos::OGuard aGuard;
+ SolarMutexGuard aSolarGuard;
};
class OutDevStateKeeper
@@ -199,3 +201,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_TOOLS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/outdevprovider.hxx b/canvas/source/vcl/outdevprovider.hxx
index dd5f870c7d9c..2d41980c8569 100644
--- a/canvas/source/vcl/outdevprovider.hxx
+++ b/canvas/source/vcl/outdevprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_OUTDEVPROVIDER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/repainttarget.hxx b/canvas/source/vcl/repainttarget.hxx
index ce2037bf5b67..5ca0c4dea198 100644
--- a/canvas/source/vcl/repainttarget.hxx
+++ b/canvas/source/vcl/repainttarget.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_REPAINTTARGET_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/services.cxx b/canvas/source/vcl/services.cxx
index e8cd2379a38f..f482c841ea74 100644
--- a/canvas/source/vcl/services.cxx
+++ b/canvas/source/vcl/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ namespace vclcanvas
// The C shared lib entry points
COMPHELPER_SERVICEDECL_EXPORTS2(vclcanvas::vclCanvasDecl, vclcanvas::vclSpriteCanvasDecl)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/sprite.hxx b/canvas/source/vcl/sprite.hxx
index 29ff80239e02..b2713eb4486d 100644
--- a/canvas/source/vcl/sprite.hxx
+++ b/canvas/source/vcl/sprite.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ namespace vclcanvas
}
#endif /* INCLUDED_VCLCANVAS_SPRITE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index c08529d3cb35..14c2446dcab7 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@ namespace vclcanvas
void SpriteCanvas::initialize()
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// #i64742# Only call initialize when not in probe mode
if( maArguments.getLength() == 0 )
@@ -128,14 +129,14 @@ namespace vclcanvas
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
@@ -150,7 +151,7 @@ namespace vclcanvas
sal_Bool SAL_CALL SpriteCanvas::updateScreen( sal_Bool bUpdateAll ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// avoid repaints on hidden window (hidden: not mapped to
// screen). Return failure, since the screen really has _not_
@@ -171,8 +172,10 @@ namespace vclcanvas
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx
index db4b05ddb9b2..26500fc93552 100644
--- a/canvas/source/vcl/spritecanvas.hxx
+++ b/canvas/source/vcl/spritecanvas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "spritecanvashelper.hxx"
@@ -67,7 +68,7 @@ namespace vclcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
tools::LocalGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -122,12 +123,8 @@ namespace vclcanvas
/// For resource tracking
~SpriteCanvas();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -170,3 +167,5 @@ namespace vclcanvas
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 50f02e6b5888..ac75508809fe 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -716,3 +717,5 @@ namespace vclcanvas
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritecanvashelper.hxx b/canvas/source/vcl/spritecanvashelper.hxx
index bc80f4359e5b..b0b717f18697 100644
--- a/canvas/source/vcl/spritecanvashelper.hxx
+++ b/canvas/source/vcl/spritecanvashelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -177,3 +178,4 @@ namespace vclcanvas
#endif /* _VCLCANVAS_SPRITECANVASHELPER_HXX_ */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 6aa6de0bac97..20129ea3fe16 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,13 +89,13 @@ namespace vclcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
@@ -156,3 +157,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritedevicehelper.hxx b/canvas/source/vcl/spritedevicehelper.hxx
index eaedbc8ca5ac..2034748cdb1f 100644
--- a/canvas/source/vcl/spritedevicehelper.hxx
+++ b/canvas/source/vcl/spritedevicehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_SPRITEDEVICEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index af1a2f9ccd4d..e4226fac1f16 100755..100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,8 +167,7 @@ namespace vclcanvas
#ifndef QUARTZ
if( aMask.GetBitCount() != 1 )
{
- OSL_ENSURE(false,
- "CanvasCustomSprite::redraw(): Mask bitmap is not "
+ OSL_FAIL("CanvasCustomSprite::redraw(): Mask bitmap is not "
"monochrome (performance!)");
aMask.MakeMono(255);
}
@@ -428,3 +428,5 @@ namespace vclcanvas
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritehelper.hxx b/canvas/source/vcl/spritehelper.hxx
index 67aa588dff6e..c40666c57e40 100644
--- a/canvas/source/vcl/spritehelper.hxx
+++ b/canvas/source/vcl/spritehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_SPRITEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 19b0f7cea4ce..08cdd66abe00 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,7 @@ namespace vclcanvas
void SAL_CALL TextLayout::disposing()
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
mpOutDevProvider.reset();
mxDevice.clear();
@@ -113,7 +114,7 @@ namespace vclcanvas
// XTextLayout
uno::Sequence< uno::Reference< rendering::XPolyPolygon2D > > SAL_CALL TextLayout::queryTextShapes( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
VirtualDevice aVDev( rOutDev );
@@ -165,7 +166,7 @@ namespace vclcanvas
uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryInkMeasures( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
@@ -217,7 +218,7 @@ namespace vclcanvas
uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryMeasures( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return uno::Sequence< geometry::RealRectangle2D >();
@@ -225,14 +226,14 @@ namespace vclcanvas
uno::Sequence< double > SAL_CALL TextLayout::queryLogicalAdvancements( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maLogicalAdvancements;
}
void SAL_CALL TextLayout::applyLogicalAdvancements( const uno::Sequence< double >& aAdvancements ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
ENSURE_ARG_OR_THROW( aAdvancements.getLength() == maText.Length,
"TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
@@ -242,7 +243,7 @@ namespace vclcanvas
geometry::RealRectangle2D SAL_CALL TextLayout::queryTextBounds( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
if( !mpOutDevProvider )
return geometry::RealRectangle2D();
@@ -280,7 +281,7 @@ namespace vclcanvas
double SAL_CALL TextLayout::justify( double nSize ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)nSize;
@@ -291,7 +292,7 @@ namespace vclcanvas
double SAL_CALL TextLayout::combinedJustify( const uno::Sequence< uno::Reference< rendering::XTextLayout > >& aNextLayouts,
double nSize ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)aNextLayouts;
(void)nSize;
@@ -302,7 +303,7 @@ namespace vclcanvas
rendering::TextHit SAL_CALL TextLayout::getTextHit( const geometry::RealPoint2D& aHitPoint ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)aHitPoint;
@@ -312,7 +313,7 @@ namespace vclcanvas
rendering::Caret SAL_CALL TextLayout::getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)nInsertionIndex;
(void)bExcludeLigatures;
@@ -323,7 +324,7 @@ namespace vclcanvas
sal_Int32 SAL_CALL TextLayout::getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)nStartIndex;
(void)nCaretAdvancement;
@@ -335,7 +336,7 @@ namespace vclcanvas
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)nStartIndex;
(void)nEndIndex;
@@ -346,7 +347,7 @@ namespace vclcanvas
uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
(void)nStartIndex;
(void)nEndIndex;
@@ -357,7 +358,7 @@ namespace vclcanvas
double SAL_CALL TextLayout::getBaselineOffset( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO(F1)
return 0.0;
@@ -365,21 +366,21 @@ namespace vclcanvas
sal_Int8 SAL_CALL TextLayout::getMainTextDirection( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return mnTextDirection;
}
uno::Reference< rendering::XCanvasFont > SAL_CALL TextLayout::getFont( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return mpFont.getRef();
}
rendering::StringContext SAL_CALL TextLayout::getText( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
return maText;
}
@@ -389,7 +390,7 @@ namespace vclcanvas
const rendering::ViewState& viewState,
const rendering::RenderState& renderState ) const
{
- tools::LocalGuard aGuard;
+ SolarMutexGuard aGuard;
setupLayoutMode( rOutDev, mnTextDirection );
@@ -494,3 +495,5 @@ namespace vclcanvas
return aRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index ad443ae76376..faca5c001cac 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_TEXTLAYOUT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/windowoutdevholder.cxx b/canvas/source/vcl/windowoutdevholder.cxx
index 9515912a1d93..414cc3c9d4ed 100644
--- a/canvas/source/vcl/windowoutdevholder.cxx
+++ b/canvas/source/vcl/windowoutdevholder.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ namespace vclcanvas
mrOutputWindow( windowFromXWin(xWin) )
{}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/windowoutdevholder.hxx b/canvas/source/vcl/windowoutdevholder.hxx
index ae20a49462e1..4687b1d2e421 100644
--- a/canvas/source/vcl/windowoutdevholder.hxx
+++ b/canvas/source/vcl/windowoutdevholder.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ namespace vclcanvas
}
#endif /* _VCLCANVAS_WINDOWOUTDEVHOLDER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */