summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/documentlinkmgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-06 10:14:38 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2016-05-07 12:24:31 +0000
commit9613b493172fe9aa8efd9c9c090f82ca2e89cf21 (patch)
tree3cc0d212aea1de270160e295a70c9f08f2e84334 /sc/source/ui/docshell/documentlinkmgr.cxx
parent464348e82d8cbb0a6d3e5638da3f737f3e6f2d00 (diff)
clang-tidy modernize-loop-convert in sc
Change-Id: I620028d69b11ea0469efd7b02ac7bbc7edab1066 Reviewed-on: https://gerrit.libreoffice.org/24690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'sc/source/ui/docshell/documentlinkmgr.cxx')
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index 3b17a662f271..02f00e9068df 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -98,9 +98,9 @@ bool DocumentLinkManager::idleCheckLinks()
bool bAnyLeft = false;
const sfx2::SvBaseLinks& rLinks = mpImpl->mpLinkManager->GetLinks();
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- sfx2::SvBaseLink* pBase = rLinks[i].get();
+ sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (!pDdeLink || !pDdeLink->NeedsUpdate())
continue;
@@ -119,9 +119,9 @@ bool DocumentLinkManager::hasDdeLinks() const
return false;
const sfx2::SvBaseLinks& rLinks = mpImpl->mpLinkManager->GetLinks();
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- sfx2::SvBaseLink* pBase = rLinks[i].get();
+ sfx2::SvBaseLink* pBase = rLink.get();
if (dynamic_cast<ScDdeLink*>(pBase))
return true;
}
@@ -140,9 +140,9 @@ bool DocumentLinkManager::updateDdeLinks( vcl::Window* pWin )
// If the update takes longer, reset all values so that nothing
// old (wrong) is left behind
bool bAny = false;
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- sfx2::SvBaseLink* pBase = rLinks[i].get();
+ sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (!pDdeLink)
continue;
@@ -183,9 +183,9 @@ void DocumentLinkManager::updateDdeLink( const OUString& rAppl, const OUString&
sfx2::LinkManager* pMgr = mpImpl->mpLinkManager.get();
const sfx2::SvBaseLinks& rLinks = pMgr->GetLinks();
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- ::sfx2::SvBaseLink* pBase = rLinks[i].get();
+ ::sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (!pDdeLink)
continue;
@@ -207,9 +207,9 @@ size_t DocumentLinkManager::getDdeLinkCount() const
size_t nDdeCount = 0;
const sfx2::SvBaseLinks& rLinks = mpImpl->mpLinkManager->GetLinks();
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- ::sfx2::SvBaseLink* pBase = rLinks[i].get();
+ ::sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (!pDdeLink)
continue;
@@ -226,9 +226,9 @@ void DocumentLinkManager::disconnectDdeLinks()
return;
const sfx2::SvBaseLinks& rLinks = mpImpl->mpLinkManager->GetLinks();
- for (size_t i = 0, n = rLinks.size(); i < n; ++i)
+ for (const auto & rLink : rLinks)
{
- ::sfx2::SvBaseLink* pBase = rLinks[i].get();
+ ::sfx2::SvBaseLink* pBase = rLink.get();
ScDdeLink* pDdeLink = dynamic_cast<ScDdeLink*>(pBase);
if (pDdeLink)
pDdeLink->Disconnect();