Kaydet (Commit) 0968c304 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

RTL_CONSTASCII_(U)STRINGPARAM removed in canvas

::rtl:: prefix removed from OUString as well

Change-Id: I4de29a9c487ff2b87fdb5efa8e75aaf5b88402b0
üst 0a28778e
...@@ -39,23 +39,22 @@ ...@@ -39,23 +39,22 @@
#include <o3tl/compat_functional.hxx> #include <o3tl/compat_functional.hxx>
#include <algorithm> #include <algorithm>
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using ::rtl::OUString;
namespace namespace
{ {
OUString SAL_CALL getImplName() OUString SAL_CALL getImplName()
{ {
return OUSTR("com.sun.star.comp.rendering.CanvasFactory"); return OUString("com.sun.star.comp.rendering.CanvasFactory");
} }
Sequence<OUString> SAL_CALL getSuppServices() Sequence<OUString> SAL_CALL getSuppServices()
{ {
OUString name = OUSTR("com.sun.star.rendering.CanvasFactory"); OUString name("com.sun.star.rendering.CanvasFactory");
return Sequence<OUString>(&name, 1); return Sequence<OUString>(&name, 1);
} }
...@@ -145,25 +144,25 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : ...@@ -145,25 +144,25 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
Any propValue( Any propValue(
makeAny( beans::PropertyValue( makeAny( beans::PropertyValue(
OUSTR("nodepath"), -1, OUString("nodepath"), -1,
makeAny( OUSTR("/org.openoffice.Office.Canvas") ), makeAny( OUString("/org.openoffice.Office.Canvas") ),
beans::PropertyState_DIRECT_VALUE ) ) ); beans::PropertyState_DIRECT_VALUE ) ) );
m_xCanvasConfigNameAccess.set( m_xCanvasConfigNameAccess.set(
xConfigProvider->createInstanceWithArguments( xConfigProvider->createInstanceWithArguments(
OUSTR("com.sun.star.configuration.ConfigurationAccess"), OUString("com.sun.star.configuration.ConfigurationAccess"),
Sequence<Any>( &propValue, 1 ) ), Sequence<Any>( &propValue, 1 ) ),
UNO_QUERY_THROW ); UNO_QUERY_THROW );
propValue = makeAny( propValue = makeAny(
beans::PropertyValue( beans::PropertyValue(
OUSTR("nodepath"), -1, OUString("nodepath"), -1,
makeAny( OUSTR("/org.openoffice.Office.Canvas/CanvasServiceList") ), makeAny( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ),
beans::PropertyState_DIRECT_VALUE ) ); beans::PropertyState_DIRECT_VALUE ) );
Reference<container::XNameAccess> xNameAccess( Reference<container::XNameAccess> xNameAccess(
xConfigProvider->createInstanceWithArguments( xConfigProvider->createInstanceWithArguments(
OUSTR("com.sun.star.configuration.ConfigurationAccess"), OUString("com.sun.star.configuration.ConfigurationAccess"),
Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW ); Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
Reference<container::XHierarchicalNameAccess> xHierarchicalNameAccess( Reference<container::XHierarchicalNameAccess> xHierarchicalNameAccess(
xNameAccess, UNO_QUERY_THROW); xNameAccess, UNO_QUERY_THROW);
...@@ -180,11 +179,11 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : ...@@ -180,11 +179,11 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
if( xEntryNameAccess.is() ) if( xEntryNameAccess.is() )
{ {
Sequence<OUString> implementationList; Sequence<OUString> implementationList;
if( (xEntryNameAccess->getByName( OUSTR("PreferredImplementations") ) >>= implementationList) ) if( (xEntryNameAccess->getByName( OUString("PreferredImplementations") ) >>= implementationList) )
m_aAvailableImplementations.push_back( std::make_pair(*pCurr,implementationList) ); m_aAvailableImplementations.push_back( std::make_pair(*pCurr,implementationList) );
if( (xEntryNameAccess->getByName( OUSTR("AcceleratedImplementations") ) >>= implementationList) ) if( (xEntryNameAccess->getByName( OUString("AcceleratedImplementations") ) >>= implementationList) )
m_aAcceleratedImplementations.push_back( std::make_pair(*pCurr,implementationList) ); m_aAcceleratedImplementations.push_back( std::make_pair(*pCurr,implementationList) );
if( (xEntryNameAccess->getByName( OUSTR("AntialiasingImplementations") ) >>= implementationList) ) if( (xEntryNameAccess->getByName( OUString("AntialiasingImplementations") ) >>= implementationList) )
m_aAAImplementations.push_back( std::make_pair(*pCurr,implementationList) ); m_aAAImplementations.push_back( std::make_pair(*pCurr,implementationList) );
} }
...@@ -204,12 +203,12 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : ...@@ -204,12 +203,12 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
// Ugh. Looks like configuration is borked. Fake minimal // Ugh. Looks like configuration is borked. Fake minimal
// setup. // setup.
Sequence<OUString> aServices(1); Sequence<OUString> aServices(1);
aServices[0] = OUSTR("com.sun.star.comp.rendering.Canvas.VCL"); aServices[0] = OUString("com.sun.star.comp.rendering.Canvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUSTR("com.sun.star.rendering.Canvas"), m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.Canvas"),
aServices) ); aServices) );
aServices[0] = OUSTR("com.sun.star.comp.rendering.SpriteCanvas.VCL"); aServices[0] = OUString("com.sun.star.comp.rendering.SpriteCanvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUSTR("com.sun.star.rendering.SpriteCanvas"), m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.SpriteCanvas"),
aServices) ); aServices) );
} }
} }
...@@ -318,19 +317,19 @@ Reference<XInterface> CanvasFactory::lookupAndUse( ...@@ -318,19 +317,19 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
bool bForceLastEntry(false); bool bForceLastEntry(false);
checkConfigFlag( bForceLastEntry, checkConfigFlag( bForceLastEntry,
m_bCacheHasForcedLastImpl, m_bCacheHasForcedLastImpl,
OUSTR("ForceSafeServiceImpl") ); OUString("ForceSafeServiceImpl") );
// use anti-aliasing canvas, if config flag set (or not existing) // use anti-aliasing canvas, if config flag set (or not existing)
bool bUseAAEntry(true); bool bUseAAEntry(true);
checkConfigFlag( bUseAAEntry, checkConfigFlag( bUseAAEntry,
m_bCacheHasUseAAEntry, m_bCacheHasUseAAEntry,
OUSTR("UseAntialiasingCanvas") ); OUString("UseAntialiasingCanvas") );
// use accelerated canvas, if config flag set (or not existing) // use accelerated canvas, if config flag set (or not existing)
bool bUseAcceleratedEntry(true); bool bUseAcceleratedEntry(true);
checkConfigFlag( bUseAcceleratedEntry, checkConfigFlag( bUseAcceleratedEntry,
m_bCacheHasUseAcceleratedEntry, m_bCacheHasUseAcceleratedEntry,
OUSTR("UseAcceleratedCanvas") ); OUString("UseAcceleratedCanvas") );
// try to reuse last working implementation for given service name // try to reuse last working implementation for given service name
const CacheVector::iterator aEnd(m_aCachedImplementations.end()); const CacheVector::iterator aEnd(m_aCachedImplementations.end());
......
...@@ -53,20 +53,20 @@ namespace nullcanvas ...@@ -53,20 +53,20 @@ namespace nullcanvas
#define IMPLEMENTATION_NAME "NullCanvas.CanvasBitmap" #define IMPLEMENTATION_NAME "NullCanvas.CanvasBitmap"
#define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap" #define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap"
::rtl::OUString SAL_CALL CanvasBitmap::getImplementationName( ) throw (uno::RuntimeException) OUString SAL_CALL CanvasBitmap::getImplementationName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasBitmap::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException) sal_Bool SAL_CALL CanvasBitmap::supportsService( const OUString& ServiceName ) throw (uno::RuntimeException)
{ {
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasBitmap::getSupportedServiceNames( ) throw (uno::RuntimeException) uno::Sequence< OUString > SAL_CALL CanvasBitmap::getSupportedServiceNames( ) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -75,20 +75,20 @@ namespace nullcanvas ...@@ -75,20 +75,20 @@ namespace nullcanvas
#define IMPLEMENTATION_NAME "NullCanvas.CanvasCustomSprite" #define IMPLEMENTATION_NAME "NullCanvas.CanvasCustomSprite"
#define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite" #define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite"
::rtl::OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
{ {
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -85,20 +85,20 @@ namespace nullcanvas ...@@ -85,20 +85,20 @@ namespace nullcanvas
#define SERVICE_NAME "com.sun.star.rendering.CanvasFont" #define SERVICE_NAME "com.sun.star.rendering.CanvasFont"
#define IMPLEMENTATION_NAME "NullCanvas::CanvasFont" #define IMPLEMENTATION_NAME "NullCanvas::CanvasFont"
::rtl::OUString SAL_CALL CanvasFont::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL CanvasFont::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CanvasFont::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL CanvasFont::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
{ {
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CanvasFont::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL CanvasFont::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -132,9 +132,9 @@ namespace nullcanvas ...@@ -132,9 +132,9 @@ namespace nullcanvas
mbSurfaceDirty ); mbSurfaceDirty );
} }
::rtl::OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (uno::RuntimeException) OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); return OUString( SERVICE_NAME );
} }
static uno::Reference<uno::XInterface> initCanvas( SpriteCanvas* pCanvas ) static uno::Reference<uno::XInterface> initCanvas( SpriteCanvas* pCanvas )
......
...@@ -231,20 +231,20 @@ namespace nullcanvas ...@@ -231,20 +231,20 @@ namespace nullcanvas
#define SERVICE_NAME "com.sun.star.rendering.TextLayout" #define SERVICE_NAME "com.sun.star.rendering.TextLayout"
#define IMPLEMENTATION_NAME "NullCanvas::TextLayout" #define IMPLEMENTATION_NAME "NullCanvas::TextLayout"
::rtl::OUString SAL_CALL TextLayout::getImplementationName() throw( uno::RuntimeException ) OUString SAL_CALL TextLayout::getImplementationName() throw( uno::RuntimeException )
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL TextLayout::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL TextLayout::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
{ {
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL TextLayout::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL TextLayout::getSupportedServiceNames() throw( uno::RuntimeException )
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -178,7 +178,7 @@ namespace ...@@ -178,7 +178,7 @@ namespace
// Ifc XServiceName // Ifc XServiceName
virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (uno::RuntimeException) virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) ); return OUString( SERVICE_NAME );
} }
// Ifc XSimpleCanvas // Ifc XSimpleCanvas
......
...@@ -82,9 +82,9 @@ namespace canvas ...@@ -82,9 +82,9 @@ namespace canvas
bSameViewTransforms ); bSameViewTransforms );
} }
::rtl::OUString SAL_CALL CachedPrimitiveBase::getImplementationName( ) throw (uno::RuntimeException) OUString SAL_CALL CachedPrimitiveBase::getImplementationName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL CachedPrimitiveBase::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException) sal_Bool SAL_CALL CachedPrimitiveBase::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException)
...@@ -92,10 +92,10 @@ namespace canvas ...@@ -92,10 +92,10 @@ namespace canvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL CachedPrimitiveBase::getSupportedServiceNames( ) throw (uno::RuntimeException) uno::Sequence< OUString > SAL_CALL CachedPrimitiveBase::getSupportedServiceNames( ) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -1166,8 +1166,7 @@ namespace canvas ...@@ -1166,8 +1166,7 @@ namespace canvas
o_rxParams.realloc( 2 ); o_rxParams.realloc( 2 );
o_rxParams[ 0 ] = uno::makeAny( xServiceInfo->getImplementationName() ); o_rxParams[ 0 ] = uno::makeAny( xServiceInfo->getImplementationName() );
o_rxParams[ 1 ] = uno::makeAny( xPropSet->getPropertyValue( o_rxParams[ 1 ] = uno::makeAny( xPropSet->getPropertyValue( "DeviceHandle" ) );
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DeviceHandle") ) ) );
} }
catch( const uno::Exception& ) catch( const uno::Exception& )
{ {
......
...@@ -40,12 +40,12 @@ using namespace ::com::sun::star; ...@@ -40,12 +40,12 @@ using namespace ::com::sun::star;
namespace canvas namespace canvas
{ {
uno::Sequence<rtl::OUString> ParametricPolyPolygon::getAvailableServiceNames() uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames()
{ {
uno::Sequence<rtl::OUString> aRet(3); uno::Sequence<OUString> aRet(3);
aRet[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LinearGradient" )); aRet[0] = "LinearGradient";
aRet[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EllipticalGradient" )); aRet[1] = "EllipticalGradient";
aRet[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RectangularGradient" )); aRet[2] = "RectangularGradient";
return aRet; return aRet;
} }
...@@ -203,9 +203,9 @@ namespace canvas ...@@ -203,9 +203,9 @@ namespace canvas
#define IMPLEMENTATION_NAME "Canvas::ParametricPolyPolygon" #define IMPLEMENTATION_NAME "Canvas::ParametricPolyPolygon"
#define SERVICE_NAME "com.sun.star.rendering.ParametricPolyPolygon" #define SERVICE_NAME "com.sun.star.rendering.ParametricPolyPolygon"
::rtl::OUString SAL_CALL ParametricPolyPolygon::getImplementationName( ) throw (uno::RuntimeException) OUString SAL_CALL ParametricPolyPolygon::getImplementationName( ) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ); return OUString( IMPLEMENTATION_NAME );
} }
sal_Bool SAL_CALL ParametricPolyPolygon::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException) sal_Bool SAL_CALL ParametricPolyPolygon::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException)
...@@ -213,10 +213,10 @@ namespace canvas ...@@ -213,10 +213,10 @@ namespace canvas
return ServiceName == SERVICE_NAME; return ServiceName == SERVICE_NAME;
} }
uno::Sequence< ::rtl::OUString > SAL_CALL ParametricPolyPolygon::getSupportedServiceNames( ) throw (uno::RuntimeException) uno::Sequence< OUString > SAL_CALL ParametricPolyPolygon::getSupportedServiceNames( ) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); aRet[0] = SERVICE_NAME;
return aRet; return aRet;
} }
......
...@@ -26,22 +26,20 @@ namespace canvas ...@@ -26,22 +26,20 @@ namespace canvas
{ {
namespace namespace
{ {
void throwUnknown( const ::rtl::OUString& aPropertyName ) void throwUnknown( const OUString& aPropertyName )
{ {
throw beans::UnknownPropertyException( throw beans::UnknownPropertyException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) + "PropertySetHelper: property " +
aPropertyName + aPropertyName + " not found.",
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not found." )),
uno::Reference< uno::XInterface >() uno::Reference< uno::XInterface >()
); );
} }
void throwVeto( const ::rtl::OUString& aPropertyName ) void throwVeto( const OUString& aPropertyName )
{ {
throw beans::PropertyVetoException( throw beans::PropertyVetoException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) + "PropertySetHelper: property " +
aPropertyName + aPropertyName + " access was vetoed.",
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " access was vetoed." )),
uno::Reference< uno::XInterface >() ); uno::Reference< uno::XInterface >() );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment