[Libreoffice-commits] core.git: svtools/source
Julien Nabet
serval2412 at yahoo.fr
Mon Aug 12 00:22:46 PDT 2013
svtools/source/dialogs/addresstemplate.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 38aad8c3a73b748672f551e7b8efe9fa3a7c8834
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Aug 11 23:07:20 2013 +0200
Try to robustify addresstemplate a bit
Change-Id: Ib685747e249e0ea25ab770d4f3ad70d0f8066dcf
Reviewed-on: https://gerrit.libreoffice.org/5353
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Tor Lillqvist <tml at iki.fi>
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index f715100..427a09e 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);
More information about the Libreoffice-commits
mailing list