diff options
Diffstat (limited to 'sw/source/filter/ww8/wrtw8nds.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 01bd84f1e6e1..faf6002853a6 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -602,9 +602,10 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const { const SfxPoolItem* pRet = 0; const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); - xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top(); - if (pTxtAttrs) + + if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size()) { + xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top(); for (USHORT i = 0; i < pTxtAttrs->Count(); ++i) { const SwTxtAttr* pHt = (*pTxtAttrs)[i]; @@ -1821,7 +1822,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); if ( ch == CH_TXT_ATR_FIELDSTART ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos + 1 ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); @@ -1873,9 +1874,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } else if ( ch == CH_TXT_ATR_FIELDEND ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos - 1 ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); - OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); + OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); ww::eField eFieldId = lcl_getFieldId( pFieldmark ); if ( pFieldmark->GetFieldname().equalsAscii( ODF_UNHANDLED ) ) |