summaryrefslogtreecommitdiff
path: root/fpicker/source/office
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-02-16 18:39:23 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-18 07:41:05 +0100
commit44841a6778821be3e68ab15819b39064b20e968f (patch)
tree8e9119cf35764f18f5b008e7758c6f950306fb8c /fpicker/source/office
parentbcfbd24be02d2de5d4d27c147dc58c4515a9a0f5 (diff)
Simplify containers iterations in [f-l]*
Use range-based loop or replace with STL functions Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f Reviewed-on: https://gerrit.libreoffice.org/67914 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker/source/office')
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx12
-rw-r--r--fpicker/source/office/iodlg.cxx7
2 files changed, 3 insertions, 16 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index e5fc93325a0d..dd6712541722 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -573,17 +573,7 @@ Sequence< OUString > SAL_CALL SvtFilePicker::getSelectedFiles()
return aEmpty;
}
- std::vector<OUString> aPathList(getDialog()->GetPathList());
- size_t nCount = aPathList.size();
-
- Sequence< OUString > aFiles(nCount);
-
- for(size_t i = 0; i < aPathList.size(); ++i)
- {
- aFiles[i] = aPathList[i];
- }
-
- return aFiles;
+ return comphelper::containerToSequence(getDialog()->GetPathList());
}
Sequence< OUString > SAL_CALL SvtFilePicker::getFiles()
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 8064dca1c8fe..b3e5ace8c95d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1767,12 +1767,9 @@ void SvtFileDialog::EnableUI( bool _bEnable )
if ( _bEnable )
{
- for ( auto aLoop = m_aDisabledControls.begin();
- aLoop != m_aDisabledControls.end();
- ++aLoop
- )
+ for ( auto& rxControl : m_aDisabledControls )
{
- (*aLoop)->Enable( false );
+ rxControl->Enable( false );
}
}
}