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 @@
#include <o3tl/compat_functional.hxx>
#include <algorithm>
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using ::rtl::OUString;
namespace
{
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()
{
OUString name = OUSTR("com.sun.star.rendering.CanvasFactory");
OUString name("com.sun.star.rendering.CanvasFactory");
return Sequence<OUString>(&name, 1);
}
......@@ -145,25 +144,25 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
Any propValue(
makeAny( beans::PropertyValue(
OUSTR("nodepath"), -1,
makeAny( OUSTR("/org.openoffice.Office.Canvas") ),
OUString("nodepath"), -1,
makeAny( OUString("/org.openoffice.Office.Canvas") ),
beans::PropertyState_DIRECT_VALUE ) ) );
m_xCanvasConfigNameAccess.set(
xConfigProvider->createInstanceWithArguments(
OUSTR("com.sun.star.configuration.ConfigurationAccess"),
OUString("com.sun.star.configuration.ConfigurationAccess"),
Sequence<Any>( &propValue, 1 ) ),
UNO_QUERY_THROW );
propValue = makeAny(
beans::PropertyValue(
OUSTR("nodepath"), -1,
makeAny( OUSTR("/org.openoffice.Office.Canvas/CanvasServiceList") ),
OUString("nodepath"), -1,
makeAny( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ),
beans::PropertyState_DIRECT_VALUE ) );
Reference<container::XNameAccess> xNameAccess(
xConfigProvider->createInstanceWithArguments(
OUSTR("com.sun.star.configuration.ConfigurationAccess"),
OUString("com.sun.star.configuration.ConfigurationAccess"),
Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
Reference<container::XHierarchicalNameAccess> xHierarchicalNameAccess(
xNameAccess, UNO_QUERY_THROW);
......@@ -180,11 +179,11 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
if( xEntryNameAccess.is() )
{
Sequence<OUString> implementationList;
if( (xEntryNameAccess->getByName( OUSTR("PreferredImplementations") ) >>= implementationList) )
if( (xEntryNameAccess->getByName( OUString("PreferredImplementations") ) >>= 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) );
if( (xEntryNameAccess->getByName( OUSTR("AntialiasingImplementations") ) >>= implementationList) )
if( (xEntryNameAccess->getByName( OUString("AntialiasingImplementations") ) >>= implementationList) )
m_aAAImplementations.push_back( std::make_pair(*pCurr,implementationList) );
}
......@@ -204,12 +203,12 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
// Ugh. Looks like configuration is borked. Fake minimal
// setup.
Sequence<OUString> aServices(1);
aServices[0] = OUSTR("com.sun.star.comp.rendering.Canvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUSTR("com.sun.star.rendering.Canvas"),
aServices[0] = OUString("com.sun.star.comp.rendering.Canvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.Canvas"),
aServices) );
aServices[0] = OUSTR("com.sun.star.comp.rendering.SpriteCanvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUSTR("com.sun.star.rendering.SpriteCanvas"),
aServices[0] = OUString("com.sun.star.comp.rendering.SpriteCanvas.VCL");
m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.SpriteCanvas"),
aServices) );
}
}
......@@ -318,19 +317,19 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
bool bForceLastEntry(false);
checkConfigFlag( bForceLastEntry,
m_bCacheHasForcedLastImpl,
OUSTR("ForceSafeServiceImpl") );
OUString("ForceSafeServiceImpl") );
// use anti-aliasing canvas, if config flag set (or not existing)
bool bUseAAEntry(true);
checkConfigFlag( bUseAAEntry,
m_bCacheHasUseAAEntry,
OUSTR("UseAntialiasingCanvas") );
OUString("UseAntialiasingCanvas") );
// use accelerated canvas, if config flag set (or not existing)
bool bUseAcceleratedEntry(true);
checkConfigFlag( bUseAcceleratedEntry,
m_bCacheHasUseAcceleratedEntry,
OUSTR("UseAcceleratedCanvas") );
OUString("UseAcceleratedCanvas") );
// try to reuse last working implementation for given service name
const CacheVector::iterator aEnd(m_aCachedImplementations.end());
......
......@@ -53,20 +53,20 @@ namespace nullcanvas
#define IMPLEMENTATION_NAME "NullCanvas.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;
}
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -75,20 +75,20 @@ namespace nullcanvas
#define IMPLEMENTATION_NAME "NullCanvas.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;
}
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -85,20 +85,20 @@ namespace nullcanvas
#define SERVICE_NAME "com.sun.star.rendering.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;
}
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -132,9 +132,9 @@ namespace nullcanvas
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 )
......
......@@ -231,20 +231,20 @@ namespace nullcanvas
#define SERVICE_NAME "com.sun.star.rendering.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;
}
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -178,7 +178,7 @@ namespace
// Ifc XServiceName
virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (uno::RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
return OUString( SERVICE_NAME );
}
// Ifc XSimpleCanvas
......
......@@ -82,9 +82,9 @@ namespace canvas
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)
......@@ -92,10 +92,10 @@ namespace canvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -1166,8 +1166,7 @@ namespace canvas
o_rxParams.realloc( 2 );
o_rxParams[ 0 ] = uno::makeAny( xServiceInfo->getImplementationName() );
o_rxParams[ 1 ] = uno::makeAny( xPropSet->getPropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DeviceHandle") ) ) );
o_rxParams[ 1 ] = uno::makeAny( xPropSet->getPropertyValue( "DeviceHandle" ) );
}
catch( const uno::Exception& )
{
......
......@@ -40,12 +40,12 @@ using namespace ::com::sun::star;
namespace canvas
{
uno::Sequence<rtl::OUString> ParametricPolyPolygon::getAvailableServiceNames()
uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
aRet[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LinearGradient" ));
aRet[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EllipticalGradient" ));
aRet[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RectangularGradient" ));
uno::Sequence<OUString> aRet(3);
aRet[0] = "LinearGradient";
aRet[1] = "EllipticalGradient";
aRet[2] = "RectangularGradient";
return aRet;
}
......@@ -203,9 +203,9 @@ namespace canvas
#define IMPLEMENTATION_NAME "Canvas::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)
......@@ -213,10 +213,10 @@ namespace canvas
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);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
uno::Sequence< OUString > aRet(1);
aRet[0] = SERVICE_NAME;
return aRet;
}
......
......@@ -26,22 +26,20 @@ namespace canvas
{
namespace
{
void throwUnknown( const ::rtl::OUString& aPropertyName )
void throwUnknown( const OUString& aPropertyName )
{
throw beans::UnknownPropertyException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) +
aPropertyName +
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not found." )),
"PropertySetHelper: property " +
aPropertyName + " not found.",
uno::Reference< uno::XInterface >()
);
}
void throwVeto( const ::rtl::OUString& aPropertyName )
void throwVeto( const OUString& aPropertyName )
{
throw beans::PropertyVetoException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PropertySetHelper: property " )) +
aPropertyName +
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " access was vetoed." )),
"PropertySetHelper: property " +
aPropertyName + " access was vetoed.",
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