Kaydet (Commit) e47fe5cc authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Andras Timar

Change rtl::OUString to OUString

My first commit. Any problem, question, warnings, please tell me.

Change-Id: Ibb02fe15776f3ffe74ddb9488c63a45c447bb493
üst 438f5023
This diff is collapsed.
...@@ -75,7 +75,7 @@ class Bridge: ...@@ -75,7 +75,7 @@ class Bridge:
public: public:
Bridge( Bridge(
rtl::Reference< BridgeFactory > const & factory, rtl::Reference< BridgeFactory > const & factory,
rtl::OUString const & name, OUString const & name,
com::sun::star::uno::Reference< com::sun::star::uno::Reference<
com::sun::star::connection::XConnection > const & connection, com::sun::star::connection::XConnection > const & connection,
com::sun::star::uno::Reference< com::sun::star::uno::Reference<
...@@ -105,19 +105,19 @@ public: ...@@ -105,19 +105,19 @@ public:
rtl::Reference< Writer > getWriter(); rtl::Reference< Writer > getWriter();
com::sun::star::uno::UnoInterfaceReference registerIncomingInterface( com::sun::star::uno::UnoInterfaceReference registerIncomingInterface(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
rtl::OUString registerOutgoingInterface( OUString registerOutgoingInterface(
com::sun::star::uno::UnoInterfaceReference const & object, com::sun::star::uno::UnoInterfaceReference const & object,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
com::sun::star::uno::UnoInterfaceReference findStub( com::sun::star::uno::UnoInterfaceReference findStub(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
void releaseStub( void releaseStub(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
void resurrectProxy(Proxy & proxy); void resurrectProxy(Proxy & proxy);
...@@ -135,7 +135,7 @@ public: ...@@ -135,7 +135,7 @@ public:
void decrementActiveCalls() throw (); void decrementActiveCalls() throw ();
bool makeCall( bool makeCall(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & member, bool setter, com::sun::star::uno::TypeDescription const & member, bool setter,
std::vector< BinaryAny > const & inArguments, BinaryAny * returnValue, std::vector< BinaryAny > const & inArguments, BinaryAny * returnValue,
std::vector< BinaryAny > * outArguments); std::vector< BinaryAny > * outArguments);
...@@ -163,7 +163,7 @@ public: ...@@ -163,7 +163,7 @@ public:
OutgoingRequest lastOutgoingRequest(rtl::ByteSequence const & tid); OutgoingRequest lastOutgoingRequest(rtl::ByteSequence const & tid);
bool isProtocolPropertiesRequest( bool isProtocolPropertiesRequest(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type) const; com::sun::star::uno::TypeDescription const & type) const;
void setCurrentContextMode(); void setCurrentContextMode();
...@@ -174,13 +174,13 @@ private: ...@@ -174,13 +174,13 @@ private:
virtual ~Bridge(); virtual ~Bridge();
virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
SAL_CALL getInstance(rtl::OUString const & sInstanceName) SAL_CALL getInstance(OUString const & sInstanceName)
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual rtl::OUString SAL_CALL getName() virtual OUString SAL_CALL getName()
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual rtl::OUString SAL_CALL getDescription() virtual OUString SAL_CALL getDescription()
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual void SAL_CALL dispose() virtual void SAL_CALL dispose()
...@@ -205,11 +205,11 @@ private: ...@@ -205,11 +205,11 @@ private:
std::vector< BinaryAny > const & inArguments); std::vector< BinaryAny > const & inArguments);
void makeReleaseCall( void makeReleaseCall(
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
void sendRequest( void sendRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type, com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member, com::sun::star::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments); std::vector< BinaryAny > const & inArguments);
...@@ -235,7 +235,7 @@ private: ...@@ -235,7 +235,7 @@ private:
typedef std::map< com::sun::star::uno::TypeDescription, SubStub > Stub; typedef std::map< com::sun::star::uno::TypeDescription, SubStub > Stub;
typedef std::map< rtl::OUString, Stub > Stubs; typedef std::map< OUString, Stub > Stubs;
enum State { STATE_INITIAL, STATE_STARTED, STATE_TERMINATED, STATE_FINAL }; enum State { STATE_INITIAL, STATE_STARTED, STATE_TERMINATED, STATE_FINAL };
...@@ -244,7 +244,7 @@ private: ...@@ -244,7 +244,7 @@ private:
MODE_WAIT, MODE_NORMAL, MODE_NORMAL_WAIT }; MODE_WAIT, MODE_NORMAL, MODE_NORMAL_WAIT };
rtl::Reference< BridgeFactory > factory_; rtl::Reference< BridgeFactory > factory_;
rtl::OUString name_; OUString name_;
com::sun::star::uno::Reference< com::sun::star::connection::XConnection > com::sun::star::uno::Reference< com::sun::star::connection::XConnection >
connection_; connection_;
com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider > com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider >
...@@ -253,7 +253,7 @@ private: ...@@ -253,7 +253,7 @@ private:
com::sun::star::uno::Mapping cppToBinaryMapping_; com::sun::star::uno::Mapping cppToBinaryMapping_;
com::sun::star::uno::Mapping binaryToCppMapping_; com::sun::star::uno::Mapping binaryToCppMapping_;
rtl::ByteSequence protPropTid_; rtl::ByteSequence protPropTid_;
rtl::OUString protPropOid_; OUString protPropOid_;
com::sun::star::uno::TypeDescription protPropType_; com::sun::star::uno::TypeDescription protPropType_;
com::sun::star::uno::TypeDescription protPropRequest_; com::sun::star::uno::TypeDescription protPropRequest_;
com::sun::star::uno::TypeDescription protPropCommit_; com::sun::star::uno::TypeDescription protPropCommit_;
......
...@@ -51,24 +51,24 @@ css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create( ...@@ -51,24 +51,24 @@ css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create(
return static_cast< cppu::OWeakObject * >(new BridgeFactory(xContext)); return static_cast< cppu::OWeakObject * >(new BridgeFactory(xContext));
} }
rtl::OUString BridgeFactory::static_getImplementationName() { OUString BridgeFactory::static_getImplementationName() {
return rtl::OUString( return OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.bridge.BridgeFactory")); "com.sun.star.comp.bridge.BridgeFactory"));
} }
css::uno::Sequence< rtl::OUString > css::uno::Sequence< OUString >
BridgeFactory::static_getSupportedServiceNames() { BridgeFactory::static_getSupportedServiceNames() {
rtl::OUString name( OUString name(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.BridgeFactory")); RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.BridgeFactory"));
return css::uno::Sequence< rtl::OUString >(&name, 1); return css::uno::Sequence< OUString >(&name, 1);
} }
void BridgeFactory::removeBridge( void BridgeFactory::removeBridge(
css::uno::Reference< css::bridge::XBridge > const & bridge) css::uno::Reference< css::bridge::XBridge > const & bridge)
{ {
assert(bridge.is()); assert(bridge.is());
rtl::OUString n(bridge->getName()); OUString n(bridge->getName());
osl::MutexGuard g(*this); osl::MutexGuard g(*this);
if (n.isEmpty()) { if (n.isEmpty()) {
BridgeList::iterator i( BridgeList::iterator i(
...@@ -93,16 +93,16 @@ BridgeFactory::BridgeFactory( ...@@ -93,16 +93,16 @@ BridgeFactory::BridgeFactory(
BridgeFactory::~BridgeFactory() {} BridgeFactory::~BridgeFactory() {}
rtl::OUString BridgeFactory::getImplementationName() OUString BridgeFactory::getImplementationName()
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ {
return static_getImplementationName(); return static_getImplementationName();
} }
sal_Bool BridgeFactory::supportsService(rtl::OUString const & ServiceName) sal_Bool BridgeFactory::supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ {
css::uno::Sequence< rtl::OUString > s(getSupportedServiceNames()); css::uno::Sequence< OUString > s(getSupportedServiceNames());
for (sal_Int32 i = 0; i != s.getLength(); ++i) { for (sal_Int32 i = 0; i != s.getLength(); ++i) {
if (ServiceName == s[i]) { if (ServiceName == s[i]) {
return true; return true;
...@@ -111,14 +111,14 @@ sal_Bool BridgeFactory::supportsService(rtl::OUString const & ServiceName) ...@@ -111,14 +111,14 @@ sal_Bool BridgeFactory::supportsService(rtl::OUString const & ServiceName)
return false; return false;
} }
css::uno::Sequence< rtl::OUString > BridgeFactory::getSupportedServiceNames() css::uno::Sequence< OUString > BridgeFactory::getSupportedServiceNames()
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ {
return static_getSupportedServiceNames(); return static_getSupportedServiceNames();
} }
css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge(
rtl::OUString const & sName, rtl::OUString const & sProtocol, OUString const & sName, OUString const & sProtocol,
css::uno::Reference< css::connection::XConnection > const & aConnection, css::uno::Reference< css::connection::XConnection > const & aConnection,
css::uno::Reference< css::bridge::XInstanceProvider > const & css::uno::Reference< css::bridge::XInstanceProvider > const &
anInstanceProvider) anInstanceProvider)
...@@ -136,7 +136,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( ...@@ -136,7 +136,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge(
if ( sProtocol != "urp" || !aConnection.is() ) if ( sProtocol != "urp" || !aConnection.is() )
{ {
throw css::lang::IllegalArgumentException( throw css::lang::IllegalArgumentException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"BridgeFactory::createBridge: sProtocol != urp ||" "BridgeFactory::createBridge: sProtocol != urp ||"
" aConnection == null")), " aConnection == null")),
...@@ -155,7 +155,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( ...@@ -155,7 +155,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge(
} }
css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge( css::uno::Reference< css::bridge::XBridge > BridgeFactory::getBridge(
rtl::OUString const & sName) throw (css::uno::RuntimeException) OUString const & sName) throw (css::uno::RuntimeException)
{ {
osl::MutexGuard g(*this); osl::MutexGuard g(*this);
BridgeMap::iterator i(named_.find(sName)); BridgeMap::iterator i(named_.find(sName));
...@@ -168,7 +168,7 @@ BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException) { ...@@ -168,7 +168,7 @@ BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException) {
osl::MutexGuard g(*this); osl::MutexGuard g(*this);
if (unnamed_.size() > SAL_MAX_INT32) { if (unnamed_.size() > SAL_MAX_INT32) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"BridgeFactory::getExistingBridges: too many")), "BridgeFactory::getExistingBridges: too many")),
static_cast< cppu::OWeakObject * >(this)); static_cast< cppu::OWeakObject * >(this));
...@@ -176,7 +176,7 @@ BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException) { ...@@ -176,7 +176,7 @@ BridgeFactory::getExistingBridges() throw (css::uno::RuntimeException) {
sal_Int32 n = static_cast< sal_Int32 >(unnamed_.size()); sal_Int32 n = static_cast< sal_Int32 >(unnamed_.size());
if (named_.size() > static_cast< sal_uInt32 >(SAL_MAX_INT32 - n)) { if (named_.size() > static_cast< sal_uInt32 >(SAL_MAX_INT32 - n)) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"BridgeFactory::getExistingBridges: too many")), "BridgeFactory::getExistingBridges: too many")),
static_cast< cppu::OWeakObject * >(this)); static_cast< cppu::OWeakObject * >(this));
......
...@@ -63,9 +63,9 @@ public: ...@@ -63,9 +63,9 @@ public:
const & xContext) const & xContext)
SAL_THROW((com::sun::star::uno::Exception)); SAL_THROW((com::sun::star::uno::Exception));
static rtl::OUString SAL_CALL static_getImplementationName(); static OUString SAL_CALL static_getImplementationName();
static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL static com::sun::star::uno::Sequence< OUString > SAL_CALL
static_getSupportedServiceNames(); static_getSupportedServiceNames();
void removeBridge( void removeBridge(
...@@ -82,18 +82,18 @@ private: ...@@ -82,18 +82,18 @@ private:
virtual ~BridgeFactory(); virtual ~BridgeFactory();
virtual rtl::OUString SAL_CALL getImplementationName() virtual OUString SAL_CALL getImplementationName()
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException);
virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge >
SAL_CALL createBridge( SAL_CALL createBridge(
rtl::OUString const & sName, rtl::OUString const & sProtocol, OUString const & sName, OUString const & sProtocol,
com::sun::star::uno::Reference< com::sun::star::uno::Reference<
com::sun::star::connection::XConnection > const & aConnection, com::sun::star::connection::XConnection > const & aConnection,
com::sun::star::uno::Reference< com::sun::star::uno::Reference<
...@@ -106,7 +106,7 @@ private: ...@@ -106,7 +106,7 @@ private:
virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge >
SAL_CALL getBridge( SAL_CALL getBridge(
rtl::OUString const & sName) OUString const & sName)
throw (com::sun::star::uno::RuntimeException); throw (com::sun::star::uno::RuntimeException);
virtual virtual
...@@ -121,7 +121,7 @@ private: ...@@ -121,7 +121,7 @@ private:
typedef typedef
std::map< std::map<
rtl::OUString, OUString,
com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > >
BridgeMap; BridgeMap;
......
...@@ -44,10 +44,10 @@ css::uno::UnoInterfaceReference get() { ...@@ -44,10 +44,10 @@ css::uno::UnoInterfaceReference get() {
css::uno::UnoInterfaceReference cc; css::uno::UnoInterfaceReference cc;
if (!uno_getCurrentContext( if (!uno_getCurrentContext(
reinterpret_cast< void ** >(&cc.m_pUnoI), reinterpret_cast< void ** >(&cc.m_pUnoI),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0)) OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0))
{ {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM("uno_getCurrentContext failed")), RTL_CONSTASCII_USTRINGPARAM("uno_getCurrentContext failed")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
...@@ -58,10 +58,10 @@ void set(css::uno::UnoInterfaceReference const & value) { ...@@ -58,10 +58,10 @@ void set(css::uno::UnoInterfaceReference const & value) {
css::uno::UnoInterfaceReference cc(value); css::uno::UnoInterfaceReference cc(value);
if (!uno_setCurrentContext( if (!uno_setCurrentContext(
cc.m_pUnoI, cc.m_pUnoI,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0)) OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)).pData, 0))
{ {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM("uno_setCurrentContext failed")), RTL_CONSTASCII_USTRINGPARAM("uno_setCurrentContext failed")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
......
...@@ -48,7 +48,7 @@ namespace css = com::sun::star; ...@@ -48,7 +48,7 @@ namespace css = com::sun::star;
IncomingRequest::IncomingRequest( IncomingRequest::IncomingRequest(
rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid, rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid,
rtl::OUString const & oid, css::uno::UnoInterfaceReference const & object, OUString const & oid, css::uno::UnoInterfaceReference const & object,
css::uno::TypeDescription const & type, sal_uInt16 functionId, css::uno::TypeDescription const & type, sal_uInt16 functionId,
bool synchronous, css::uno::TypeDescription const & member, bool setter, bool synchronous, css::uno::TypeDescription const & member, bool setter,
std::vector< BinaryAny > const & inArguments, bool currentContextMode, std::vector< BinaryAny > const & inArguments, bool currentContextMode,
...@@ -80,7 +80,7 @@ void IncomingRequest::execute() const { ...@@ -80,7 +80,7 @@ void IncomingRequest::execute() const {
isExc = !execute_throw(&ret, &outArgs); isExc = !execute_throw(&ret, &outArgs);
} catch (const std::exception & e) { } catch (const std::exception & e) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
(rtl::OUString( (OUString(
RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) + RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) +
rtl::OStringToOUString( rtl::OStringToOUString(
rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)), rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
...@@ -109,7 +109,7 @@ void IncomingRequest::execute() const { ...@@ -109,7 +109,7 @@ void IncomingRequest::execute() const {
} catch (const css::uno::RuntimeException & e) { } catch (const css::uno::RuntimeException & e) {
OSL_TRACE( OSL_TRACE(
OSL_LOG_PREFIX "caught UNO runtime exception '%s'", OSL_LOG_PREFIX "caught UNO runtime exception '%s'",
(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8). (OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
getStr())); getStr()));
} catch (const std::exception & e) { } catch (const std::exception & e) {
OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what());
...@@ -157,9 +157,9 @@ bool IncomingRequest::execute_throw( ...@@ -157,9 +157,9 @@ bool IncomingRequest::execute_throw(
OSL_TRACE( OSL_TRACE(
(OSL_LOG_PREFIX "initial element '%s':" (OSL_LOG_PREFIX "initial element '%s':"
" NoSuchElementException '%s'"), " NoSuchElementException '%s'"),
(rtl::OUStringToOString(oid_, RTL_TEXTENCODING_UTF8). (OUStringToOString(oid_, RTL_TEXTENCODING_UTF8).
getStr()), getStr()),
(rtl::OUStringToOString( (OUStringToOString(
e.Message, RTL_TEXTENCODING_UTF8). e.Message, RTL_TEXTENCODING_UTF8).
getStr())); getStr()));
} }
......
...@@ -43,7 +43,7 @@ class IncomingRequest: private boost::noncopyable { ...@@ -43,7 +43,7 @@ class IncomingRequest: private boost::noncopyable {
public: public:
IncomingRequest( IncomingRequest(
rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid, rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid,
rtl::OUString const & oid, OUString const & oid,
com::sun::star::uno::UnoInterfaceReference const & object, com::sun::star::uno::UnoInterfaceReference const & object,
com::sun::star::uno::TypeDescription const & type, com::sun::star::uno::TypeDescription const & type,
sal_uInt16 functionId, bool synchronous, sal_uInt16 functionId, bool synchronous,
...@@ -61,7 +61,7 @@ private: ...@@ -61,7 +61,7 @@ private:
rtl::Reference< Bridge > bridge_; rtl::Reference< Bridge > bridge_;
rtl::ByteSequence tid_; rtl::ByteSequence tid_;
rtl::OUString oid_; // initial object queryInterface; release OUString oid_; // initial object queryInterface; release
com::sun::star::uno::UnoInterfaceReference object_; com::sun::star::uno::UnoInterfaceReference object_;
com::sun::star::uno::TypeDescription type_; com::sun::star::uno::TypeDescription type_;
sal_uInt16 functionId_; sal_uInt16 functionId_;
......
...@@ -38,8 +38,8 @@ bool operator <(TypeDescription const & left, TypeDescription const & right) { ...@@ -38,8 +38,8 @@ bool operator <(TypeDescription const & left, TypeDescription const & right) {
typelib_TypeClass tc2 = right.get()->eTypeClass; typelib_TypeClass tc2 = right.get()->eTypeClass;
return tc1 < tc2 || return tc1 < tc2 ||
(tc1 == tc2 && (tc1 == tc2 &&
(rtl::OUString(left.get()->pTypeName) < (OUString(left.get()->pTypeName) <
rtl::OUString(right.get()->pTypeName))); OUString(right.get()->pTypeName)));
} }
} } } } } } } }
......
...@@ -73,7 +73,7 @@ void writeCompressed(std::vector< unsigned char > * buffer, sal_uInt32 value) { ...@@ -73,7 +73,7 @@ void writeCompressed(std::vector< unsigned char > * buffer, sal_uInt32 value) {
} }
void writeString( void writeString(
std::vector< unsigned char > * buffer, rtl::OUString const & value) std::vector< unsigned char > * buffer, OUString const & value)
{ {
assert(buffer != 0); assert(buffer != 0);
rtl::OString v; rtl::OString v;
...@@ -83,7 +83,7 @@ void writeString( ...@@ -83,7 +83,7 @@ void writeString(
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))) RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{ {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"UNO string contains invalid UTF-16 sequence")), "UNO string contains invalid UTF-16 sequence")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -148,13 +148,13 @@ void Marshal::writeType( ...@@ -148,13 +148,13 @@ void Marshal::writeType(
} else { } else {
write8(buffer, static_cast< sal_uInt8 >(tc) | 0x80); write8(buffer, static_cast< sal_uInt8 >(tc) | 0x80);
write16(buffer, idx); write16(buffer, idx);
writeString(buffer, rtl::OUString(value.get()->pTypeName)); writeString(buffer, OUString(value.get()->pTypeName));
} }
} }
} }
void Marshal::writeOid( void Marshal::writeOid(
std::vector< unsigned char > * buffer, rtl::OUString const & oid) std::vector< unsigned char > * buffer, OUString const & oid)
{ {
bool found; bool found;
sal_uInt16 idx; sal_uInt16 idx;
...@@ -223,7 +223,7 @@ void Marshal::writeValue( ...@@ -223,7 +223,7 @@ void Marshal::writeValue(
case typelib_TypeClass_STRING: case typelib_TypeClass_STRING:
writeString( writeString(
buffer, buffer,
rtl::OUString(*static_cast< rtl_uString * const * >(value))); OUString(*static_cast< rtl_uString * const * >(value)));
break; break;
case typelib_TypeClass_TYPE: case typelib_TypeClass_TYPE:
writeType( writeType(
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
com::sun::star::uno::TypeDescription const & value); com::sun::star::uno::TypeDescription const & value);
void writeOid( void writeOid(
std::vector< unsigned char > * buffer, rtl::OUString const & oid); std::vector< unsigned char > * buffer, OUString const & oid);
void writeTid( void writeTid(
std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid); std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid);
......
...@@ -51,7 +51,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) { ...@@ -51,7 +51,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
Map::iterator i(map_.find(tid)); Map::iterator i(map_.find(tid));
if (i == map_.end()) { if (i == map_.end()) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM("URP: reply for unknown TID")), RTL_CONSTASCII_USTRINGPARAM("URP: reply for unknown TID")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
......
...@@ -65,7 +65,7 @@ extern "C" void SAL_CALL proxy_dispatchInterface( ...@@ -65,7 +65,7 @@ extern "C" void SAL_CALL proxy_dispatchInterface(
} }
Proxy::Proxy( Proxy::Proxy(
rtl::Reference< Bridge > const & bridge, rtl::OUString const & oid, rtl::Reference< Bridge > const & bridge, OUString const & oid,
css::uno::TypeDescription const & type): css::uno::TypeDescription const & type):
bridge_(bridge), oid_(oid), type_(type), references_(1) bridge_(bridge), oid_(oid), type_(type), references_(1)
{ {
...@@ -75,7 +75,7 @@ Proxy::Proxy( ...@@ -75,7 +75,7 @@ Proxy::Proxy(
pDispatcher = &proxy_dispatchInterface; pDispatcher = &proxy_dispatchInterface;
} }
rtl::OUString Proxy::getOid() const { OUString Proxy::getOid() const {
return oid_; return oid_;
} }
...@@ -109,7 +109,7 @@ void Proxy::do_dispatch( ...@@ -109,7 +109,7 @@ void Proxy::do_dispatch(
do_dispatch_throw(member, returnValue, arguments, exception); do_dispatch_throw(member, returnValue, arguments, exception);
} catch (const std::exception & e) { } catch (const std::exception & e) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
(rtl::OUString( (OUString(
RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) + RTL_CONSTASCII_USTRINGPARAM("caught C++ exception: ")) +
rtl::OStringToOUString( rtl::OStringToOUString(
rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)), rtl::OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
...@@ -128,7 +128,7 @@ void Proxy::do_dispatch( ...@@ -128,7 +128,7 @@ void Proxy::do_dispatch(
bool Proxy::isProxy( bool Proxy::isProxy(
rtl::Reference< Bridge > const & bridge, rtl::Reference< Bridge > const & bridge,
css::uno::UnoInterfaceReference const & object, rtl::OUString * oid) css::uno::UnoInterfaceReference const & object, OUString * oid)
{ {
assert(object.is()); assert(object.is());
return object.m_pUnoI->acquire == &proxy_acquireInterface && return object.m_pUnoI->acquire == &proxy_acquireInterface &&
...@@ -237,7 +237,7 @@ void Proxy::do_dispatch_throw( ...@@ -237,7 +237,7 @@ void Proxy::do_dispatch_throw(
} }
bool Proxy::isProxy( bool Proxy::isProxy(
rtl::Reference< Bridge > const & bridge, rtl::OUString * oid) const rtl::Reference< Bridge > const & bridge, OUString * oid) const
{ {
assert(oid != 0); assert(oid != 0);
if (bridge == bridge_) { if (bridge == bridge_) {
......
...@@ -41,10 +41,10 @@ namespace binaryurp { ...@@ -41,10 +41,10 @@ namespace binaryurp {
class Proxy: public uno_Interface, private boost::noncopyable { class Proxy: public uno_Interface, private boost::noncopyable {
public: public:
Proxy( Proxy(
rtl::Reference< Bridge > const & bridge, rtl::OUString const & oid, rtl::Reference< Bridge > const & bridge, OUString const & oid,
com::sun::star::uno::TypeDescription const & type); com::sun::star::uno::TypeDescription const & type);
rtl::OUString getOid() const; OUString getOid() const;
com::sun::star::uno::TypeDescription getType() const; com::sun::star::uno::TypeDescription getType() const;
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
static bool isProxy( static bool isProxy(
rtl::Reference< Bridge > const & bridge, rtl::Reference< Bridge > const & bridge,
com::sun::star::uno::UnoInterfaceReference const & object, com::sun::star::uno::UnoInterfaceReference const & object,
rtl::OUString * oid); OUString * oid);
private: private:
~Proxy(); ~Proxy();
...@@ -70,11 +70,11 @@ private: ...@@ -70,11 +70,11 @@ private:
typelib_TypeDescription const * member, void * returnValue, typelib_TypeDescription const * member, void * returnValue,
void ** arguments, uno_Any ** exception) const; void ** arguments, uno_Any ** exception) const;
bool isProxy(rtl::Reference< Bridge > const & bridge, rtl::OUString * oid) bool isProxy(rtl::Reference< Bridge > const & bridge, OUString * oid)
const; const;
rtl::Reference< Bridge > bridge_; rtl::Reference< Bridge > bridge_;
rtl::OUString oid_; OUString oid_;
com::sun::star::uno::TypeDescription type_; com::sun::star::uno::TypeDescription type_;
oslInterlockedCount references_; oslInterlockedCount references_;
}; };
......
...@@ -69,7 +69,7 @@ css::uno::Sequence< sal_Int8 > read( ...@@ -69,7 +69,7 @@ css::uno::Sequence< sal_Int8 > read(
assert(connection.is()); assert(connection.is());
if (size > SAL_MAX_INT32) { if (size > SAL_MAX_INT32) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Reader: block size too large")), "binaryurp::Reader: block size too large")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -81,7 +81,7 @@ css::uno::Sequence< sal_Int8 > read( ...@@ -81,7 +81,7 @@ css::uno::Sequence< sal_Int8 > read(
} }
if (n != static_cast< sal_Int32 >(size)) { if (n != static_cast< sal_Int32 >(size)) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Reader: premature end of input")), "binaryurp::Reader: premature end of input")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -123,7 +123,7 @@ void Reader::execute() { ...@@ -123,7 +123,7 @@ void Reader::execute() {
header.done(); header.done();
if (count == 0) { if (count == 0) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Reader: block with zero message count" "binaryurp::Reader: block with zero message count"
" received")), " received")),
...@@ -164,7 +164,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -164,7 +164,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
if (((flags2 & 0x40) != 0) != forceSynchronous) { if (((flags2 & 0x40) != 0) != forceSynchronous) {
// bit 6: SYNCHRONOUS // bit 6: SYNCHRONOUS
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with MUSTREPLY != SYNCHRONOUS" "URP: request message with MUSTREPLY != SYNCHRONOUS"
" received")), " received")),
...@@ -190,7 +190,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -190,7 +190,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
} else { } else {
if (!lastType_.is()) { if (!lastType_.is()) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with NEWTYPE received when last" "URP: request message with NEWTYPE received when last"
" interface type has not yet been set")), " interface type has not yet been set")),
...@@ -198,12 +198,12 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -198,12 +198,12 @@ void Reader::readMessage(Unmarshal & unmarshal) {
} }
type = lastType_; type = lastType_;
} }
rtl::OUString oid; OUString oid;
if (newOid) { if (newOid) {
oid = unmarshal.readOid(); oid = unmarshal.readOid();
if (oid.isEmpty()) { if (oid.isEmpty()) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: emtpy OID")), "binaryurp::Unmarshal: emtpy OID")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -212,7 +212,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -212,7 +212,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
} else { } else {
if (lastOid_.isEmpty()) { if (lastOid_.isEmpty()) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with NEWOID received when last" "URP: request message with NEWOID received when last"
" OID has not yet been set")), " OID has not yet been set")),
...@@ -225,7 +225,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -225,7 +225,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
type.makeComplete(); type.makeComplete();
if (type.get()->eTypeClass != typelib_TypeClass_INTERFACE) { if (type.get()->eTypeClass != typelib_TypeClass_INTERFACE) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with non-interface interface type" "URP: request message with non-interface interface type"
" received")), " received")),
...@@ -235,7 +235,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -235,7 +235,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get()); reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get());
if (functionId >= itd->nMapFunctionIndexToMemberIndex) { if (functionId >= itd->nMapFunctionIndexToMemberIndex) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with unknown function ID received")), "URP: request message with unknown function ID received")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -266,7 +266,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -266,7 +266,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
} else { } else {
if (forceSynchronous) { if (forceSynchronous) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: synchronous request message with non-oneway" "URP: synchronous request message with non-oneway"
" function ID received")), " function ID received")),
...@@ -322,7 +322,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -322,7 +322,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
break; break;
default: default:
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with UrpProtocolProperties OID" "URP: request message with UrpProtocolProperties OID"
" and unknown function ID received")), " and unknown function ID received")),
...@@ -355,7 +355,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -355,7 +355,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
css::uno::XInterface > >::get()))))) css::uno::XInterface > >::get())))))
{ {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: queryInterface request message with" "URP: queryInterface request message with"
" unknown OID received")), " unknown OID received")),
...@@ -365,7 +365,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -365,7 +365,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
break; break;
case SPECIAL_FUNCTION_ID_RESERVED: case SPECIAL_FUNCTION_ID_RESERVED:
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with unknown function ID 1" "URP: request message with unknown function ID 1"
" received")), " received")),
...@@ -376,7 +376,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { ...@@ -376,7 +376,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
obj = bridge_->findStub(oid, type); obj = bridge_->findStub(oid, type);
if (!obj.is()) { if (!obj.is()) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: request message with unknown OID received")), "URP: request message with unknown OID received")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -457,7 +457,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) { ...@@ -457,7 +457,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
} }
if (!ok) { if (!ok) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: reply message with bad exception type" "URP: reply message with bad exception type"
" received")), " received")),
...@@ -532,7 +532,7 @@ rtl::ByteSequence Reader::getTid(Unmarshal & unmarshal, bool newTid) const { ...@@ -532,7 +532,7 @@ rtl::ByteSequence Reader::getTid(Unmarshal & unmarshal, bool newTid) const {
} }
if (lastTid_.getLength() == 0) { if (lastTid_.getLength() == 0) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"URP: message with NEWTID received when last TID has not" "URP: message with NEWTID received when last TID has not"
" yet been set")), " yet been set")),
......
...@@ -55,7 +55,7 @@ private: ...@@ -55,7 +55,7 @@ private:
rtl::Reference< Bridge > bridge_; rtl::Reference< Bridge > bridge_;
com::sun::star::uno::TypeDescription lastType_; com::sun::star::uno::TypeDescription lastType_;
rtl::OUString lastOid_; OUString lastOid_;
rtl::ByteSequence lastTid_; rtl::ByteSequence lastTid_;
ReaderState state_; ReaderState state_;
}; };
......
...@@ -34,7 +34,7 @@ namespace binaryurp { ...@@ -34,7 +34,7 @@ namespace binaryurp {
struct ReaderState: private boost::noncopyable { struct ReaderState: private boost::noncopyable {
com::sun::star::uno::TypeDescription typeCache[cache::size]; com::sun::star::uno::TypeDescription typeCache[cache::size];
rtl::OUString oidCache[cache::size]; OUString oidCache[cache::size];
rtl::ByteSequence tidCache[cache::size]; rtl::ByteSequence tidCache[cache::size];
}; };
......
...@@ -146,7 +146,7 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -146,7 +146,7 @@ css::uno::TypeDescription Unmarshal::readType() {
case typelib_TypeClass_ANY: case typelib_TypeClass_ANY:
if ((flags & 0x80) != 0) { if ((flags & 0x80) != 0) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: cache flag of simple type is" "binaryurp::Unmarshal: cache flag of simple type is"
" set")), " set")),
...@@ -165,7 +165,7 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -165,7 +165,7 @@ css::uno::TypeDescription Unmarshal::readType() {
if ((flags & 0x80) == 0) { if ((flags & 0x80) == 0) {
if (idx == cache::ignore || !state_.typeCache[idx].is()) { if (idx == cache::ignore || !state_.typeCache[idx].is()) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: unknown type cache" "binaryurp::Unmarshal: unknown type cache"
" index")), " index")),
...@@ -173,14 +173,14 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -173,14 +173,14 @@ css::uno::TypeDescription Unmarshal::readType() {
} }
return state_.typeCache[idx]; return state_.typeCache[idx];
} else { } else {
rtl::OUString const str(readString()); OUString const str(readString());
css::uno::TypeDescription t(str); css::uno::TypeDescription t(str);
if (!t.is() || if (!t.is() ||
t.get()->eTypeClass != static_cast< typelib_TypeClass >(tc)) t.get()->eTypeClass != static_cast< typelib_TypeClass >(tc))
{ {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: type with unknown" "binaryurp::Unmarshal: type with unknown"
" name: ")) + str, " name: ")) + str,
...@@ -195,7 +195,7 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -195,7 +195,7 @@ css::uno::TypeDescription Unmarshal::readType() {
t2.get())->pType); t2.get())->pType);
if (!t2.is()) { if (!t2.is()) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: sequence type with" "binaryurp::Unmarshal: sequence type with"
" unknown component type")), " unknown component type")),
...@@ -205,7 +205,7 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -205,7 +205,7 @@ css::uno::TypeDescription Unmarshal::readType() {
case typelib_TypeClass_VOID: case typelib_TypeClass_VOID:
case typelib_TypeClass_EXCEPTION: case typelib_TypeClass_EXCEPTION:
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: sequence type with" "binaryurp::Unmarshal: sequence type with"
" bad component type")), " bad component type")),
...@@ -222,19 +222,19 @@ css::uno::TypeDescription Unmarshal::readType() { ...@@ -222,19 +222,19 @@ css::uno::TypeDescription Unmarshal::readType() {
} }
default: default:
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: type of unknown type class")), "binaryurp::Unmarshal: type of unknown type class")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
} }
rtl::OUString Unmarshal::readOid() { OUString Unmarshal::readOid() {
rtl::OUString oid(readString()); OUString oid(readString());
for (sal_Int32 i = 0; i != oid.getLength(); ++i) { for (sal_Int32 i = 0; i != oid.getLength(); ++i) {
if (oid[i] > 0x7F) { if (oid[i] > 0x7F) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: OID contains non-ASCII" "binaryurp::Unmarshal: OID contains non-ASCII"
" character")), " character")),
...@@ -245,7 +245,7 @@ rtl::OUString Unmarshal::readOid() { ...@@ -245,7 +245,7 @@ rtl::OUString Unmarshal::readOid() {
if (oid.isEmpty() && idx != cache::ignore) { if (oid.isEmpty() && idx != cache::ignore) {
if (state_.oidCache[idx].isEmpty()) { if (state_.oidCache[idx].isEmpty()) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: unknown OID cache index")), "binaryurp::Unmarshal: unknown OID cache index")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -271,7 +271,7 @@ rtl::ByteSequence Unmarshal::readTid() { ...@@ -271,7 +271,7 @@ rtl::ByteSequence Unmarshal::readTid() {
if (tid.getLength() == 0) { if (tid.getLength() == 0) {
if (idx == cache::ignore || state_.tidCache[idx].getLength() == 0) { if (idx == cache::ignore || state_.tidCache[idx].getLength() == 0) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: unknown TID cache index")), "binaryurp::Unmarshal: unknown TID cache index")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -297,7 +297,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { ...@@ -297,7 +297,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
sal_uInt8 v = read8(); sal_uInt8 v = read8();
if (v > 1) { if (v > 1) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: boolean of unknown value")), "binaryurp::Unmarshal: boolean of unknown value")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -332,7 +332,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { ...@@ -332,7 +332,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
} }
case typelib_TypeClass_STRING: case typelib_TypeClass_STRING:
{ {
rtl::OUString v(readString()); OUString v(readString());
return BinaryAny(type, &v.pData); return BinaryAny(type, &v.pData);
} }
case typelib_TypeClass_TYPE: case typelib_TypeClass_TYPE:
...@@ -346,7 +346,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { ...@@ -346,7 +346,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
css::uno::TypeDescription t(readType()); css::uno::TypeDescription t(readType());
if (t.get()->eTypeClass == typelib_TypeClass_ANY) { if (t.get()->eTypeClass == typelib_TypeClass_ANY) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: any of type ANY")), "binaryurp::Unmarshal: any of type ANY")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -371,7 +371,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { ...@@ -371,7 +371,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
} }
if (!found) { if (!found) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: unknown enum value")), "binaryurp::Unmarshal: unknown enum value")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -404,7 +404,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) { ...@@ -404,7 +404,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
void Unmarshal::done() const { void Unmarshal::done() const {
if (data_ != end_) { if (data_ != end_) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: block contains excess data")), "binaryurp::Unmarshal: block contains excess data")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -414,7 +414,7 @@ void Unmarshal::done() const { ...@@ -414,7 +414,7 @@ void Unmarshal::done() const {
void Unmarshal::check(sal_Int32 size) const { void Unmarshal::check(sal_Int32 size) const {
if (end_ - data_ < size) { if (end_ - data_ < size) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: trying to read past end of block")), "binaryurp::Unmarshal: trying to read past end of block")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -430,7 +430,7 @@ sal_uInt16 Unmarshal::readCacheIndex() { ...@@ -430,7 +430,7 @@ sal_uInt16 Unmarshal::readCacheIndex() {
sal_uInt16 idx = read16(); sal_uInt16 idx = read16();
if (idx >= cache::size && idx != cache::ignore) { if (idx >= cache::size && idx != cache::ignore) {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: cache index out of range")), "binaryurp::Unmarshal: cache index out of range")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -450,17 +450,17 @@ sal_uInt64 Unmarshal::read64() { ...@@ -450,17 +450,17 @@ sal_uInt64 Unmarshal::read64() {
return n | *data_++; return n | *data_++;
} }
rtl::OUString Unmarshal::readString() { OUString Unmarshal::readString() {
sal_uInt32 n = readCompressed(); sal_uInt32 n = readCompressed();
if (n > SAL_MAX_INT32) { if (n > SAL_MAX_INT32) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: string size too large")), "binaryurp::Unmarshal: string size too large")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
check(static_cast< sal_Int32 >(n)); check(static_cast< sal_Int32 >(n));
rtl::OUString s; OUString s;
if (!rtl_convertStringToUString( if (!rtl_convertStringToUString(
&s.pData, reinterpret_cast< char const * >(data_), &s.pData, reinterpret_cast< char const * >(data_),
static_cast< sal_Int32 >(n), RTL_TEXTENCODING_UTF8, static_cast< sal_Int32 >(n), RTL_TEXTENCODING_UTF8,
...@@ -469,7 +469,7 @@ rtl::OUString Unmarshal::readString() { ...@@ -469,7 +469,7 @@ rtl::OUString Unmarshal::readString() {
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))) RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{ {
throw css::io::IOException( throw css::io::IOException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: string does not contain UTF-8")), "binaryurp::Unmarshal: string does not contain UTF-8")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -483,7 +483,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) { ...@@ -483,7 +483,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
sal_uInt32 n = readCompressed(); sal_uInt32 n = readCompressed();
if (n > SAL_MAX_INT32) { if (n > SAL_MAX_INT32) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: sequence size too large")), "binaryurp::Unmarshal: sequence size too large")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
...@@ -513,7 +513,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) { ...@@ -513,7 +513,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
// sal_uInt32 * sal_Int32 -> sal_uInt64 cannot overflow // sal_uInt32 * sal_Int32 -> sal_uInt64 cannot overflow
if (size > SAL_MAX_SIZE - SAL_SEQUENCE_HEADER_SIZE) { if (size > SAL_MAX_SIZE - SAL_SEQUENCE_HEADER_SIZE) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"binaryurp::Unmarshal: sequence size too large")), "binaryurp::Unmarshal: sequence size too large")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
com::sun::star::uno::TypeDescription readType(); com::sun::star::uno::TypeDescription readType();
rtl::OUString readOid(); OUString readOid();
rtl::ByteSequence readTid(); rtl::ByteSequence readTid();
...@@ -77,7 +77,7 @@ private: ...@@ -77,7 +77,7 @@ private:
sal_uInt64 read64(); sal_uInt64 read64();
rtl::OUString readString(); OUString readString();
BinaryAny readSequence(com::sun::star::uno::TypeDescription const & type); BinaryAny readSequence(com::sun::star::uno::TypeDescription const & type);
......
...@@ -47,7 +47,7 @@ namespace css = com::sun::star; ...@@ -47,7 +47,7 @@ namespace css = com::sun::star;
Writer::Item::Item() {} Writer::Item::Item() {}
Writer::Item::Item( Writer::Item::Item(
rtl::ByteSequence const & theTid, rtl::OUString const & theOid, rtl::ByteSequence const & theTid, OUString const & theOid,
css::uno::TypeDescription const & theType, css::uno::TypeDescription const & theType,
css::uno::TypeDescription const & theMember, css::uno::TypeDescription const & theMember,
std::vector< BinaryAny > const & inArguments, std::vector< BinaryAny > const & inArguments,
...@@ -75,7 +75,7 @@ Writer::Writer(rtl::Reference< Bridge > const & bridge): ...@@ -75,7 +75,7 @@ Writer::Writer(rtl::Reference< Bridge > const & bridge):
} }
void Writer::sendDirectRequest( void Writer::sendDirectRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
css::uno::TypeDescription const & type, css::uno::TypeDescription const & type,
css::uno::TypeDescription const & member, css::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments) std::vector< BinaryAny > const & inArguments)
...@@ -96,7 +96,7 @@ void Writer::sendDirectReply( ...@@ -96,7 +96,7 @@ void Writer::sendDirectReply(
} }
void Writer::queueRequest( void Writer::queueRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
css::uno::TypeDescription const & type, css::uno::TypeDescription const & type,
css::uno::TypeDescription const & member, css::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments) std::vector< BinaryAny > const & inArguments)
...@@ -163,7 +163,7 @@ void Writer::execute() { ...@@ -163,7 +163,7 @@ void Writer::execute() {
(item.oid != "UrpProtocolProperties" && (item.oid != "UrpProtocolProperties" &&
!item.member.equals( !item.member.equals(
css::uno::TypeDescription( css::uno::TypeDescription(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.uno.XInterface::" "com.sun.star.uno.XInterface::"
"release")))) && "release")))) &&
...@@ -181,7 +181,7 @@ void Writer::execute() { ...@@ -181,7 +181,7 @@ void Writer::execute() {
} catch (const css::uno::Exception & e) { } catch (const css::uno::Exception & e) {
OSL_TRACE( OSL_TRACE(
OSL_LOG_PREFIX "caught UNO exception '%s'", OSL_LOG_PREFIX "caught UNO exception '%s'",
rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
} catch (const std::exception & e) { } catch (const std::exception & e) {
OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what()); OSL_TRACE(OSL_LOG_PREFIX "caught C++ exception '%s'", e.what());
} }
...@@ -189,7 +189,7 @@ void Writer::execute() { ...@@ -189,7 +189,7 @@ void Writer::execute() {
} }
void Writer::sendRequest( void Writer::sendRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
css::uno::TypeDescription const & type, css::uno::TypeDescription const & type,
css::uno::TypeDescription const & member, css::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments, bool currentContextMode, std::vector< BinaryAny > const & inArguments, bool currentContextMode,
...@@ -241,7 +241,7 @@ void Writer::sendRequest( ...@@ -241,7 +241,7 @@ void Writer::sendRequest(
OSL_ASSERT(functionId >= 0); OSL_ASSERT(functionId >= 0);
if (functionId > SAL_MAX_UINT16) { if (functionId > SAL_MAX_UINT16) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM("function ID too large for URP")), RTL_CONSTASCII_USTRINGPARAM("function ID too large for URP")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
...@@ -409,7 +409,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) { ...@@ -409,7 +409,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
std::vector< unsigned char > header; std::vector< unsigned char > header;
if (buffer.size() > SAL_MAX_UINT32) { if (buffer.size() > SAL_MAX_UINT32) {
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
rtl::OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM("message too large for URP")), RTL_CONSTASCII_USTRINGPARAM("message too large for URP")),
css::uno::Reference< css::uno::XInterface >()); css::uno::Reference< css::uno::XInterface >());
} }
...@@ -435,7 +435,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) { ...@@ -435,7 +435,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
} catch (const css::io::IOException & e) { } catch (const css::io::IOException & e) {
css::uno::Any exc(cppu::getCaughtException()); css::uno::Any exc(cppu::getCaughtException());
throw css::lang::WrappedTargetRuntimeException( throw css::lang::WrappedTargetRuntimeException(
(rtl::OUString( (OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(
"Binary URP write raised IO exception: ")) + "Binary URP write raised IO exception: ")) +
e.Message), e.Message),
......
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
// Only called from Bridge::reader_ thread, and only before Bridge::writer_ // Only called from Bridge::reader_ thread, and only before Bridge::writer_
// thread is unblocked: // thread is unblocked:
void sendDirectRequest( void sendDirectRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type, com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member, com::sun::star::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments); std::vector< BinaryAny > const & inArguments);
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
std::vector< BinaryAny > const & outArguments); std::vector< BinaryAny > const & outArguments);
void queueRequest( void queueRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type, com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member, com::sun::star::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments); std::vector< BinaryAny > const & inArguments);
...@@ -86,7 +86,7 @@ private: ...@@ -86,7 +86,7 @@ private:
virtual void execute(); virtual void execute();
void sendRequest( void sendRequest(
rtl::ByteSequence const & tid, rtl::OUString const & oid, rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type, com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member, com::sun::star::uno::TypeDescription const & member,
std::vector< BinaryAny > const & inArguments, bool currentContextMode, std::vector< BinaryAny > const & inArguments, bool currentContextMode,
...@@ -105,7 +105,7 @@ private: ...@@ -105,7 +105,7 @@ private:
// Request: // Request:
Item( Item(
rtl::ByteSequence const & theTid, rtl::OUString const & theOid, rtl::ByteSequence const & theTid, OUString const & theOid,
com::sun::star::uno::TypeDescription const & theType, com::sun::star::uno::TypeDescription const & theType,
com::sun::star::uno::TypeDescription const & theMember, com::sun::star::uno::TypeDescription const & theMember,
std::vector< BinaryAny > const & inArguments, std::vector< BinaryAny > const & inArguments,
...@@ -124,7 +124,7 @@ private: ...@@ -124,7 +124,7 @@ private:
rtl::ByteSequence tid; // request + reply rtl::ByteSequence tid; // request + reply
rtl::OUString oid; // request OUString oid; // request
com::sun::star::uno::TypeDescription type; // request com::sun::star::uno::TypeDescription type; // request
...@@ -148,7 +148,7 @@ private: ...@@ -148,7 +148,7 @@ private:
WriterState state_; WriterState state_;
Marshal marshal_; Marshal marshal_;
com::sun::star::uno::TypeDescription lastType_; com::sun::star::uno::TypeDescription lastType_;
rtl::OUString lastOid_; OUString lastOid_;
rtl::ByteSequence lastTid_; rtl::ByteSequence lastTid_;
osl::Condition unblocked_; osl::Condition unblocked_;
osl::Condition items_; osl::Condition items_;
......
...@@ -37,7 +37,7 @@ struct WriterState: private boost::noncopyable { ...@@ -37,7 +37,7 @@ struct WriterState: private boost::noncopyable {
Cache< com::sun::star::uno::TypeDescription > typeCache; Cache< com::sun::star::uno::TypeDescription > typeCache;
Cache< rtl::OUString > oidCache; Cache< OUString > oidCache;
Cache< rtl::ByteSequence > tidCache; Cache< rtl::ByteSequence > tidCache;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment