Kaydet (Commit) 48bfb52d authored tarafından Thomas Arnhold's avatar Thomas Arnhold

expand and remove NS_* macro

üst 8b035102
...@@ -37,15 +37,11 @@ ...@@ -37,15 +37,11 @@
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#define NS_BEANS ::com::sun::star::beans typedef ::com::sun::star::beans::PropertyValue* SbPropertyValuePtr;
#define NS_LANG ::com::sun::star::lang
#define NS_UNO ::com::sun::star::uno
typedef NS_BEANS::PropertyValue* SbPropertyValuePtr;
SV_DECL_PTRARR( SbPropertyValueArr_Impl, SbPropertyValuePtr, 4 ) SV_DECL_PTRARR( SbPropertyValueArr_Impl, SbPropertyValuePtr, 4 )
typedef ::cppu::WeakImplHelper2< NS_BEANS::XPropertySet, typedef ::cppu::WeakImplHelper2< ::com::sun::star::beans::XPropertySet,
NS_BEANS::XPropertyAccess > SbPropertyValuesHelper; ::com::sun::star::beans::XPropertyAccess > SbPropertyValuesHelper;
//========================================================================== //==========================================================================
...@@ -53,7 +49,7 @@ typedef ::cppu::WeakImplHelper2< NS_BEANS::XPropertySet, ...@@ -53,7 +49,7 @@ typedef ::cppu::WeakImplHelper2< NS_BEANS::XPropertySet,
class SbPropertyValues: public SbPropertyValuesHelper class SbPropertyValues: public SbPropertyValuesHelper
{ {
SbPropertyValueArr_Impl _aPropVals; SbPropertyValueArr_Impl _aPropVals;
NS_UNO::Reference< ::com::sun::star::beans::XPropertySetInfo > _xInfo; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > _xInfo;
private: private:
sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const;
...@@ -63,65 +59,65 @@ public: ...@@ -63,65 +59,65 @@ public:
virtual ~SbPropertyValues(); virtual ~SbPropertyValues();
// XPropertySet // XPropertySet
virtual NS_UNO::Reference< NS_BEANS::XPropertySetInfo > SAL_CALL virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo(void) throw( NS_UNO::RuntimeException ); getPropertySetInfo(void) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setPropertyValue( virtual void SAL_CALL setPropertyValue(
const ::rtl::OUString& aPropertyName, const ::rtl::OUString& aPropertyName,
const NS_UNO::Any& aValue) const ::com::sun::star::uno::Any& aValue)
throw (::com::sun::star::beans::UnknownPropertyException, throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::beans::PropertyVetoException, ::com::sun::star::beans::PropertyVetoException,
::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::lang::WrappedTargetException, ::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::RuntimeException);
virtual NS_UNO::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName )
throw( NS_BEANS::UnknownPropertyException, throw( ::com::sun::star::beans::UnknownPropertyException,
NS_LANG::WrappedTargetException, ::com::sun::star::lang::WrappedTargetException,
NS_UNO::RuntimeException); ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addPropertyChangeListener( virtual void SAL_CALL addPropertyChangeListener(
const ::rtl::OUString& aPropertyName, const ::rtl::OUString& aPropertyName,
const NS_UNO::Reference< NS_BEANS::XPropertyChangeListener >& ) const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& )
throw (); throw ();
virtual void SAL_CALL removePropertyChangeListener( virtual void SAL_CALL removePropertyChangeListener(
const ::rtl::OUString& aPropertyName, const ::rtl::OUString& aPropertyName,
const NS_UNO::Reference< NS_BEANS::XPropertyChangeListener >& ) const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& )
throw (); throw ();
virtual void SAL_CALL addVetoableChangeListener( virtual void SAL_CALL addVetoableChangeListener(
const ::rtl::OUString& aPropertyName, const ::rtl::OUString& aPropertyName,
const NS_UNO::Reference< NS_BEANS::XVetoableChangeListener >& ) const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& )
throw (); throw ();
virtual void SAL_CALL removeVetoableChangeListener( virtual void SAL_CALL removeVetoableChangeListener(
const ::rtl::OUString& aPropertyName, const ::rtl::OUString& aPropertyName,
const NS_UNO::Reference< NS_BEANS::XVetoableChangeListener >& ) const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& )
throw (); throw ();
// XPropertyAccess // XPropertyAccess
virtual NS_UNO::Sequence< NS_BEANS::PropertyValue > SAL_CALL getPropertyValues(void) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues(void) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues(const NS_UNO::Sequence< NS_BEANS::PropertyValue >& PropertyValues_) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setPropertyValues(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& PropertyValues_) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
}; };
//========================================================================== //==========================================================================
typedef ::cppu::WeakImplHelper1< NS_BEANS::XPropertySetInfo > SbPropertySetInfoHelper; typedef ::cppu::WeakImplHelper1< ::com::sun::star::beans::XPropertySetInfo > SbPropertySetInfoHelper;
// AB 20.3.2000 Help Class for XPropertySetInfo implementation // AB 20.3.2000 Help Class for XPropertySetInfo implementation
class PropertySetInfoImpl class PropertySetInfoImpl
{ {
friend class SbPropertySetInfo; friend class SbPropertySetInfo;
NS_UNO::Sequence< NS_BEANS::Property > _aProps; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > _aProps;
sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const;
public: public:
PropertySetInfoImpl(); PropertySetInfoImpl();
PropertySetInfoImpl( NS_UNO::Sequence< NS_BEANS::Property >& rProps ); PropertySetInfoImpl( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProps );
// XPropertySetInfo // XPropertySetInfo
NS_UNO::Sequence< NS_BEANS::Property > SAL_CALL getProperties(void) throw (); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) throw ();
NS_BEANS::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name)
throw( NS_UNO::RuntimeException ); throw( ::com::sun::star::uno::RuntimeException );
sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name)
throw ( NS_UNO::RuntimeException ); throw ( ::com::sun::star::uno::RuntimeException );
}; };
class SbPropertySetInfo: public SbPropertySetInfoHelper class SbPropertySetInfo: public SbPropertySetInfoHelper
...@@ -133,12 +129,12 @@ public: ...@@ -133,12 +129,12 @@ public:
virtual ~SbPropertySetInfo(); virtual ~SbPropertySetInfo();
// XPropertySetInfo // XPropertySetInfo
virtual NS_UNO::Sequence< NS_BEANS::Property > SAL_CALL getProperties(void) virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void)
throw( NS_UNO::RuntimeException ); throw( ::com::sun::star::uno::RuntimeException );
virtual NS_BEANS::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name)
throw( NS_UNO::RuntimeException ); throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name)
throw( NS_UNO::RuntimeException ); throw( ::com::sun::star::uno::RuntimeException );
}; };
//========================================================================= //=========================================================================
...@@ -148,13 +144,6 @@ class SbxArray; ...@@ -148,13 +144,6 @@ class SbxArray;
void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
#undef NS_BEANS
#undef NS_LANG
#undef NS_UNO
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -97,12 +97,6 @@ public: ...@@ -97,12 +97,6 @@ public:
SV_DECL_IMPL_REF( UcbLockBytesHandler ) SV_DECL_IMPL_REF( UcbLockBytesHandler )
#define NS_UNO ::com::sun::star::uno
#define NS_IO ::com::sun::star::io
#define NS_UCB ::com::sun::star::ucb
#define NS_BEANS ::com::sun::star::beans
#define NS_TASK ::com::sun::star::task
class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
{ {
osl::Condition m_aInitialized; osl::Condition m_aInitialized;
...@@ -113,9 +107,9 @@ class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes ...@@ -113,9 +107,9 @@ class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
String m_aRealURL; String m_aRealURL;
DateTime m_aExpireDate; DateTime m_aExpireDate;
NS_UNO::Reference < NS_IO::XInputStream > m_xInputStream; ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xInputStream;
NS_UNO::Reference < NS_IO::XOutputStream > m_xOutputStream; ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > m_xOutputStream;
NS_UNO::Reference < NS_IO::XSeekable > m_xSeekable; ::com::sun::star::uno::Reference < ::com::sun::star::io::XSeekable > m_xSeekable;
void* m_pCommandThread; // is alive only for compatibility reasons void* m_pCommandThread; // is alive only for compatibility reasons
UcbLockBytesHandlerRef m_xHandler; UcbLockBytesHandlerRef m_xHandler;
...@@ -135,21 +129,21 @@ protected: ...@@ -135,21 +129,21 @@ protected:
public: public:
// properties: Referer, PostMimeType // properties: Referer, PostMimeType
static UcbLockBytesRef CreateLockBytes( const NS_UNO::Reference < NS_UCB::XContent >& xContent, static UcbLockBytesRef CreateLockBytes( const ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XContent >& xContent,
const ::rtl::OUString& rReferer, const ::rtl::OUString& rReferer,
const ::rtl::OUString& rMediaType, const ::rtl::OUString& rMediaType,
const NS_UNO::Reference < NS_IO::XInputStream >& xPostData, const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream >& xPostData,
const NS_UNO::Reference < NS_TASK::XInteractionHandler >& xInter, const ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler >& xInter,
UcbLockBytesHandler* pHandler=0 ); UcbLockBytesHandler* pHandler=0 );
static UcbLockBytesRef CreateLockBytes( const NS_UNO::Reference < NS_UCB::XContent >& xContent, static UcbLockBytesRef CreateLockBytes( const ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XContent >& xContent,
const NS_UNO::Sequence < NS_BEANS::PropertyValue >& rProps, const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rProps,
StreamMode eMode, StreamMode eMode,
const NS_UNO::Reference < NS_TASK::XInteractionHandler >& xInter, const ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler >& xInter,
UcbLockBytesHandler* pHandler=0 ); UcbLockBytesHandler* pHandler=0 );
static UcbLockBytesRef CreateInputLockBytes( const NS_UNO::Reference < NS_IO::XInputStream >& xContent ); static UcbLockBytesRef CreateInputLockBytes( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream >& xContent );
static UcbLockBytesRef CreateLockBytes( const NS_UNO::Reference < NS_IO::XStream >& xContent ); static UcbLockBytesRef CreateLockBytes( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream >& xContent );
// SvLockBytes // SvLockBytes
virtual void SetSynchronMode (sal_Bool bSynchron); virtual void SetSynchronMode (sal_Bool bSynchron);
...@@ -173,27 +167,27 @@ public: ...@@ -173,27 +167,27 @@ public:
DateTime GetExpireDate() const; DateTime GetExpireDate() const;
// calling this method delegates the responsibility to call closeinput to the caller! // calling this method delegates the responsibility to call closeinput to the caller!
NS_UNO::Reference < NS_IO::XInputStream > getInputStream(); ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > getInputStream();
#if _SOLAR__PRIVATE #if _SOLAR__PRIVATE
sal_Bool setInputStream_Impl( const NS_UNO::Reference < NS_IO::XInputStream > &rxInputStream, sal_Bool setInputStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > &rxInputStream,
sal_Bool bSetXSeekable = sal_True ); sal_Bool bSetXSeekable = sal_True );
sal_Bool setStream_Impl( const NS_UNO::Reference < NS_IO::XStream > &rxStream ); sal_Bool setStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > &rxStream );
void terminate_Impl (void); void terminate_Impl (void);
NS_UNO::Reference < NS_IO::XInputStream > getInputStream_Impl() const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > getInputStream_Impl() const
{ {
osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex ); osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex );
return m_xInputStream; return m_xInputStream;
} }
NS_UNO::Reference < NS_IO::XOutputStream > getOutputStream_Impl() const ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > getOutputStream_Impl() const
{ {
osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex ); osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex );
return m_xOutputStream; return m_xOutputStream;
} }
NS_UNO::Reference < NS_IO::XSeekable > getSeekable_Impl() const ::com::sun::star::uno::Reference < ::com::sun::star::io::XSeekable > getSeekable_Impl() const
{ {
osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex ); osl::MutexGuard aGuard( SAL_CONST_CAST(UcbLockBytes*, this)->m_aMutex );
return m_xSeekable; return m_xSeekable;
......
...@@ -54,10 +54,6 @@ namespace com ...@@ -54,10 +54,6 @@ namespace com
} }
} }
#define NS_UNO ::com::sun::star::uno
#define NS_IO ::com::sun::star::io
#define NS_TASK ::com::sun::star::task
class String; class String;
namespace utl namespace utl
{ {
...@@ -69,15 +65,15 @@ namespace utl ...@@ -69,15 +65,15 @@ namespace utl
static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode, static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
UcbLockBytesHandler* pHandler=0 ); UcbLockBytesHandler* pHandler=0 );
static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode, static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
NS_UNO::Reference < NS_TASK::XInteractionHandler >, ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler >,
UcbLockBytesHandler* pHandler=0 ); UcbLockBytesHandler* pHandler=0 );
static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode, static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
sal_Bool bFileExists, sal_Bool bFileExists,
UcbLockBytesHandler* pHandler=0 ); UcbLockBytesHandler* pHandler=0 );
static SvStream* CreateStream( NS_UNO::Reference < NS_IO::XInputStream > xStream ); static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xStream );
static SvStream* CreateStream( NS_UNO::Reference < NS_IO::XStream > xStream ); static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > xStream );
static SvStream* CreateStream( NS_UNO::Reference < NS_IO::XInputStream > xStream, sal_Bool bCloseStream ); static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xStream, sal_Bool bCloseStream );
static SvStream* CreateStream( NS_UNO::Reference < NS_IO::XStream > xStream, sal_Bool bCloseStream ); static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > xStream, sal_Bool bCloseStream );
}; };
} }
......
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