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>
This commit is contained in:
@@ -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
|
// if it's a document-based script, temporarily reset ThisComponent to the script invocation context
|
||||||
Any aOldThisComponent;
|
Any aOldThisComponent;
|
||||||
if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
|
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() )
|
if ( m_caller.hasElements() && m_caller[ 0 ].hasValue() )
|
||||||
{
|
{
|
||||||
|
@@ -603,8 +603,8 @@ namespace dlgprov
|
|||||||
aDecorationAny >>= bDecoration;
|
aDecorationAny >>= bDecoration;
|
||||||
if( !bDecoration )
|
if( !bDecoration )
|
||||||
{
|
{
|
||||||
xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) );
|
xDlgModPropSet->setPropertyValue( aDecorationPropName, Any( true ) );
|
||||||
xDlgModPropSet->setPropertyValue( "Title", makeAny( OUString() ) );
|
xDlgModPropSet->setPropertyValue( "Title", Any( OUString() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( UnknownPropertyException& )
|
catch( UnknownPropertyException& )
|
||||||
|
@@ -142,7 +142,7 @@ Reference< provider::XScriptProvider >
|
|||||||
if ( pos == m_mScriptComponents.end() )
|
if ( pos == m_mScriptComponents.end() )
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
msp = createNewMSP( uno::makeAny( xContext ) );
|
msp = createNewMSP( uno::Any( xContext ) );
|
||||||
addActiveMSP( xNormalized, msp );
|
addActiveMSP( xNormalized, msp );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -75,7 +75,7 @@ private:
|
|||||||
css::uno::Reference< css::script::provider::XScriptProvider >
|
css::uno::Reference< css::script::provider::XScriptProvider >
|
||||||
createNewMSP( const OUString& context )
|
createNewMSP( const OUString& context )
|
||||||
{
|
{
|
||||||
return createNewMSP( css::uno::makeAny( context ) );
|
return createNewMSP( css::uno::Any( context ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
friend class NonDocMSPCreator;
|
friend class NonDocMSPCreator;
|
||||||
|
@@ -266,8 +266,8 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
|
|||||||
{
|
{
|
||||||
xFac = provider::theMasterScriptProviderFactory::get( xCtx );
|
xFac = provider::theMasterScriptProviderFactory::get( xCtx );
|
||||||
|
|
||||||
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("user") ) ), UNO_QUERY_THROW );
|
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("user") ) ), UNO_QUERY_THROW );
|
||||||
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( OUString("share") ) ), UNO_QUERY_THROW );
|
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( OUString("share") ) ), UNO_QUERY_THROW );
|
||||||
}
|
}
|
||||||
// TODO proper exception handling, should throw
|
// TODO proper exception handling, should throw
|
||||||
catch( const Exception& )
|
catch( const Exception& )
|
||||||
@@ -295,7 +295,7 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
|
|||||||
{
|
{
|
||||||
Reference< document::XEmbeddedScripts > xScripts( model, UNO_QUERY );
|
Reference< document::XEmbeddedScripts > xScripts( model, UNO_QUERY );
|
||||||
if ( xScripts.is() )
|
if ( xScripts.is() )
|
||||||
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( makeAny( model ) ), UNO_QUERY_THROW );
|
locnBNs[ mspIndex++ ].set( xFac->createScriptProvider( Any( model ) ), UNO_QUERY_THROW );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -323,7 +323,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
|
|||||||
provider::theMasterScriptProviderFactory::get( m_xContext );
|
provider::theMasterScriptProviderFactory::get( m_xContext );
|
||||||
|
|
||||||
Reference< provider::XScriptProvider > xSP(
|
Reference< provider::XScriptProvider > xSP(
|
||||||
xFac_->createScriptProvider( makeAny( location ) ), UNO_SET_THROW );
|
xFac_->createScriptProvider( Any( location ) ), UNO_SET_THROW );
|
||||||
xScript = xSP->getScript( scriptURI );
|
xScript = xSP->getScript( scriptURI );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -867,10 +867,10 @@ void StringResourcePersistenceImpl::implStoreAtStorage
|
|||||||
if ( xProps.is() )
|
if ( xProps.is() )
|
||||||
{
|
{
|
||||||
OUString aPropName("MediaType");
|
OUString aPropName("MediaType");
|
||||||
xProps->setPropertyValue( aPropName, uno::makeAny( OUString("text/plain") ) );
|
xProps->setPropertyValue( aPropName, uno::Any( OUString("text/plain") ) );
|
||||||
|
|
||||||
aPropName = "UseCommonStoragePasswordEncryption";
|
aPropName = "UseCommonStoragePasswordEncryption";
|
||||||
xProps->setPropertyValue( aPropName, uno::makeAny( true ) );
|
xProps->setPropertyValue( aPropName, uno::Any( true ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference< io::XOutputStream > xOutputStream = xElementStream->getOutputStream();
|
Reference< io::XOutputStream > xOutputStream = xElementStream->getOutputStream();
|
||||||
|
@@ -373,7 +373,7 @@ ScriptEventHelper::getEventListeners() const
|
|||||||
Reference< beans::XIntrospection > xIntrospection = beans::theIntrospection::get( m_xCtx );
|
Reference< beans::XIntrospection > xIntrospection = beans::theIntrospection::get( m_xCtx );
|
||||||
|
|
||||||
Reference< beans::XIntrospectionAccess > xIntrospectionAccess =
|
Reference< beans::XIntrospectionAccess > xIntrospectionAccess =
|
||||||
xIntrospection->inspect( makeAny( m_xControl ) );
|
xIntrospection->inspect( Any( m_xControl ) );
|
||||||
const Sequence< Type > aControlListeners =
|
const Sequence< Type > aControlListeners =
|
||||||
xIntrospectionAccess->getSupportedListeners();
|
xIntrospectionAccess->getSupportedListeners();
|
||||||
for ( const Type& listType : aControlListeners )
|
for ( const Type& listType : aControlListeners )
|
||||||
@@ -894,7 +894,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
|
|||||||
OUString url = aMacroResolvedInfo.msResolvedMacro;
|
OUString url = aMacroResolvedInfo.msResolvedMacro;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uno::Any aDummyCaller = uno::makeAny( OUString("Error") );
|
uno::Any aDummyCaller( OUString("Error") );
|
||||||
if ( pRet )
|
if ( pRet )
|
||||||
{
|
{
|
||||||
ooo::vba::executeMacro( mpShell, url, aArguments, *pRet, aDummyCaller );
|
ooo::vba::executeMacro( mpShell, url, aArguments, *pRet, aDummyCaller );
|
||||||
|
Reference in New Issue
Block a user