diff options
-rw-r--r-- | comphelper/source/container/enumhelper.cxx | 44 | ||||
-rw-r--r-- | comphelper/source/misc/numbers.cxx | 24 | ||||
-rw-r--r-- | comphelper/source/misc/sequence.cxx | 8 | ||||
-rw-r--r-- | comphelper/source/streaming/basicio.cxx | 32 | ||||
-rw-r--r-- | comphelper/source/streaming/oslfile2streamwrap.cxx | 48 | ||||
-rw-r--r-- | comphelper/source/streaming/streamsection.cxx | 6 | ||||
-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 |
15 files changed, 175 insertions, 198 deletions
diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx index 343b27655a95..83f53623337c 100644 --- a/comphelper/source/container/enumhelper.cxx +++ b/comphelper/source/container/enumhelper.cxx @@ -29,7 +29,7 @@ namespace comphelper //= OEnumerationByName -OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess) +OEnumerationByName::OEnumerationByName(const css::uno::Reference<starcontainer::XNameAccess>& _rxAccess) :m_aNames(_rxAccess->getElementNames()) ,m_nPos(0) ,m_xAccess(_rxAccess) @@ -39,8 +39,8 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X } -OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess, - const staruno::Sequence< OUString >& _aNames ) +OEnumerationByName::OEnumerationByName(const css::uno::Reference<starcontainer::XNameAccess>& _rxAccess, + const css::uno::Sequence< OUString >& _aNames ) :m_aNames(_aNames) ,m_nPos(0) ,m_xAccess(_rxAccess) @@ -56,7 +56,7 @@ OEnumerationByName::~OEnumerationByName() } -sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(staruno::RuntimeException, std::exception) +sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -73,12 +73,12 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(staruno::Runtime } -staruno::Any SAL_CALL OEnumerationByName::nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) +css::uno::Any SAL_CALL OEnumerationByName::nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); - staruno::Any aRes; + css::uno::Any aRes; if (m_xAccess.is() && m_nPos < m_aNames.getLength()) aRes = m_xAccess->getByName(m_aNames.getConstArray()[m_nPos++]); @@ -96,7 +96,7 @@ staruno::Any SAL_CALL OEnumerationByName::nextElement( ) void SAL_CALL OEnumerationByName::disposing(const starlang::EventObject& aEvent) - throw(staruno::RuntimeException, std::exception) + throw(css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -113,7 +113,7 @@ void OEnumerationByName::impl_startDisposeListening() return; ++m_refCount; - staruno::Reference< starlang::XComponent > xDisposable(m_xAccess, staruno::UNO_QUERY); + css::uno::Reference< starlang::XComponent > xDisposable(m_xAccess, css::uno::UNO_QUERY); if (xDisposable.is()) { xDisposable->addEventListener(this); @@ -131,7 +131,7 @@ void OEnumerationByName::impl_stopDisposeListening() return; ++m_refCount; - staruno::Reference< starlang::XComponent > xDisposable(m_xAccess, staruno::UNO_QUERY); + css::uno::Reference< starlang::XComponent > xDisposable(m_xAccess, css::uno::UNO_QUERY); if (xDisposable.is()) { xDisposable->removeEventListener(this); @@ -144,7 +144,7 @@ void OEnumerationByName::impl_stopDisposeListening() //= OEnumerationByIndex -OEnumerationByIndex::OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess) +OEnumerationByIndex::OEnumerationByIndex(const css::uno::Reference< starcontainer::XIndexAccess >& _rxAccess) :m_nPos(0) ,m_xAccess(_rxAccess) ,m_bListening(false) @@ -159,7 +159,7 @@ OEnumerationByIndex::~OEnumerationByIndex() } -sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(staruno::RuntimeException, std::exception) +sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -176,12 +176,12 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(staruno::Runtim } -staruno::Any SAL_CALL OEnumerationByIndex::nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) +css::uno::Any SAL_CALL OEnumerationByIndex::nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); - staruno::Any aRes; + css::uno::Any aRes; if (m_xAccess.is()) { aRes = m_xAccess->getByIndex(m_nPos++); @@ -199,7 +199,7 @@ staruno::Any SAL_CALL OEnumerationByIndex::nextElement( ) void SAL_CALL OEnumerationByIndex::disposing(const starlang::EventObject& aEvent) - throw(staruno::RuntimeException, std::exception) + throw(css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -216,7 +216,7 @@ void OEnumerationByIndex::impl_startDisposeListening() return; ++m_refCount; - staruno::Reference< starlang::XComponent > xDisposable(m_xAccess, staruno::UNO_QUERY); + css::uno::Reference< starlang::XComponent > xDisposable(m_xAccess, css::uno::UNO_QUERY); if (xDisposable.is()) { xDisposable->addEventListener(this); @@ -234,7 +234,7 @@ void OEnumerationByIndex::impl_stopDisposeListening() return; ++m_refCount; - staruno::Reference< starlang::XComponent > xDisposable(m_xAccess, staruno::UNO_QUERY); + css::uno::Reference< starlang::XComponent > xDisposable(m_xAccess, css::uno::UNO_QUERY); if (xDisposable.is()) { xDisposable->removeEventListener(this); @@ -248,7 +248,7 @@ void OEnumerationByIndex::impl_stopDisposeListening() -OAnyEnumeration::OAnyEnumeration(const staruno::Sequence< staruno::Any >& lItems) +OAnyEnumeration::OAnyEnumeration(const css::uno::Sequence< css::uno::Any >& lItems) :m_nPos(0) ,m_lItems(lItems) { @@ -260,7 +260,7 @@ OAnyEnumeration::~OAnyEnumeration() } -sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(staruno::RuntimeException, std::exception) +sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) { ::osl::ResettableMutexGuard aLock(m_aLock); @@ -268,8 +268,8 @@ sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(staruno::RuntimeExc } -staruno::Any SAL_CALL OAnyEnumeration::nextElement( ) - throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) +css::uno::Any SAL_CALL OAnyEnumeration::nextElement( ) + throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) { if ( ! hasMoreElements()) throw starcontainer::NoSuchElementException(); diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 3f853812620f..9610873cb0ae 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -33,14 +33,14 @@ namespace starbeans = ::com::sun::star::beans; namespace starlang = ::com::sun::star::lang; -sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) +sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) { sal_Int16 nReturn(starutil::NumberFormat::UNDEFINED); if (xFormats.is()) { try { - staruno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey)); + css::uno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey)); if (xFormat.is()) xFormat->getPropertyValue("Type") >>= nReturn; } @@ -53,23 +53,23 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats> } -sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey) +sal_Int16 getNumberFormatType(const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int32 nKey) { OSL_ENSURE(xFormatter.is(), "getNumberFormatType : the formatter isn't valid !"); - staruno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter->getNumberFormatsSupplier()); + css::uno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter->getNumberFormatsSupplier()); OSL_ENSURE(xSupplier.is(), "getNumberFormatType : the formatter doesn't implement a supplier !"); - staruno::Reference<starutil::XNumberFormats> xFormats( xSupplier->getNumberFormats()); + css::uno::Reference<starutil::XNumberFormats> xFormats( xSupplier->getNumberFormats()); return getNumberFormatType(xFormats, nKey); } -staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) +css::uno::Any getNumberFormatDecimals(const css::uno::Reference<starutil::XNumberFormats>& xFormats, sal_Int32 nKey) { if (xFormats.is()) { try { - staruno::Reference<starbeans::XPropertySet> xFormat( xFormats->getByKey(nKey)); + css::uno::Reference<starbeans::XPropertySet> xFormat( xFormats->getByKey(nKey)); if (xFormat.is()) { static OUString PROPERTY_DECIMALS( "Decimals" ); @@ -81,19 +81,19 @@ staruno::Any getNumberFormatDecimals(const staruno::Reference<starutil::XNumberF OSL_TRACE("getNumberFormatDecimals : invalid key! (may be created with another formatter ?)"); } } - return staruno::makeAny((sal_Int16)0); + return css::uno::makeAny((sal_Int16)0); } sal_Int32 getStandardFormat( - const staruno::Reference<starutil::XNumberFormatter>& xFormatter, + const css::uno::Reference<starutil::XNumberFormatter>& xFormatter, sal_Int16 nType, const starlang::Locale& _rLocale) { - staruno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : staruno::Reference<starutil::XNumberFormatsSupplier>(NULL)); - staruno::Reference<starutil::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : staruno::Reference<starutil::XNumberFormats>(NULL)); - staruno::Reference<starutil::XNumberFormatTypes> xTypes(xFormats, staruno::UNO_QUERY); + css::uno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : css::uno::Reference<starutil::XNumberFormatsSupplier>(NULL)); + css::uno::Reference<starutil::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : css::uno::Reference<starutil::XNumberFormats>(NULL)); + css::uno::Reference<starutil::XNumberFormatTypes> xTypes(xFormats, css::uno::UNO_QUERY); OSL_ENSURE(xTypes.is(), "getStandardFormat : no format types !"); return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0; diff --git a/comphelper/source/misc/sequence.cxx b/comphelper/source/misc/sequence.cxx index 440993abd075..43e7c89a85b5 100644 --- a/comphelper/source/misc/sequence.cxx +++ b/comphelper/source/misc/sequence.cxx @@ -21,7 +21,7 @@ namespace comphelper { -staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst) +css::uno::Sequence<sal_Int16> findValue(const css::uno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst) { sal_Int32 nLength = _rList.getLength(); @@ -42,18 +42,18 @@ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rLi // fill sequence if( nPos>-1 ) { - staruno::Sequence<sal_Int16> aRetSeq( 1 ); + css::uno::Sequence<sal_Int16> aRetSeq( 1 ); aRetSeq.getArray()[0] = (sal_Int16)nPos; return aRetSeq; } - return staruno::Sequence<sal_Int16>(); + return css::uno::Sequence<sal_Int16>(); } else { - staruno::Sequence<sal_Int16> aRetSeq( nLength ); + css::uno::Sequence<sal_Int16> aRetSeq( nLength ); sal_Int16* pReturn = aRetSeq.getArray(); // how often does the value occur? diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx index 30e3fa704598..d81ec90c79a9 100644 --- a/comphelper/source/streaming/basicio.cxx +++ b/comphelper/source/streaming/basicio.cxx @@ -25,8 +25,8 @@ namespace comphelper -const staruno::Reference<stario::XObjectOutputStream>& operator << ( - const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, +const css::uno::Reference<stario::XObjectOutputStream>& operator << ( + const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, const starawt::FontDescriptor& _rFont) { _rxOutStream->writeUTF( _rFont.Name ); @@ -50,8 +50,8 @@ const staruno::Reference<stario::XObjectOutputStream>& operator << ( // FontDescriptor -const staruno::Reference<stario::XObjectInputStream>& operator >> ( - const staruno::Reference<stario::XObjectInputStream>& _rxInStream, +const css::uno::Reference<stario::XObjectInputStream>& operator >> ( + const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, starawt::FontDescriptor& _rFont) { // schreiben des Fontdescriptors @@ -75,84 +75,84 @@ const staruno::Reference<stario::XObjectInputStream>& operator >> ( } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal) { _rVal = _rxInStream->readBoolean(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal) { _rxOutStream->writeBoolean(_bVal); return _rxOutStream; } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& rStr) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& rStr) { rStr = _rxInStream->readUTF(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& rStr) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& rStr) { _rxOutStream->writeUTF(rStr); return _rxOutStream; } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue) { _rValue = _rxInStream->readShort(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue) { _rxOutStream->writeShort(_nValue); return _rxOutStream; } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue) { _rValue = _rxInStream->readShort(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue) { _rxOutStream->writeShort(_nValue); return _rxOutStream; } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue) { _rValue = _rxInStream->readLong(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue) { _rxOutStream->writeLong(_nValue); return _rxOutStream; } -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue) +const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue) { _rValue = _rxInStream->readLong(); return _rxInStream; } -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue) +const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue) { _rxOutStream->writeLong(_nValue); return _rxOutStream; diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 03f169dd9b0c..1c8584ef79ab 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -37,14 +37,14 @@ OSLInputStreamWrapper::~OSLInputStreamWrapper() } -sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) + throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { if (!m_pFile) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); if (nBytesToRead < 0) - throw stario::BufferSizeExceededException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); ::osl::MutexGuard aGuard( m_aMutex ); @@ -53,9 +53,9 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 sal_uInt64 nRead = 0; FileBase::RC eError = m_pFile->read((void*)aData.getArray(), nBytesToRead, nRead); if (eError != FileBase::E_None) - throw stario::BufferSizeExceededException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); - // Wenn gelesene Zeichen < MaxLength, staruno::Sequence anpassen + // Wenn gelesene Zeichen < MaxLength, css::uno::Sequence anpassen if (nRead < (sal_uInt32)nBytesToRead) aData.realloc( sal::static_int_cast< sal_Int32 >(nRead) ); @@ -63,23 +63,23 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 } -sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { if (!m_pFile) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); if (nMaxBytesToRead < 0) - throw stario::BufferSizeExceededException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); return readBytes(aData, nMaxBytesToRead); } -void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if (!m_pFile) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); sal_uInt64 nCurrentPos; m_pFile->getPos(nCurrentPos); @@ -88,45 +88,45 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos); if (eError != FileBase::E_None) { - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); } } -sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnectedException, staruno::RuntimeException, std::exception ) +sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnectedException, css::uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if (!m_pFile) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); sal_uInt64 nPos; FileBase::RC eError = m_pFile->getPos(nPos); if (eError != FileBase::E_None) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); sal_uInt64 nDummy = 0; eError = m_pFile->setPos(osl_Pos_End, nDummy); if (eError != FileBase::E_None) - throw stario::NotConnectedException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); sal_uInt64 nAvailable; eError = m_pFile->getPos(nAvailable); if (eError != FileBase::E_None) - throw stario::NotConnectedException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); nAvailable = nAvailable - nPos; eError = m_pFile->setPos(osl_Pos_Absolut, nPos); if (eError != FileBase::E_None) - throw stario::NotConnectedException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); return sal::static_int_cast< sal_Int32 >( std::max(nAvailable, sal::static_int_cast< sal_uInt64 >(SAL_MAX_INT32))); } -void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedException, staruno::RuntimeException, std::exception ) +void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedException, css::uno::RuntimeException, std::exception ) { if (!m_pFile) - throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); + throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); m_pFile->close(); @@ -143,24 +143,24 @@ OSLOutputStreamWrapper::OSLOutputStreamWrapper(osl::File & _rFile): OSLOutputStreamWrapper::~OSLOutputStreamWrapper() {} -void SAL_CALL OSLOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +void SAL_CALL OSLOutputStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { sal_uInt64 nWritten; FileBase::RC eError = rFile.write(aData.getConstArray(),aData.getLength(), nWritten); if (eError != FileBase::E_None || nWritten != sal::static_int_cast< sal_uInt32 >(aData.getLength())) { - throw stario::BufferSizeExceededException(OUString(),static_cast<staruno::XWeak*>(this)); + throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); } } -void SAL_CALL OSLOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +void SAL_CALL OSLOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { } -void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) +void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) { rFile.close(); } diff --git a/comphelper/source/streaming/streamsection.cxx b/comphelper/source/streaming/streamsection.cxx index 9cd2d01287c3..c1b2408ddca1 100644 --- a/comphelper/source/streaming/streamsection.cxx +++ b/comphelper/source/streaming/streamsection.cxx @@ -24,7 +24,7 @@ namespace comphelper { -OStreamSection::OStreamSection(const staruno::Reference< stario::XDataInputStream >& _rxInput) +OStreamSection::OStreamSection(const css::uno::Reference< stario::XDataInputStream >& _rxInput) :m_xMarkStream(_rxInput, ::com::sun::star::uno::UNO_QUERY) ,m_xInStream(_rxInput) ,m_nBlockStart(-1) @@ -39,7 +39,7 @@ OStreamSection::OStreamSection(const staruno::Reference< stario::XDataInputStrea } -OStreamSection::OStreamSection(const staruno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength) +OStreamSection::OStreamSection(const css::uno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength) :m_xMarkStream(_rxOutput, ::com::sun::star::uno::UNO_QUERY) ,m_xOutStream(_rxOutput) ,m_nBlockStart(-1) @@ -87,7 +87,7 @@ OStreamSection::~OStreamSection() } } } - catch(const staruno::Exception&) + catch(const css::uno::Exception&) { } } 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 |