summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/makefile.mk1
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par.cxx99
-rw-r--r--sw/source/filter/ww8/ww8par.hxx10
4 files changed, 17 insertions, 105 deletions
diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk
index 7f59944c1454..6697ceaec4b1 100644
--- a/sw/source/filter/ww8/makefile.mk
+++ b/sw/source/filter/ww8/makefile.mk
@@ -38,6 +38,7 @@ TARGET=ww8
.INCLUDE : $(PRJ)$/inc$/swpre.mk
.INCLUDE : settings.mk
+MAKING_LIBMSWORD=TRUE
.INCLUDE : $(PRJ)$/inc$/sw.mk
.IF "$(mydebug)" != ""
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 96ec05af396c..b32d26fcfe9d 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -38,11 +38,7 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <unotools/ucbstreamhelper.hxx>
-
-#ifndef __SGI_STL_ALGORITHM
#include <algorithm>
-#endif
-
#include <hintids.hxx>
#include <string.h> // memcpy()
@@ -88,9 +84,7 @@
#include <fltini.hxx>
#include <swmodule.hxx>
#include <section.hxx>
-#ifndef _SWFLTOPT_HXX
#include <swfltopt.hxx>
-#endif
#include <fmtinfmt.hxx>
#include <txtinet.hxx>
#include <fmturl.hxx>
@@ -99,18 +93,14 @@
#include <svtools/imapobj.hxx>
#include <tools/urlobj.hxx>
#include <mdiexp.hxx> // Progress
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
#include <fmtline.hxx>
#include <fmtfsize.hxx>
#include <comphelper/extract.hxx>
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
-#ifndef IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED
#include <IDocumentBookmarkAccess.hxx>
-#endif
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -3044,7 +3034,7 @@ SwWW8Writer::~SwWW8Writer()
delete pOleMap;
}
-void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
xRet = new SwWW8Writer( rFltName, rBaseURL );
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 62437a16aa6a..23c7b6133f81 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -49,13 +49,9 @@
#include <svtools/docpasswdrequest.hxx>
#include <hintids.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/cscoitem.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <svx/svdpage.hxx>
#include <svx/paperinf.hxx>
#include <svx/lrspitem.hxx> // SvxLRSpaceItem
@@ -98,15 +94,11 @@
#include <section.hxx>
#include <docsh.hxx>
#include <docufld.hxx>
-#ifndef _SWFLTOPT_HXX
#include <swfltopt.hxx>
-#endif
#include <viewsh.hxx>
#include <shellres.hxx>
#include <mdiexp.hxx> // Progress
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
#include <swerror.h> // ERR_WW8_...
#include <swunodef.hxx>
#include <unodraw.hxx>
@@ -1060,92 +1052,6 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
return 0;
}
-void SwFltControlStack::Delete(const SwPaM &rPam)
-{
- const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
-
- if( !rPam.HasMark() || *pStt >= *pEnd )
- return;
-
- SwNodeIndex aStartNode(pStt->nNode, -1);
- USHORT nStartIdx = pStt->nContent.GetIndex();
- SwNodeIndex aEndNode(pEnd->nNode, -1);
- USHORT nEndIdx = pEnd->nContent.GetIndex();
-
- //We don't support deleting content that is over one node, or removing a node.
- ASSERT(aEndNode == aStartNode, "nodes must be the same, or this method extended");
- if (aEndNode != aStartNode)
- return;
-
- for (USHORT nSize = static_cast< USHORT >(Count()); nSize > 0;)
- {
- SwFltStackEntry* pEntry = (*this)[--nSize];
-
- bool bEntryStartAfterSelStart =
- (pEntry->nMkNode == aStartNode && pEntry->nMkCntnt >= nStartIdx);
-
- bool bEntryStartBeforeSelEnd =
- (pEntry->nMkNode == aEndNode && pEntry->nMkCntnt <= nEndIdx);
-
- bool bEntryEndAfterSelStart = false;
- bool bEntryEndBeforeSelEnd = false;
- if (!pEntry->bLocked)
- {
- bEntryEndAfterSelStart =
- (pEntry->nPtNode == aStartNode && pEntry->nPtCntnt >= nStartIdx);
-
- bEntryEndBeforeSelEnd =
- (pEntry->nPtNode == aEndNode && pEntry->nPtCntnt <= nEndIdx);
- }
-
- bool bTotallyContained = false;
- if (
- bEntryStartAfterSelStart && bEntryStartBeforeSelEnd &&
- bEntryEndAfterSelStart && bEntryEndBeforeSelEnd
- )
- {
- bTotallyContained = true;
- }
-
- if (bTotallyContained)
- {
- //after start, before end, delete
- DeleteAndDestroy(nSize);
- continue;
- }
-
- xub_StrLen nCntntDiff = nEndIdx - nStartIdx;
-
- //to be adjusted
- if (bEntryStartAfterSelStart)
- {
- if (bEntryStartBeforeSelEnd)
- {
- //move start to new start
- pEntry->nMkNode = aStartNode;
- pEntry->nMkCntnt = nStartIdx;
- }
- else
- pEntry->nMkCntnt = pEntry->nMkCntnt - nCntntDiff;
- }
-
- if (bEntryEndAfterSelStart)
- {
- if (bEntryEndBeforeSelEnd)
- {
- pEntry->nPtNode = aStartNode;
- pEntry->nPtCntnt = nStartIdx;
- }
- else
- pEntry->nPtCntnt = pEntry->nPtCntnt - nCntntDiff;
- }
-
- //That's what locked is, end equal to start, and nPtCntnt is invalid
- if (pEntry->bLocked)
- pEntry->nPtNode = pEntry->nMkNode;
- }
-}
-
bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo)
{
const SwField* pFld = rFmtFld.GetFld();
@@ -4761,6 +4667,11 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
return nErrRet;
}
+extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
+{
+ return new WW8Reader();
+}
+
ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
USHORT nOldBuffSize = 32768;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index d2bb67b78f1d..69113966b5b6 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -156,6 +156,16 @@ SV_DECL_PTRARR_DEL(WW8LFOInfos,WW8LFOInfo_Ptr,16,16)
// SV_DECL_PTRARR_SORT_DEL(WW8AuthorInfos, WW8AuthorInfo_Ptr,16,16)
SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
+class WW8Reader : public StgReader
+{
+ virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ virtual int GetReaderType();
+
+ virtual BOOL HasGlossaries() const;
+ virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+};
+
struct WW8OleMap
{
sal_uInt32 mnWWid;