include/unotools/sharedunocomponent.hxx       |    2 -
 unotools/source/config/configmgr.cxx          |    6 ++---
 unotools/source/config/confignode.cxx         |    2 -
 unotools/source/config/historyoptions.cxx     |   28 +++++++++++++-------------
 unotools/source/config/useroptions.cxx        |    2 -
 unotools/source/config/viewoptions.cxx        |    6 ++---
 unotools/source/misc/ZipPackageHelper.cxx     |    2 -
 unotools/source/misc/mediadescriptor.cxx      |    2 -
 unotools/source/ucbhelper/ucbhelper.cxx       |    2 -
 unotools/source/ucbhelper/ucbstreamhelper.cxx |    2 -
 10 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 54d6e9f7dcea00761a47121994dd9121f54e1798
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue May 3 11:20:57 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue May 3 16:00:02 2022 +0200

    Just use Any ctor instead of makeAny in unotools
    
    Change-Id: I58d2020035396da0b3580b058d87c8e2d3f2df40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133750
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/include/unotools/sharedunocomponent.hxx 
b/include/unotools/sharedunocomponent.hxx
index 169e899ca75b..8acc64b1f905 100644
--- a/include/unotools/sharedunocomponent.hxx
+++ b/include/unotools/sharedunocomponent.hxx
@@ -232,7 +232,7 @@ namespace utl
     template < class INTERFACE, class COMPONENT >
     inline css::uno::Any SAL_CALL makeAny( const SharedUNOComponent< 
INTERFACE, COMPONENT >& value )
     {
-        return makeAny( value.getTyped() );
+        return css::uno::Any( value.getTyped() );
     }
 
     template < class INTERFACE, class COMPONENT >
diff --git a/unotools/source/config/configmgr.cxx 
b/unotools/source/config/configmgr.cxx
index 5b109788d2cd..f3aef792e856 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -117,10 +117,10 @@ css::uno::Reference< 
css::container::XHierarchicalNameAccess >
 utl::ConfigManager::acquireTree(utl::ConfigItem const & item) {
     css::uno::Sequence< css::uno::Any > args{ 
css::uno::Any(css::beans::NamedValue(
         "nodepath",
-        css::uno::makeAny("/org.openoffice." + item.GetSubTreeName()))) };
+        css::uno::Any("/org.openoffice." + item.GetSubTreeName()))) };
     if (item.GetMode() & ConfigItemMode::AllLocales) {
         args.realloc(2);
-        args.getArray()[1] <<= css::beans::NamedValue("locale", 
css::uno::makeAny(OUString("*")));
+        args.getArray()[1] <<= css::beans::NamedValue("locale", 
css::uno::Any(OUString("*")));
     }
     return css::uno::Reference< css::container::XHierarchicalNameAccess >(
         getConfigurationProvider()->createInstanceWithArguments(
@@ -133,7 +133,7 @@ css::uno::Reference< 
css::container::XHierarchicalNameAccess >
 utl::ConfigManager::acquireTree(std::u16string_view rSubTreeName) {
     css::uno::Sequence< css::uno::Any > args{ 
css::uno::Any(css::beans::NamedValue(
         "nodepath",
-        css::uno::makeAny(OUString::Concat(u"/org.openoffice.") + 
rSubTreeName))) };
+        css::uno::Any(OUString::Concat(u"/org.openoffice.") + rSubTreeName))) 
};
     return css::uno::Reference< css::container::XHierarchicalNameAccess >(
         getConfigurationProvider()->createInstanceWithArguments(
             "com.sun.star.configuration.ConfigurationUpdateAccess",
diff --git a/unotools/source/config/confignode.cxx 
b/unotools/source/config/confignode.cxx
index b5669c7b485b..85aa6c3bada5 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -234,7 +234,7 @@ namespace utl
             try
             {
                 OUString sName = normalizeName(_rName, NO_CALLER);
-                m_xContainerAccess->insertByName(sName, makeAny(_xNode));
+                m_xContainerAccess->insertByName(sName, Any(_xNode));
                 // if we're here, all was ok ...
                 return OConfigurationNode( _xNode );
             }
diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index edbf5f5d6b7b..db5ef4087481 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -178,11 +178,11 @@ void AppendItem(EHistoryType eHistory,
             if (sThumbnail)
             {
                 // update the thumbnail
-                xSet->setPropertyValue(s_sThumbnail, 
uno::makeAny(*sThumbnail));
+                xSet->setPropertyValue(s_sThumbnail, uno::Any(*sThumbnail));
             }
             if (oIsReadOnly)
             {
-                xSet->setPropertyValue(s_sReadOnly, 
uno::makeAny(*oIsReadOnly));
+                xSet->setPropertyValue(s_sReadOnly, uno::Any(*oIsReadOnly));
             }
 
             for (sal_Int32 i=0; i<nLength; ++i)
@@ -202,10 +202,10 @@ void AppendItem(EHistoryType eHistory,
 
                         OUString sTemp;
                         xNextSet->getPropertyValue(s_sHistoryItemRef) >>= 
sTemp;
-                        xPrevSet->setPropertyValue(s_sHistoryItemRef, 
uno::makeAny(sTemp));
+                        xPrevSet->setPropertyValue(s_sHistoryItemRef, 
uno::Any(sTemp));
                     }
                     xOrderList->getByName(OUString::number(0)) >>= xSet;
-                    xSet->setPropertyValue(s_sHistoryItemRef, 
uno::makeAny(aItem));
+                    xSet->setPropertyValue(s_sHistoryItemRef, uno::Any(aItem));
                     break;
                 }
             }
@@ -249,7 +249,7 @@ void AppendItem(EHistoryType eHistory,
                 xFac.set(xOrderList, uno::UNO_QUERY);
                 xInst = xFac->createInstance();
                 OUString sPush = OUString::number(nLength++);
-                xOrderList->insertByName(sPush, uno::makeAny(xInst));
+                xOrderList->insertByName(sPush, uno::Any(xInst));
             }
             for (sal_Int32 j=nLength-1; j>0; --j)
             {
@@ -257,24 +257,24 @@ void AppendItem(EHistoryType eHistory,
                 xOrderList->getByName( OUString::number(j-1) ) >>= xNextSet;
                 OUString sTemp;
                 xNextSet->getPropertyValue(s_sHistoryItemRef) >>= sTemp;
-                xPrevSet->setPropertyValue(s_sHistoryItemRef, 
uno::makeAny(sTemp));
+                xPrevSet->setPropertyValue(s_sHistoryItemRef, uno::Any(sTemp));
             }
             xOrderList->getByName( OUString::number(0) ) >>= xSet;
-            xSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sURL));
+            xSet->setPropertyValue(s_sHistoryItemRef, uno::Any(sURL));
 
             // Append the item to ItemList.
             xFac.set(xItemList, uno::UNO_QUERY);
             xInst = xFac->createInstance();
