summaryrefslogtreecommitdiff
path: root/svtools/source/dialogs/addresstemplate.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-08-11 23:07:20 +0200
committerTor Lillqvist <tml@iki.fi>2013-08-12 07:22:24 +0000
commit38aad8c3a73b748672f551e7b8efe9fa3a7c8834 (patch)
tree93704579217658472ceb9ea2803531d2c652a306 /svtools/source/dialogs/addresstemplate.cxx
parentd1ffad798379449074d31b45c76f9570ca054f1f (diff)
Try to robustify addresstemplate a bit
Change-Id: Ib685747e249e0ea25ab770d4f3ad70d0f8066dcf Reviewed-on: https://gerrit.libreoffice.org/5353 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'svtools/source/dialogs/addresstemplate.cxx')
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index f71510092d69..427a09ee1ea5 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -754,13 +754,13 @@ void AssignmentPersistentData::Commit()
// we ignore the CommandType: only tables are supported
// the logical names for the fields
- DBG_ASSERT(m_pImpl->aLogicalFieldNames.size() == m_pImpl->aFieldAssignments.size(),
- "AddressBookSourceDialog::loadConfiguration: inconsistence between field names and field assignments!");
+ // AddressBookSourceDialog::loadConfiguration: inconsistence between field names and field assignments!
+ assert(m_pImpl->aLogicalFieldNames.size() == m_pImpl->aFieldAssignments.size());
ConstStringArrayIterator aLogical = m_pImpl->aLogicalFieldNames.begin();
StringArrayIterator aAssignment = m_pImpl->aFieldAssignments.begin();
for ( ;
- aLogical < m_pImpl->aLogicalFieldNames.end();
+ aLogical != m_pImpl->aLogicalFieldNames.end();
++aLogical, ++aAssignment
)
*aAssignment = m_pImpl->pConfigData->getFieldAssignment(*aLogical);
@@ -1187,11 +1187,14 @@ void AssignmentPersistentData::Commit()
m_pImpl->pConfigData->setCommand(m_pTable->GetText());
}
+ // AddressBookSourceDialog::loadConfiguration: inconsistence between field names and field assignments!
+ assert(m_pImpl->aLogicalFieldNames.size() == m_pImpl->aFieldAssignments.size());
+
// set the field assignments
ConstStringArrayIterator aLogical = m_pImpl->aLogicalFieldNames.begin();
ConstStringArrayIterator aAssignment = m_pImpl->aFieldAssignments.begin();
for ( ;
- aLogical < m_pImpl->aLogicalFieldNames.end();
+ aLogical != m_pImpl->aLogicalFieldNames.end();
++aLogical, ++aAssignment
)
m_pImpl->pConfigData->setFieldAssignment(*aLogical, *aAssignment);