summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ascii/ascatr.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx26
-rw-r--r--sw/source/filter/basflt/shellio.cxx49
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx4
-rw-r--r--sw/source/filter/html/htmlbas.cxx2
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
-rw-r--r--sw/source/filter/html/htmlctxt.cxx2
-rw-r--r--sw/source/filter/html/htmldraw.cxx4
-rw-r--r--sw/source/filter/html/htmlfld.cxx4
-rw-r--r--sw/source/filter/html/htmlfly.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.hxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx5
-rw-r--r--sw/source/filter/html/htmlforw.cxx4
-rw-r--r--sw/source/filter/html/htmlftn.cxx4
-rw-r--r--sw/source/filter/html/htmlgrin.cxx6
-rw-r--r--sw/source/filter/html/htmlnum.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx6
-rw-r--r--sw/source/filter/html/htmlsect.cxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx10
-rw-r--r--sw/source/filter/html/htmltabw.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.hxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx28
-rw-r--r--sw/source/filter/html/swhtml.hxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/inc/fltglbls.hxx2
-rw-r--r--sw/source/filter/inc/msfilter.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx4
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx8
-rw-r--r--sw/source/filter/rtf/rtffld.cxx4
-rw-r--r--sw/source/filter/rtf/rtffly.cxx2
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx4
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx8
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx2
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx6
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx4
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx22
-rw-r--r--sw/source/filter/ww1/fltshell.cxx6
-rw-r--r--sw/source/filter/ww1/w1class.cxx2
-rw-r--r--sw/source/filter/ww1/w1filter.cxx6
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx38
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx2
-rw-r--r--sw/source/filter/ww8/escher.hxx2
-rw-r--r--sw/source/filter/ww8/tracer.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx4
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx7
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx63
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx182
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx32
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx34
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx3
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx9
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx40
-rw-r--r--sw/source/filter/ww8/ww8par.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx56
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx66
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx2
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx4
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.cxx14
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx8
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx8
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx6
-rw-r--r--sw/source/filter/xml/xmltble.cxx14
-rw-r--r--sw/source/filter/xml/xmltbli.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.hxx2
-rw-r--r--sw/source/filter/xml/xmltexte.cxx4
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
88 files changed, 609 insertions, 350 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 22957c9434af..02408f971140 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -34,7 +34,7 @@
#include <tools/stream.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <svx/fontitem.hxx>
#include <pam.hxx>
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index cb31050b02d3..edac439d05e6 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -39,7 +39,7 @@
#include <i18npool/mslangid.hxx>
#include <vcl/msgbox.hxx>
#include <svtools/parhtml.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sot/storage.hxx>
#include <sot/clsids.hxx>
#include <sfx2/app.hxx>
@@ -418,6 +418,9 @@ void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
pValues[ n ] = 0;
}
+void SwFilterOptions::Commit() {}
+void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
/* */
@@ -1008,3 +1011,24 @@ void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xR
else
xRet = WriterRef(0);
}
+
+typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& );
+typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
+
+ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+{
+ SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
+}
+
+ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+{
+ GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
+}
+
+
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index aaa640de0ef4..7a8b35470da2 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -33,11 +33,11 @@
#include <hintids.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <sfx2/docfile.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
@@ -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/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 2e8d395d72ca..35d38ce9f1f2 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
#include <SwAppletImpl.hxx>
#include <svtools/htmlkywd.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 01108a0d2567..6945cf677f51 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -38,7 +38,7 @@
#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
#endif
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/boxitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/udlnitem.hxx>
@@ -67,7 +67,7 @@
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
#include <svx/htmlmode.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <tools/urlobj.hxx>
#include <tools/bigint.hxx>
#include <unotools/charclass.hxx>
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index e788dc5da275..acf8a17b4e15 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -43,12 +43,12 @@
#if !defined _SVSTDARR_XUB_STRLEN_DECL || !defined _SVSTDARR_USHORTS_DECL
#define _SVSTDARR_XUB_STRLEN
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/htmlmode.hxx>
#include <svx/escpitem.hxx>
#include <svx/brkitem.hxx>
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index e591d2d5e90b..a4c29e078182 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -37,7 +37,7 @@
#include <sfx2/sfx.hrc>
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <basic/sbx.hxx>
#include <basic/basmgr.hxx>
#include <basic/sbmod.hxx>
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 7fb4fd8502af..1c270e8c243b 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -34,9 +34,9 @@
#include "hintids.hxx"
-#include <svtools/itemiter.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
+#include <svl/urihelper.hxx>
#include <i18npool/mslangid.hxx>
#include <sfx2/docfile.hxx>
#ifndef _APP_HXX //autogen
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 474bfe707847..12a5033ad142 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -33,7 +33,7 @@
#include "hintids.hxx"
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/brshitem.hxx>
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 328eb21be526..7debe0e40eec 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -52,8 +52,8 @@
#include <svx/brshitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index c9930c3ca8ef..718776c07042 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -38,8 +38,8 @@
#include "docsh.hxx"
#include <svtools/htmltokn.h>
-#include <svtools/zformat.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/zformat.hxx>
+#include <unotools/useroptions.hxx>
#include <fmtfld.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 92f9e1adb3d5..597d851722d8 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -38,7 +38,7 @@
#include "hintids.hxx"
#include <tools/string.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef _APP_HXX
#include <vcl/svapp.hxx>
#endif
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index a36e09025ba2..ef3b3140e1c2 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -35,7 +35,7 @@
#include <tools/string.hxx>
#ifndef _SVARRAY_H
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#endif
class SdrObject;
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index dd93a4e60b92..c9c850448f56 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -44,7 +44,7 @@
#endif
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#ifndef _SFXAPP_HXX
@@ -76,6 +76,9 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
+#include <com/sun/star/awt/XImageConsumer.hpp>
+#include <com/sun/star/form/XImageProducerSupplier.hpp>
+#include <com/sun/star/form/XForm.hpp>
#include <doc.hxx>
#include <pam.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 147e736a4353..71a56084c642 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -48,12 +48,12 @@
#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
#endif
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <tools/urlobj.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include "svtools/urihelper.hxx"
+#include "svl/urihelper.hxx"
#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
#endif
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 343939bd38d1..f5c62bb612c2 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -354,7 +354,7 @@ void SwHTMLWriter::OutFootEndNotes()
if( !pFootEndNotes )
return;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nFtn = nFootNote, nEn = nEndNote;
#endif
nFootNote = 0, nEndNote = 0;
@@ -419,7 +419,7 @@ void SwHTMLWriter::OutFootEndNotes()
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( nFtn == nFootNote,
"SwHTMLWriter::OutFootEndNotes: Anzahl Fussnoten stimmt nicht" );
ASSERT( nEn == nEndNote,
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index d18a2b762aa0..d172b8894c55 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -37,8 +37,8 @@
#include <vcl/wrkwin.hxx>
#endif
#include <i18npool/mslangid.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <svl/urihelper.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/adjitem.hxx>
@@ -53,7 +53,7 @@
#include <svtools/imap.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include <svtools/eventcfg.hxx>
+#include <unotools/eventcfg.hxx>
#include <fmtornt.hxx>
#include <fmturl.hxx>
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 24045bdef1e2..4a438fd43bb6 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -37,7 +37,7 @@
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/brshitem.hxx>
#include <svx/lrspitem.hxx>
#include <vcl/svapp.hxx>
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 21e409c48530..dc08bad8d6dc 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -36,9 +36,9 @@
#include "hintids.hxx"
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/frmhtml.hxx>
#include <sfx2/frmhtmlw.hxx>
@@ -59,7 +59,7 @@
#include <fmtcntnt.hxx>
#include <frmfmt.hxx>
-#include <svtools/ownlist.hxx>
+#include <svl/ownlist.hxx>
#include "pam.hxx"
#include "doc.hxx"
#include "ndtxt.hxx"
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index a4fb7f70ff66..8e1c7d3fa8cf 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -72,7 +72,7 @@
#include "viewsh.hxx"
#include "swcss1.hxx"
#include "swhtml.hxx"
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \
HTML_CNTXT_KEEP_NUMRULE | \
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 3b02546494f8..4715b760163d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -48,7 +48,7 @@
#include <svx/spltitem.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <fmtornt.hxx>
@@ -912,7 +912,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
{
ASSERT( nCells < pCells->Count(), "Anzahl Zellen falsch" );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_uInt16 nEnd = pCells->Count();
#endif
// The colspan of empty cells at the end has to be fixed to the new
@@ -930,7 +930,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
else
break;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
for( i=nCells; i<nEnd; i++ )
{
HTMLTableCell *pCell = (*pCells)[i];
@@ -1790,7 +1790,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
HTMLTableCell *pCell = GetCell(nTopRow,nCol);
const sal_Bool bSplit = 1 == pCell->GetColSpan();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( nCol == nRightCol-1 )
{
ASSERT( bSplit, "Split-Flag falsch" );
@@ -3394,7 +3394,7 @@ void _CellSaveStruct::AddContents( HTMLTableCnts *pNewCnts )
void _CellSaveStruct::InsertCell( SwHTMLParser& rParser,
HTMLTable *pCurTable )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// Die Attribute muessen schon beim Auefrauemen des Kontext-Stacks
// entfernt worden sein, sonst ist etwas schiefgelaufen. Das
// Checken wir mal eben ...
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 1150b044db5b..c4f625920fd7 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -67,7 +67,7 @@
#include <htmlnum.hxx>
#include <wrthtml.hxx>
#include <wrtswtbl.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifndef _VIEWSH_HXX
#include <viewsh.hxx>
#endif
@@ -1200,7 +1200,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
const SwHTMLTableLayout *pLayout = rTbl.GetHTMLTableLayout();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ViewShell *pSh;
rWrt.pDoc->GetEditShell( &pSh );
if ( pSh && pSh->GetViewOptions()->IsTest1() )
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 50a55d16b6a2..011d1e3dfbd3 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -39,7 +39,7 @@
#endif
#include <i18npool/mslangid.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/udlnitem.hxx>
#include <svx/adjitem.hxx>
#include <svx/blnkitem.hxx>
@@ -57,7 +57,7 @@
#include <svx/ulspitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/langitem.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <svx/spltitem.hxx>
#include <svx/widwitem.hxx>
#include <svx/frmdiritem.hxx>
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index c7e811e6d456..613626bcf675 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -31,12 +31,12 @@
#define _SVXCSS1_HXX
#include <tools/string.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/svxenum.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <rtl/textenc.h>
#include "parcss1.hxx"
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 551ebf937be2..c47739b8925f 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -36,19 +36,19 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include <stdlib.h>
#endif
#include <hintids.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/stritem.hxx>
#include <svtools/imap.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <sfx2/fcontnr.hxx>
@@ -307,7 +307,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
// <--
nOpenParaToken( 0 ),
eJumpTo( JUMPTO_NONE ),
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nContinue( 0 ),
#endif
eParaAdjust( SVX_ADJUST_END ),
@@ -437,7 +437,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
__EXPORT SwHTMLParser::~SwHTMLParser()
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !nContinue, "DTOR im Continue - Das geht schief!!!" );
#endif
BOOL bAsync = pDoc->IsInLoadAsynchron();
@@ -588,7 +588,7 @@ SvParserState __EXPORT SwHTMLParser::CallParser()
void __EXPORT SwHTMLParser::Continue( int nToken )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !nContinue, "Continue im Continue - Das sollte doch nicht sein, oder?" );
nContinue++;
#endif
@@ -614,7 +614,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
bViewCreated = TRUE;
pDoc->SetInLoadAsynchron( TRUE );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nContinue--;
#endif
@@ -724,7 +724,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
pPam->GetPoint()->nContent.Assign( pTxtNode, nStt );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// !!! sollte nicht moeglich sein, oder ??
ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
@@ -922,7 +922,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// wieder rekonstruieren.
CallEndAction( TRUE );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nContinue--;
#endif
}
@@ -977,7 +977,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
return ;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( pPendStack )
{
switch( nToken )
@@ -2471,12 +2471,12 @@ ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
if( !pVSh || bChkPtr )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ViewShell *pOldVSh = pVSh;
#endif
pDoc->GetEditShell( &pVSh );
ASSERT( !pVSh || !pOldVSh || pOldVSh == pVSh, "CallStartAction: Wer hat die ViewShell ausgetauscht?" );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( pOldVSh && !pVSh )
pVSh = 0;
#endif
@@ -3882,7 +3882,7 @@ void SwHTMLParser::EndPara( BOOL bReal )
{
if( HTML_LI_ON==nOpenParaToken && pTable )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const SwNumRule *pNumRule = pPam->GetNode()->GetTxtNode()->GetNumRule();
#endif
ASSERT( pNumRule, "Wo ist die Numrule geblieben" );
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 61dfb82fc040..8160f5fe7ec5 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -44,11 +44,11 @@
#ifndef _SVSTDARR_STRINGSDTOR_DECL
#define _SVSTDARR_STRINGSDTOR
#endif
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <tools/urlobj.hxx>
#include <sfx2/sfxhtml.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <svx/svxenum.hxx>
#include <fmtornt.hxx>
#include <com/sun/star/drawing/XShape.hpp>
@@ -453,7 +453,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
enum JumpToMarks { JUMPTO_NONE, JUMPTO_MARK, JUMPTO_TABLE, JUMPTO_FRAME,
JUMPTO_REGION, JUMPTO_GRAPHIC } eJumpTo;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_uInt16 nContinue; // Tiefe der Continue-Aufrufe
#endif
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 29a5860e0b2f..d2f3261ee074 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -34,7 +34,7 @@
#include <stdlib.h>
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <rtl/tencinfo.h>
#include <vcl/wrkwin.hxx>
#include <sfx2/linkmgr.hxx>
@@ -51,7 +51,7 @@
#include <svx/fontitem.hxx>
#include <svx/scripttypeitem.hxx>
#include <svx/langitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/frmdiritem.hxx>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 6118430d28f6..833183d87a50 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -37,7 +37,7 @@
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSSORTDTOR
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <i18npool/lang.h>
#include <tools/stream.hxx>
diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx
index 48b72e123500..f23f3841e380 100644
--- a/sw/source/filter/inc/fltglbls.hxx
+++ b/sw/source/filter/inc/fltglbls.hxx
@@ -32,7 +32,7 @@
#include <tools/string.hxx>
#include <i18npool/lang.h>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
class SfxPoolItem;
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index cb2c5dda9635..cb5a5880ee5a 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -45,7 +45,7 @@
#include <fltshell.hxx> // fuer den Attribut Stack
#include <redline.hxx>
#include <shellio.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#define CREATE_CONST_ASC(s) String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(s))
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index fa747d9872e5..a1279f89e3a5 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -32,7 +32,7 @@
#include <tools/solar.h>
#include <tools/color.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <swdllapi.h>
@@ -262,7 +262,7 @@ protected:
BOOL bRelWidths : 1; // Breiten relativ ausgeben?
BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bGetLineHeightCalled : 1;
#endif
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index e699cd64f0cb..0c85e78dc0e7 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -42,12 +42,12 @@
#include <com/sun/star/i18n/ScriptType.hdl>
#endif
#include <vcl/cvtgrf.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/stritem.hxx>
#include <svtools/rtfkeywd.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svtools/rtfout.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/fontitem.hxx>
#include <svx/hyznitem.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index 8985d58429c3..b23b9f5e1338 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -41,9 +41,9 @@
#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
#endif
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svtools/rtftoken.h>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/fontitem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/langitem.hxx>
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index e4043f2e8529..329ff8fedb41 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -35,7 +35,7 @@
#include <tools/list.hxx>
#include <tools/cachestr.hxx>
#include <svtools/rtftoken.h>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/prntitem.hxx>
#include <svx/opaqitem.hxx>
#include <svx/protitem.hxx>
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 2cab705fa8e0..249b6bd0f09e 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -34,7 +34,7 @@
#include <tools/stream.hxx>
#include <svtools/rtftoken.h>
#include <svtools/rtfkeywd.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svtools/rtfout.hxx>
#include <svx/lrspitem.hxx>
#include <svx/fontitem.hxx>
@@ -734,7 +734,7 @@ void SwRTFParser::RemoveUnusedNumRule( SwNumRule* pRule )
}
pDoc->DelNumRule( pRule->GetName() );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
ASSERT( pRule, "NumRulePointer 0 kann nicht geloescht werden" );
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 9b5b90a01641..0b2bd344ccc4 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -39,9 +39,9 @@
#include <tools/errinf.hxx>
#endif
#include <tools/stream.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svtools/rtftoken.h>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/ulspitem.hxx>
#ifndef _SVX_TSTPITEM_HXX //autogen
@@ -387,7 +387,7 @@ void SwRTFParser::Continue( int nToken )
pPam->GetPoint()->nContent.Assign( pTxtNode, nStt );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// !!! sollte nicht moeglich sein, oder ??
ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
@@ -2214,7 +2214,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
SwPaM aPam( *pPam->GetPoint() );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( nSNd <= nENd, "Start groesser als Ende" );
SwNode* pDebugNd = pDoc->GetNodes()[ nSNd ];
ASSERT( pDebugNd->IsCntntNode(), "Start kein ContentNode" );
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index f693acdb1433..0769f7623ae8 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -44,7 +44,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_BOOLS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <svx/svxrtf.hxx>
#include <svx/numitem.hxx>
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index d0129f29380f..9975ee3abf23 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -36,7 +36,7 @@
#include <comphelper/string.hxx>
#include <tools/stream.hxx>
#include <tools/datetime.hxx>
-#include <vcl/fontcvt.hxx>
+#include <unotools/fontcvt.hxx>
#include <rtl/tencinfo.h>
#include <svtools/rtfkeywd.hxx>
#include <svtools/rtfout.hxx>
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 4b2ab6e086a2..2ed742255173 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -33,11 +33,11 @@
#include <hintids.hxx>
#define _SVSTDARR_STRINGSSORTDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sot/storage.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svtools/filter.hxx>
#include <svx/impgrf.hxx>
#include <svx/fontitem.hxx>
@@ -250,7 +250,7 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
/////////////////////////////////////////////////////////////////////////////
// Stream-spezifisches
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SvStream& Writer::Strm()
{
ASSERT( pStrm, "Oh-oh. Dies ist ein Storage-Writer. Gleich knallts!" );
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 5dbf81b4484a..40136a45f645 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -30,8 +30,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <svtools/itemiter.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
#include "shellio.hxx"
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 4c019f0bfdcc..89beab1f0c3a 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -114,7 +114,7 @@ long SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bOldGetLineHeightCalled = bGetLineHeightCalled;
bGetLineHeightCalled = TRUE;
#endif
@@ -135,7 +135,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
// <--
bUseLayoutHeights = bLayoutAvailable; /*FALSE;*/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
#endif
}
@@ -431,7 +431,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
BOOL bSubExpanded = FALSE;
USHORT nLines = rLines.Count();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nEndCPos = 0;
#endif
@@ -467,11 +467,11 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
}
else
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
long nCheckPos = nRPos + GetLineHeight( pLine );
#endif
nRPos = nStartRPos + nParentLineHeight;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwWriteTableRow aRow( nStartRPos + nParentLineHeight, bUseLayoutHeights );
ASSERT( aRows.Seek_Entry(&aRow),
"Parent-Zeile nicht gefunden" );
@@ -514,7 +514,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
}
else
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nCheckPos = nCPos + (USHORT)GetBoxWidth( pBox );
if( !nEndCPos )
{
@@ -528,7 +528,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
}
#endif
nCPos = nStartCPos + nParentLineWidth;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwWriteTableCol aCol( nStartCPos + nParentLineWidth );
ASSERT( aCols.Seek_Entry(&aCol),
"Parent-Zelle nicht gefunden" );
@@ -594,7 +594,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// Und ihren Index
USHORT nOldRow = nRow;
SwWriteTableRow aRow( nRPos,bUseLayoutHeights );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bFound =
#endif
aRows.Seek_Entry( &aRow, &nRow );
@@ -679,7 +679,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// Und ihren Index
USHORT nOldCol = nCol;
SwWriteTableCol aCol( nCPos );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bFound2 =
#endif
aCols.Seek_Entry( &aCol, &nCol );
@@ -776,7 +776,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
bUseLayoutHeights(true),
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bGetLineHeightCalled(false),
#endif
bColsOption(false), bColTags(true), bLayoutExport(false),
@@ -803,7 +803,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bGetLineHeightCalled(false),
#endif
bColsOption(pLayoutInfo->HasColsOption()),
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 822091cec765..6086d7f9230e 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -38,7 +38,7 @@
#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
#endif
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/impgrf.hxx>
#include <svx/boxitem.hxx>
#include <svx/boxitem.hxx>
@@ -47,7 +47,7 @@
#include <svx/cntritem.hxx>
#include <svx/postitem.hxx>
#include <svx/crsditem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <unotools/charclass.hxx>
#include <txtftn.hxx>
#include <fmtpdsc.hxx>
@@ -1685,7 +1685,7 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
BOOL bAbsolutePos /*= FALSE*/,
const SfxItemSet*
-#ifndef PRODUCT
+#ifdef DBG_UTIL
pMoreAttrs /*= 0*/
#endif
)
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 374ca58b6799..eb5618bcf967 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -257,7 +257,7 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
DBG_ASSERT(cbStshf==0, "Ww1StyleSheet");
bOK = cbStshf == 0;
}
- delete del;
+ delete [] del;
}
USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 4021d449c286..1b069f44a0e9 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -58,7 +58,7 @@
#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
#endif
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <fmtfsize.hxx>
#include <doc.hxx>
#include <pam.hxx>
@@ -1899,11 +1899,11 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
nSize -= sizeof(BYTE);
}
if(rOut.Write(pBuf, padx) != padx){
- delete pBuf;
+ delete [] pBuf;
goto error;
}
}
- delete pBuf;
+ delete [] pBuf;
}
#else
for (j=0;nSize>0&&j<maxy;j++)
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 6aac7b226289..316f31a8d5d5 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -267,7 +267,7 @@ void Ww1SingleSprmPBrc::Start(
Ww1Shell& rOut, BYTE,
W1_BRC10* pBrc,
USHORT
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nSize
#endif
,
@@ -467,7 +467,7 @@ void Ww1SingleSprmPFInTable::Start(
void Ww1SingleSprmPFInTable::Stop(
Ww1Shell&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
rOut
#endif
,
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 79cb9b714187..021bbea5f380 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -161,7 +161,8 @@ WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode)
:
mnDepth(0),
mpNode(pNode),
- mpNext(NULL)
+ mpNext(NULL),
+ mpNextNode(NULL)
{
}
@@ -190,9 +191,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo()
}
#ifdef DEBUG
-//!! does not compile with debug=t -> unresolved external (dbg_out),
-//!! sommeone who knows what he wants to get should fix this
-// sResult += dbg_out(*mpNode);
+ sResult += dbg_out(*mpNode);
#endif
sResult +="</tableNodeInfo>";
@@ -247,6 +246,17 @@ void WW8TableNodeInfo::setTable(const SwTable * pTable)
void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext)
{
mpNext = pNext;
+
+#ifdef DEBUG
+ ::std::clog << "<setnext><from>" << toString() << "</from><to>"
+ << pNext->toString() << "</to></setnext>"
+ << ::std::endl;
+#endif
+}
+
+void WW8TableNodeInfo::setNextNode(SwNode * pNode)
+{
+ mpNode = pNode;
}
void WW8TableNodeInfo::setCell(sal_uInt32 nCell)
@@ -287,6 +297,11 @@ WW8TableNodeInfo * WW8TableNodeInfo::getNext() const
return mpNext;
}
+SwNode * WW8TableNodeInfo::getNextNode() const
+{
+ return mpNextNode;
+}
+
bool WW8TableNodeInfo::isEndOfLine() const
{
return getInnerForDepth(mnDepth)->isEndOfLine();
@@ -362,6 +377,14 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
pPrev = processTableLine(pTable, pLine, n, 1, pPrev);
}
+ if (pPrev != NULL)
+ {
+ SwTableNode * pTableNode = pTable->GetTableNode();
+ SwEndNode * pEndNode = pTableNode->EndOfSectionNode();
+
+ pPrev->setNextNode(pEndNode);
+ }
+
#ifdef DEBUG
::std::clog << "</processSwTable>" << ::std::endl;
#endif
@@ -602,6 +625,13 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode)
if (pNextInfo != NULL)
pResult = pNextInfo->getNode();
+ else
+ {
+ SwNode * pNextNode = pNodeInfo->getNextNode();
+
+ if (pNextNode != NULL)
+ pResult = pNextNode;
+ }
}
return pResult;
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index a2d03337fb29..035464fb751b 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -97,6 +97,7 @@ private:
const SwNode * mpNode;
Inners_t mInners;
WW8TableNodeInfo * mpNext;
+ SwNode * mpNextNode;
public:
typedef boost::shared_ptr<WW8TableNodeInfo> Pointer_t;
@@ -112,6 +113,7 @@ public:
void setCell(sal_uInt32 nCell);
void setRow(sal_uInt32 nRow);
void setNext(WW8TableNodeInfo * pNext);
+ void setNextNode(SwNode * pNode);
sal_uInt32 getDepth() const;
bool isEndOfLine() const;
@@ -120,6 +122,7 @@ public:
const SwTableBox * getTableBox() const;
const SwTable * getTable() const;
WW8TableNodeInfo * getNext() const;
+ SwNode * getNextNode() const;
const Inners_t & getInners() const;
const WW8TableNodeInfoInner::Pointer_t getFirstInner() const;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0eb0284a701e..747f8eb67752 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -44,7 +44,7 @@
#include <hintids.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <svx/fontitem.hxx>
#include <svx/tstpitem.hxx>
diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx
index 6df865fbfced..e4ecb410e7c1 100644
--- a/sw/source/filter/ww8/dump/ww8scan.hxx
+++ b/sw/source/filter/ww8/dump/ww8scan.hxx
@@ -48,7 +48,7 @@
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#ifndef WW8STRUC_HXX
#include <ww8struc.hxx> // FIB, STSHI, STD
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 0fb39dcc7a02..880a70903206 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -34,7 +34,7 @@
#define _ESCHER_HXX
#ifndef _ESCHEREX_HXX
-#include <svx/escherex.hxx>
+#include <filter/msfilter/escherex.hxx>
#endif
const sal_uInt32 nInlineHack = 0x00010001;
diff --git a/sw/source/filter/ww8/tracer.cxx b/sw/source/filter/ww8/tracer.cxx
index 522d8194633d..374eee8f1af7 100644
--- a/sw/source/filter/ww8/tracer.cxx
+++ b/sw/source/filter/ww8/tracer.cxx
@@ -34,7 +34,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <tools/urlobj.hxx> //INetURLObject
#include <sfx2/docfile.hxx> //SfxMedium
-#include <svx/msfiltertracer.hxx> //MSFilterTracer
+#include <filter/msfilter/msfiltertracer.hxx> //MSFilterTracer
#include "tracer.hxx" //sw::log::Tracer
using rtl::OUString;
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 2ad32c7be689..b68f321d35b6 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -42,7 +42,7 @@
#include <algorithm> //std::swap
#include <functional> //std::binary_function
-# include <svtools/itemiter.hxx> //SfxItemIter
+# include <svl/itemiter.hxx> //SfxItemIter
# include <svx/svdobj.hxx> //SdrObject
# include <svx/svdoole2.hxx> //SdrOle2Obj
# include <svx/fmglob.hxx> //FmFormInventor
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 18e73b1e2d56..68a474b227d5 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -40,8 +40,8 @@
#include <sfx2/objsh.hxx>
#include "types.hxx"
-#include <svtools/itempool.hxx> //SfxItemPool
-#include <svtools/itemset.hxx> //SfxItemSet
+#include <svl/itempool.hxx> //SfxItemPool
+#include <svl/itemset.hxx> //SfxItemSet
#include <format.hxx> //SwFmt
#include <node.hxx> //SwCntntNode
#include <pam.hxx> //SwPaM
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index fb197163e226..9213547dbe6e 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -48,7 +48,7 @@
#endif
#ifndef SV_FONTCVT_HXX
-# include <vcl/fontcvt.hxx> //GetSubsFontName
+# include <unotools/fontcvt.hxx> //GetSubsFontName
#endif
# include <svx/paperinf.hxx> //lA0Width...
# include <svx/lrspitem.hxx> //SvxLRSpaceItem
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 5bb1ffc557b7..33c6725e1221 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2,6 +2,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,14 +39,14 @@
#define _SVSTDARR_ULONGSSORT
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/virdev.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <vcl/svapp.hxx>
#include <sot/storage.hxx>
#include <svtools/filter.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdmodel.hxx>
@@ -2018,7 +2019,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
if (bSwapInPage)
(const_cast<SdrObject*>(pSdrObj))->SetPage(0);
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !this, "Where is the SDR-Object?" );
#endif
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 2cbbb7943f37..554f128b361e 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -53,8 +53,8 @@
#include <svx/brkitem.hxx>
#include <svx/frmdiritem.hxx>
#include <svx/tstpitem.hxx>
-#include "svtools/urihelper.hxx"
-#include <svtools/whiter.hxx>
+#include "svl/urihelper.hxx"
+#include <svl/whiter.hxx>
#include <fmtpdsc.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 70756840603c..8e6b0c77b878 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -72,6 +72,7 @@
#include <fmtline.hxx>
#include <swtable.hxx>
#include <msfilter.hxx>
+#include <swmodule.hxx>
#include <writerfilter/doctok/sprmids.hxx>
@@ -1856,13 +1857,48 @@ void WW8_WrPlcFtnEdn::Append( WW8_CP nCp, const SwFmtFtn& rFtn )
aCntnt.Insert( p, aCntnt.Count() );
}
-void WW8_WrPlcPostIt::Append( WW8_CP nCp, const SwPostItField& rPostIt )
+WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt)
+{
+ mpRichText = pPostIt->GetTextObject();
+ if (!mpRichText)
+ msSimpleText = pPostIt->GetTxt();
+ msOwner = pPostIt->GetPar1();
+ maDateTime = DateTime(pPostIt->GetDate(), pPostIt->GetTime());
+}
+
+WW8_Annotation::WW8_Annotation(const SwRedlineData* pRedline) : mpRichText(0)
+{
+ msSimpleText = pRedline->GetComment();
+ msOwner = SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor());
+ maDateTime = pRedline->GetTimeStamp();
+}
+
+void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwPostItField *pPostIt )
{
aCps.Insert( nCp, aCps.Count() );
- void* p = (void*)&rPostIt;
+ WW8_Annotation* p = new WW8_Annotation(pPostIt);
aCntnt.Insert( p, aCntnt.Count() );
}
+void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwRedlineData *pRedline )
+{
+ maProcessedRedlines.insert(pRedline);
+ aCps.Insert( nCp, aCps.Count() );
+ WW8_Annotation* p = new WW8_Annotation(pRedline);
+ aCntnt.Insert( p, aCntnt.Count() );
+}
+
+bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
+{
+ return maProcessedRedlines.find(pRedline) == maProcessedRedlines.end();
+}
+
+WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
+{
+ for( USHORT n=0; n < aCntnt.Count(); n++ )
+ delete (WW8_Annotation*)aCntnt[n];
+}
+
bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
WW8_CP& rCount )
{
@@ -1882,13 +1918,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
// Anfaenge fuer PlcfAtnTxt
pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() ));
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
rWrt.WritePostItBegin();
- if (const OutlinerParaObject* pOutliner = rPFld.GetTextObject())
- rWrt.WriteOutliner(*pOutliner, nTTyp);
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
+ if (rAtn.mpRichText)
+ rWrt.WriteOutliner(*rAtn.mpRichText, nTTyp);
else
{
- String sTxt(rPFld.GetTxt());
+ String sTxt(rAtn.msSimpleText);
sTxt.SearchAndReplaceAll(0x0A, 0x0B);
rWrt.WriteStringAsPara( sTxt );
}
@@ -2015,8 +2051,8 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// then write first the GrpXstAtnOwners
for ( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
- aStrArr.push_back(rPFld.GetPar1());
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
+ aStrArr.push_back(rAtn.msOwner);
}
//sort and remove duplicates
@@ -2054,10 +2090,9 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
{
for( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
- sal_uInt32 nDTTM =
- sw::ms::DateTime2DTTM(DateTime(rPFld.GetDate(),rPFld.GetTime()));
+ sal_uInt32 nDTTM = sw::ms::DateTime2DTTM(rAtn.maDateTime);
SwWW8Writer::WriteLong( *rWrt.pTableStrm, nDTTM );
SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0 );
@@ -2137,12 +2172,12 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
{
for ( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
//aStrArr is sorted
myiter aIter = ::std::lower_bound(aStrArr.begin(),
- aStrArr.end(), rPFld.GetPar1());
- ASSERT(aIter != aStrArr.end() && *aIter == rPFld.GetPar1(),
+ aStrArr.end(), rAtn.msOwner);
+ ASSERT(aIter != aStrArr.end() && *aIter == rAtn.msOwner,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 6601f874c60f..fb5ce68ec654 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -46,20 +46,20 @@
#include <docsh.hxx>
#define _SVSTDARR_BOOLS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <vcl/salbtype.hxx>
#include <sot/storage.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include <sfx2/docinf.hxx>
#include <svx/tstpitem.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/hyznitem.hxx>
#include <svx/langitem.hxx>
-#include <svx/msoleexp.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msoleexp.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <svx/lrspitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/brshitem.hxx>
@@ -112,9 +112,10 @@
#include "dbgoutsw.hxx"
#include <sfx2/docfile.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <unotools/tempfile.hxx>
-#include <svx/mscodec.hxx>
+#include <filter/msfilter/mscodec.hxx>
+#include <filter/msfilter/svxmsbas.hxx>
#include <osl/time.h>
#include <rtl/random.h>
#include "WW8Sttbf.hxx"
@@ -741,7 +742,7 @@ ULONG SwWW8Writer::FillUntil( SvStream& rStrm, ULONG nEndPos )
if( nEndPos > nCurPos )
SwWW8Writer::FillCount( rStrm, nEndPos - nCurPos );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( nEndPos == nCurPos, "Falsches FillUntil()" );
#endif
@@ -2370,37 +2371,44 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
{
+ sal_uInt32 aSprmIds[] = {NS_sprm::LN_TCellShd, NS_sprm::LN_TCellShadow};
sal_uInt8 nBoxes0 = rTabBoxes.Count();
if (nBoxes0 > 21)
nBoxes0 = 21;
- m_rWW8Export.InsUInt16( NS_sprm::LN_TCellShd );
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10), m_rWW8Export.pO->Count() );
-
- for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
+ for (sal_uInt32 m = 0; m < 2; m++)
{
- const SwTableBox * pBox1 = rTabBoxes[n];
- const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt();
- const SfxPoolItem * pI = NULL;
- Color aColor;
+ m_rWW8Export.InsUInt16( aSprmIds[m] );
+ m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10),
+ m_rWW8Export.pO->Count() );
- if ( SFX_ITEM_ON == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) )
+ for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
{
- aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor();
- }
- else
- aColor = COL_AUTO;
+ const SwTableBox * pBox1 = rTabBoxes[n];
+ const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt();
+ const SfxPoolItem * pI = NULL;
+ Color aColor;
+
+ if ( SFX_ITEM_ON ==
+ pFrmFmt->GetAttrSet().
+ GetItemState( RES_BACKGROUND, false, &pI ) )
+ {
+ aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor();
+ }
+ else
+ aColor = COL_AUTO;
- WW8SHDLong aSHD;
- aSHD.setCvFore( 0xFF000000 );
+ WW8SHDLong aSHD;
+ aSHD.setCvFore( 0xFF000000 );
- sal_uInt32 nBgColor = aColor.GetColor();
- if ( nBgColor == COL_AUTO )
- aSHD.setCvBack( 0xFF000000 );
- else
- aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) );
+ sal_uInt32 nBgColor = aColor.GetColor();
+ if ( nBgColor == COL_AUTO )
+ aSHD.setCvBack( 0xFF000000 );
+ else
+ aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) );
- aSHD.Write( m_rWW8Export );
+ aSHD.Write( m_rWW8Export );
+ }
}
}
}
@@ -2415,11 +2423,24 @@ void WW8Export::SectionBreaksAndFrames( const SwTxtNode& rNode )
OutWW6FlyFrmsInCntnt( rNode );
}
+#ifdef DEBUG
+struct SwNodeHash
+{
+ size_t operator()(SwNode * pNode) const { return reinterpret_cast<size_t>(pNode); }
+};
+
+typedef ::std::hash_set<SwNode *, SwNodeHash> SwNodeHashSet;
+typedef ::std::deque<SwNode *> SwNodeDeque;
+#endif
+
void MSWordExportBase::WriteText()
{
#ifdef DEBUG
::std::clog << "<WriteText>" << ::std::endl;
-// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
+ ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
+
+ SwNodeHashSet aNodeSet;
+ SwNodeDeque aNodeDeque;
#endif
while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode ||
@@ -2428,6 +2449,29 @@ void MSWordExportBase::WriteText()
{
SwNode * pNd = pCurPam->GetNode();
+#ifdef DEBUG
+ if (aNodeSet.find(pNd) == aNodeSet.end())
+ {
+ aNodeSet.insert(pNd);
+ aNodeDeque.push_back(pNd);
+ }
+ else
+ {
+ ::std::clog << "<already-done><which>" << dbg_out(*pNd)
+ << "</which><nodes>" << ::std::endl;
+
+ SwNodeDeque::const_iterator aEnd = aNodeDeque.end();
+
+ for (SwNodeDeque::const_iterator aIt = aNodeDeque.begin();
+ aIt != aEnd; aIt++)
+ {
+ ::std::clog << dbg_out(**aIt) << ::std::endl;
+ }
+
+ ::std::clog << "</nodes></already-done>" << ::std::endl;
+ }
+#endif
+
if ( pNd->IsTxtNode() )
SectionBreaksAndFrames( *pNd->GetTxtNode() );
@@ -2664,33 +2708,41 @@ void WW8Export::WriteFkpPlcUsw()
// Write SttbfAssoc
WW8SttbAssoc * pSttbfAssoc = dynamic_cast<WW8SttbAssoc *>
(pDoc->getExternalData(::sw::STTBF_ASSOC).get());
- ::std::vector<String> aStrings;
-
- ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings();
- ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end();
- for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin();
- aIt != aItEnd; aIt++)
+ // --> OD 2009-10-19 #i106057#
+ if ( pSttbfAssoc )
+ // <--
{
- String aStr(aIt->getStr());
- aStrings.push_back(aStr);
- }
-
- WriteAsStringTable(aStrings, pFib->fcSttbfAssoc,
- pFib->lcbSttbfAssoc);
+ ::std::vector<String> aStrings;
+ ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings();
+ ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end();
+ for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin();
+ aIt != aItEnd; aIt++)
+ {
+ String aStr(aIt->getStr());
+ aStrings.push_back(aStr);
+ }
+ WriteAsStringTable(aStrings, pFib->fcSttbfAssoc,
+ pFib->lcbSttbfAssoc);
+ }
}
Strm().Seek( 0 );
// Reclaim stored FIB data from document.
::ww8::WW8FibData * pFibData = dynamic_cast<ww8::WW8FibData *>
(pDoc->getExternalData(::sw::FIB).get());
-
- pFib->fReadOnlyRecommended =
- pFibData->getReadOnlyRecommended() ? 1 : 0;
- pFib->fWriteReservation =
- pFibData->getWriteReservation() ? 1 : 0;
+ // --> OD 2009-10-19 #i106057#
+ if ( pFibData )
+ // <--
+ {
+ pFib->fReadOnlyRecommended =
+ pFibData->getReadOnlyRecommended() ? 1 : 0;
+ pFib->fWriteReservation =
+ pFibData->getWriteReservation() ? 1 : 0;
+ }
pFib->Write( Strm() ); // FIB
+
}
void WW8Export::StoreDoc1()
@@ -2813,7 +2865,7 @@ namespace
{
const ULONG WW_BLOCKSIZE = 0x200;
- void EncryptRC4(svx::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
+ void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
ULONG nLen = rIn.Tell();
@@ -2987,7 +3039,7 @@ void WW8Export::ExportDocument_Impl()
pFtn = new WW8_WrPlcFtnEdn( TXT_FTN ); // Footnotes
pEdn = new WW8_WrPlcFtnEdn( TXT_EDN ); // Endnotes
- pAtn = new WW8_WrPlcPostIt; // PostIts
+ pAtn = new WW8_WrPlcAnnotations; // PostIts
pTxtBxs = new WW8_WrPlcTxtBoxes( TXT_TXTBOX );
pHFTxtBxs = new WW8_WrPlcTxtBoxes( TXT_HFTXTBOX );
@@ -3049,7 +3101,7 @@ void WW8Export::ExportDocument_Impl()
for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
aPassword[nChar] = sUniPassword.GetChar(nChar);
- svx::MSCodec_Std97 aCtx;
+ msfilter::MSCodec_Std97 aCtx;
aCtx.InitKey(aPassword, aDocId);
SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp;
@@ -3343,11 +3395,23 @@ SwWW8Writer::~SwWW8Writer()
{
}
+extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+{
+ SvxImportMSVBasic aTmp( rDoc, rStor );
+ return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
xRet = new SwWW8Writer( rFltName, rBaseURL );
}
+
+extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+{
+ return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
+}
+
bool WW8_WrPlcFtnEdn::WriteTxt( WW8Export& rWrt )
{
bool bRet = false;
@@ -3384,7 +3448,7 @@ void WW8_WrPlcFtnEdn::WritePlc( WW8Export& rWrt ) const
}
-bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt )
+bool WW8_WrPlcAnnotations::WriteTxt( WW8Export& rWrt )
{
bool bRet = WriteGenericTxt( rWrt, TXT_ATN, rWrt.pFib->ccpAtn );
rWrt.pFldAtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ),
@@ -3393,7 +3457,7 @@ bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcPostIt::WritePlc( WW8Export& rWrt ) const
+void WW8_WrPlcAnnotations::WritePlc( WW8Export& rWrt ) const
{
WriteGenericPlc( rWrt, TXT_ATN, rWrt.pFib->fcPlcfandTxt,
rWrt.pFib->lcbPlcfandTxt, rWrt.pFib->fcPlcfandRef,
@@ -3510,7 +3574,6 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
const sal_uInt8 aFldData[] =
{
- 0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
@@ -3518,7 +3581,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
0,0,0,0, // / /4
};
- int slen = sizeof( aFldData )
+ sal_uInt32 slen=sizeof(sal_uInt32)
+ + sizeof(aFldData)
+ sizeof( aFldHeader )
+ 2*ffname.getLength() + 4
+ 2*ffdeftext.getLength() + 4
@@ -3527,12 +3591,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
+ 2*ffstattext.getLength() + 4
+ 2*ffentrymcr.getLength() + 4
+ 2*ffexitmcr.getLength() + 4;
-#ifdef OSL_BIGENDIAN
- slen = SWAPLONG( slen );
-#endif // OSL_BIGENDIAN
- *( (sal_uInt32 *)aFldData ) = slen;
+
+ *pDataStrm << slen;
+
int len = sizeof( aFldData );
- OSL_ENSURE( len == 0x44, "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
+ OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
pDataStrm->Write( aFldData, len );
len = sizeof( aFldHeader );
@@ -3591,6 +3654,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
TableRowEnd(pNodeInfoInner->getDepth());
+ ShortToSVBT16(0, nStyle);
m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 75b59638ccde..83b3b7b265ed 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -36,7 +36,7 @@
#include <tools/gen.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <map>
@@ -44,7 +44,7 @@
#include <shellio.hxx>
#include <wrt_fn.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include "ww8struc.hxx"
#include "ww8scan.hxx"
@@ -109,7 +109,7 @@ class WW8_WrPlcFld;
class WW8_WrMagicTable;
class WW8_WrPlcFtnEdn;
class WW8_WrPlcPn;
-class WW8_WrPlcPostIt;
+class WW8_WrPlcAnnotations;
class MSWordSections;
class WW8_WrPlcTxtBoxes;
class WW8_WrPct; // Verwaltung
@@ -488,7 +488,7 @@ public:
WW8_WrPlcPn* pChpPlc;
MSWordAttrIter* pChpIter;
MSWordStyles* pStyles;
- WW8_WrPlcPostIt* pAtn;
+ WW8_WrPlcAnnotations* pAtn;
WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs;
const sw::Frame *mpParentFrame; //If set we are exporting content inside
@@ -1149,16 +1149,30 @@ public:
void Append( WW8_CP nCp, const SwFmtFtn& rFtn );
};
-class WW8_WrPlcPostIt : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts
+struct WW8_Annotation
+{
+ const OutlinerParaObject* mpRichText;
+ String msSimpleText;
+ String msOwner;
+ DateTime maDateTime;
+ WW8_Annotation(const SwPostItField* pPostIt);
+ WW8_Annotation(const SwRedlineData* pRedline);
+};
+
+class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts
{
private:
//No copying
- WW8_WrPlcPostIt(const WW8_WrPlcPostIt&);
- WW8_WrPlcPostIt& operator=(WW8_WrPlcPostIt&);
+ WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&);
+ WW8_WrPlcAnnotations& operator=(WW8_WrPlcAnnotations&);
+ std::set<const SwRedlineData*> maProcessedRedlines;
public:
- WW8_WrPlcPostIt() {}
+ WW8_WrPlcAnnotations() {}
+ ~WW8_WrPlcAnnotations();
- void Append( WW8_CP nCp, const SwPostItField& rPostIt );
+ void Append( WW8_CP nCp, const SwPostItField* pPostIt );
+ void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
+ bool IsNewRedlineComment( const SwRedlineData* pRedLine );
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
};
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index aaafe0ee49fc..c4ad0735d5d4 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -37,8 +37,8 @@
#include <com/sun/star/embed/Aspects.hpp>
#include <rtl/math.hxx>
#include <svtools/filter.hxx>
-#include <svtools/itemiter.hxx>
-#include "svtools/urihelper.hxx"
+#include <svl/itemiter.hxx>
+#include "svl/urihelper.hxx"
#include <svtools/embedhlp.hxx>
@@ -49,7 +49,7 @@
#include <svx/boxitem.hxx>
#include <svx/shaditem.hxx>
#include <svx/shaditem.hxx>
-#include <svx/msoleexp.hxx>
+#include <filter/msfilter/msoleexp.hxx>
#include <svx/lrspitem.hxx> // SvxLRSpaceItem
#include <svx/ulspitem.hxx>
#include <svx/fhgtitem.hxx>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ddb8e13bb867..b20df77e79a1 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -41,9 +41,9 @@
#include <vcl/svapp.hxx>
#include <vcl/salbtype.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/zformat.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/fontitem.hxx>
#include <svx/tstpitem.hxx>
#include <svx/adjitem.hxx>
@@ -966,7 +966,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
TableRowEnd( pTextNodeInfoInner->getDepth() );
SVBT16 nSty;
- ShortToSVBT16( m_rWW8Export.nStyleBeforeFly, nSty );
+ ShortToSVBT16( 0, nSty );
m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
@@ -982,6 +982,24 @@ void WW8AttributeOutput::StartRunProperties()
m_nFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
}
+
+void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData )
+{
+ if (pRedlineData)
+ {
+ const String &rComment = pRedlineData->GetComment();
+ //Only possible to export to main text
+ if (rComment.Len() && (m_rWW8Export.nTxtTyp == TXT_MAINTEXT))
+ {
+ if (m_rWW8Export.pAtn->IsNewRedlineComment(pRedlineData))
+ {
+ m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pRedlineData );
+ m_rWW8Export.WritePostItBegin( m_rWW8Export.pO );
+ }
+ }
+ }
+}
+
void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
{
Redline( pRedlineData );
@@ -1559,7 +1577,7 @@ bool WW8Export::TransBrush(const Color& rCol, WW8_SHD& rShd)
rShd = WW8_SHD(); // alles Nullen : transparent
else
{
- rShd.SetFore( 8);
+ rShd.SetFore( 0);
rShd.SetBack( TransCol( rCol ) );
rShd.SetStyle( bWrtWW8, 0 );
}
@@ -2555,8 +2573,8 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
void WW8AttributeOutput::PostitField( const SwField* pFld )
{
- const SwPostItField& rPFld = *(SwPostItField*)pFld;
- m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), rPFld );
+ const SwPostItField *pPFld = (const SwPostItField*)pFld;
+ m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pPFld );
m_rWW8Export.WritePostItBegin( m_rWW8Export.pO );
}
@@ -3582,7 +3600,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
pChpPlc->AppendFkpEntry(rStrm.Tell());
nRetPos = rStrm.Tell();
}
-#ifdef PRODUCT
+#ifndef DBG_UTIL
else
{
ASSERT( nRetPos || nPos == (ULONG)pFib->fcMin,
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 4968d88887dc..8d8516433432 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -57,8 +57,7 @@ public:
/// Start of the text run.
///
- /// No-op for binary filters.
- virtual void StartRun( const SwRedlineData* /*pRedlineData*/ ) {}
+ virtual void StartRun( const SwRedlineData* pRedlineData );
/// End of the text run.
///
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index b0dabff56b2f..eca0e0d77c21 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -33,7 +33,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <tools/urlobj.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <rtl/tencinfo.h>
#include <swerror.h>
#ifndef _NDTXT
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 4948ac5eddae..e1c5b2509228 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <hintids.hxx>
#include <osl/endian.h>
#include <svx/fmglob.hxx>
@@ -75,7 +75,7 @@
#include <svx/outliner.hxx> // #79453#
#include <svx/frmdiritem.hxx>
#include <svx/xfltrit.hxx>
-#include <svx/msdffimp.hxx>
+#include <filter/msfilter/msdffimp.hxx>
#include <grfatr.hxx> // class SwCropGrf
#include <fmtornt.hxx>
#include <fmtcntnt.hxx>
@@ -506,14 +506,15 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ItemSet gestopft.
void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
{
- if( nColl < nColls && pCollA[nColl].pFmt && pCollA[nColl].bColl )
+ SwWW8StyInf * pStyInf = GetStyle(nColl);
+ if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
- if ( SFX_ITEM_SET == pCollA[nColl].pFmt->GetItemState(
+ if ( SFX_ITEM_SET == pStyInf->pFmt->GetItemState(
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index dc653c5738e6..68d3e87c475c 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -37,14 +37,14 @@
#include <iterator>
#endif
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/impgrf.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdograf.hxx>
#include <svx/svdoole2.hxx>
#include <svx/opaqitem.hxx>
-#include <svx/msdffimp.hxx>
+#include <filter/msfilter/msdffimp.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/fcontnr.hxx>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b9fd20dc1cba..10aa3d36d6bb 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -57,21 +57,20 @@
#include <svx/lrspitem.hxx> // SvxLRSpaceItem
#include <svx/ulspitem.hxx>
#include <svx/langitem.hxx>
-// --> OD 2005-02-28 #i43427#
#include <svx/opaqitem.hxx>
-// <--
-#include <svx/svxmsbas.hxx>
+#include <svx/charhiddenitem.hxx>
+#include <filter/msfilter/svxmsbas.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdoole2.hxx>
-#include <svx/msdffimp.hxx>
+#include <filter/msfilter/msdffimp.hxx>
#include <svx/svdoashp.hxx>
#include <svx/svxerr.hxx>
-#include <svx/mscodec.hxx>
+#include <filter/msfilter/mscodec.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdogrp.hxx>
#include <svx/xflclit.hxx>
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <fmtfld.hxx>
#include <fmturl.hxx>
#include <fmtinfmt.hxx>
@@ -129,7 +128,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <svtools/itemiter.hxx> //SfxItemIter
+#include <svl/itemiter.hxx> //SfxItemIter
#include <stdio.h>
@@ -989,7 +988,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
SfxItemState eState = SFX_ITEM_DEFAULT;
if (const SfxItemSet *pSet = pNd->GetpSwAttrSet())
eState = pSet->GetItemState(RES_LR_SPACE, false);
- if (eState != SFX_ITEM_SET)
+ if (eState != SFX_ITEM_SET && rReader.pCollA != NULL)
pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR);
}
@@ -1630,7 +1629,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sTxt, aDate );
aPostIt.SetTextObject(pOutliner);
+ pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN));
rDoc.InsertPoolItem(*pPaM, SwFmtFld(aPostIt), 0);
+ pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_HIDDEN);
return 0;
}
@@ -2163,7 +2164,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet()
eSrcCharSet = maFontSrcCharSets.top();
if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
eSrcCharSet = pCollA[nCharFmt].GetCharSet();
- if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(nAktColl))
eSrcCharSet = pCollA[nAktColl].GetCharSet();
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
@@ -2221,10 +2222,13 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet()
{
if (!maFontSrcCJKCharSets.empty())
eSrcCharSet = maFontSrcCJKCharSets.top();
- if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
- eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet();
- if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
- eSrcCharSet = pCollA[nAktColl].GetCJKCharSet();
+ if (pCollA != NULL)
+ {
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
+ eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet();
+ if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
+ eSrcCharSet = pCollA[nAktColl].GetCJKCharSet();
+ }
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
/*
@@ -4216,7 +4220,7 @@ namespace
#define WW_BLOCKSIZE 0x200
- void DecryptRC4(svx::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
+ void DecryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
ULONG nLen = rIn.Tell();
@@ -4233,7 +4237,7 @@ namespace
}
}
- void DecryptXOR(svx::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
+ void DecryptXOR(msfilter::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
{
ULONG nSt = rIn.Tell();
rIn.Seek(STREAM_SEEK_TO_END);
@@ -4366,7 +4370,7 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
aPassword[nChar] = sPassword.GetChar(nChar);
- svx::MSCodec_XorWord95 aCtx;
+ msfilter::MSCodec_XorWord95 aCtx;
aCtx.InitKey(aPassword);
if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash))
{
@@ -4379,7 +4383,7 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 *pIn = new sal_uInt8[nUnencryptedHdr];
pStrm->Read(pIn, nUnencryptedHdr);
aDecryptMain.Write(pIn, nUnencryptedHdr);
- delete pIn;
+ delete [] pIn;
DecryptXOR(aCtx, *pStrm, aDecryptMain);
@@ -4424,7 +4428,7 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 aSaltHash[ 16 ];
pTableStream->Read(aSaltHash, 16);
- svx::MSCodec_Std97 aCtx;
+ msfilter::MSCodec_Std97 aCtx;
aCtx.InitKey(aPassword, aDocId);
if (aCtx.VerifyKey(aSaltData, aSaltHash))
{
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 93a20df1576c..98006fb5d267 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -33,8 +33,8 @@
#define _WW8PAR_HXX
#include <tools/string.hxx>
-#include <svx/msdffimp.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msdffimp.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <svx/frmdir.hxx>
#include <fltshell.hxx> // fuer den Attribut Stack
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7342843e6b9a..afbf4b3593c1 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -285,7 +285,7 @@ void sw::util::RedlineStack::close( const SwPosition& rPos,
{
if( pTabDesc && pTabDesc->getOldRedlineStack() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pTabDesc->getOldRedlineStack()->close(rPos, eType), "close without open!");
#else
pTabDesc->getOldRedlineStack()->close( rPos, eType );
@@ -827,7 +827,8 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
{
// nur fuer SwTxtFmtColl, nicht CharFmt
// WW: 0 = no Numbering
- if (pCollA[nAktColl].bColl && *pData)
+ SwWW8StyInf * pColl = GetStyle(nAktColl);
+ if (pColl != NULL && pColl->bColl && *pData)
{
// Bereich WW:1..9 -> SW:0..8 keine Aufzaehlung / Nummerierung
@@ -861,12 +862,16 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
{
- if( !pAktColl || nLen <= 0 // nur bei Styledef
- || !pCollA[nAktColl].bColl // CharFmt -> ignorieren
- || ( nIniFlags & WW8FL_NO_OUTLINE ) ){
- nSwNumLevel = 0xff;
- return;
+ {
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if( !pAktColl || nLen <= 0 // nur bei Styledef
+ || (pStyInf && !pStyInf->bColl) // CharFmt -> ignorieren
+ || ( nIniFlags & WW8FL_NO_OUTLINE ) ){
+ nSwNumLevel = 0xff;
+ return;
+ }
}
+
if( nSwNumLevel <= MAXLEVEL // Bereich WW:1..9 -> SW:0..8
&& nSwNumLevel <= 9 ){ // keine Aufzaehlung / Nummerierung
@@ -892,7 +897,10 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
SwNumRule* pNR = GetStyRule();
SetAnld(pNR, (WW8_ANLD*)pData, 0, false);
pAktColl->SetFmtAttr( SwNumRuleItem( pNR->GetName() ) );
- pCollA[nAktColl].bHasStyNumRule = true;
+
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if (pStyInf != NULL)
+ pStyInf->bHasStyNumRule = true;
}
}
@@ -1007,9 +1015,10 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
}
}
- if (!sNumRule.Len() && pCollA[nAktColl].bHasStyNumRule)
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if (!sNumRule.Len() && pStyInf->bHasStyNumRule)
{
- sNumRule = pCollA[nAktColl].pFmt->GetNumRule().GetValue();
+ sNumRule = pStyInf->pFmt->GetNumRule().GetValue();
pNumRule = rDoc.FindNumRulePtr(sNumRule);
if (!pNumRule)
sNumRule.Erase();
@@ -1170,6 +1179,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
pS++;
short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen
+
BYTE nCols = *pS; // Anzahl der Zellen
short nOldCols = nWwCols;
@@ -1200,7 +1210,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
setcelldefaults(pTCs,nCols);
}
- if( nFileCols )
+ short nColsToRead = nFileCols;
+ if (nColsToRead > nCols)
+ nColsToRead = nCols;
+
+ if( nColsToRead )
{
// lies TCs ein
@@ -1216,9 +1230,9 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
if( bVer67 )
{
WW8_TCellVer6* pTc = (WW8_TCellVer6*)pT;
- for(i=0; i<nFileCols; i++, ++pAktTC,++pTc)
+ for(i=0; i<nColsToRead; i++, ++pAktTC,++pTc)
{
- if( i < nFileCols )
+ if( i < nColsToRead )
{ // TC aus File ?
BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
@@ -1248,7 +1262,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
else
{
WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT;
- for (int k = 0; k < nFileCols; ++k, ++pAktTC, ++pTc )
+ for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc )
{
UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 );
@@ -1296,6 +1310,12 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
BYTE nFlag = *(pParamsTSetBRC+2);
+ if (nitcFirst >= nWwCols)
+ return;
+
+ if (nitcLim > nWwCols)
+ nitcLim = nWwCols;
+
bool bChangeRight = (nFlag & 0x08) ? true : false;
bool bChangeBottom = (nFlag & 0x04) ? true : false;
bool bChangeLeft = (nFlag & 0x02) ? true : false;
@@ -1491,7 +1511,7 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
if (nLen != 6)
return;
mbHasSpacing=true;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BYTE nWhichCell =
#endif
*pParams++;
@@ -1545,7 +1565,7 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
ASSERT(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BYTE nUnknown2 =
#endif
*pParams++;
@@ -3907,8 +3927,8 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI)
: WW8Style(*pI->pTableStream, _rFib), maSprmParser(_rFib.GetFIBVersion()),
pIo(pI), pStStrm(pI->pTableStream), pStyRule(0), nWwNumLevel(0)
{
- pIo->pCollA = new SwWW8StyInf[ cstd ]; // Style-UEbersetzung WW->SW
pIo->nColls = cstd;
+ pIo->pCollA = cstd ? new SwWW8StyInf[ cstd ] : NULL; // Style-UEbersetzung WW->SW
}
void WW8RStyle::Set1StyleDefaults()
@@ -4680,7 +4700,7 @@ void WW8RStyle::Import()
//
// fuer z.B. Tabellen wird ein immer gueltiger Std-Style gebraucht
- if( pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid )
+ if( pIo->StyleExists(0) && pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid )
pIo->pDfltTxtFmtColl = (SwTxtFmtColl*)pIo->pCollA[0].pFmt;
else
pIo->pDfltTxtFmtColl = pIo->rDoc.GetDfltTxtFmtColl();
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index aa2737da1fa4..b6b91459fc10 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -33,7 +33,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
@@ -75,7 +75,7 @@
#include <svx/crsditem.hxx>
#include <svx/udlnitem.hxx>
#include <svx/postitem.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <errhdl.hxx>
#include <unoobj.hxx>
#include <doc.hxx>
@@ -95,7 +95,7 @@
#include "ww8par2.hxx" // wg. Listen-Attributen in Styles
#include <IMark.hxx>
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <stdio.h>
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index ccabdcf8cac1..a0c70239c604 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -46,10 +46,10 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <hintids.hxx>
#include <svx/svdoole2.hxx>
-#include <svx/msdffimp.hxx>
+#include <filter/msfilter/msdffimp.hxx>
#include <svx/impgrf.hxx>
#include <svx/unoapi.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <sot/exchange.hxx>
#include <swtypes.hxx>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index f5f82d879aac..9f4cba28a4db 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -40,9 +40,9 @@
#include <tools/solar.h>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <svtools/urihelper.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <sfx2/linkmgr.hxx>
#ifndef _UCBHELPER_CONTENT_HXX_
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 978834f3345e..82e2192b52ed 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <stdlib.h>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <rtl/tencinfo.h>
@@ -4673,7 +4673,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
bool
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bVer67
#endif
)
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f20c13889f27..55834f5c0816 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2281,22 +2281,48 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
{
+ bool failure = false;
+
// Pointer auf Pos-Array
pPLCF_PosArray = new WW8_CP[ ( nPLCF + 3 ) / 4 ];
sal_Size nOldPos = pSt->Tell();
pSt->Seek( nFilePos );
- pSt->Read( pPLCF_PosArray, nPLCF );
+ failure = pSt->GetError();
+
+ if (!failure)
+ {
+ pSt->Read( pPLCF_PosArray, nPLCF );
+ failure = pSt->GetError();
+ }
+
+ if (!failure)
+ {
#ifdef OSL_BIGENDIAN
- for( nIdx = 0; nIdx <= nIMax; nIdx++ )
- pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
- nIdx = 0;
+ for( nIdx = 0; nIdx <= nIMax; nIdx++ )
+ pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
+ nIdx = 0;
#endif // OSL_BIGENDIAN
- // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ // Pointer auf Inhalts-Array
+ pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ }
pSt->Seek( nOldPos );
+
+ ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
+
+ if (failure)
+ MakeFailedPLCF();
+}
+
+void WW8PLCF::MakeFailedPLCF()
+{
+ nIMax = 0;
+ delete[] pPLCF_PosArray;
+ pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
+ pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
}
void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
@@ -2359,13 +2385,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
if (failure)
- {
- nIMax = 0;
- delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
- pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- }
+ MakeFailedPLCF();
}
bool WW8PLCF::SeekPos(WW8_CP nPos)
@@ -4390,15 +4410,16 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
pBkm = &aD[1];
pEdn = &aD[2];
pFtn = &aD[3];
+ pAnd = &aD[4];
-
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[4] : 0;
+ pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0;
//pPcdA index == pPcd index + 1
- pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[5] : 0;
- pChp = &aD[6];
- pAnd = &aD[7];
+ pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : 0;
+
+ pChp = &aD[7];
pPap = &aD[8];
pSep = &aD[9];
+
pSep->pPLCFx = pBase->pSepPLCF;
pFtn->pPLCFx = pBase->pFtnPLCF;
pEdn->pPLCFx = pBase->pEdnPLCF;
@@ -6240,8 +6261,11 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
+ INT32 nFFn = rFib.lcbSttbfffn - 2;
+
// allocate Font Array
- BYTE* pA = new BYTE[ rFib.lcbSttbfffn - 2 ];
+ BYTE* pA = new BYTE[ nFFn ];
+ memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
ww::WordVersion eVersion = rFib.GetFIBVersion();
@@ -6258,13 +6282,13 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.SeekRel( 2 );
// read all font information
- rSt.Read( pA, rFib.lcbSttbfffn - 2 );
+ nFFn = rSt.Read( pA, nFFn );
if( eVersion < ww::eWW8 )
{
// try to figure out how many fonts are defined here
nMax = 0;
- long nLeft = rFib.lcbSttbfffn - 2;
+ long nLeft = nFFn;
for(;;)
{
short nNextSiz;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 3547eaf99391..85c80ba51025 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -295,6 +295,8 @@ private:
machen wir uns hiermit einen PLC:
*/
void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+
+ void MakeFailedPLCF();
public:
WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 7e3187a4a948..9b653c5eb33d 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -686,7 +686,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( false, "Recursive change tracking" );
#endif
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index a99e719e3fe0..667ae829edb8 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -55,10 +55,10 @@
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/packages/WrongPasswordException.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sfx2/docfile.hxx>
#include <svtools/sfxecode.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <unotools/streamwrap.hxx>
#include <svx/xmlgrhlp.hxx>
#include <svx/xmleohlp.hxx>
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 09b7bdd8ed30..f0a1b32c74ba 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -46,9 +46,9 @@
#include <unotools/streamwrap.hxx>
#include <svx/xmlgrhlp.hxx>
#include <svx/xmleohlp.hxx>
-#include <svtools/saveopt.hxx>
+#include <unotools/saveopt.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/docfile.hxx>
#include <pam.hxx>
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/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 7832661d8799..041e3a4eb260 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -34,9 +34,9 @@
#include <xmloff/xmluconv.hxx>
#include <rtl/ustrbuf.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itempool.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/itemset.hxx>
#include <xmloff/attrlist.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -45,7 +45,7 @@
#ifndef _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 357546259777..ad86a2d8cf26 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -37,7 +37,7 @@
#ifndef _SVSTDARR_STRINGSSORT_DECL
#define _SVSTDARR_STRINGSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <xmloff/nmspmap.hxx>
#include <format.hxx>
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index f4a4a676c9a2..3136f7b2fdf1 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;
@@ -87,7 +83,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
if( eFamily != XML_TOKEN_INVALID )
AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, eFamily );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// style:parent-style-name="..." (if its not the default only)
const SwFmt* pParent = rFmt.DerivedFrom();
// Parent-Namen nur uebernehmen, wenn kein Default
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 44744f0d18a2..17b95cd310af 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -65,7 +65,7 @@
#include <sfx2/printer.hxx>
#include <ForbiddenCharactersEnum.hxx>
#include <xmloff/xmluconv.hxx>
-#include <svtools/saveopt.hxx>
+#include <unotools/saveopt.hxx>
#include <tools/diagnose_ex.h>
#include <hash_set>
#include <stringhash.hxx>
@@ -842,7 +842,7 @@ void SwXMLImport::endDocument( void )
pTxtNode->GetTxt().Len() );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// !!! This should be impossible !!!!
ASSERT( pSttNdIdx->GetIndex()+1 !=
pPaM->GetBound( sal_True ).nNode.GetIndex(),
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 78f391b3840f..836d02b9e4f0 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -32,9 +32,9 @@
#include "precompiled_sw.hxx"
#include "xmlimpit.hxx"
#include <xmloff/xmluconv.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itempool.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/itemset.hxx>
#include <xmloff/attrlist.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 360f8349142e..13cb894d6e1f 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -39,8 +39,8 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmluconv.hxx>
#include <xmloff/numehelp.hxx>
-#include <svtools/cntnrsrt.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/cntnrsrt.hxx>
+#include <svl/zforlist.hxx>
#include <svx/brshitem.hxx>
#include <svx/boxitem.hxx>
#include <fmtrowsplt.hxx>
@@ -142,7 +142,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
pLines( &rLines ),
nWidth( 0UL )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_uInt16 nEndCPos = 0U;
#endif
sal_uInt16 nLines = rLines.Count();
@@ -176,7 +176,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
}
else
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_uInt16 nCheckPos =
nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
if( !nEndCPos )
@@ -193,7 +193,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
}
#endif
nCPos = (sal_uInt16)nWidth;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwXMLTableColumn_Impl aCol( (sal_uInt16)nWidth );
ASSERT( aCols.Seek_Entry(&aCol), "couldn't find last column" );
ASSERT( SwXMLTableColumn_Impl(nCheckPos) ==
@@ -699,7 +699,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
// Und ihren Index
sal_uInt16 nOldCol = nCol;
SwXMLTableColumn_Impl aCol( nCPos );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool bFound =
#endif
pLines->GetColumns().Seek_Entry( &aCol, &nCol );
@@ -989,7 +989,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const sal_uInt16 nOldCol = nCol;
{
SwXMLTableColumn_Impl aCol( nCPos );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const sal_Bool bFound =
#endif
rLines.GetColumns().Seek_Entry( &aCol, &nCol );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index b71812df6774..07c09631b531 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -39,8 +39,8 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
-#include <svtools/itemset.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/itemset.hxx>
+#include <svl/zformat.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
@@ -2315,7 +2315,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
bSplit = 1UL == pCell->GetColSpan();
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( nCol == nRightCol-1UL )
{
ASSERT( bSplit, "Split-Flag falsch" );
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index b9f903ba14a9..3e224b1c46cb 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -40,7 +40,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_BOOLS
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
class SwXMLImport;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 018ca0c0b5bb..c6ca53c00cb1 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -60,8 +60,8 @@
#include <SwAppletImpl.hxx>
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
-#include "svtools/urihelper.hxx"
+#include <svl/svstdarr.hxx>
+#include "svl/urihelper.hxx"
#include <sfx2/frmdescr.hxx>
#include <SwStyleNameMapper.hxx>
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 6953e065c82a..47a1957ee41b 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -74,7 +74,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/embedhlp.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
using ::rtl::OUString;
using ::rtl::OUStringBuffer;