remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
This commit is contained in:
parent
c5d47c327a
commit
e7bc3cab01
@ -138,7 +138,7 @@ void SAL_CALL SIDEModel::storeToURL( const OUString&,
|
||||
|
||||
void SIDEModel::notImplemented() throw ( io::IOException )
|
||||
{
|
||||
throw io::IOException("Can't store IDE model", uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException("Can't store IDE model" );
|
||||
}
|
||||
|
||||
} // namespace basctl
|
||||
|
@ -164,7 +164,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
if ( !Number.hasValue() )
|
||||
throw uno::RuntimeException("Missing Required Parameter", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException("Missing Required Parameter" );
|
||||
Number >>= m_nNumber;
|
||||
Description >>= m_sDescription;
|
||||
Source >>= m_sSource;
|
||||
|
@ -212,8 +212,7 @@ Reference< XHierarchicalNameAccess > getTypeProvider_Impl( void )
|
||||
if( !xAccess.is() )
|
||||
{
|
||||
throw DeploymentException(
|
||||
OUString("/singletons/com.sun.star.reflection.theTypeDescriptionManager singleton not accessible"),
|
||||
Reference< XInterface >() );
|
||||
"/singletons/com.sun.star.reflection.theTypeDescriptionManager singleton not accessible" );
|
||||
}
|
||||
}
|
||||
return xAccess;
|
||||
@ -236,8 +235,7 @@ Reference< XTypeConverter > getTypeConverter_Impl( void )
|
||||
if( !xTypeConverter.is() )
|
||||
{
|
||||
throw DeploymentException(
|
||||
OUString("com.sun.star.script.Converter service not accessible"),
|
||||
Reference< XInterface >() );
|
||||
"com.sun.star.script.Converter service not accessible" );
|
||||
}
|
||||
}
|
||||
return xTypeConverter;
|
||||
|
@ -242,7 +242,7 @@ void NameContainer::removeByName( const OUString& aName )
|
||||
if( aIt == mHashMap.end() )
|
||||
{
|
||||
OUString sMessage = "\"" + aName + "\" not found";
|
||||
throw NoSuchElementException(sMessage, uno::Reference< uno::XInterface >());
|
||||
throw NoSuchElementException(sMessage);
|
||||
}
|
||||
|
||||
sal_Int32 iHashResult = (*aIt).second;
|
||||
|
@ -194,14 +194,10 @@ Bridge::Bridge(
|
||||
{
|
||||
assert(factory.is() && connection.is());
|
||||
if (!binaryUno_.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: no binary UNO environment",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("URP: no binary UNO environment");
|
||||
}
|
||||
if (!(cppToBinaryMapping_.is() && binaryToCppMapping_.is())) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: no C++ UNO mapping",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("URP: no C++ UNO mapping");
|
||||
}
|
||||
passive_.set();
|
||||
}
|
||||
@ -464,8 +460,7 @@ OUString Bridge::registerOutgoingInterface(
|
||||
assert(stub != &newStub);
|
||||
if (j->second.references == SAL_MAX_UINT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: stub reference count overflow",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: stub reference count overflow");
|
||||
}
|
||||
++j->second.references;
|
||||
}
|
||||
@ -505,15 +500,11 @@ void Bridge::releaseStub(
|
||||
osl::MutexGuard g(mutex_);
|
||||
Stubs::iterator i(stubs_.find(oid));
|
||||
if (i == stubs_.end()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: release unknown stub",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("URP: release unknown stub");
|
||||
}
|
||||
Stub::iterator j(i->second.find(type));
|
||||
if (j == i->second.end()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: release unknown stub",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("URP: release unknown stub");
|
||||
}
|
||||
assert(j->second.references > 0);
|
||||
--j->second.references;
|
||||
@ -880,9 +871,8 @@ css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
|
||||
for (sal_Int32 i = 0; i != sInstanceName.getLength(); ++i) {
|
||||
if (sInstanceName[i] > 0x7F) {
|
||||
throw css::uno::RuntimeException(
|
||||
("XBridge::getInstance sInstanceName contains non-ASCII"
|
||||
" character"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"XBridge::getInstance sInstanceName contains non-ASCII"
|
||||
" character");
|
||||
}
|
||||
}
|
||||
css::uno::TypeDescription ifc(
|
||||
|
@ -40,9 +40,7 @@ css::uno::UnoInterfaceReference get() {
|
||||
reinterpret_cast< void ** >(&cc.m_pUnoI),
|
||||
OUString(UNO_LB_UNO).pData, 0))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"uno_getCurrentContext failed",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("uno_getCurrentContext failed");
|
||||
}
|
||||
return cc;
|
||||
}
|
||||
@ -53,9 +51,7 @@ void set(css::uno::UnoInterfaceReference const & value) {
|
||||
cc.m_pUnoI,
|
||||
OUString(UNO_LB_UNO).pData, 0))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"uno_setCurrentContext failed",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("uno_setCurrentContext failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,10 +74,9 @@ void IncomingRequest::execute() const {
|
||||
isExc = !execute_throw(&ret, &outArgs);
|
||||
} catch (const std::exception & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
("caught C++ exception: " +
|
||||
OStringToOUString(
|
||||
OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"caught C++ exception: " +
|
||||
OStringToOUString(
|
||||
OString(e.what()), RTL_TEXTENCODING_ASCII_US));
|
||||
// best-effort string conversion
|
||||
}
|
||||
} catch (const css::uno::RuntimeException &) {
|
||||
|
@ -81,8 +81,7 @@ void writeString(
|
||||
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"UNO string contains invalid UTF-16 sequence",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"UNO string contains invalid UTF-16 sequence");
|
||||
}
|
||||
writeCompressed(buffer, static_cast< sal_uInt32 >(v.getLength()));
|
||||
buffer->insert(buffer->end(), v.getStr(), v.getStr() + v.getLength());
|
||||
|
@ -45,8 +45,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
|
||||
Map::iterator i(map_.find(tid));
|
||||
if (i == map_.end()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: reply for unknown TID",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: reply for unknown TID");
|
||||
}
|
||||
OSL_ASSERT(!i->second.empty());
|
||||
return i->second.back();
|
||||
|
@ -107,10 +107,9 @@ void Proxy::do_dispatch(
|
||||
do_dispatch_throw(member, returnValue, arguments, exception);
|
||||
} catch (const std::exception & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
("caught C++ exception: " +
|
||||
"caught C++ exception: " +
|
||||
OStringToOUString(
|
||||
OString(e.what()), RTL_TEXTENCODING_ASCII_US)),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
OString(e.what()), RTL_TEXTENCODING_ASCII_US));
|
||||
// best-effort string conversion
|
||||
}
|
||||
} catch (const css::uno::RuntimeException &) {
|
||||
|
@ -63,8 +63,7 @@ css::uno::Sequence< sal_Int8 > read(
|
||||
assert(connection.is());
|
||||
if (size > SAL_MAX_INT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"binaryurp::Reader: block size too large",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Reader: block size too large");
|
||||
}
|
||||
css::uno::Sequence< sal_Int8 > buf;
|
||||
sal_Int32 n = connection->read(buf, static_cast< sal_Int32 >(size));
|
||||
@ -73,8 +72,7 @@ css::uno::Sequence< sal_Int8 > read(
|
||||
}
|
||||
if (n != static_cast< sal_Int32 >(size)) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Reader: premature end of input",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Reader: premature end of input");
|
||||
}
|
||||
assert(buf.getLength() == static_cast< sal_Int32 >(size));
|
||||
return buf;
|
||||
@ -113,8 +111,7 @@ void Reader::execute() {
|
||||
header.done();
|
||||
if (count == 0) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Reader: block with zero message count received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Reader: block with zero message count received");
|
||||
}
|
||||
Unmarshal block(bridge_, state_, read(con, size, false));
|
||||
for (sal_uInt32 i = 0; i != count; ++i) {
|
||||
@ -152,9 +149,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
if (((flags2 & 0x40) != 0) != forceSynchronous) {
|
||||
// bit 6: SYNCHRONOUS
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: request message with MUSTREPLY != SYNCHRONOUS"
|
||||
" received"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with MUSTREPLY != SYNCHRONOUS"
|
||||
" received");
|
||||
}
|
||||
} else {
|
||||
forceSynchronous = false;
|
||||
@ -176,9 +172,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
} else {
|
||||
if (!lastType_.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: request message with NEWTYPE received when last"
|
||||
" interface type has not yet been set"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with NEWTYPE received when last"
|
||||
" interface type has not yet been set");
|
||||
}
|
||||
type = lastType_;
|
||||
}
|
||||
@ -187,16 +182,14 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
oid = unmarshal.readOid();
|
||||
if (oid.isEmpty()) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: emtpy OID",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: emtpy OID");
|
||||
}
|
||||
lastOid_ = oid;
|
||||
} else {
|
||||
if (lastOid_.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: request message with NEWOID received when last OID has"
|
||||
" not yet been set"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with NEWOID received when last OID has"
|
||||
" not yet been set");
|
||||
}
|
||||
oid = lastOid_;
|
||||
}
|
||||
@ -205,15 +198,13 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
type.makeComplete();
|
||||
if (type.get()->eTypeClass != typelib_TypeClass_INTERFACE) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: request message with non-interface interface type received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with non-interface interface type received");
|
||||
}
|
||||
typelib_InterfaceTypeDescription * itd =
|
||||
reinterpret_cast< typelib_InterfaceTypeDescription * >(type.get());
|
||||
if (functionId >= itd->nMapFunctionIndexToMemberIndex) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: request message with unknown function ID received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with unknown function ID received");
|
||||
}
|
||||
sal_Int32 memberId = itd->pMapFunctionIndexToMemberIndex[functionId];
|
||||
css::uno::TypeDescription memberTd(itd->ppAllMembers[memberId]);
|
||||
@ -289,9 +280,8 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
break;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: request message with UrpProtocolProperties OID and"
|
||||
" unknown function ID received"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with UrpProtocolProperties OID and"
|
||||
" unknown function ID received");
|
||||
}
|
||||
} else {
|
||||
css::uno::UnoInterfaceReference obj;
|
||||
@ -320,24 +310,21 @@ void Reader::readMessage(Unmarshal & unmarshal) {
|
||||
css::uno::XInterface > >::get())))))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: queryInterface request message with unknown OID"
|
||||
" received"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: queryInterface request message with unknown OID"
|
||||
" received");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPECIAL_FUNCTION_ID_RESERVED:
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: request message with unknown function ID 1 received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with unknown function ID 1 received");
|
||||
case SPECIAL_FUNCTION_ID_RELEASE:
|
||||
break;
|
||||
default:
|
||||
obj = bridge_->findStub(oid, type);
|
||||
if (!obj.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: request message with unknown OID received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: request message with unknown OID received");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -413,8 +400,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
|
||||
}
|
||||
if (!ok) {
|
||||
throw css::uno::RuntimeException(
|
||||
"URP: reply message with bad exception type received",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: reply message with bad exception type received");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -483,9 +469,8 @@ rtl::ByteSequence Reader::getTid(Unmarshal & unmarshal, bool newTid) const {
|
||||
}
|
||||
if (lastTid_.getLength() == 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
("URP: message with NEWTID received when last TID has not yet been"
|
||||
" set"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URP: message with NEWTID received when last TID has not yet been"
|
||||
" set");
|
||||
}
|
||||
return lastTid_;
|
||||
}
|
||||
|
@ -144,8 +144,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
||||
case typelib_TypeClass_ANY:
|
||||
if ((flags & 0x80) != 0) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: cache flag of simple type is set",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: cache flag of simple type is set");
|
||||
}
|
||||
return css::uno::TypeDescription(
|
||||
*typelib_static_type_getByTypeClass(
|
||||
@ -160,8 +159,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
||||
if ((flags & 0x80) == 0) {
|
||||
if (idx == cache::ignore || !state_.typeCache[idx].is()) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: unknown type cache index",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: unknown type cache index");
|
||||
}
|
||||
return state_.typeCache[idx];
|
||||
} else {
|
||||
@ -172,8 +170,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
||||
{
|
||||
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: type with unknown name: " + str,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: type with unknown name: " + str);
|
||||
}
|
||||
for (css::uno::TypeDescription t2(t);
|
||||
t2.get()->eTypeClass == typelib_TypeClass_SEQUENCE;)
|
||||
@ -184,17 +181,15 @@ css::uno::TypeDescription Unmarshal::readType() {
|
||||
t2.get())->pType);
|
||||
if (!t2.is()) {
|
||||
throw css::io::IOException(
|
||||
("binaryurp::Unmarshal: sequence type with unknown"
|
||||
" component type"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: sequence type with unknown"
|
||||
" component type");
|
||||
}
|
||||
switch (t2.get()->eTypeClass) {
|
||||
case typelib_TypeClass_VOID:
|
||||
case typelib_TypeClass_EXCEPTION:
|
||||
throw css::io::IOException(
|
||||
("binaryurp::Unmarshal: sequence type with bad"
|
||||
" component type"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: sequence type with bad"
|
||||
" component type");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -207,8 +202,7 @@ css::uno::TypeDescription Unmarshal::readType() {
|
||||
}
|
||||
default:
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: type of unknown type class",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: type of unknown type class");
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,16 +211,14 @@ OUString Unmarshal::readOid() {
|
||||
for (sal_Int32 i = 0; i != oid.getLength(); ++i) {
|
||||
if (oid[i] > 0x7F) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: OID contains non-ASCII character",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: OID contains non-ASCII character");
|
||||
}
|
||||
}
|
||||
sal_uInt16 idx = readCacheIndex();
|
||||
if (oid.isEmpty() && idx != cache::ignore) {
|
||||
if (state_.oidCache[idx].isEmpty()) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: unknown OID cache index",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: unknown OID cache index");
|
||||
}
|
||||
return state_.oidCache[idx];
|
||||
}
|
||||
@ -249,8 +241,7 @@ rtl::ByteSequence Unmarshal::readTid() {
|
||||
if (tid.getLength() == 0) {
|
||||
if (idx == cache::ignore || state_.tidCache[idx].getLength() == 0) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: unknown TID cache index",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: unknown TID cache index");
|
||||
}
|
||||
return state_.tidCache[idx];
|
||||
}
|
||||
@ -273,8 +264,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
|
||||
sal_uInt8 v = read8();
|
||||
if (v > 1) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: boolean of unknown value",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: boolean of unknown value");
|
||||
}
|
||||
return BinaryAny(type, &v);
|
||||
}
|
||||
@ -320,8 +310,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
|
||||
css::uno::TypeDescription t(readType());
|
||||
if (t.get()->eTypeClass == typelib_TypeClass_ANY) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: any of type ANY",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: any of type ANY");
|
||||
}
|
||||
return readValue(t);
|
||||
}
|
||||
@ -343,8 +332,7 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
|
||||
}
|
||||
if (!found) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: unknown enum value",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: unknown enum value");
|
||||
}
|
||||
return BinaryAny(type, &v);
|
||||
}
|
||||
@ -374,16 +362,14 @@ BinaryAny Unmarshal::readValue(css::uno::TypeDescription const & type) {
|
||||
void Unmarshal::done() const {
|
||||
if (data_ != end_) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: block contains excess data",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: block contains excess data");
|
||||
}
|
||||
}
|
||||
|
||||
void Unmarshal::check(sal_Int32 size) const {
|
||||
if (end_ - data_ < size) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: trying to read past end of block",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: trying to read past end of block");
|
||||
}
|
||||
}
|
||||
|
||||
@ -396,8 +382,7 @@ sal_uInt16 Unmarshal::readCacheIndex() {
|
||||
sal_uInt16 idx = read16();
|
||||
if (idx >= cache::size && idx != cache::ignore) {
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: cache index out of range",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: cache index out of range");
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
@ -418,8 +403,7 @@ OUString Unmarshal::readString() {
|
||||
sal_uInt32 n = readCompressed();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"binaryurp::Unmarshal: string size too large",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: string size too large");
|
||||
}
|
||||
check(static_cast< sal_Int32 >(n));
|
||||
OUString s;
|
||||
@ -431,8 +415,7 @@ OUString Unmarshal::readString() {
|
||||
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::io::IOException(
|
||||
"binaryurp::Unmarshal: string does not contain UTF-8",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: string does not contain UTF-8");
|
||||
}
|
||||
data_ += n;
|
||||
return s;
|
||||
@ -443,8 +426,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
|
||||
sal_uInt32 n = readCompressed();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"binaryurp::Unmarshal: sequence size too large",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: sequence size too large");
|
||||
}
|
||||
if (n == 0) {
|
||||
return BinaryAny(type, 0);
|
||||
@ -471,8 +453,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
|
||||
// sal_uInt32 * sal_Int32 -> sal_uInt64 cannot overflow
|
||||
if (size > SAL_MAX_SIZE - SAL_SEQUENCE_HEADER_SIZE) {
|
||||
throw css::uno::RuntimeException(
|
||||
"binaryurp::Unmarshal: sequence size too large",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"binaryurp::Unmarshal: sequence size too large");
|
||||
}
|
||||
void * buf = allocate(
|
||||
SAL_SEQUENCE_HEADER_SIZE + static_cast< sal_Size >(size));
|
||||
|
@ -238,9 +238,7 @@ void Writer::sendRequest(
|
||||
}
|
||||
OSL_ASSERT(functionId >= 0);
|
||||
if (functionId > SAL_MAX_UINT16) {
|
||||
throw css::uno::RuntimeException(
|
||||
"function ID too large for URP",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("function ID too large for URP");
|
||||
}
|
||||
std::vector< unsigned char > buf;
|
||||
bool newType = !(lastType_.is() && t.equals(lastType_));
|
||||
@ -406,8 +404,7 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
|
||||
std::vector< unsigned char > header;
|
||||
if (buffer.size() > SAL_MAX_UINT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"message too large for URP",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"message too large for URP");
|
||||
}
|
||||
Marshal::write32(&header, static_cast< sal_uInt32 >(buffer.size()));
|
||||
Marshal::write32(&header, 1);
|
||||
|
@ -310,8 +310,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -341,8 +340,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,9 +351,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -373,9 +369,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -254,40 +254,38 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
__cxa_throw( pCppExc, rtti, deleteException );
|
||||
@ -309,9 +307,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -330,9 +326,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -230,8 +230,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -261,8 +260,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,9 +277,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -301,8 +297,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -236,8 +236,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -267,8 +266,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,9 +277,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -300,9 +296,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -230,8 +230,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -261,8 +260,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,9 +277,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -300,9 +296,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -227,8 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -258,8 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,9 +268,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
@ -291,9 +287,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
|
@ -228,8 +228,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -260,7 +259,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,9 +270,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
@ -292,9 +289,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
|
@ -243,8 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -261,8 +260,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,9 +271,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -294,9 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -242,13 +242,9 @@ static void cpp_call(
|
||||
appendCString(buf, typeid(e).name());
|
||||
buf.append(": ");
|
||||
appendCString(buf, e.what());
|
||||
throw RuntimeException(
|
||||
buf.makeStringAndClear(), Reference< XInterface >());
|
||||
throw RuntimeException(buf.makeStringAndClear());
|
||||
} catch (...) {
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"C++ code threw unknown exception"),
|
||||
Reference< XInterface >());
|
||||
throw RuntimeException("C++ code threw unknown exception");
|
||||
}
|
||||
|
||||
*ppUnoExc = 0;
|
||||
|
@ -305,8 +305,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -336,8 +335,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -348,9 +346,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -369,9 +365,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -315,8 +315,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -346,8 +345,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,9 +356,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -379,9 +375,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -243,12 +243,9 @@ static void cpp_call(
|
||||
buf.append(": ");
|
||||
appendCString(buf, e.what());
|
||||
throw RuntimeException(
|
||||
buf.makeStringAndClear(), Reference< XInterface >());
|
||||
buf.makeStringAndClear());
|
||||
} catch (...) {
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"C++ code threw unknown exception"),
|
||||
Reference< XInterface >());
|
||||
throw RuntimeException("C++ code threw unknown exception");
|
||||
}
|
||||
|
||||
*ppUnoExc = 0;
|
||||
|
@ -230,8 +230,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -261,8 +260,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,9 +271,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -294,9 +290,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -227,8 +227,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -258,8 +257,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,9 +268,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
@ -291,9 +287,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if defined _DEBUG
|
||||
|
@ -221,8 +221,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -252,8 +251,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,9 +262,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -285,9 +281,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -221,8 +221,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get typedescription for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
|
||||
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
|
||||
@ -252,8 +251,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no rtti for type ") +
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
|
||||
Reference< XInterface >() );
|
||||
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,9 +262,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
{
|
||||
if (! header)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("no exception header!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( "no exception header!" );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
@ -285,9 +281,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
|
||||
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
|
||||
if (0 == pExcTypeDescr)
|
||||
{
|
||||
RuntimeException aRE(
|
||||
OUString("exception type not found: ") + unoName,
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aRE( OUString("exception type not found: ") + unoName );
|
||||
Type const & rType = ::getCppuType( &aRE );
|
||||
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
|
@ -238,13 +238,9 @@ static void cpp_call(
|
||||
appendCString(buf, typeid(e).name());
|
||||
buf.append(": ");
|
||||
appendCString(buf, e.what());
|
||||
throw RuntimeException(
|
||||
buf.makeStringAndClear(), Reference< XInterface >());
|
||||
throw RuntimeException(buf.makeStringAndClear());
|
||||
} catch (...) {
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"C++ code threw unknown exception"),
|
||||
Reference< XInterface >());
|
||||
throw RuntimeException("C++ code threw unknown exception");
|
||||
}
|
||||
|
||||
*ppUnoExc = 0;
|
||||
|
@ -539,8 +539,7 @@ int msci_filterCppException(
|
||||
buf.append( "\", RTTI-name=\"" );
|
||||
buf.append( aRTTIname );
|
||||
buf.append( "\"!" );
|
||||
RuntimeException exc(
|
||||
buf.makeStringAndClear(), Reference< XInterface >() );
|
||||
RuntimeException exc( buf.makeStringAndClear() );
|
||||
uno_type_any_constructAndConvert(
|
||||
pUnoExc, &exc,
|
||||
::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
|
||||
@ -565,10 +564,8 @@ int msci_filterCppException(
|
||||
}
|
||||
// though this unknown exception leaks now, no user-defined exception
|
||||
// is ever thrown thru the binary C-UNO dispatcher call stack.
|
||||
RuntimeException exc(
|
||||
OUString( "[msci_uno bridge error] unexpected "
|
||||
"C++ exception occurred!" ),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException exc( "[msci_uno bridge error] unexpected "
|
||||
"C++ exception occurred!" );
|
||||
uno_type_any_constructAndConvert(
|
||||
pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
|
@ -783,8 +783,7 @@ int mscx_filterCppException(
|
||||
buf.append( "\", RTTI-name=\"" );
|
||||
buf.append( aRTTIname );
|
||||
buf.append( "\"!" );
|
||||
RuntimeException exc(
|
||||
buf.makeStringAndClear(), Reference< XInterface >() );
|
||||
RuntimeException exc( buf.makeStringAndClear() );
|
||||
uno_type_any_constructAndConvert(
|
||||
pUnoExc, &exc,
|
||||
::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
|
||||
@ -804,10 +803,8 @@ int mscx_filterCppException(
|
||||
}
|
||||
// though this unknown exception leaks now, no user-defined exception
|
||||
// is ever thrown thru the binary C-UNO dispatcher call stack.
|
||||
RuntimeException exc(
|
||||
OUString( "[mscx_uno bridge error] unexpected "
|
||||
"C++ exception occurred!" ),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException exc( "[mscx_uno bridge error] unexpected "
|
||||
"C++ exception occurred!" );
|
||||
uno_type_any_constructAndConvert(
|
||||
pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno );
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
|
@ -411,9 +411,7 @@ void unoInterfaceProxyDispatch(
|
||||
((typelib_InterfaceMethodTypeDescription *)pMemberTD)->pParams,
|
||||
pReturn, pArgs, ppException ) )
|
||||
{
|
||||
RuntimeException aExc(
|
||||
OUString("Too many parameters!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aExc( "Too many parameters!" );
|
||||
|
||||
Type const & rExcType = ::getCppuType( &aExc );
|
||||
::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
|
||||
@ -423,9 +421,7 @@ void unoInterfaceProxyDispatch(
|
||||
}
|
||||
default:
|
||||
{
|
||||
RuntimeException aExc(
|
||||
OUString("Illegal member type description!"),
|
||||
Reference< XInterface >() );
|
||||
RuntimeException aExc( "Illegal member type description!" );
|
||||
|
||||
Type const & rExcType = ::getCppuType( &aExc );
|
||||
// Binary identical null reference (whatever that comment means...)
|
||||
|
@ -30,8 +30,7 @@ namespace canvas
|
||||
{
|
||||
throw beans::UnknownPropertyException(
|
||||
"PropertySetHelper: property " +
|
||||
aPropertyName + " not found.",
|
||||
uno::Reference< uno::XInterface >()
|
||||
aPropertyName + " not found."
|
||||
);
|
||||
}
|
||||
|
||||
@ -39,8 +38,7 @@ namespace canvas
|
||||
{
|
||||
throw beans::PropertyVetoException(
|
||||
"PropertySetHelper: property " +
|
||||
aPropertyName + " access was vetoed.",
|
||||
uno::Reference< uno::XInterface >() );
|
||||
aPropertyName + " access was vetoed." );
|
||||
}
|
||||
|
||||
struct EntryComparator
|
||||
|
@ -240,15 +240,13 @@ static OUString path_make_absolute_file_url( OUString const & path )
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot make absolute: " + file_url,
|
||||
css::uno::Reference< XInterface >() );
|
||||
"cannot make absolute: " + file_url );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot get file url from system path: " + path,
|
||||
css::uno::Reference< XInterface >() );
|
||||
"cannot get file url from system path: " + path );
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,8 +379,7 @@ SAL_IMPLEMENT_MAIN()
|
||||
buf.append( cmd_arg );
|
||||
buf.append( "! Use climaker --help to print all options." );
|
||||
throw RuntimeException(
|
||||
buf.makeStringAndClear(),
|
||||
css::uno::Reference< XInterface >() );
|
||||
buf.makeStringAndClear() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -457,8 +454,7 @@ SAL_IMPLEMENT_MAIN()
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot get system path from file url " +
|
||||
output.copy( 0, slash ),
|
||||
css::uno::Reference< XInterface >() );
|
||||
output.copy( 0, slash ) );
|
||||
}
|
||||
OUString filename( output.copy( slash +1 ) );
|
||||
sal_Int32 dot = filename.lastIndexOf( '.' );
|
||||
|
@ -90,8 +90,7 @@ static inline ::System::Object ^ to_cli_constant( Any const & value )
|
||||
default:
|
||||
throw RuntimeException(
|
||||
"unexpected constant type " +
|
||||
value.getValueType().getTypeName(),
|
||||
Reference< XInterface >() );
|
||||
value.getValueType().getTypeName() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1265,8 +1264,7 @@ Assembly ^ TypeEmitter::type_resolve(
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
"unexpected member type in " + entry->m_xType->getName(),
|
||||
Reference< XInterface >() );
|
||||
"unexpected member type in " + entry->m_xType->getName() );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2153,8 +2151,7 @@ Emit::CustomAttributeBuilder^ TypeEmitter::get_exception_attribute(
|
||||
return nullptr;
|
||||
default:
|
||||
throw RuntimeException(
|
||||
"unexpected type " + xType->getName(),
|
||||
Reference< XInterface >() );
|
||||
"unexpected type " + xType->getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,7 @@ css::uno::Any ConfigurationHelper::readRelativeKey(const css::uno::Reference< cs
|
||||
sMsg.appendAscii("\" does not exists." );
|
||||
|
||||
throw css::container::NoSuchElementException(
|
||||
sMsg.makeStringAndClear(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
sMsg.makeStringAndClear());
|
||||
}
|
||||
return xProps->getPropertyValue(sKey);
|
||||
}
|
||||
@ -115,8 +114,7 @@ void ConfigurationHelper::writeRelativeKey(const css::uno::Reference< css::uno::
|
||||
sMsg.appendAscii("\" does not exists." );
|
||||
|
||||
throw css::container::NoSuchElementException(
|
||||
sMsg.makeStringAndClear(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
sMsg.makeStringAndClear());
|
||||
}
|
||||
xProps->setPropertyValue(sKey, aValue);
|
||||
}
|
||||
@ -137,8 +135,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode
|
||||
sMsg.appendAscii("\" does not exists." );
|
||||
|
||||
throw css::container::NoSuchElementException(
|
||||
sMsg.makeStringAndClear(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
sMsg.makeStringAndClear());
|
||||
}
|
||||
|
||||
css::uno::Reference< css::uno::XInterface > xNode;
|
||||
|
@ -76,8 +76,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource)
|
||||
}
|
||||
|
||||
throw css::beans::IllegalTypeException(
|
||||
OUString( "Any contains wrong type." ),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Any contains wrong type." );
|
||||
}
|
||||
|
||||
|
||||
@ -96,8 +95,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
|
||||
(!lP.Value.hasValue())
|
||||
)
|
||||
throw css::beans::IllegalTypeException(
|
||||
OUString( "PropertyValue struct contains no useful information." ),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"PropertyValue struct contains no useful information." );
|
||||
(*this)[lP.Name] = lP.Value;
|
||||
continue;
|
||||
}
|
||||
@ -110,8 +108,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
|
||||
(!lN.Value.hasValue())
|
||||
)
|
||||
throw css::beans::IllegalTypeException(
|
||||
OUString( "NamedValue struct contains no useful information." ),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"NamedValue struct contains no useful information." );
|
||||
(*this)[lN.Name] = lN.Value;
|
||||
continue;
|
||||
}
|
||||
@ -119,8 +116,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
|
||||
// ignore VOID Any ... but reject wrong filled ones!
|
||||
if (lSource[i].hasValue())
|
||||
throw css::beans::IllegalTypeException(
|
||||
OUString( "Any contains wrong type." ),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Any contains wrong type." );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,8 +61,7 @@ Reference< XMultiServiceFactory > getProcessServiceFactory()
|
||||
xReturn = localProcessFactory( xReturn, false );
|
||||
if ( !xReturn.is() )
|
||||
{
|
||||
throw DeploymentException(
|
||||
"null process service factory", Reference< XInterface >() );
|
||||
throw DeploymentException( "null process service factory" );
|
||||
}
|
||||
return xReturn;
|
||||
}
|
||||
|
@ -314,8 +314,7 @@ void Components::insertExtensionXcsFile(
|
||||
parseXcsFile(fileUri, layer, data_, 0, 0, 0);
|
||||
} catch (css::container::NoSuchElementException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"insertExtensionXcsFile does not exist: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"insertExtensionXcsFile does not exist: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,8 +329,7 @@ void Components::insertExtensionXcuFile(
|
||||
} catch (css::container::NoSuchElementException & e) {
|
||||
data_.removeExtensionXcuAdditions(fileUri);
|
||||
throw css::uno::RuntimeException(
|
||||
"insertExtensionXcuFile does not exist: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"insertExtensionXcuFile does not exist: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -413,8 +411,7 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
|
||||
sal_Int32 i = descriptor.indexOf(' ');
|
||||
if (i <= 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad external value descriptor " + descriptor,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad external value descriptor " + descriptor);
|
||||
}
|
||||
//TODO: Do not make calls with mutex locked:
|
||||
OUString name(descriptor.copy(0, i));
|
||||
@ -450,17 +447,14 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
|
||||
value))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot obtain external value through " + descriptor,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot obtain external value through " + descriptor);
|
||||
}
|
||||
} catch (css::beans::UnknownPropertyException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"unknown external value descriptor ID: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"unknown external value descriptor ID: " + e.Message);
|
||||
} catch (css::lang::WrappedTargetException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot obtain external value: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot obtain external value: " + e.Message);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
@ -483,15 +477,13 @@ Components::Components(
|
||||
}
|
||||
if (!modificationFileUrl_.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: \"user\" followed by further layers",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: \"user\" followed by further layers");
|
||||
}
|
||||
sal_Int32 c = i;
|
||||
for (;; ++c) {
|
||||
if (c == conf.getLength() || conf[c] == ' ') {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: missing \":\"",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: missing \":\"");
|
||||
}
|
||||
if (conf[c] == ':') {
|
||||
break;
|
||||
@ -513,8 +505,7 @@ Components::Components(
|
||||
} else if ( type == "sharedext" ) {
|
||||
if (sharedExtensionLayer_ != -1) {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: multiple \"sharedext\" layers",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: multiple \"sharedext\" layers");
|
||||
}
|
||||
sharedExtensionLayer_ = layer;
|
||||
parseXcsXcuIniLayer(layer, url, true);
|
||||
@ -522,8 +513,7 @@ Components::Components(
|
||||
} else if ( type == "userext" ) {
|
||||
if (userExtensionLayer_ != -1) {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: multiple \"userext\" layers",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: multiple \"userext\" layers");
|
||||
}
|
||||
userExtensionLayer_ = layer;
|
||||
parseXcsXcuIniLayer(layer, url, true);
|
||||
@ -537,8 +527,7 @@ Components::Components(
|
||||
} else if ( type == "user" ) {
|
||||
if (url.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: empty \"user\" URL",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: empty \"user\" URL");
|
||||
}
|
||||
modificationFileUrl_ = url;
|
||||
parseModificationLayer(url);
|
||||
@ -562,8 +551,7 @@ Components::Components(
|
||||
#endif
|
||||
else {
|
||||
throw css::uno::RuntimeException(
|
||||
"CONFIGURATION_LAYERS: unknown layer type \"" + type + "\"",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"CONFIGURATION_LAYERS: unknown layer type \"" + type + "\"");
|
||||
}
|
||||
i = n;
|
||||
}
|
||||
@ -611,8 +599,7 @@ void Components::parseFiles(
|
||||
// fall through
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot open directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot open directory " + url);
|
||||
}
|
||||
for (;;) {
|
||||
osl::DirectoryItem i;
|
||||
@ -622,16 +609,14 @@ void Components::parseFiles(
|
||||
}
|
||||
if (rc != osl::FileBase::E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot iterate directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot iterate directory " + url);
|
||||
}
|
||||
osl::FileStatus stat(
|
||||
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
|
||||
osl_FileStatus_Mask_FileURL);
|
||||
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot stat in directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot stat in directory " + url);
|
||||
}
|
||||
if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks
|
||||
parseFiles(layer, extension, parseFile, stat.getFileURL(), true);
|
||||
@ -643,8 +628,7 @@ void Components::parseFiles(
|
||||
parseFile, stat.getFileURL(), layer, data_, 0, 0, 0);
|
||||
} catch (css::container::NoSuchElementException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"stat'ed file does not exist: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"stat'ed file does not exist: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -687,8 +671,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
||||
return;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot open directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot open directory " + url);
|
||||
}
|
||||
UnresolvedList unres;
|
||||
std::set< OUString > existingDeps;
|
||||
@ -701,16 +684,14 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
||||
}
|
||||
if (rc != osl::FileBase::E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot iterate directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot iterate directory " + url);
|
||||
}
|
||||
osl::FileStatus stat(
|
||||
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
|
||||
osl_FileStatus_Mask_FileURL);
|
||||
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot stat in directory " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot stat in directory " + url);
|
||||
}
|
||||
if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
|
||||
OUString file(stat.getFileName());
|
||||
@ -724,8 +705,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
||||
new XcdParser(layer, processedDeps, data_));
|
||||
} catch (css::container::NoSuchElementException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"stat'ed file does not exist: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"stat'ed file does not exist: " + e.Message);
|
||||
}
|
||||
if (manager->parse(0)) {
|
||||
processedDeps.insert(name);
|
||||
@ -748,8 +728,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
|
||||
}
|
||||
if (!resolved) {
|
||||
throw css::uno::RuntimeException(
|
||||
"xcd: unresolved dependencies in " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"xcd: unresolved dependencies in " + url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -826,8 +805,7 @@ int Components::getExtensionLayer(bool shared) {
|
||||
int layer = shared ? sharedExtensionLayer_ : userExtensionLayer_;
|
||||
if (layer == -1) {
|
||||
throw css::uno::RuntimeException(
|
||||
"insert extension xcs/xcu file into undefined layer",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"insert extension xcs/xcu file into undefined layer");
|
||||
}
|
||||
return layer;
|
||||
}
|
||||
|
@ -154,9 +154,8 @@ OUString Data::fullTemplateName(
|
||||
{
|
||||
if (component.indexOf(':') != -1 || name.indexOf(':') != -1) {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad component/name pair containing colon " + component + "/" +
|
||||
name),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad component/name pair containing colon " + component + "/" +
|
||||
name);
|
||||
}
|
||||
OUStringBuffer buf(component);
|
||||
buf.append(':');
|
||||
@ -197,8 +196,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
{
|
||||
if (pathRepresentation.isEmpty() || pathRepresentation[0] != '/') {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
if (path != 0) {
|
||||
path->clear();
|
||||
@ -219,8 +217,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
if (n == -1 || setElement)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
NodeMap const & components = getComponents();
|
||||
NodeMap::const_iterator i(components.find(seg));
|
||||
@ -243,8 +240,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
pathRepresentation[n++] != '/')
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
// for backwards compatibility, ignore a final slash
|
||||
if (n == pathRepresentation.getLength()) {
|
||||
@ -262,8 +258,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
pathRepresentation, n, &seg, &setElement, &templateName);
|
||||
if (n == -1) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
// For backwards compatibility, allow set members to be accessed with
|
||||
// simple path segments, like group members:
|
||||
@ -273,8 +268,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
case Node::KIND_LOCALIZED_PROPERTY:
|
||||
if (!templateName.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
break;
|
||||
case Node::KIND_SET:
|
||||
@ -283,21 +277,18 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
|
||||
templateName))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
if (!templateName.isEmpty() && p != 0) {
|
||||
assert(!p->getTemplateName().isEmpty());
|
||||
if (!equalTemplateNames(templateName, p->getTemplateName())) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + pathRepresentation,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad path " + pathRepresentation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -324,8 +315,7 @@ Additions * Data::addExtensionXcuAdditions(
|
||||
url, rtl::Reference< ExtensionXcu >())).first);
|
||||
if (i->second.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"already added extension xcu " + url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"already added extension xcu " + url);
|
||||
}
|
||||
i->second = item;
|
||||
item->layer = layer;
|
||||
|
@ -36,8 +36,7 @@ namespace configmgr {
|
||||
|
||||
NodeMap & Node::getMembers() {
|
||||
assert(false);
|
||||
throw css::uno::RuntimeException(
|
||||
"this cannot happen", css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("this cannot happen");
|
||||
}
|
||||
|
||||
OUString Node::getTemplateName() const {
|
||||
|
@ -54,8 +54,7 @@ bool parseSegment(
|
||||
return *index == path.getLength();
|
||||
}
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"bad path " + path, css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("bad path " + path);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,9 +60,7 @@ Type elementType(Type type) {
|
||||
return TYPE_HEXBINARY;
|
||||
default:
|
||||
assert(false);
|
||||
throw css::uno::RuntimeException(
|
||||
"this cannot happen",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("this cannot happen");
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,9 +99,7 @@ css::uno::Type mapType(Type type) {
|
||||
css::uno::Sequence< css::uno::Sequence< sal_Int8 > > >::get();
|
||||
default:
|
||||
assert(false);
|
||||
throw css::uno::RuntimeException(
|
||||
"this cannot happen",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("this cannot happen");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,8 +170,7 @@ template< typename T > css::uno::Any parseSingleValue(
|
||||
{
|
||||
T val;
|
||||
if (!parseValue(text, &val)) {
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid value", css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("invalid value");
|
||||
}
|
||||
return css::uno::makeAny(val);
|
||||
}
|
||||
@ -194,9 +193,7 @@ template< typename T > css::uno::Any parseListValue(
|
||||
if (!parseValue(
|
||||
xmlreader::Span(t.begin, i == -1 ? t.length : i), &val))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid value",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("invalid value");
|
||||
}
|
||||
seq.push_back(val);
|
||||
if (i < 0) {
|
||||
@ -214,9 +211,7 @@ css::uno::Any parseValue(
|
||||
{
|
||||
switch (type) {
|
||||
case TYPE_ANY:
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid value of type any",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("invalid value of type any");
|
||||
case TYPE_BOOLEAN:
|
||||
return parseSingleValue< sal_Bool >(text);
|
||||
case TYPE_SHORT:
|
||||
@ -248,9 +243,7 @@ css::uno::Any parseValue(
|
||||
separator, text);
|
||||
default:
|
||||
assert(false);
|
||||
throw css::uno::RuntimeException(
|
||||
"this cannot happen",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::uno::RuntimeException("this cannot happen");
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,8 +325,7 @@ bool ValueParser::startElement(
|
||||
pad_.add(RTL_CONSTASCII_STRINGPARAM("\xEF\xBF\xBF"));
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad unicode scalar attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad unicode scalar attribute in " + reader.getUrl());
|
||||
}
|
||||
state_ = State(state_ + 1);
|
||||
return true;
|
||||
@ -343,8 +335,7 @@ bool ValueParser::startElement(
|
||||
break;
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
|
||||
}
|
||||
|
||||
bool ValueParser::endElement() {
|
||||
|
@ -212,8 +212,7 @@ bool dumpWindowsRegistry(OUString* pFileURL)
|
||||
return false;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot create temporary file",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot create temporary file");
|
||||
}
|
||||
writeData(
|
||||
aFileHandle,
|
||||
|
@ -69,8 +69,7 @@ OString convertToUtf8(
|
||||
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot convert to UTF-8",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot convert to UTF-8");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@ -110,7 +109,7 @@ void writeData_(oslFileHandle handle, char const * begin, sal_Int32 length) {
|
||||
n != static_cast< sal_uInt32 >(length))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"write failure", css::uno::Reference< css::uno::XInterface >());
|
||||
"write failure");
|
||||
}
|
||||
}
|
||||
|
||||
@ -537,8 +536,7 @@ void writeModFile(
|
||||
return;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot create directory " + dir,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot create directory " + dir);
|
||||
}
|
||||
TempFile tmp;
|
||||
switch (osl::FileBase::createTempFile(&dir, &tmp.handle, &tmp.url)) {
|
||||
@ -552,8 +550,7 @@ void writeModFile(
|
||||
return;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot create temporary file in " + dir,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot create temporary file in " + dir);
|
||||
}
|
||||
writeData_(
|
||||
tmp.handle,
|
||||
@ -579,13 +576,11 @@ void writeModFile(
|
||||
tmp.closed = true;
|
||||
if (e != osl_File_E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot close " + tmp.url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot close " + tmp.url);
|
||||
}
|
||||
if (osl::File::move(tmp.url, url) != osl::FileBase::E_None) {
|
||||
throw css::uno::RuntimeException(
|
||||
"cannot move " + tmp.url,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"cannot move " + tmp.url);
|
||||
}
|
||||
tmp.handle = 0;
|
||||
}
|
||||
|
@ -96,14 +96,12 @@ bool XcdParser::startElement(
|
||||
}
|
||||
if (!attrFile.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no dependency file attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no dependency file attribute in " + reader.getUrl());
|
||||
}
|
||||
dependencyFile_ = attrFile.convertFromUtf8();
|
||||
if (dependencyFile_.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad dependency file attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad dependency file attribute in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
if ((processedDependencies_.find(dependencyFile_) ==
|
||||
@ -143,8 +141,7 @@ bool XcdParser::startElement(
|
||||
break;
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
|
||||
}
|
||||
|
||||
void XcdParser::endElement(xmlreader::XmlReader const & reader) {
|
||||
|
@ -252,8 +252,7 @@ bool XcsParser::startElement(
|
||||
}
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl());
|
||||
}
|
||||
|
||||
void XcsParser::endElement(xmlreader::XmlReader const & reader) {
|
||||
@ -295,16 +294,14 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
|
||||
default:
|
||||
assert(false);
|
||||
throw css::uno::RuntimeException(
|
||||
"this cannot happen",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"this cannot happen");
|
||||
}
|
||||
} else {
|
||||
if (!elements_.top().node->getMembers().insert(
|
||||
NodeMap::value_type(top.name, top.node)).second)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"duplicate " + top.name + " in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"duplicate " + top.name + " in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -320,8 +317,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
|
||||
break;
|
||||
case STATE_TEMPLATES_DONE:
|
||||
throw css::uno::RuntimeException(
|
||||
"no component element in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no component element in " + reader.getUrl());
|
||||
case STATE_COMPONENT_DONE:
|
||||
break;
|
||||
default:
|
||||
@ -350,9 +346,8 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
|
||||
{
|
||||
if (hasPackage) {
|
||||
throw css::uno::RuntimeException(
|
||||
("multiple component-schema package attributes in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"multiple component-schema package attributes in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
hasPackage = true;
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
@ -362,9 +357,8 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
|
||||
{
|
||||
if (hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
("multiple component-schema name attributes in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"multiple component-schema name attributes in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
hasName = true;
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
@ -373,13 +367,11 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
|
||||
}
|
||||
if (!hasPackage) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no component-schema package attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no component-schema package attribute in " + reader.getUrl());
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no component-schema name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no component-schema name attribute in " + reader.getUrl());
|
||||
}
|
||||
componentName_ = xmlreader::Span(buf.getStr(), buf.getLength()).
|
||||
convertFromUtf8();
|
||||
@ -413,8 +405,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no node-ref name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no node-ref name attribute in " + reader.getUrl());
|
||||
}
|
||||
rtl::Reference< Node > tmpl(
|
||||
data_.getTemplate(
|
||||
@ -425,8 +416,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
|
||||
//TODO: this can erroneously happen as long as import/uses attributes
|
||||
// are not correctly processed
|
||||
throw css::uno::RuntimeException(
|
||||
"unknown node-ref " + name + " in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"unknown node-ref " + name + " in " + reader.getUrl());
|
||||
}
|
||||
rtl::Reference< Node > node(tmpl->clone(false));
|
||||
node->setLayer(valueParser_.getLayer());
|
||||
@ -465,13 +455,11 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no prop name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no prop name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (valueParser_.type_ == TYPE_ERROR) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no prop type attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no prop type attribute in " + reader.getUrl());
|
||||
}
|
||||
elements_.push(
|
||||
Element(
|
||||
@ -502,8 +490,7 @@ void XcsParser::handlePropValue(
|
||||
attrSeparator = reader.getAttributeValue(false);
|
||||
if (attrSeparator.length == 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad oor:separator attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad oor:separator attribute in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -533,8 +520,7 @@ void XcsParser::handleGroup(xmlreader::XmlReader & reader, bool isTemplate) {
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no group name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no group name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (isTemplate) {
|
||||
name = Data::fullTemplateName(componentName_, name);
|
||||
@ -575,8 +561,7 @@ void XcsParser::handleSet(xmlreader::XmlReader & reader, bool isTemplate) {
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no set name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no set name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (isTemplate) {
|
||||
name = Data::fullTemplateName(componentName_, name);
|
||||
|
@ -88,9 +88,8 @@ bool XcuParser::startElement(
|
||||
state_.push(State::Modify(rtl::Reference< Node >()));
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad root element <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad root element <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
} else if (state_.top().ignore) {
|
||||
state_.push(State::Ignore(false));
|
||||
@ -100,9 +99,8 @@ bool XcuParser::startElement(
|
||||
handleItem(reader);
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad items node member <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad items node member <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
} else {
|
||||
switch (state_.top().node->kind()) {
|
||||
@ -115,9 +113,8 @@ bool XcuParser::startElement(
|
||||
static_cast< PropertyNode * >(state_.top().node.get()));
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad property node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad property node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl());
|
||||
}
|
||||
break;
|
||||
case Node::KIND_LOCALIZED_PROPERTY:
|
||||
@ -130,16 +127,14 @@ bool XcuParser::startElement(
|
||||
state_.top().node.get()));
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad localized property node member <" +
|
||||
name.convertFromUtf8() + "> in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad localized property node member <" +
|
||||
name.convertFromUtf8() + "> in " + reader.getUrl());
|
||||
}
|
||||
break;
|
||||
case Node::KIND_LOCALIZED_VALUE:
|
||||
throw css::uno::RuntimeException(
|
||||
("bad member <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad member <" + name.convertFromUtf8() + "> in " +
|
||||
reader.getUrl());
|
||||
case Node::KIND_GROUP:
|
||||
if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
|
||||
name.equals("prop"))
|
||||
@ -153,9 +148,8 @@ bool XcuParser::startElement(
|
||||
handleGroupNode(reader, state_.top().node);
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad group node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad group node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl());
|
||||
}
|
||||
break;
|
||||
case Node::KIND_SET:
|
||||
@ -174,9 +168,8 @@ bool XcuParser::startElement(
|
||||
state_.push(State::Ignore(true));
|
||||
} else {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad set node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad set node member <" + name.convertFromUtf8() +
|
||||
"> in " + reader.getUrl());
|
||||
}
|
||||
break;
|
||||
case Node::KIND_ROOT:
|
||||
@ -231,8 +224,7 @@ XcuParser::Operation XcuParser::parseOperation(xmlreader::Span const & text) {
|
||||
return OPERATION_REMOVE;
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid op " + text.convertFromUtf8(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid op " + text.convertFromUtf8());
|
||||
}
|
||||
|
||||
void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
|
||||
@ -252,9 +244,8 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
|
||||
{
|
||||
if (hasPackage) {
|
||||
throw css::uno::RuntimeException(
|
||||
("multiple component-update package attributes in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"multiple component-update package attributes in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
hasPackage = true;
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
@ -264,9 +255,8 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
|
||||
{
|
||||
if (hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
("multiple component-update name attributes in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"multiple component-update name attributes in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
hasName = true;
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
@ -283,13 +273,11 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
|
||||
}
|
||||
if (!hasPackage) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no component-data package attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no component-data package attribute in " + reader.getUrl());
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no component-data name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no component-data name attribute in " + reader.getUrl());
|
||||
}
|
||||
componentName_ = xmlreader::Span(buf.getStr(), buf.getLength()).
|
||||
convertFromUtf8();
|
||||
@ -319,8 +307,7 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) {
|
||||
break;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid operation on root node in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid operation on root node in " + reader.getUrl());
|
||||
}
|
||||
int finalizedLayer = std::min(
|
||||
finalized ? valueParser_.getLayer() : Data::NO_LAYER,
|
||||
@ -347,8 +334,7 @@ void XcuParser::handleItem(xmlreader::XmlReader & reader) {
|
||||
}
|
||||
if (!attrPath.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"missing path attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"missing path attribute in " + reader.getUrl());
|
||||
}
|
||||
OUString path(attrPath.convertFromUtf8());
|
||||
int finalizedLayer;
|
||||
@ -417,8 +403,7 @@ void XcuParser::handlePropValue(
|
||||
reader, reader.getAttributeValue(true));
|
||||
if (valueParser_.type_ != TYPE_ANY && type != valueParser_.type_) {
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid value type in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid value type in " + reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type;
|
||||
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
|
||||
@ -427,8 +412,7 @@ void XcuParser::handlePropValue(
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
if (s.length == 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad oor:separator attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad oor:separator attribute in " + reader.getUrl());
|
||||
}
|
||||
separator = OString(s.begin, s.length);
|
||||
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
|
||||
@ -437,22 +421,19 @@ void XcuParser::handlePropValue(
|
||||
external = reader.getAttributeValue(true).convertFromUtf8();
|
||||
if (external.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad oor:external attribute value in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad oor:external attribute value in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nil) {
|
||||
if (!prop->isNillable()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"xsi:nil attribute for non-nillable prop in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"xsi:nil attribute for non-nillable prop in " + reader.getUrl());
|
||||
}
|
||||
if (!external.isEmpty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
("xsi:nil and oor:external attributes for prop in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"xsi:nil and oor:external attributes for prop in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
prop->setValue(valueParser_.getLayer(), css::uno::Any());
|
||||
state_.push(State::Ignore(false));
|
||||
@ -493,8 +474,7 @@ void XcuParser::handleLocpropValue(
|
||||
reader, reader.getAttributeValue(true));
|
||||
if (valueParser_.type_ != TYPE_ANY && type != valueParser_.type_) {
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid value type in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid value type in " + reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type;
|
||||
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
|
||||
@ -503,8 +483,7 @@ void XcuParser::handleLocpropValue(
|
||||
xmlreader::Span s(reader.getAttributeValue(false));
|
||||
if (s.length == 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
"bad oor:separator attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad oor:separator attribute in " + reader.getUrl());
|
||||
}
|
||||
separator = OString(s.begin, s.length);
|
||||
} else if (attrNsId == ParseManager::NAMESPACE_OOR &&
|
||||
@ -530,8 +509,7 @@ void XcuParser::handleLocpropValue(
|
||||
}
|
||||
if (nil && !locprop->isNillable()) {
|
||||
throw css::uno::RuntimeException(
|
||||
"xsi:nil attribute for non-nillable prop in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"xsi:nil attribute for non-nillable prop in " + reader.getUrl());
|
||||
}
|
||||
switch (op) {
|
||||
case OPERATION_FUSE:
|
||||
@ -571,8 +549,7 @@ void XcuParser::handleLocpropValue(
|
||||
break;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"bad op attribute for value element in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad op attribute for value element in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@ -609,8 +586,7 @@ void XcuParser::handleGroupProp(
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no prop name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no prop name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (trackPath_) {
|
||||
path_.push_back(name);
|
||||
@ -640,8 +616,7 @@ void XcuParser::handleGroupProp(
|
||||
break;
|
||||
default:
|
||||
throw css::uno::RuntimeException(
|
||||
"inappropriate prop " + name + " in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"inappropriate prop " + name + " in " + reader.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -656,9 +631,8 @@ void XcuParser::handleUnknownGroupProp(
|
||||
if (group->isExtensible()) {
|
||||
if (type == TYPE_ERROR) {
|
||||
throw css::uno::RuntimeException(
|
||||
("missing type attribute for prop " + name + " in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"missing type attribute for prop " + name + " in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type;
|
||||
rtl::Reference< Node > prop(
|
||||
@ -706,8 +680,7 @@ void XcuParser::handlePlainGroupProp(
|
||||
type != property->getStaticType())
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid type for prop " + name + " in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid type for prop " + name + " in " + reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
|
||||
switch (operation) {
|
||||
@ -720,9 +693,8 @@ void XcuParser::handlePlainGroupProp(
|
||||
case OPERATION_REMOVE:
|
||||
if (!property->isExtension()) {
|
||||
throw css::uno::RuntimeException(
|
||||
("invalid remove of non-extension prop " + name + " in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid remove of non-extension prop " + name + " in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
group->getMembers().erase(propertyIndex);
|
||||
state_.push(State::Ignore(true));
|
||||
@ -751,8 +723,7 @@ void XcuParser::handleLocalizedGroupProp(
|
||||
type != property->getStaticType())
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid type for prop " + name + " in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid type for prop " + name + " in " + reader.getUrl());
|
||||
}
|
||||
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
|
||||
switch (operation) {
|
||||
@ -773,9 +744,8 @@ void XcuParser::handleLocalizedGroupProp(
|
||||
break;
|
||||
case OPERATION_REMOVE:
|
||||
throw css::uno::RuntimeException(
|
||||
("invalid remove of non-extension prop " + name + " in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid remove of non-extension prop " + name + " in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@ -807,8 +777,7 @@ void XcuParser::handleGroupNode(
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no node name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no node name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (trackPath_) {
|
||||
path_.push_back(name);
|
||||
@ -830,14 +799,12 @@ void XcuParser::handleGroupNode(
|
||||
Node::Kind kind = child->kind();
|
||||
if (kind != Node::KIND_GROUP && kind != Node::KIND_SET) {
|
||||
throw css::uno::RuntimeException(
|
||||
("bad <node> \"" + name + "\" of non group/set kind in " +
|
||||
reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"bad <node> \"" + name + "\" of non group/set kind in " +
|
||||
reader.getUrl());
|
||||
}
|
||||
if (op != OPERATION_MODIFY && op != OPERATION_FUSE) {
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid operation on group node in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid operation on group node in " + reader.getUrl());
|
||||
}
|
||||
int finalizedLayer = std::min(
|
||||
finalized ? valueParser_.getLayer() : Data::NO_LAYER,
|
||||
@ -893,8 +860,7 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
|
||||
}
|
||||
if (!hasName) {
|
||||
throw css::uno::RuntimeException(
|
||||
"no node name attribute in " + reader.getUrl(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"no node name attribute in " + reader.getUrl());
|
||||
}
|
||||
if (trackPath_) {
|
||||
path_.push_back(name);
|
||||
@ -909,17 +875,15 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) {
|
||||
component, hasNodeType, nodeType, &set->getDefaultTemplateName()));
|
||||
if (!set->isValidTemplate(templateName)) {
|
||||
throw css::uno::RuntimeException(
|
||||
("set member node " + name + " references invalid template " +
|
||||
templateName + " in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"set member node " + name + " references invalid template " +
|
||||
templateName + " in " + reader.getUrl());
|
||||
}
|
||||
rtl::Reference< Node > tmpl(
|
||||
data_.getTemplate(valueParser_.getLayer(), templateName));
|
||||
if (!tmpl.is()) {
|
||||
throw css::uno::RuntimeException(
|
||||
("set member node " + name + " references undefined template " +
|
||||
templateName + " in " + reader.getUrl()),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"set member node " + name + " references undefined template " +
|
||||
templateName + " in " + reader.getUrl());
|
||||
}
|
||||
int finalizedLayer = finalized ? valueParser_.getLayer() : Data::NO_LAYER;
|
||||
int mandatoryLayer = mandatory ? valueParser_.getLayer() : Data::NO_LAYER;
|
||||
|
@ -143,8 +143,7 @@ Type parseType(
|
||||
}
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid type " + text.convertFromUtf8(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid type " + text.convertFromUtf8());
|
||||
}
|
||||
|
||||
bool parseBoolean(xmlreader::Span const & text) {
|
||||
@ -156,8 +155,7 @@ bool parseBoolean(xmlreader::Span const & text) {
|
||||
return false;
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"invalid boolean " + text.convertFromUtf8(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"invalid boolean " + text.convertFromUtf8());
|
||||
}
|
||||
|
||||
OUString parseTemplateReference(
|
||||
@ -169,8 +167,7 @@ OUString parseTemplateReference(
|
||||
return *defaultTemplateName;
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
"missing node-type attribute",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"missing node-type attribute");
|
||||
}
|
||||
return Data::fullTemplateName(component, nodeType);
|
||||
}
|
||||
|
@ -508,8 +508,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
|
||||
if( ! tc.is() )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("pq_driver: Couldn't instantiate converter service" ),
|
||||
Reference< XInterface > () );
|
||||
"pq_driver: Couldn't instantiate converter service" );
|
||||
}
|
||||
if( aArguments.getLength() != 2 )
|
||||
{
|
||||
@ -583,8 +582,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
|
||||
m_settings.pConnection = PQconnectdbParams( keywords.c_array(), values.c_array(), 0 );
|
||||
}
|
||||
if( ! m_settings.pConnection )
|
||||
throw RuntimeException("pq_driver: out of memory",
|
||||
Reference< XInterface > () );
|
||||
throw RuntimeException("pq_driver: out of memory" );
|
||||
if( PQstatus( m_settings.pConnection ) == CONNECTION_BAD )
|
||||
{
|
||||
OUStringBuffer buf( 128 );
|
||||
|
@ -368,7 +368,7 @@ void alterColumnByDescriptor(
|
||||
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
|
||||
// buf.append( " to table " );
|
||||
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
|
||||
// throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
|
||||
// throw SQLException( buf.makeStringAndClear() );
|
||||
// }
|
||||
|
||||
// OUString tableName = extractStringProperty( past, st.TABLE_NAME );
|
||||
@ -396,8 +396,7 @@ void alterColumnByDescriptor(
|
||||
if( pastTypeName != futureTypeName )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"Can't modify column types, drop the column and create a new one",
|
||||
Reference< XInterface > () );
|
||||
"Can't modify column types, drop the column and create a new one" );
|
||||
}
|
||||
|
||||
if( pastColumnName != futureColumnName )
|
||||
|
@ -189,7 +189,7 @@ void KeyColumns::refresh()
|
||||
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
|
||||
// // buf.append( " to table " );
|
||||
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
|
||||
// // throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
|
||||
// // throw SQLException( buf.makeStringAndClear() );
|
||||
// // }
|
||||
|
||||
// // OUString tableName = extractStringProperty( past, st.TABLE_NAME );
|
||||
@ -217,8 +217,7 @@ void KeyColumns::refresh()
|
||||
// if( pastTypeName != futureTypeName )
|
||||
// {
|
||||
// throw RuntimeException(
|
||||
// "Can't modify column types, drop the column and create a new one",
|
||||
// Reference< XInterface > () );
|
||||
// "Can't modify column types, drop the column and create a new one" );
|
||||
// }
|
||||
|
||||
// if( pastColumnName != futureColumnName )
|
||||
|
@ -55,10 +55,8 @@ namespace cppu_threadpool {
|
||||
if( m_disposed )
|
||||
{
|
||||
throw css::lang::DisposedException(
|
||||
rtl::OUString(
|
||||
"cppu_threadpool::ORequestThread created after"
|
||||
" cppu_threadpool::ThreadAdmin has been disposed"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
" cppu_threadpool::ThreadAdmin has been disposed");
|
||||
}
|
||||
m_lst.push_back( p );
|
||||
}
|
||||
|
@ -47,8 +47,7 @@ AccessControl::AccessControl( Reference< XComponentContext > const & xContext )
|
||||
{
|
||||
if (! (xContext->getValueByName( str_ac_singleton() ) >>= m_xController))
|
||||
{
|
||||
throw SecurityException(
|
||||
"no access controller!", Reference< XInterface >() );
|
||||
throw SecurityException( "no access controller!" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,8 +58,7 @@ AccessControl::AccessControl(
|
||||
{
|
||||
if (! m_xController.is())
|
||||
{
|
||||
throw SecurityException(
|
||||
"no access controller!", Reference< XInterface >() );
|
||||
throw SecurityException( "no access controller!" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,8 +68,7 @@ AccessControl::AccessControl( AccessControl const & ac )
|
||||
{
|
||||
if (! m_xController.is())
|
||||
{
|
||||
throw SecurityException(
|
||||
"no access controller!", Reference< XInterface >() );
|
||||
throw SecurityException( "no access controller!" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,9 +197,8 @@ void OComponentHelper::dispose()
|
||||
catch (Exception & exc)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected UNO exception caught: ") +
|
||||
exc.Message, Reference< XInterface >() );
|
||||
OUString("unexpected UNO exception caught: ") +
|
||||
exc.Message );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -37,8 +37,7 @@ rtl::OUString getBootstrapVariable(
|
||||
rtl::OUString v;
|
||||
if (!bootstrap.getFrom(name, v)) {
|
||||
throw css::uno::DeploymentException(
|
||||
"Cannot obtain " + name + " from uno ini",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Cannot obtain " + name + " from uno ini");
|
||||
}
|
||||
return v;
|
||||
}
|
||||
@ -52,8 +51,7 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
|
||||
rtl::Bootstrap bs(iniUri);
|
||||
if (bs.getHandle() == 0) {
|
||||
throw css::uno::DeploymentException(
|
||||
"Cannot open uno ini " + iniUri,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Cannot open uno ini " + iniUri);
|
||||
}
|
||||
rtl::Reference< cppuhelper::ServiceManager > smgr(
|
||||
new cppuhelper::ServiceManager);
|
||||
|
@ -120,8 +120,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
|
||||
default:
|
||||
{
|
||||
OSL_ASSERT( false );
|
||||
RuntimeException exc(
|
||||
"not implemented!", Reference< XInterface >() );
|
||||
RuntimeException exc( "not implemented!" );
|
||||
uno_type_any_construct(
|
||||
*ppException, &exc, ::getCppuType( &exc ).getTypeLibType(), 0 );
|
||||
break;
|
||||
@ -190,16 +189,14 @@ void SAL_CALL throwException( Any const & exc ) SAL_THROW( (Exception) )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"no UNO exception given "
|
||||
"(must be derived from com::sun::star::uno::Exception)!",
|
||||
Reference< XInterface >() );
|
||||
"(must be derived from com::sun::star::uno::Exception)!" );
|
||||
}
|
||||
|
||||
Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent());
|
||||
if (! uno2cpp.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot get binary UNO to C++ mapping!",
|
||||
Reference< XInterface >() );
|
||||
"cannot get binary UNO to C++ mapping!" );
|
||||
}
|
||||
|
||||
Reference< XExceptionThrower > xThrower;
|
||||
@ -218,15 +215,13 @@ Any SAL_CALL getCaughtException()
|
||||
if (! cpp2uno.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot get C++ to binary UNO mapping!",
|
||||
Reference< XInterface >() );
|
||||
"cannot get C++ to binary UNO mapping!" );
|
||||
}
|
||||
Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent());
|
||||
if (! uno2cpp.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
"cannot get binary UNO to C++ mapping!",
|
||||
Reference< XInterface >() );
|
||||
"cannot get binary UNO to C++ mapping!" );
|
||||
}
|
||||
|
||||
typelib_TypeDescription * pTD = 0;
|
||||
@ -254,9 +249,7 @@ Any SAL_CALL getCaughtException()
|
||||
|
||||
if (exc == 0)
|
||||
{
|
||||
throw RuntimeException(
|
||||
"rethrowing C++ exception failed!",
|
||||
Reference< XInterface >() );
|
||||
throw RuntimeException( "rethrowing C++ exception failed!" );
|
||||
}
|
||||
|
||||
Any ret;
|
||||
|
@ -285,7 +285,7 @@ void WeakComponentImplHelperBase::dispose()
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected UNO exception caught: ") +
|
||||
exc.Message, Reference< XInterface >() );
|
||||
exc.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -421,7 +421,7 @@ void WeakAggComponentImplHelperBase::dispose()
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected UNO exception caught: ") +
|
||||
exc.Message, Reference< XInterface >() );
|
||||
exc.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,8 +46,7 @@ rtl::OUString get_this_libpath() {
|
||||
sal_Int32 i = uri.lastIndexOf('/');
|
||||
if (i == -1) {
|
||||
throw css::uno::DeploymentException(
|
||||
"URI " + uri + " is expected to contain a slash",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"URI " + uri + " is expected to contain a slash");
|
||||
}
|
||||
uri = uri.copy(0, i);
|
||||
osl::MutexGuard guard(osl::Mutex::getGlobalMutex());
|
||||
@ -100,16 +99,14 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) {
|
||||
return false;
|
||||
default:
|
||||
throw css::uno::DeploymentException(
|
||||
"Cannot iterate directory",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Cannot iterate directory");
|
||||
}
|
||||
osl::FileStatus stat(
|
||||
osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
|
||||
osl_FileStatus_Mask_FileURL);
|
||||
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
|
||||
throw css::uno::DeploymentException(
|
||||
"Cannot stat in directory",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"Cannot stat in directory");
|
||||
}
|
||||
if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
|
||||
// Ignore backup files:
|
||||
|
@ -231,8 +231,7 @@ void Data::initProperties(
|
||||
getTypeArguments());
|
||||
if (args.getLength() != 1) {
|
||||
throw css::uno::RuntimeException(
|
||||
"inconsistent UNO type registry",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"inconsistent UNO type registry");
|
||||
}
|
||||
t = args[0];
|
||||
}
|
||||
@ -240,8 +239,7 @@ void Data::initProperties(
|
||||
= handleNames->size();
|
||||
if (handles > SAL_MAX_INT32) {
|
||||
throw css::uno::RuntimeException(
|
||||
"interface type has too many attributes",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"interface type has too many attributes");
|
||||
}
|
||||
rtl::OUString name(members[i]->getMemberName());
|
||||
if (!properties.insert(
|
||||
@ -258,8 +256,7 @@ void Data::initProperties(
|
||||
second)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
"inconsistent UNO type registry",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"inconsistent UNO type registry");
|
||||
}
|
||||
handleNames->push_back(name);
|
||||
}
|
||||
@ -448,9 +445,8 @@ PropertySetMixinImpl::Impl::Impl(
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
} catch (css::container::NoSuchElementException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
("unexpected com.sun.star.container.NoSuchElementException: "
|
||||
+ e.Message),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"unexpected com.sun.star.container.NoSuchElementException: "
|
||||
+ e.Message);
|
||||
}
|
||||
std::vector< rtl::OUString > handleNames;
|
||||
initProperties(ifc, m_absentOptional, &handleNames);
|
||||
|
@ -161,15 +161,13 @@ Parser::Parser(
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in outer level",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in outer level");
|
||||
case STATE_END:
|
||||
if (res == xmlreader::XmlReader::RESULT_DONE) {
|
||||
return;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in outer level",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in outer level");
|
||||
case STATE_COMPONENTS:
|
||||
if (res == xmlreader::XmlReader::RESULT_END) {
|
||||
state = STATE_END;
|
||||
@ -183,8 +181,7 @@ Parser::Parser(
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in <components>",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in <components>");
|
||||
case STATE_COMPONENT:
|
||||
if (res == xmlreader::XmlReader::RESULT_END) {
|
||||
state = STATE_COMPONENTS;
|
||||
@ -200,8 +197,7 @@ Parser::Parser(
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in <component>",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in <component>");
|
||||
case STATE_IMPLEMENTATION:
|
||||
if (res == xmlreader::XmlReader::RESULT_END) {
|
||||
state = STATE_COMPONENT;
|
||||
@ -222,24 +218,21 @@ Parser::Parser(
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in <implementation>",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in <implementation>");
|
||||
case STATE_SERVICE:
|
||||
if (res == xmlreader::XmlReader::RESULT_END) {
|
||||
state = STATE_IMPLEMENTATION;
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in <service>",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in <service>");
|
||||
case STATE_SINGLETON:
|
||||
if (res == xmlreader::XmlReader::RESULT_END) {
|
||||
state = STATE_IMPLEMENTATION;
|
||||
break;
|
||||
}
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": unexpected item in <service>",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected item in <service>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -257,90 +250,78 @@ void Parser::handleComponent() {
|
||||
{
|
||||
if (!attrLoader_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <component> has multiple \"loader\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <component> has multiple \"loader\" attributes");
|
||||
}
|
||||
attrLoader_ = reader_.getAttributeValue(false).convertFromUtf8();
|
||||
if (attrLoader_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <component> has empty \"loader\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <component> has empty \"loader\" attribute");
|
||||
}
|
||||
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
|
||||
&& name.equals(RTL_CONSTASCII_STRINGPARAM("uri")))
|
||||
{
|
||||
if (!attrUri_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <component> has multiple \"uri\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <component> has multiple \"uri\" attributes");
|
||||
}
|
||||
attrUri_ = reader_.getAttributeValue(false).convertFromUtf8();
|
||||
if (attrUri_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <component> has empty \"uri\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <component> has empty \"uri\" attribute");
|
||||
}
|
||||
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
|
||||
&& name.equals(RTL_CONSTASCII_STRINGPARAM("environment")))
|
||||
{
|
||||
if (!attrEnvironment_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() +
|
||||
": <component> has multiple \"environment\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() +
|
||||
": <component> has multiple \"environment\" attributes");
|
||||
}
|
||||
attrEnvironment_ = reader_.getAttributeValue(false)
|
||||
.convertFromUtf8();
|
||||
if (attrEnvironment_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() +
|
||||
": <component> has empty \"environment\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() +
|
||||
": <component> has empty \"environment\" attribute");
|
||||
}
|
||||
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
|
||||
&& name.equals(RTL_CONSTASCII_STRINGPARAM("prefix")))
|
||||
{
|
||||
if (!attrPrefix_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() +
|
||||
": <component> has multiple \"prefix\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() +
|
||||
": <component> has multiple \"prefix\" attributes");
|
||||
}
|
||||
attrPrefix_ = reader_.getAttributeValue(false).convertFromUtf8();
|
||||
if (attrPrefix_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() +
|
||||
": <component> has empty \"prefix\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() +
|
||||
": <component> has empty \"prefix\" attribute");
|
||||
}
|
||||
} else {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() + ": unexpected attribute \""
|
||||
+ name.convertFromUtf8() + "\" in <component>"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected attribute \""
|
||||
+ name.convertFromUtf8() + "\" in <component>");
|
||||
}
|
||||
}
|
||||
if (attrLoader_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": <component> is missing \"loader\" attribute",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": <component> is missing \"loader\" attribute");
|
||||
}
|
||||
if (attrUri_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": <component> is missing \"uri\" attribute",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": <component> is missing \"uri\" attribute");
|
||||
}
|
||||
#ifndef DISABLE_DYNLOADING
|
||||
try {
|
||||
attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_);
|
||||
} catch (const rtl::MalformedUriException & e) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": bad \"uri\" attribute: " + e.getMessage(),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": bad \"uri\" attribute: " + e.getMessage());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -356,54 +337,47 @@ void Parser::handleImplementation() {
|
||||
{
|
||||
if (!attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <implementation> has multiple \"name\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <implementation> has multiple \"name\" attributes");
|
||||
}
|
||||
attrName = reader_.getAttributeValue(false).convertFromUtf8();
|
||||
if (attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <implementation> has empty \"name\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <implementation> has empty \"name\" attribute");
|
||||
}
|
||||
} else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
|
||||
&& name.equals(RTL_CONSTASCII_STRINGPARAM("constructor")))
|
||||
{
|
||||
if (!attrConstructor.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ (": <implementation> has multiple \"constructor\""
|
||||
" attributes")),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <implementation> has multiple \"constructor\""
|
||||
" attributes");
|
||||
}
|
||||
attrConstructor = reader_.getAttributeValue(false)
|
||||
.convertFromUtf8();
|
||||
if (attrConstructor.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": element has empty \"constructor\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": element has empty \"constructor\" attribute");
|
||||
}
|
||||
if (attrEnvironment_.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ (": <implementation> has \"constructor\" attribute but"
|
||||
" <component> has no \"environment\" attribute")),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <implementation> has \"constructor\" attribute but"
|
||||
" <component> has no \"environment\" attribute");
|
||||
}
|
||||
} else {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() + ": unexpected element attribute \""
|
||||
+ name.convertFromUtf8() + "\" in <implementation>"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": unexpected element attribute \""
|
||||
+ name.convertFromUtf8() + "\" in <implementation>");
|
||||
}
|
||||
}
|
||||
if (attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": <implementation> is missing \"name\" attribute"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": <implementation> is missing \"name\" attribute");
|
||||
}
|
||||
implementation_.reset(
|
||||
new cppuhelper::ServiceManager::Data::Implementation(
|
||||
@ -415,9 +389,8 @@ void Parser::handleImplementation() {
|
||||
second)
|
||||
{
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl() + ": duplicate <implementation name=\"" + attrName
|
||||
+ "\">"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": duplicate <implementation name=\"" + attrName
|
||||
+ "\">");
|
||||
}
|
||||
}
|
||||
|
||||
@ -443,26 +416,22 @@ rtl::OUString Parser::getNameAttribute() {
|
||||
{
|
||||
if (!attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(reader_.getUrl()
|
||||
+ ": element has multiple \"name\" attributes"),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl()
|
||||
+ ": element has multiple \"name\" attributes");
|
||||
}
|
||||
attrName = reader_.getAttributeValue(false).convertFromUtf8();
|
||||
if (attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": element has empty \"name\" attribute",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": element has empty \"name\" attribute");
|
||||
}
|
||||
} else {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": expected element attribute \"name\"",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": expected element attribute \"name\"");
|
||||
}
|
||||
}
|
||||
if (attrName.isEmpty()) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
reader_.getUrl() + ": element is missing \"name\" attribute",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
reader_.getUrl() + ": element is missing \"name\" attribute");
|
||||
}
|
||||
return attrName;
|
||||
}
|
||||
@ -1530,8 +1499,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) {
|
||||
second)
|
||||
{
|
||||
throw css::registry::InvalidRegistryException(
|
||||
uri + ": duplicate <implementation name=\"" + name + "\">",
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
uri + ": duplicate <implementation name=\"" + name + "\">");
|
||||
}
|
||||
readLegacyRdbStrings(
|
||||
uri, implKey, "UNO/SERVICES", &impl->info->services);
|
||||
|
@ -99,8 +99,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create(
|
||||
}
|
||||
catch (std::bad_alloc &)
|
||||
{
|
||||
throw uno::RuntimeException(rtl::OUString("std::bad_alloc"),
|
||||
uno::Reference<uno::XInterface>());
|
||||
throw uno::RuntimeException("std::bad_alloc");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@ SAL_IMPLEMENT_MAIN()
|
||||
}
|
||||
|
||||
if (!(aImplName.isEmpty() || aServiceName.isEmpty()))
|
||||
throw RuntimeException("give component exOR service name!", Reference< XInterface >() );
|
||||
throw RuntimeException("give component exOR service name!" );
|
||||
if (aImplName.isEmpty() && aServiceName.isEmpty())
|
||||
{
|
||||
if (! aUnoUrl.endsWithIgnoreAsciiCase( ";uno.ComponentContext" ))
|
||||
|
@ -97,8 +97,7 @@ OUString getNodeValue(
|
||||
return node->getNodeValue();
|
||||
} catch (const css::xml::dom::DOMException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
"com.sun.star.xml.dom.DOMException: " + e.Message,
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"com.sun.star.xml.dom.DOMException: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -451,8 +451,7 @@ Reference<XInterface> resolveUnoURL(
|
||||
for (int i = 0; i <= 20; ++i) // 10 seconds
|
||||
{
|
||||
if (abortChannel != 0 && abortChannel->isAborted()) {
|
||||
throw ucb::CommandAbortedException(
|
||||
"abort!", Reference<XInterface>() );
|
||||
throw ucb::CommandAbortedException( "abort!" );
|
||||
}
|
||||
try {
|
||||
return xUnoUrlResolver->resolve( connectString );
|
||||
|
@ -611,10 +611,8 @@ Reference< ucb::XSimpleFileAccess3 > BackendImpl::getFileAccess( void )
|
||||
if( !m_xSFA.is() )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"dp_registry::backend::help::BackendImpl::getFileAccess(), "
|
||||
"could not instatiate SimpleFileAccess." ),
|
||||
Reference< XInterface >() );
|
||||
"could not instatiate SimpleFileAccess." );
|
||||
}
|
||||
}
|
||||
return m_xSFA;
|
||||
|
@ -340,8 +340,7 @@ void BackendImpl::PackageImpl::processPackage_(
|
||||
if ( !m_xNameCntrPkgHandler.is() )
|
||||
{
|
||||
dp_misc::TRACE("no package handler!!!!\n");
|
||||
throw RuntimeException( "No package Handler ",
|
||||
Reference< XInterface >() );
|
||||
throw RuntimeException( "No package Handler " );
|
||||
}
|
||||
|
||||
if (doRegisterPackage)
|
||||
|
@ -212,7 +212,7 @@ OUString makeAbsoluteFileUrl(
|
||||
else if (throw_exc)
|
||||
{
|
||||
throw RuntimeException("cannot get file url from system path: " +
|
||||
sys_path, Reference< XInterface >() );
|
||||
sys_path );
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,8 +227,7 @@ OUString makeAbsoluteFileUrl(
|
||||
buf.appendAscii( "\" (base-url) and \"" );
|
||||
buf.append( file_url );
|
||||
buf.appendAscii( "\" (file-url)!" );
|
||||
throw RuntimeException(
|
||||
buf.makeStringAndClear(), Reference< XInterface >() );
|
||||
throw RuntimeException( buf.makeStringAndClear() );
|
||||
}
|
||||
return OUString();
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokeGetProperty( const OUString& aPropertyN
|
||||
{
|
||||
OUString msg("[automation bridge]Property \"" + aPropertyName +
|
||||
"\" is not supported");
|
||||
throw UnknownPropertyException(msg, Reference<XInterface>());
|
||||
throw UnknownPropertyException(msg);
|
||||
}
|
||||
aResult = invokeWithDispIdComTlb( aDescGet, aPropertyName, aParams, aOutParamIndex, aOutParam );
|
||||
}
|
||||
@ -185,7 +185,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokeGetProperty( const OUString& aPropertyN
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::invokeGetProperty ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
}
|
||||
return aResult;
|
||||
}
|
||||
@ -205,7 +205,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokePutProperty( const OUString& aPropertyN
|
||||
{
|
||||
OUString msg("[automation bridge]Property \"" + aPropertyName +
|
||||
"\" is not supported");
|
||||
throw UnknownPropertyException(msg, Reference<XInterface>());
|
||||
throw UnknownPropertyException(msg);
|
||||
}
|
||||
aResult = invokeWithDispIdComTlb( aDescPut, aPropertyName, aParams, aOutParamIndex, aOutParam );
|
||||
}
|
||||
@ -213,7 +213,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invokePutProperty( const OUString& aPropertyN
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::invokePutProperty ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
}
|
||||
return aResult;
|
||||
}
|
||||
@ -228,8 +228,7 @@ Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
|
||||
Any ret;
|
||||
@ -265,19 +264,19 @@ Any SAL_CALL IUnknownWrapper_Impl::invoke( const OUString& aFunctionName,
|
||||
}
|
||||
catch (const BridgeRuntimeError & e)
|
||||
{
|
||||
throw RuntimeException(e.message, Reference<XInterface>());
|
||||
throw RuntimeException(e.message);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::invoke ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::Invoke !", Reference<XInterface>());
|
||||
"IUnknownWrapper_Impl::Invoke !");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -290,8 +289,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
try
|
||||
{
|
||||
@ -307,7 +305,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
|
||||
{
|
||||
OUString msg("[automation bridge]Property \"" + aPropertyName +
|
||||
"\" is not supported");
|
||||
throw UnknownPropertyException(msg, Reference<XInterface>());
|
||||
throw UnknownPropertyException(msg);
|
||||
}
|
||||
|
||||
if ( (! aDescPut && aDescGet) || aVarDesc
|
||||
@ -438,21 +436,20 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
|
||||
}
|
||||
catch (const BridgeRuntimeError& e)
|
||||
{
|
||||
throw RuntimeException(
|
||||
e.message, Reference<XInterface>());
|
||||
throw RuntimeException(e.message);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::setValue ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::setValue !", Reference<XInterface>());
|
||||
"IUnknownWrapper_Impl::setValue !");
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,8 +459,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
Any ret;
|
||||
try
|
||||
@ -519,7 +515,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
|
||||
//property not found
|
||||
OUString msg("[automation bridge]Property \"" + aPropertyName +
|
||||
"\" is not supported");
|
||||
throw UnknownPropertyException(msg, Reference<XInterface>());
|
||||
throw UnknownPropertyException(msg);
|
||||
}
|
||||
// write-only should not be possible
|
||||
OSL_ASSERT( aDescGet || ! aDescPut);
|
||||
@ -565,52 +561,15 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
|
||||
case S_OK:
|
||||
break;
|
||||
case DISP_E_BADPARAMCOUNT:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_BADVARTYPE:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_EXCEPTION:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
|
||||
break;
|
||||
case DISP_E_MEMBERNOTFOUND:
|
||||
throw UnknownPropertyException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_NONAMEDARGS:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_OVERFLOW:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_PARAMNOTFOUND:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_TYPEMISMATCH:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_UNKNOWNINTERFACE:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_UNKNOWNLCID:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
break;
|
||||
case DISP_E_PARAMNOTOPTIONAL:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
throw UnknownPropertyException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
|
||||
break;
|
||||
default:
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException(OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -620,20 +579,19 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
|
||||
}
|
||||
catch (const BridgeRuntimeError& e)
|
||||
{
|
||||
throw RuntimeException(
|
||||
e.message, Reference<XInterface>());
|
||||
throw RuntimeException(e.message);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::getValue ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::getValue !", Reference<XInterface>());
|
||||
"IUnknownWrapper_Impl::getValue !");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -644,8 +602,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMethod( const OUString& aName )
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
sal_Bool ret = sal_False;
|
||||
|
||||
@ -672,18 +629,18 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMethod( const OUString& aName )
|
||||
}
|
||||
catch (const BridgeRuntimeError& e)
|
||||
{
|
||||
throw RuntimeException(e.message, Reference<XInterface>());
|
||||
throw RuntimeException(e.message);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::hasMethod ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::hasMethod !", Reference<XInterface>());
|
||||
"IUnknownWrapper_Impl::hasMethod !");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -694,7 +651,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasProperty( const OUString& aName )
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException("[automation bridge] The object does not have an "
|
||||
"IDispatch interface", Reference<XInterface>());
|
||||
"IDispatch interface");
|
||||
}
|
||||
sal_Bool ret = sal_False;
|
||||
try
|
||||
@ -722,19 +679,19 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasProperty( const OUString& aName )
|
||||
}
|
||||
catch (const BridgeRuntimeError& e)
|
||||
{
|
||||
throw RuntimeException(e.message, Reference<XInterface>());
|
||||
throw RuntimeException(e.message);
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::hasProperty ! Message : \n" +
|
||||
e.Message, Reference<XInterface>());
|
||||
e.Message);
|
||||
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
throw RuntimeException("[automation bridge] unexpected exception in "
|
||||
"IUnknownWrapper_Impl::hasProperty !", Reference<XInterface>());
|
||||
"IUnknownWrapper_Impl::hasProperty !");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -1298,13 +1255,12 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
|
||||
}
|
||||
catch ( const BridgeRuntimeError & e )
|
||||
{
|
||||
throw RuntimeException( e.message, Reference<XInterface>() );
|
||||
throw RuntimeException( e.message );
|
||||
}
|
||||
catch( const Exception& e )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n" + e.Message,
|
||||
Reference<XInterface>() );
|
||||
"[automation bridge] unexpected exception in IUnknownWrapper_Impl::initialiase() error message: \n" + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1319,8 +1275,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
|
||||
if ( !m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
|
||||
o2u_attachCurrentThread();
|
||||
@ -1566,8 +1521,7 @@ sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMember( const OUString& aName )
|
||||
if ( ! m_spDispatch )
|
||||
{
|
||||
throw RuntimeException(
|
||||
"[automation bridge] The object does not have an IDispatch interface",
|
||||
Reference<XInterface>());
|
||||
"[automation bridge] The object does not have an IDispatch interface");
|
||||
}
|
||||
|
||||
o2u_attachCurrentThread();
|
||||
|
@ -93,9 +93,7 @@ Reference<XInterface> initResourceIndexAccess(ResourceIndexAccess* pResourceInde
|
||||
// xResult does not help the client to analyse the problem
|
||||
// and will crash on getByIndex calls, better just give back an empty Reference
|
||||
// so that such ResourceStringIndexAccess instances are never release into the wild
|
||||
throw RuntimeException(
|
||||
OUString("resource manager could not get initialized"),
|
||||
/* xResult */ Reference<XInterface>());
|
||||
throw RuntimeException("resource manager could not get initialized");
|
||||
return xResult;
|
||||
}
|
||||
|
||||
@ -145,17 +143,13 @@ Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx)
|
||||
throw IndexOutOfBoundsException();
|
||||
SolarMutexGuard aGuard;
|
||||
if(!m_pResMgr.get())
|
||||
throw RuntimeException(
|
||||
OUString("resource manager not available"),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException("resource manager not available");
|
||||
|
||||
const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr);
|
||||
aId.SetRT(RSC_STRING);
|
||||
|
||||
if(!m_pResMgr->IsAvailable(aId))
|
||||
throw RuntimeException(
|
||||
OUString("string resource for id not available"),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException("string resource for id not available");
|
||||
|
||||
return makeAny(aId.toString());
|
||||
}
|
||||
@ -168,16 +162,12 @@ Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx)
|
||||
SolarMutexGuard aGuard;
|
||||
|
||||
if(!m_pResMgr.get())
|
||||
throw RuntimeException(
|
||||
OUString("resource manager not available"),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException("resource manager not available");
|
||||
|
||||
const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr);
|
||||
aId.SetRT(RSC_STRINGARRAY);
|
||||
if(!m_pResMgr->IsAvailable(aId))
|
||||
throw RuntimeException(
|
||||
OUString("string list resource for id not available"),
|
||||
Reference<XInterface>());
|
||||
throw RuntimeException("string list resource for id not available");
|
||||
const ResStringArray aStringList(aId);
|
||||
Sequence<PropertyValue> aPropList(aStringList.Count());
|
||||
for(sal_Int32 nCount = 0; nCount != aPropList.getLength(); ++nCount)
|
||||
|
@ -117,8 +117,7 @@ checkForUpdates(
|
||||
const OUString &rInstallSetID )
|
||||
{
|
||||
if( !rxContext.is() )
|
||||
throw uno::RuntimeException(
|
||||
"checkForUpdates: empty component context", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( "checkForUpdates: empty component context" );
|
||||
|
||||
OSL_ASSERT( rxContext->getServiceManager().is() );
|
||||
|
||||
|
@ -283,8 +283,7 @@ Image UpdateCheckUI::GetBubbleImage( OUString &rURL )
|
||||
|
||||
if( !xContext.is() )
|
||||
throw uno::RuntimeException(
|
||||
"UpdateCheckUI: unable to obtain service manager from component context",
|
||||
uno::Reference< uno::XInterface >() );
|
||||
"UpdateCheckUI: unable to obtain service manager from component context" );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -759,7 +759,7 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c
|
||||
}
|
||||
MacroResolvedInfo aMacroInfo = resolveVBAMacro( pShell, aMacroName );
|
||||
if( !aMacroInfo.mbFound )
|
||||
throw uno::RuntimeException( "The procedure doesn't exist", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( "The procedure doesn't exist" );
|
||||
MacroName = aMacroInfo.msResolvedMacro;
|
||||
}
|
||||
uno::Reference< ui::XUIConfigurationManagerSupplier > xCfgSupplier(rxModel, uno::UNO_QUERY_THROW);
|
||||
|
@ -78,14 +78,10 @@ void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type&
|
||||
const uno::Reference< uno::XInterface >& xListener)
|
||||
{
|
||||
if ( m_rBroadcastHelper.bDisposed )
|
||||
throw lang::DisposedException(
|
||||
OUString( "FilePicker is already disposed" ),
|
||||
uno::Reference< uno::XInterface >() );
|
||||
throw lang::DisposedException( "FilePicker is already disposed" );
|
||||
|
||||
if ( m_rBroadcastHelper.bInDispose )
|
||||
throw lang::DisposedException(
|
||||
OUString( "FilePicker will be disposed now." ),
|
||||
uno::Reference< uno::XInterface >() );
|
||||
throw lang::DisposedException( "FilePicker will be disposed now." );
|
||||
|
||||
m_rBroadcastHelper.aLC.addInterface( aType, xListener );
|
||||
}
|
||||
@ -98,9 +94,7 @@ void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type&
|
||||
const uno::Reference< uno::XInterface >& xListener)
|
||||
{
|
||||
if ( m_rBroadcastHelper.bDisposed )
|
||||
throw lang::DisposedException(
|
||||
OUString( "FilePicker is already disposed." ),
|
||||
uno::Reference< uno::XInterface >() );
|
||||
throw lang::DisposedException( "FilePicker is already disposed." );
|
||||
|
||||
m_rBroadcastHelper.aLC.removeInterface( aType, xListener );
|
||||
}
|
||||
|
@ -107,8 +107,7 @@ AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sC
|
||||
SolarMutexGuard g;
|
||||
TCommand2Keys::const_iterator pCommand = m_lCommand2Keys.find(sCommand);
|
||||
if (pCommand == m_lCommand2Keys.end())
|
||||
throw css::container::NoSuchElementException(
|
||||
OUString(), css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::container::NoSuchElementException();
|
||||
return pCommand->second;
|
||||
}
|
||||
|
||||
@ -117,8 +116,7 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const
|
||||
SolarMutexGuard g;
|
||||
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey);
|
||||
if (pKey == m_lKey2Commands.end())
|
||||
throw css::container::NoSuchElementException(
|
||||
OUString(), css::uno::Reference< css::uno::XInterface >());
|
||||
throw css::container::NoSuchElementException();
|
||||
return pKey->second;
|
||||
}
|
||||
|
||||
|
@ -349,8 +349,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
|
||||
{
|
||||
if (!xDocumentRoot.is())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString("There is valid root storage, where the UI configuration can work on."),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
"There is valid root storage, where the UI configuration can work on.");
|
||||
m_lDocumentStorages.setRootStorage(xDocumentRoot);
|
||||
xShare = xDocumentRoot;
|
||||
xUser = xDocumentRoot;
|
||||
|
@ -266,13 +266,13 @@ void TransactionManager::impl_throwExceptions( EExceptionMode eMode, ERejectReas
|
||||
{
|
||||
// Help programmer to find out, why this exception is thrown!
|
||||
SAL_WARN( "fwk", "TransactionManager...: Owner instance stand in close method. Call was rejected!" );
|
||||
throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::lang::DisposedException( "TransactionManager...\nOwner instance stand in close method. Call was rejected!" );
|
||||
}
|
||||
break;
|
||||
case E_CLOSED : {
|
||||
// Help programmer to find out, why this exception is thrown!
|
||||
SAL_WARN( "fwk", "TransactionManager...: Owner instance already closed. Call was rejected!" );
|
||||
throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!\n", css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::lang::DisposedException( "TransactionManager...\nOwner instance already closed. Call was rejected!" );
|
||||
}
|
||||
case E_NOREASON : {
|
||||
// Help programmer to find out
|
||||
|
@ -73,8 +73,7 @@ Sequence< Any > make_seq_out_of_struct(
|
||||
{
|
||||
throw RuntimeException(
|
||||
type.getTypeName() +
|
||||
OUString( "is no struct or exception!" ),
|
||||
Reference< XInterface >() );
|
||||
OUString( "is no struct or exception!" ) );
|
||||
}
|
||||
typelib_TypeDescription * pTD = 0;
|
||||
TYPELIB_DANGER_GET( &pTD, type.getTypeLibType() );
|
||||
@ -83,8 +82,7 @@ Sequence< Any > make_seq_out_of_struct(
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "cannot get type descr of type " ) +
|
||||
type.getTypeName(),
|
||||
Reference< XInterface >() );
|
||||
type.getTypeName() );
|
||||
}
|
||||
|
||||
::std::vector< Any > vec;
|
||||
@ -398,11 +396,8 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount() throw (::com::sun::star::uno::Ru
|
||||
com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if (idx >= (sal_Int32)m_aStatements.size()) {
|
||||
throw com::sun::star::lang::IndexOutOfBoundsException(
|
||||
OUString( "Dispatch recorder out of bounds" ),
|
||||
Reference< XInterface >() );
|
||||
|
||||
}
|
||||
throw com::sun::star::lang::IndexOutOfBoundsException( "Dispatch recorder out of bounds" );
|
||||
}
|
||||
|
||||
Any element(&m_aStatements[idx],
|
||||
cppu::UnoType<com::sun::star::frame::DispatchStatement>::get());
|
||||
@ -421,8 +416,7 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const com::sun::st
|
||||
|
||||
if (idx >= (sal_Int32)m_aStatements.size()) {
|
||||
throw com::sun::star::lang::IndexOutOfBoundsException(
|
||||
OUString( "Dispatch recorder out of bounds" ),
|
||||
Reference< XInterface >() );
|
||||
"Dispatch recorder out of bounds" );
|
||||
|
||||
}
|
||||
|
||||
|
@ -599,8 +599,7 @@ T Any::get() const
|
||||
cppu_Any_extraction_failure_msg(
|
||||
this,
|
||||
::cppu::getTypeFavourUnsigned(&value).getTypeLibType() ),
|
||||
SAL_NO_ACQUIRE ),
|
||||
Reference<XInterface>() );
|
||||
SAL_NO_ACQUIRE ) );
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ protected:
|
||||
virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) throw (css::uno::RuntimeException)
|
||||
{
|
||||
if ( !m_xNameAccess.is() )
|
||||
throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object" );
|
||||
|
||||
if( mbIgnoreCase )
|
||||
{
|
||||
@ -260,12 +260,11 @@ protected:
|
||||
virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException)
|
||||
{
|
||||
if ( !m_xIndexAccess.is() )
|
||||
throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object", css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object" );
|
||||
if ( nIndex <= 0 )
|
||||
{
|
||||
throw css::lang::IndexOutOfBoundsException(
|
||||
OUString( "index is 0 or negative" ),
|
||||
css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::lang::IndexOutOfBoundsException(
|
||||
"index is 0 or negative" );
|
||||
}
|
||||
// need to adjust for vba index ( for which first element is 1 )
|
||||
return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );
|
||||
@ -294,10 +293,7 @@ public:
|
||||
|
||||
if ( !( Index1 >>= nIndex ) )
|
||||
{
|
||||
OUString message;
|
||||
message = OUString( "Couldn't convert index to Int32");
|
||||
throw css::lang::IndexOutOfBoundsException( message,
|
||||
css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::lang::IndexOutOfBoundsException( "Couldn't convert index to Int32" );
|
||||
}
|
||||
return getItemByIntIndex( nIndex );
|
||||
}
|
||||
|
@ -222,9 +222,7 @@ void OTextOutputStream::checkOutputStream()
|
||||
throw(IOException)
|
||||
{
|
||||
if (! mxStream.is() )
|
||||
throw IOException(
|
||||
OUString("output stream is not initialized, you have to use setOutputStream first"),
|
||||
Reference<XInterface>());
|
||||
throw IOException("output stream is not initialized, you have to use setOutputStream first");
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +160,7 @@ namespace io_acceptor
|
||||
if( ! m_pipe.is() )
|
||||
{
|
||||
OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName;
|
||||
throw ConnectionSetupException( error, Reference< XInterface > () );
|
||||
throw ConnectionSetupException( error );
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ namespace io_acceptor
|
||||
if( ! pipe.is() )
|
||||
{
|
||||
OUString error = "io.acceptor: pipe already closed" + m_sPipeName;
|
||||
throw ConnectionSetupException( error, Reference< XInterface > () );
|
||||
throw ConnectionSetupException( error );
|
||||
}
|
||||
PipeConnection *pConn = new PipeConnection( m_sConnectionDescription );
|
||||
|
||||
@ -193,7 +193,7 @@ namespace io_acceptor
|
||||
else
|
||||
{
|
||||
OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName;
|
||||
throw ConnectionSetupException( error, Reference< XInterface > ());
|
||||
throw ConnectionSetupException( error );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,16 +335,14 @@ namespace io_acceptor {
|
||||
OUStringBuffer message( 128 );
|
||||
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid tcp/ip port " );
|
||||
message.append( (sal_Int32) m_nPort );
|
||||
throw ConnectionSetupException(
|
||||
message.makeStringAndClear() , Reference< XInterface> () );
|
||||
throw ConnectionSetupException( message.makeStringAndClear() );
|
||||
}
|
||||
if( ! m_addr.setHostname( m_sSocketName.pData ) )
|
||||
{
|
||||
OUStringBuffer message( 128 );
|
||||
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - invalid host " );
|
||||
message.append( m_sSocketName );
|
||||
throw ConnectionSetupException(
|
||||
message.makeStringAndClear(), Reference< XInterface > () );
|
||||
throw ConnectionSetupException( message.makeStringAndClear() );
|
||||
}
|
||||
m_socket.setOption( osl_Socket_OptionReuseAddr, 1);
|
||||
|
||||
@ -353,9 +351,7 @@ namespace io_acceptor {
|
||||
OUStringBuffer message( 128 );
|
||||
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - couldn't bind on " );
|
||||
message.append( m_sSocketName ).appendAscii( ":" ).append((sal_Int32)m_nPort);
|
||||
throw ConnectionSetupException(
|
||||
message.makeStringAndClear(),
|
||||
Reference<XInterface>());
|
||||
throw ConnectionSetupException( message.makeStringAndClear() );
|
||||
}
|
||||
|
||||
if(! m_socket.listen() )
|
||||
@ -363,7 +359,7 @@ namespace io_acceptor {
|
||||
OUStringBuffer message( 128 );
|
||||
message.appendAscii( "acc_socket.cxx:SocketAcceptor::init - error - can't listen on " );
|
||||
message.append( m_sSocketName ).appendAscii( ":" ).append( (sal_Int32) m_nPort);
|
||||
throw ConnectionSetupException( message.makeStringAndClear(),Reference<XInterface>() );
|
||||
throw ConnectionSetupException( message.makeStringAndClear() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace io_acceptor
|
||||
{
|
||||
OUString sMessage( "AlreadyAcceptingException :" );
|
||||
sMessage += sConnectionDescription;
|
||||
throw AlreadyAcceptingException( sMessage , Reference< XInterface > () );
|
||||
throw AlreadyAcceptingException( sMessage );
|
||||
}
|
||||
*m_pFlag = true;
|
||||
}
|
||||
@ -138,7 +138,7 @@ namespace io_acceptor
|
||||
{
|
||||
// instantiate another acceptor for different ports
|
||||
OUString sMessage = "acceptor::accept called multiple times with different conncetion strings\n";
|
||||
throw ConnectionSetupException( sMessage, Reference< XInterface > () );
|
||||
throw ConnectionSetupException( sMessage );
|
||||
}
|
||||
|
||||
if( m_sLastDescription.isEmpty() )
|
||||
@ -219,7 +219,7 @@ namespace io_acceptor
|
||||
OUString message("Acceptor: unknown delegatee ");
|
||||
message += delegatee;
|
||||
|
||||
throw ConnectionSetupException(message, Reference<XInterface>());
|
||||
throw ConnectionSetupException(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ namespace stoc_connector
|
||||
sMessage += OUString::number( pConn->m_pipe.getError() );
|
||||
sMessage += ")";
|
||||
delete pConn;
|
||||
throw NoConnectException( sMessage ,Reference< XInterface > () );
|
||||
throw NoConnectException( sMessage );
|
||||
}
|
||||
}
|
||||
else if ( aDesc.getName() == "socket" )
|
||||
@ -131,7 +131,7 @@ namespace stoc_connector
|
||||
sMessage += sError;
|
||||
sMessage += ")";
|
||||
delete pConn;
|
||||
throw NoConnectException( sMessage, Reference < XInterface > () );
|
||||
throw NoConnectException( sMessage );
|
||||
}
|
||||
if( bTcpNoDelay )
|
||||
{
|
||||
@ -159,7 +159,7 @@ namespace stoc_connector
|
||||
OUString message("Connector: unknown delegatee ");
|
||||
message += delegatee;
|
||||
|
||||
throw ConnectionSetupException(message, Reference<XInterface>());
|
||||
throw ConnectionSetupException(message);
|
||||
}
|
||||
|
||||
sal_Int32 index = sConnectionDescription.indexOf((sal_Unicode) ',');
|
||||
@ -170,8 +170,7 @@ namespace stoc_connector
|
||||
}
|
||||
catch (const rtl::MalformedUriException & rEx)
|
||||
{
|
||||
throw ConnectionSetupException(rEx.getMessage(),
|
||||
Reference< XInterface > ());
|
||||
throw ConnectionSetupException(rEx.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,8 +80,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
|
||||
if (JNI_FALSE != jni_env->ExceptionCheck())
|
||||
{
|
||||
jni_env->ExceptionClear();
|
||||
throw RuntimeException(
|
||||
"index out of bounds?!", Reference< XInterface >() );
|
||||
throw RuntimeException( "index out of bounds?!" );
|
||||
}
|
||||
if (0 != jstr)
|
||||
{
|
||||
@ -91,8 +90,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
|
||||
if (JNI_FALSE != jni_env->ExceptionCheck())
|
||||
{
|
||||
jni_env->ExceptionClear();
|
||||
throw RuntimeException(
|
||||
"index out of bounds?!", Reference< XInterface >() );
|
||||
throw RuntimeException( "index out of bounds?!" );
|
||||
}
|
||||
if (0 != jstr)
|
||||
{
|
||||
@ -138,9 +136,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
|
||||
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
|
||||
if (xComp.is())
|
||||
xComp->dispose();
|
||||
throw RuntimeException(
|
||||
"cannot get mapping C++ <-> Java!",
|
||||
Reference< XInterface >() );
|
||||
throw RuntimeException("cannot get mapping C++ <-> Java!" );
|
||||
}
|
||||
|
||||
jobject jret = (jobject)mapping.mapInterface( xContext.get(), ::getCppuType( &xContext ) );
|
||||
|
@ -105,9 +105,7 @@ namespace javaunohelper {
|
||||
vm, JNI_VERSION_1_2, false, jni_env ),
|
||||
loader );
|
||||
} catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString("jmvaccess::UnoVirtualMachine::CreationException occurred" ),
|
||||
css::uno::Reference< css::uno::XInterface >() );
|
||||
throw css::uno::RuntimeException( "jvmaccess::UnoVirtualMachine::CreationException occurred" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,10 +68,8 @@ void * ::jvmaccess::ClassPath::doTranslateToUrls(
|
||||
url = expUrl->expand( expander );
|
||||
} catch (const css::lang::IllegalArgumentException & e) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"com.sun.star.lang.IllegalArgumentException: ")
|
||||
+ e.Message),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
OUString("com.sun.star.lang.IllegalArgumentException: ")
|
||||
+ e.Message);
|
||||
}
|
||||
}
|
||||
jvalue arg;
|
||||
|
@ -151,7 +151,7 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
|
||||
if( aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements() )
|
||||
{
|
||||
if( aCoreStreams.getLength() > 1 )
|
||||
throw IOException( "Unexpected core properties stream!", Reference< XInterface >() );
|
||||
throw IOException( "Unexpected core properties stream!" );
|
||||
|
||||
::oox::core::FastParser aParser( mxContext );
|
||||
aParser.registerNamespace( NMSP_packageMetaCorePr );
|
||||
|
@ -108,7 +108,7 @@ void SAL_CALL UnoBinaryInputStream::closeInput() throw (NotConnectedException, I
|
||||
void UnoBinaryInputStream::ensureConnected() const throw (NotConnectedException)
|
||||
{
|
||||
if( !mpInStrm )
|
||||
throw NotConnectedException( "Stream closed", Reference< XInterface >() );
|
||||
throw NotConnectedException( "Stream closed" );
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -263,7 +263,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
|
||||
else if ( nDigestAlgID == xml::crypto::DigestID::SHA1_1K )
|
||||
sChecksumType = sSHA1_1k_Name;
|
||||
else
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected digest algorithm is provided!", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected digest algorithm is provided!" );
|
||||
|
||||
pNewAttrList->AddAttribute ( sChecksumTypeAttribute, sCdataAttribute, sChecksumType );
|
||||
*pDigest >>= aSequence;
|
||||
@ -286,7 +286,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
|
||||
{
|
||||
OSL_ENSURE( nDerivedKeySize, "Unexpected key size is provided!" );
|
||||
if ( nDerivedKeySize != 32 )
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected key size is provided!", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected key size is provided!" );
|
||||
|
||||
sEncAlgName = sAES256_URL;
|
||||
}
|
||||
@ -295,7 +295,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
|
||||
sEncAlgName = sBlowfish_Name;
|
||||
}
|
||||
else
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected encryption algorithm is provided!", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected encryption algorithm is provided!" );
|
||||
|
||||
pNewAttrList->AddAttribute ( sAlgorithmNameAttribute, sCdataAttribute, sEncAlgName );
|
||||
|
||||
@ -359,7 +359,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
|
||||
sStartKeySize = aBuffer.makeStringAndClear();
|
||||
}
|
||||
else
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected start key algorithm is provided!", uno::Reference< uno::XInterface >() );
|
||||
throw uno::RuntimeException( THROW_WHERE "Unexpected start key algorithm is provided!" );
|
||||
|
||||
pNewAttrList->AddAttribute ( sStartKeyGenerationNameAttribute, sCdataAttribute, sStartKeyAlg );
|
||||
pNewAttrList->AddAttribute ( sKeySizeAttribute, sCdataAttribute, sStartKeySize );
|
||||
|
@ -66,7 +66,7 @@ void SAL_CALL ManifestWriter::writeManifestSequence( const Reference< XOutputStr
|
||||
}
|
||||
catch( SAXException& )
|
||||
{
|
||||
throw RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw RuntimeException( THROW_WHERE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -980,8 +980,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
|
||||
else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
|
||||
aValue <<= m_aNewRelInfo;
|
||||
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
|
||||
throw io::IOException( "Wrong relinfo stream!",
|
||||
uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException( "Wrong relinfo stream!" );
|
||||
|
||||
for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ )
|
||||
if ( aResult[nInd].Name == "RelationsInfo" )
|
||||
@ -1152,8 +1151,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OWriteStream_Impl::GetAllRel
|
||||
else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
|
||||
return m_aNewRelInfo;
|
||||
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
|
||||
throw io::IOException( "Wrong relinfo stream!",
|
||||
uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException( "Wrong relinfo stream!" );
|
||||
}
|
||||
|
||||
void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream >& xDestStream )
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -77,7 +77,7 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location )
|
||||
return location;
|
||||
}
|
||||
else
|
||||
throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException(THROW_WHERE );
|
||||
}
|
||||
|
||||
sal_Int64 SAL_CALL ByteGrabber::getPosition( )
|
||||
@ -87,7 +87,7 @@ sal_Int64 SAL_CALL ByteGrabber::getPosition( )
|
||||
if (xSeek.is() )
|
||||
return xSeek->getPosition();
|
||||
else
|
||||
throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException(THROW_WHERE );
|
||||
}
|
||||
|
||||
sal_Int64 SAL_CALL ByteGrabber::getLength( )
|
||||
@ -97,7 +97,7 @@ sal_Int64 SAL_CALL ByteGrabber::getLength( )
|
||||
if (xSeek.is() )
|
||||
return xSeek->getLength();
|
||||
else
|
||||
throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw io::IOException(THROW_WHERE );
|
||||
}
|
||||
|
||||
ByteGrabber& ByteGrabber::operator >> (sal_Int8& rInt8)
|
||||
|
@ -78,7 +78,7 @@ XUnbufferedStream::XUnbufferedStream(
|
||||
}
|
||||
|
||||
if (mnZipSize < 0)
|
||||
throw ZipIOException("The stream seems to be broken!", uno::Reference< XInterface >());
|
||||
throw ZipIOException("The stream seems to be broken!");
|
||||
|
||||
bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False;
|
||||
bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
|
||||
@ -229,16 +229,13 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
|
||||
|
||||
if ( nRead > nRequestedBytes )
|
||||
throw RuntimeException(
|
||||
"Should not be possible to read more then requested!",
|
||||
Reference< XInterface >() );
|
||||
"Should not be possible to read more then requested!" );
|
||||
|
||||
if ( maInflater.finished() || maInflater.getLastInflateError() )
|
||||
throw ZipIOException("The stream seems to be broken!",
|
||||
Reference< XInterface >() );
|
||||
throw ZipIOException("The stream seems to be broken!" );
|
||||
|
||||
if ( maInflater.needsDictionary() )
|
||||
throw ZipIOException("Dictionaries are not supported!",
|
||||
Reference< XInterface >() );
|
||||
throw ZipIOException("Dictionaries are not supported!" );
|
||||
|
||||
sal_Int32 nDiff = static_cast< sal_Int32 >( mnZipEnd - mnZipCurrent );
|
||||
if ( nDiff > 0 )
|
||||
@ -252,8 +249,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
|
||||
|
||||
sal_Int32 nZipRead = mxZipStream->readBytes( maCompBuffer, nToRead );
|
||||
if ( nZipRead < nToRead )
|
||||
throw ZipIOException("No expected data!",
|
||||
Reference< XInterface >() );
|
||||
throw ZipIOException("No expected data!" );
|
||||
|
||||
mnZipCurrent += nZipRead;
|
||||
// maCompBuffer now has the data, check if we need to decrypt
|
||||
@ -279,8 +275,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ZipIOException("The stream seems to be broken!",
|
||||
Reference< XInterface >() );
|
||||
throw ZipIOException("The stream seems to be broken!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -296,8 +291,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
|
||||
maCRC.update( aData );
|
||||
|
||||
if ( mnZipSize + maHeader.getLength() == mnMyCurrent && maCRC.getValue() != maEntry.nCrc )
|
||||
throw ZipIOException("The stream seems to be broken!",
|
||||
Reference< XInterface >() );
|
||||
throw ZipIOException("The stream seems to be broken!" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
|
||||
if ( readCEN() == -1 )
|
||||
{
|
||||
aEntries.clear();
|
||||
throw ZipException( "stream data looks to be broken", uno::Reference < XInterface > () );
|
||||
throw ZipException( "stream data looks to be broken" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -103,7 +103,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
|
||||
else if ( readCEN() == -1 )
|
||||
{
|
||||
aEntries.clear();
|
||||
throw ZipException("stream data looks to be broken", uno::Reference < XInterface > () );
|
||||
throw ZipException("stream data looks to be broken" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -149,8 +149,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
|
||||
{
|
||||
if (xEncryptionData->m_nDerivedKeySize < 0)
|
||||
{
|
||||
throw ZipIOException("Invalid derived key length!",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("Invalid derived key length!" );
|
||||
}
|
||||
|
||||
uno::Sequence< sal_Int8 > aDerivedKey( xEncryptionData->m_nDerivedKeySize );
|
||||
@ -162,8 +161,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
|
||||
xEncryptionData->m_aSalt.getLength(),
|
||||
xEncryptionData->m_nIterationCount ) )
|
||||
{
|
||||
throw ZipIOException("Can not create derived key!",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("Can not create derived key!" );
|
||||
}
|
||||
|
||||
if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::AES_CBC_W3C_PADDING )
|
||||
@ -182,8 +180,7 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ZipIOException("Unknown cipher algorithm is requested!",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("Unknown cipher algorithm is requested!" );
|
||||
}
|
||||
}
|
||||
catch( ... )
|
||||
@ -384,16 +381,14 @@ uno::Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const uno::R
|
||||
throw ( packages::WrongPasswordException, ZipIOException, RuntimeException )
|
||||
{
|
||||
if ( !rData.is() )
|
||||
throw ZipIOException("Encrypted stream without encryption data!\n",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("Encrypted stream without encryption data!\n" );
|
||||
|
||||
if ( !rData->m_aKey.getLength() )
|
||||
throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw packages::WrongPasswordException(THROW_WHERE );
|
||||
|
||||
uno::Reference< XSeekable > xSeek( xStream, UNO_QUERY );
|
||||
if ( !xSeek.is() )
|
||||
throw ZipIOException("The stream must be seekable!\n",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("The stream must be seekable!\n" );
|
||||
|
||||
// if we have a digest, then this file is an encrypted one and we should
|
||||
// check if we can decrypt it or not
|
||||
@ -414,7 +409,7 @@ uno::Reference< XInputStream > ZipFile::StaticGetDataFromRawStream( const uno::R
|
||||
xStream->readBytes( aReadBuffer, nSize );
|
||||
|
||||
if ( !StaticHasValidPassword( rxContext, aReadBuffer, rData ) )
|
||||
throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw packages::WrongPasswordException(THROW_WHERE );
|
||||
}
|
||||
|
||||
return new XUnbufferedStream( rxContext, xStream, rData );
|
||||
@ -580,14 +575,13 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry
|
||||
// in case no digest is provided there is no way
|
||||
// to detect password correctness
|
||||
if ( !rData.is() )
|
||||
throw ZipException("Encrypted stream without encryption data!\n",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipException("Encrypted stream without encryption data!" );
|
||||
|
||||
// if we have a digest, then this file is an encrypted one and we should
|
||||
// check if we can decrypt it or not
|
||||
OSL_ENSURE( rData->m_aDigest.getLength(), "Can't detect password correctness without digest!\n" );
|
||||
if ( rData->m_aDigest.getLength() && !hasValidPassword ( rEntry, rData ) )
|
||||
throw packages::WrongPasswordException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw packages::WrongPasswordException(THROW_WHERE );
|
||||
}
|
||||
else
|
||||
bNeedRawStream = ( rEntry.nMethod == STORED );
|
||||
@ -626,7 +620,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream(
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
if ( !rData.is() )
|
||||
throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
|
||||
throw packages::NoEncryptionException(THROW_WHERE );
|
||||
|
||||
if ( rEntry.nOffset <= 0 )
|
||||
readLOC( rEntry );
|
||||
@ -647,7 +641,7 @@ bool ZipFile::readLOC( ZipEntry &rEntry )
|
||||
aGrabber >> nTestSig;
|
||||
|
||||
if (nTestSig != LOCSIG)
|
||||
throw ZipIOException("Invalid LOC header (bad signature)", uno::Reference < XInterface > () );
|
||||
throw ZipIOException("Invalid LOC header (bad signature)" );
|
||||
aGrabber >> nVersion;
|
||||
aGrabber >> nFlag;
|
||||
aGrabber >> nHow;
|
||||
@ -701,8 +695,7 @@ bool ZipFile::readLOC( ZipEntry &rEntry )
|
||||
}
|
||||
|
||||
if ( bBroken && !bRecoveryMode )
|
||||
throw ZipIOException("The stream seems to be broken!",
|
||||
uno::Reference< XInterface >() );
|
||||
throw ZipIOException("The stream seems to be broken!" );
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -736,17 +729,17 @@ sal_Int32 ZipFile::findEND( )
|
||||
}
|
||||
catch ( IllegalArgumentException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
catch ( NotConnectedException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
catch ( BufferSizeExceededException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
|
||||
sal_Int32 ZipFile::readCEN()
|
||||
@ -767,25 +760,25 @@ sal_Int32 ZipFile::readCEN()
|
||||
aGrabber >> nCenOff;
|
||||
|
||||
if ( nTotal * CENHDR > nCenLen )
|
||||
throw ZipException("invalid END header (bad entry count)", uno::Reference < XInterface > () );
|
||||
throw ZipException("invalid END header (bad entry count)" );
|
||||
|
||||
if ( nTotal > ZIP_MAXENTRIES )
|
||||
throw ZipException("too many entries in ZIP File", uno::Reference < XInterface > () );
|
||||
throw ZipException("too many entries in ZIP File" );
|
||||
|
||||
if ( nCenLen < 0 || nCenLen > nEndPos )
|
||||
throw ZipException("Invalid END header (bad central directory size)", uno::Reference < XInterface > () );
|
||||
throw ZipException("Invalid END header (bad central directory size)" );
|
||||
|
||||
nCenPos = nEndPos - nCenLen;
|
||||
|
||||
if ( nCenOff < 0 || nCenOff > nCenPos )
|
||||
throw ZipException("Invalid END header (bad central directory size)", uno::Reference < XInterface > () );
|
||||
throw ZipException("Invalid END header (bad central directory size)" );
|
||||
|
||||
nLocPos = nCenPos - nCenOff;
|
||||
aGrabber.seek( nCenPos );
|
||||
Sequence < sal_Int8 > aCENBuffer ( nCenLen );
|
||||
sal_Int64 nRead = aGrabber.readBytes ( aCENBuffer, nCenLen );
|
||||
if ( static_cast < sal_Int64 > ( nCenLen ) != nRead )
|
||||
throw ZipException ("Error reading CEN into memory buffer!", uno::Reference < XInterface > () );
|
||||
throw ZipException ("Error reading CEN into memory buffer!" );
|
||||
|
||||
MemoryByteGrabber aMemGrabber ( aCENBuffer );
|
||||
|
||||
@ -797,19 +790,19 @@ sal_Int32 ZipFile::readCEN()
|
||||
{
|
||||
aMemGrabber >> nTestSig;
|
||||
if ( nTestSig != CENSIG )
|
||||
throw ZipException("Invalid CEN header (bad signature)", uno::Reference < XInterface > () );
|
||||
throw ZipException("Invalid CEN header (bad signature)" );
|
||||
|
||||
aMemGrabber.skipBytes ( 2 );
|
||||
aMemGrabber >> aEntry.nVersion;
|
||||
|
||||
if ( ( aEntry.nVersion & 1 ) == 1 )
|
||||
throw ZipException("Invalid CEN header (encrypted entry)", uno::Reference < XInterface > () );
|
||||
throw ZipException("Invalid CEN header (encrypted entry)" );
|
||||
|
||||
aMemGrabber >> aEntry.nFlag;
|
||||
aMemGrabber >> aEntry.nMethod;
|
||||
|
||||
if ( aEntry.nMethod != STORED && aEntry.nMethod != DEFLATED)
|
||||
throw ZipException("Invalid CEN header (bad compression method)", uno::Reference < XInterface > () );
|
||||
throw ZipException("Invalid CEN header (bad compression method)" );
|
||||
|
||||
aMemGrabber >> aEntry.nTime;
|
||||
aMemGrabber >> aEntry.nCrc;
|
||||
@ -828,7 +821,7 @@ sal_Int32 ZipFile::readCEN()
|
||||
if ( nSize == 0xffffffff ||
|
||||
nOffset == 0xffffffff ||
|
||||
nCompressedSize == 0xffffffff ) {
|
||||
throw ZipException("PK64 zip file entry", uno::Reference < XInterface > () );
|
||||
throw ZipException("PK64 zip file entry" );
|
||||
} else {
|
||||
aEntry.nCompressedSize = nCompressedSize;
|
||||
aEntry.nSize = nSize;
|
||||
@ -839,13 +832,13 @@ sal_Int32 ZipFile::readCEN()
|
||||
aEntry.nOffset *= -1;
|
||||
|
||||
if ( aEntry.nPathLen < 0 )
|
||||
throw ZipException("unexpected name length", uno::Reference < XInterface > () );
|
||||
throw ZipException("unexpected name length" );
|
||||
|
||||
if ( nCommentLen < 0 )
|
||||
throw ZipException("unexpected comment length", uno::Reference < XInterface > () );
|
||||
throw ZipException("unexpected comment length" );
|
||||
|
||||
if ( aEntry.nExtraLen < 0 )
|
||||
throw ZipException("unexpected extra header info length", uno::Reference < XInterface > () );
|
||||
throw ZipException("unexpected extra header info length" );
|
||||
|
||||
// read always in UTF8, some tools seem not to set UTF8 bit
|
||||
aEntry.sPath = OUString::intern ( (sal_Char *) aMemGrabber.getCurrentPos(),
|
||||
@ -853,14 +846,14 @@ sal_Int32 ZipFile::readCEN()
|
||||
RTL_TEXTENCODING_UTF8 );
|
||||
|
||||
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aEntry.sPath, true ) )
|
||||
throw ZipException("Zip entry has an invalid name.", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip entry has an invalid name." );
|
||||
|
||||
aMemGrabber.skipBytes( aEntry.nPathLen + aEntry.nExtraLen + nCommentLen );
|
||||
aEntries[aEntry.sPath] = aEntry;
|
||||
}
|
||||
|
||||
if (nCount != nTotal)
|
||||
throw ZipException("Count != Total", uno::Reference < XInterface > () );
|
||||
throw ZipException("Count != Total" );
|
||||
}
|
||||
catch ( IllegalArgumentException & )
|
||||
{
|
||||
@ -924,7 +917,7 @@ sal_Int32 ZipFile::recover()
|
||||
// FIXME64: need to read the 64bit header instead
|
||||
if ( nSize == 0xffffffff ||
|
||||
nCompressedSize == 0xffffffff ) {
|
||||
throw ZipException("PK64 zip file entry", uno::Reference < XInterface > () );
|
||||
throw ZipException("PK64 zip file entry" );
|
||||
} else {
|
||||
aEntry.nCompressedSize = nCompressedSize;
|
||||
aEntry.nSize = nSize;
|
||||
@ -1040,15 +1033,15 @@ sal_Int32 ZipFile::recover()
|
||||
}
|
||||
catch ( IllegalArgumentException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
catch ( NotConnectedException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
catch ( BufferSizeExceededException& )
|
||||
{
|
||||
throw ZipException("Zip END signature not found!", uno::Reference < XInterface > () );
|
||||
throw ZipException("Zip END signature not found!" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry )
|
||||
throw(IOException, RuntimeException)
|
||||
{
|
||||
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) )
|
||||
throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
|
||||
throw IOException("Unexpected character is used in file name." );
|
||||
|
||||
OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
|
||||
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
|
||||
@ -359,8 +359,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry )
|
||||
// FIXME64: need to append a ZIP64 header instead of throwing
|
||||
// We're about to silently lose people's data - which they are
|
||||
// unlikely to appreciate so fail instead:
|
||||
throw IOException( "File contains streams that are too large.",
|
||||
uno::Reference< XInterface >() );
|
||||
throw IOException( "File contains streams that are too large." );
|
||||
}
|
||||
|
||||
Sequence < sal_Int8 > aSequence( (sal_Int8*)sUTF8Name.getStr(), sUTF8Name.getLength() );
|
||||
@ -381,8 +380,7 @@ void ZipOutputStream::writeEXT( const ZipEntry &rEntry )
|
||||
// FIXME64: need to append a ZIP64 header instead of throwing
|
||||
// We're about to silently lose people's data - which they are
|
||||
// unlikely to appreciate so fail instead:
|
||||
throw IOException( "File contains streams that are too large.",
|
||||
uno::Reference< XInterface >() );
|
||||
throw IOException( "File contains streams that are too large." );
|
||||
}
|
||||
}
|
||||
|
||||
@ -390,7 +388,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry )
|
||||
throw(IOException, RuntimeException)
|
||||
{
|
||||
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) )
|
||||
throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
|
||||
throw IOException("Unexpected character is used in file name." );
|
||||
|
||||
OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
|
||||
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
|
||||
@ -435,8 +433,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry )
|
||||
// FIXME64: need to append a ZIP64 header instead of throwing
|
||||
// We're about to silently lose people's data - which they are
|
||||
// unlikely to appreciate so fail instead:
|
||||
throw IOException( "File contains streams that are too large.",
|
||||
uno::Reference< XInterface >() );
|
||||
throw IOException( "File contains streams that are too large." );
|
||||
}
|
||||
|
||||
Sequence < sal_Int8 > aSequence( (sal_Int8*)sUTF8Name.getStr(), sUTF8Name.getLength() );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user