diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-19 10:55:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-19 10:57:32 +0200 |
commit | fc5dfa8fd34f93a74f590167cb755ef7831bc0d8 (patch) | |
tree | 3da13eb22721ac2e91c53ba510552c9c555e1bcf /writerperfect/inc | |
parent | 867ccbc19b419e688c81485257371e2681a7775a (diff) |
Move module-local includes to writerperfect/inc
Change-Id: I8e90a95d6ab8d8a696d4666e2ab4ddd9584b60f0
Diffstat (limited to 'writerperfect/inc')
-rw-r--r-- | writerperfect/inc/DirectoryStream.hxx | 57 | ||||
-rw-r--r-- | writerperfect/inc/DocumentHandler.hxx | 54 | ||||
-rw-r--r-- | writerperfect/inc/ImportFilter.hxx | 4 | ||||
-rw-r--r-- | writerperfect/inc/WPFTEncodingDialog.hxx | 56 | ||||
-rw-r--r-- | writerperfect/inc/WPXSvInputStream.hxx | 55 | ||||
-rw-r--r-- | writerperfect/inc/writerperfectdllapi.h | 23 |
6 files changed, 247 insertions, 2 deletions
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: */ |