summaryrefslogtreecommitdiff
path: root/writerperfect/inc
diff options
context:
space:
mode:
Diffstat (limited to 'writerperfect/inc')
-rw-r--r--writerperfect/inc/DirectoryStream.hxx19
-rw-r--r--writerperfect/inc/DocumentHandler.hxx14
-rw-r--r--writerperfect/inc/DocumentHandlerFor.hxx5
-rw-r--r--writerperfect/inc/DocumentHandlerForOdg.hxx5
-rw-r--r--writerperfect/inc/DocumentHandlerForOdp.hxx5
-rw-r--r--writerperfect/inc/DocumentHandlerForOds.hxx5
-rw-r--r--writerperfect/inc/DocumentHandlerForOdt.hxx5
-rw-r--r--writerperfect/inc/ImportFilter.hxx90
-rw-r--r--writerperfect/inc/WPFTEncodingDialog.hxx23
-rw-r--r--writerperfect/inc/WPFTResMgr.hxx5
-rw-r--r--writerperfect/inc/WPXSvInputStream.hxx14
11 files changed, 80 insertions, 110 deletions
diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx
index 0421f9ced8cd..5fb9d2b8d3db 100644
--- a/writerperfect/inc/DirectoryStream.hxx
+++ b/writerperfect/inc/DirectoryStream.hxx
@@ -32,28 +32,28 @@ class XContent;
namespace writerperfect
{
-
class WRITERPERFECT_DLLPUBLIC DirectoryStream : public librevenge::RVNGInputStream
{
struct Impl;
public:
- explicit DirectoryStream(const css::uno::Reference<css::ucb::XContent> &xContent);
+ explicit DirectoryStream(const css::uno::Reference<css::ucb::XContent>& xContent);
virtual ~DirectoryStream() override;
- static bool isDirectory(const css::uno::Reference<css::ucb::XContent> &xContent);
- static std::unique_ptr<DirectoryStream> createForParent(const css::uno::Reference<css::ucb::XContent> &xContent);
+ static bool isDirectory(const css::uno::Reference<css::ucb::XContent>& xContent);
+ static std::unique_ptr<DirectoryStream>
+ createForParent(const css::uno::Reference<css::ucb::XContent>& xContent);
const css::uno::Reference<css::ucb::XContent> getContent() const;
virtual bool isStructured() override;
virtual unsigned subStreamCount() override;
- virtual const char *subStreamName(unsigned id) override;
- virtual bool existsSubStream(const char *name) override;
- virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
- virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id) override;
+ virtual const char* subStreamName(unsigned id) override;
+ virtual bool existsSubStream(const char* name) override;
+ virtual librevenge::RVNGInputStream* getSubStreamByName(const char* name) override;
+ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned id) override;
- virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
+ virtual const unsigned char* read(unsigned long numBytes, unsigned long& numBytesRead) override;
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
virtual long tell() override;
virtual bool isEnd() override;
@@ -61,7 +61,6 @@ public:
private:
std::unique_ptr<Impl> m_pImpl;
};
-
}
#endif // INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
diff --git a/writerperfect/inc/DocumentHandler.hxx b/writerperfect/inc/DocumentHandler.hxx
index 03188c995f68..ab7b15dd6aab 100644
--- a/writerperfect/inc/DocumentHandler.hxx
+++ b/writerperfect/inc/DocumentHandler.hxx
@@ -47,21 +47,19 @@ class XDocumentHandler;
namespace writerperfect
{
-
-class WRITERPERFECT_DLLPUBLIC DocumentHandler: public OdfDocumentHandler
+class WRITERPERFECT_DLLPUBLIC DocumentHandler : public OdfDocumentHandler
{
public:
- DocumentHandler(css::uno::Reference < css::xml::sax::XDocumentHandler > const &xHandler);
+ DocumentHandler(css::uno::Reference<css::xml::sax::XDocumentHandler> const& xHandler);
void startDocument() override;
void endDocument() override;
- void startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) override;
- void endElement(const char *psName) override;
- void characters(const librevenge::RVNGString &sCharacters) override;
+ void startElement(const char* psName, const librevenge::RVNGPropertyList& xPropList) override;
+ void endElement(const char* psName) override;
+ void characters(const librevenge::RVNGString& sCharacters) override;
private:
- css::uno::Reference < css::xml::sax::XDocumentHandler > mxHandler;
+ css::uno::Reference<css::xml::sax::XDocumentHandler> mxHandler;
};
-
}
#endif // INCLUDED_WRITERPERFECT_DOCUMENTHANDLER_HXX
diff --git a/writerperfect/inc/DocumentHandlerFor.hxx b/writerperfect/inc/DocumentHandlerFor.hxx
index fbe10a795e8d..dabd4ffcc5ef 100644
--- a/writerperfect/inc/DocumentHandlerFor.hxx
+++ b/writerperfect/inc/DocumentHandlerFor.hxx
@@ -10,17 +10,14 @@
namespace writerperfect
{
-
/** Definition of XML import service used with a Generator.
This template must be specialized for every libodfgen generator.
*/
-template<class Generator>
-struct DocumentHandlerFor
+template <class Generator> struct DocumentHandlerFor
{
// static const rtl::OUString name();
};
-
}
#endif // INCLUDED_WRITERPERFECT_INC_WRITERPERFECT_DOCUMENTHANDLERFOR_HXX
diff --git a/writerperfect/inc/DocumentHandlerForOdg.hxx b/writerperfect/inc/DocumentHandlerForOdg.hxx
index 4f64066a42ed..96cb288f6ba7 100644
--- a/writerperfect/inc/DocumentHandlerForOdg.hxx
+++ b/writerperfect/inc/DocumentHandlerForOdg.hxx
@@ -14,16 +14,13 @@
namespace writerperfect
{
-
-template<>
-struct DocumentHandlerFor<OdgGenerator>
+template <> struct DocumentHandlerFor<OdgGenerator>
{
static const rtl::OUString name()
{
return rtl::OUString("com.sun.star.comp.Draw.XMLOasisImporter");
}
};
-
}
#endif
diff --git a/writerperfect/inc/DocumentHandlerForOdp.hxx b/writerperfect/inc/DocumentHandlerForOdp.hxx
index 83190470d2fe..0ca91c65bd06 100644
--- a/writerperfect/inc/DocumentHandlerForOdp.hxx
+++ b/writerperfect/inc/DocumentHandlerForOdp.hxx
@@ -14,16 +14,13 @@
namespace writerperfect
{
-
-template<>
-struct DocumentHandlerFor<OdpGenerator>
+template <> struct DocumentHandlerFor<OdpGenerator>
{
static const rtl::OUString name()
{
return rtl::OUString("com.sun.star.comp.Impress.XMLOasisImporter");
}
};
-
}
#endif
diff --git a/writerperfect/inc/DocumentHandlerForOds.hxx b/writerperfect/inc/DocumentHandlerForOds.hxx
index e7762c40eb4d..60f96d2332cd 100644
--- a/writerperfect/inc/DocumentHandlerForOds.hxx
+++ b/writerperfect/inc/DocumentHandlerForOds.hxx
@@ -14,16 +14,13 @@
namespace writerperfect
{
-
-template<>
-struct DocumentHandlerFor<OdsGenerator>
+template <> struct DocumentHandlerFor<OdsGenerator>
{
static const rtl::OUString name()
{
return rtl::OUString("com.sun.star.comp.Calc.XMLOasisImporter");
}
};
-
}
#endif
diff --git a/writerperfect/inc/DocumentHandlerForOdt.hxx b/writerperfect/inc/DocumentHandlerForOdt.hxx
index 8607119a8c2b..e933644b534d 100644
--- a/writerperfect/inc/DocumentHandlerForOdt.hxx
+++ b/writerperfect/inc/DocumentHandlerForOdt.hxx
@@ -14,16 +14,13 @@
namespace writerperfect
{
-
-template<>
-struct DocumentHandlerFor<OdtGenerator>
+template <> struct DocumentHandlerFor<OdtGenerator>
{
static const rtl::OUString name()
{
return rtl::OUString("com.sun.star.comp.Writer.XMLOasisImporter");
}
};
-
}
#endif
diff --git a/writerperfect/inc/ImportFilter.hxx b/writerperfect/inc/ImportFilter.hxx
index c59fb9431a47..53029ef32176 100644
--- a/writerperfect/inc/ImportFilter.hxx
+++ b/writerperfect/inc/ImportFilter.hxx
@@ -41,35 +41,31 @@
namespace writerperfect
{
-
namespace detail
{
-
-template<class Generator>
-class ImportFilterImpl : public cppu::WeakImplHelper
- <
- css::document::XFilter,
- css::document::XImporter,
- css::document::XExtendedFilterDetection,
- css::lang::XInitialization
- >
+template <class Generator>
+class ImportFilterImpl
+ : public cppu::WeakImplHelper<css::document::XFilter, css::document::XImporter,
+ css::document::XExtendedFilterDetection,
+ css::lang::XInitialization>
{
public:
- ImportFilterImpl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
+ ImportFilterImpl(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
: mxContext(rxContext)
{
}
- const css::uno::Reference< css::uno::XComponentContext > &getXContext() const
+ const css::uno::Reference<css::uno::XComponentContext>& getXContext() const
{
return mxContext;
}
// XFilter
- virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor) override
+ virtual sal_Bool SAL_CALL
+ filter(const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor) override
{
utl::MediaDescriptor aDescriptor(rDescriptor);
- css::uno::Reference < css::io::XInputStream > xInputStream;
+ css::uno::Reference<css::io::XInputStream> xInputStream;
aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream;
if (!xInputStream.is())
{
@@ -78,13 +74,14 @@ public:
}
// An XML import service: what we push sax messages to..
- css::uno::Reference < css::xml::sax::XDocumentHandler > xInternalHandler(
+ css::uno::Reference<css::xml::sax::XDocumentHandler> xInternalHandler(
mxContext->getServiceManager()->createInstanceWithContext(
DocumentHandlerFor<Generator>::name(), mxContext),
css::uno::UNO_QUERY_THROW);
// The XImporter sets up an empty target document for XDocumentHandler to write to..
- css::uno::Reference < css::document::XImporter > xImporter(xInternalHandler, css::uno::UNO_QUERY);
+ css::uno::Reference<css::document::XImporter> xImporter(xInternalHandler,
+ css::uno::UNO_QUERY);
xImporter->setTargetDocument(mxDoc);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
@@ -101,32 +98,29 @@ public:
return doImportDocument(input, exporter, aDescriptor);
}
- virtual void SAL_CALL cancel() override
- {
- }
+ virtual void SAL_CALL cancel() override {}
// XImporter
- const css::uno::Reference< css::lang::XComponent > &getTargetDocument() const
- {
- return mxDoc;
- }
- virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
+ const css::uno::Reference<css::lang::XComponent>& getTargetDocument() const { return mxDoc; }
+ virtual void SAL_CALL
+ setTargetDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) override
{
mxDoc = xDoc;
}
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect(css::uno::Sequence< css::beans::PropertyValue > &Descriptor) override
+ virtual OUString SAL_CALL
+ detect(css::uno::Sequence<css::beans::PropertyValue>& Descriptor) override
{
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
- const css::beans::PropertyValue *pValue = Descriptor.getConstArray();
- css::uno::Reference < css::io::XInputStream > xInputStream;
- for (sal_Int32 i = 0 ; i < nLength; i++)
+ const css::beans::PropertyValue* pValue = Descriptor.getConstArray();
+ css::uno::Reference<css::io::XInputStream> xInputStream;
+ for (sal_Int32 i = 0; i < nLength; i++)
{
if (pValue[i].Name == "TypeName")
- location=i;
+ location = i;
else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
@@ -142,26 +136,26 @@ public:
if (location == nLength)
{
- Descriptor.realloc(nLength+1);
+ Descriptor.realloc(nLength + 1);
Descriptor[location].Name = "TypeName";
}
- Descriptor[location].Value <<=sTypeName;
+ Descriptor[location].Value <<= sTypeName;
}
return sTypeName;
}
// XInitialization
- virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
+ virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override
{
- css::uno::Sequence < css::beans::PropertyValue > aAnySeq;
+ css::uno::Sequence<css::beans::PropertyValue> aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if (nLength && (aArguments[0] >>= aAnySeq))
{
- const css::beans::PropertyValue *pValue = aAnySeq.getConstArray();
+ const css::beans::PropertyValue* pValue = aAnySeq.getConstArray();
nLength = aAnySeq.getLength();
- for (sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0; i < nLength; i++)
{
if (pValue[i].Name == "Type")
{
@@ -173,28 +167,30 @@ public:
}
private:
- virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0;
- virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, Generator &rGenerator, utl::MediaDescriptor &rDescriptor) = 0;
- virtual void doRegisterHandlers(Generator &) {};
-
- css::uno::Reference< css::uno::XComponentContext > mxContext;
- css::uno::Reference< css::lang::XComponent > mxDoc;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream& rInput, OUString& rTypeName) = 0;
+ virtual bool doImportDocument(librevenge::RVNGInputStream& rInput, Generator& rGenerator,
+ utl::MediaDescriptor& rDescriptor)
+ = 0;
+ virtual void doRegisterHandlers(Generator&){};
+
+ css::uno::Reference<css::uno::XComponentContext> mxContext;
+ css::uno::Reference<css::lang::XComponent> mxDoc;
OUString msFilterName;
};
-
}
/** A base class for import filters.
*/
-template<class Generator>
-struct ImportFilter : public cppu::ImplInheritanceHelper<detail::ImportFilterImpl<Generator>, css::lang::XServiceInfo>
+template <class Generator>
+struct ImportFilter : public cppu::ImplInheritanceHelper<detail::ImportFilterImpl<Generator>,
+ css::lang::XServiceInfo>
{
- ImportFilter(const css::uno::Reference<css::uno::XComponentContext> &rxContext)
- : cppu::ImplInheritanceHelper<detail::ImportFilterImpl<Generator>, css::lang::XServiceInfo>(rxContext)
+ ImportFilter(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
+ : cppu::ImplInheritanceHelper<detail::ImportFilterImpl<Generator>, css::lang::XServiceInfo>(
+ rxContext)
{
}
};
-
}
#endif // INCLUDED_WRITERPERFECT_INC_WRITERPERFECT_IMPORTFILTER_HXX
diff --git a/writerperfect/inc/WPFTEncodingDialog.hxx b/writerperfect/inc/WPFTEncodingDialog.hxx
index 1730f760a1ca..c6c501ff1af7 100644
--- a/writerperfect/inc/WPFTEncodingDialog.hxx
+++ b/writerperfect/inc/WPFTEncodingDialog.hxx
@@ -22,35 +22,32 @@
namespace writerperfect
{
-
class WRITERPERFECT_DLLPUBLIC WPFTEncodingDialog : public ModalDialog
{
public:
- WPFTEncodingDialog(const OUString &title, const OUString &defEncoding);
+ WPFTEncodingDialog(const OUString& title, const OUString& defEncoding);
virtual ~WPFTEncodingDialog() override;
OUString GetEncoding() const;
- bool hasUserCalledCancel() const
- {
- return m_userHasCancelled;
- }
+ bool hasUserCalledCancel() const { return m_userHasCancelled; }
+
private:
VclPtr<ListBox> m_pLbCharset;
- VclPtr<OKButton> m_pBtnOk;
- VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
bool m_userHasCancelled;
+
private:
- DECL_LINK(DoubleClickHdl, ListBox &, void);
- DECL_LINK(CancelHdl, Button *, void);
+ DECL_LINK(DoubleClickHdl, ListBox&, void);
+ DECL_LINK(CancelHdl, Button*, void);
void dispose() override;
- WPFTEncodingDialog(WPFTEncodingDialog const &) = delete;
- WPFTEncodingDialog &operator=(WPFTEncodingDialog const &) = delete;
+ WPFTEncodingDialog(WPFTEncodingDialog const&) = delete;
+ WPFTEncodingDialog& operator=(WPFTEncodingDialog const&) = delete;
};
-
}
#endif
diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx
index 1ac6796bb91e..a6cd38951716 100644
--- a/writerperfect/inc/WPFTResMgr.hxx
+++ b/writerperfect/inc/WPFTResMgr.hxx
@@ -7,10 +7,7 @@
#include <unotools/resmgr.hxx>
-inline OUString WpResId(const char *pId)
-{
- return Translate::get(pId, Translate::Create("wpt"));
-}
+inline OUString WpResId(const char* pId) { return Translate::get(pId, Translate::Create("wpt")); }
#endif
diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx
index e04158604714..f67e4159e28d 100644
--- a/writerperfect/inc/WPXSvInputStream.hxx
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -32,23 +32,22 @@ class XSeekable;
namespace writerperfect
{
-
class WPXSvInputStreamImpl;
class WRITERPERFECT_DLLPUBLIC WPXSvInputStream : public librevenge::RVNGInputStream
{
public:
- WPXSvInputStream(css::uno::Reference< css::io::XInputStream > const &xStream);
+ WPXSvInputStream(css::uno::Reference<css::io::XInputStream> const& xStream);
virtual ~WPXSvInputStream() override;
virtual bool isStructured() override;
virtual unsigned subStreamCount() override;
- virtual const char *subStreamName(unsigned id) override;
- virtual bool existsSubStream(const char *name) override;
- virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
- virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id) override;
+ virtual const char* subStreamName(unsigned id) override;
+ virtual bool existsSubStream(const char* name) override;
+ virtual librevenge::RVNGInputStream* getSubStreamByName(const char* name) override;
+ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned id) override;
- virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
+ virtual const unsigned char* read(unsigned long numBytes, unsigned long& numBytesRead) override;
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
virtual long tell() override;
virtual bool isEnd() override;
@@ -56,7 +55,6 @@ public:
private:
std::unique_ptr<WPXSvInputStreamImpl> mpImpl;
};
-
}
#endif // INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX