Use getXWeak in shell
Change-Id: Ied9a244a0fdd5973f2c9cb3bdd46500f6be2e0cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150868 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
723a0a067d
commit
f220acf3aa
8 changed files with 20 additions and 22 deletions
|
@ -106,7 +106,7 @@ void Default::setPropertyValue(OUString const &, css::uno::Any const &)
|
|||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
"setPropertyValue not supported",
|
||||
static_cast< cppu::OWeakObject * >(this), -1);
|
||||
getXWeak(), -1);
|
||||
}
|
||||
|
||||
OUString xdg_user_dir_lookup (const char *type, bool bAllowHomeDir)
|
||||
|
@ -252,7 +252,7 @@ css::uno::Any Default::getPropertyValue(OUString const & PropertyName)
|
|||
}
|
||||
|
||||
throw css::beans::UnknownPropertyException(
|
||||
PropertyName, static_cast< cppu::OWeakObject * >(this));
|
||||
PropertyName, getXWeak());
|
||||
}
|
||||
|
||||
css::uno::Reference< css::uno::XInterface > createBackend(
|
||||
|
@ -290,7 +290,7 @@ shell_DesktopBackend_get_implementation(
|
|||
backend = createBackend(context,
|
||||
"com.sun.star.configuration.backend.KF5Backend");
|
||||
if (!backend)
|
||||
backend = static_cast< cppu::OWeakObject * >(new Default);
|
||||
backend = getXWeak(new Default);
|
||||
backend->acquire();
|
||||
return backend.get();
|
||||
}
|
||||
|
|
|
@ -220,8 +220,7 @@ Service::Service()
|
|||
|
||||
void Service::setPropertyValue(OUString const&, css::uno::Any const&)
|
||||
{
|
||||
throw css::lang::IllegalArgumentException("setPropertyValue not supported",
|
||||
static_cast<cppu::OWeakObject*>(this), -1);
|
||||
throw css::lang::IllegalArgumentException("setPropertyValue not supported", getXWeak(), -1);
|
||||
}
|
||||
|
||||
css::uno::Any Service::getPropertyValue(OUString const& PropertyName)
|
||||
|
@ -247,7 +246,7 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName)
|
|||
return css::uno::Any(css::beans::Optional<css::uno::Any>());
|
||||
//TODO: obtain values from KDE?
|
||||
}
|
||||
throw css::beans::UnknownPropertyException(PropertyName, static_cast<cppu::OWeakObject*>(this));
|
||||
throw css::beans::UnknownPropertyException(PropertyName, getXWeak());
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
|
|
@ -286,7 +286,7 @@ void LocaleBackend::setPropertyValue(
|
|||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
"setPropertyValue not supported",
|
||||
static_cast< cppu::OWeakObject * >(this), -1);
|
||||
getXWeak(), -1);
|
||||
}
|
||||
|
||||
css::uno::Any LocaleBackend::getPropertyValue(
|
||||
|
@ -302,7 +302,7 @@ css::uno::Any LocaleBackend::getPropertyValue(
|
|||
return css::uno::Any(getUILocale());
|
||||
} else {
|
||||
throw css::beans::UnknownPropertyException(
|
||||
PropertyName, static_cast< cppu::OWeakObject * >(this));
|
||||
PropertyName, getXWeak());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ void MacOSXBackend::setPropertyValue(
|
|||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
"setPropertyValue not supported",
|
||||
static_cast< cppu::OWeakObject * >(this), -1);
|
||||
getXWeak(), -1);
|
||||
}
|
||||
|
||||
css::uno::Any MacOSXBackend::getPropertyValue(
|
||||
|
@ -365,7 +365,7 @@ css::uno::Any MacOSXBackend::getPropertyValue(
|
|||
return css::uno::Any(css::beans::Optional< css::uno::Any >());
|
||||
} else {
|
||||
throw css::beans::UnknownPropertyException(
|
||||
PropertyName, static_cast< cppu::OWeakObject * >(this));
|
||||
PropertyName, getXWeak());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ void WinInetBackend::setPropertyValue(
|
|||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
"setPropertyValue not supported",
|
||||
static_cast< cppu::OWeakObject * >(this), -1);
|
||||
getXWeak(), -1);
|
||||
}
|
||||
|
||||
css::uno::Any WinInetBackend::getPropertyValue(
|
||||
|
@ -333,7 +333,7 @@ css::uno::Any WinInetBackend::getPropertyValue(
|
|||
return css::uno::Any(valueProxyType_);
|
||||
} else {
|
||||
throw css::beans::UnknownPropertyException(
|
||||
PropertyName, static_cast< cppu::OWeakObject * >(this));
|
||||
PropertyName, getXWeak());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
|||
throw RuntimeException(
|
||||
"Cannot translate URI reference to external format: "
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
getXWeak());
|
||||
}
|
||||
|
||||
#ifdef MACOSX
|
||||
|
@ -205,7 +205,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
|||
"XSystemShellExecute.execute URIS_ONLY with non-absolute"
|
||||
" URI reference "
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this), 0);
|
||||
getXWeak(), 0);
|
||||
} else {
|
||||
escapeForShell(aBuffer, OUStringToOString(aCommand, osl_getThreadTextEncoding()));
|
||||
aBuffer.append(" ");
|
||||
|
|
|
@ -234,7 +234,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
|
|||
"XSystemShellExecute.execute URIS_ONLY with"
|
||||
" non-absolute URI reference "
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this), 0);
|
||||
getXWeak(), 0);
|
||||
}
|
||||
if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
|
||||
// ShellExecuteExW appears to ignore the fragment of a file URL anyway, so remove it:
|
||||
|
|
|
@ -129,7 +129,7 @@ void SAL_CALL JumpListImpl::beginList(const OUString& sApplication)
|
|||
throw IllegalArgumentException(
|
||||
"Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', "
|
||||
"'Math', 'Base', 'Startcenter'.",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
getXWeak(), 1);
|
||||
}
|
||||
OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication);
|
||||
|
||||
|
@ -157,8 +157,7 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory,
|
|||
|
||||
if (sCategory.isEmpty())
|
||||
{
|
||||
throw IllegalArgumentException("Parameter 'category' must not be empty",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
throw IllegalArgumentException("Parameter 'category' must not be empty", getXWeak(), 1);
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -241,7 +240,7 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory,
|
|||
throw IllegalArgumentException(
|
||||
"No valid items given. `jumpListItems` is either empty, or contains only items "
|
||||
"which were removed by the user. See `XJumpList::getRemovedItems()`.",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
getXWeak(), 1);
|
||||
}
|
||||
|
||||
ThrowIfFailed(
|
||||
|
@ -329,7 +328,7 @@ void SAL_CALL JumpListImpl::addTasks(const Sequence<JumpListItem>& aJumpListItem
|
|||
if (nItems == 0)
|
||||
{
|
||||
throw IllegalArgumentException("No valid items given. `jumpListItems` is empty.",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
getXWeak(), 1);
|
||||
}
|
||||
|
||||
ThrowIfFailed(m_aDestinationList->AddUserTasks(pObjectArray), "AddUserTasks failed.");
|
||||
|
@ -417,7 +416,7 @@ void SAL_CALL JumpListImpl::deleteList(const OUString& sApplication)
|
|||
throw IllegalArgumentException(
|
||||
"Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', "
|
||||
"'Math', 'Base', 'Startcenter'.",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
getXWeak(), 1);
|
||||
}
|
||||
OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication);
|
||||
|
||||
|
@ -442,7 +441,7 @@ Sequence<JumpListItem> SAL_CALL JumpListImpl::getRemovedItems(const OUString& sA
|
|||
throw IllegalArgumentException(
|
||||
"Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', "
|
||||
"'Math', 'Base', 'Startcenter'.",
|
||||
static_cast<OWeakObject*>(this), 1);
|
||||
getXWeak(), 1);
|
||||
}
|
||||
OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication);
|
||||
|
||||
|
|
Loading…
Reference in a new issue