cleanup whitespaces due to RTL_CONSTASCII_USTRINGPARAM removal
In e2e2cc6114
the method was removed
automatically leaving several line breaks etc. as visual noise.
This commit is contained in:
@@ -78,8 +78,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
|
||||
case STATE_NAME0:
|
||||
if (bEnd || !isAlphanum(c))
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains bad descriptor name"));
|
||||
rtl::OUString("UNO URL contains bad descriptor name"));
|
||||
nStart = i;
|
||||
eState = STATE_NAME;
|
||||
break;
|
||||
@@ -93,15 +92,13 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
|
||||
}
|
||||
else if (!isAlphanum(c))
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains bad descriptor name"));
|
||||
rtl::OUString("UNO URL contains bad descriptor name"));
|
||||
break;
|
||||
|
||||
case STATE_KEY0:
|
||||
if (bEnd || !isAlphanum(c))
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains bad parameter key"));
|
||||
rtl::OUString("UNO URL contains bad parameter key"));
|
||||
nStart = i;
|
||||
eState = STATE_KEY;
|
||||
break;
|
||||
@@ -115,8 +112,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
|
||||
}
|
||||
else if (bEnd || !isAlphanum(c))
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains bad parameter key"));
|
||||
rtl::OUString("UNO URL contains bad parameter key"));
|
||||
break;
|
||||
|
||||
case STATE_VALUE:
|
||||
@@ -130,8 +126,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
|
||||
rtl_UriDecodeWithCharset,
|
||||
RTL_TEXTENCODING_UTF8))).second)
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains duplicated parameter"));
|
||||
rtl::OUString("UNO URL contains duplicated parameter"));
|
||||
eState = STATE_KEY0;
|
||||
}
|
||||
break;
|
||||
@@ -216,14 +211,12 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
|
||||
{
|
||||
if (!rUrl.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("uno:"), 0))
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL does not start with \"uno:\""));
|
||||
rtl::OUString("UNO URL does not start with \"uno:\""));
|
||||
sal_Int32 i = RTL_CONSTASCII_LENGTH("uno:");
|
||||
sal_Int32 j = rUrl.indexOf(';', i);
|
||||
if (j < 0)
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL has too few semicolons"));
|
||||
rtl::OUString("UNO URL has too few semicolons"));
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
std::auto_ptr< UnoUrlDescriptor::Impl >
|
||||
xConnection(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i)));
|
||||
@@ -232,8 +225,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
|
||||
j = rUrl.indexOf(0x3B, i); // ';'
|
||||
if (j < 0)
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL has too few semicolons"));
|
||||
rtl::OUString("UNO URL has too few semicolons"));
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
std::auto_ptr< UnoUrlDescriptor::Impl >
|
||||
xProtocol(new UnoUrlDescriptor::Impl(rUrl.copy(i, j - i)));
|
||||
@@ -241,8 +233,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
|
||||
i = j + 1;
|
||||
if (i == rUrl.getLength())
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains empty ObjectName"));
|
||||
rtl::OUString("UNO URL contains empty ObjectName"));
|
||||
for (j = i; j < rUrl.getLength(); ++j)
|
||||
{
|
||||
sal_Unicode c = rUrl.getStr()[j];
|
||||
@@ -254,8 +245,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
|
||||
&& c != 0x3F && c != 0x40 && c != 0x5F // '?', '@', '_'
|
||||
&& c != 0x7E) // '~'
|
||||
throw rtl::MalformedUriException(
|
||||
rtl::OUString(
|
||||
"UNO URL contains invalid ObjectName"));
|
||||
rtl::OUString("UNO URL contains invalid ObjectName"));
|
||||
}
|
||||
return new Impl(xConnection, xProtocol, rUrl.copy(i));
|
||||
}
|
||||
|
@@ -535,14 +535,11 @@ SAL_IMPLEMENT_MAIN()
|
||||
if (! aUnoUrl.endsWithIgnoreAsciiCaseAsciiL(
|
||||
RTL_CONSTASCII_STRINGPARAM(";uno.ComponentContext") ))
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"expected UNO-URL with instance name "
|
||||
"uno.ComponentContext!" ),
|
||||
OUString("expected UNO-URL with instance name uno.ComponentContext!" ),
|
||||
Reference<XInterface>() );
|
||||
if (bSingleInstance)
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected option --singleinstance!"),
|
||||
OUString("unexpected option --singleinstance!"),
|
||||
Reference<XInterface>() );
|
||||
}
|
||||
if (!aImplName.isEmpty() && aLocation.isEmpty())
|
||||
|
@@ -77,8 +77,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith
|
||||
OUString( "UnoVirtualMachine" ),
|
||||
css::uno::makeAny( handle ) ) ) );
|
||||
return xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
|
||||
OUString(
|
||||
"com.sun.star.java.JavaVirtualMachine"),
|
||||
OUString("com.sun.star.java.JavaVirtualMachine"),
|
||||
css::uno::Sequence< css::uno::Any >( &arg, 1 ), xContext );
|
||||
}
|
||||
|
||||
@@ -87,8 +86,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith
|
||||
throw (css::uno::Exception)
|
||||
{
|
||||
return xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
|
||||
OUString(
|
||||
"com.sun.star.java.JavaVirtualMachine"),
|
||||
OUString("com.sun.star.java.JavaVirtualMachine"),
|
||||
args, xContext );
|
||||
}
|
||||
|
||||
@@ -108,9 +106,7 @@ namespace javaunohelper {
|
||||
loader );
|
||||
} catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"jmvaccess::UnoVirtualMachine::CreationException"
|
||||
" occurred" ),
|
||||
OUString("jmvaccess::UnoVirtualMachine::CreationException occurred" ),
|
||||
css::uno::Reference< css::uno::XInterface >() );
|
||||
}
|
||||
}
|
||||
@@ -121,8 +117,7 @@ css::uno::Reference< css::uno::XComponentContext > install_vm_singleton(
|
||||
{
|
||||
css::uno::Reference< css::lang::XSingleComponentFactory > xFac( new SingletonFactory( vm_access ) );
|
||||
::cppu::ContextEntry_Init entry(
|
||||
OUString(
|
||||
"/singletons/com.sun.star.java.theJavaVirtualMachine"),
|
||||
OUString("/singletons/com.sun.star.java.theJavaVirtualMachine"),
|
||||
css::uno::makeAny( xFac ), true );
|
||||
return ::cppu::createComponentContext( &entry, 1, xContext );
|
||||
}
|
||||
|
@@ -322,9 +322,7 @@ OUString VendorSettings::getPluginLibrary(const OUString& sVendor)
|
||||
|
||||
for (sal_Int32 i = 1; ; i++)
|
||||
{
|
||||
OUString sName =
|
||||
OUString(UNO_JAVA_JFW_PARAMETER) +
|
||||
OUString::valueOf(i);
|
||||
OUString sName = OUString(UNO_JAVA_JFW_PARAMETER) + OUString::valueOf(i);
|
||||
OUString sValue;
|
||||
if (Bootstrap::get()->getFrom(sName, sValue) == sal_True)
|
||||
{
|
||||
@@ -361,8 +359,7 @@ OString BootParams::getClasspath()
|
||||
OUString(UNO_JAVA_JFW_CLASSPATH),
|
||||
sCP) == sal_True)
|
||||
{
|
||||
sClassPath = OUStringToOString(
|
||||
sCP, osl_getThreadTextEncoding());
|
||||
sClassPath = OUStringToOString(sCP, osl_getThreadTextEncoding());
|
||||
#if OSL_DEBUG_LEVEL >=2
|
||||
fprintf(stderr,"[Java framework] Using bootstrap parameter "
|
||||
UNO_JAVA_JFW_CLASSPATH " = %s.\n", sClassPath.getStr());
|
||||
@@ -517,20 +514,16 @@ JFW_MODE getMode()
|
||||
bool bDirectMode = true;
|
||||
OUString sValue;
|
||||
const rtl::Bootstrap * aBoot = Bootstrap::get();
|
||||
OUString sJREHome(
|
||||
UNO_JAVA_JFW_JREHOME);
|
||||
OUString sJREHome(UNO_JAVA_JFW_JREHOME);
|
||||
if (aBoot->getFrom(sJREHome, sValue) == sal_False)
|
||||
{
|
||||
OUString sEnvJRE(
|
||||
UNO_JAVA_JFW_ENV_JREHOME);
|
||||
OUString sEnvJRE(UNO_JAVA_JFW_ENV_JREHOME);
|
||||
if (aBoot->getFrom(sEnvJRE, sValue) == sal_False)
|
||||
{
|
||||
OUString sClasspath(
|
||||
UNO_JAVA_JFW_CLASSPATH);
|
||||
OUString sClasspath(UNO_JAVA_JFW_CLASSPATH);
|
||||
if (aBoot->getFrom(sClasspath, sValue) == sal_False)
|
||||
{
|
||||
OUString sEnvClasspath(
|
||||
UNO_JAVA_JFW_ENV_CLASSPATH);
|
||||
OUString sEnvClasspath(UNO_JAVA_JFW_ENV_CLASSPATH);
|
||||
if (aBoot->getFrom(sEnvClasspath, sValue) == sal_False)
|
||||
{
|
||||
OUString sParams = OUString(
|
||||
|
@@ -336,20 +336,16 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
|
||||
uno::Any aAny;
|
||||
|
||||
aAny <<= xConnection;
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_ACTIVECONNECTION), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_ACTIVECONNECTION), aAny );
|
||||
|
||||
aAny <<= nType;
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_COMMANDTYPE), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_COMMANDTYPE), aAny );
|
||||
|
||||
aAny <<= OUString( aTabName );
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_COMMAND), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_COMMAND), aAny );
|
||||
|
||||
aAny <<= false;
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_PROPCHANGE_NOTIFY), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_PROPCHANGE_NOTIFY), aAny );
|
||||
|
||||
xRowSet->execute();
|
||||
|
||||
@@ -934,16 +930,13 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, CharSet eCharS
|
||||
if (!xRowProp.is()) return SCERR_EXPORT_CONNECT;
|
||||
|
||||
aAny <<= xConnection;
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_ACTIVECONNECTION), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_ACTIVECONNECTION), aAny );
|
||||
|
||||
aAny <<= (sal_Int32) sdb::CommandType::TABLE;
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_COMMANDTYPE), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_COMMANDTYPE), aAny );
|
||||
|
||||
aAny <<= OUString( aTabName );
|
||||
xRowProp->setPropertyValue(
|
||||
OUString(SC_DBPROP_COMMAND), aAny );
|
||||
xRowProp->setPropertyValue( OUString(SC_DBPROP_COMMAND), aAny );
|
||||
|
||||
xRowSet->execute();
|
||||
|
||||
|
@@ -54,11 +54,9 @@ private:
|
||||
ScriptingConstantsPool& operator = ( const ScriptingConstantsPool & );
|
||||
ScriptingConstantsPool()
|
||||
: DOC_REF( "SCRIPTING_DOC_REF" ),
|
||||
DOC_STORAGE_ID(
|
||||
"SCRIPTING_DOC_STORAGE_ID" ),
|
||||
DOC_STORAGE_ID( "SCRIPTING_DOC_STORAGE_ID" ),
|
||||
DOC_URI( "SCRIPTING_DOC_URI" ),
|
||||
RESOLVED_STORAGE_ID(
|
||||
"SCRIPTING_RESOLVED_STORAGE_ID" ),
|
||||
RESOLVED_STORAGE_ID( "SCRIPTING_RESOLVED_STORAGE_ID" ),
|
||||
SCRIPT_INFO( "SCRIPT_INFO" ),
|
||||
SCRIPTSTORAGEMANAGER_SERVICE(
|
||||
"/singletons/com.sun.star.script.framework.storage.theScriptStorageManager" ),
|
||||
|
@@ -201,8 +201,7 @@ bool SingletonFactory::m_bDisposed = false;
|
||||
|
||||
OUString serviceGetImplementationName()
|
||||
{
|
||||
return OUString(
|
||||
"com.sun.star.comp.stoc.JavaVirtualMachine");
|
||||
return OUString("com.sun.star.comp.stoc.JavaVirtualMachine");
|
||||
}
|
||||
|
||||
css::uno::Sequence< OUString > serviceGetSupportedServiceNames()
|
||||
@@ -257,8 +256,7 @@ bool askForRetry(css::uno::Any const & rException)
|
||||
if (xContext.is())
|
||||
{
|
||||
css::uno::Reference< css::task::XInteractionHandler > xHandler;
|
||||
xContext->getValueByName(OUString(
|
||||
"java-vm.interaction-handler"))
|
||||
xContext->getValueByName(OUString("java-vm.interaction-handler"))
|
||||
>>= xHandler;
|
||||
if (xHandler.is())
|
||||
{
|
||||
@@ -369,8 +367,7 @@ void getDefaultLocaleFromConfig(
|
||||
{
|
||||
css::uno::Reference<css::uno::XInterface> xConfRegistry =
|
||||
xSMgr->createInstanceWithContext(
|
||||
OUString(
|
||||
"com.sun.star.configuration.ConfigurationRegistry"), xCtx );
|
||||
OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx );
|
||||
if(!xConfRegistry.is())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0);
|
||||
@@ -424,8 +421,7 @@ void getJavaPropsFromSafetySettings(
|
||||
{
|
||||
css::uno::Reference<css::uno::XInterface> xConfRegistry =
|
||||
xSMgr->createInstanceWithContext(
|
||||
OUString(
|
||||
"com.sun.star.configuration.ConfigurationRegistry"),
|
||||
OUString("com.sun.star.configuration.ConfigurationRegistry"),
|
||||
xCtx);
|
||||
if(!xConfRegistry.is())
|
||||
throw css::uno::RuntimeException(
|
||||
@@ -598,8 +594,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const &
|
||||
OUString(), static_cast< cppu::OWeakObject * >(this));
|
||||
if (m_xUnoVirtualMachine.is())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"bad call to initialize"),
|
||||
OUString("bad call to initialize"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
css::beans::NamedValue val;
|
||||
if (rArguments.getLength() == 1 && (rArguments[0] >>= val) && val.Name == "UnoVirtualMachine" )
|
||||
@@ -627,16 +622,14 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const &
|
||||
m_xUnoVirtualMachine = new jvmaccess::UnoVirtualMachine(vm, 0);
|
||||
} catch (jvmaccess::UnoVirtualMachine::CreationException &) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"jvmaccess::UnoVirtualMachine::CreationException"),
|
||||
OUString("jvmaccess::UnoVirtualMachine::CreationException"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!m_xUnoVirtualMachine.is()) {
|
||||
throw css::lang::IllegalArgumentException(
|
||||
OUString(
|
||||
"sequence of exactly one any containing either (a) a"
|
||||
OUString("sequence of exactly one any containing either (a) a"
|
||||
" com.sun.star.beans.NamedValue with Name"
|
||||
" \"UnoVirtualMachine\" and Value a hyper representing a"
|
||||
" non-null pointer to a jvmaccess:UnoVirtualMachine, or (b)"
|
||||
@@ -785,8 +778,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task.
|
||||
//Please install a JRE and restart %PRODUCTNAME.
|
||||
css::java::JavaNotFoundException exc(
|
||||
OUString(
|
||||
"JavaVirtualMachine::getJavaVM failed because"
|
||||
OUString("JavaVirtualMachine::getJavaVM failed because"
|
||||
" No suitable JRE found!"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
askForRetry(css::uno::makeAny(exc));
|
||||
@@ -796,8 +788,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
{
|
||||
//An unexpected error occurred
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"[JavaVirtualMachine]:An unexpected error occurred"
|
||||
OUString("[JavaVirtualMachine]:An unexpected error occurred"
|
||||
" while searching for a Java!"), 0);
|
||||
}
|
||||
}
|
||||
@@ -808,8 +799,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
// - Options - %PRODUCTNAME - Java, select the Java runtime environment
|
||||
// you want to have used by %PRODUCTNAME.
|
||||
css::java::InvalidJavaSettingsException exc(
|
||||
OUString(
|
||||
"JavaVirtualMachine::getJavaVM failed because"
|
||||
OUString("JavaVirtualMachine::getJavaVM failed because"
|
||||
" Java settings have changed!"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
askForRetry(css::uno::makeAny(exc));
|
||||
@@ -822,9 +812,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//this task. However, use of a JRE has been disabled. Do you want to
|
||||
//enable the use of a JRE now?
|
||||
css::java::JavaDisabledException exc(
|
||||
OUString(
|
||||
"JavaVirtualMachine::getJavaVM failed because"
|
||||
" Java is disabled!"),
|
||||
OUString("JavaVirtualMachine::getJavaVM failed because Java is disabled!"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
if( ! askForRetry(css::uno::makeAny(exc)))
|
||||
return css::uno::Any();
|
||||
@@ -863,9 +851,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//is defective. Please select another version or install a new JRE
|
||||
//and select it under Tools - Options - %PRODUCTNAME - Java.
|
||||
css::java::JavaVMCreationFailureException exc(
|
||||
OUString(
|
||||
"JavaVirtualMachine::getJavaVM failed because"
|
||||
" Java is defective!"),
|
||||
OUString("JavaVirtualMachine::getJavaVM failed because Java is defective!"),
|
||||
static_cast< cppu::OWeakObject * >(this), 0);
|
||||
askForRetry(css::uno::makeAny(exc));
|
||||
return css::uno::Any();
|
||||
@@ -882,8 +868,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//For the selected Java runtime environment to work properly,
|
||||
//%PRODUCTNAME must be restarted. Please restart %PRODUCTNAME now.
|
||||
css::java::RestartRequiredException exc(
|
||||
OUString(
|
||||
"JavaVirtualMachine::getJavaVM failed because"
|
||||
OUString("JavaVirtualMachine::getJavaVM failed because "
|
||||
"Office must be restarted before Java can be used!"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
askForRetry(css::uno::makeAny(exc));
|
||||
@@ -893,8 +878,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
//RuntimeException: error is somewhere in the java framework.
|
||||
//An unexpected error occurred
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"[JavaVirtualMachine]:An unexpected error occurred"
|
||||
OUString("[JavaVirtualMachine]:An unexpected error occurred"
|
||||
" while starting Java!"), 0);
|
||||
}
|
||||
|
||||
@@ -922,9 +906,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
setUpUnoVirtualMachine(guard.getEnvironment());
|
||||
} catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"jvmaccess::VirtualMachine::AttachGuard::"
|
||||
"CreationException occurred"),
|
||||
OUString("jvmaccess::VirtualMachine::AttachGuard::CreationException occurred"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
}
|
||||
@@ -932,8 +914,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
|
||||
default: // RETURN_JAVAVM
|
||||
if (m_pJavaVm == 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"JavaVirtualMachine service was initialized in a way"
|
||||
OUString("JavaVirtualMachine service was initialized in a way"
|
||||
" that the requested JavaVM pointer is not available"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
@@ -1002,9 +983,7 @@ void SAL_CALL JavaVirtualMachine::registerThread()
|
||||
OUString(), static_cast< cppu::OWeakObject * >(this));
|
||||
if (!m_xUnoVirtualMachine.is())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"JavaVirtualMachine::registerThread:"
|
||||
" null VirtualMachine"),
|
||||
OUString("JavaVirtualMachine::registerThread: null VirtualMachine"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
GuardStack * pStack
|
||||
= static_cast< GuardStack * >(m_aAttachGuards.getData());
|
||||
@@ -1022,8 +1001,7 @@ void SAL_CALL JavaVirtualMachine::registerThread()
|
||||
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"JavaVirtualMachine::registerThread: jvmaccess::"
|
||||
OUString("JavaVirtualMachine::registerThread: jvmaccess::"
|
||||
"VirtualMachine::AttachGuard::CreationException"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
@@ -1038,17 +1016,13 @@ void SAL_CALL JavaVirtualMachine::revokeThread()
|
||||
OUString(), static_cast< cppu::OWeakObject * >(this));
|
||||
if (!m_xUnoVirtualMachine.is())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"JavaVirtualMachine::revokeThread:"
|
||||
" null VirtualMachine"),
|
||||
OUString("JavaVirtualMachine::revokeThread: null VirtualMachine"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
GuardStack * pStack
|
||||
= static_cast< GuardStack * >(m_aAttachGuards.getData());
|
||||
if (pStack == 0 || pStack->empty())
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"JavaVirtualMachine::revokeThread:"
|
||||
" no matching registerThread"),
|
||||
OUString("JavaVirtualMachine::revokeThread: no matching registerThread"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
delete pStack->top();
|
||||
pStack->pop();
|
||||
@@ -1106,74 +1080,62 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
}
|
||||
else if ( aAccessor == "ooInetHTTPProxyName" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"http.proxyHost");
|
||||
aPropertyName = OUString("http.proxyHost");
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
}
|
||||
else if ( aAccessor == "ooInetHTTPProxyPort" )
|
||||
{
|
||||
aPropertyName
|
||||
= OUString("http.proxyPort");
|
||||
aPropertyName = OUString("http.proxyPort");
|
||||
sal_Int32 n = 0;
|
||||
rEvent.Element >>= n;
|
||||
aPropertyValue = OUString::valueOf(n);
|
||||
}
|
||||
else if ( aAccessor == "ooInetHTTPSProxyName" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"https.proxyHost");
|
||||
aPropertyName = OUString("https.proxyHost");
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
}
|
||||
else if ( aAccessor == "ooInetHTTPSProxyPort" )
|
||||
{
|
||||
aPropertyName
|
||||
= OUString("https.proxyPort");
|
||||
aPropertyName = OUString("https.proxyPort");
|
||||
sal_Int32 n = 0;
|
||||
rEvent.Element >>= n;
|
||||
aPropertyValue = OUString::valueOf(n);
|
||||
}
|
||||
else if ( aAccessor == "ooInetFTPProxyName" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"ftp.proxyHost");
|
||||
aPropertyName = OUString("ftp.proxyHost");
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
}
|
||||
else if ( aAccessor == "ooInetFTPProxyPort" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"ftp.proxyPort");
|
||||
aPropertyName = OUString("ftp.proxyPort");
|
||||
sal_Int32 n = 0;
|
||||
rEvent.Element >>= n;
|
||||
aPropertyValue = OUString::valueOf(n);
|
||||
}
|
||||
else if ( aAccessor == "ooInetNoProxy" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"http.nonProxyHosts");
|
||||
aPropertyName2 = OUString(
|
||||
"ftp.nonProxyHosts");
|
||||
aPropertyName = OUString("http.nonProxyHosts");
|
||||
aPropertyName2 = OUString("ftp.nonProxyHosts");
|
||||
rEvent.Element >>= aPropertyValue;
|
||||
aPropertyValue = aPropertyValue.replace(';', '|');
|
||||
}
|
||||
else if ( aAccessor == "NetAccess" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"appletviewer.security.mode");
|
||||
aPropertyName = OUString("appletviewer.security.mode");
|
||||
sal_Int32 n = 0;
|
||||
if (rEvent.Element >>= n)
|
||||
switch (n)
|
||||
{
|
||||
case 0:
|
||||
aPropertyValue = OUString(
|
||||
"host");
|
||||
aPropertyValue = OUString("host");
|
||||
break;
|
||||
case 1:
|
||||
aPropertyValue = OUString(
|
||||
"unrestricted");
|
||||
aPropertyValue = OUString("unrestricted");
|
||||
break;
|
||||
case 3:
|
||||
aPropertyValue = OUString(
|
||||
"none");
|
||||
aPropertyValue = OUString("none");
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -1182,16 +1144,13 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
}
|
||||
else if ( aAccessor == "Security" )
|
||||
{
|
||||
aPropertyName = OUString(
|
||||
"stardiv.security.disableSecurity");
|
||||
aPropertyName = OUString("stardiv.security.disableSecurity");
|
||||
sal_Bool b = sal_Bool();
|
||||
if (rEvent.Element >>= b)
|
||||
if (b)
|
||||
aPropertyValue = OUString(
|
||||
"false");
|
||||
aPropertyValue = OUString("false");
|
||||
else
|
||||
aPropertyValue = OUString(
|
||||
"true");
|
||||
aPropertyValue = OUString("true");
|
||||
else
|
||||
return;
|
||||
bSecurityChanged = true;
|
||||
@@ -1320,9 +1279,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
|
||||
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"jvmaccess::VirtualMachine::AttachGuard::"
|
||||
"CreationException"),
|
||||
OUString("jvmaccess::VirtualMachine::AttachGuard::CreationException"),
|
||||
0);
|
||||
}
|
||||
}
|
||||
@@ -1404,8 +1361,7 @@ void JavaVirtualMachine::registerConfigChangesListener()
|
||||
m_xInetConfiguration
|
||||
= css::uno::Reference< css::container::XContainer >(
|
||||
xConfigProvider->createInstanceWithArguments(
|
||||
OUString(
|
||||
"com.sun.star.configuration.ConfigurationAccess"),
|
||||
OUString("com.sun.star.configuration.ConfigurationAccess"),
|
||||
aArguments),
|
||||
css::uno::UNO_QUERY);
|
||||
|
||||
@@ -1429,8 +1385,7 @@ void JavaVirtualMachine::registerConfigChangesListener()
|
||||
m_xJavaConfiguration
|
||||
= css::uno::Reference< css::container::XContainer >(
|
||||
xConfigProvider->createInstanceWithArguments(
|
||||
OUString(
|
||||
"com.sun.star.configuration.ConfigurationAccess"),
|
||||
OUString("com.sun.star.configuration.ConfigurationAccess"),
|
||||
aArguments2),
|
||||
css::uno::UNO_QUERY);
|
||||
|
||||
@@ -1589,8 +1544,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) {
|
||||
OUString("$URE_INTERNAL_JAVA_DIR/"));
|
||||
} catch (css::lang::IllegalArgumentException &) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"com::sun::star::lang::IllegalArgumentException"),
|
||||
OUString("com::sun::star::lang::IllegalArgumentException"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
OUString classPath;
|
||||
@@ -1691,8 +1645,7 @@ void JavaVirtualMachine::setUpUnoVirtualMachine(JNIEnv * environment) {
|
||||
m_xVirtualMachine, cl2);
|
||||
} catch (jvmaccess::UnoVirtualMachine::CreationException &) {
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"jvmaccess::UnoVirtualMachine::CreationException"),
|
||||
OUString("jvmaccess::UnoVirtualMachine::CreationException"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
}
|
||||
|
@@ -337,8 +337,7 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) {
|
||||
|| reader.getMethodExceptionCount(i) != 0)))
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service has bad constructors"),
|
||||
OUString("Service has bad constructors"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
(*ctors)[i] = new Constructor(
|
||||
@@ -364,8 +363,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
sal_uInt16 superTypes = aReader.getSuperTypeCount();
|
||||
if (superTypes > 1) {
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service has more than one supertype"),
|
||||
OUString("Service has more than one supertype"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (superTypes == 1) {
|
||||
@@ -373,8 +371,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
if ( aReader.getReferenceCount() != 0
|
||||
|| aReader.getFieldCount() != 0 )
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service is single-interface--based but also has"
|
||||
OUString("Service is single-interface--based but also has"
|
||||
" references and/or properties" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
Reference< XTypeDescription > ifc;
|
||||
@@ -385,16 +382,14 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
catch ( NoSuchElementException const & e )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"com.sun.star.container.NoSuchElementException: " )
|
||||
OUString("com.sun.star.container.NoSuchElementException: " )
|
||||
+ e.Message,
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
}
|
||||
OSL_ASSERT(ifc.is());
|
||||
if (resolveTypedefs(ifc)->getTypeClass() != TypeClass_INTERFACE) {
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Single-interface--based service is not based on"
|
||||
OUString("Single-interface--based service is not based on"
|
||||
" interface type" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
}
|
||||
@@ -437,9 +432,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
catch ( NoSuchElementException const & e )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"com.sun.star.container."
|
||||
"NoSuchElementException: " )
|
||||
OUString("com.sun.star.container.NoSuchElementException: " )
|
||||
+ e.Message,
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
}
|
||||
@@ -450,8 +443,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
// optional service
|
||||
if ( !( aTypeDesc >>= aOptionalServices[ nOS ] ) )
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service 'export' is not a service" ),
|
||||
OUString("Service 'export' is not a service" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
nOS++;
|
||||
}
|
||||
@@ -460,8 +452,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
// mandatory service
|
||||
if ( !( aTypeDesc >>= aMandatoryServices[ nMS ] ) )
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service 'export' is not a service" ),
|
||||
OUString("Service 'export' is not a service" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
nMS++;
|
||||
}
|
||||
@@ -479,9 +470,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
catch ( NoSuchElementException const & e )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"com.sun.star.container."
|
||||
"NoSuchElementException: " )
|
||||
OUString("com.sun.star.container.NoSuchElementException: " )
|
||||
+ e.Message,
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
}
|
||||
@@ -492,8 +481,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
// optional interface
|
||||
if ( !( aTypeDesc >>= aOptionalInterfaces[ nOI ] ) )
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service 'supports' is not an"
|
||||
OUString("Service 'supports' is not an"
|
||||
" interface" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
nOI++;
|
||||
@@ -503,8 +491,7 @@ void ServiceTypeDescriptionImpl::getReferences()
|
||||
// mandatory interface
|
||||
if ( !( aTypeDesc >>= aMandatoryInterfaces[ nMI ] ) )
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"Service 'supports' is not an"
|
||||
OUString("Service 'supports' is not an"
|
||||
" interface" ),
|
||||
static_cast< OWeakObject * >( this ) );
|
||||
nMI++;
|
||||
|
@@ -230,14 +230,12 @@ private:
|
||||
virtual void SAL_CALL deleteLink(OUString const & rLinkName) throw (
|
||||
css::registry::InvalidRegistryException, css::uno::RuntimeException);
|
||||
|
||||
virtual OUString SAL_CALL getLinkTarget(
|
||||
OUString const & rLinkName)
|
||||
virtual OUString SAL_CALL getLinkTarget(OUString const & rLinkName)
|
||||
throw (
|
||||
css::registry::InvalidRegistryException,
|
||||
css::uno::RuntimeException);
|
||||
|
||||
virtual OUString SAL_CALL getResolvedName(
|
||||
OUString const & aKeyName)
|
||||
virtual OUString SAL_CALL getResolvedName(OUString const & aKeyName)
|
||||
throw (
|
||||
css::registry::InvalidRegistryException,
|
||||
css::uno::RuntimeException);
|
||||
@@ -271,8 +269,7 @@ css::registry::RegistryKeyType Key::getKeyType(OUString const & rKeyName)
|
||||
RegError err = key_.getKeyType(rKeyName, &type);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getKeyType:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getKeyType:"
|
||||
" underlying RegistryKey::getKeyType() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -303,8 +300,7 @@ css::registry::RegistryValueType Key::getValueType()
|
||||
break;
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getValueType:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getValueType:"
|
||||
" underlying RegistryKey::getValueInfo() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -344,14 +340,12 @@ sal_Int32 Key::getLongValue() throw (
|
||||
break;
|
||||
case REG_INVALID_VALUE:
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLongValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getLongValue:"
|
||||
" underlying RegistryKey::getValue() = REG_INVALID_VALUE"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLongValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getLongValue:"
|
||||
" underlying RegistryKey::getValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -367,8 +361,7 @@ void Key::setLongValue(sal_Int32 value)
|
||||
OUString(), RG_VALUETYPE_LONG, &value, sizeof (sal_Int32));
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setLongValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key setLongValue:"
|
||||
" underlying RegistryKey::setValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -389,15 +382,13 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw (
|
||||
return css::uno::Sequence< sal_Int32 >();
|
||||
case REG_INVALID_VALUE:
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
" underlying RegistryKey::getLongListValue() ="
|
||||
" REG_INVALID_VALUE"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
" underlying RegistryKey::getLongListValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -405,8 +396,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw (
|
||||
sal_uInt32 n = list.getLength();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
|
||||
" underlying RegistryKey::getLongListValue() too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -430,8 +420,7 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue)
|
||||
static_cast< sal_uInt32 >(list.size()));
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setLongListValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key setLongListValue:"
|
||||
" underlying RegistryKey::setLongListValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -448,16 +437,14 @@ OUString Key::getAsciiValue() throw (
|
||||
RegError err = key_.getValueInfo(OUString(), &type, &size);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey::getValueInfo() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (type != RG_VALUETYPE_STRING) {
|
||||
throw css::registry::InvalidValueException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey type = ") +
|
||||
OUString::number(type)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -465,16 +452,14 @@ OUString Key::getAsciiValue() throw (
|
||||
// size contains terminating null (error in underlying registry.cxx):
|
||||
if (size == 0) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey size 0 cannot happen due to"
|
||||
" design error"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (size > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey size too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -482,16 +467,14 @@ OUString Key::getAsciiValue() throw (
|
||||
err = key_.getValue(OUString(), &list[0]);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey::getValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (list[size - 1] != '\0') {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey value must be null-terminated due"
|
||||
" to design error"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -505,8 +488,7 @@ OUString Key::getAsciiValue() throw (
|
||||
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
|
||||
" underlying RegistryKey not UTF-8"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -524,8 +506,7 @@ void Key::setAsciiValue(OUString const & value)
|
||||
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setAsciiValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key setAsciiValue:"
|
||||
" value not UTF-16"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -535,8 +516,7 @@ void Key::setAsciiValue(OUString const & value)
|
||||
// +1 for terminating null (error in underlying registry.cxx)
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setAsciiValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key setAsciiValue:"
|
||||
" underlying RegistryKey::setValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -557,15 +537,13 @@ css::uno::Sequence< OUString > Key::getAsciiListValue() throw (
|
||||
return css::uno::Sequence< OUString >();
|
||||
case REG_INVALID_VALUE:
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getAsciiListValue: underlying"
|
||||
" RegistryKey::getStringListValue() = REG_INVALID_VALUE"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getAsciiListValue: underlying"
|
||||
" RegistryKey::getStringListValue() = ") +
|
||||
OUString::number(err)),
|
||||
@@ -574,8 +552,7 @@ css::uno::Sequence< OUString > Key::getAsciiListValue() throw (
|
||||
sal_uInt32 n = list.getLength();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getAsciiListValue: underlying"
|
||||
" RegistryKey::getStringListValue() too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -592,8 +569,7 @@ css::uno::Sequence< OUString > Key::getAsciiListValue() throw (
|
||||
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getAsciiListValue: underlying RegistryKey not"
|
||||
" UTF-8"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -616,8 +592,7 @@ void Key::setAsciiListValue(
|
||||
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" setAsciiListValue: value not UTF-16"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -634,8 +609,7 @@ void Key::setAsciiListValue(
|
||||
static_cast< sal_uInt32 >(list2.size()));
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" setAsciiListValue: underlying"
|
||||
" RegistryKey::setStringListValue() = ") +
|
||||
OUString::number(err)),
|
||||
@@ -653,16 +627,14 @@ OUString Key::getStringValue() throw (
|
||||
RegError err = key_.getValueInfo(OUString(), &type, &size);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey::getValueInfo() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (type != RG_VALUETYPE_UNICODE) {
|
||||
throw css::registry::InvalidValueException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey type = ") +
|
||||
OUString::number(type)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -671,16 +643,14 @@ OUString Key::getStringValue() throw (
|
||||
// registry.cxx):
|
||||
if (size == 0 || (size & 1) == 1) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey size 0 or odd cannot happen due to"
|
||||
" design error"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (size > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey size too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -688,16 +658,14 @@ OUString Key::getStringValue() throw (
|
||||
err = key_.getValue(OUString(), &list[0]);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey::getValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (list[size/2 - 1] != 0) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
|
||||
" underlying RegistryKey value must be null-terminated due"
|
||||
" to design error"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -716,8 +684,7 @@ void Key::setStringValue(OUString const & value)
|
||||
// +1 for terminating null (error in underlying registry.cxx)
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setStringValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key setStringValue:"
|
||||
" underlying RegistryKey::setValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -738,15 +705,13 @@ css::uno::Sequence< OUString > Key::getStringListValue() throw (
|
||||
return css::uno::Sequence< OUString >();
|
||||
case REG_INVALID_VALUE:
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getStringListValue: underlying"
|
||||
" RegistryKey::getUnicodeListValue() = REG_INVALID_VALUE"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getStringListValue: underlying"
|
||||
" RegistryKey::getUnicodeListValue() = ") +
|
||||
OUString::number(err)),
|
||||
@@ -755,8 +720,7 @@ css::uno::Sequence< OUString > Key::getStringListValue() throw (
|
||||
sal_uInt32 n = list.getLength();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" getStringListValue: underlying"
|
||||
" RegistryKey::getUnicodeListValue() too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -782,8 +746,7 @@ void Key::setStringListValue(
|
||||
static_cast< sal_uInt32 >(list.size()));
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key"
|
||||
" setStringListValue: underlying"
|
||||
" RegistryKey::setUnicodeListValue() = ") +
|
||||
OUString::number(err)),
|
||||
@@ -802,24 +765,21 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue()
|
||||
RegError err = key_.getValueInfo(OUString(), &type, &size);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
" underlying RegistryKey::getValueInfo() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (type != RG_VALUETYPE_BINARY) {
|
||||
throw css::registry::InvalidValueException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
" underlying RegistryKey type = ") +
|
||||
OUString::number(type)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
if (size > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidValueException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
" underlying RegistryKey size too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -827,8 +787,7 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue()
|
||||
err = key_.getValue(OUString(), value.getArray());
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
|
||||
" underlying RegistryKey::getValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -846,8 +805,7 @@ void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value)
|
||||
static_cast< sal_uInt32 >(value.getLength()));
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key setBinaryValue:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key setBinaryValue:"
|
||||
" underlying RegistryKey::setValue() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -868,8 +826,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::openKey(
|
||||
return css::uno::Reference< css::registry::XRegistryKey >();
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key openKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key openKey:"
|
||||
" underlying RegistryKey::openKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -890,8 +847,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::createKey(
|
||||
return css::uno::Reference< css::registry::XRegistryKey >();
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key createKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key createKey:"
|
||||
" underlying RegistryKey::createKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -905,8 +861,7 @@ void Key::closeKey()
|
||||
RegError err = key_.closeKey();
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key closeKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key closeKey:"
|
||||
" underlying RegistryKey::closeKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -920,8 +875,7 @@ void Key::deleteKey(OUString const & rKeyName)
|
||||
RegError err = key_.deleteKey(rKeyName);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key deleteKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key deleteKey:"
|
||||
" underlying RegistryKey::deleteKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -937,8 +891,7 @@ Key::openKeys()
|
||||
RegError err = key_.openSubKeys(OUString(), list);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key openKeys:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key openKeys:"
|
||||
" underlying RegistryKey::openSubKeys() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -946,8 +899,7 @@ Key::openKeys()
|
||||
sal_uInt32 n = list.getLength();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
" underlying RegistryKey::getKeyNames() too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -968,8 +920,7 @@ css::uno::Sequence< OUString > Key::getKeyNames()
|
||||
RegError err = key_.getKeyNames(OUString(), list);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
" underlying RegistryKey::getKeyNames() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -977,8 +928,7 @@ css::uno::Sequence< OUString > Key::getKeyNames()
|
||||
sal_uInt32 n = list.getLength();
|
||||
if (n > SAL_MAX_INT32) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry key getKeyNames:"
|
||||
" underlying RegistryKey::getKeyNames() too large"),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -1001,8 +951,7 @@ sal_Bool Key::createLink(
|
||||
case REG_INVALID_KEY:
|
||||
case REG_DETECT_RECURSION:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key createLink:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key createLink:"
|
||||
" underlying RegistryKey::createLink() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1018,8 +967,7 @@ void Key::deleteLink(OUString const & rLinkName)
|
||||
RegError err = key_.deleteLink(rLinkName);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key deleteLink:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key deleteLink:"
|
||||
" underlying RegistryKey::deleteLink() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1034,8 +982,7 @@ OUString Key::getLinkTarget(OUString const & rLinkName)
|
||||
RegError err = key_.getLinkTarget(rLinkName, target);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getLinkTarget:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getLinkTarget:"
|
||||
" underlying RegistryKey::getLinkTarget() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1051,8 +998,7 @@ OUString Key::getResolvedName(OUString const & aKeyName)
|
||||
RegError err = key_.getResolvedKeyName(aKeyName, true, resolved);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry key getResolvedName:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry key getResolvedName:"
|
||||
" underlying RegistryKey::getResolvedName() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1078,11 +1024,9 @@ void SimpleRegistry::open(
|
||||
}
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.open(") +
|
||||
(OUString("com.sun.star.registry.SimpleRegistry.open(") +
|
||||
rURL +
|
||||
OUString(
|
||||
"): underlying Registry::open/create() = ") +
|
||||
OUString("): underlying Registry::open/create() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
}
|
||||
@@ -1100,8 +1044,7 @@ void SimpleRegistry::close()
|
||||
RegError err = registry_.close();
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.close:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry.close:"
|
||||
" underlying Registry::close() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1115,8 +1058,7 @@ void SimpleRegistry::destroy()
|
||||
RegError err = registry_.destroy(OUString());
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.destroy:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry.destroy:"
|
||||
" underlying Registry::destroy() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1131,8 +1073,7 @@ css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey()
|
||||
RegError err = registry_.openRootKey(root);
|
||||
if (err != REG_NO_ERROR) {
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.getRootKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry.getRootKey:"
|
||||
" underlying Registry::getRootKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
@@ -1165,14 +1106,12 @@ void SimpleRegistry::mergeKey(
|
||||
break;
|
||||
case REG_MERGE_ERROR:
|
||||
throw css::registry::MergeConflictException(
|
||||
OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.mergeKey:"
|
||||
OUString("com.sun.star.registry.SimpleRegistry.mergeKey:"
|
||||
" underlying Registry::mergeKey() = REG_MERGE_ERROR"),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
default:
|
||||
throw css::registry::InvalidRegistryException(
|
||||
(OUString(
|
||||
"com.sun.star.registry.SimpleRegistry.mergeKey:"
|
||||
(OUString("com.sun.star.registry.SimpleRegistry.mergeKey:"
|
||||
" underlying Registry::getRootKey/mergeKey() = ") +
|
||||
OUString::number(err)),
|
||||
static_cast< OWeakObject * >(this));
|
||||
|
@@ -260,9 +260,8 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE
|
||||
if ((nNewWidth <= 0) || (nWidth <= 0))
|
||||
{
|
||||
throw uno::RuntimeException(
|
||||
OUString(
|
||||
"Pb with width, in SwVbaRows::setIndentWithAdjustProportional (nNewWidth <= 0) || (nWidth <= 0)"
|
||||
),
|
||||
OUString("Pb with width, in SwVbaRows::setIndentWithAdjustProportional "
|
||||
"(nNewWidth <= 0) || (nWidth <= 0)"),
|
||||
uno::Reference< uno::XInterface >()
|
||||
);
|
||||
}
|
||||
|
@@ -250,17 +250,13 @@ bool XmlReader::skipComment() {
|
||||
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("--"));
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within comment) of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end (within comment) of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
pos_ += i + RTL_CONSTASCII_LENGTH("--");
|
||||
if (read() != '>') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"illegal \"--\" within comment in ") +
|
||||
fileUrl_),
|
||||
(OUString("illegal \"--\" within comment in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
return true;
|
||||
@@ -271,8 +267,7 @@ void XmlReader::skipProcessingInstruction() {
|
||||
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("?>"));
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("bad '<?' in ") +
|
||||
fileUrl_),
|
||||
(OUString("bad '<?' in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
pos_ += i + RTL_CONSTASCII_LENGTH("?>");
|
||||
@@ -286,9 +281,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
switch (c) {
|
||||
case '\0': // i.e., EOF
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within DTD) of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end (within DTD) of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
case '"':
|
||||
case '\'':
|
||||
@@ -297,9 +290,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
pos_, end_ - pos_, c);
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within DTD) of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end (within DTD) of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
pos_ += i + 1;
|
||||
@@ -313,9 +304,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
switch (c) {
|
||||
case '\0': // i.e., EOF
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within DTD) of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end (within DTD) of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
case '"':
|
||||
case '\'':
|
||||
@@ -324,8 +313,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
pos_, end_ - pos_, c);
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within DTD) of ") +
|
||||
(OUString("premature end (within DTD) of ") +
|
||||
fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
@@ -336,8 +324,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
switch (read()) {
|
||||
case '\0': // i.e., EOF
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within DTD) of ") +
|
||||
(OUString("premature end (within DTD) of ") +
|
||||
fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
case '!':
|
||||
@@ -354,9 +341,7 @@ void XmlReader::skipDocumentTypeDeclaration() {
|
||||
skipSpace();
|
||||
if (read() != '>') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"missing \">\" of DTD in ") +
|
||||
fileUrl_),
|
||||
(OUString("missing \">\" of DTD in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
return;
|
||||
@@ -384,9 +369,7 @@ Span XmlReader::scanCdataSection() {
|
||||
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("]]>"));
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"premature end (within CDATA section) of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end (within CDATA section) of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
pos_ += i + RTL_CONSTASCII_LENGTH("]]>");
|
||||
@@ -450,9 +433,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
|
||||
}
|
||||
if (val > 0x10FFFF) { // avoid overflow
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"'&#x...' too large in ") +
|
||||
fileUrl_),
|
||||
(OUString("'&#x...' too large in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
}
|
||||
@@ -467,9 +448,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
|
||||
}
|
||||
if (val > 0x10FFFF) { // avoid overflow
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"'&#...' too large in ") +
|
||||
fileUrl_),
|
||||
(OUString("'&#...' too large in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
}
|
||||
@@ -485,8 +464,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
|
||||
(val >= 0xD800 && val <= 0xDFFF) || val == 0xFFFE || val == 0xFFFF)
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"character reference denoting invalid character in ") +
|
||||
(OUString("character reference denoting invalid character in ") +
|
||||
fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
@@ -543,8 +521,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
|
||||
}
|
||||
}
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("unknown entity reference in ") +
|
||||
fileUrl_),
|
||||
(OUString("unknown entity reference in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
}
|
||||
@@ -654,8 +631,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
|
||||
char const * nameColon = 0;
|
||||
if (!scanName(&nameColon)) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("bad tag name in ") +
|
||||
fileUrl_),
|
||||
(OUString("bad tag name in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
char const * nameEnd = pos_;
|
||||
@@ -671,8 +647,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
|
||||
}
|
||||
if (pos_ == p) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"missing whitespace before attribute in ") +
|
||||
(OUString("missing whitespace before attribute in ") +
|
||||
fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
@@ -680,33 +655,28 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
|
||||
char const * attrNameColon = 0;
|
||||
if (!scanName(&attrNameColon)) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("bad attribute name in ") +
|
||||
fileUrl_),
|
||||
(OUString("bad attribute name in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
char const * attrNameEnd = pos_;
|
||||
skipSpace();
|
||||
if (read() != '=') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("missing '=' in ") +
|
||||
fileUrl_),
|
||||
(OUString("missing '=' in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
skipSpace();
|
||||
char del = read();
|
||||
if (del != '\'' && del != '"') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("bad attribute value in ") +
|
||||
fileUrl_),
|
||||
(OUString("bad attribute value in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
char const * valueBegin = pos_;
|
||||
sal_Int32 i = rtl_str_indexOfChar_WithLength(pos_, end_ - pos_, del);
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString(
|
||||
"unterminated attribute value in ") +
|
||||
fileUrl_),
|
||||
(OUString("unterminated attribute value in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
char const * valueEnd = pos_ + i;
|
||||
@@ -744,8 +714,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
|
||||
}
|
||||
if (peek() != '>') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("missing '>' in ") +
|
||||
fileUrl_),
|
||||
(OUString("missing '>' in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
++pos_;
|
||||
@@ -766,8 +735,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
|
||||
XmlReader::Result XmlReader::handleEndTag() {
|
||||
if (elements_.empty()) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("spurious end tag in ") +
|
||||
fileUrl_),
|
||||
(OUString("spurious end tag in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
char const * nameBegin = pos_;
|
||||
@@ -776,16 +744,14 @@ XmlReader::Result XmlReader::handleEndTag() {
|
||||
!elements_.top().name.equals(nameBegin, pos_ - nameBegin))
|
||||
{
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("tag mismatch in ") +
|
||||
fileUrl_),
|
||||
(OUString("tag mismatch in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
handleElementEnd();
|
||||
skipSpace();
|
||||
if (peek() != '>') {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("missing '>' in ") +
|
||||
fileUrl_),
|
||||
(OUString("missing '>' in ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
++pos_;
|
||||
@@ -804,8 +770,7 @@ XmlReader::Result XmlReader::handleSkippedText(Span * data, int * nsId) {
|
||||
sal_Int32 i = rtl_str_indexOfChar_WithLength(pos_, end_ - pos_, '<');
|
||||
if (i < 0) {
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("premature end of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
}
|
||||
pos_ += i + 1;
|
||||
@@ -835,8 +800,7 @@ XmlReader::Result XmlReader::handleRawText(Span * text) {
|
||||
switch (peek()) {
|
||||
case '\0': // i.e., EOF
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("premature end of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
case '\x0D':
|
||||
pad_.add(begin, pos_ - begin);
|
||||
@@ -902,8 +866,7 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
|
||||
switch (peek()) {
|
||||
case '\0': // i.e., EOF
|
||||
throw css::uno::RuntimeException(
|
||||
(OUString("premature end of ") +
|
||||
fileUrl_),
|
||||
(OUString("premature end of ") + fileUrl_),
|
||||
css::uno::Reference< css::uno::XInterface >());
|
||||
case '\x09':
|
||||
case '\x0A':
|
||||
|
@@ -99,14 +99,14 @@ void SaveODFItem::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {
|
||||
m_nODF = nTmp;
|
||||
else
|
||||
throw uno::RuntimeException(
|
||||
OUString(
|
||||
"[xmlsecurity]SaveODFItem::SaveODFItem(): Wrong Type!"), 0 );
|
||||
OUString("[xmlsecurity]SaveODFItem::SaveODFItem(): Wrong Type!"),
|
||||
0 );
|
||||
|
||||
}
|
||||
else
|
||||
throw uno::RuntimeException(
|
||||
OUString(
|
||||
"[xmlsecurity] Could not open property Office.Common/Save/ODF/DefaultVersion"), 0);
|
||||
OUString("[xmlsecurity] Could not open property Office.Common/Save/ODF/DefaultVersion"),
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -112,8 +112,7 @@ void EncryptionEngine::tryToPerform( )
|
||||
{
|
||||
if (checkReady())
|
||||
{
|
||||
const OUString sEncryptionTemplate (
|
||||
ENCRYPTION_TEMPLATE );
|
||||
const OUString sEncryptionTemplate ( ENCRYPTION_TEMPLATE );
|
||||
cssu::Reference < cssxc::XXMLEncryptionTemplate > xEncryptionTemplate(
|
||||
mxMSF->createInstance( sEncryptionTemplate ), cssu::UNO_QUERY );
|
||||
|
||||
|
@@ -113,8 +113,7 @@ void SignatureEngine::tryToPerform( )
|
||||
{
|
||||
if (checkReady())
|
||||
{
|
||||
const OUString ouSignatureTemplate (
|
||||
SIGNATURE_TEMPLATE );
|
||||
const OUString ouSignatureTemplate ( SIGNATURE_TEMPLATE );
|
||||
cssu::Reference < cssxc::XXMLSignatureTemplate >
|
||||
xSignatureTemplate( mxMSF->createInstance( ouSignatureTemplate ), cssu::UNO_QUERY );
|
||||
|
||||
|
@@ -173,8 +173,7 @@ void SAL_CALL SignatureVerifierImpl::initialize(
|
||||
OUString SignatureVerifierImpl_getImplementationName ()
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
return OUString(
|
||||
IMPLEMENTATION_NAME );
|
||||
return OUString( IMPLEMENTATION_NAME );
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SignatureVerifierImpl_supportsService( const OUString& ServiceName )
|
||||
|
Reference in New Issue
Block a user