diff options
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 43 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfmte.cxx | 6 |
3 files changed, 40 insertions, 23 deletions
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index aaa640de0ef4..e21433271845 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -158,7 +158,7 @@ ULONG SwReader::Read( const Reader& rOptions ) SwNodeIndex aSplitIdx( pDoc->GetNodes() ); RedlineMode_t eOld = pDoc->GetRedlineMode(); - pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); + RedlineMode_t ePostReadRedlineMode( nsRedlineMode_t::REDLINE_IGNORE ); // Array von FlyFormaten SwSpzFrmFmts aFlyFrmArr; @@ -170,6 +170,8 @@ ULONG SwReader::Read( const Reader& rOptions ) if( bSaveUndo ) pUndo = new SwUndoInsDoc( *pPam ); + pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); + SwPaM* pUndoPam = 0; if( bDocUndo || pCrsr ) { @@ -190,8 +192,15 @@ ULONG SwReader::Read( const Reader& rOptions ) xub_StrLen nEndCntnt = pCNd ? pCNd->Len() - nSttCntnt : 0; SwNodeIndex aEndPos( pPam->GetPoint()->nNode, 1 ); + pDoc->SetRedlineMode_intern( eOld ); + nError = po->Read( *pDoc, GetBaseURL(), *pPam, aFileName ); + // an ODF document may contain redline mode in settings.xml; save it! + ePostReadRedlineMode = pDoc->GetRedlineMode(); + + pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); + if( !IsError( nError )) // dann setzen wir das Ende mal richtig { aEndPos--; @@ -230,13 +239,27 @@ ULONG SwReader::Read( const Reader& rOptions ) const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); if( USHRT_MAX == aFlyFrmArr.GetPos( pFrmFmt) ) { - if( FLY_PAGE == rAnchor.GetAnchorId() || - ( FLY_AT_CNTNT == rAnchor.GetAnchorId() && - rAnchor.GetCntntAnchor() && - ( pUndoPam->GetPoint()->nNode == - rAnchor.GetCntntAnchor()->nNode || - pUndoPam->GetMark()->nNode == - rAnchor.GetCntntAnchor()->nNode ) ) ) + SwPosition const*const pFrameAnchor( + rAnchor.GetCntntAnchor()); + if ( (FLY_PAGE == rAnchor.GetAnchorId()) + || ( pFrameAnchor + && ( ( (FLY_AT_CNTNT == rAnchor.GetAnchorId()) + && ( (pUndoPam->GetPoint()->nNode == + pFrameAnchor->nNode) + || (pUndoPam->GetMark()->nNode == + pFrameAnchor->nNode) + ) + ) + // #i97570# also check frames anchored AT char + || ( (FLY_AUTO_CNTNT == rAnchor.GetAnchorId()) + && !IsDestroyFrameAnchoredAtChar( + *pFrameAnchor, + *pUndoPam->GetPoint(), + *pUndoPam->GetMark()) + ) + ) + ) + ) { if( bChkHeaderFooter && FLY_AT_CNTNT == rAnchor.GetAnchorId() && @@ -351,7 +374,9 @@ ULONG SwReader::Read( const Reader& rOptions ) pDoc->UpdateLinks( TRUE ); // <-- - eOld = (RedlineMode_t)(pDoc->GetRedlineMode() & ~nsRedlineMode_t::REDLINE_IGNORE); + // not insert: set the redline mode read from settings.xml + eOld = static_cast<RedlineMode_t>( + ePostReadRedlineMode & ~nsRedlineMode_t::REDLINE_IGNORE); pDoc->SetFieldsDirty(false, NULL, 0); } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 0c2a5cec8f71..cd3c5d1734d4 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -41,13 +41,9 @@ #include <com/sun/star/xforms/XFormsSupplier.hpp> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> -#ifndef _XMLGRHLP_HXX -#ifndef _XMLGRHLP_HXX #include <svx/xmlgrhlp.hxx> -#endif #include <svx/xmleohlp.hxx> #include <svx/xmlgrhlp.hxx> -#endif #include <svx/eeitem.hxx> #include <svx/svddef.hxx> #include <xmloff/nmspmap.hxx> @@ -66,9 +62,7 @@ #include <xmltexte.hxx> #include <xmlexp.hxx> #include <sfx2/viewsh.hxx> -#ifndef _COMPHELPER_PROCESSFACTORYHXX_ #include <comphelper/processfactory.hxx> -#endif #include <docary.hxx> #include <svx/unolingu.hxx> #include <svx/forbiddencharacterstable.hxx> @@ -326,13 +320,15 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) // figures given above // The styles in pDoc also count the default style that never // gets exported -> subtract one. - sal_Int32 nRef = 1; + sal_Int32 nRef = 1; // meta.xml nRef += pDoc->GetCharFmts()->Count() - 1; nRef += pDoc->GetFrmFmts()->Count() - 1; nRef += pDoc->GetTxtFmtColls()->Count() - 1; // nRef += pDoc->GetPageDescCnt(); - nRef += aDocStat.nPara; - pProgress->SetReference( 2*nRef ); + nRef *= 2; // for the above styles, xmloff will increment by 2! + // #i93174#: count all paragraphs for the progress bar + nRef += aDocStat.nAllPara; // 1: only content, no autostyle + pProgress->SetReference( nRef ); pProgress->SetValue( 0 ); } } diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index f4a4a676c9a2..8a2586392a30 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -38,16 +38,11 @@ #include "xmlexpit.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/XMLTextListAutoStylePool.hxx> -#ifndef _XMLOFF_XMLTEXTMASTERPAGEEXPORT #include <xmloff/XMLTextMasterPageExport.hxx> -#endif -#ifndef _XMLOFF_TXTPRMAP_HXX #include <xmloff/txtprmap.hxx> -#endif #include <xmloff/xmlaustp.hxx> #include <xmloff/families.hxx> -#include <xmloff/ProgressBarHelper.hxx> #include <format.hxx> #include <fmtpdsc.hxx> #include <pagedesc.hxx> @@ -58,6 +53,7 @@ #include "xmlexp.hxx" #include <SwStyleNameMapper.hxx> + using ::rtl::OUString; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; |