diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-05 20:49:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-05 21:11:41 +0200 |
commit | 25195658ab405cfc288950e15529e97ceb72575d (patch) | |
tree | 9227b32575ba973092071213c96bd7e23c5d5854 /sw | |
parent | ea7a9c06d220d111cb1c7142092be56c0608c080 (diff) |
sw: fix indentation in rtfexportfilter
Change-Id: I3055df538fc4dfa625aa942ad0d0e6b6299c53b3
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.cxx | 51 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexportfilter.hxx | 32 |
2 files changed, 38 insertions, 45 deletions
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 01aaefcc4591..eb324c25bd73 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -29,7 +29,7 @@ using namespace ::com::sun::star; -RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) +RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext >& xCtx) : m_xCtx(xCtx) { } @@ -38,26 +38,26 @@ RtfExportFilter::~RtfExportFilter() { } -sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) - throw (uno::RuntimeException, std::exception) +sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception) { SAL_INFO("sw.rtf", OSL_THIS_FUNC); utl::MediaDescriptor aMediaDesc = aDescriptor; - ::uno::Reference< io::XStream > xStream = - aMediaDesc.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); - SvStream* pStream = utl::UcbStreamHelper::CreateStream( xStream, true ); + uno::Reference<io::XStream> xStream = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >()); + SvStream* pStream = utl::UcbStreamHelper::CreateStream(xStream, true); m_aWriter.SetStream(pStream); // get SwDoc* - uno::Reference< uno::XInterface > xIfc( m_xSrcDoc, uno::UNO_QUERY ); - SwXTextDocument *pTxtDoc = dynamic_cast< SwXTextDocument * >( xIfc.get() ); - if ( !pTxtDoc ) { + uno::Reference< uno::XInterface > xIfc(m_xSrcDoc, uno::UNO_QUERY); + SwXTextDocument* pTxtDoc = dynamic_cast< SwXTextDocument* >(xIfc.get()); + if (!pTxtDoc) + { return sal_False; } - SwDoc *pDoc = pTxtDoc->GetDocShell()->GetDoc(); - if ( !pDoc ) { + SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + if (!pDoc) + { return sal_False; } @@ -69,23 +69,23 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a // get SwPaM* // we get SwPaM for the entire document; copy&paste is handled internally, not via UNO - SwPaM aPam( pDoc->GetNodes().GetEndOfContent() ); + SwPaM aPam(pDoc->GetNodes().GetEndOfContent()); aPam.SetMark(); - aPam.Move( fnMoveBackward, fnGoDoc ); + aPam.Move(fnMoveBackward, fnGoDoc); - SwPaM *pCurPam = new SwPaM( *aPam.End(), *aPam.Start() ); + SwPaM* pCurPam = new SwPaM(*aPam.End(), *aPam.Start()); // export the document // (in a separate block so that it's destructed before the commit) { - RtfExport aExport( this, pDoc, pCurPam, &aPam, NULL ); - aExport.ExportDocument( true ); + RtfExport aExport(this, pDoc, pCurPam, &aPam, NULL); + aExport.ExportDocument(true); } // delete the pCurPam - if ( pCurPam ) + if (pCurPam) { - while ( pCurPam->GetNext() != pCurPam ) + while (pCurPam->GetNext() != pCurPam) delete pCurPam->GetNext(); delete pCurPam; } @@ -94,12 +94,11 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a return sal_True; } -void RtfExportFilter::cancel( ) throw (uno::RuntimeException, std::exception) +void RtfExportFilter::cancel() throw(uno::RuntimeException, std::exception) { } -void RtfExportFilter::setSourceDocument( const uno::Reference< lang::XComponent >& xDoc ) - throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) +void RtfExportFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) { m_xSrcDoc = xDoc; } @@ -108,19 +107,19 @@ void RtfExportFilter::setSourceDocument( const uno::Reference< lang::XComponent OUString RtfExport_getImplementationName() { - return OUString( IMPL_NAME_RTFEXPORT ); + return OUString(IMPL_NAME_RTFEXPORT); } uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw() { - const OUString aServiceName( "com.sun.star.document.ExportFilter" ); - const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); + const OUString aServiceName("com.sun.star.document.ExportFilter"); + const uno::Sequence< OUString > aSeq(&aServiceName, 1); return aSeq; } -uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception ) +uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext >& xCtx) throw(uno::Exception) { - return (cppu::OWeakObject*) new RtfExportFilter( xCtx ); + return (cppu::OWeakObject*) new RtfExportFilter(xCtx); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx index e275e583762b..dcccec07885b 100644 --- a/sw/source/filter/ww8/rtfexportfilter.hxx +++ b/sw/source/filter/ww8/rtfexportfilter.hxx @@ -35,38 +35,32 @@ protected: /// The physical access to the RTF document (for writing). class RtfExportFilter : public cppu::WeakImplHelper2 -< - com::sun::star::document::XFilter, - com::sun::star::document::XExporter -> + < + css::document::XFilter, + css::document::XExporter + > { protected: - ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc; + css::uno::Reference<css::uno::XComponentContext> m_xCtx; + css::uno::Reference<css::lang::XComponent> m_xSrcDoc; public: - RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx ); + RtfExportFilter(const css::uno::Reference<css::uno::XComponentContext>& xCtx); virtual ~RtfExportFilter(); // XFilter - 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( ) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL filter(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL cancel() throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XExporter - virtual void SAL_CALL setSourceDocument( 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; + virtual void SAL_CALL setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) + throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; RtfWriter m_aWriter; }; OUString RtfExport_getImplementationName(); -::com::sun::star::uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() - throw(); -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance( - const ::com::sun::star::uno::Reference< - com::sun::star::uno::XComponentContext > &xCtx) - throw( ::com::sun::star::uno::Exception ); +css::uno::Sequence<OUString> SAL_CALL RtfExport_getSupportedServiceNames() throw(); +css::uno::Reference<css::uno::XInterface> SAL_CALL RtfExport_createInstance(const css::uno::Reference<css::uno::XComponentContext>& xCtx) throw(css::uno::Exception); #define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport" |