-            xItemList->insertByName(sURL, uno::makeAny(xInst));
+            xItemList->insertByName(sURL, uno::Any(xInst));
 
             xSet.set(xInst, uno::UNO_QUERY);
-            xSet->setPropertyValue(s_sFilter, uno::makeAny(sFilter));
-            xSet->setPropertyValue(s_sTitle, uno::makeAny(sTitle));
-            xSet->setPropertyValue(s_sPassword, uno::makeAny(OUString()));
-            xSet->setPropertyValue(s_sThumbnail, 
uno::makeAny(sThumbnail.value_or(OUString())));
+            xSet->setPropertyValue(s_sFilter, uno::Any(sFilter));
+            xSet->setPropertyValue(s_sTitle, uno::Any(sTitle));
+            xSet->setPropertyValue(s_sPassword, uno::Any(OUString()));
+            xSet->setPropertyValue(s_sThumbnail, 
uno::Any(sThumbnail.value_or(OUString())));
             if (oIsReadOnly)
             {
-                xSet->setPropertyValue(s_sReadOnly, 
uno::makeAny(*oIsReadOnly));
+                xSet->setPropertyValue(s_sReadOnly, uno::Any(*oIsReadOnly));
             }
 
             ::comphelper::ConfigurationHelper::flush(xCfg);
@@ -333,7 +333,7 @@ void DeleteItem(EHistoryType eHistory, const OUString& sURL)
 
             OUString sTemp;
             xNextSet->getPropertyValue(s_sHistoryItemRef) >>= sTemp;
-            xPrevSet->setPropertyValue(s_sHistoryItemRef, uno::makeAny(sTemp));
+            xPrevSet->setPropertyValue(s_sHistoryItemRef, uno::Any(sTemp));
         }
         xOrderList->removeByName(OUString::number(nLength - 1));
 
