summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-03 11:14:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-03 10:44:01 +0000
commit8a16f665b1172ed505bf17f9b30ffde8abc3b861 (patch)
tree07b07bf01aaf014c32d9635b448a3cfae40d8063 /configmgr
parent9cbc3436eac193e6ae0164835fbf1f04e31707ab (diff)
makeAny->Any in canvas..configmgr
Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e Reviewed-on: https://gerrit.libreoffice.org/33869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/qa/unit/test.cxx20
-rw-r--r--configmgr/source/access.cxx28
-rw-r--r--configmgr/source/childaccess.cxx5
-rw-r--r--configmgr/source/configurationregistry.cxx4
-rw-r--r--configmgr/source/rootaccess.cxx2
-rw-r--r--configmgr/source/valueparser.cxx6
6 files changed, 31 insertions, 34 deletions
diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx
index 682f99f3b75d..d5de3e732a26 100644
--- a/configmgr/qa/unit/test.cxx
+++ b/configmgr/qa/unit/test.cxx
@@ -198,7 +198,7 @@ void SimpleRecursiveTest::step() const
"/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
".uno:WebHtml",
"Label",
- css::uno::makeAny(OUString("step")));
+ css::uno::Any(OUString("step")));
}
void Test::setUp()
@@ -222,7 +222,7 @@ void Test::testKeySet()
setKey(
"/org.openoffice.System/L10N",
"Locale",
- css::uno::makeAny(OUString("com.sun.star.configuration.backend.LocaleBackend UILocale")));
+ css::uno::Any(OUString("com.sun.star.configuration.backend.LocaleBackend UILocale")));
OUString s;
CPPUNIT_ASSERT(
getKey(
@@ -292,21 +292,21 @@ void Test::testInsertSetMember() {
css::uno::Reference<css::lang::XSingleServiceFactory>(
access, css::uno::UNO_QUERY_THROW)->createInstance());
CPPUNIT_ASSERT(member.is());
- access->insertByName("A", css::uno::makeAny(member));
+ access->insertByName("A", css::uno::Any(member));
member.set(
css::uno::Reference<css::lang::XSingleServiceFactory>(
access, css::uno::UNO_QUERY_THROW)->createInstance());
CPPUNIT_ASSERT(member.is());
try {
- access->insertByName("", css::uno::makeAny(member));
+ access->insertByName("", css::uno::Any(member));
CPPUNIT_FAIL("expected IllegalArgumentException");
} catch (css::lang::IllegalArgumentException &) {}
try {
- access->insertByName("\x01", css::uno::makeAny(member));
+ access->insertByName("\x01", css::uno::Any(member));
CPPUNIT_FAIL("expected IllegalArgumentException");
} catch (css::lang::IllegalArgumentException &) {}
try {
- access->insertByName("a/b", css::uno::makeAny(member));
+ access->insertByName("a/b", css::uno::Any(member));
} catch (css::lang::IllegalArgumentException &) {
CPPUNIT_FAIL("unexpected IllegalArgumentException");
}
@@ -448,10 +448,9 @@ css::uno::Reference< css::uno::XInterface > Test::createViewAccess(
OUString const & path) const
{
css::uno::Any arg(
- css::uno::makeAny(
css::beans::NamedValue(
"nodepath",
- css::uno::makeAny(path))));
+ css::uno::Any(path)));
return provider_->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
css::uno::Sequence< css::uno::Any >(&arg, 1));
@@ -461,10 +460,9 @@ css::uno::Reference< css::uno::XInterface > Test::createUpdateAccess(
OUString const & path) const
{
css::uno::Any arg(
- css::uno::makeAny(
css::beans::NamedValue(
"nodepath",
- css::uno::makeAny(path))));
+ css::uno::Any(path)));
return provider_->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess",
css::uno::Sequence< css::uno::Any >(&arg, 1));
@@ -585,7 +583,7 @@ bool WriterThread::iteration() {
OUString("kippers"),
OUString("bloaters") };
- test_.setKey(path_, name_, css::uno::makeAny(options[index_]));
+ test_.setKey(path_, name_, css::uno::Any(options[index_]));
index_ = (index_ + 1) % (sizeof options / sizeof (OUString));
return true;
}
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 63ec79f04157..13a52885e6c2 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1629,7 +1629,7 @@ void Access::initBroadcasterAndChanges(
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(
this),
- css::uno::makeAny(i.first),
+ css::uno::Any(i.first),
css::uno::Any(), css::uno::Any()));
//TODO: non-void Element, ReplacedElement
}
@@ -1667,7 +1667,7 @@ void Access::initBroadcasterAndChanges(
if (allChanges != nullptr) {
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(
+ css::uno::Any(
child->getRelativePathRepresentation()),
css::uno::Any(), css::uno::Any()));
//TODO: non-void Element, ReplacedElement
@@ -1693,14 +1693,14 @@ void Access::initBroadcasterAndChanges(
*j,
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(i.first), child->asValue(),
+ css::uno::Any(i.first), child->asValue(),
css::uno::Any()));
//TODO: distinguish add/modify; non-void ReplacedElement
}
if (allChanges != nullptr) {
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(
+ css::uno::Any(
child->getRelativePathRepresentation()),
child->asValue(), css::uno::Any()));
//TODO: non-void ReplacedElement
@@ -1717,7 +1717,7 @@ void Access::initBroadcasterAndChanges(
*j,
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(i.first), child->asValue(),
+ css::uno::Any(i.first), child->asValue(),
css::uno::Any()));
//TODO: distinguish add/remove/modify; non-void
// ReplacedElement
@@ -1754,7 +1754,7 @@ void Access::initBroadcasterAndChanges(
if (allChanges != nullptr) {
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(
+ css::uno::Any(
child->getRelativePathRepresentation()),
child->asValue(), css::uno::Any()));
//TODO: non-void ReplacedElement
@@ -1782,13 +1782,13 @@ void Access::initBroadcasterAndChanges(
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(
this),
- css::uno::makeAny(i.first),
+ css::uno::Any(i.first),
child->asValue(), css::uno::Any()));
}
if (allChanges != nullptr) {
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(
+ css::uno::Any(
child->getRelativePathRepresentation()),
css::uno::Any(), css::uno::Any()));
//TODO: non-void Element, ReplacedElement
@@ -1820,7 +1820,7 @@ void Access::initBroadcasterAndChanges(
*j,
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(i.first), css::uno::Any(),
+ css::uno::Any(i.first), css::uno::Any(),
css::uno::Any()));
//TODO: non-void ReplacedElement
}
@@ -1832,7 +1832,7 @@ void Access::initBroadcasterAndChanges(
path.append(Data::createSegment("*", i.first));
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(path.makeStringAndClear()),
+ css::uno::Any(path.makeStringAndClear()),
css::uno::Any(), css::uno::Any()));
//TODO: non-void ReplacedElement
}
@@ -1849,7 +1849,7 @@ void Access::initBroadcasterAndChanges(
*j,
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(i.first), css::uno::Any(),
+ css::uno::Any(i.first), css::uno::Any(),
css::uno::Any()));
//TODO: non-void ReplacedElement
}
@@ -1891,7 +1891,7 @@ void Access::initBroadcasterAndChanges(
path.append(i.first);
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(path.makeStringAndClear()),
+ css::uno::Any(path.makeStringAndClear()),
css::uno::Any(), css::uno::Any()));
//TODO: non-void ReplacedElement
}
@@ -1915,7 +1915,7 @@ void Access::initBroadcasterAndChanges(
*j,
css::container::ContainerEvent(
static_cast< cppu::OWeakObject * >(this),
- css::uno::makeAny(i.first),
+ css::uno::Any(i.first),
css::uno::Any(), css::uno::Any()));
//TODO: non-void ReplacedElement
}
@@ -1928,7 +1928,7 @@ void Access::initBroadcasterAndChanges(
path.append(Data::createSegment("*", i.first));
allChanges->push_back(
css::util::ElementChange(
- css::uno::makeAny(path.makeStringAndClear()),
+ css::uno::Any(path.makeStringAndClear()),
css::uno::Any(), css::uno::Any()));
//TODO: non-void ReplacedElement
}
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index c38e58a4cd43..c45901fac623 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -268,9 +268,8 @@ css::uno::Any ChildAccess::asValue()
return child.is() ? child->asValue() : css::uno::Any();
}
}
- value = css::uno::makeAny(
- css::uno::Reference< css::uno::XInterface >(
- static_cast< cppu::OWeakObject * >(this)));
+ value <<= css::uno::Reference< css::uno::XInterface >(
+ static_cast< cppu::OWeakObject * >(this));
}
return value;
}
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index 2f23577ba2ba..65a24c6903fa 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -251,7 +251,7 @@ void Service::open(OUString const & rURL, sal_Bool bReadOnly, sal_Bool)
doClose();
}
css::uno::Sequence< css::uno::Any > args(1);
- args[0] <<= css::beans::NamedValue("nodepath", css::uno::makeAny(rURL));
+ args[0] <<= css::beans::NamedValue("nodepath", css::uno::Any(rURL));
try {
access_ = provider_->createInstanceWithArguments(
(bReadOnly
@@ -294,7 +294,7 @@ css::uno::Reference< css::registry::XRegistryKey > Service::getRootKey()
{
osl::MutexGuard g(mutex_);
checkValid();
- return new RegistryKey(*this, css::uno::makeAny(access_));
+ return new RegistryKey(*this, css::uno::Any(access_));
}
sal_Bool Service::isReadOnly() {
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index ec47b20cb9b8..4601cef9e908 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -88,7 +88,7 @@ void RootAccess::initBroadcaster(
broadcaster->addChangesNotification(
*i,
css::util::ChangesEvent(
- pSource, makeAny( xBase ), set));
+ pSource, css::uno::Any( xBase ), set));
}
}
}
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index e732e8df58e1..33176071a640 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -172,7 +172,7 @@ template< typename T > css::uno::Any parseSingleValue(
if (!parseValue(text, &val)) {
throw css::uno::RuntimeException("invalid value");
}
- return css::uno::makeAny(val);
+ return css::uno::Any(val);
}
template< typename T > css::uno::Any parseListValue(
@@ -203,7 +203,7 @@ template< typename T > css::uno::Any parseListValue(
t.length -= i + sep.length;
}
}
- return css::uno::makeAny(comphelper::containerToSequence(seq));
+ return css::uno::Any(comphelper::containerToSequence(seq));
}
css::uno::Any parseValue(
@@ -445,7 +445,7 @@ template< typename T > css::uno::Any ValueParser::convertItems() {
assert(ok);
(void) ok; // avoid warnings
}
- return css::uno::makeAny(seq);
+ return css::uno::Any(seq);
}
}