diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-04-18 08:08:12 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-04-18 08:08:12 +0000 |
commit | 963c9c4e00f42ec0e096966a4f9f562cbe2c1922 (patch) | |
tree | 78a8a49ed8262aeacdfeec9fed3ed08f3a001571 /canvas | |
parent | 9329074b6321fb2ff820d484f4e0f60bbd1aae2e (diff) |
INTEGRATION: CWS presfixes03 (1.4.4); FILE MERGED
2005/04/01 15:48:06 thb 1.4.4.1: #i36190#, #i37793#, #i39245#, #i46023# Fixes for open/close polygon stroking; beefed up the canvas tools; moved try/catch block around configuration in cf_factory (to facilitate canvasdemo with broken/incomplete services.rdb; enhanced TextLayout to cope with new Action::getBounds() functionality in cppcanvas (needed for proper mtf bounds calculation); removed extra pixel right and bottom for filled polygons; avoiding uno::Sequence::operator[] for non-const cases, but using the naked mem ptr instead (performance)
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/factory/cf_service.cxx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index 0baaf5f1c0a2..24d0a71791e7 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cf_service.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: vg $ $Date: 2005-03-10 11:50:21 $ + * last change: $Author: obo $ $Date: 2005-04-18 09:08:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -153,21 +153,26 @@ CanvasFactory::CanvasFactory( : m_xContext(xContext) { ::rtl::OUString preferredServices; - // read out configuration for preferred services: - Reference<lang::XMultiServiceFactory> xConfigProvider( - m_xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.configuration.ConfigurationProvider"), - m_xContext ), UNO_QUERY_THROW ); - Any propValue( - makeAny( beans::PropertyValue( - OUSTR("nodepath"), -1, - makeAny( OUSTR("/org.openoffice.VCL/Settings/Canvas") ), - beans::PropertyState_DIRECT_VALUE ) ) ); - try { + + try + { + // read out configuration for preferred services: + Reference<lang::XMultiServiceFactory> xConfigProvider( + m_xContext->getServiceManager()->createInstanceWithContext( + OUSTR("com.sun.star.configuration.ConfigurationProvider"), + m_xContext ), UNO_QUERY_THROW ); + + Any propValue( + makeAny( beans::PropertyValue( + OUSTR("nodepath"), -1, + makeAny( OUSTR("/org.openoffice.VCL/Settings/Canvas") ), + beans::PropertyState_DIRECT_VALUE ) ) ); + Reference<container::XNameAccess> xNameAccess( xConfigProvider->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), Sequence<Any>( &propValue, 1 ) ), UNO_QUERY ); + if (xNameAccess.is()) xNameAccess->getByName( OUSTR("PreferredServices") ) >>= preferredServices; } |