[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Wed Feb 4 03:05:32 PST 2015
sw/source/uibase/dbui/mmconfigitem.cxx | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit fc1953362d93721668b4f835eafef4e6c1fe4eea
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Feb 3 15:48:43 2015 +0100
sw: convert legacy assertions in mmconfigitem.cxx
Change-Id: Ief76c578aaddbeada7f436373879a6dbbd11908f
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 341fcd8..f4efd1a 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -211,7 +211,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
const Sequence<OUString>& rNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(rNames);
const Any* pValues = aValues.getConstArray();
- OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ assert(aValues.getLength() == rNames.getLength());
if(aValues.getLength() == rNames.getLength())
{
for(int nProp = 0; nProp < rNames.getLength(); nProp++)
@@ -421,7 +421,7 @@ static void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHead
}
else
{
- OSL_FAIL("parse error in address block or greeting line");
+ SAL_WARN("sw.ui", "parse error in address block or greeting line");
}
}
else
@@ -906,18 +906,18 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->sFilter.isEmpty()));
xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->sFilter));
}
- catch (const Exception&)
+ catch (const Exception& e)
{
- OSL_FAIL("exception caught in xResultSet->SetFilter()");
+ SAL_WARN("sw.ui", "exception caught: " << e.Message);
}
xRowSet->execute();
m_pImpl->xResultSet = xRowSet.get();
m_pImpl->xResultSet->first();
m_pImpl->nResultSetCursorPos = 1;
}
- catch (const Exception&)
+ catch (const Exception& e)
{
- OSL_FAIL("exception caught in: SwMailMergeConfigItem::GetResultSet() ");
+ SAL_WARN("sw.ui", "exception caught in: SwMailMergeConfigItem::GetResultSet() " << e.Message);
}
}
return m_pImpl->xResultSet;
@@ -953,9 +953,9 @@ void SwMailMergeConfigItem::SetFilter(OUString& rFilter)
uno::Reference<XRowSet> xRowSet( m_pImpl->xResultSet, UNO_QUERY_THROW );
xRowSet->execute();
}
- catch (const Exception&)
+ catch (const Exception& e)
{
- OSL_FAIL("exception caught in SwMailMergeConfigItem::SetFilter()");
+ SAL_WARN("sw.ui", "exception caught in SwMailMergeConfigItem::SetFilter(): " << e.Message);
}
}
}
@@ -1612,7 +1612,7 @@ void SwMailMergeConfigItem::AddMergedDocument(SwDocMergeInfo& rInfo)
SwDocMergeInfo& SwMailMergeConfigItem::GetDocumentMergeInfo(sal_uInt32 nDocument)
{
- OSL_ENSURE(m_pImpl->aMergeInfos.size() > nDocument,"invalid document index");
+ assert(nDocument < m_pImpl->aMergeInfos.size());
return m_pImpl->aMergeInfos[nDocument];
}
More information about the Libreoffice-commits
mailing list