diff options
author | Chirag Manwani <cmkmanwani@gmail.com> | 2016-03-04 18:03:41 +0530 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-07 06:33:10 +0000 |
commit | cbbeb771ba3df1d87a69d2115234d88f520ce0e6 (patch) | |
tree | 0bb3cd6aa8adfee1f80decaa78009cb87c85960c /svtools | |
parent | eb0774032011e45bf97f3102bf2005b4ae85f07d (diff) |
tdf#96099 Reduce number of trivial typedefs
Change-Id: I39e9fcfdf2203239ac56d1c8195ca7ac07054817
Reviewed-on: https://gerrit.libreoffice.org/22898
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 5865140fa089..073d8901f027 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -69,7 +69,6 @@ namespace svt using namespace ::comphelper; using namespace ::utl; - typedef std::vector<OUString> StringArray; typedef std::set<OUString> StringBag; typedef std::map<OUString, OUString> MapString2String; @@ -455,11 +454,11 @@ void AssignmentPersistentData::ImplCommit() bool bWorkingPersistent : 1; /// the strings to use as labels for the field selection listboxes - StringArray aFieldLabels; + std::vector<OUString> aFieldLabels; // the current field assignment - StringArray aFieldAssignments; + std::vector<OUString> aFieldAssignments; /// the logical field names - StringArray aLogicalFieldNames; + std::vector<OUString> aLogicalFieldNames; IAssigmentData* pConfigData; @@ -591,7 +590,7 @@ void AssignmentPersistentData::ImplCommit() long nLabelWidth = 0; long nListBoxWidth = m_pImpl->pFields[0]->approximate_char_width() * 20; - for (StringArray::const_iterator aI = m_pImpl->aFieldLabels.begin(), aEnd = m_pImpl->aFieldLabels.end(); aI != aEnd; ++aI) + for (auto aI = m_pImpl->aFieldLabels.cbegin(), aEnd = m_pImpl->aFieldLabels.cend(); aI != aEnd; ++aI) { nLabelWidth = std::max(nLabelWidth, FixedText::getTextDimensions(m_pImpl->pFieldLabels[0], *aI, 0x7FFFFFFF).Width()); } @@ -676,8 +675,8 @@ void AssignmentPersistentData::ImplCommit() AliasProgrammaticPair* pPair = _rMapping.getArray(); OUString sCurrent; - for ( StringArray::const_iterator aProgrammatic = m_pImpl->aLogicalFieldNames.begin(); - aProgrammatic != m_pImpl->aLogicalFieldNames.end(); + for ( auto aProgrammatic = m_pImpl->aLogicalFieldNames.cbegin(); + aProgrammatic != m_pImpl->aLogicalFieldNames.cend(); ++aProgrammatic ) { @@ -713,8 +712,8 @@ void AssignmentPersistentData::ImplCommit() // AddressBookSourceDialog::loadConfiguration: inconsistence between field names and field assignments! assert(m_pImpl->aLogicalFieldNames.size() == m_pImpl->aFieldAssignments.size()); - StringArray::const_iterator aLogical = m_pImpl->aLogicalFieldNames.begin(); - StringArray::iterator aAssignment = m_pImpl->aFieldAssignments.begin(); + auto aLogical = m_pImpl->aLogicalFieldNames.cbegin(); + auto aAssignment = m_pImpl->aFieldAssignments.begin(); for ( ; aLogical != m_pImpl->aLogicalFieldNames.end(); ++aLogical, ++aAssignment @@ -963,7 +962,7 @@ void AssignmentPersistentData::ImplCommit() } // adjust m_pImpl->aFieldAssignments - for ( StringArray::iterator aAdjust = m_pImpl->aFieldAssignments.begin(); + for ( auto aAdjust = m_pImpl->aFieldAssignments.begin(); aAdjust != m_pImpl->aFieldAssignments.end(); ++aAdjust ) @@ -1000,8 +999,8 @@ void AssignmentPersistentData::ImplCommit() // for the new texts VclPtr<FixedText>* pLeftLabelControl = m_pImpl->pFieldLabels; VclPtr<FixedText>* pRightLabelControl = pLeftLabelControl + 1; - StringArray::const_iterator pLeftColumnLabel = m_pImpl->aFieldLabels.begin() + 2 * _nPos; - StringArray::const_iterator pRightColumnLabel = pLeftColumnLabel + 1; + auto pLeftColumnLabel = m_pImpl->aFieldLabels.cbegin() + 2 * _nPos; + auto pRightColumnLabel = pLeftColumnLabel + 1; // for the focus movement and the selection scroll VclPtr<ListBox>* pLeftListControl = m_pImpl->pFields; @@ -1012,8 +1011,8 @@ void AssignmentPersistentData::ImplCommit() sal_Int32 nOldFocusColumn = 0; // for the selection scroll - StringArray::const_iterator pLeftAssignment = m_pImpl->aFieldAssignments.begin() + 2 * _nPos; - StringArray::const_iterator pRightAssignment = pLeftAssignment + 1; + auto pLeftAssignment = m_pImpl->aFieldAssignments.cbegin() + 2 * _nPos; + auto pRightAssignment = pLeftAssignment + 1; m_pImpl->nLastVisibleListIndex = -1; // loop @@ -1153,8 +1152,8 @@ void AssignmentPersistentData::ImplCommit() assert(m_pImpl->aLogicalFieldNames.size() == m_pImpl->aFieldAssignments.size()); // set the field assignments - StringArray::const_iterator aLogical = m_pImpl->aLogicalFieldNames.begin(); - StringArray::const_iterator aAssignment = m_pImpl->aFieldAssignments.begin(); + auto aLogical = m_pImpl->aLogicalFieldNames.cbegin(); + auto aAssignment = m_pImpl->aFieldAssignments.cbegin(); for ( ; aLogical != m_pImpl->aLogicalFieldNames.end(); ++aLogical, ++aAssignment |