diff options
Diffstat (limited to 'sw/source/filter/ww8/wrtw8nds.cxx')
-rwxr-xr-x[-rw-r--r--] | sw/source/filter/ww8/wrtw8nds.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7f5e0eaae54e..7f6fe64a5eea 100644..100755 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -107,6 +107,7 @@ #include <ndgrf.hxx> #include <ndole.hxx> + #include <cstdio> using namespace ::com::sun::star; @@ -575,7 +576,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos ) characters. */ if ( !m_rExport.HackIsWW8OrHigher() ) - aFont.GetCharSet() = GetCharSet(); + aFont.SetCharSet( GetCharSet() ); if ( rParentFont != aFont ) m_rExport.AttrOutput().OutputItem( aFont ); @@ -1650,12 +1651,13 @@ xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& { // Get the bookmarks for the normal run xub_StrLen nNextPos = aAttrIter->WhereNext(); - - GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos ); - xub_StrLen nNextBookmark = nNextPos; - NearestBookmark( nNextPos, nAktPos, false ); + if( nNextBookmark > nAktPos )//no need to search for bookmarks otherwise + { + GetSortedBookmarks( rNode, nAktPos, nNextBookmark - nAktPos ); + NearestBookmark( nNextBookmark, nAktPos, false ); + } return std::min( nNextPos, nNextBookmark ); } @@ -1663,9 +1665,9 @@ void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen nAktPos { xub_StrLen nNextPos; - // go to next attribute if no bookmark is found of if the bookmark is behind the next attribute position + // go to next attribute if no bookmark is found and if the next attribute position if at the current position bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true ); - if( !bNextBookmark || nNextPos < aAttrIter->WhereNext() ) + if( !bNextBookmark && nAktPos >= aAttrIter->WhereNext() ) aAttrIter->NextPos(); } @@ -2837,8 +2839,12 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode ) switch ( rNode.GetNodeType() ) { case ND_TEXTNODE: - OutputTextNode( *rNode.GetTxtNode() ); - break; + { + const SwTxtNode& rTextNode = *rNode.GetTxtNode(); + if( !mbOutOutlineOnly || rTextNode.IsOutline() ) + OutputTextNode( rTextNode ); + } + break; case ND_GRFNODE: OutputGrfNode( *rNode.GetGrfNode() ); break; |