Kaydet (Commit) 8a16f665 authored tarafından Noel Grandin's avatar Noel Grandin

makeAny->Any in canvas..configmgr

Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e
Reviewed-on: https://gerrit.libreoffice.org/33869Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9cbc3436
......@@ -199,12 +199,12 @@ namespace cairocanvas
uno::Any DeviceHelper::isAccelerated() const
{
return css::uno::makeAny(false);
return css::uno::Any(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
{
return uno::makeAny( reinterpret_cast< sal_Int64 >(mpRefDevice.get()) );
return uno::Any( reinterpret_cast< sal_Int64 >(mpRefDevice.get()) );
}
uno::Any DeviceHelper::getSurfaceHandle() const
......
......@@ -82,7 +82,7 @@ namespace cairocanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return css::uno::makeAny(true);
return css::uno::Any(true);
}
uno::Any SpriteDeviceHelper::getDeviceHandle() const
......
......@@ -178,12 +178,12 @@ namespace dxcanvas
uno::Any DeviceHelper::isAccelerated() const
{
return css::uno::makeAny(false);
return css::uno::Any(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
{
return uno::makeAny( reinterpret_cast< sal_Int64 >(mpOutDev.get()) );
return uno::Any( reinterpret_cast< sal_Int64 >(mpOutDev.get()) );
}
uno::Any DeviceHelper::getSurfaceHandle() const
......
......@@ -177,7 +177,7 @@ namespace dxcanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return css::uno::makeAny(true);
return css::uno::Any(true);
}
void SpriteDeviceHelper::notifySizeUpdate( const awt::Rectangle& rBounds )
......
......@@ -130,9 +130,9 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
configuration::theDefaultProvider::get( m_xContext ) );
Any propValue(
makeAny( beans::PropertyValue(
Any( beans::PropertyValue(
"nodepath", -1,
makeAny( OUString("/org.openoffice.Office.Canvas") ),
Any( OUString("/org.openoffice.Office.Canvas") ),
beans::PropertyState_DIRECT_VALUE ) ) );
m_xCanvasConfigNameAccess.set(
......@@ -141,10 +141,10 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
Sequence<Any>( &propValue, 1 ) ),
UNO_QUERY_THROW );
propValue = makeAny(
propValue = Any(
beans::PropertyValue(
"nodepath", -1,
makeAny( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ),
Any( OUString("/org.openoffice.Office.Canvas/CanvasServiceList") ),
beans::PropertyState_DIRECT_VALUE ) );
Reference<container::XNameAccess> xNameAccess(
......
......@@ -348,13 +348,13 @@ namespace oglcanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return css::uno::makeAny(false);
return css::uno::Any(false);
}
uno::Any SpriteDeviceHelper::getDeviceHandle() const
{
const SystemChildWindow* pChildWindow = mxContext->getChildWindow();
return uno::makeAny( reinterpret_cast< sal_Int64 >(pChildWindow) );
return uno::Any( reinterpret_cast< sal_Int64 >(pChildWindow) );
}
uno::Any SpriteDeviceHelper::getSurfaceHandle() const
......
......@@ -1118,7 +1118,7 @@ namespace canvas
o_rxParams.realloc( 2 );
o_rxParams[ 0 ] = uno::makeAny( xServiceInfo->getImplementationName() );
o_rxParams[ 0 ] <<= xServiceInfo->getImplementationName();
o_rxParams[ 1 ] = xPropSet->getPropertyValue( "DeviceHandle" );
}
catch( const uno::Exception& )
......
......@@ -158,7 +158,7 @@ namespace vclcanvas
uno::Any DeviceHelper::isAccelerated() const
{
return css::uno::makeAny(false);
return css::uno::Any(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
......@@ -166,7 +166,7 @@ namespace vclcanvas
if( !mpOutDev )
return uno::Any();
return uno::makeAny(
return uno::Any(
reinterpret_cast< sal_Int64 >(&mpOutDev->getOutDev()) );
}
......
......@@ -120,7 +120,7 @@ namespace vclcanvas
css::uno::Any isUnsafeScrolling() const
{
return css::uno::makeAny(mbIsUnsafeScrolling);
return css::uno::Any(mbIsUnsafeScrolling);
}
void enableUnsafeScrolling( const css::uno::Any& rAny )
{
......@@ -129,7 +129,7 @@ namespace vclcanvas
css::uno::Any isSpriteBounds() const
{
return css::uno::makeAny(mbShowSpriteBounds);
return css::uno::Any(mbShowSpriteBounds);
}
void enableSpriteBounds( const css::uno::Any& rAny )
{
......
......@@ -95,7 +95,7 @@ namespace vclcanvas
if( !mpBackBuffer )
return uno::Any();
return uno::makeAny(
return uno::Any(
reinterpret_cast< sal_Int64 >(&mpBackBuffer->getOutDev()) );
}
......
......@@ -495,8 +495,8 @@ bool EmbeddedObjectContainer::StoreEmbeddedObject(
if ( bCopy )
{
auto aObjArgs(::comphelper::InitPropertySequence({
{ "SourceShellID", uno::makeAny(rSrcShellID) },
{ "DestinationShellID", uno::makeAny(rDestShellID) }
{ "SourceShellID", uno::Any(rSrcShellID) },
{ "DestinationShellID", uno::Any(rDestShellID) }
}));
xPersist->storeToEntry(pImpl->mxStorage, rName, aSeq, aObjArgs);
}
......@@ -567,7 +567,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
// Probably introducing of such an object must be restricted ( a storage must be used! ).
uno::Reference< beans::XPropertySet > xProps( xNewStream, uno::UNO_QUERY_THROW );
xProps->setPropertyValue("MediaType",
uno::makeAny( OUString( "application/vnd.sun.star.oleobject" ) ) );
uno::Any( OUString( "application/vnd.sun.star.oleobject" ) ) );
}
catch (uno::Exception const& e)
{
......@@ -996,7 +996,7 @@ bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed
uno::Reference< beans::XPropertySet > xTargetStorProps(
pImpl->mpTempObjectContainer->pImpl->mxStorage,
uno::UNO_QUERY_THROW );
xTargetStorProps->setPropertyValue( s_sMediaType,uno::makeAny( aOrigStorMediaType ) );
xTargetStorProps->setPropertyValue( s_sMediaType,uno::Any( aOrigStorMediaType ) );
}
catch (const uno::Exception&)
{
......@@ -1159,11 +1159,11 @@ bool EmbeddedObjectContainer::InsertGraphicStream( const css::uno::Reference < c
throw uno::RuntimeException();
xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
uno::makeAny( true ) );
uno::Any( true ) );
xPropSet->setPropertyValue("MediaType", uno::Any(rMediaType) );
xPropSet->setPropertyValue("Compressed",
uno::makeAny( true ) );
uno::Any( true ) );
}
catch (const uno::Exception&)
{
......
......@@ -315,7 +315,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
{
throw css::lang::WrappedTargetRuntimeException(
"wrapped CannotConvertException " + e.Message,
css::uno::Reference<css::uno::XInterface>(), makeAny(e));
css::uno::Reference<css::uno::XInterface>(), Any(e));
}
}
}
......
......@@ -446,9 +446,9 @@ namespace comphelper
m_xChildMapper->handleChildNotification( _rEvent );
if ( aTranslatedEvent.NewValue == m_xInner )
aTranslatedEvent.NewValue = makeAny(aTranslatedEvent.Source);
aTranslatedEvent.NewValue <<= aTranslatedEvent.Source;
if ( aTranslatedEvent.OldValue == m_xInner )
aTranslatedEvent.OldValue = makeAny(aTranslatedEvent.Source);
aTranslatedEvent.OldValue <<= aTranslatedEvent.Source;
}
notifyTranslatedEvent( aTranslatedEvent );
......
......@@ -43,21 +43,21 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons
// set root path
aParam.Name = "nodepath";
aParam.Value <<= sPackage;
lParams.push_back(css::uno::makeAny(aParam));
lParams.push_back(css::uno::Any(aParam));
// enable all locales mode
if (eMode & EConfigurationModes::AllLocales)
{
aParam.Name = "locale";
aParam.Value <<= OUString("*");
lParams.push_back(css::uno::makeAny(aParam));
lParams.push_back(css::uno::Any(aParam));
}
// enable lazy writing
bool bLazy(eMode & EConfigurationModes::LazyWrite);
aParam.Name = "lazywrite";
aParam.Value = css::uno::makeAny(bLazy);
lParams.push_back(css::uno::makeAny(aParam));
aParam.Value <<= bLazy;
lParams.push_back(css::uno::Any(aParam));
// open it
css::uno::Reference< css::uno::XInterface > xCFG;
......@@ -132,7 +132,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::makeSureSetNode
css::uno::Reference< css::lang::XSingleServiceFactory > xNodeFactory(xSet, css::uno::UNO_QUERY_THROW);
xNode = xNodeFactory->createInstance();
css::uno::Reference< css::container::XNameContainer > xSetReplace(xSet, css::uno::UNO_QUERY_THROW);
xSetReplace->insertByName(sSetNode, css::uno::makeAny(xNode));
xSetReplace->insertByName(sSetNode, css::uno::Any(xNode));
}
return xNode;
......
......@@ -229,7 +229,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString
try
{
// make query for all types matching the properties
uno::Sequence < beans::NamedValue > aSeq { { "MediaType", css::uno::makeAny(aMediaType) } };
uno::Sequence < beans::NamedValue > aSeq { { "MediaType", css::uno::Any(aMediaType) } };
uno::Reference < container::XEnumeration > xEnum = xTypeCFG->createSubSetEnumerationByProperties( aSeq );
while ( xEnum->hasMoreElements() )
......@@ -719,8 +719,8 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin
uno::Sequence< beans::NamedValue > aSearchRequest
{
{ "DocumentService", css::uno::makeAny(aServiceName) },
{ "FileFormatVersion", css::uno::makeAny(nVersion) }
{ "DocumentService", css::uno::Any(aServiceName) },
{ "FileFormatVersion", css::uno::Any(nVersion) }
};
uno::Reference< container::XEnumeration > xFilterEnum =
......@@ -801,8 +801,8 @@ OUString MimeConfigurationHelper::GetExportFilterFromImportFilter( const OUStrin
{
uno::Sequence< beans::NamedValue > aSearchRequest
{
{ "Type", css::uno::makeAny(aTypeName) },
{ "DocumentService", css::uno::makeAny(aDocumentServiceName) }
{ "Type", css::uno::Any(aTypeName) },
{ "DocumentService", css::uno::Any(aDocumentServiceName) }
};
uno::Sequence< beans::PropertyValue > aExportFilterProps = SearchForFilter(
......
......@@ -75,7 +75,7 @@ css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumb
SAL_WARN("comphelper", "getNumberFormatDecimals : invalid key! (may be created with another formatter ?)");
}
}
return css::uno::makeAny((sal_Int16)0);
return css::uno::Any((sal_Int16)0);
}
......
......@@ -183,9 +183,9 @@ const css::uno::Any SequenceAsHashMap::getAsConstAny(bool bAsPropertyValueList)
{
css::uno::Any aDestination;
if (bAsPropertyValueList)
aDestination = css::uno::makeAny(getAsConstPropertyValueList());
aDestination = css::uno::Any(getAsConstPropertyValueList());
else
aDestination = css::uno::makeAny(getAsConstNamedValueList());
aDestination = css::uno::Any(getAsConstNamedValueList());
return aDestination;
}
......
......@@ -623,7 +623,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
{
OPropertyArrayAggregationHelper::PropertyOrigin ePropOrg = rPH.classifyProperty( *pNames );
if ( OPropertyArrayAggregationHelper::PropertyOrigin::Unknown == ePropOrg )
throw WrappedTargetException( OUString(), static_cast< XMultiPropertySet* >( this ), makeAny( UnknownPropertyException( ) ) );
throw WrappedTargetException( OUString(), static_cast< XMultiPropertySet* >( this ), Any( UnknownPropertyException( ) ) );
// due to a flaw in the API design, this method is not allowed to throw an UnknownPropertyException
// so we wrap it into a WrappedTargetException
......
......@@ -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;
}
......
......@@ -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
}
......
......@@ -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;
}
......
......@@ -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() {
......
......@@ -88,7 +88,7 @@ void RootAccess::initBroadcaster(
broadcaster->addChangesNotification(
*i,
css::util::ChangesEvent(
pSource, makeAny( xBase ), set));
pSource, css::uno::Any( xBase ), set));
}
}
}
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment