summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-19 10:55:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-19 10:57:32 +0200
commitfc5dfa8fd34f93a74f590167cb755ef7831bc0d8 (patch)
tree3da13eb22721ac2e91c53ba510552c9c555e1bcf /writerperfect
parent867ccbc19b419e688c81485257371e2681a7775a (diff)
Move module-local includes to writerperfect/inc
Change-Id: I8e90a95d6ab8d8a696d4666e2ab4ddd9584b60f0
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/CppunitTest_writerperfect_stream.mk1
-rw-r--r--writerperfect/Library_writerperfect.mk5
-rw-r--r--writerperfect/inc/DirectoryStream.hxx57
-rw-r--r--writerperfect/inc/DocumentHandler.hxx54
-rw-r--r--writerperfect/inc/ImportFilter.hxx4
-rw-r--r--writerperfect/inc/WPFTEncodingDialog.hxx56
-rw-r--r--writerperfect/inc/WPXSvInputStream.hxx55
-rw-r--r--writerperfect/inc/writerperfectdllapi.h23
-rw-r--r--writerperfect/qa/unit/DirectoryStreamTest.cxx2
-rw-r--r--writerperfect/qa/unit/WPXSvStreamTest.cxx2
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.cxx2
-rw-r--r--writerperfect/source/common/DirectoryStream.cxx4
-rw-r--r--writerperfect/source/common/DocumentHandler.cxx2
-rw-r--r--writerperfect/source/common/WPFTEncodingDialog.cxx2
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx2
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.cxx6
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.cxx2
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx4
18 files changed, 267 insertions, 16 deletions
diff --git a/writerperfect/CppunitTest_writerperfect_stream.mk b/writerperfect/CppunitTest_writerperfect_stream.mk
index 2d32844e08b2..5bb0c4bb4c28 100644
--- a/writerperfect/CppunitTest_writerperfect_stream.mk
+++ b/writerperfect/CppunitTest_writerperfect_stream.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,writerperfect_stream))
$(eval $(call gb_CppunitTest_set_include,writerperfect_stream,\
-I$(SRCDIR)/writerperfect/source/common \
+ -I$(SRCDIR)/writerperfect/inc \
$$(INCLUDE) \
))
diff --git a/writerperfect/Library_writerperfect.mk b/writerperfect/Library_writerperfect.mk
index 1343be6625b6..165a7a02d6de 100644
--- a/writerperfect/Library_writerperfect.mk
+++ b/writerperfect/Library_writerperfect.mk
@@ -23,6 +23,11 @@ $(eval $(call gb_Library_add_defs,writerperfect,\
-DWRITERPERFECT_DLLIMPLEMENTATION \
))
+$(eval $(call gb_Library_set_include,writerperfect, \
+ -I$(SRCDIR)/writerperfect/inc \
+ $$(INCLUDE) \
+))
+
$(eval $(call gb_Library_use_externals,writerperfect,\
boost_headers \
odfgen \
diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx
new file mode 100644
index 000000000000..bfa7d57452d6
--- /dev/null
+++ b/writerperfect/inc/DirectoryStream.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
+#define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
+
+#include <librevenge-stream/librevenge-stream.h>
+
+#include <com/sun/star/uno/Reference.h>
+
+#include <writerperfectdllapi.h>
+
+namespace com { namespace sun { namespace star { namespace ucb {
+ class XContent;
+} } } }
+
+namespace writerperfect
+{
+
+class WRITERPERFECT_DLLPUBLIC DirectoryStream : public librevenge::RVNGInputStream
+{
+ struct Impl;
+
+public:
+ explicit DirectoryStream(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent);
+ virtual ~DirectoryStream();
+
+ static DirectoryStream *createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent);
+ static bool isDirectory(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent);
+
+ virtual bool isStructured() SAL_OVERRIDE;
+ virtual unsigned subStreamCount() SAL_OVERRIDE;
+ virtual const char *subStreamName(unsigned id) SAL_OVERRIDE;
+ virtual bool existsSubStream(const char *name) SAL_OVERRIDE;
+ virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name) SAL_OVERRIDE;
+ virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id) SAL_OVERRIDE;
+
+ virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) SAL_OVERRIDE;
+ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) SAL_OVERRIDE;
+ virtual long tell() SAL_OVERRIDE;
+ virtual bool isEnd() SAL_OVERRIDE;
+
+private:
+ Impl *m_pImpl;
+};
+
+}
+
+#endif // INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/inc/DocumentHandler.hxx b/writerperfect/inc/DocumentHandler.hxx
new file mode 100644
index 000000000000..608974be1eee
--- /dev/null
+++ b/writerperfect/inc/DocumentHandler.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_DOCUMENTHANDLER_HXX
+#define INCLUDED_WRITERPERFECT_DOCUMENTHANDLER_HXX
+
+#include <libodfgen/libodfgen.hxx>
+
+#include <com/sun/star/uno/Reference.h>
+
+#include <writerperfectdllapi.h>
+
+namespace com { namespace sun { namespace star { namespace xml { namespace sax {
+ class XDocumentHandler;
+} } } } }
+
+namespace writerperfect
+{
+
+class WRITERPERFECT_DLLPUBLIC DocumentHandler: public OdfDocumentHandler
+{
+public:
+ DocumentHandler(com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > &xHandler);
+ void startDocument() SAL_OVERRIDE;
+ void endDocument() SAL_OVERRIDE;
+ void startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) SAL_OVERRIDE;
+ void endElement(const char *psName) SAL_OVERRIDE;
+ void characters(const librevenge::RVNGString &sCharacters) SAL_OVERRIDE;
+
+private:
+ com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > mxHandler;
+};
+
+}
+
+#endif // INCLUDED_WRITERPERFECT_DOCUMENTHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/inc/ImportFilter.hxx b/writerperfect/inc/ImportFilter.hxx
index d3d1e04acd7a..595936df949b 100644
--- a/writerperfect/inc/ImportFilter.hxx
+++ b/writerperfect/inc/ImportFilter.hxx
@@ -33,8 +33,8 @@
#include <unotools/mediadescriptor.hxx>
-#include <writerperfect/DocumentHandler.hxx>
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <DocumentHandler.hxx>
+#include <WPXSvInputStream.hxx>
#include <xmloff/attrlist.hxx>
diff --git a/writerperfect/inc/WPFTEncodingDialog.hxx b/writerperfect/inc/WPFTEncodingDialog.hxx
new file mode 100644
index 000000000000..e76fb884a154
--- /dev/null
+++ b/writerperfect/inc/WPFTEncodingDialog.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* MSWorksImportFilter: Sets up the filter, and calls DocumentCollector
+ * to do the actual filtering
+ *
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_WPFTENCODINGDIALOG_HXX
+#define INCLUDED_WRITERPERFECT_WPFTENCODINGDIALOG_HXX
+
+#include <sal/types.h>
+
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/lstbox.hxx>
+
+#include <writerperfectdllapi.h>
+
+namespace writerperfect {
+
+class WRITERPERFECT_DLLPUBLIC WPFTEncodingDialog : public ModalDialog
+{
+public:
+ WPFTEncodingDialog( const OUString& title, const OUString& defEncoding);
+
+ virtual ~WPFTEncodingDialog();
+
+ OUString GetEncoding( ) const;
+ bool hasUserCalledCancel() const {
+ return m_userHasCancelled;
+ }
+private:
+ VclPtr<ListBox> m_pLbCharset;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
+
+ bool m_userHasCancelled;
+private:
+ DECL_LINK( DoubleClickHdl, ListBox* );
+ DECL_LINK(CancelHdl, void*);
+
+ void dispose() SAL_OVERRIDE;
+
+ WPFTEncodingDialog(WPFTEncodingDialog const &) SAL_DELETED_FUNCTION;
+ WPFTEncodingDialog &operator=(WPFTEncodingDialog const &) SAL_DELETED_FUNCTION;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx
new file mode 100644
index 000000000000..cd87f1ba008a
--- /dev/null
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX
+#define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX
+
+#include <librevenge-stream/librevenge-stream.h>
+
+#include <com/sun/star/uno/Reference.h>
+
+#include <writerperfectdllapi.h>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XInputStream;
+ class XSeekable;
+} } } }
+
+namespace writerperfect
+{
+
+class WPXSvInputStreamImpl;
+
+class WRITERPERFECT_DLLPUBLIC WPXSvInputStream : public librevenge::RVNGInputStream
+{
+public:
+ WPXSvInputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xStream );
+ virtual ~WPXSvInputStream();
+
+ virtual bool isStructured() SAL_OVERRIDE;
+ virtual unsigned subStreamCount() SAL_OVERRIDE;
+ virtual const char * subStreamName(unsigned id) SAL_OVERRIDE;
+ virtual bool existsSubStream(const char *name) SAL_OVERRIDE;
+ virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name) SAL_OVERRIDE;
+ virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id) SAL_OVERRIDE;
+
+ virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) SAL_OVERRIDE;
+ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) SAL_OVERRIDE;
+ virtual long tell() SAL_OVERRIDE;
+ virtual bool isEnd() SAL_OVERRIDE;
+
+private:
+ WPXSvInputStreamImpl *mpImpl;
+};
+
+}
+
+#endif // INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/inc/writerperfectdllapi.h b/writerperfect/inc/writerperfectdllapi.h
new file mode 100644
index 000000000000..d5495717e7e1
--- /dev/null
+++ b/writerperfect/inc/writerperfectdllapi.h
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_WRITERPERFECTDLLAPI_H
+#define INCLUDED_WRITERPERFECT_WRITERPERFECTDLLAPI_H
+
+#if defined WRITERPERFECT_DLLIMPLEMENTATION
+
+#define WRITERPERFECT_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define WRITERPERFECT_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define WRITERPERFECT_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif /* INCLUDED_WRITERPERFECT_WRITERPERFECTDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx
index 0a279cbc6646..209fe1590f9b 100644
--- a/writerperfect/qa/unit/DirectoryStreamTest.cxx
+++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx
@@ -17,7 +17,7 @@
#include <test/bootstrapfixture.hxx>
-#include <writerperfect/DirectoryStream.hxx>
+#include <DirectoryStream.hxx>
namespace ucb = com::sun::star::ucb;
namespace uno = com::sun::star::uno;
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index a2f6c14a8785..cf2609e0bb76 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -26,7 +26,7 @@
#include "test/bootstrapfixture.hxx"
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <WPXSvInputStream.hxx>
namespace io = com::sun::star::io;
namespace ucb = com::sun::star::ucb;
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index f1363a5cb3d2..2431e792827f 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -14,7 +14,7 @@
#include <libwps/libwps.h>
-#include "writerperfect/WPFTEncodingDialog.hxx"
+#include "WPFTEncodingDialog.hxx"
#include "MSWorksCalcImportFilter.hxx"
using com::sun::star::uno::Sequence;
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index b0ff9c43bb6c..1f4638980982 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -36,8 +36,8 @@
#include <ucbhelper/content.hxx>
-#include <writerperfect/DirectoryStream.hxx>
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <DirectoryStream.hxx>
+#include <WPXSvInputStream.hxx>
namespace container = com::sun::star::container;
namespace io = com::sun::star::io;
diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx
index 1d93bf575bff..3ea4d053e4a6 100644
--- a/writerperfect/source/common/DocumentHandler.cxx
+++ b/writerperfect/source/common/DocumentHandler.cxx
@@ -7,7 +7,7 @@
* For further information visit http://libwpd.sourceforge.net
*/
-#include <writerperfect/DocumentHandler.hxx>
+#include <DocumentHandler.hxx>
#include <string.h>
diff --git a/writerperfect/source/common/WPFTEncodingDialog.cxx b/writerperfect/source/common/WPFTEncodingDialog.cxx
index 1e359930654e..de521c61e881 100644
--- a/writerperfect/source/common/WPFTEncodingDialog.cxx
+++ b/writerperfect/source/common/WPFTEncodingDialog.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <writerperfect/WPFTEncodingDialog.hxx>
+#include <WPFTEncodingDialog.hxx>
namespace writerperfect
{
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 535c3e99f4b1..e0fff43199d1 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <WPXSvInputStream.hxx>
#include <com/sun/star/packages/zip/XZipFileAccess2.hpp>
#include <com/sun/star/uno/Any.hxx>
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
index 6a832c3bdc88..f4e2cba4fd04 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
@@ -25,9 +25,9 @@
#include <rtl/tencinfo.h>
#include <ucbhelper/content.hxx>
-#include <writerperfect/DirectoryStream.hxx>
-#include <writerperfect/DocumentHandler.hxx>
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <DirectoryStream.hxx>
+#include <DocumentHandler.hxx>
+#include <WPXSvInputStream.hxx>
#include <xmloff/attrlist.hxx>
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index ddfd785c18dd..96496fe12d27 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -15,7 +15,7 @@
#include <libwps/libwps.h>
-#include "writerperfect/WPFTEncodingDialog.hxx"
+#include "WPFTEncodingDialog.hxx"
#include "MSWorksImportFilter.hxx"
using com::sun::star::uno::Sequence;
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 8d484dd3ba35..389e5b51c5d0 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -21,8 +21,8 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include <writerperfect/DocumentHandler.hxx>
-#include <writerperfect/WPXSvInputStream.hxx>
+#include <DocumentHandler.hxx>
+#include <WPXSvInputStream.hxx>
#include <xmloff/attrlist.hxx>
#include <sfx2/passwd.hxx>