summaryrefslogtreecommitdiff
path: root/sw/inc/shellio.hxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 14:06:42 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 14:06:42 +0000
commit48119ae05819132c6a4558dac23da8c70cad0814 (patch)
tree51c918f80b3e5295a591b829ddfbcb7be4ee03a4 /sw/inc/shellio.hxx
parentcbcc85a2f94bb35bbc5c56468bc71d991e2cafec (diff)
CWS-TOOLING: integrate CWS libmsword
2008-12-18 12:33:19 +0100 kendy r265681 : Export less symbols. 2008-12-17 19:26:56 +0100 kendy r265655 : Move libmsword to the -writer package. 2008-12-15 17:46:16 +0100 kendy r265516 : Enable exceptions for iodetect.cxx. 2008-12-15 15:17:53 +0100 kendy r265504 : Deliver the msword.dll. 2008-12-09 19:38:17 +0100 kendy r265138 : Remove accidentally added method. 2008-12-09 19:33:57 +0100 kendy r265137 : Fix linking on Win32. 2008-12-09 18:37:16 +0100 kendy r265135 : Move SwFltControlStack::Delete() to ww1/fltshell.cxx to fix linking. 2008-12-09 18:01:56 +0100 kendy r265127 : Visibility fixes. 2008-12-09 15:51:52 +0100 kendy r265109 : Fix ambiguous usage of class Color. 2008-12-09 14:54:27 +0100 kendy r265091 : Add #include "precompiled_sw.hxx" to fix --enable-pch build. 2008-12-09 14:44:59 +0100 kendy r265088 : Add #include "precompiled_sw.hxx" to fix --enable-pch build. 2008-12-08 19:14:49 +0100 kendy r265015 : #i96313# Get rid of inc/iodetect.cxx, it's a really bad idea to share code by #ifdefing parts of it, and #including a .cxx file ;-) This change moves it to iodetect.cxx, which is compiled to a .o/.obj that is used where needed. 2008-11-20 17:45:08 +0100 kendy r264083 : #i96313# Make the destruction of Readers consistent. 2008-11-20 17:18:11 +0100 kendy r264070 : #i96313# Added missing SW_DLLPUBLIC for (Import|Export)(DOC|RTF). 2008-11-18 19:21:07 +0100 kendy r263797 : #i96313# Remove accidentally added file. 2008-11-18 17:14:31 +0100 kendy r263790 : #i96313# Split doc and rtf filters into a separate library From: Radek Doulik <rodo@novell.com> fix SwFieldBookmark class visibility (suggested by kendy) 2008-11-18 17:14:01 +0100 kendy r263789 : #i96313# Split doc and rtf filters into a separate library From: Fridrich Strba <fstrba@novell.com> add visibility markup to allow linking 2008-11-18 17:13:29 +0100 kendy r263788 : #i96313# Split doc and rtf filters into a separate library From: Jan Holesovsky <kendy@suse.cz> Visibility markup for libmsword. This is the most trivial approach, every class that had a symbol that needed to be visible was marked with SW_DLLPUBLIC; the correct (but more time consuming) way would be to mark just the exact methods that were needed. To be done later if generally shows that the separate libmsword makes sense; and also now we have the upper limit of symbols that needed to be added, and we can only make it better [decrease the number] ;-) 2008-11-18 17:12:58 +0100 kendy r263787 : #i96313# Split doc and rtf filters into a separate library From: Jan Holesovsky <kendy@suse.cz> Added the missing msword.map. 2008-11-18 17:12:25 +0100 kendy r263786 : #i96313# Split doc and rtf filters into a separate library From: Jan Holesovsky <kendy@suse.cz> scp2 change for libmsword. 2008-11-18 17:11:55 +0100 kendy r263785 : #i96313# Split doc and rtf filters into a separate library From: Jan Holesovsky <kendy@suse.cz> Convert the binary .doc and .rtf filters into a separate library. It is called 'libmsword' and loaded on demand when either of the formats (.doc, .rtf) is loaded or saved.
Diffstat (limited to 'sw/inc/shellio.hxx')
-rw-r--r--sw/inc/shellio.hxx134
1 files changed, 48 insertions, 86 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index d40320cf0543..bc1453b561df 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -32,17 +32,22 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/embed/XStorage.hpp>
+#include <sfx2/docfile.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <sot/formats.hxx>
+#include <sot/storage.hxx>
+#include <svtools/parhtml.hxx>
#include <tools/string.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <tools/datetime.hxx>
#include <tools/ref.hxx>
-#include <sot/formats.hxx>
-#include "swdllapi.h"
+#include <tools/urlobj.hxx>
+#include <swdllapi.h>
#include <swtypes.hxx>
#include <docfac.hxx> // SwDocFac
-
-#include <sot/storage.hxx>
+#include <errhdl.hxx>
+#include <iodetect.hxx>
// einige Forward - Deklarationen
class SfxFilterContainer;
@@ -210,7 +215,7 @@ protected:
#define SW_STREAM_READER 1
#define SW_STORAGE_READER 2
-class Reader
+class SW_DLLPUBLIC Reader
{
friend class SwReader;
SwDoc* pTemplate;
@@ -292,12 +297,6 @@ private:
virtual int SetStrmStgPtr();
};
-class RtfReader: public Reader
-{
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
-};
-
-
class AsciiReader: public Reader
{
friend class SwReader;
@@ -311,7 +310,7 @@ public:
virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
};
*/
-class StgReader : public Reader
+class SW_DLLPUBLIC StgReader : public Reader
{
String aFltName;
@@ -411,7 +410,7 @@ public:
extern void _InitFilter();
extern void _FinitFilter();
-extern SwRead ReadRtf, ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
+extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
//SW_DLLPUBLIC SwRead SwGetReaderSw3();
SW_DLLPUBLIC SwRead SwGetReaderXML();
@@ -435,7 +434,7 @@ extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden s
class IDocumentSettingAccess;
class IDocumentStylePoolAccess;
-class Writer : public SvRefBase
+class SW_DLLPUBLIC Writer : public SvRefBase
{
SwAsciiOptions aAscOpts;
String sBaseURL;
@@ -555,7 +554,7 @@ SV_DECL_REF(Writer)
SV_IMPL_REF(Writer)
// Basisklasse fuer alle Storage-Writer
-class StgWriter : public Writer
+class SW_DLLPUBLIC StgWriter : public Writer
{
protected:
String aFltName;
@@ -636,81 +635,44 @@ public:
/* */
/////////////////////////////////////////////////////////////////////////////
-void GetRTFWriter( const String&, const String&, WriterRef& );
-void GetASCWriter( const String&, const String&, WriterRef& );
-//void GetSw3Writer( const String&, const String&, WriterRef& );
-void GetHTMLWriter( const String&, const String&, WriterRef& );
-void GetXMLWriter( const String&, const String&, WriterRef& );
-
-// Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen
-// des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die
-// Writer-internen Namen, d.h. die namen, die in INSTALL.INI vor dem
-// Gleichheitszeichen stehen, z.b. SWG oder ASCII.
+typedef Reader* (*FnGetReader)();
+typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
-class SW_DLLPUBLIC SwIoSystem
+struct SwReaderWriterEntry
{
-public:
- // suche ueber den internen FormatNamen den Filtereintrag
- static const SfxFilter* GetFilterOfFormat( const String& rFormat,
- const SfxFilterContainer* pCnt = 0 );
-
- // Feststellen des zu verwendenden Filters fuer die uebergebene
- // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
- // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
- static const SfxFilter* GetFileFilter( const String& rFileName,
- const String& rPrefFltName,
- SfxMedium* pMedium = 0 );
-
- // Feststellen ob das File in dem vorgegebenen Format vorliegt.
- // Z.z werden nur unsere eigene Filter unterstuetzt!!
- static BOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
- const SfxFilter** ppFlt = 0 );
-
- static BOOL IsValidStgFilter( SotStorage& , const SfxFilter& );
- static BOOL IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
-
- static bool IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
- CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false);
-// static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
-
- static const SfxFilter* GetTextFilter(const sal_Char* pBuf, ULONG nLen);
- // gebe einen bestimmten Reader zurueck
- static Reader* GetReader( const String& rFltName );
- // gebe einen bestimmten Writer zurueck
- static void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt );
-
- static const String GetSubStorageName( const SfxFilter& rFltr );
+ Reader* pReader;
+ FnGetReader fnGetReader;
+ FnGetWriter fnGetWriter;
+ BOOL bDelReader;
+
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
+ : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
+ {}
+
+ /// Get access to the reader
+ Reader* GetReader();
+
+ /// Get access to the writer
+ void GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const;
};
+namespace SwReaderWriter
+{
+ /// Return reader based on ReaderWriterEnum
+ Reader* GetReader( ReaderWriterEnum eReader );
+
+ /// Return reader based on the name
+ Reader* GetReader( const String& rFltName );
+
+ /// Return writer based on the name
+ void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt );
+}
-// ----------------------------------
-// diese Filter sind immer vorhanden und koennen ueber die
-// Formatnamen gesucht werden. Alle anderen Filter sind nur intern
-// bekannt. Die UI-Seite benutzt die GetReader()/GetWriter() -Funktionen,
-// um die speziellen zu erhalten.
-
-//extern const sal_Char __FAR_DATA FILTER_SWG[]; // SWG-Filter
-extern const sal_Char __FAR_DATA FILTER_RTF[]; // RTF-Filter
-extern const sal_Char __FAR_DATA FILTER_TEXT[]; // Text-Filter mit Default-CodeSet
-extern const sal_Char __FAR_DATA FILTER_BAS[]; // StarBasic (identisch mit ANSI)
-//extern const sal_Char __FAR_DATA FILTER_W4W[]; // W4W-Filter
-extern const sal_Char __FAR_DATA FILTER_WW8[]; // WinWord 97-Filter
-//extern const sal_Char __FAR_DATA FILTER_SW3[]; // SW3-Storage Filter
-//extern const sal_Char __FAR_DATA FILTER_SW4[]; // SW4-Storage Filter
-//extern const sal_Char __FAR_DATA FILTER_SW4[]; // SW4-Storage Filter
-//extern const sal_Char __FAR_DATA FILTER_SW5[]; // SW5-Storage Filter
-//extern const sal_Char __FAR_DATA FILTER_SWGV[]; // SWG-Vorlagen Filter
-//extern const sal_Char __FAR_DATA FILTER_SW3V[]; // SW3-Storage Vorlagen Filter
-//extern const sal_Char __FAR_DATA FILTER_SW4V[]; // SW4-Storage Vorlagen Filter
-//extern const sal_Char __FAR_DATA FILTER_SW5V[]; // SW5-Storage Vorlagen Filter
-//extern const sal_Char __FAR_DATA FILTER_SWW4V[]; // SW/Web Storage Vorlagen Filter
-//extern const sal_Char __FAR_DATA FILTER_SWW5V[]; // SW/Web Storage Vorlagen Filter
-extern const sal_Char __FAR_DATA FILTER_TEXT_DLG[]; // text filter with encoding dialog
-extern const sal_Char __FAR_DATA FILTER_XML[]; // XML filter
-extern const sal_Char __FAR_DATA FILTER_XMLV[]; // XML filter
-extern const sal_Char __FAR_DATA FILTER_XMLVW[]; // XML filter
-
-SW_DLLPUBLIC const sal_Char* GetFILTER_XML();
-SW_DLLPUBLIC const sal_Char* GetFILTER_WW8();
+void GetRTFWriter( const String&, const String&, WriterRef& );
+void GetASCWriter( const String&, const String&, WriterRef& );
+//void GetSw3Writer( const String&, const String&, WriterRef& );
+void GetHTMLWriter( const String&, const String&, WriterRef& );
+void GetXMLWriter( const String&, const String&, WriterRef& );
+void GetWW8Writer( const String&, const String&, WriterRef& );
#endif