summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-08-15 08:46:11 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-15 09:03:51 +0200
commit7de2366a975c22cd77a1a3a64da6b7c642334ae1 (patch)
tree0af883a899a2803f1d74fbdcd96577d4b6d31ca3 /writerperfect
parent2c75925a809796e4177e5accaf6dfea566ea91bc (diff)
use consistent style for writerperfect
Change-Id: I47089586094b58c39a128e44e2671d69c2d50177
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/README6
-rw-r--r--writerperfect/astyle.options12
-rw-r--r--writerperfect/qa/unit/WPXSvStreamTest.cxx14
-rw-r--r--writerperfect/qa/unit/WpftImportTestBase.cxx10
-rw-r--r--writerperfect/qa/unit/WpftImportTestBase.hxx38
-rw-r--r--writerperfect/source/calc/ImportFilterBase.cxx50
-rw-r--r--writerperfect/source/calc/ImportFilterBase.hxx44
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.cxx26
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.hxx26
-rw-r--r--writerperfect/source/calc/MWAWCalcImportFilter.cxx28
-rw-r--r--writerperfect/source/calc/MWAWCalcImportFilter.hxx26
-rw-r--r--writerperfect/source/calc/wpftcalc_genericfilter.cxx31
-rw-r--r--writerperfect/source/common/DirectoryStream.cxx9
-rw-r--r--writerperfect/source/common/DocumentHandler.cxx22
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx32
-rw-r--r--writerperfect/source/draw/CDRImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/CDRImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/CMXImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/CMXImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/FreehandImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/FreehandImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/ImportFilterBase.cxx50
-rw-r--r--writerperfect/source/draw/ImportFilterBase.hxx44
-rw-r--r--writerperfect/source/draw/MSPUBImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/MSPUBImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/MWAWDrawImportFilter.cxx28
-rw-r--r--writerperfect/source/draw/MWAWDrawImportFilter.hxx26
-rw-r--r--writerperfect/source/draw/PageMakerImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/PageMakerImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/VisioImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/VisioImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/WPGImportFilter.cxx24
-rw-r--r--writerperfect/source/draw/WPGImportFilter.hxx24
-rw-r--r--writerperfect/source/draw/wpftdraw_genericfilter.cxx89
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.cxx142
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.hxx36
-rw-r--r--writerperfect/source/impress/wpftimpress_genericfilter.cxx23
-rw-r--r--writerperfect/source/writer/AbiWordImportFilter.cxx24
-rw-r--r--writerperfect/source/writer/AbiWordImportFilter.hxx24
-rw-r--r--writerperfect/source/writer/EBookImportFilter.cxx64
-rw-r--r--writerperfect/source/writer/EBookImportFilter.hxx24
-rw-r--r--writerperfect/source/writer/ImportFilterBase.cxx52
-rw-r--r--writerperfect/source/writer/ImportFilterBase.hxx44
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.cxx26
-rw-r--r--writerperfect/source/writer/MSWorksImportFilter.hxx26
-rw-r--r--writerperfect/source/writer/MWAWImportFilter.cxx28
-rw-r--r--writerperfect/source/writer/MWAWImportFilter.hxx26
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx112
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.hxx68
-rw-r--r--writerperfect/source/writer/wpftwriter_genericfilter.cxx55
50 files changed, 920 insertions, 801 deletions
diff --git a/writerperfect/README b/writerperfect/README
index 9edcb4011ec0..2207b6fb19df 100644
--- a/writerperfect/README
+++ b/writerperfect/README
@@ -4,3 +4,9 @@ This collection of filters is here in this folder in addition to the
WordPerfect filter that gave the module its (humorous) name "writerperfect"
because the libraries they use all have the same "style" of API and are
developed, at least partially, by the same person or group of persons.
+
+This module uses astyle to keep consistent coding style. Please run
+
+astyle --options=astyle.options \*.?xx
+
+before committing.
diff --git a/writerperfect/astyle.options b/writerperfect/astyle.options
new file mode 100644
index 000000000000..b7cc7d063aa8
--- /dev/null
+++ b/writerperfect/astyle.options
@@ -0,0 +1,12 @@
+# formatting options
+style=allman
+indent=spaces=4
+align-pointer=name
+break-closing-brackets
+pad-header
+unpad-paren
+max-instatement-indent=120
+
+# processing options
+recursive
+suffix=none
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index 7fad6239e857..a2f6c14a8785 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -73,7 +73,7 @@ shared_ptr<RVNGInputStream> lcl_createStream()
{
using comphelper::SequenceInputStream;
- const css::uno::Sequence<sal_Int8> aData(reinterpret_cast<const sal_Int8*>(aText), sizeof aText);
+ const css::uno::Sequence<sal_Int8> aData(reinterpret_cast<const sal_Int8 *>(aText), sizeof aText);
const uno::Reference<io::XInputStream> xInputStream(new SequenceInputStream(aData));
shared_ptr<RVNGInputStream> pInputStream;
@@ -90,8 +90,8 @@ const shared_ptr<RVNGInputStream> lcl_createStreamForURL(const rtl::OUString &rU
const Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext(), UNO_QUERY_THROW);
const Reference<ucb::XSimpleFileAccess> xFileAccess(
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.ucb.SimpleFileAccess", xContext),
- UNO_QUERY_THROW);
+ xContext->getServiceManager()->createInstanceWithContext("com.sun.star.ucb.SimpleFileAccess", xContext),
+ UNO_QUERY_THROW);
const Reference<io::XInputStream> xInputStream(xFileAccess->openFileRead(rURL), UNO_QUERY_THROW);
const shared_ptr<RVNGInputStream> pInput(new WPXSvInputStream(xInputStream));
@@ -122,9 +122,9 @@ void WPXSvStreamTest::testRead()
const unsigned long nLen = sizeof aText;
unsigned long nReadBytes = 0;
- const unsigned char* pData = 0;
- const unsigned char* const pTextOrig = reinterpret_cast<const unsigned char*>(aText);
- const unsigned char* pText = pTextOrig;
+ const unsigned char *pData = 0;
+ const unsigned char *const pTextOrig = reinterpret_cast<const unsigned char *>(aText);
+ const unsigned char *pText = pTextOrig;
// reading by small pieces
pData = pInput->read(1UL, nReadBytes);
@@ -176,7 +176,7 @@ void WPXSvStreamTest::testRead()
pData = pInput->read(0UL, nReadBytes);
CPPUNIT_ASSERT_EQUAL(0UL, nReadBytes);
CPPUNIT_ASSERT_EQUAL(0L, pInput->tell());
- CPPUNIT_ASSERT_EQUAL(pData, static_cast<const unsigned char*>(0));
+ CPPUNIT_ASSERT_EQUAL(pData, static_cast<const unsigned char *>(0));
CPPUNIT_ASSERT(!pInput->isEnd());
}
diff --git a/writerperfect/qa/unit/WpftImportTestBase.cxx b/writerperfect/qa/unit/WpftImportTestBase.cxx
index de82980537e6..697928953f82 100644
--- a/writerperfect/qa/unit/WpftImportTestBase.cxx
+++ b/writerperfect/qa/unit/WpftImportTestBase.cxx
@@ -60,8 +60,8 @@ void WpftImportTestBase::setUp()
m_xDesktop = frame::theDesktop::get(m_xContext);
const uno::Reference<document::XTypeDetection> xTypeDetection(
- m_xFactory->createInstanceWithContext("com.sun.star.document.TypeDetection", m_xContext),
- uno::UNO_QUERY_THROW);
+ m_xFactory->createInstanceWithContext("com.sun.star.document.TypeDetection", m_xContext),
+ uno::UNO_QUERY_THROW);
m_xTypeMap.set(xTypeDetection, uno::UNO_QUERY_THROW);
}
@@ -73,12 +73,12 @@ void WpftImportTestBase::tearDown()
}
bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUString &,
- unsigned int, unsigned int, unsigned int)
+ unsigned int, unsigned int, unsigned int)
{
// create an empty frame
const uno::Reference<lang::XComponent> xDoc(
- m_xDesktop->loadComponentFromURL(m_aFactoryURL, "_blank", 0, uno::Sequence<beans::PropertyValue>()),
- uno::UNO_QUERY_THROW);
+ m_xDesktop->loadComponentFromURL(m_aFactoryURL, "_blank", 0, uno::Sequence<beans::PropertyValue>()),
+ uno::UNO_QUERY_THROW);
// Find the model and frame. We need them later.
uno::Reference<frame::XFrame> xFrame(xDoc, uno::UNO_QUERY);
diff --git a/writerperfect/qa/unit/WpftImportTestBase.hxx b/writerperfect/qa/unit/WpftImportTestBase.hxx
index 3aa50a05819a..e6526a24da52 100644
--- a/writerperfect/qa/unit/WpftImportTestBase.hxx
+++ b/writerperfect/qa/unit/WpftImportTestBase.hxx
@@ -19,13 +19,35 @@
#include <unotest/filters-test.hxx>
-namespace com { namespace sun { namespace star {
- namespace beans { struct PropertyValue; }
- namespace container { class XNameAccess; }
- namespace document { class XFilter; }
- namespace frame { class XDesktop2; }
- namespace ucb { class XSimpleFileAccess; }
-} } }
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace beans
+{
+struct PropertyValue;
+}
+namespace container
+{
+class XNameAccess;
+}
+namespace document
+{
+class XFilter;
+}
+namespace frame
+{
+class XDesktop2;
+}
+namespace ucb
+{
+class XSimpleFileAccess;
+}
+}
+}
+}
namespace writerperfect
{
@@ -47,7 +69,7 @@ protected:
private:
virtual bool load(const OUString &, const OUString &rURL, const OUString &,
- unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
+ unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
void impl_detectFilterName(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &rDescriptor, const rtl::OUString &rTypeName);
diff --git a/writerperfect/source/calc/ImportFilterBase.cxx b/writerperfect/source/calc/ImportFilterBase.cxx
index ef3674611b6c..330cb6eb5c36 100644
--- a/writerperfect/source/calc/ImportFilterBase.cxx
+++ b/writerperfect/source/calc/ImportFilterBase.cxx
@@ -50,8 +50,8 @@ using com::sun::star::xml::sax::XParser;
using writerperfect::DocumentHandler;
using writerperfect::WPXSvInputStream;
-ImportFilterImpl::ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : mxContext( rxContext )
+ImportFilterImpl::ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext(rxContext)
{
}
@@ -59,20 +59,20 @@ ImportFilterImpl::~ImportFilterImpl()
{
}
-sal_Bool SAL_CALL ImportFilterImpl::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+sal_Bool SAL_CALL ImportFilterImpl::filter(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (RuntimeException, std::exception)
{
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "InputStream" )
+ if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
- if ( !xInputStream.is() )
+ if (!xInputStream.is())
{
- OSL_ASSERT( false );
+ OSL_ASSERT(false);
return sal_False;
}
@@ -84,13 +84,13 @@ throw (RuntimeException, std::exception)
// The XImporter sets up an empty target document for XDocumentHandler to write to..
Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
- xImporter->setTargetDocument( mxDoc );
+ xImporter->setTargetDocument(mxDoc);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
// writes to in-memory target doc
DocumentHandler xHandler(xInternalHandler);
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
OdsGenerator exporter;
exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
@@ -100,45 +100,45 @@ throw (RuntimeException, std::exception)
return doImportDocument(input, exporter);
}
-void SAL_CALL ImportFilterImpl::cancel( )
+void SAL_CALL ImportFilterImpl::cancel()
throw (RuntimeException, std::exception)
{
}
// XImporter
-void SAL_CALL ImportFilterImpl::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+void SAL_CALL ImportFilterImpl::setTargetDocument(const Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
{
mxDoc = xDoc;
}
// XExtendedFilterDetection
-OUString SAL_CALL ImportFilterImpl::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
-throw( com::sun::star::uno::RuntimeException, std::exception )
+OUString SAL_CALL ImportFilterImpl::detect(com::sun::star::uno::Sequence< PropertyValue > &Descriptor)
+throw(com::sun::star::uno::RuntimeException, std::exception)
{
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "TypeName" )
+ if (pValue[i].Name == "TypeName")
location=i;
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
if (!xInputStream.is())
return OUString();
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
- if ( doDetectFormat( input, sTypeName ) )
+ if (doDetectFormat(input, sTypeName))
{
- assert (!sTypeName.isEmpty());
+ assert(!sTypeName.isEmpty());
- if ( location == nLength )
+ if (location == nLength)
{
Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName";
@@ -152,18 +152,18 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
// XInitialization
-void SAL_CALL ImportFilterImpl::initialize( const Sequence< Any >& aArguments )
+void SAL_CALL ImportFilterImpl::initialize(const Sequence< Any > &aArguments)
throw (Exception, RuntimeException, std::exception)
{
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ if (nLength && (aArguments[0] >>= aAnySeq))
{
const 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" )
+ if (pValue[i].Name == "Type")
{
pValue[i].Value >>= msFilterName;
break;
@@ -172,7 +172,7 @@ throw (Exception, RuntimeException, std::exception)
}
}
-void ImportFilterImpl::doRegisterHandlers( OdsGenerator & )
+void ImportFilterImpl::doRegisterHandlers(OdsGenerator &)
{
}
diff --git a/writerperfect/source/calc/ImportFilterBase.hxx b/writerperfect/source/calc/ImportFilterBase.hxx
index d6ef4543db61..dafeffcb083c 100644
--- a/writerperfect/source/calc/ImportFilterBase.hxx
+++ b/writerperfect/source/calc/ImportFilterBase.hxx
@@ -20,24 +20,34 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase4.hxx>
-namespace com { namespace sun { namespace star {
+namespace com
+{
+namespace sun
+{
+namespace star
+{
namespace beans
{
- struct PropertyValue;
+struct PropertyValue;
}
namespace lang
{
- class XComponent;
+class XComponent;
}
namespace uno
{
- class XComponentContext;
+class XComponentContext;
+}
+namespace xml
+{
+namespace sax
+{
+class XDocumentHandler;
+}
+}
}
-namespace xml { namespace sax {
- class XDocumentHandler;
}
}
-} } }
class OdsGenerator;
@@ -58,31 +68,31 @@ class ImportFilterImpl : public cppu::WeakImplHelper4
>
{
public:
- ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
+ ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext);
virtual ~ImportFilterImpl();
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL cancel( )
+ virtual void SAL_CALL cancel()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ virtual void SAL_CALL setTargetDocument(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual OUString SAL_CALL detect(com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &Descriptor)
+ throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments)
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) = 0;
- virtual void doRegisterHandlers( OdsGenerator &rGenerator );
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) = 0;
+ virtual void doRegisterHandlers(OdsGenerator &rGenerator);
private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 1c38f4c89ba6..6c9e316ef73d 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -24,12 +24,12 @@ using com::sun::star::uno::Exception;
using com::sun::star::uno::RuntimeException;
using com::sun::star::uno::XComponentContext;
-bool MSWorksCalcImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator )
+bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator)
{
return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator);
}
-bool MSWorksCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MSWorksCalcImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
libwps::WPSKind kind = libwps::WPS_TEXT;
const libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&rInput, kind);
@@ -43,17 +43,17 @@ bool MSWorksCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInpu
return false;
}
-void MSWorksCalcImportFilter::doRegisterHandlers( OdsGenerator & )
+void MSWorksCalcImportFilter::doRegisterHandlers(OdsGenerator &)
{
}
-OUString MSWorksCalcImportFilter_getImplementationName ()
+OUString MSWorksCalcImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Calc.MSWorksCalcImportFilter" );
+ return OUString("com.sun.star.comp.Calc.MSWorksCalcImportFilter");
}
-Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -65,24 +65,24 @@ throw (RuntimeException)
#undef SERVICE_NAME2
#undef SERVICE_NAME1
-Reference< XInterface > SAL_CALL MSWorksCalcImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MSWorksCalcImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MSWorksCalcImportFilter( rContext );
+ return (cppu::OWeakObject *) new MSWorksCalcImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MSWorksCalcImportFilter::getImplementationName( )
+OUString SAL_CALL MSWorksCalcImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MSWorksCalcImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MSWorksCalcImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MSWorksCalcImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MSWorksCalcImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
index 2487c50607b5..dfe43d117487 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
@@ -21,32 +21,32 @@
class MSWorksCalcImportFilter : public writerperfect::calc::ImportFilterBase
{
public:
- MSWorksCalcImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::calc::ImportFilterBase( rxContext ) {}
+ MSWorksCalcImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::calc::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) SAL_OVERRIDE;
- virtual void doRegisterHandlers( OdsGenerator &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) SAL_OVERRIDE;
+ virtual void doRegisterHandlers(OdsGenerator &rGenerator) SAL_OVERRIDE;
};
OUString MSWorksCalcImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MSWorksCalcImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MSWorksCalcImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.cxx b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
index 0f5101fe0a80..e7a7e3ed2e23 100644
--- a/writerperfect/source/calc/MWAWCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
@@ -39,12 +39,12 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
-bool MWAWCalcImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator )
+bool MWAWCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator)
{
return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
}
-bool MWAWCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MWAWCalcImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
rTypeName = "";
@@ -54,7 +54,7 @@ bool MWAWCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
{
- if ( docKind == MWAWDocument::MWAW_K_SPREADSHEET || docKind == MWAWDocument::MWAW_K_DATABASE )
+ if (docKind == MWAWDocument::MWAW_K_SPREADSHEET || docKind == MWAWDocument::MWAW_K_DATABASE)
{
switch (docType)
{
@@ -143,19 +143,19 @@ bool MWAWCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
return !rTypeName.isEmpty();
}
-void MWAWCalcImportFilter::doRegisterHandlers( OdsGenerator &rGenerator )
+void MWAWCalcImportFilter::doRegisterHandlers(OdsGenerator &rGenerator)
{
rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
}
-OUString MWAWCalcImportFilter_getImplementationName ()
+OUString MWAWCalcImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Calc.MWAWCalcImportFilter" );
+ return OUString("com.sun.star.comp.Calc.MWAWCalcImportFilter");
}
-Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -165,24 +165,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL MWAWCalcImportFilter_createInstance( const Reference< XComponentContext > &rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MWAWCalcImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MWAWCalcImportFilter( rContext );
+ return (cppu::OWeakObject *) new MWAWCalcImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MWAWCalcImportFilter::getImplementationName( )
+OUString SAL_CALL MWAWCalcImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MWAWCalcImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MWAWCalcImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MWAWCalcImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MWAWCalcImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.hxx b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
index 8062f6be1b42..2624fe2ab1fc 100644
--- a/writerperfect/source/calc/MWAWCalcImportFilter.hxx
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
@@ -21,32 +21,32 @@
class MWAWCalcImportFilter : public writerperfect::calc::ImportFilterBase
{
public:
- MWAWCalcImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::calc::ImportFilterBase( rxContext ) {}
+ MWAWCalcImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::calc::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) SAL_OVERRIDE;
- virtual void doRegisterHandlers( OdsGenerator &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) SAL_OVERRIDE;
+ virtual void doRegisterHandlers(OdsGenerator &rGenerator) SAL_OVERRIDE;
};
OUString MWAWCalcImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MWAWCalcImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MWAWCalcImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/calc/wpftcalc_genericfilter.cxx b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
index 26410102f276..9738c34b9e42 100644
--- a/writerperfect/source/calc/wpftcalc_genericfilter.cxx
+++ b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
@@ -32,24 +32,31 @@
#include "MSWorksCalcImportFilter.hxx"
#include "MWAWCalcImportFilter.hxx"
-namespace {
+namespace
+{
-static cppu::ImplementationEntry const services[] = {
- { &MSWorksCalcImportFilter_createInstance, &MSWorksCalcImportFilter_getImplementationName,
- &MSWorksCalcImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &MWAWCalcImportFilter_createInstance, &MWAWCalcImportFilter_getImplementationName,
- &MWAWCalcImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 } };
+static cppu::ImplementationEntry const services[] =
+{
+ {
+ &MSWorksCalcImportFilter_createInstance, &MSWorksCalcImportFilter_getImplementationName,
+ &MSWorksCalcImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &MWAWCalcImportFilter_createInstance, &MWAWCalcImportFilter_getImplementationName,
+ &MWAWCalcImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
}
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL wpftcalc_component_getFactory(
- char const * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftcalc_component_getFactory(
+ char const *pImplName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, services);
+ pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index cfc423b1b746..41d6591f1f49 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -60,7 +60,7 @@ uno::Reference<io::XInputStream> findStream(ucbhelper::Content &rContent, const
try
{
const uno::Reference<sdbc::XResultSet> xResultSet(
- rContent.createCursor(lPropNames, ucbhelper::INCLUDE_DOCUMENTS_ONLY));
+ rContent.createCursor(lPropNames, ucbhelper::INCLUDE_DOCUMENTS_ONLY));
if (xResultSet->first())
{
const uno::Reference<ucb::XContentAccess> xContentAccess(xResultSet, uno::UNO_QUERY_THROW);
@@ -75,7 +75,8 @@ uno::Reference<io::XInputStream> findStream(ucbhelper::Content &rContent, const
xInputStream = aSubContent.openStream();
break;
}
- } while (xResultSet->next());
+ }
+ while (xResultSet->next());
}
}
catch (const uno::RuntimeException &)
@@ -140,7 +141,7 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
}
catch (...)
{
-return 0;
+ return 0;
}
bool DirectoryStream::isDirectory(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent) try
@@ -170,7 +171,7 @@ unsigned DirectoryStream::subStreamCount()
return 0;
}
-const char * DirectoryStream::subStreamName(unsigned /* id */)
+const char *DirectoryStream::subStreamName(unsigned /* id */)
{
// TODO: implement me
return 0;
diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx
index d1224bf3c619..72a5b36ac535 100644
--- a/writerperfect/source/common/DocumentHandler.cxx
+++ b/writerperfect/source/common/DocumentHandler.cxx
@@ -50,9 +50,9 @@ static void unescapeXML(const char *s, const unsigned long sz, librevenge::RVNGS
{
// look for &amp; , &lt; , &gt; , &apos; , &quot;
bool escapedChar=false;
- switch(*(p+1))
- {
- case 'a':
+ switch (*(p+1))
+ {
+ case 'a':
if (p+5 <= end && strncmp(p,"&amp;",5)==0)
{
res.append('&');
@@ -96,7 +96,8 @@ static void unescapeXML(const char *s, const unsigned long sz, librevenge::RVNGS
if (escapedChar) continue;
}
- while (p != next) {
+ while (p != next)
+ {
res.append(*p);
++p;
}
@@ -128,7 +129,7 @@ void DocumentHandler::startElement(const char *psName, const librevenge::RVNGPro
SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
Reference < XAttributeList > xAttrList(pAttrList);
librevenge::RVNGPropertyList::Iter i(xPropList);
- for (i.rewind(); i.next(); )
+ for (i.rewind(); i.next();)
{
// filter out librevenge elements
if (strncmp(i.key(), "librevenge", 10) != 0)
@@ -138,14 +139,17 @@ void DocumentHandler::startElement(const char *psName, const librevenge::RVNGPro
OUString sValue(i()->getStr().cstr(), strlen(i()->getStr().cstr()), RTL_TEXTENCODING_UTF8);
// libodfgen xml-encodes some attribute's value, so check if the value is encoded or not
- for (int j=0; j<9; ++j) {
+ for (int j=0; j<9; ++j)
+ {
// list of the encoded attributes followed by their lengths
- static char const *(listEncoded[9])={
+ static char const *(listEncoded[9])=
+ {
"draw:name", "svg:font-family", "style:condition", "style:num-prefix", "style:num-suffix",
"table:formula", "text:bullet-char", "text:label", "xlink:href"
};
- static size_t const (listEncodedLength[9])={9,15,15,16,16,13,16,10,10};
- if (keyLength==listEncodedLength[j] && strncmp(i.key(), listEncoded[j], keyLength)==0) {
+ static size_t const(listEncodedLength[9])= {9,15,15,16,16,13,16,10,10};
+ if (keyLength==listEncodedLength[j] && strncmp(i.key(), listEncoded[j], keyLength)==0)
+ {
librevenge::RVNGString decodedValue("");
unescapeXML(i()->getStr().cstr(), (unsigned long) strlen(i()->getStr().cstr()), decodedValue);
sValue=OUString(decodedValue.cstr(), strlen(decodedValue.cstr()), RTL_TEXTENCODING_UTF8);
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 185ae17b20ba..264dcc83515c 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -179,7 +179,7 @@ void OLEStorageImpl::initialize(SvStream *const pStream)
if (!pStream)
return;
- mxRootStorage.ref = new SotStorage( pStream, true );
+ mxRootStorage.ref = new SotStorage(pStream, true);
traverse(mxRootStorage.ref, "");
@@ -401,8 +401,8 @@ Reference<XInputStream> ZipStorageImpl::createStream(const rtl::OUString &rPath)
class WPXSvInputStreamImpl
{
public :
- WPXSvInputStreamImpl( ::com::sun::star::uno::Reference<
- ::com::sun::star::io::XInputStream > xStream );
+ WPXSvInputStreamImpl(::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XInputStream > xStream);
~WPXSvInputStreamImpl();
bool isStructured();
@@ -444,7 +444,7 @@ public:
unsigned long mnReadBufferPos;
};
-WPXSvInputStreamImpl::WPXSvInputStreamImpl( Reference< XInputStream > xStream ) :
+WPXSvInputStreamImpl::WPXSvInputStreamImpl(Reference< XInputStream > xStream) :
mxStream(xStream),
mxSeekable(xStream, UNO_QUERY),
maData(0),
@@ -471,7 +471,7 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl( Reference< XInputStream > xStream )
if (0 < mxSeekable->getPosition())
mxSeekable->seek(0);
}
- catch ( ... )
+ catch (...)
{
SAL_WARN("writerperfect", "mnLength = mxSeekable->getLength() threw exception");
mnLength = 0;
@@ -491,7 +491,7 @@ const unsigned char *WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned
if (numBytes == 0 || isEnd())
return 0;
- numBytesRead = mxStream->readSomeBytes (maData, numBytes);
+ numBytesRead = mxStream->readSomeBytes(maData, numBytes);
if (numBytesRead == 0)
return 0;
@@ -737,8 +737,8 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStor
{
if (rxStorage.Is())
{
- Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper( rxStorage ));
- return new WPXSvInputStream( xContents );
+ Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper(rxStorage));
+ return new WPXSvInputStream(xContents);
}
return 0;
}
@@ -746,7 +746,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStor
librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const Reference<XInputStream> &rxStream)
{
if (rxStream.is())
- return new WPXSvInputStream( rxStream );
+ return new WPXSvInputStream(rxStream);
else
return 0;
}
@@ -757,7 +757,7 @@ bool WPXSvInputStreamImpl::isOLE()
{
assert(0 == mxSeekable->getPosition());
- boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( mxStream ));
+ boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(mxStream));
if (pStream && SotStorage::IsOLEStorage(pStream.get()))
mpOLEStorage.reset(new OLEStorageImpl());
@@ -780,8 +780,8 @@ bool WPXSvInputStreamImpl::isZip()
const Reference<XComponentContext> xContext(comphelper::getProcessComponentContext(), UNO_QUERY_THROW);
const Reference<packages::zip::XZipFileAccess2> xZip(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.packages.zip.ZipFileAccess", aArgs, xContext),
- UNO_QUERY_THROW);
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.packages.zip.ZipFileAccess", aArgs, xContext),
+ UNO_QUERY_THROW);
mpZipStorage.reset(new ZipStorageImpl(xZip));
}
catch (const Exception &)
@@ -800,7 +800,7 @@ void WPXSvInputStreamImpl::ensureOLEIsInitialized()
assert(mpOLEStorage);
if (!mpOLEStorage->mbInitialized)
- mpOLEStorage->initialize(utl::UcbStreamHelper::CreateStream( mxStream ));
+ mpOLEStorage->initialize(utl::UcbStreamHelper::CreateStream(mxStream));
}
void WPXSvInputStreamImpl::ensureZipIsInitialized()
@@ -811,15 +811,15 @@ void WPXSvInputStreamImpl::ensureZipIsInitialized()
mpZipStorage->initialize();
}
-WPXSvInputStream::WPXSvInputStream( Reference< XInputStream > xStream ) :
+WPXSvInputStream::WPXSvInputStream(Reference< XInputStream > xStream) :
mpImpl(new WPXSvInputStreamImpl(xStream))
{
}
WPXSvInputStream::~WPXSvInputStream()
{
- if (mpImpl)
- delete mpImpl;
+ if (mpImpl)
+ delete mpImpl;
}
#define BUFFER_MAX 65536
diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx
index e0c1bd8a74e8..c5fa26939b46 100644
--- a/writerperfect/source/draw/CDRImportFilter.cxx
+++ b/writerperfect/source/draw/CDRImportFilter.cxx
@@ -27,12 +27,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool CDRImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool CDRImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libcdr::CDRDocument::parse(&rInput, &rGenerator);
}
-bool CDRImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool CDRImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libcdr::CDRDocument::isSupported(&rInput))
{
@@ -43,13 +43,13 @@ bool CDRImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUStr
return false;
}
-OUString CDRImportFilter_getImplementationName ()
+OUString CDRImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.CDRImportFilter" );
+ return OUString("com.sun.star.comp.Draw.CDRImportFilter");
}
-Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -59,24 +59,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL CDRImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL CDRImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new CDRImportFilter( rContext );
+ return (cppu::OWeakObject *) new CDRImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL CDRImportFilter::getImplementationName( )
+OUString SAL_CALL CDRImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return CDRImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL CDRImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL CDRImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL CDRImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CDRImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return CDRImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx
index 3df8ccc36f8f..2b8526af2ac7 100644
--- a/writerperfect/source/draw/CDRImportFilter.hxx
+++ b/writerperfect/source/draw/CDRImportFilter.hxx
@@ -19,33 +19,33 @@
class CDRImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- CDRImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ CDRImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString CDRImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL CDRImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL CDRImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL CDRImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx
index f9044f831a46..6b6d5a864d31 100644
--- a/writerperfect/source/draw/CMXImportFilter.cxx
+++ b/writerperfect/source/draw/CMXImportFilter.cxx
@@ -27,12 +27,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool CMXImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool CMXImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libcdr::CMXDocument::parse(&rInput, &rGenerator);
}
-bool CMXImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool CMXImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libcdr::CMXDocument::isSupported(&rInput))
{
@@ -43,13 +43,13 @@ bool CMXImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUStr
return false;
}
-OUString CMXImportFilter_getImplementationName ()
+OUString CMXImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.CMXImportFilter" );
+ return OUString("com.sun.star.comp.Draw.CMXImportFilter");
}
-Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -59,24 +59,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL CMXImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL CMXImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new CMXImportFilter( rContext );
+ return (cppu::OWeakObject *) new CMXImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL CMXImportFilter::getImplementationName( )
+OUString SAL_CALL CMXImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return CMXImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL CMXImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL CMXImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL CMXImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CMXImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return CMXImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx
index 43ffe96b5a15..0c7f0b207411 100644
--- a/writerperfect/source/draw/CMXImportFilter.hxx
+++ b/writerperfect/source/draw/CMXImportFilter.hxx
@@ -19,33 +19,33 @@
class CMXImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- CMXImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ CMXImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString CMXImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL CMXImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL CMXImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx
index db378582248d..86002f3a20ae 100644
--- a/writerperfect/source/draw/FreehandImportFilter.cxx
+++ b/writerperfect/source/draw/FreehandImportFilter.cxx
@@ -23,12 +23,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool FreehandImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool FreehandImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libfreehand::FreeHandDocument::parse(&rInput, &rGenerator);
}
-bool FreehandImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool FreehandImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libfreehand::FreeHandDocument::isSupported(&rInput))
{
@@ -39,13 +39,13 @@ bool FreehandImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
return false;
}
-OUString FreehandImportFilter_getImplementationName ()
+OUString FreehandImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.FreehandImportFilter" );
+ return OUString("com.sun.star.comp.Draw.FreehandImportFilter");
}
-Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -55,24 +55,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL FreehandImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL FreehandImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new FreehandImportFilter( rContext );
+ return (cppu::OWeakObject *) new FreehandImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL FreehandImportFilter::getImplementationName( )
+OUString SAL_CALL FreehandImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return FreehandImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL FreehandImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL FreehandImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL FreehandImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL FreehandImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return FreehandImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/FreehandImportFilter.hxx b/writerperfect/source/draw/FreehandImportFilter.hxx
index 0f9e284ba1d1..6b1c94dcb797 100644
--- a/writerperfect/source/draw/FreehandImportFilter.hxx
+++ b/writerperfect/source/draw/FreehandImportFilter.hxx
@@ -16,33 +16,33 @@
class FreehandImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- FreehandImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ FreehandImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString FreehandImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL FreehandImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL FreehandImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL FreehandImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/ImportFilterBase.cxx b/writerperfect/source/draw/ImportFilterBase.cxx
index fc6c8ee223a0..9d2258c79b50 100644
--- a/writerperfect/source/draw/ImportFilterBase.cxx
+++ b/writerperfect/source/draw/ImportFilterBase.cxx
@@ -50,8 +50,8 @@ using com::sun::star::xml::sax::XParser;
using writerperfect::DocumentHandler;
using writerperfect::WPXSvInputStream;
-ImportFilterImpl::ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : mxContext( rxContext )
+ImportFilterImpl::ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext(rxContext)
{
}
@@ -59,20 +59,20 @@ ImportFilterImpl::~ImportFilterImpl()
{
}
-sal_Bool SAL_CALL ImportFilterImpl::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+sal_Bool SAL_CALL ImportFilterImpl::filter(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (RuntimeException, std::exception)
{
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "InputStream" )
+ if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
- if ( !xInputStream.is() )
+ if (!xInputStream.is())
{
- OSL_ASSERT( false );
+ OSL_ASSERT(false);
return sal_False;
}
@@ -84,13 +84,13 @@ throw (RuntimeException, std::exception)
// The XImporter sets up an empty target document for XDocumentHandler to write to..
Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
- xImporter->setTargetDocument( mxDoc );
+ xImporter->setTargetDocument(mxDoc);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
// writes to in-memory target doc
DocumentHandler xHandler(xInternalHandler);
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
OdgGenerator exporter;
exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
@@ -100,45 +100,45 @@ throw (RuntimeException, std::exception)
return doImportDocument(input, exporter);
}
-void SAL_CALL ImportFilterImpl::cancel( )
+void SAL_CALL ImportFilterImpl::cancel()
throw (RuntimeException, std::exception)
{
}
// XImporter
-void SAL_CALL ImportFilterImpl::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+void SAL_CALL ImportFilterImpl::setTargetDocument(const Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
{
mxDoc = xDoc;
}
// XExtendedFilterDetection
-OUString SAL_CALL ImportFilterImpl::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
-throw( com::sun::star::uno::RuntimeException, std::exception )
+OUString SAL_CALL ImportFilterImpl::detect(com::sun::star::uno::Sequence< PropertyValue > &Descriptor)
+throw(com::sun::star::uno::RuntimeException, std::exception)
{
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "TypeName" )
+ if (pValue[i].Name == "TypeName")
location=i;
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
if (!xInputStream.is())
return OUString();
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
- if ( doDetectFormat( input, sTypeName ) )
+ if (doDetectFormat(input, sTypeName))
{
- assert (!sTypeName.isEmpty());
+ assert(!sTypeName.isEmpty());
- if ( location == nLength )
+ if (location == nLength)
{
Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName";
@@ -152,18 +152,18 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
// XInitialization
-void SAL_CALL ImportFilterImpl::initialize( const Sequence< Any >& aArguments )
+void SAL_CALL ImportFilterImpl::initialize(const Sequence< Any > &aArguments)
throw (Exception, RuntimeException, std::exception)
{
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ if (nLength && (aArguments[0] >>= aAnySeq))
{
const 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" )
+ if (pValue[i].Name == "Type")
{
pValue[i].Value >>= msFilterName;
break;
@@ -172,7 +172,7 @@ throw (Exception, RuntimeException, std::exception)
}
}
-void ImportFilterImpl::doRegisterHandlers( OdgGenerator & )
+void ImportFilterImpl::doRegisterHandlers(OdgGenerator &)
{
}
diff --git a/writerperfect/source/draw/ImportFilterBase.hxx b/writerperfect/source/draw/ImportFilterBase.hxx
index f326d98b3730..4b7e9170f56b 100644
--- a/writerperfect/source/draw/ImportFilterBase.hxx
+++ b/writerperfect/source/draw/ImportFilterBase.hxx
@@ -20,24 +20,34 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase4.hxx>
-namespace com { namespace sun { namespace star {
+namespace com
+{
+namespace sun
+{
+namespace star
+{
namespace beans
{
- struct PropertyValue;
+struct PropertyValue;
}
namespace lang
{
- class XComponent;
+class XComponent;
}
namespace uno
{
- class XComponentContext;
+class XComponentContext;
+}
+namespace xml
+{
+namespace sax
+{
+class XDocumentHandler;
+}
+}
}
-namespace xml { namespace sax {
- class XDocumentHandler;
}
}
-} } }
class OdgGenerator;
@@ -58,31 +68,31 @@ class ImportFilterImpl : public cppu::WeakImplHelper4
>
{
public:
- ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
+ ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext);
virtual ~ImportFilterImpl();
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL cancel( )
+ virtual void SAL_CALL cancel()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ virtual void SAL_CALL setTargetDocument(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual OUString SAL_CALL detect(com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &Descriptor)
+ throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments)
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) = 0;
- virtual void doRegisterHandlers( OdgGenerator &rGenerator );
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) = 0;
+ virtual void doRegisterHandlers(OdgGenerator &rGenerator);
private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx
index 99d59413443c..4a09651bb252 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.cxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.cxx
@@ -25,12 +25,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool MSPUBImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool MSPUBImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libmspub::MSPUBDocument::parse(&rInput, &rGenerator);
}
-bool MSPUBImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MSPUBImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libmspub::MSPUBDocument::isSupported(&rInput))
{
@@ -41,13 +41,13 @@ bool MSPUBImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUS
return false;
}
-OUString MSPUBImportFilter_getImplementationName ()
+OUString MSPUBImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.MSPUBImportFilter" );
+ return OUString("com.sun.star.comp.Draw.MSPUBImportFilter");
}
-Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -57,24 +57,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL MSPUBImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MSPUBImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MSPUBImportFilter( rContext );
+ return (cppu::OWeakObject *) new MSPUBImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MSPUBImportFilter::getImplementationName( )
+OUString SAL_CALL MSPUBImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MSPUBImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MSPUBImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MSPUBImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MSPUBImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSPUBImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MSPUBImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/MSPUBImportFilter.hxx b/writerperfect/source/draw/MSPUBImportFilter.hxx
index b615af8b3f02..c0e702c8e297 100644
--- a/writerperfect/source/draw/MSPUBImportFilter.hxx
+++ b/writerperfect/source/draw/MSPUBImportFilter.hxx
@@ -16,33 +16,33 @@
class MSPUBImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- MSPUBImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ MSPUBImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString MSPUBImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MSPUBImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MSPUBImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MSPUBImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
index feddcdbdc6cf..96b007f572c3 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
@@ -39,12 +39,12 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
-bool MWAWDrawImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool MWAWDrawImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
}
-bool MWAWDrawImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
rTypeName = "";
@@ -54,7 +54,7 @@ bool MWAWDrawImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
{
- if ( docKind == MWAWDocument::MWAW_K_DRAW || docKind == MWAWDocument::MWAW_K_PAINT )
+ if (docKind == MWAWDocument::MWAW_K_DRAW || docKind == MWAWDocument::MWAW_K_PAINT)
{
switch (docType)
{
@@ -143,19 +143,19 @@ bool MWAWDrawImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
return !rTypeName.isEmpty();
}
-void MWAWDrawImportFilter::doRegisterHandlers( OdgGenerator &rGenerator )
+void MWAWDrawImportFilter::doRegisterHandlers(OdgGenerator &rGenerator)
{
rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
}
-OUString MWAWDrawImportFilter_getImplementationName ()
+OUString MWAWDrawImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.MWAWDrawImportFilter" );
+ return OUString("com.sun.star.comp.Draw.MWAWDrawImportFilter");
}
-Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -165,24 +165,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL MWAWDrawImportFilter_createInstance( const Reference< XComponentContext > &rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MWAWDrawImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MWAWDrawImportFilter( rContext );
+ return (cppu::OWeakObject *) new MWAWDrawImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MWAWDrawImportFilter::getImplementationName( )
+OUString SAL_CALL MWAWDrawImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MWAWDrawImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MWAWDrawImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.hxx b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
index 173629e2e3b4..2a23e6b36f54 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.hxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
@@ -21,32 +21,32 @@
class MWAWDrawImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- MWAWDrawImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext ) {}
+ MWAWDrawImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
- virtual void doRegisterHandlers( OdgGenerator &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
+ virtual void doRegisterHandlers(OdgGenerator &rGenerator) SAL_OVERRIDE;
};
OUString MWAWDrawImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MWAWDrawImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MWAWDrawImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx
index a43cfaeb59e1..bb836d342076 100644
--- a/writerperfect/source/draw/PageMakerImportFilter.cxx
+++ b/writerperfect/source/draw/PageMakerImportFilter.cxx
@@ -25,12 +25,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool PageMakerImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool PageMakerImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libpagemaker::PMDocument::parse(&rInput, &rGenerator);
}
-bool PageMakerImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool PageMakerImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libpagemaker::PMDocument::isSupported(&rInput))
{
@@ -41,13 +41,13 @@ bool PageMakerImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput,
return false;
}
-OUString PageMakerImportFilter_getImplementationName ()
+OUString PageMakerImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString( "org.libreoffice.comp.Draw.PageMakerImportFilter" );
+ return OUString("org.libreoffice.comp.Draw.PageMakerImportFilter");
}
-Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence< OUString > aRet(2);
@@ -57,24 +57,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL PageMakerImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL PageMakerImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new PageMakerImportFilter( rContext );
+ return (cppu::OWeakObject *) new PageMakerImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL PageMakerImportFilter::getImplementationName( )
+OUString SAL_CALL PageMakerImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return PageMakerImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL PageMakerImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL PageMakerImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL PageMakerImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL PageMakerImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return PageMakerImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/PageMakerImportFilter.hxx b/writerperfect/source/draw/PageMakerImportFilter.hxx
index cc9ef994209d..e69474e1fee5 100644
--- a/writerperfect/source/draw/PageMakerImportFilter.hxx
+++ b/writerperfect/source/draw/PageMakerImportFilter.hxx
@@ -16,33 +16,33 @@
class PageMakerImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- PageMakerImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ PageMakerImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString PageMakerImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL PageMakerImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL PageMakerImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx
index 969697b2c822..deae25afcc87 100644
--- a/writerperfect/source/draw/VisioImportFilter.cxx
+++ b/writerperfect/source/draw/VisioImportFilter.cxx
@@ -23,12 +23,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool VisioImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool VisioImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libvisio::VisioDocument::parse(&rInput, &rGenerator);
}
-bool VisioImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool VisioImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libvisio::VisioDocument::isSupported(&rInput))
{
@@ -39,13 +39,13 @@ bool VisioImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUS
return false;
}
-OUString VisioImportFilter_getImplementationName ()
+OUString VisioImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.VisioImportFilter" );
+ return OUString("com.sun.star.comp.Draw.VisioImportFilter");
}
-Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -55,24 +55,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL VisioImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL VisioImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new VisioImportFilter( rContext );
+ return (cppu::OWeakObject *) new VisioImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL VisioImportFilter::getImplementationName( )
+OUString SAL_CALL VisioImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return VisioImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL VisioImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL VisioImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL VisioImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL VisioImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return VisioImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx
index 2b2346289b6f..5f2120fd98e1 100644
--- a/writerperfect/source/draw/VisioImportFilter.hxx
+++ b/writerperfect/source/draw/VisioImportFilter.hxx
@@ -16,33 +16,33 @@
class VisioImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- VisioImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ VisioImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString VisioImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL VisioImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL VisioImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx
index 6c0eac03f8d0..7c7ff885b358 100644
--- a/writerperfect/source/draw/WPGImportFilter.cxx
+++ b/writerperfect/source/draw/WPGImportFilter.cxx
@@ -30,12 +30,12 @@ using com::sun::star::uno::Sequence;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool WPGImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+bool WPGImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator)
{
return libwpg::WPGraphics::parse(&rInput, &rGenerator);
}
-bool WPGImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool WPGImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libwpg::WPGraphics::isSupported(&rInput))
{
@@ -46,13 +46,13 @@ bool WPGImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUStr
return false;
}
-OUString WPGImportFilter_getImplementationName ()
+OUString WPGImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Draw.WPGImportFilter" );
+ return OUString("com.sun.star.comp.Draw.WPGImportFilter");
}
-Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -62,24 +62,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL WPGImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL WPGImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new WPGImportFilter( rContext );
+ return (cppu::OWeakObject *) new WPGImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL WPGImportFilter::getImplementationName( )
+OUString SAL_CALL WPGImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return WPGImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL WPGImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL WPGImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL WPGImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WPGImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return WPGImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/draw/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx
index 98cc3aaaecc6..b55c9fecfb58 100644
--- a/writerperfect/source/draw/WPGImportFilter.hxx
+++ b/writerperfect/source/draw/WPGImportFilter.hxx
@@ -21,33 +21,33 @@
class WPGImportFilter : public writerperfect::draw::ImportFilterBase
{
public:
- WPGImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::draw::ImportFilterBase( rxContext )
+ WPGImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::draw::ImportFilterBase(rxContext)
{
}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE;
};
OUString WPGImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL WPGImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL WPGImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/draw/wpftdraw_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
index e80014123fdd..920660f8598f 100644
--- a/writerperfect/source/draw/wpftdraw_genericfilter.cxx
+++ b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
@@ -38,47 +38,66 @@
#include "VisioImportFilter.hxx"
#include "WPGImportFilter.hxx"
-namespace {
+namespace
+{
-static cppu::ImplementationEntry const services[] = {
- { &CDRImportFilter_createInstance, &CDRImportFilter_getImplementationName,
- &CDRImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &CMXImportFilter_createInstance, &CMXImportFilter_getImplementationName,
- &CMXImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &FreehandImportFilter_createInstance,
- &FreehandImportFilter_getImplementationName,
- &FreehandImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &PageMakerImportFilter_createInstance,
- &PageMakerImportFilter_getImplementationName,
- &PageMakerImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &MSPUBImportFilter_createInstance,
- &MSPUBImportFilter_getImplementationName,
- &MSPUBImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &MWAWDrawImportFilter_createInstance,
- &MWAWDrawImportFilter_getImplementationName,
- &MWAWDrawImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &VisioImportFilter_createInstance,
- &VisioImportFilter_getImplementationName,
- &VisioImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &WPGImportFilter_createInstance, &WPGImportFilter_getImplementationName,
- &WPGImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 } };
+static cppu::ImplementationEntry const services[] =
+{
+ {
+ &CDRImportFilter_createInstance, &CDRImportFilter_getImplementationName,
+ &CDRImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &CMXImportFilter_createInstance, &CMXImportFilter_getImplementationName,
+ &CMXImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &FreehandImportFilter_createInstance,
+ &FreehandImportFilter_getImplementationName,
+ &FreehandImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &PageMakerImportFilter_createInstance,
+ &PageMakerImportFilter_getImplementationName,
+ &PageMakerImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &MSPUBImportFilter_createInstance,
+ &MSPUBImportFilter_getImplementationName,
+ &MSPUBImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &MWAWDrawImportFilter_createInstance,
+ &MWAWDrawImportFilter_getImplementationName,
+ &MWAWDrawImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &VisioImportFilter_createInstance,
+ &VisioImportFilter_getImplementationName,
+ &VisioImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &WPGImportFilter_createInstance, &WPGImportFilter_getImplementationName,
+ &WPGImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
}
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL wpftdraw_component_getFactory(
- char const * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftdraw_component_getFactory(
+ char const *pImplName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, services);
+ pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
index f324a1f94c3f..15c08d0e13ec 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
@@ -69,15 +69,15 @@ namespace
{
template<class T>
-bool lcl_queryIsPackage( const Sequence<T> &lComponentData )
+bool lcl_queryIsPackage(const Sequence<T> &lComponentData)
{
bool bIsPackage = false;
const sal_Int32 nLength = lComponentData.getLength();
const T *pValue = lComponentData.getConstArray();
- for ( sal_Int32 i = 0; i < nLength; ++i)
+ for (sal_Int32 i = 0; i < nLength; ++i)
{
- if ( pValue[i].Name == "IsPackage" )
+ if (pValue[i].Name == "IsPackage")
{
pValue[i].Value >>= bIsPackage;
break;
@@ -87,21 +87,21 @@ bool lcl_queryIsPackage( const Sequence<T> &lComponentData )
return bIsPackage;
}
-bool lcl_isPackage( const Any &rComponentData )
+bool lcl_isPackage(const Any &rComponentData)
{
Sequence < beans::NamedValue > lComponentDataNV;
Sequence < beans::PropertyValue > lComponentDataPV;
- if ( rComponentData >>= lComponentDataNV )
- return lcl_queryIsPackage( lComponentDataNV );
- else if ( rComponentData >>= lComponentDataPV )
- return lcl_queryIsPackage( lComponentDataPV );
+ if (rComponentData >>= lComponentDataNV)
+ return lcl_queryIsPackage(lComponentDataNV);
+ else if (rComponentData >>= lComponentDataPV)
+ return lcl_queryIsPackage(lComponentDataPV);
return false;
}
}
-sal_Bool SAL_CALL KeynoteImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+sal_Bool SAL_CALL KeynoteImportFilter::filter(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (RuntimeException, std::exception)
{
sal_Int32 nLength = aDescriptor.getLength();
@@ -109,22 +109,22 @@ throw (RuntimeException, std::exception)
Reference < XInputStream > xInputStream;
Reference < ucb::XContent > xContent;
bool bIsPackage = false;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "ComponentData" )
- bIsPackage = lcl_isPackage( pValue[i].Value );
- else if ( pValue[i].Name == "InputStream" )
+ if (pValue[i].Name == "ComponentData")
+ bIsPackage = lcl_isPackage(pValue[i].Value);
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
- else if ( pValue[i].Name == "UCBContent" )
+ else if (pValue[i].Name == "UCBContent")
pValue[i].Value >>= xContent;
}
- if ( !xInputStream.is() )
+ if (!xInputStream.is())
{
- OSL_ASSERT( false );
+ OSL_ASSERT(false);
return sal_False;
}
- if ( bIsPackage && !xContent.is() )
+ if (bIsPackage && !xContent.is())
{
SAL_WARN("writerperfect", "the input claims to be a package, but does not have UCBContent");
bIsPackage = false;
@@ -138,17 +138,17 @@ throw (RuntimeException, std::exception)
// The XImporter sets up an empty target document for XDocumentHandler to write to..
Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
- xImporter->setTargetDocument( mxDoc );
+ xImporter->setTargetDocument(mxDoc);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
// writes to in-memory target doc
DocumentHandler xHandler(xInternalHandler);
shared_ptr< librevenge::RVNGInputStream > input;
- if ( bIsPackage )
- input.reset( new writerperfect::DirectoryStream( xContent ) );
+ if (bIsPackage)
+ input.reset(new writerperfect::DirectoryStream(xContent));
else
- input.reset( new WPXSvInputStream( xInputStream ) );
+ input.reset(new WPXSvInputStream(xInputStream));
OdpGenerator exporter;
exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
@@ -156,21 +156,21 @@ throw (RuntimeException, std::exception)
return tmpParseResult;
}
-void SAL_CALL KeynoteImportFilter::cancel( )
+void SAL_CALL KeynoteImportFilter::cancel()
throw (RuntimeException, std::exception)
{
}
// XImporter
-void SAL_CALL KeynoteImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+void SAL_CALL KeynoteImportFilter::setTargetDocument(const Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
{
mxDoc = xDoc;
}
// XExtendedFilterDetection
-OUString SAL_CALL KeynoteImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
-throw( com::sun::star::uno::RuntimeException, std::exception )
+OUString SAL_CALL KeynoteImportFilter::detect(com::sun::star::uno::Sequence< PropertyValue > &Descriptor)
+throw(com::sun::star::uno::RuntimeException, std::exception)
{
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 nNewLength = nLength + 2;
@@ -186,14 +186,14 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
Sequence < beans::PropertyValue > lComponentDataPV;
bool bComponentDataNV = true;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "TypeName" )
+ if (pValue[i].Name == "TypeName")
{
nTypeNameLocation = i;
--nNewLength;
}
- if ( pValue[i].Name == "ComponentData" )
+ if (pValue[i].Name == "ComponentData")
{
bComponentDataNV = pValue[i].Value >>= lComponentDataNV;
if (!bComponentDataNV)
@@ -201,11 +201,11 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
nComponentDataLocation = i;
--nNewLength;
}
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
{
pValue[i].Value >>= xInputStream;
}
- else if ( pValue[i].Name == "UCBContent" )
+ else if (pValue[i].Name == "UCBContent")
{
pValue[i].Value >>= xContent;
nUCBContentLocation = i;
@@ -217,7 +217,7 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
if (!xInputStream.is())
return OUString();
- shared_ptr< librevenge::RVNGInputStream > input( new WPXSvInputStream( xInputStream ) );
+ shared_ptr< librevenge::RVNGInputStream > input(new WPXSvInputStream(xInputStream));
/* Apple Keynote documents come in two variants:
* * actual files (zip), only produced by Keynote 5 (at least with
@@ -232,14 +232,14 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
* from a package was passed and pass the whole package to the
* filter instead.
*/
- if ( xContent.is() )
+ if (xContent.is())
{
- ucbhelper::Content aContent( xContent, Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
+ ucbhelper::Content aContent(xContent, Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext());
try
{
- if ( aContent.isFolder() )
+ if (aContent.isFolder())
{
- input.reset( new writerperfect::DirectoryStream( xContent ) );
+ input.reset(new writerperfect::DirectoryStream(xContent));
bIsPackage = true;
}
}
@@ -250,23 +250,23 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
}
libetonyek::EtonyekDocument::Type type = libetonyek::EtonyekDocument::TYPE_UNKNOWN;
- const libetonyek::EtonyekDocument::Confidence confidence = libetonyek::EtonyekDocument::isSupported( input.get(), &type );
+ const libetonyek::EtonyekDocument::Confidence confidence = libetonyek::EtonyekDocument::isSupported(input.get(), &type);
if ((libetonyek::EtonyekDocument::CONFIDENCE_NONE == confidence) || (libetonyek::EtonyekDocument::TYPE_KEYNOTE != type))
return OUString();
- if ( confidence == libetonyek::EtonyekDocument::CONFIDENCE_SUPPORTED_PART )
+ if (confidence == libetonyek::EtonyekDocument::CONFIDENCE_SUPPORTED_PART)
{
- if ( bIsPackage ) // we passed a directory stream, but the filter claims it's APXL file?
- return OUString();
+ if (bIsPackage) // we passed a directory stream, but the filter claims it's APXL file?
+ return OUString();
- const Reference < container::XChild > xChild( xContent, UNO_QUERY );
- if ( xChild.is() )
+ const Reference < container::XChild > xChild(xContent, UNO_QUERY);
+ if (xChild.is())
{
- const Reference < ucb::XContent > xPackageContent( xChild->getParent(), UNO_QUERY );
- if ( xPackageContent.is() )
+ const Reference < ucb::XContent > xPackageContent(xChild->getParent(), UNO_QUERY);
+ if (xPackageContent.is())
{
- input.reset( new writerperfect::DirectoryStream( xPackageContent ) );
- if ( libetonyek::EtonyekDocument::CONFIDENCE_EXCELLENT == libetonyek::EtonyekDocument::isSupported( input.get() ) )
+ input.reset(new writerperfect::DirectoryStream(xPackageContent));
+ if (libetonyek::EtonyekDocument::CONFIDENCE_EXCELLENT == libetonyek::EtonyekDocument::isSupported(input.get()))
{
xContent = xPackageContent;
bUCBContentChanged = true;
@@ -283,32 +283,32 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
}
// we do not need to insert ComponentData if this is not a package
- if ( !bIsPackage && ( nComponentDataLocation == -1 ) )
+ if (!bIsPackage && (nComponentDataLocation == -1))
--nNewLength;
- if ( nNewLength > nLength )
- Descriptor.realloc( nNewLength );
+ if (nNewLength > nLength)
+ Descriptor.realloc(nNewLength);
- if ( nTypeNameLocation == -1 )
+ if (nTypeNameLocation == -1)
{
- assert( nLength < nNewLength );
+ assert(nLength < nNewLength);
nTypeNameLocation = nLength++;
Descriptor[nTypeNameLocation].Name = "TypeName";
}
- if ( bIsPackage && ( nComponentDataLocation == -1 ) )
+ if (bIsPackage && (nComponentDataLocation == -1))
{
- assert( nLength < nNewLength );
+ assert(nLength < nNewLength);
nComponentDataLocation = nLength++;
Descriptor[nComponentDataLocation].Name = "ComponentData";
}
- if ( bIsPackage )
+ if (bIsPackage)
{
if (bComponentDataNV)
{
const sal_Int32 nCDSize = lComponentDataNV.getLength();
- lComponentDataNV.realloc( nCDSize + 1 );
+ lComponentDataNV.realloc(nCDSize + 1);
beans::NamedValue aValue;
aValue.Name = "IsPackage";
aValue.Value = comphelper::makeBoolAny(true);
@@ -318,7 +318,7 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
else
{
const sal_Int32 nCDSize = lComponentDataPV.getLength();
- lComponentDataPV.realloc( nCDSize + 1 );
+ lComponentDataPV.realloc(nCDSize + 1);
beans::PropertyValue aProp;
aProp.Name = "IsPackage";
aProp.Value = comphelper::makeBoolAny(true);
@@ -329,7 +329,7 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
}
}
- if ( bUCBContentChanged )
+ if (bUCBContentChanged)
Descriptor[nUCBContentLocation].Value <<= xContent;
const OUString sTypeName("impress_AppleKeynote");
@@ -339,18 +339,18 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
}
// XInitialization
-void SAL_CALL KeynoteImportFilter::initialize( const Sequence< Any >& aArguments )
+void SAL_CALL KeynoteImportFilter::initialize(const Sequence< Any > &aArguments)
throw (Exception, RuntimeException, std::exception)
{
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ if (nLength && (aArguments[0] >>= aAnySeq))
{
const 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" )
+ if (pValue[i].Name == "Type")
{
pValue[i].Value >>= msFilterName;
break;
@@ -359,48 +359,48 @@ throw (Exception, RuntimeException, std::exception)
}
}
-OUString KeynoteImportFilter_getImplementationName ()
+OUString KeynoteImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "org.libreoffice.comp.Impress.KeynoteImportFilter" );
+ return OUString("org.libreoffice.comp.Impress.KeynoteImportFilter");
}
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
OUString *pArray = aRet.getArray();
- pArray[0] = OUString ( SERVICE_NAME1 );
- pArray[1] = OUString ( SERVICE_NAME2 );
+ pArray[0] = OUString(SERVICE_NAME1);
+ pArray[1] = OUString(SERVICE_NAME2);
return aRet;
}
#undef SERVICE_NAME2
#undef SERVICE_NAME1
-Reference< XInterface > SAL_CALL KeynoteImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL KeynoteImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new KeynoteImportFilter( rContext );
+ return (cppu::OWeakObject *) new KeynoteImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL KeynoteImportFilter::getImplementationName( )
+OUString SAL_CALL KeynoteImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return KeynoteImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL KeynoteImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL KeynoteImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return KeynoteImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/impress/KeynoteImportFilter.hxx b/writerperfect/source/impress/KeynoteImportFilter.hxx
index 8e4caabc3544..2bfec5e56443 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.hxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.hxx
@@ -39,50 +39,50 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
public:
- KeynoteImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
- : mxContext( rxContext ) {}
+ KeynoteImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext(rxContext) {}
virtual ~KeynoteImportFilter() {}
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL cancel( )
+ virtual void SAL_CALL cancel()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ virtual void SAL_CALL setTargetDocument(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual OUString SAL_CALL detect(com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &Descriptor)
+ throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments)
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
};
OUString KeynoteImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-bool SAL_CALL KeynoteImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
+bool SAL_CALL KeynoteImportFilter_supportsService(const OUString &ServiceName)
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL KeynoteImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL KeynoteImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/impress/wpftimpress_genericfilter.cxx b/writerperfect/source/impress/wpftimpress_genericfilter.cxx
index 4081137cdf03..49b0f74d7c4c 100644
--- a/writerperfect/source/impress/wpftimpress_genericfilter.cxx
+++ b/writerperfect/source/impress/wpftimpress_genericfilter.cxx
@@ -27,21 +27,26 @@
#include "KeynoteImportFilter.hxx"
-namespace {
+namespace
+{
-static cppu::ImplementationEntry const services[] = {
- { &KeynoteImportFilter_createInstance, &KeynoteImportFilter_getImplementationName,
- &KeynoteImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 } };
+static cppu::ImplementationEntry const services[] =
+{
+ {
+ &KeynoteImportFilter_createInstance, &KeynoteImportFilter_getImplementationName,
+ &KeynoteImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
}
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL wpftimpress_component_getFactory(
- char const * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftimpress_component_getFactory(
+ char const *pImplName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, services);
+ pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx
index b8aa52442588..e35d4ef254ad 100644
--- a/writerperfect/source/writer/AbiWordImportFilter.cxx
+++ b/writerperfect/source/writer/AbiWordImportFilter.cxx
@@ -24,12 +24,12 @@ using com::sun::star::uno::RuntimeException;
using com::sun::star::uno::XComponentContext;
using com::sun::star::uno::XInterface;
-bool AbiWordImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
+bool AbiWordImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator)
{
return libabw::AbiDocument::parse(&rInput, &rGenerator);
}
-bool AbiWordImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool AbiWordImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
if (libabw::AbiDocument::isFileFormatSupported(&rInput))
{
@@ -40,13 +40,13 @@ bool AbiWordImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, O
return false;
}
-OUString AbiWordImportFilter_getImplementationName ()
+OUString AbiWordImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Writer.AbiWordImportFilter" );
+ return OUString("com.sun.star.comp.Writer.AbiWordImportFilter");
}
-Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -58,24 +58,24 @@ throw (RuntimeException)
#undef SERVICE_NAME2
#undef SERVICE_NAME1
-Reference< XInterface > SAL_CALL AbiWordImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL AbiWordImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new AbiWordImportFilter( rContext );
+ return (cppu::OWeakObject *) new AbiWordImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL AbiWordImportFilter::getImplementationName( )
+OUString SAL_CALL AbiWordImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return AbiWordImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL AbiWordImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL AbiWordImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL AbiWordImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL AbiWordImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return AbiWordImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/writer/AbiWordImportFilter.hxx b/writerperfect/source/writer/AbiWordImportFilter.hxx
index 6d81423d4d68..50a5b7d6f386 100644
--- a/writerperfect/source/writer/AbiWordImportFilter.hxx
+++ b/writerperfect/source/writer/AbiWordImportFilter.hxx
@@ -21,31 +21,31 @@
class AbiWordImportFilter : public writerperfect::writer::ImportFilterBase
{
public:
- AbiWordImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::writer::ImportFilterBase( rxContext ) {}
+ AbiWordImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::writer::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator) SAL_OVERRIDE;
};
OUString AbiWordImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL AbiWordImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL AbiWordImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL AbiWordImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
index efe5334935cb..003e603e95e6 100644
--- a/writerperfect/source/writer/EBookImportFilter.cxx
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
@@ -26,7 +26,7 @@ using com::sun::star::uno::XComponentContext;
using libebook::EBOOKDocument;
-bool EBookImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator )
+bool EBookImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator)
{
EBOOKDocument::Type type = EBOOKDocument::TYPE_UNKNOWN;
@@ -49,7 +49,7 @@ bool EBookImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, c
return false;
}
-bool EBookImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool EBookImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
rTypeName = "";
@@ -59,39 +59,39 @@ bool EBookImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUS
{
switch (type)
{
- case EBOOKDocument::TYPE_FICTIONBOOK2 :
- rTypeName = "writer_FictionBook_2";
- break;
- case EBOOKDocument::TYPE_PALMDOC :
- rTypeName = "writer_PalmDoc";
- break;
- case EBOOKDocument::TYPE_PLUCKER :
- rTypeName = "writer_Plucker_eBook";
- break;
- case EBOOKDocument::TYPE_PEANUTPRESS :
- rTypeName = "writer_eReader_eBook";
- break;
- case EBOOKDocument::TYPE_TEALDOC :
- rTypeName = "writer_TealDoc";
- break;
- case EBOOKDocument::TYPE_ZTXT :
- rTypeName = "writer_zTXT";
- break;
- default :
- SAL_WARN_IF(type != EBOOKDocument::TYPE_UNKNOWN, "writerperfect", "EBookImportFilter::doDetectFormat: document type " << type << " detected, but ignored");
+ case EBOOKDocument::TYPE_FICTIONBOOK2 :
+ rTypeName = "writer_FictionBook_2";
+ break;
+ case EBOOKDocument::TYPE_PALMDOC :
+ rTypeName = "writer_PalmDoc";
+ break;
+ case EBOOKDocument::TYPE_PLUCKER :
+ rTypeName = "writer_Plucker_eBook";
+ break;
+ case EBOOKDocument::TYPE_PEANUTPRESS :
+ rTypeName = "writer_eReader_eBook";
+ break;
+ case EBOOKDocument::TYPE_TEALDOC :
+ rTypeName = "writer_TealDoc";
+ break;
+ case EBOOKDocument::TYPE_ZTXT :
+ rTypeName = "writer_zTXT";
+ break;
+ default :
+ SAL_WARN_IF(type != EBOOKDocument::TYPE_UNKNOWN, "writerperfect", "EBookImportFilter::doDetectFormat: document type " << type << " detected, but ignored");
}
}
return !rTypeName.isEmpty();
}
-OUString EBookImportFilter_getImplementationName ()
+OUString EBookImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "org.libreoffice.comp.Writer.EBookImportFilter" );
+ return OUString("org.libreoffice.comp.Writer.EBookImportFilter");
}
-Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -103,24 +103,24 @@ throw (RuntimeException)
#undef SERVICE_NAME2
#undef SERVICE_NAME1
-Reference< XInterface > SAL_CALL EBookImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL EBookImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new EBookImportFilter( rContext );
+ return (cppu::OWeakObject *) new EBookImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL EBookImportFilter::getImplementationName( )
+OUString SAL_CALL EBookImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return EBookImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL EBookImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL EBookImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL EBookImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL EBookImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return EBookImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/writer/EBookImportFilter.hxx b/writerperfect/source/writer/EBookImportFilter.hxx
index 0365fd7d4000..1fcf75416685 100644
--- a/writerperfect/source/writer/EBookImportFilter.hxx
+++ b/writerperfect/source/writer/EBookImportFilter.hxx
@@ -21,31 +21,31 @@
class EBookImportFilter : public writerperfect::writer::ImportFilterBase
{
public:
- EBookImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::writer::ImportFilterBase( rxContext ) {}
+ EBookImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::writer::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator) SAL_OVERRIDE;
};
OUString EBookImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL EBookImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL EBookImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/writer/ImportFilterBase.cxx b/writerperfect/source/writer/ImportFilterBase.cxx
index 9f1ecc5383ee..a0507a62a23c 100644
--- a/writerperfect/source/writer/ImportFilterBase.cxx
+++ b/writerperfect/source/writer/ImportFilterBase.cxx
@@ -48,8 +48,8 @@ using com::sun::star::xml::sax::XParser;
using writerperfect::DocumentHandler;
using writerperfect::WPXSvInputStream;
-ImportFilterImpl::ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : mxContext( rxContext )
+ImportFilterImpl::ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext(rxContext)
{
}
@@ -57,23 +57,23 @@ ImportFilterImpl::~ImportFilterImpl()
{
}
-sal_Bool SAL_CALL ImportFilterImpl::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+sal_Bool SAL_CALL ImportFilterImpl::filter(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (RuntimeException, std::exception)
{
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
Reference < XInputStream > xInputStream;
rtl::OUString sFilterName;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "FilterName" )
+ if (pValue[i].Name == "FilterName")
pValue[i].Value >>= sFilterName;
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
- if ( !xInputStream.is() )
+ if (!xInputStream.is())
{
- OSL_ASSERT( false );
+ OSL_ASSERT(false);
return sal_False;
}
@@ -85,13 +85,13 @@ throw (RuntimeException, std::exception)
// The XImporter sets up an empty target document for XDocumentHandler to write to..
Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
- xImporter->setTargetDocument( mxDoc );
+ xImporter->setTargetDocument(mxDoc);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
// writes to in-memory target doc
DocumentHandler xHandler(xInternalHandler);
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
OdtGenerator exporter;
exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
@@ -101,45 +101,45 @@ throw (RuntimeException, std::exception)
return doImportDocument(input, sFilterName, exporter);
}
-void SAL_CALL ImportFilterImpl::cancel( )
+void SAL_CALL ImportFilterImpl::cancel()
throw (RuntimeException, std::exception)
{
}
// XImporter
-void SAL_CALL ImportFilterImpl::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+void SAL_CALL ImportFilterImpl::setTargetDocument(const Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
{
mxDoc = xDoc;
}
// XExtendedFilterDetection
-OUString SAL_CALL ImportFilterImpl::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
-throw( com::sun::star::uno::RuntimeException, std::exception )
+OUString SAL_CALL ImportFilterImpl::detect(com::sun::star::uno::Sequence< PropertyValue > &Descriptor)
+throw(com::sun::star::uno::RuntimeException, std::exception)
{
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "TypeName" )
+ if (pValue[i].Name == "TypeName")
location=i;
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
if (!xInputStream.is())
return OUString();
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
- if ( doDetectFormat( input, sTypeName ) )
+ if (doDetectFormat(input, sTypeName))
{
- assert (!sTypeName.isEmpty());
+ assert(!sTypeName.isEmpty());
- if ( location == nLength )
+ if (location == nLength)
{
Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName";
@@ -152,18 +152,18 @@ throw( com::sun::star::uno::RuntimeException, std::exception )
}
// XInitialization
-void SAL_CALL ImportFilterImpl::initialize( const Sequence< Any >& aArguments )
+void SAL_CALL ImportFilterImpl::initialize(const Sequence< Any > &aArguments)
throw (Exception, RuntimeException, std::exception)
{
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ if (nLength && (aArguments[0] >>= aAnySeq))
{
const 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" )
+ if (pValue[i].Name == "Type")
{
pValue[i].Value >>= msFilterName;
break;
@@ -172,7 +172,7 @@ throw (Exception, RuntimeException, std::exception)
}
}
-void ImportFilterImpl::doRegisterHandlers( OdtGenerator & )
+void ImportFilterImpl::doRegisterHandlers(OdtGenerator &)
{
}
diff --git a/writerperfect/source/writer/ImportFilterBase.hxx b/writerperfect/source/writer/ImportFilterBase.hxx
index b54af430f979..dd9e4d9897da 100644
--- a/writerperfect/source/writer/ImportFilterBase.hxx
+++ b/writerperfect/source/writer/ImportFilterBase.hxx
@@ -21,24 +21,34 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase4.hxx>
-namespace com { namespace sun { namespace star {
+namespace com
+{
+namespace sun
+{
+namespace star
+{
namespace beans
{
- struct PropertyValue;
+struct PropertyValue;
}
namespace lang
{
- class XComponent;
+class XComponent;
}
namespace uno
{
- class XComponentContext;
+class XComponentContext;
+}
+namespace xml
+{
+namespace sax
+{
+class XDocumentHandler;
+}
+}
}
-namespace xml { namespace sax {
- class XDocumentHandler;
}
}
-} } }
namespace writerperfect
{
@@ -57,31 +67,31 @@ class ImportFilterImpl : public cppu::WeakImplHelper4
>
{
public:
- ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
+ ImportFilterImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext);
virtual ~ImportFilterImpl();
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL cancel( )
+ virtual void SAL_CALL cancel()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ virtual void SAL_CALL setTargetDocument(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual OUString SAL_CALL detect(com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &Descriptor)
+ throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments)
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) = 0;
- virtual void doRegisterHandlers( OdtGenerator &rGenerator );
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator) = 0;
+ virtual void doRegisterHandlers(OdtGenerator &rGenerator);
private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 9217cc638e44..2cd4996ed1e9 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -31,12 +31,12 @@ static bool handleEmbeddedWKSObject(const librevenge::RVNGBinaryData &data, OdfD
return libwps::WPSDocument::parse(data.getDataStream(), &exporter)==libwps::WPS_OK;
}
-bool MSWorksImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
+bool MSWorksImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator)
{
return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator);
}
-bool MSWorksImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MSWorksImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
libwps::WPSKind kind = libwps::WPS_TEXT;
const libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&rInput, kind);
@@ -50,18 +50,18 @@ bool MSWorksImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, O
return false;
}
-void MSWorksImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
+void MSWorksImportFilter::doRegisterHandlers(OdtGenerator &rGenerator)
{
rGenerator.registerEmbeddedObjectHandler("image/wks-ods", &handleEmbeddedWKSObject);
}
-OUString MSWorksImportFilter_getImplementationName ()
+OUString MSWorksImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Writer.MSWorksImportFilter" );
+ return OUString("com.sun.star.comp.Writer.MSWorksImportFilter");
}
-Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -73,24 +73,24 @@ throw (RuntimeException)
#undef SERVICE_NAME2
#undef SERVICE_NAME1
-Reference< XInterface > SAL_CALL MSWorksImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MSWorksImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MSWorksImportFilter( rContext );
+ return (cppu::OWeakObject *) new MSWorksImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MSWorksImportFilter::getImplementationName( )
+OUString SAL_CALL MSWorksImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MSWorksImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MSWorksImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MSWorksImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MSWorksImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MSWorksImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MSWorksImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx
index 9bddf0882550..4e1782b2fb70 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
@@ -21,32 +21,32 @@
class MSWorksImportFilter : public writerperfect::writer::ImportFilterBase
{
public:
- MSWorksImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::writer::ImportFilterBase( rxContext ) {}
+ MSWorksImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::writer::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE;
- virtual void doRegisterHandlers( OdtGenerator &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator) SAL_OVERRIDE;
+ virtual void doRegisterHandlers(OdtGenerator &rGenerator) SAL_OVERRIDE;
};
OUString MSWorksImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MSWorksImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MSWorksImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index d55a645cae5f..5a59575be8f5 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -38,12 +38,12 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
-bool MWAWImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
+bool MWAWImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator)
{
return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
}
-bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName)
{
rTypeName = "";
@@ -53,7 +53,7 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
{
- if ( docKind == MWAWDocument::MWAW_K_TEXT )
+ if (docKind == MWAWDocument::MWAW_K_TEXT)
{
switch (docType)
{
@@ -178,19 +178,19 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
return !rTypeName.isEmpty();
}
-void MWAWImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
+void MWAWImportFilter::doRegisterHandlers(OdtGenerator &rGenerator)
{
rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
}
-OUString MWAWImportFilter_getImplementationName ()
+OUString MWAWImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Writer.MWAWImportFilter" );
+ return OUString("com.sun.star.comp.Writer.MWAWImportFilter");
}
-Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -200,24 +200,24 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL MWAWImportFilter_createInstance( const Reference< XComponentContext > &rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL MWAWImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new MWAWImportFilter( rContext );
+ return (cppu::OWeakObject *) new MWAWImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL MWAWImportFilter::getImplementationName( )
+OUString SAL_CALL MWAWImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return MWAWImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MWAWImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL MWAWImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL MWAWImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL MWAWImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return MWAWImportFilter_getSupportedServiceNames();
diff --git a/writerperfect/source/writer/MWAWImportFilter.hxx b/writerperfect/source/writer/MWAWImportFilter.hxx
index 62883f9cf40a..9ea34189510d 100644
--- a/writerperfect/source/writer/MWAWImportFilter.hxx
+++ b/writerperfect/source/writer/MWAWImportFilter.hxx
@@ -21,32 +21,32 @@
class MWAWImportFilter : public writerperfect::writer::ImportFilterBase
{
public:
- MWAWImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : writerperfect::writer::ImportFilterBase( rxContext ) {}
+ MWAWImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : writerperfect::writer::ImportFilterBase(rxContext) {}
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
- virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE;
- virtual void doRegisterHandlers( OdtGenerator &rGenerator ) SAL_OVERRIDE;
+ virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
+ virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator) SAL_OVERRIDE;
+ virtual void doRegisterHandlers(OdtGenerator &rGenerator) SAL_OVERRIDE;
};
OUString MWAWImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL MWAWImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL MWAWImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 58a6d6d36dec..5294e2e030f3 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -91,24 +91,24 @@ static bool handleEmbeddedWPGImage(const librevenge::RVNGBinaryData &input, libr
return true;
}
-bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException, std::exception)
+bool SAL_CALL WordPerfectImportFilter::importImpl(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
+throw (RuntimeException, std::exception)
{
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "InputStream" )
+ if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
- if ( !xInputStream.is() )
+ if (!xInputStream.is())
{
- OSL_ASSERT( false );
+ OSL_ASSERT(false);
return false;
}
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
OString aUtf8Passwd;
@@ -117,11 +117,11 @@ bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::s
if (libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence)
{
int unsuccessfulAttempts = 0;
- while (true )
+ while (true)
{
- SfxPasswordDialog aPasswdDlg( 0 );
+ SfxPasswordDialog aPasswdDlg(0);
aPasswdDlg.SetMinLen(0);
- if(!aPasswdDlg.Execute())
+ if (!aPasswdDlg.Execute())
return false;
OUString aPasswd = aPasswdDlg.GetPassword();
aUtf8Passwd = OUStringToOString(aPasswd, RTL_TEXTENCODING_UTF8);
@@ -150,33 +150,33 @@ bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::s
OdtGenerator collector;
collector.addDocumentHandler(&xHandler, ODF_FLAT_XML);
- collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject);
- collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage);
+ collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject);
+ collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage);
if (libwpd::WPD_OK == libwpd::WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? 0 : aUtf8Passwd.getStr()))
return true;
return false;
}
-sal_Bool SAL_CALL WordPerfectImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+sal_Bool SAL_CALL WordPerfectImportFilter::filter(const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (RuntimeException, std::exception)
{
- return importImpl ( aDescriptor );
+ return importImpl(aDescriptor);
}
-void SAL_CALL WordPerfectImportFilter::cancel( )
+void SAL_CALL WordPerfectImportFilter::cancel()
throw (RuntimeException, std::exception)
{
}
// XImporter
-void SAL_CALL WordPerfectImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+void SAL_CALL WordPerfectImportFilter::setTargetDocument(const Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
{
mxDoc = xDoc;
}
// XExtendedFilterDetection
-OUString SAL_CALL WordPerfectImportFilter::detect( Sequence< PropertyValue >& Descriptor )
-throw( RuntimeException, std::exception )
+OUString SAL_CALL WordPerfectImportFilter::detect(Sequence< PropertyValue > &Descriptor)
+throw(RuntimeException, std::exception)
{
libwpd::WPDConfidence confidence = libwpd::WPD_CONFIDENCE_NONE;
OUString sTypeName;
@@ -184,18 +184,18 @@ throw( RuntimeException, std::exception )
sal_Int32 location = nLength;
const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
+ for (sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name == "TypeName" )
+ if (pValue[i].Name == "TypeName")
location=i;
- else if ( pValue[i].Name == "InputStream" )
+ else if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
if (!xInputStream.is())
return OUString();
- WPXSvInputStream input( xInputStream );
+ WPXSvInputStream input(xInputStream);
confidence = libwpd::WPDocument::isFileFormatSupported(&input);
@@ -204,7 +204,7 @@ throw( RuntimeException, std::exception )
if (!sTypeName.isEmpty())
{
- if ( location == nLength )
+ if (location == nLength)
{
Descriptor.realloc(nLength+1);
Descriptor[location].Name = "TypeName";
@@ -218,18 +218,18 @@ throw( RuntimeException, std::exception )
// XInitialization
-void SAL_CALL WordPerfectImportFilter::initialize( const Sequence< Any >& aArguments )
+void SAL_CALL WordPerfectImportFilter::initialize(const Sequence< Any > &aArguments)
throw (Exception, RuntimeException, std::exception)
{
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ if (nLength && (aArguments[0] >>= aAnySeq))
{
const 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" )
+ if (pValue[i].Name == "Type")
{
pValue[i].Value >>= msFilterName;
break;
@@ -237,13 +237,13 @@ throw (Exception, RuntimeException, std::exception)
}
}
}
-OUString WordPerfectImportFilter_getImplementationName ()
+OUString WordPerfectImportFilter_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Writer.WordPerfectImportFilter" );
+ return OUString("com.sun.star.comp.Writer.WordPerfectImportFilter");
}
-Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
@@ -253,38 +253,38 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL WordPerfectImportFilter_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL WordPerfectImportFilter_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new WordPerfectImportFilter( rContext );
+ return (cppu::OWeakObject *) new WordPerfectImportFilter(rContext);
}
// XServiceInfo
-OUString SAL_CALL WordPerfectImportFilter::getImplementationName( )
+OUString SAL_CALL WordPerfectImportFilter::getImplementationName()
throw (RuntimeException, std::exception)
{
return WordPerfectImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL WordPerfectImportFilter::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL WordPerfectImportFilter::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL WordPerfectImportFilter::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WordPerfectImportFilter::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return WordPerfectImportFilter_getSupportedServiceNames();
}
-WordPerfectImportFilterDialog::WordPerfectImportFilterDialog( const Reference< XComponentContext > & rContext) :
- mxContext( rContext ) {}
+WordPerfectImportFilterDialog::WordPerfectImportFilterDialog(const Reference< XComponentContext > &rContext) :
+ mxContext(rContext) {}
WordPerfectImportFilterDialog::~WordPerfectImportFilterDialog()
{
}
-void SAL_CALL WordPerfectImportFilterDialog::setTitle( const OUString & )
+void SAL_CALL WordPerfectImportFilterDialog::setTitle(const OUString &)
throw (RuntimeException, std::exception)
{
}
@@ -292,7 +292,7 @@ throw (RuntimeException, std::exception)
sal_Int16 SAL_CALL WordPerfectImportFilterDialog::execute()
throw (RuntimeException, std::exception)
{
- WPXSvInputStream input( mxInputStream );
+ WPXSvInputStream input(mxInputStream);
OString aUtf8Passwd;
@@ -301,11 +301,11 @@ throw (RuntimeException, std::exception)
if (libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence)
{
int unsuccessfulAttempts = 0;
- while (true )
+ while (true)
{
SfxPasswordDialog aPasswdDlg(0);
aPasswdDlg.SetMinLen(0);
- if(!aPasswdDlg.Execute())
+ if (!aPasswdDlg.Execute())
return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
msPassword = aPasswdDlg.GetPassword().getStr();
aUtf8Passwd = OUStringToOString(msPassword, RTL_TEXTENCODING_UTF8);
@@ -331,7 +331,7 @@ Sequence<PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getPropertyValue
return aRet;
}
-void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues( const Sequence<PropertyValue>& aProps)
+void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues(const Sequence<PropertyValue> &aProps)
throw(com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException,
com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException, RuntimeException, std::exception)
{
@@ -342,40 +342,40 @@ throw(com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::Pr
const PropertyValue &rProp = pPropArray[i];
OUString aPropName = rProp.Name;
- if ( aPropName == "Password" )
+ if (aPropName == "Password")
rProp.Value >>= msPassword;
- else if ( aPropName == "InputStream" )
+ else if (aPropName == "InputStream")
rProp.Value >>= mxInputStream;
}
}
// XServiceInfo
-OUString SAL_CALL WordPerfectImportFilterDialog::getImplementationName( )
+OUString SAL_CALL WordPerfectImportFilterDialog::getImplementationName()
throw (RuntimeException, std::exception)
{
return WordPerfectImportFilterDialog_getImplementationName();
}
-sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService( const OUString &rServiceName )
+sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService(const OUString &rServiceName)
throw (RuntimeException, std::exception)
{
- return cppu::supportsService( this, rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
-Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return WordPerfectImportFilterDialog_getSupportedServiceNames();
}
-OUString WordPerfectImportFilterDialog_getImplementationName ()
+OUString WordPerfectImportFilterDialog_getImplementationName()
throw (RuntimeException)
{
- return OUString ( "com.sun.star.comp.Writer.WordPerfectImportFilterDialog" );
+ return OUString("com.sun.star.comp.Writer.WordPerfectImportFilterDialog");
}
-Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames()
throw (RuntimeException)
{
Sequence < OUString > aRet(1);
@@ -384,10 +384,10 @@ throw (RuntimeException)
return aRet;
}
-Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance( const Reference< XComponentContext > & rContext)
-throw( Exception )
+Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance(const Reference< XComponentContext > &rContext)
+throw(Exception)
{
- return (cppu::OWeakObject *) new WordPerfectImportFilterDialog( rContext );
+ return (cppu::OWeakObject *) new WordPerfectImportFilterDialog(rContext);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx
index 8a1a661d4d92..60f720f3290e 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx
@@ -41,54 +41,54 @@ protected:
OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (css::uno::RuntimeException, std::exception);
+ bool SAL_CALL importImpl(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
+ throw (css::uno::RuntimeException, std::exception);
public:
- WordPerfectImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
- : mxContext( rxContext ) {}
+ WordPerfectImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
+ : mxContext(rxContext) {}
virtual ~WordPerfectImportFilter() {}
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL cancel( )
+ virtual void SAL_CALL cancel()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ virtual void SAL_CALL setTargetDocument(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > &xDoc)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//XExtendedFilterDetection
- virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual OUString SAL_CALL detect(com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &Descriptor)
+ throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments)
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
};
OUString WordPerfectImportFilter_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
+bool SAL_CALL WordPerfectImportFilter_supportsService(const OUString &ServiceName)
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL WordPerfectImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL WordPerfectImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
class WordPerfectImportFilterDialog : public cppu::WeakImplHelper3 <
@@ -104,24 +104,24 @@ class WordPerfectImportFilterDialog : public cppu::WeakImplHelper3 <
virtual ~WordPerfectImportFilterDialog();
// XExecutableDialog
- virtual void SAL_CALL setTitle( const OUString &aTitle )
+ virtual void SAL_CALL setTitle(const OUString &aTitle)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int16 SAL_CALL execute()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( )
+ virtual OUString SAL_CALL getImplementationName()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+ virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XPropertyAccess
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::PropertyValue >& aProps )
+ virtual void SAL_CALL setPropertyValues(const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& aProps)
throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::beans::PropertyVetoException,
::com::sun::star::lang::IllegalArgumentException,
@@ -129,22 +129,22 @@ class WordPerfectImportFilterDialog : public cppu::WeakImplHelper3 <
::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
public:
- WordPerfectImportFilterDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext);
+ WordPerfectImportFilterDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext);
};
OUString WordPerfectImportFilterDialog_getImplementationName()
-throw ( ::com::sun::star::uno::RuntimeException );
+throw (::com::sun::star::uno::RuntimeException);
-bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString &ServiceName )
-throw ( ::com::sun::star::uno::RuntimeException );
+bool SAL_CALL WordPerfectImportFilterDialog_supportsService(const OUString &ServiceName)
+throw (::com::sun::star::uno::RuntimeException);
-::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )
-throw ( ::com::sun::star::uno::RuntimeException );
+::com::sun::star::uno::Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames()
+throw (::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL WordPerfectImportFilterDialog_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
-throw ( ::com::sun::star::uno::Exception );
+SAL_CALL WordPerfectImportFilterDialog_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw (::com::sun::star::uno::Exception);
#endif
diff --git a/writerperfect/source/writer/wpftwriter_genericfilter.cxx b/writerperfect/source/writer/wpftwriter_genericfilter.cxx
index 05f654254e05..cd60fe21a1d4 100644
--- a/writerperfect/source/writer/wpftwriter_genericfilter.cxx
+++ b/writerperfect/source/writer/wpftwriter_genericfilter.cxx
@@ -37,33 +37,46 @@
#include "MSWorksImportFilter.hxx"
#include "MWAWImportFilter.hxx"
-namespace {
+namespace
+{
-static cppu::ImplementationEntry const services[] = {
- { &AbiWordImportFilter_createInstance, &AbiWordImportFilter_getImplementationName,
- &AbiWordImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &WordPerfectImportFilter_createInstance, &WordPerfectImportFilter_getImplementationName,
- &WordPerfectImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &MSWorksImportFilter_createInstance, &MSWorksImportFilter_getImplementationName,
- &MSWorksImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &MWAWImportFilter_createInstance, &MWAWImportFilter_getImplementationName,
- &MWAWImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { &EBookImportFilter_createInstance, &EBookImportFilter_getImplementationName,
- &EBookImportFilter_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 } };
+static cppu::ImplementationEntry const services[] =
+{
+ {
+ &AbiWordImportFilter_createInstance, &AbiWordImportFilter_getImplementationName,
+ &AbiWordImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &WordPerfectImportFilter_createInstance, &WordPerfectImportFilter_getImplementationName,
+ &WordPerfectImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &MSWorksImportFilter_createInstance, &MSWorksImportFilter_getImplementationName,
+ &MSWorksImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &MWAWImportFilter_createInstance, &MWAWImportFilter_getImplementationName,
+ &MWAWImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ {
+ &EBookImportFilter_createInstance, &EBookImportFilter_getImplementationName,
+ &EBookImportFilter_getSupportedServiceNames,
+ &cppu::createSingleComponentFactory, 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
}
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL wpftwriter_component_getFactory(
- char const * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftwriter_component_getFactory(
+ char const *pImplName, void *pServiceManager, void *pRegistryKey)
{
return cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, services);
+ pImplName, pServiceManager, pRegistryKey, services);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */