summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-27 15:42:54 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-01-27 12:43:48 +0100
commit0fa827dbb2147d1d3850b2181eb6ab6a02a04500 (patch)
tree721d02c64c26365e605a2348fd1ff744c4dd8d29 /embeddedobj
parentdb227dc7d032d642983c313ab74c34a301464c2a (diff)
Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx4
-rw-r--r--embeddedobj/source/general/docholder.cxx2
-rw-r--r--embeddedobj/source/general/xcreator.cxx2
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx6
-rw-r--r--embeddedobj/source/msole/oleembed.cxx2
-rw-r--r--embeddedobj/source/msole/ownview.cxx4
8 files changed, 12 insertions, 12 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index ef627941921e..0b3843852e58 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -513,7 +513,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState )
StateChangeNotification_Impl( true, nOldState, nNewState,aGuard );
try {
- for ( sal_Int32 state : std::as_const(aIntermediateStates) )
+ for (sal_Int32 state : aIntermediateStates)
SwitchStateTo_Impl( state );
SwitchStateTo_Impl( nNewState );
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 3ccaafcdc286..f34a35a2c1ac 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -140,7 +140,7 @@ void OCommonEmbeddedObject::CommonInit_Impl( const uno::Sequence< beans::NamedVa
throw uno::RuntimeException(); // something goes really wrong
// verbs table
- for ( auto const & verb : std::as_const(m_aObjectVerbs) )
+ for (auto const& verb : m_aObjectVerbs)
{
if ( verb.VerbID == embed::EmbedVerbs::MS_OLEVERB_PRIMARY )
{
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 1460b31fd54b..cdc6d94b351b 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -275,7 +275,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
// check if there is URL, URL must exist
OUString aURL;
- for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) )
+ for (beans::PropertyValue const& prop : aTempMedDescr)
if ( prop.Name == "URL" )
prop.Value >>= aURL;
@@ -332,7 +332,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Sequence< beans::PropertyValue > aTempMedDescr( lArguments );
OUString aURL;
- for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) )
+ for (beans::PropertyValue const& prop : aTempMedDescr)
if ( prop.Name == "URL" )
prop.Value >>= aURL;
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 824ee2c1d4c9..08ad9cfdd271 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -561,7 +561,7 @@ void DocumentHolder::FindConnectPoints(
uno::Sequence< beans::PropertyValue > aProps;
xMenu->getByIndex( nInd ) >>= aProps;
OUString aCommand;
- for ( beans::PropertyValue const & prop : std::as_const(aProps) )
+ for (beans::PropertyValue const& prop : aProps)
if ( prop.Name == "CommandURL" )
{
prop.Value >>= aCommand;
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index c9151827a65f..bceaab63c752 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -349,7 +349,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
// check if there is URL, URL must exist
OUString aURL;
- for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) )
+ for (beans::PropertyValue const& prop : aTempMedDescr)
if ( prop.Name == "URL" )
prop.Value >>= aURL;
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index f981a4304656..a38f59550c5e 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -248,7 +248,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium,
if ( pBuf && !bAnyIsReady )
{
- for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) )
+ for (auto const& supportedFormat : m_aSupportedGraphFormats)
if ( aFlavor.MimeType.match( supportedFormat.MimeType )
&& aFlavor.DataType == supportedFormat.DataType
&& aFlavor.DataType == cppu::UnoType<uno::Sequence< sal_Int8 >>::get() )
@@ -266,7 +266,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium,
bool OleComponentNative_Impl::GraphicalFlavor( const datatransfer::DataFlavor& aFlavor )
{
// Actually all the required graphical formats must be supported
- for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) )
+ for (auto const& supportedFormat : m_aSupportedGraphFormats)
if ( aFlavor.MimeType.match( supportedFormat.MimeType )
&& aFlavor.DataType == supportedFormat.DataType )
return true;
@@ -1559,7 +1559,7 @@ sal_Bool SAL_CALL OleComponent::isDataFlavorSupported( const datatransfer::DataF
RetrieveObjectDataFlavors_Impl();
}
- for ( auto const & supportedFormat : std::as_const(m_aDataFlavors) )
+ for (auto const& supportedFormat : m_aDataFlavors)
if ( supportedFormat.MimeType.equals( aFlavor.MimeType ) && supportedFormat.DataType == aFlavor.DataType )
return true;
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 2bc6cdb6066b..8379a78693f1 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -277,7 +277,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >&
uno::Sequence< beans::PropertyValue > aFilterData;
if ( aFilterAnyData >>= aFilterData )
{
- for ( beans::PropertyValue const & prop : std::as_const(aFilterData) )
+ for (beans::PropertyValue const& prop : aFilterData)
if ( prop.Name == "DocumentService" )
prop.Value >>= aDocServiceName;
}
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 5576f8633cce..66dcab3b45fd 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -207,7 +207,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
aTypeName = xTypeDetection->queryTypeByDescriptor( aArgs, true );
OUString aFilterName;
- for ( beans::PropertyValue const & prop : std::as_const(aArgs) )
+ for (beans::PropertyValue const& prop : aArgs)
if ( prop.Name == "FilterName" )
prop.Value >>= aFilterName;
@@ -219,7 +219,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
if ( xNameAccess.is() && ( xNameAccess->getByName( aTypeName ) >>= aTypes ) )
{
- for ( beans::PropertyValue const & prop : std::as_const(aTypes) )
+ for (beans::PropertyValue const& prop : aTypes)
{
if ( prop.Name == "PreferredFilter" && ( prop.Value >>= aFilterName ) )
{