summaryrefslogtreecommitdiff
path: root/canvas/source/cairo/cairo_canvasfont.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-12-13 13:38:48 +0000
committerKurt Zenker <kz@openoffice.org>2006-12-13 13:38:48 +0000
commit16a35ca29b152539602069dacb9e52055af82bfd (patch)
tree51fded693699e34d3126d7c6f1af7e8260645307 /canvas/source/cairo/cairo_canvasfont.cxx
parent941cf287d1a82849fdfb498200ea1956b568a511 (diff)
INTEGRATION: CWS presfixes09 (1.2.4); FILE MERGED
2006/11/15 13:28:41 thb 1.2.4.3: RESYNC: (1.3-1.4); FILE MERGED 2006/10/18 13:55:45 thb 1.2.4.2: RESYNC: (1.2-1.3); FILE MERGED 2006/04/20 15:13:24 thb 1.2.4.1: #i10000# Fixed merge problems
Diffstat (limited to 'canvas/source/cairo/cairo_canvasfont.cxx')
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx39
1 files changed, 30 insertions, 9 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index fe5a049c2f04..93cc1cdc8e6d 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cairo_canvasfont.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 14:45:29 $
+ * last change: $Author: kz $ $Date: 2006-12-13 14:38:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -48,9 +48,30 @@
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,
const geometry::Matrix2D& rFontMatrix,
@@ -99,14 +120,14 @@ namespace cairocanvas
void SAL_CALL CanvasFont::disposing()
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
mpRefDevice.clear();
}
uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
if( !mpRefDevice.is() )
return uno::Reference< rendering::XTextLayout >(); // we're disposed
@@ -120,14 +141,14 @@ namespace cairocanvas
rendering::FontRequest SAL_CALL CanvasFont::getFontRequest( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
return maFontRequest;
}
rendering::FontMetrics SAL_CALL CanvasFont::getFontMetrics( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
// TODO(F1)
return rendering::FontMetrics();
@@ -135,7 +156,7 @@ namespace cairocanvas
uno::Sequence< double > SAL_CALL CanvasFont::getAvailableSizes( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
// TODO(F1)
return uno::Sequence< double >();
@@ -143,7 +164,7 @@ namespace cairocanvas
uno::Sequence< beans::PropertyValue > SAL_CALL CanvasFont::getExtraFontProperties( ) throw (uno::RuntimeException)
{
- tools::LocalGuard aGuard;
+ LocalGuard aGuard;
// TODO(F1)
return uno::Sequence< beans::PropertyValue >();