tdf#43157 Clean up OSL_ENSURE in FontTable.cxx

Clean up OSL_ENSURE in FontTable.cxx.

Change-Id: Ibe0b58d00ac5cd63e6227f5d73e70fd1785aa694
Reviewed-on: https://gerrit.libreoffice.org/28640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
drazil
2016-09-03 15:40:25 +08:00
committed by Miklos Vajna
parent d3035126aa
commit 12c11e6578

View File

@@ -53,7 +53,7 @@ FontTable::~FontTable()
void FontTable::lcl_attribute(Id Name, Value & val)
{
OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here");
SAL_WARN_IF( !m_pImpl->pCurrentEntry, "writerfilter.dmapper", "current entry has to be set here" );
if(!m_pImpl->pCurrentEntry)
return ;
int nIntValue = val.getInt();
@@ -104,7 +104,7 @@ void FontTable::lcl_attribute(Id Name, Value & val)
void FontTable::lcl_sprm(Sprm& rSprm)
{
OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here");
SAL_WARN_IF( !m_pImpl->pCurrentEntry, "writerfilter.dmapper", "current entry has to be set here" );
if(!m_pImpl->pCurrentEntry)
return ;
sal_uInt32 nSprmId = rSprm.getId();
@@ -158,7 +158,7 @@ void FontTable::resolveSprm(Sprm & r_Sprm)
void FontTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
{
//create a new font entry
OSL_ENSURE( !m_pImpl->pCurrentEntry, "current entry has to be NULL here");
SAL_WARN_IF( m_pImpl->pCurrentEntry, "writerfilter.dmapper", "current entry has to be NULL here" );
m_pImpl->pCurrentEntry.reset(new FontEntry);
ref->resolve(*this);
//append it to the table