diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-08-20 21:30:16 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-08-21 09:03:18 +0200 |
commit | 007099ea3283bedfb0fe9a4c10f7331f8fc8bb73 (patch) | |
tree | 8c6dd1a512a8aaea6e46e70e04fe8d618384ef64 /include | |
parent | 8fd3b0945607816fc7a73cec4eeb5c045bc2a450 (diff) |
comphelper: staruno -> css::uno
Change-Id: I21991280c5b7e4c6d0c200f4489c89a9f4fbc385
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/basicio.hxx | 33 | ||||
-rw-r--r-- | include/comphelper/enumhelper.hxx | 41 | ||||
-rw-r--r-- | include/comphelper/numbers.hxx | 9 | ||||
-rw-r--r-- | include/comphelper/oslfile2streamwrap.hxx | 18 | ||||
-rw-r--r-- | include/comphelper/proparrhlp.hxx | 5 | ||||
-rw-r--r-- | include/comphelper/property.hxx | 23 | ||||
-rw-r--r-- | include/comphelper/sequence.hxx | 18 | ||||
-rw-r--r-- | include/comphelper/streamsection.hxx | 11 | ||||
-rw-r--r-- | include/comphelper/types.hxx | 53 |
9 files changed, 94 insertions, 117 deletions
diff --git a/include/comphelper/basicio.hxx b/include/comphelper/basicio.hxx index feb530272a0c..e5bcd77b77d5 100644 --- a/include/comphelper/basicio.hxx +++ b/include/comphelper/basicio.hxx @@ -30,43 +30,42 @@ namespace comphelper namespace stario = ::com::sun::star::io; -namespace staruno = ::com::sun::star::uno; namespace starawt = ::com::sun::star::awt; // bool -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal); void operator <<( css::uno::Reference<css::io::XObjectOutputStream> const &, sal_Bool) SAL_DELETED_FUNCTION; // OUString -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& _rStr); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& _rStr); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& _rStr); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& _rStr); // sal_Int16 -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue); // sal_uInt16 -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue); // sal_uInt32 -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue); // sal_Int16 -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue); // FontDescriptor -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& InStream, starawt::FontDescriptor& rVal); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& OutStream, const starawt::FontDescriptor& rVal); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& InStream, starawt::FontDescriptor& rVal); +COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& OutStream, const starawt::FontDescriptor& rVal); // sequences template <class ELEMENT> -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, staruno::Sequence<ELEMENT>& _rSeq) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, css::uno::Sequence<ELEMENT>& _rSeq) { sal_Int32 nLen = _rxInStream->readLong(); _rSeq.realloc(nLen); @@ -80,7 +79,7 @@ const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno } template <class ELEMENT> -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const staruno::Sequence<ELEMENT>& _rSeq) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, const css::uno::Sequence<ELEMENT>& _rSeq) { sal_Int32 nLen = _rSeq.getLength(); _rxOutStream->writeLong(nLen); diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx index 4a13989d0897..ce3de4f8e32a 100644 --- a/include/comphelper/enumhelper.hxx +++ b/include/comphelper/enumhelper.hxx @@ -36,7 +36,6 @@ namespace comphelper namespace starcontainer = ::com::sun::star::container; - namespace staruno = ::com::sun::star::uno; namespace starlang = ::com::sun::star::lang; @@ -58,22 +57,22 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName : private OEnumerationLock , public ::cppu::WeakImplHelper2< starcontainer::XEnumeration , starlang::XEventListener > { - staruno::Sequence< OUString > m_aNames; + css::uno::Sequence< OUString > m_aNames; sal_Int32 m_nPos; - staruno::Reference< starcontainer::XNameAccess > m_xAccess; + css::uno::Reference< starcontainer::XNameAccess > m_xAccess; bool m_bListening; public: - OEnumerationByName(const staruno::Reference< starcontainer::XNameAccess >& _rxAccess); - OEnumerationByName(const staruno::Reference< starcontainer::XNameAccess >& _rxAccess, - const staruno::Sequence< OUString >& _aNames ); + OEnumerationByName(const css::uno::Reference< starcontainer::XNameAccess >& _rxAccess); + OEnumerationByName(const css::uno::Reference< starcontainer::XNameAccess >& _rxAccess, + const css::uno::Sequence< OUString >& _aNames ); virtual ~OEnumerationByName(); - virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual staruno::Any SAL_CALL nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Any SAL_CALL nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL disposing(const starlang::EventObject& aEvent) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL disposing(const starlang::EventObject& aEvent) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: COMPHELPER_DLLPRIVATE void impl_startDisposeListening(); @@ -91,18 +90,18 @@ class COMPHELPER_DLLPUBLIC OEnumerationByIndex : private OEnumerationLock starlang::XEventListener > { sal_Int32 m_nPos; - staruno::Reference< starcontainer::XIndexAccess > m_xAccess; + css::uno::Reference< starcontainer::XIndexAccess > m_xAccess; bool m_bListening; public: - OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess); + OEnumerationByIndex(const css::uno::Reference< starcontainer::XIndexAccess >& _rxAccess); virtual ~OEnumerationByIndex(); - virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual staruno::Any SAL_CALL nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Any SAL_CALL nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL disposing(const starlang::EventObject& aEvent) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL disposing(const starlang::EventObject& aEvent) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: COMPHELPER_DLLPRIVATE void impl_startDisposeListening(); @@ -120,15 +119,15 @@ class COMPHELPER_DLLPUBLIC OAnyEnumeration : private OEnumerationLock , public ::cppu::WeakImplHelper1< starcontainer::XEnumeration > { sal_Int32 m_nPos; - staruno::Sequence< staruno::Any > m_lItems; + css::uno::Sequence< css::uno::Any > m_lItems; public: - OAnyEnumeration(const staruno::Sequence< staruno::Any >& lItems); + OAnyEnumeration(const css::uno::Sequence< css::uno::Any >& lItems); virtual ~OAnyEnumeration(); - virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual staruno::Any SAL_CALL nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual css::uno::Any SAL_CALL nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; diff --git a/include/comphelper/numbers.hxx b/include/comphelper/numbers.hxx index 373a74112c24..a52b8b8c8c25 100644 --- a/include/comphelper/numbers.hxx +++ b/include/comphelper/numbers.hxx @@ -30,23 +30,22 @@ namespace comphelper { - namespace staruno = ::com::sun::star::uno; namespace starlang = ::com::sun::star::lang; namespace starutil = ::com::sun::star::util; /// returns the ::com::sun::star::util::NumberFormat of the given key under the given formats - COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); /// returns the ::com::sun::star::util::NumberFormat of the given key under the given formatter - COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey); /// returns the decimals of the given numeric number formatunder the given formats - COMPHELPER_DLLPUBLIC staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); + COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatDecimals(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey); /** returns the standard format for the given type and the given _rLocale */ sal_Int32 getStandardFormat( - const staruno::Reference<starutil::XNumberFormatter>& xFormatter, + const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int16 nType, const starlang::Locale& _rLocale); diff --git a/include/comphelper/oslfile2streamwrap.hxx b/include/comphelper/oslfile2streamwrap.hxx index f559426257d9..230c88b385ea 100644 --- a/include/comphelper/oslfile2streamwrap.hxx +++ b/include/comphelper/oslfile2streamwrap.hxx @@ -29,8 +29,6 @@ namespace comphelper { namespace stario = ::com::sun::star::io; - namespace staruno = ::com::sun::star::uno; - // FmUnoIOStream, // Stream to read and write data, based on File @@ -45,11 +43,11 @@ public: virtual ~OSLInputStreamWrapper(); // stario::XInputStream - virtual sal_Int32 SAL_CALL readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL available() throw(stario::NotConnectedException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL closeInput() throw(stario::NotConnectedException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Int32 SAL_CALL available() throw(stario::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL closeInput() throw(stario::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; @@ -65,9 +63,9 @@ private: virtual ~OSLOutputStreamWrapper(); // stario::XOutputStream - virtual void SAL_CALL writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL closeOutput() throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL closeOutput() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; ::osl::File& rFile; }; diff --git a/include/comphelper/proparrhlp.hxx b/include/comphelper/proparrhlp.hxx index 7ca60f86a70f..ece8c3257534 100644 --- a/include/comphelper/proparrhlp.hxx +++ b/include/comphelper/proparrhlp.hxx @@ -33,14 +33,9 @@ namespace cppu { //... namespace comphelper ................................................ namespace comphelper { - - - namespace staruno = ::com::sun::star::uno; namespace starbeans = ::com::sun::star::beans; - - template <typename TYPE> struct OPropertyArrayUsageHelperMutex : public rtl::Static< ::osl::Mutex, OPropertyArrayUsageHelperMutex<TYPE> > {}; diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx index fd7ed830b8d3..71fd71c07e76 100644 --- a/include/comphelper/property.hxx +++ b/include/comphelper/property.hxx @@ -35,10 +35,7 @@ //... namespace comphelper ....................................................... namespace comphelper { - - namespace starbeans = ::com::sun::star::beans; - namespace staruno = ::com::sun::star::uno; /** compare two properties by name */ @@ -80,7 +77,7 @@ namespace comphelper /// remove the property with the given name from the given sequence -COMPHELPER_DLLPUBLIC void RemoveProperty(staruno::Sequence<starbeans::Property>& seqProps, const OUString& _rPropName); +COMPHELPER_DLLPUBLIC void RemoveProperty(css::uno::Sequence<starbeans::Property>& seqProps, const OUString& _rPropName); /** within the given property sequence, modify attributes of a special property @@ -89,19 +86,19 @@ COMPHELPER_DLLPUBLIC void RemoveProperty(staruno::Sequence<starbeans::Property>& @param _nAddAttrib the attributes which should be added @param _nRemoveAttrib the attributes which should be removed */ -COMPHELPER_DLLPUBLIC void ModifyPropertyAttributes(staruno::Sequence<starbeans::Property>& _rProps, const OUString& _sPropName, sal_Int16 _nAddAttrib, sal_Int16 _nRemoveAttrib); +COMPHELPER_DLLPUBLIC void ModifyPropertyAttributes(css::uno::Sequence<starbeans::Property>& _rProps, const OUString& _sPropName, sal_Int16 _nAddAttrib, sal_Int16 _nRemoveAttrib); /** check if the given set has the given property. */ -COMPHELPER_DLLPUBLIC bool hasProperty(const OUString& _rName, const staruno::Reference<starbeans::XPropertySet>& _rxSet); +COMPHELPER_DLLPUBLIC bool hasProperty(const OUString& _rName, const css::uno::Reference<starbeans::XPropertySet>& _rxSet); /** copy properties between property sets, in compliance with the property attributes of the target object */ -COMPHELPER_DLLPUBLIC void copyProperties(const staruno::Reference<starbeans::XPropertySet>& _rxSource, - const staruno::Reference<starbeans::XPropertySet>& _rxDest); +COMPHELPER_DLLPUBLIC void copyProperties(const css::uno::Reference<starbeans::XPropertySet>& _rxSource, + const css::uno::Reference<starbeans::XPropertySet>& _rxDest); //= property conversion helpers @@ -117,7 +114,7 @@ COMPHELPER_DLLPUBLIC void copyProperties(const staruno::Reference<starbeans::XPr @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ template <typename T> -bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const T& _rCurrentValue) +bool tryPropertyValue(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, const T& _rCurrentValue) { bool bModified(false); T aNewValue = T(); @@ -141,10 +138,10 @@ bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ template <class ENUMTYPE> -bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const ENUMTYPE& _rCurrentValue) +bool tryPropertyValueEnum(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, const ENUMTYPE& _rCurrentValue) { if (cppu::getTypeFavourUnsigned(&_rCurrentValue).getTypeClass() - != staruno::TypeClass_ENUM) + != css::uno::TypeClass_ENUM) return tryPropertyValue(_rConvertedValue, _rOldValue, _rValueToSet, _rCurrentValue); bool bModified(false); @@ -170,7 +167,7 @@ bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::Any& / sal_False, if the value could be converted and has not changed @exception InvalidArgumentException thrown if the value could not be converted to a boolean type */ -inline bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, bool _bCurrentValue) +inline bool tryPropertyValue(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, bool _bCurrentValue) { bool bModified(false); sal_Bool bNewValue(sal_False); @@ -194,7 +191,7 @@ inline bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any sal_False, if the value could be converted and has not changed @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ -COMPHELPER_DLLPUBLIC bool tryPropertyValue(staruno::Any& _rConvertedValue, staruno::Any& _rOldValue, const staruno::Any& _rValueToSet, const staruno::Any& _rCurrentValue, const staruno::Type& _rExpectedType); +COMPHELPER_DLLPUBLIC bool tryPropertyValue(css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, const css::uno::Any& _rValueToSet, const css::uno::Any& _rCurrentValue, const css::uno::Type& _rExpectedType); } diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx index 6dd4f9cc7225..06390b05fade 100644 --- a/include/comphelper/sequence.hxx +++ b/include/comphelper/sequence.hxx @@ -27,18 +27,12 @@ #include <vector> - namespace comphelper { - - - namespace staruno = ::com::sun::star::uno; - - /** search the given string within the given sequence, return the positions where it was found. if _bOnlyFirst is sal_True, only the first occurrence will be returned. */ - COMPHELPER_DLLPUBLIC staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst = false); + COMPHELPER_DLLPUBLIC css::uno::Sequence<sal_Int16> findValue(const css::uno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst = false); namespace internal { @@ -52,14 +46,14 @@ namespace comphelper /// concat two sequences template <class T> - staruno::Sequence<T> concatSequences(const staruno::Sequence<T>& _rLeft, const staruno::Sequence<T>& _rRight) + css::uno::Sequence<T> concatSequences(const css::uno::Sequence<T>& _rLeft, const css::uno::Sequence<T>& _rRight) { sal_Int32 nLeft(_rLeft.getLength()), nRight(_rRight.getLength()); const T* pLeft = _rLeft.getConstArray(); const T* pRight = _rRight.getConstArray(); sal_Int32 nReturnLen(nLeft + nRight); - staruno::Sequence<T> aReturn(nReturnLen); + css::uno::Sequence<T> aReturn(nReturnLen); T* pReturn = aReturn.getArray(); internal::implCopySequence(pLeft, pReturn, nLeft); @@ -71,7 +65,7 @@ namespace comphelper /// concat three sequences template <class T> - staruno::Sequence<T> concatSequences(const staruno::Sequence<T>& _rLeft, const staruno::Sequence<T>& _rMiddle, const staruno::Sequence<T>& _rRight) + css::uno::Sequence<T> concatSequences(const css::uno::Sequence<T>& _rLeft, const css::uno::Sequence<T>& _rMiddle, const css::uno::Sequence<T>& _rRight) { sal_Int32 nLeft(_rLeft.getLength()), nMiddle(_rMiddle.getLength()), nRight(_rRight.getLength()); const T* pLeft = _rLeft.getConstArray(); @@ -79,7 +73,7 @@ namespace comphelper const T* pRight = _rRight.getConstArray(); sal_Int32 nReturnLen(nLeft + nMiddle + nRight); - staruno::Sequence<T> aReturn(nReturnLen); + css::uno::Sequence<T> aReturn(nReturnLen); T* pReturn = aReturn.getArray(); internal::implCopySequence(pLeft, pReturn, nLeft); @@ -92,7 +86,7 @@ namespace comphelper /// remove a specified element from a sequences template<class T> - void removeElementAt(staruno::Sequence<T>& _rSeq, sal_Int32 _nPos) + void removeElementAt(css::uno::Sequence<T>& _rSeq, sal_Int32 _nPos) { sal_Int32 nLength = _rSeq.getLength(); diff --git a/include/comphelper/streamsection.hxx b/include/comphelper/streamsection.hxx index becf3fece45c..72545d0ec681 100644 --- a/include/comphelper/streamsection.hxx +++ b/include/comphelper/streamsection.hxx @@ -29,7 +29,6 @@ namespace comphelper { namespace stario = ::com::sun::star::io; - namespace staruno = ::com::sun::star::uno; /** implements handling for compatibly reading/writing data from/into an input/output stream. data written in a block secured by this class should be readable by older versions which @@ -41,9 +40,9 @@ namespace comphelper class COMPHELPER_DLLPUBLIC OStreamSection { - staruno::Reference< stario::XMarkableStream > m_xMarkStream; - staruno::Reference< stario::XDataInputStream > m_xInStream; - staruno::Reference< stario::XDataOutputStream > m_xOutStream; + css::uno::Reference< stario::XMarkableStream > m_xMarkStream; + css::uno::Reference< stario::XDataInputStream > m_xInStream; + css::uno::Reference< stario::XDataOutputStream > m_xOutStream; sal_Int32 m_nBlockStart; sal_Int32 m_nBlockLen; @@ -53,7 +52,7 @@ public: @param _rxInput the stream to read from. Must support the com::sun::star::io::XMarkableStream interface */ - OStreamSection(const staruno::Reference< stario::XDataInputStream >& _rxInput); + OStreamSection(const css::uno::Reference< stario::XDataInputStream >& _rxInput); /** starts writing of a "skippable" section of data into the given output stream @param _rxOutput the stream the stream to write to. Must support the @@ -63,7 +62,7 @@ public: needed. If you know how much bytes you are about to write, you may want to use this param, saving some stream operations this way. */ - OStreamSection(const staruno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength = 0); + OStreamSection(const css::uno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength = 0); /** dtor. <BR>If constructed for writing, the section "opened" by this object will be "closed".<BR> If constructed for reading, any remaining bytes 'til the end of the section will be skipped. diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx index b91b24c3c3c1..d606f1b28099 100644 --- a/include/comphelper/types.hxx +++ b/include/comphelper/types.hxx @@ -37,21 +37,18 @@ namespace com { namespace sun { namespace star { namespace awt { namespace comphelper { - - - namespace staruno = ::com::sun::star::uno; namespace starawt = ::com::sun::star::awt; namespace starlang = ::com::sun::star::lang; - typedef staruno::Reference< staruno::XInterface > InterfaceRef; - typedef staruno::Sequence< OUString > StringSequence; + typedef css::uno::Reference< css::uno::XInterface > InterfaceRef; + typedef css::uno::Sequence< OUString > StringSequence; /** compare the two given Anys The comparison is deep, means if one of the Any's contains an Any which contains an Any ..., this is resolved <br/> - Other types recognized currently : FontDescriptor, ::com::sun::star::util::Date/Tim/DateTime, staruno::Sequence<sal_Int8> + Other types recognized currently : FontDescriptor, ::com::sun::star::util::Date/Tim/DateTime, css::uno::Sequence<sal_Int8> */ - COMPHELPER_DLLPUBLIC bool compare(const staruno::Any& rLeft, const staruno::Any& rRight); + COMPHELPER_DLLPUBLIC bool compare(const css::uno::Any& rLeft, const css::uno::Any& rRight); /** compare two FontDescriptor's @@ -64,7 +61,7 @@ namespace comphelper /// returns sal_True if objects of the types given are "compatible" - COMPHELPER_DLLPUBLIC bool isAssignableFrom(const staruno::Type& _rAssignable, const staruno::Type& _rFrom); + COMPHELPER_DLLPUBLIC bool isAssignableFrom(const css::uno::Type& _rAssignable, const css::uno::Type& _rFrom); /** just a small shortcut ... @@ -75,7 +72,7 @@ namespace comphelper So this function is nearly senseless .... */ template <class TYPE> - bool isA(const staruno::Type& _rType, TYPE* pDummy) + bool isA(const css::uno::Type& _rType, TYPE* pDummy) { return _rType.equals(cppu::getTypeFavourUnsigned(pDummy)); } @@ -85,7 +82,7 @@ namespace comphelper same comment as for the other isA .... */ template <class TYPE> - bool isA(const staruno::Any& _rVal, TYPE* pDummy) + bool isA(const css::uno::Any& _rVal, TYPE* pDummy) { return _rVal.getValueType().equals( cppu::getTypeFavourUnsigned(pDummy)); @@ -95,20 +92,20 @@ namespace comphelper /** check if a type you have at hand at runtime is equal to another type you have at compile time */ template <class TYPE> - bool isAReference(const staruno::Any& _rVal, TYPE*) + bool isAReference(const css::uno::Any& _rVal, TYPE*) { return _rVal.getValueType().equals( cppu::getTypeFavourUnsigned( - static_cast<staruno::Reference<TYPE>*>(NULL))); + static_cast<css::uno::Reference<TYPE>*>(NULL))); } /** ask the given object for an XComponent interface and dispose on it */ template <class TYPE> - void disposeComponent(staruno::Reference<TYPE>& _rxComp) + void disposeComponent(css::uno::Reference<TYPE>& _rxComp) { - staruno::Reference<starlang::XComponent> xComp(_rxComp, staruno::UNO_QUERY); + css::uno::Reference<starlang::XComponent> xComp(_rxComp, css::uno::UNO_QUERY); if (xComp.is()) { xComp->dispose(); @@ -117,10 +114,10 @@ namespace comphelper } template <class TYPE> - bool getImplementation(TYPE*& _pObject, const staruno::Reference< staruno::XInterface >& _rxIFace) + bool getImplementation(TYPE*& _pObject, const css::uno::Reference< css::uno::XInterface >& _rxIFace) { _pObject = NULL; - staruno::Reference< starlang::XUnoTunnel > xTunnel(_rxIFace, staruno::UNO_QUERY); + css::uno::Reference< starlang::XUnoTunnel > xTunnel(_rxIFace, css::uno::UNO_QUERY); if (xTunnel.is()) _pObject = reinterpret_cast< TYPE* >(xTunnel->getSomething(TYPE::getUnoTunnelImplementationId())); @@ -137,7 +134,7 @@ namespace comphelper /** examine a sequence for the com.sun.star.uno::Type of it's elements. */ - COMPHELPER_DLLPUBLIC staruno::Type getSequenceElementType(const staruno::Type& _rSequenceType); + COMPHELPER_DLLPUBLIC css::uno::Type getSequenceElementType(const css::uno::Type& _rSequenceType); //= replacement of the former UsrAny.getXXX methods @@ -147,23 +144,23 @@ namespace comphelper // no, we don't use templates here. This would lead to a lot of implicit uses of the conversion methods, // which would be difficult to trace ... - COMPHELPER_DLLPUBLIC sal_Int64 getINT64(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC double getDouble(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC float getFloat(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC OUString getString(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC bool getBOOL(const staruno::Any& _rAny); + COMPHELPER_DLLPUBLIC sal_Int64 getINT64(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC double getDouble(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC float getFloat(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC OUString getString(const css::uno::Any& _rAny); + COMPHELPER_DLLPUBLIC bool getBOOL(const css::uno::Any& _rAny); - COMPHELPER_DLLPUBLIC sal_Int32 getEnumAsINT32(const staruno::Any& _rAny) throw(starlang::IllegalArgumentException); + COMPHELPER_DLLPUBLIC sal_Int32 getEnumAsINT32(const css::uno::Any& _rAny) throw(starlang::IllegalArgumentException); //= replacement of some former UsrAny.setXXX methods - can be used with rvalues - inline void setBOOL(staruno::Any& _rAny, bool _b) + inline void setBOOL(css::uno::Any& _rAny, bool _b) { _rAny.setValue(&_b, ::getBooleanCppuType()); } //= extension of ::cppu::makeAny() - inline staruno::Any makeBoolAny(bool _b) - { return staruno::Any(&_b, ::getBooleanCppuType()); } + inline css::uno::Any makeBoolAny(bool _b) + { return css::uno::Any(&_b, ::getBooleanCppuType()); } } // namespace comphelper |