diff options
-rw-r--r-- | desktop/source/migration/migration_impl.hxx | 31 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.hxx | 9 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 73 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeEngine.hxx | 58 | ||||
-rw-r--r-- | svx/source/unodraw/unoctabl.cxx | 2 |
5 files changed, 76 insertions, 97 deletions
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index 653813fbd2dd..714a7e485ce5 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -41,9 +41,6 @@ #include <com/sun/star/ui/XUIConfigurationManager.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> -#define NS_CSS com::sun::star -#define NS_UNO com::sun::star::uno - namespace desktop { @@ -89,7 +86,7 @@ struct MigrationItem ::rtl::OUString m_sParentNodeName; ::rtl::OUString m_sPrevSibling; ::rtl::OUString m_sCommandURL; - NS_UNO::Reference< NS_CSS::container::XIndexContainer > m_xPopupMenu; + css::uno::Reference< css::container::XIndexContainer > m_xPopupMenu; MigrationItem() :m_xPopupMenu(0) @@ -99,7 +96,7 @@ struct MigrationItem MigrationItem(const ::rtl::OUString& sParentNodeName, const ::rtl::OUString& sPrevSibling, const ::rtl::OUString& sCommandURL, - const NS_UNO::Reference< NS_CSS::container::XIndexContainer > xPopupMenu) + const css::uno::Reference< css::container::XIndexContainer > xPopupMenu) { m_sParentNodeName = sParentNodeName; m_sPrevSibling = sPrevSibling; @@ -167,16 +164,16 @@ class NewVersionUIInfo { public: - NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const; - NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const; - NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const; + css::uno::Reference< css::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const; + css::uno::Reference< css::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const; + css::uno::Reference< css::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const; void init(const ::std::vector< MigrationModuleInfo >& vModulesInfo); private: - NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lCfgManagerSeq; - NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq; - NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq; + css::uno::Sequence< css::beans::PropertyValue > m_lCfgManagerSeq; + css::uno::Sequence< css::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq; + css::uno::Sequence< css::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq; }; class MigrationImpl @@ -208,15 +205,15 @@ private: // helpers strings_vr getAllFiles(const rtl::OUString& baseURL) const; strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const; - NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False); + css::uno::Reference< css::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False); ::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const; void compareOldAndNewConfig(const ::rtl::OUString& sParentNodeName, - const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xOldIndexContainer, - const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xNewIndexContainer, + const css::uno::Reference< css::container::XIndexContainer >& xOldIndexContainer, + const css::uno::Reference< css::container::XIndexContainer >& xNewIndexContainer, const ::rtl::OUString& sToolbarName); - void mergeOldToNewVersion(const NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager >& xCfgManager, - const NS_UNO::Reference< NS_CSS::container::XIndexContainer>& xIndexContainer, + void mergeOldToNewVersion(const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgManager, + const css::uno::Reference< css::container::XIndexContainer>& xIndexContainer, const ::rtl::OUString& sModuleIdentifier, const ::rtl::OUString& sResourceURL); @@ -237,8 +234,6 @@ public: rtl::OUString getOldVersionName(); }; } -#undef NS_CSS -#undef NS_UNO #endif diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index bd766b748ae2..e1acd35fb3e0 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -71,15 +71,6 @@ using namespace ::com::sun::star::style; // ----------------------------------------------------------------------------- -#define NMSP_CPPU cppu -#define NMSP_UNO com::sun::star::uno -#define NMSP_LANG com::sun::star::lang -#define NMSP_SAX com::sun::star::xml::sax -#define NMSP_REGISTRY com::sun::star::registry - - -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > #define SVG_DTD_STRING OUString( "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" ) #define SVG_TINY_DTD_STRING OUString( "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG Tiny 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd\">" ) diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 81c12a9851b7..46bca87b1b5b 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -43,32 +43,35 @@ #include <basegfx/tools/unotools.hxx> #include <com/sun/star/document/XActionLockable.hpp> +using namespace css; +using namespace css::uno; + // --------------------------- // - EnhancedCustomShapeEngine - // --------------------------- -rtl::OUString EnhancedCustomShapeEngine_getImplementationName() - throw( NMSP_UNO::RuntimeException ) +OUString EnhancedCustomShapeEngine_getImplementationName() + throw( RuntimeException ) { return OUString( "com.sun.star.drawing.EnhancedCustomShapeEngine" ); } -sal_Bool SAL_CALL EnhancedCustomShapeEngine_supportsService( const rtl::OUString& ServiceName ) - throw( NMSP_UNO::RuntimeException ) +sal_Bool SAL_CALL EnhancedCustomShapeEngine_supportsService( const OUString& ServiceName ) + throw( RuntimeException ) { return ServiceName == "com.sun.star.drawing.CustomShapeEngine"; } -SEQ( rtl::OUString ) SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() - throw( NMSP_UNO::RuntimeException ) +Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() + throw( RuntimeException ) { - SEQ( rtl::OUString ) aRet(1); - rtl::OUString* pArray = aRet.getArray(); + Sequence< OUString > aRet(1); + OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.drawing.CustomShapeEngine"; return aRet; } // ----------------------------------------------------------------------------- -EnhancedCustomShapeEngine::EnhancedCustomShapeEngine( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ) : +EnhancedCustomShapeEngine::EnhancedCustomShapeEngine( const Reference< lang::XMultiServiceFactory >& rxMgr ) : mxFact ( rxMgr ), mbForceGroupWithText ( sal_False ) { @@ -90,11 +93,11 @@ void SAL_CALL EnhancedCustomShapeEngine::release() throw() // XInitialization ------------------------------------------------------------ -void SAL_CALL EnhancedCustomShapeEngine::initialize( const SEQ( NMSP_UNO::Any )& aArguments ) - throw ( NMSP_UNO::Exception, NMSP_UNO::RuntimeException ) +void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArguments ) + throw ( Exception, RuntimeException ) { sal_Int32 i; - SEQ( NMSP_BEANS::PropertyValue ) aParameter; + Sequence< beans::PropertyValue > aParameter; for ( i = 0; i < aArguments.getLength(); i++ ) { if ( aArguments[ i ] >>= aParameter ) @@ -102,7 +105,7 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const SEQ( NMSP_UNO::Any )& } for ( i = 0; i < aParameter.getLength(); i++ ) { - const NMSP_BEANS::PropertyValue& rProp = aParameter[ i ]; + const beans::PropertyValue& rProp = aParameter[ i ]; if ( rProp.Name == "CustomShape" ) rProp.Value >>= mxShape; else if ( rProp.Name == "ForceGroupWithText" ) @@ -112,18 +115,18 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const SEQ( NMSP_UNO::Any )& // XServiceInfo --------------------------------------------------------------- -rtl::OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName() - throw( NMSP_UNO::RuntimeException ) +OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName() + throw( RuntimeException ) { return EnhancedCustomShapeEngine_getImplementationName(); } -sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const rtl::OUString& rServiceName ) - throw( NMSP_UNO::RuntimeException ) +sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName ) + throw( RuntimeException ) { return EnhancedCustomShapeEngine_supportsService( rServiceName ); } -SEQ( rtl::OUString ) SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() - throw ( NMSP_UNO::RuntimeException ) +Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() + throw ( RuntimeException ) { return EnhancedCustomShapeEngine_getSupportedServiceNames(); } @@ -224,7 +227,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom return pRenderedShape; } -void SetTemporary( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) +void SetTemporary( uno::Reference< drawing::XShape >& xShape ) { if ( xShape.is() ) { @@ -234,10 +237,10 @@ void SetTemporary( ::com::sun::star::uno::Reference< ::com::sun::star::drawing:: } } -REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::render() - throw ( NMSP_UNO::RuntimeException ) +Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() + throw ( RuntimeException ) { - REF( com::sun::star::drawing::XShape ) xShape; + Reference< drawing::XShape > xShape; SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); if ( pSdrObjCustomShape ) { @@ -245,8 +248,8 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&) pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); sal_Bool bTextPathOn = sal_False; - const rtl::OUString sTextPath( "TextPath" ); - com::sun::star::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, sTextPath ); + const OUString sTextPath( "TextPath" ); + uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, sTextPath ); if ( pAny ) *pAny >>= bTextPathOn; @@ -333,12 +336,12 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende return xShape; } -com::sun::star::awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds() - throw ( NMSP_UNO::RuntimeException ) +awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds() + throw ( RuntimeException ) { - com::sun::star::awt::Rectangle aTextRect; + awt::Rectangle aTextRect; SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); - ::com::sun::star::uno::Reference< ::com::sun::star::document::XActionLockable > xLockable( mxShape, ::com::sun::star::uno::UNO_QUERY ); + uno::Reference< document::XActionLockable > xLockable( mxShape, uno::UNO_QUERY ); if ( pSdrObjCustomShape && pSdrObjCustomShape->GetModel() && xLockable.is() && !xLockable->isActionLocked() ) { if ( pSdrObjCustomShape ) @@ -354,10 +357,10 @@ com::sun::star::awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds return aTextRect; } -com::sun::star::drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeometry() - throw ( NMSP_UNO::RuntimeException ) +drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeometry() + throw ( RuntimeException ) { - com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords; + drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords; SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); if ( pSdrObjCustomShape ) { @@ -435,8 +438,8 @@ com::sun::star::drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEng return aPolyPolygonBezierCoords; } -SEQ( REF( com::sun::star::drawing::XCustomShapeHandle ) ) SAL_CALL EnhancedCustomShapeEngine::getInteraction() - throw ( NMSP_UNO::RuntimeException ) +Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShapeEngine::getInteraction() + throw ( RuntimeException ) { sal_uInt32 i, nHdlCount = 0; SdrObject* pSdrObjCustomShape = GetSdrObjectFromXShape( mxShape ); @@ -445,7 +448,7 @@ SEQ( REF( com::sun::star::drawing::XCustomShapeHandle ) ) SAL_CALL EnhancedCusto EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); nHdlCount = aCustomShape2d.GetHdlCount(); } - SEQ( REF( com::sun::star::drawing::XCustomShapeHandle ) ) aSeq( nHdlCount ); + Sequence< Reference< drawing::XCustomShapeHandle > > aSeq( nHdlCount ); for ( i = 0; i < nHdlCount; i++ ) aSeq[ i ] = new EnhancedCustomShapeHandle( mxShape, i ); return aSeq; diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx index 1c8fa43617b7..9c5faa150c21 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx @@ -33,16 +33,6 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/drawing/XCustomShapeEngine.hpp> -// ----------------------------------------------------------------------------- - -#define NMSP_UNO com::sun::star::uno -#define NMSP_BEANS com::sun::star::beans -#define NMSP_LANG com::sun::star::lang - - -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > - // --------------------------- // - EnhancedCustomShapeEngine - // --------------------------- @@ -52,19 +42,19 @@ class SdrObject; class SdrObjCustomShape; class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3 < - com::sun::star::lang::XInitialization, - com::sun::star::lang::XServiceInfo, - com::sun::star::drawing::XCustomShapeEngine + css::lang::XInitialization, + css::lang::XServiceInfo, + css::drawing::XCustomShapeEngine > { - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - REF( com::sun::star::drawing::XShape ) mxShape; + css::uno::Reference< css::lang::XMultiServiceFactory > mxFact; + css::uno::Reference< css::drawing::XShape > mxShape; sal_Bool mbForceGroupWithText; SdrObject* ImplForceGroupWithText( const SdrObjCustomShape* pCustoObj, SdrObject* pRenderedShape ); public: - EnhancedCustomShapeEngine( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); + EnhancedCustomShapeEngine( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr ); virtual ~EnhancedCustomShapeEngine(); // XInterface @@ -72,34 +62,34 @@ public: virtual void SAL_CALL release() throw(); // XInitialization - virtual void SAL_CALL initialize( const SEQ( NMSP_UNO::Any )& aArguments ) - throw ( NMSP_UNO::Exception, NMSP_UNO::RuntimeException ); + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException ); // XServiceInfo virtual rtl::OUString SAL_CALL getImplementationName() - throw ( NMSP_UNO::RuntimeException ); + throw ( css::uno::RuntimeException ); virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& rServiceName ) - throw ( NMSP_UNO::RuntimeException ); - virtual SEQ( rtl::OUString ) SAL_CALL getSupportedServiceNames() - throw ( NMSP_UNO::RuntimeException ); + throw ( css::uno::RuntimeException ); + virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + throw ( css::uno::RuntimeException ); // XCustomShapeEngine - virtual REF( com::sun::star::drawing::XShape ) SAL_CALL render() - throw ( NMSP_UNO::RuntimeException ); - virtual com::sun::star::awt::Rectangle SAL_CALL getTextBounds() - throw ( NMSP_UNO::RuntimeException ); - virtual com::sun::star::drawing::PolyPolygonBezierCoords SAL_CALL getLineGeometry() - throw ( NMSP_UNO::RuntimeException ); - virtual SEQ( REF( com::sun::star::drawing::XCustomShapeHandle ) ) SAL_CALL getInteraction() - throw ( NMSP_UNO::RuntimeException ); + virtual css::uno::Reference< css::drawing::XShape > SAL_CALL render() + throw ( css::uno::RuntimeException ); + virtual css::awt::Rectangle SAL_CALL getTextBounds() + throw ( css::uno::RuntimeException ); + virtual css::drawing::PolyPolygonBezierCoords SAL_CALL getLineGeometry() + throw ( css::uno::RuntimeException ); + virtual css::uno::Sequence< css::uno::Reference< css::drawing::XCustomShapeHandle > > SAL_CALL getInteraction() + throw ( css::uno::RuntimeException ); }; rtl::OUString EnhancedCustomShapeEngine_getImplementationName() - throw ( NMSP_UNO::RuntimeException ); + throw ( css::uno::RuntimeException ); sal_Bool SAL_CALL EnhancedCustomShapeEngine_supportsService( const rtl::OUString& rServiceName ) - throw( NMSP_UNO::RuntimeException ); -SEQ( rtl::OUString ) SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() - throw( NMSP_UNO::RuntimeException ); + throw( css::uno::RuntimeException ); +css::uno::Sequence< rtl::OUString > SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames() + throw( css::uno::RuntimeException ); #endif diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index f80416a134fe..0ea4b3a60a39 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -252,7 +252,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory ( } else if ( rtl_str_compare( pImplName, "com.sun.star.drawing.EnhancedCustomShapeEngine" ) == 0 ) { - xFactory = createSingleFactory( reinterpret_cast< NMSP_LANG::XMultiServiceFactory* >( pServiceManager ), + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), EnhancedCustomShapeEngine_getImplementationName(), create_EnhancedCustomShapeEngine, EnhancedCustomShapeEngine_getSupportedServiceNames() ); |