summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxwindow.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-10-24 00:49:27 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-24 14:45:19 +0200
commit86192438d16ec160d6b59d08735e770ee05ac113 (patch)
tree25dbb9dde6631d49b0ea8483c8f3018def3ddd0d /toolkit/source/awt/vclxwindow.cxx
parent6f50961e69406a17d6ec998956a6b33208b1001b (diff)
Simplify containers iterations in test..tools
Use range-based loop or replace with STL functions. Change-Id: If8fac9236a4696c8e56c0e81c60c429782581b96 Reviewed-on: https://gerrit.libreoffice.org/62262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx31
1 files changed, 12 insertions, 19 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index eb3df832c972..9843cd863cd2 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -291,12 +291,9 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, void)
{
SAL_INFO("toolkit.controls", "OnProcessCallbacks relinquished solarmutex");
SolarMutexReleaser aReleaseSolar;
- for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
- loop != aCallbacksCopy.end();
- ++loop
- )
+ for (const auto& rCallback : aCallbacksCopy)
{
- (*loop)();
+ rCallback();
}
}
}
@@ -1330,20 +1327,16 @@ void VCLXWindow::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds, bool bWith
// lovely hack from:
// void UnoControlModel::ImplRegisterProperty( sal_uInt16 nPropId )
- std::vector< sal_uInt16 >::const_iterator iter;
- for( iter = rIds.begin(); iter != rIds.end(); ++iter) {
- if( *iter == BASEPROPERTY_FONTDESCRIPTOR )
- {
- // some properties are not included in the FontDescriptor, but every time
- // when we have a FontDescriptor we want to have these properties too.
- // => Easier to register the here, instead everywhere where I register the FontDescriptor...
-
- rIds.push_back( BASEPROPERTY_TEXTCOLOR );
- rIds.push_back( BASEPROPERTY_TEXTLINECOLOR );
- rIds.push_back( BASEPROPERTY_FONTRELIEF );
- rIds.push_back( BASEPROPERTY_FONTEMPHASISMARK );
- break;
- }
+ if( std::find(rIds.begin(), rIds.end(), BASEPROPERTY_FONTDESCRIPTOR) != rIds.end() )
+ {
+ // some properties are not included in the FontDescriptor, but every time
+ // when we have a FontDescriptor we want to have these properties too.
+ // => Easier to register the here, instead everywhere where I register the FontDescriptor...
+
+ rIds.push_back( BASEPROPERTY_TEXTCOLOR );
+ rIds.push_back( BASEPROPERTY_TEXTLINECOLOR );
+ rIds.push_back( BASEPROPERTY_FONTRELIEF );
+ rIds.push_back( BASEPROPERTY_FONTEMPHASISMARK );
}
}