diff --git a/unotools/source/config/useroptions.cxx 
b/unotools/source/config/useroptions.cxx
index d605e6662e18..86a42e84bae2 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -180,7 +180,7 @@ void SvtUserOptions::Impl::SetValue_Impl (UserOptToken 
nToken, ValueType const&
     try
     {
         if (m_xData.is())
-             
m_xData->setPropertyValue(OUString::createFromAscii(vOptionNames[nToken]), 
uno::makeAny(sToken));
+             
m_xData->setPropertyValue(OUString::createFromAscii(vOptionNames[nToken]), 
uno::Any(sToken));
         comphelper::ConfigurationHelper::flush(m_xCfg);
     }
     catch (uno::Exception const&)
diff --git a/unotools/source/config/viewoptions.cxx 
b/unotools/source/config/viewoptions.cxx
index de72225876e3..c94e683c08d0 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -175,7 +175,7 @@ void SvtViewOptions::SetWindowState( const OUString& sState 
)
         css::uno::Reference< css::beans::XPropertySet > xNode(
             impl_getSetNode(m_sViewName, true),
             css::uno::UNO_QUERY_THROW);
-        xNode->setPropertyValue(PROPERTY_WINDOWSTATE, 
css::uno::makeAny(sState));
+        xNode->setPropertyValue(PROPERTY_WINDOWSTATE, css::uno::Any(sState));
         ::comphelper::ConfigurationHelper::flush(m_xRoot);
     }
     catch(const css::uno::Exception&)
@@ -223,7 +223,7 @@ void SvtViewOptions::SetPageID(std::string_view rID)
         css::uno::Reference< css::beans::XPropertySet > xNode(
             impl_getSetNode(m_sViewName, true),
             css::uno::UNO_QUERY_THROW);
-        xNode->setPropertyValue(PROPERTY_PAGEID, 
css::uno::makeAny(OUString::fromUtf8(rID)));
+        xNode->setPropertyValue(PROPERTY_PAGEID, 
css::uno::Any(OUString::fromUtf8(rID)));
         ::comphelper::ConfigurationHelper::flush(m_xRoot);
     }
     catch(const css::uno::Exception&)
@@ -281,7 +281,7 @@ void SvtViewOptions::SetVisible( bool bVisible )
         css::uno::Reference< css::beans::XPropertySet > xNode(
             impl_getSetNode(m_sViewName, true),
             css::uno::UNO_QUERY_THROW);
-        xNode->setPropertyValue(PROPERTY_VISIBLE, css::uno::makeAny(bVisible));
+        xNode->setPropertyValue(PROPERTY_VISIBLE, css::uno::Any(bVisible));
         ::comphelper::ConfigurationHelper::flush(m_xRoot);
     }
     catch(const css::uno::Exception&)
diff --git a/unotools/source/misc/ZipPackageHelper.cxx 
b/unotools/source/misc/ZipPackageHelper.cxx
index b7a6d1883373..c66db01272fe 100644
--- a/unotools/source/misc/ZipPackageHelper.cxx
+++ b/unotools/source/misc/ZipPackageHelper.cxx
@@ -160,7 +160,7 @@ void ZipPackageHelper::addFile( css::uno::Reference< 
css::uno::XInterface > cons
         return;
 
     Reference< XNameContainer > xNameContainer(xRootFolder, UNO_QUERY );
-    xNameContainer->insertByName(encodeZipUri( aName ), makeAny(xTunnel));
+    xNameContainer->insertByName(encodeZipUri( aName ), Any(xTunnel));
     xSink->setInputStream( xInput );
 }
 
diff --git a/unotools/source/misc/mediadescriptor.cxx 
b/unotools/source/misc/mediadescriptor.cxx
index 55a066cfe58b..3b848817e891 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -311,7 +311,7 @@ bool MediaDescriptor::impl_openStreamWithPostData( const 
css::uno::Reference< cs
         aPostArgument.MediaType = sMediaType;
         aPostArgument.Referer = getUnpackedValueOrDefault( PROP_REFERRER, 
OUString() );
 
-        aContent.executeCommand( "post", css::uno::makeAny( aPostArgument ) );
+        aContent.executeCommand( "post", css::uno::Any( aPostArgument ) );
 
         // get result
         xResultStream = xSink->getInputStream();
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx 
b/unotools/source/ucbhelper/ucbhelper.cxx
index 9ce532ab3e3e..4878ec1ce231 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -193,7 +193,7 @@ bool utl::UCBContentHelper::Kill(OUString const & url) {
     try {
         content(url).executeCommand(
             "delete",
-            css::uno::makeAny(true));
+            css::uno::Any(true));
         return true;
     } catch (css::uno::RuntimeException const &) {
         throw;
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx 
b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 236dce916550..e3437a864fbf 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -60,7 +60,7 @@ static std::unique_ptr<SvStream> lcl_CreateStream( const 
OUString& rFileName, St
                 ::ucbhelper::Content aCnt(
                     rFileName, Reference < XCommandEnvironment >(),
                     comphelper::getProcessComponentContext() );
-                aCnt.executeCommand( "delete", css::uno::makeAny( true ) );
+                aCnt.executeCommand( "delete", css::uno::Any( true ) );
             }
 
             catch ( const CommandAbortedException& )

Reply via email to