comphelper: staruno -> css::uno
Change-Id: I21991280c5b7e4c6d0c200f4489c89a9f4fbc385
This commit is contained in:
@@ -29,7 +29,7 @@ namespace comphelper
|
|||||||
//= OEnumerationByName
|
//= OEnumerationByName
|
||||||
|
|
||||||
|
|
||||||
OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess)
|
OEnumerationByName::OEnumerationByName(const css::uno::Reference<starcontainer::XNameAccess>& _rxAccess)
|
||||||
:m_aNames(_rxAccess->getElementNames())
|
:m_aNames(_rxAccess->getElementNames())
|
||||||
,m_nPos(0)
|
,m_nPos(0)
|
||||||
,m_xAccess(_rxAccess)
|
,m_xAccess(_rxAccess)
|
||||||
@@ -39,8 +39,8 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::XNameAccess>& _rxAccess,
|
OEnumerationByName::OEnumerationByName(const css::uno::Reference<starcontainer::XNameAccess>& _rxAccess,
|
||||||
const staruno::Sequence< OUString >& _aNames )
|
const css::uno::Sequence< OUString >& _aNames )
|
||||||
:m_aNames(_aNames)
|
:m_aNames(_aNames)
|
||||||
,m_nPos(0)
|
,m_nPos(0)
|
||||||
,m_xAccess(_rxAccess)
|
,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);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
@@ -73,12 +73,12 @@ sal_Bool SAL_CALL OEnumerationByName::hasMoreElements( ) throw(staruno::Runtime
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
staruno::Any SAL_CALL OEnumerationByName::nextElement( )
|
css::uno::Any SAL_CALL OEnumerationByName::nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception)
|
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
::osl::ResettableMutexGuard aLock(m_aLock);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
staruno::Any aRes;
|
css::uno::Any aRes;
|
||||||
if (m_xAccess.is() && m_nPos < m_aNames.getLength())
|
if (m_xAccess.is() && m_nPos < m_aNames.getLength())
|
||||||
aRes = m_xAccess->getByName(m_aNames.getConstArray()[m_nPos++]);
|
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)
|
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);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void OEnumerationByName::impl_startDisposeListening()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
++m_refCount;
|
++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())
|
if (xDisposable.is())
|
||||||
{
|
{
|
||||||
xDisposable->addEventListener(this);
|
xDisposable->addEventListener(this);
|
||||||
@@ -131,7 +131,7 @@ void OEnumerationByName::impl_stopDisposeListening()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
++m_refCount;
|
++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())
|
if (xDisposable.is())
|
||||||
{
|
{
|
||||||
xDisposable->removeEventListener(this);
|
xDisposable->removeEventListener(this);
|
||||||
@@ -144,7 +144,7 @@ void OEnumerationByName::impl_stopDisposeListening()
|
|||||||
//= OEnumerationByIndex
|
//= OEnumerationByIndex
|
||||||
|
|
||||||
|
|
||||||
OEnumerationByIndex::OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess)
|
OEnumerationByIndex::OEnumerationByIndex(const css::uno::Reference< starcontainer::XIndexAccess >& _rxAccess)
|
||||||
:m_nPos(0)
|
:m_nPos(0)
|
||||||
,m_xAccess(_rxAccess)
|
,m_xAccess(_rxAccess)
|
||||||
,m_bListening(false)
|
,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);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
@@ -176,12 +176,12 @@ sal_Bool SAL_CALL OEnumerationByIndex::hasMoreElements( ) throw(staruno::Runtim
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
staruno::Any SAL_CALL OEnumerationByIndex::nextElement( )
|
css::uno::Any SAL_CALL OEnumerationByIndex::nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception)
|
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
::osl::ResettableMutexGuard aLock(m_aLock);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
staruno::Any aRes;
|
css::uno::Any aRes;
|
||||||
if (m_xAccess.is())
|
if (m_xAccess.is())
|
||||||
{
|
{
|
||||||
aRes = m_xAccess->getByIndex(m_nPos++);
|
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)
|
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);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ void OEnumerationByIndex::impl_startDisposeListening()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
++m_refCount;
|
++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())
|
if (xDisposable.is())
|
||||||
{
|
{
|
||||||
xDisposable->addEventListener(this);
|
xDisposable->addEventListener(this);
|
||||||
@@ -234,7 +234,7 @@ void OEnumerationByIndex::impl_stopDisposeListening()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
++m_refCount;
|
++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())
|
if (xDisposable.is())
|
||||||
{
|
{
|
||||||
xDisposable->removeEventListener(this);
|
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_nPos(0)
|
||||||
,m_lItems(lItems)
|
,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);
|
::osl::ResettableMutexGuard aLock(m_aLock);
|
||||||
|
|
||||||
@@ -268,8 +268,8 @@ sal_Bool SAL_CALL OAnyEnumeration::hasMoreElements( ) throw(staruno::RuntimeExc
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
staruno::Any SAL_CALL OAnyEnumeration::nextElement( )
|
css::uno::Any SAL_CALL OAnyEnumeration::nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception)
|
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
if ( ! hasMoreElements())
|
if ( ! hasMoreElements())
|
||||||
throw starcontainer::NoSuchElementException();
|
throw starcontainer::NoSuchElementException();
|
||||||
|
@@ -33,14 +33,14 @@ namespace starbeans = ::com::sun::star::beans;
|
|||||||
namespace starlang = ::com::sun::star::lang;
|
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);
|
sal_Int16 nReturn(starutil::NumberFormat::UNDEFINED);
|
||||||
if (xFormats.is())
|
if (xFormats.is())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
staruno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey));
|
css::uno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey));
|
||||||
if (xFormat.is())
|
if (xFormat.is())
|
||||||
xFormat->getPropertyValue("Type") >>= nReturn;
|
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 !");
|
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 !");
|
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);
|
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())
|
if (xFormats.is())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
staruno::Reference<starbeans::XPropertySet> xFormat( xFormats->getByKey(nKey));
|
css::uno::Reference<starbeans::XPropertySet> xFormat( xFormats->getByKey(nKey));
|
||||||
if (xFormat.is())
|
if (xFormat.is())
|
||||||
{
|
{
|
||||||
static OUString PROPERTY_DECIMALS( "Decimals" );
|
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 ?)");
|
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(
|
sal_Int32 getStandardFormat(
|
||||||
const staruno::Reference<starutil::XNumberFormatter>& xFormatter,
|
const css::uno::Reference<starutil::XNumberFormatter>& xFormatter,
|
||||||
sal_Int16 nType,
|
sal_Int16 nType,
|
||||||
const starlang::Locale& _rLocale)
|
const starlang::Locale& _rLocale)
|
||||||
{
|
{
|
||||||
staruno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : staruno::Reference<starutil::XNumberFormatsSupplier>(NULL));
|
css::uno::Reference<starutil::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : css::uno::Reference<starutil::XNumberFormatsSupplier>(NULL));
|
||||||
staruno::Reference<starutil::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : staruno::Reference<starutil::XNumberFormats>(NULL));
|
css::uno::Reference<starutil::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : css::uno::Reference<starutil::XNumberFormats>(NULL));
|
||||||
staruno::Reference<starutil::XNumberFormatTypes> xTypes(xFormats, staruno::UNO_QUERY);
|
css::uno::Reference<starutil::XNumberFormatTypes> xTypes(xFormats, css::uno::UNO_QUERY);
|
||||||
OSL_ENSURE(xTypes.is(), "getStandardFormat : no format types !");
|
OSL_ENSURE(xTypes.is(), "getStandardFormat : no format types !");
|
||||||
|
|
||||||
return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0;
|
return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0;
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
namespace comphelper
|
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();
|
sal_Int32 nLength = _rList.getLength();
|
||||||
|
|
||||||
@@ -42,18 +42,18 @@ staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rLi
|
|||||||
// fill sequence
|
// fill sequence
|
||||||
if( nPos>-1 )
|
if( nPos>-1 )
|
||||||
{
|
{
|
||||||
staruno::Sequence<sal_Int16> aRetSeq( 1 );
|
css::uno::Sequence<sal_Int16> aRetSeq( 1 );
|
||||||
aRetSeq.getArray()[0] = (sal_Int16)nPos;
|
aRetSeq.getArray()[0] = (sal_Int16)nPos;
|
||||||
|
|
||||||
return aRetSeq;
|
return aRetSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
return staruno::Sequence<sal_Int16>();
|
return css::uno::Sequence<sal_Int16>();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
staruno::Sequence<sal_Int16> aRetSeq( nLength );
|
css::uno::Sequence<sal_Int16> aRetSeq( nLength );
|
||||||
sal_Int16* pReturn = aRetSeq.getArray();
|
sal_Int16* pReturn = aRetSeq.getArray();
|
||||||
|
|
||||||
// how often does the value occur?
|
// how often does the value occur?
|
||||||
|
@@ -25,8 +25,8 @@ namespace comphelper
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const staruno::Reference<stario::XObjectOutputStream>& operator << (
|
const css::uno::Reference<stario::XObjectOutputStream>& operator << (
|
||||||
const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream,
|
const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream,
|
||||||
const starawt::FontDescriptor& _rFont)
|
const starawt::FontDescriptor& _rFont)
|
||||||
{
|
{
|
||||||
_rxOutStream->writeUTF( _rFont.Name );
|
_rxOutStream->writeUTF( _rFont.Name );
|
||||||
@@ -50,8 +50,8 @@ const staruno::Reference<stario::XObjectOutputStream>& operator << (
|
|||||||
|
|
||||||
// FontDescriptor
|
// FontDescriptor
|
||||||
|
|
||||||
const staruno::Reference<stario::XObjectInputStream>& operator >> (
|
const css::uno::Reference<stario::XObjectInputStream>& operator >> (
|
||||||
const staruno::Reference<stario::XObjectInputStream>& _rxInStream,
|
const css::uno::Reference<stario::XObjectInputStream>& _rxInStream,
|
||||||
starawt::FontDescriptor& _rFont)
|
starawt::FontDescriptor& _rFont)
|
||||||
{
|
{
|
||||||
// schreiben des Fontdescriptors
|
// 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();
|
_rVal = _rxInStream->readBoolean();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeBoolean(_bVal);
|
||||||
return _rxOutStream;
|
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();
|
rStr = _rxInStream->readUTF();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeUTF(rStr);
|
||||||
return _rxOutStream;
|
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();
|
_rValue = _rxInStream->readShort();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeShort(_nValue);
|
||||||
return _rxOutStream;
|
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();
|
_rValue = _rxInStream->readShort();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeShort(_nValue);
|
||||||
return _rxOutStream;
|
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();
|
_rValue = _rxInStream->readLong();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeLong(_nValue);
|
||||||
return _rxOutStream;
|
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();
|
_rValue = _rxInStream->readLong();
|
||||||
return _rxInStream;
|
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);
|
_rxOutStream->writeLong(_nValue);
|
||||||
return _rxOutStream;
|
return _rxOutStream;
|
||||||
|
@@ -37,14 +37,14 @@ OSLInputStreamWrapper::~OSLInputStreamWrapper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
|
sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
|
||||||
throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception )
|
throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
|
||||||
{
|
{
|
||||||
if (!m_pFile)
|
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)
|
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 );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
|
|
||||||
@@ -53,9 +53,9 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8
|
|||||||
sal_uInt64 nRead = 0;
|
sal_uInt64 nRead = 0;
|
||||||
FileBase::RC eError = m_pFile->read((void*)aData.getArray(), nBytesToRead, nRead);
|
FileBase::RC eError = m_pFile->read((void*)aData.getArray(), nBytesToRead, nRead);
|
||||||
if (eError != FileBase::E_None)
|
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)
|
if (nRead < (sal_uInt32)nBytesToRead)
|
||||||
aData.realloc( sal::static_int_cast< sal_Int32 >(nRead) );
|
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)
|
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)
|
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);
|
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 );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
if (!m_pFile)
|
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;
|
sal_uInt64 nCurrentPos;
|
||||||
m_pFile->getPos(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);
|
FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos);
|
||||||
if (eError != FileBase::E_None)
|
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 );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
if (!m_pFile)
|
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;
|
sal_uInt64 nPos;
|
||||||
FileBase::RC eError = m_pFile->getPos(nPos);
|
FileBase::RC eError = m_pFile->getPos(nPos);
|
||||||
if (eError != FileBase::E_None)
|
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;
|
sal_uInt64 nDummy = 0;
|
||||||
eError = m_pFile->setPos(osl_Pos_End, nDummy);
|
eError = m_pFile->setPos(osl_Pos_End, nDummy);
|
||||||
if (eError != FileBase::E_None)
|
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;
|
sal_uInt64 nAvailable;
|
||||||
eError = m_pFile->getPos(nAvailable);
|
eError = m_pFile->getPos(nAvailable);
|
||||||
if (eError != FileBase::E_None)
|
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;
|
nAvailable = nAvailable - nPos;
|
||||||
eError = m_pFile->setPos(osl_Pos_Absolut, nPos);
|
eError = m_pFile->setPos(osl_Pos_Absolut, nPos);
|
||||||
if (eError != FileBase::E_None)
|
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 >(
|
return sal::static_int_cast< sal_Int32 >(
|
||||||
std::max(nAvailable, sal::static_int_cast< sal_uInt64 >(SAL_MAX_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)
|
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();
|
m_pFile->close();
|
||||||
|
|
||||||
@@ -143,24 +143,24 @@ OSLOutputStreamWrapper::OSLOutputStreamWrapper(osl::File & _rFile):
|
|||||||
|
|
||||||
OSLOutputStreamWrapper::~OSLOutputStreamWrapper() {}
|
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;
|
sal_uInt64 nWritten;
|
||||||
FileBase::RC eError = rFile.write(aData.getConstArray(),aData.getLength(), nWritten);
|
FileBase::RC eError = rFile.write(aData.getConstArray(),aData.getLength(), nWritten);
|
||||||
if (eError != FileBase::E_None
|
if (eError != FileBase::E_None
|
||||||
|| nWritten != sal::static_int_cast< sal_uInt32 >(aData.getLength()))
|
|| 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();
|
rFile.close();
|
||||||
}
|
}
|
||||||
|
@@ -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_xMarkStream(_rxInput, ::com::sun::star::uno::UNO_QUERY)
|
||||||
,m_xInStream(_rxInput)
|
,m_xInStream(_rxInput)
|
||||||
,m_nBlockStart(-1)
|
,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_xMarkStream(_rxOutput, ::com::sun::star::uno::UNO_QUERY)
|
||||||
,m_xOutStream(_rxOutput)
|
,m_xOutStream(_rxOutput)
|
||||||
,m_nBlockStart(-1)
|
,m_nBlockStart(-1)
|
||||||
@@ -87,7 +87,7 @@ OStreamSection::~OStreamSection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(const staruno::Exception&)
|
catch(const css::uno::Exception&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,43 +30,42 @@ namespace comphelper
|
|||||||
|
|
||||||
|
|
||||||
namespace stario = ::com::sun::star::io;
|
namespace stario = ::com::sun::star::io;
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
namespace starawt = ::com::sun::star::awt;
|
namespace starawt = ::com::sun::star::awt;
|
||||||
|
|
||||||
// bool
|
// bool
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal);
|
||||||
void operator <<(
|
void operator <<(
|
||||||
css::uno::Reference<css::io::XObjectOutputStream> const &, sal_Bool)
|
css::uno::Reference<css::io::XObjectOutputStream> const &, sal_Bool)
|
||||||
SAL_DELETED_FUNCTION;
|
SAL_DELETED_FUNCTION;
|
||||||
|
|
||||||
// OUString
|
// OUString
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& _rStr);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& _rStr);
|
||||||
|
|
||||||
// sal_Int16
|
// sal_Int16
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue);
|
||||||
|
|
||||||
// sal_uInt16
|
// sal_uInt16
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue);
|
||||||
|
|
||||||
// sal_uInt32
|
// sal_uInt32
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue);
|
||||||
|
|
||||||
// sal_Int16
|
// sal_Int16
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectInputStream>& operator >> (const css::uno::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::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue);
|
||||||
|
|
||||||
// FontDescriptor
|
// FontDescriptor
|
||||||
COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& InStream, 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 staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& OutStream, const starawt::FontDescriptor& rVal);
|
COMPHELPER_DLLPUBLIC const css::uno::Reference<stario::XObjectOutputStream>& operator << (const css::uno::Reference<stario::XObjectOutputStream>& OutStream, const starawt::FontDescriptor& rVal);
|
||||||
|
|
||||||
// sequences
|
// sequences
|
||||||
template <class ELEMENT>
|
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();
|
sal_Int32 nLen = _rxInStream->readLong();
|
||||||
_rSeq.realloc(nLen);
|
_rSeq.realloc(nLen);
|
||||||
@@ -80,7 +79,7 @@ const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class ELEMENT>
|
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();
|
sal_Int32 nLen = _rSeq.getLength();
|
||||||
_rxOutStream->writeLong(nLen);
|
_rxOutStream->writeLong(nLen);
|
||||||
|
@@ -36,7 +36,6 @@ namespace comphelper
|
|||||||
|
|
||||||
|
|
||||||
namespace starcontainer = ::com::sun::star::container;
|
namespace starcontainer = ::com::sun::star::container;
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
namespace starlang = ::com::sun::star::lang;
|
namespace starlang = ::com::sun::star::lang;
|
||||||
|
|
||||||
|
|
||||||
@@ -58,22 +57,22 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName : private OEnumerationLock
|
|||||||
, public ::cppu::WeakImplHelper2< starcontainer::XEnumeration ,
|
, public ::cppu::WeakImplHelper2< starcontainer::XEnumeration ,
|
||||||
starlang::XEventListener >
|
starlang::XEventListener >
|
||||||
{
|
{
|
||||||
staruno::Sequence< OUString > m_aNames;
|
css::uno::Sequence< OUString > m_aNames;
|
||||||
sal_Int32 m_nPos;
|
sal_Int32 m_nPos;
|
||||||
staruno::Reference< starcontainer::XNameAccess > m_xAccess;
|
css::uno::Reference< starcontainer::XNameAccess > m_xAccess;
|
||||||
bool m_bListening;
|
bool m_bListening;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OEnumerationByName(const staruno::Reference< starcontainer::XNameAccess >& _rxAccess);
|
OEnumerationByName(const css::uno::Reference< starcontainer::XNameAccess >& _rxAccess);
|
||||||
OEnumerationByName(const staruno::Reference< starcontainer::XNameAccess >& _rxAccess,
|
OEnumerationByName(const css::uno::Reference< starcontainer::XNameAccess >& _rxAccess,
|
||||||
const staruno::Sequence< OUString >& _aNames );
|
const css::uno::Sequence< OUString >& _aNames );
|
||||||
virtual ~OEnumerationByName();
|
virtual ~OEnumerationByName();
|
||||||
|
|
||||||
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
||||||
virtual staruno::Any SAL_CALL nextElement( )
|
virtual css::uno::Any SAL_CALL nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
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:
|
private:
|
||||||
COMPHELPER_DLLPRIVATE void impl_startDisposeListening();
|
COMPHELPER_DLLPRIVATE void impl_startDisposeListening();
|
||||||
@@ -91,18 +90,18 @@ class COMPHELPER_DLLPUBLIC OEnumerationByIndex : private OEnumerationLock
|
|||||||
starlang::XEventListener >
|
starlang::XEventListener >
|
||||||
{
|
{
|
||||||
sal_Int32 m_nPos;
|
sal_Int32 m_nPos;
|
||||||
staruno::Reference< starcontainer::XIndexAccess > m_xAccess;
|
css::uno::Reference< starcontainer::XIndexAccess > m_xAccess;
|
||||||
bool m_bListening;
|
bool m_bListening;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess);
|
OEnumerationByIndex(const css::uno::Reference< starcontainer::XIndexAccess >& _rxAccess);
|
||||||
virtual ~OEnumerationByIndex();
|
virtual ~OEnumerationByIndex();
|
||||||
|
|
||||||
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
||||||
virtual staruno::Any SAL_CALL nextElement( )
|
virtual css::uno::Any SAL_CALL nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
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:
|
private:
|
||||||
COMPHELPER_DLLPRIVATE void impl_startDisposeListening();
|
COMPHELPER_DLLPRIVATE void impl_startDisposeListening();
|
||||||
@@ -120,15 +119,15 @@ class COMPHELPER_DLLPUBLIC OAnyEnumeration : private OEnumerationLock
|
|||||||
, public ::cppu::WeakImplHelper1< starcontainer::XEnumeration >
|
, public ::cppu::WeakImplHelper1< starcontainer::XEnumeration >
|
||||||
{
|
{
|
||||||
sal_Int32 m_nPos;
|
sal_Int32 m_nPos;
|
||||||
staruno::Sequence< staruno::Any > m_lItems;
|
css::uno::Sequence< css::uno::Any > m_lItems;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OAnyEnumeration(const staruno::Sequence< staruno::Any >& lItems);
|
OAnyEnumeration(const css::uno::Sequence< css::uno::Any >& lItems);
|
||||||
virtual ~OAnyEnumeration();
|
virtual ~OAnyEnumeration();
|
||||||
|
|
||||||
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
virtual sal_Bool SAL_CALL hasMoreElements( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
||||||
virtual staruno::Any SAL_CALL nextElement( )
|
virtual css::uno::Any SAL_CALL nextElement( )
|
||||||
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException, std::exception) SAL_OVERRIDE;
|
throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -30,23 +30,22 @@ namespace comphelper
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
namespace starlang = ::com::sun::star::lang;
|
namespace starlang = ::com::sun::star::lang;
|
||||||
namespace starutil = ::com::sun::star::util;
|
namespace starutil = ::com::sun::star::util;
|
||||||
|
|
||||||
/// returns the ::com::sun::star::util::NumberFormat of the given key under the given formats
|
/// 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
|
/// 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
|
/// 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
|
/** returns the standard format for the given type and the given _rLocale
|
||||||
*/
|
*/
|
||||||
sal_Int32 getStandardFormat(
|
sal_Int32 getStandardFormat(
|
||||||
const staruno::Reference<starutil::XNumberFormatter>& xFormatter,
|
const css::uno::Reference<starutil::XNumberFormatter>& xFormatter,
|
||||||
sal_Int16 nType,
|
sal_Int16 nType,
|
||||||
const starlang::Locale& _rLocale);
|
const starlang::Locale& _rLocale);
|
||||||
|
|
||||||
|
@@ -29,8 +29,6 @@
|
|||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
namespace stario = ::com::sun::star::io;
|
namespace stario = ::com::sun::star::io;
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
|
|
||||||
|
|
||||||
// FmUnoIOStream,
|
// FmUnoIOStream,
|
||||||
// Stream to read and write data, based on File
|
// Stream to read and write data, based on File
|
||||||
@@ -45,11 +43,11 @@ public:
|
|||||||
virtual ~OSLInputStreamWrapper();
|
virtual ~OSLInputStreamWrapper();
|
||||||
|
|
||||||
// stario::XInputStream
|
// 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 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(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::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, staruno::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, staruno::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, staruno::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();
|
virtual ~OSLOutputStreamWrapper();
|
||||||
|
|
||||||
// stario::XOutputStream
|
// 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 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, staruno::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, staruno::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;
|
::osl::File& rFile;
|
||||||
};
|
};
|
||||||
|
@@ -33,14 +33,9 @@ namespace cppu {
|
|||||||
//... namespace comphelper ................................................
|
//... namespace comphelper ................................................
|
||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
namespace starbeans = ::com::sun::star::beans;
|
namespace starbeans = ::com::sun::star::beans;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <typename TYPE> struct OPropertyArrayUsageHelperMutex
|
template <typename TYPE> struct OPropertyArrayUsageHelperMutex
|
||||||
: public rtl::Static< ::osl::Mutex, OPropertyArrayUsageHelperMutex<TYPE> > {};
|
: public rtl::Static< ::osl::Mutex, OPropertyArrayUsageHelperMutex<TYPE> > {};
|
||||||
|
|
||||||
|
@@ -35,10 +35,7 @@
|
|||||||
//... namespace comphelper .......................................................
|
//... namespace comphelper .......................................................
|
||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
namespace starbeans = ::com::sun::star::beans;
|
namespace starbeans = ::com::sun::star::beans;
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
|
|
||||||
/** compare two properties by name
|
/** compare two properties by name
|
||||||
*/
|
*/
|
||||||
@@ -80,7 +77,7 @@ namespace comphelper
|
|||||||
|
|
||||||
|
|
||||||
/// remove the property with the given name from the given sequence
|
/// 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
|
/** 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 _nAddAttrib the attributes which should be added
|
||||||
@param _nRemoveAttrib the attributes which should be removed
|
@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.
|
/** 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
|
/** copy properties between property sets, in compliance with the property
|
||||||
attributes of the target object
|
attributes of the target object
|
||||||
*/
|
*/
|
||||||
COMPHELPER_DLLPUBLIC void copyProperties(const staruno::Reference<starbeans::XPropertySet>& _rxSource,
|
COMPHELPER_DLLPUBLIC void copyProperties(const css::uno::Reference<starbeans::XPropertySet>& _rxSource,
|
||||||
const staruno::Reference<starbeans::XPropertySet>& _rxDest);
|
const css::uno::Reference<starbeans::XPropertySet>& _rxDest);
|
||||||
|
|
||||||
|
|
||||||
//= property conversion helpers
|
//= 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)
|
@exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument)
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
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);
|
bool bModified(false);
|
||||||
T aNewValue = T();
|
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)
|
@exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument)
|
||||||
*/
|
*/
|
||||||
template <class ENUMTYPE>
|
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()
|
if (cppu::getTypeFavourUnsigned(&_rCurrentValue).getTypeClass()
|
||||||
!= staruno::TypeClass_ENUM)
|
!= css::uno::TypeClass_ENUM)
|
||||||
return tryPropertyValue(_rConvertedValue, _rOldValue, _rValueToSet, _rCurrentValue);
|
return tryPropertyValue(_rConvertedValue, _rOldValue, _rValueToSet, _rCurrentValue);
|
||||||
|
|
||||||
bool bModified(false);
|
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
|
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
|
@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);
|
bool bModified(false);
|
||||||
sal_Bool bNewValue(sal_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
|
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)
|
@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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -27,18 +27,12 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
|
|
||||||
|
|
||||||
/** search the given string within the given sequence, return the positions where it was found.
|
/** 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.
|
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
|
namespace internal
|
||||||
{
|
{
|
||||||
@@ -52,14 +46,14 @@ namespace comphelper
|
|||||||
|
|
||||||
/// concat two sequences
|
/// concat two sequences
|
||||||
template <class T>
|
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());
|
sal_Int32 nLeft(_rLeft.getLength()), nRight(_rRight.getLength());
|
||||||
const T* pLeft = _rLeft.getConstArray();
|
const T* pLeft = _rLeft.getConstArray();
|
||||||
const T* pRight = _rRight.getConstArray();
|
const T* pRight = _rRight.getConstArray();
|
||||||
|
|
||||||
sal_Int32 nReturnLen(nLeft + nRight);
|
sal_Int32 nReturnLen(nLeft + nRight);
|
||||||
staruno::Sequence<T> aReturn(nReturnLen);
|
css::uno::Sequence<T> aReturn(nReturnLen);
|
||||||
T* pReturn = aReturn.getArray();
|
T* pReturn = aReturn.getArray();
|
||||||
|
|
||||||
internal::implCopySequence(pLeft, pReturn, nLeft);
|
internal::implCopySequence(pLeft, pReturn, nLeft);
|
||||||
@@ -71,7 +65,7 @@ namespace comphelper
|
|||||||
|
|
||||||
/// concat three sequences
|
/// concat three sequences
|
||||||
template <class T>
|
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());
|
sal_Int32 nLeft(_rLeft.getLength()), nMiddle(_rMiddle.getLength()), nRight(_rRight.getLength());
|
||||||
const T* pLeft = _rLeft.getConstArray();
|
const T* pLeft = _rLeft.getConstArray();
|
||||||
@@ -79,7 +73,7 @@ namespace comphelper
|
|||||||
const T* pRight = _rRight.getConstArray();
|
const T* pRight = _rRight.getConstArray();
|
||||||
|
|
||||||
sal_Int32 nReturnLen(nLeft + nMiddle + nRight);
|
sal_Int32 nReturnLen(nLeft + nMiddle + nRight);
|
||||||
staruno::Sequence<T> aReturn(nReturnLen);
|
css::uno::Sequence<T> aReturn(nReturnLen);
|
||||||
T* pReturn = aReturn.getArray();
|
T* pReturn = aReturn.getArray();
|
||||||
|
|
||||||
internal::implCopySequence(pLeft, pReturn, nLeft);
|
internal::implCopySequence(pLeft, pReturn, nLeft);
|
||||||
@@ -92,7 +86,7 @@ namespace comphelper
|
|||||||
|
|
||||||
/// remove a specified element from a sequences
|
/// remove a specified element from a sequences
|
||||||
template<class T>
|
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();
|
sal_Int32 nLength = _rSeq.getLength();
|
||||||
|
|
||||||
|
@@ -29,7 +29,6 @@ namespace comphelper
|
|||||||
{
|
{
|
||||||
|
|
||||||
namespace stario = ::com::sun::star::io;
|
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.
|
/** 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
|
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
|
class COMPHELPER_DLLPUBLIC OStreamSection
|
||||||
{
|
{
|
||||||
staruno::Reference< stario::XMarkableStream > m_xMarkStream;
|
css::uno::Reference< stario::XMarkableStream > m_xMarkStream;
|
||||||
staruno::Reference< stario::XDataInputStream > m_xInStream;
|
css::uno::Reference< stario::XDataInputStream > m_xInStream;
|
||||||
staruno::Reference< stario::XDataOutputStream > m_xOutStream;
|
css::uno::Reference< stario::XDataOutputStream > m_xOutStream;
|
||||||
|
|
||||||
sal_Int32 m_nBlockStart;
|
sal_Int32 m_nBlockStart;
|
||||||
sal_Int32 m_nBlockLen;
|
sal_Int32 m_nBlockLen;
|
||||||
@@ -53,7 +52,7 @@ public:
|
|||||||
@param _rxInput the stream to read from. Must support the
|
@param _rxInput the stream to read from. Must support the
|
||||||
com::sun::star::io::XMarkableStream interface
|
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
|
/** 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
|
@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
|
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.
|
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>
|
/** 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.
|
If constructed for reading, any remaining bytes 'til the end of the section will be skipped.
|
||||||
|
@@ -37,21 +37,18 @@ namespace com { namespace sun { namespace star { namespace awt {
|
|||||||
|
|
||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
namespace staruno = ::com::sun::star::uno;
|
|
||||||
namespace starawt = ::com::sun::star::awt;
|
namespace starawt = ::com::sun::star::awt;
|
||||||
namespace starlang = ::com::sun::star::lang;
|
namespace starlang = ::com::sun::star::lang;
|
||||||
|
|
||||||
typedef staruno::Reference< staruno::XInterface > InterfaceRef;
|
typedef css::uno::Reference< css::uno::XInterface > InterfaceRef;
|
||||||
typedef staruno::Sequence< OUString > StringSequence;
|
typedef css::uno::Sequence< OUString > StringSequence;
|
||||||
|
|
||||||
|
|
||||||
/** compare the two given Anys
|
/** 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/>
|
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
|
/** compare two FontDescriptor's
|
||||||
@@ -64,7 +61,7 @@ namespace comphelper
|
|||||||
|
|
||||||
|
|
||||||
/// returns sal_True if objects of the types given are "compatible"
|
/// 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 ...
|
/** just a small shortcut ...
|
||||||
@@ -75,7 +72,7 @@ namespace comphelper
|
|||||||
So this function is nearly senseless ....
|
So this function is nearly senseless ....
|
||||||
*/
|
*/
|
||||||
template <class TYPE>
|
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));
|
return _rType.equals(cppu::getTypeFavourUnsigned(pDummy));
|
||||||
}
|
}
|
||||||
@@ -85,7 +82,7 @@ namespace comphelper
|
|||||||
same comment as for the other isA ....
|
same comment as for the other isA ....
|
||||||
*/
|
*/
|
||||||
template <class TYPE>
|
template <class TYPE>
|
||||||
bool isA(const staruno::Any& _rVal, TYPE* pDummy)
|
bool isA(const css::uno::Any& _rVal, TYPE* pDummy)
|
||||||
{
|
{
|
||||||
return _rVal.getValueType().equals(
|
return _rVal.getValueType().equals(
|
||||||
cppu::getTypeFavourUnsigned(pDummy));
|
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
|
/** check if a type you have at hand at runtime is equal to another type you have at compile time
|
||||||
*/
|
*/
|
||||||
template <class TYPE>
|
template <class TYPE>
|
||||||
bool isAReference(const staruno::Any& _rVal, TYPE*)
|
bool isAReference(const css::uno::Any& _rVal, TYPE*)
|
||||||
{
|
{
|
||||||
return _rVal.getValueType().equals(
|
return _rVal.getValueType().equals(
|
||||||
cppu::getTypeFavourUnsigned(
|
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
|
/** ask the given object for an XComponent interface and dispose on it
|
||||||
*/
|
*/
|
||||||
template <class TYPE>
|
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())
|
if (xComp.is())
|
||||||
{
|
{
|
||||||
xComp->dispose();
|
xComp->dispose();
|
||||||
@@ -117,10 +114,10 @@ namespace comphelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class TYPE>
|
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;
|
_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())
|
if (xTunnel.is())
|
||||||
_pObject = reinterpret_cast< TYPE* >(xTunnel->getSomething(TYPE::getUnoTunnelImplementationId()));
|
_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.
|
/** 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
|
//= 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,
|
// 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 ...
|
// which would be difficult to trace ...
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC sal_Int64 getINT64(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC sal_Int64 getINT64(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC sal_Int32 getINT32(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC sal_Int16 getINT16(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC double getDouble(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC double getDouble(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC float getFloat(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC float getFloat(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC OUString getString(const staruno::Any& _rAny);
|
COMPHELPER_DLLPUBLIC OUString getString(const css::uno::Any& _rAny);
|
||||||
COMPHELPER_DLLPUBLIC bool getBOOL(const staruno::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
|
//= 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()); }
|
{ _rAny.setValue(&_b, ::getBooleanCppuType()); }
|
||||||
|
|
||||||
//= extension of ::cppu::makeAny()
|
//= extension of ::cppu::makeAny()
|
||||||
inline staruno::Any makeBoolAny(bool _b)
|
inline css::uno::Any makeBoolAny(bool _b)
|
||||||
{ return staruno::Any(&_b, ::getBooleanCppuType()); }
|
{ return css::uno::Any(&_b, ::getBooleanCppuType()); }
|
||||||
|
|
||||||
|
|
||||||
} // namespace comphelper
|
} // namespace comphelper
|
||||||
|
Reference in New Issue
Block a user