summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-03 23:23:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-04 06:55:38 +0200
commit5fc8f8620d0367813d20b9a90ece47f0674996b3 (patch)
tree2ba02f73f506ac5e23a5f588a483bcca97b0d7c0 /scripting
parentaebfe0e9432e37936bbdd040fe8a0f099a0d22a5 (diff)
Just use Any ctor instead of makeAny in scripting
Change-Id: I611640a6fb7061fbb6a239034f75e006db075989 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133786 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basscript.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx4
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx2
-rw-r--r--scripting/source/provider/ActiveMSPList.hxx2
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx6
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx4
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx4
8 files changed, 13 insertions, 13 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 9054ee4bfc27..d64fa5af4357 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -242,7 +242,7 @@ constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller";
// if it's a document-based script, temporarily reset ThisComponent to the script invocation context
Any aOldThisComponent;
if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
- aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) );
+ aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", Any( m_xDocumentScriptContext ) );
if ( m_caller.hasElements() && m_caller[ 0 ].hasValue() )
{
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index ade1b6424d91..a40c4f6fb2d2 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -603,8 +603,8 @@ namespace dlgprov
aDecorationAny >>= bDecoration;
if( !bDecoration )
{
- xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) );
- xDlgModPropSet->setPropertyValue( "Title", makeAny( OUString() ) );
+ xDlgModPropSet->setPropertyValue( aDecorationPropName, Any( true ) );
+ xDlgModPropSet->setPropertyValue( "Title", Any( OUString() ) );
}
}
catch( UnknownPropertyException& )
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 85ff36fb1b86..c073c73b730c 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -142,7 +142,7 @@ Reference< provider::XScriptProvider >
if ( pos == m_mScriptComponents.end() )
{
// TODO
- msp = createNewMSP( uno::makeAny( xContext ) );
+ msp = createNewMSP( uno::Any( xContext ) );
addActiveMSP( xNormalized, msp );
}
else
diff --git a/scripting/source/provider/ActiveMSPList.hxx b/scripting/source/provider/ActiveMSPList.hxx
index 3685e666cdef..fb52629c1dd2 100644
--- a/scripting/source/provider/ActiveMSPList.hxx
+++ b/scripting/source/provider/ActiveMSPList.hxx
@@ -75,7 +75,7 @@ private:
css::uno::Reference< css::script::provider::XScriptProvider >
createNewMSP( const OUString& context )
{
- return createNewMSP( css::uno::makeAny( context ) );
+ return createNewMSP( css::uno::Any( context ) );
}
friend class NonDocMSPCreator;
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 23eb2f203630..9d070ab00514 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -266,8 +266,8 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
{
xFac = provider::theMasterScriptProviderFactory::get( xCtx );
- locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("user") ) ), UNO_QUERY_THROW );
- locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("share") ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("user") ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("share") ) ), UNO_QUERY_THROW );
}
// TODO proper exception handling, should throw
catch( const Exception& )
@@ -295,7 +295,7 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
{
Reference< document::XEmbeddedScripts > xScripts( model, UNO_QUERY );
if ( xScripts.is() )
- locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( model ) ), UNO_QUERY_THROW );
+ locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( model ) ), UNO_QUERY_THROW );
}
}
}
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index c30a290a0c64..93d6a60f371c 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -323,7 +323,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
provider::theMasterScriptProviderFactory::get( m_xContext );
Reference< provider::XScriptProvider > xSP(
- xFac_->createScriptProvider( makeAny( location ) ), UNO_SET_THROW );
+ xFac_->createScriptProvider( Any( location ) ), UNO_SET_THROW );
xScript = xSP->getScript( scriptURI );
}
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index df30d8de1eea..e3208321d987 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -867,10 +867,10 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if ( xProps.is() )
{
OUString aPropName("MediaType");
- xProps->setPropertyValue( aPropName, uno::makeAny( OUString("text/plain") ) );
+ xProps->setPropertyValue( aPropName, uno::Any( OUString("text/plain") ) );
aPropName = "UseCommonStoragePasswordEncryption";
- xProps->setPropertyValue( aPropName, uno::makeAny( true ) );
+ xProps->setPropertyValue( aPropName, uno::Any( true ) );
}
Reference< io::XOutputStream > xOutputStream = xElementStream->getOutputStream();
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 3e54f5d6ffc8..9da09b734ce4 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -373,7 +373,7 @@ ScriptEventHelper::getEventListeners() const
Reference< beans::XIntrospection > xIntrospection = beans::theIntrospection::get( m_xCtx );
Reference< beans::XIntrospectionAccess > xIntrospectionAccess =
- xIntrospection->inspect( makeAny( m_xControl ) );
+ xIntrospection->inspect( Any( m_xControl ) );
const Sequence< Type > aControlListeners =
xIntrospectionAccess->getSupportedListeners();
for ( const Type& listType : aControlListeners )
@@ -894,7 +894,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
OUString url = aMacroResolvedInfo.msResolvedMacro;
try
{
- uno::Any aDummyCaller = uno::makeAny( OUString("Error") );
+ uno::Any aDummyCaller( OUString("Error") );
if ( pRet )
{
ooo::vba::executeMacro( mpShell, url, aArguments, *pRet, aDummyCaller );