[Libreoffice-commits] core.git: 4 commits - include/svx svx/source sw/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Jan 10 05:06:27 PST 2015


 include/svx/xflbmpit.hxx                       |    1 
 svx/source/xoutdev/xattr2.cxx                  |    8 +++
 sw/source/core/docnode/nodedump.cxx            |    7 +-
 sw/source/filter/ww8/rtfexportfilter.hxx       |    4 -
 writerfilter/source/filter/RtfFilter.hxx       |   66 ++++++++++---------------
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    4 -
 6 files changed, 43 insertions(+), 47 deletions(-)

New commits:
commit 10d67638a0692a1b2b3c485eb4c8a4261a46e4f3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 10 14:05:21 2015 +0100

    Factor out XFillBmpPosItem::dumpAsXml() from sw
    
    Change-Id: I7e483efd3aa96c34fb02affa73ee5ffb9840209c

diff --git a/include/svx/xflbmpit.hxx b/include/svx/xflbmpit.hxx
index 1629fd1..34dfd7a 100644
--- a/include/svx/xflbmpit.hxx
+++ b/include/svx/xflbmpit.hxx
@@ -41,6 +41,7 @@ public:
 
     SVX_DLLPRIVATE virtual sal_uInt16           GetValueCount() const SAL_OVERRIDE;
     SVX_DLLPRIVATE RECT_POINT               GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); }
+    void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 };
 
 
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 6d3bf32..29f5ff7 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -588,6 +588,14 @@ sal_uInt16 XFillBmpPosItem::GetValueCount() const
     return 9;
 }
 
+void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBmpPosItem"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 // class XFillBmpTileSizeXItem
 
 TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem );
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index b8f48e0..dfece35 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -57,6 +57,7 @@
 #include <svx/xbtmpit.hxx>
 #include <svx/xfltrit.hxx>
 #include <svx/xflbmtit.hxx>
+#include <svx/xflbmpit.hxx>
 #include <tools/datetimeutils.hxx>
 
 #include <libxml/encoding.h>
@@ -471,6 +472,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case XATTR_FILLBMP_TILE:
                 static_cast<const XFillBmpTileItem*>(pItem)->dumpAsXml(writer);
                 break;
+            case XATTR_FILLBMP_POS:
+                static_cast<const XFillBmpPosItem*>(pItem)->dumpAsXml(writer);
+                break;
             default: bDone = false; break;
         }
         if (bDone)
@@ -485,9 +489,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
         boost::optional<OString> oValue;
         switch (pItem->Which())
         {
-            case XATTR_FILLBMP_POS:
-                pWhich = "fill bitmap position";
-                break;
             case XATTR_FILLBMP_STRETCH:
                 pWhich = "fill bitmap stretch";
                 break;
commit 4c2de252d49acdeef85422bc91fe433ae6028bd6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 10 14:05:17 2015 +0100

    writerfilter: clean up RTFFrame::getSprms()
    
    Change-Id: I68bacfc41dc7b104a07c44135c0124e3f6464d67

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a8907c1..800bb8e 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -6369,9 +6369,7 @@ RTFSprms RTFFrame::getSprms()
     }
 
     RTFSprms frameprSprms;
-    auto pFrameprValue = std::make_shared<RTFValue>(sprms);
-    frameprSprms.set(NS_ooxml::LN_CT_PPrBase_framePr, pFrameprValue);
-
+    frameprSprms.set(NS_ooxml::LN_CT_PPrBase_framePr, std::make_shared<RTFValue>(sprms));
     return frameprSprms;
 }
 
commit a51d5084158affbb25db0ba60a6b06c3dc202699
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 10 14:05:13 2015 +0100

    RTF filter: change uses of cppu::WeakImplHelper* to use variadic variants
    
    Change-Id: Iea8552570146bd516ca2ee241caa4fcc3047b9f7

diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index dcccec0..7c31d34 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -23,7 +23,7 @@
 #include <com/sun/star/document/XFilter.hpp>
 #include <com/sun/star/document/XExporter.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <shellio.hxx>
 
 /// Dummy Writer implementation to be able to use the string format methods of the base class
@@ -34,7 +34,7 @@ protected:
 };
 
 /// The physical access to the RTF document (for writing).
-class RtfExportFilter : public cppu::WeakImplHelper2
+class RtfExportFilter : public cppu::WeakImplHelper
     <
     css::document::XFilter,
     css::document::XExporter
diff --git a/writerfilter/source/filter/RtfFilter.hxx b/writerfilter/source/filter/RtfFilter.hxx
index 29f9cbc..d9814e0 100644
--- a/writerfilter/source/filter/RtfFilter.hxx
+++ b/writerfilter/source/filter/RtfFilter.hxx
@@ -26,10 +26,10 @@
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase.hxx>
 
 /// Common RTF filter, calls RtfImportFilter and RtfExportFilter via UNO.
-class RtfFilter : public cppu::WeakImplHelper5
+class RtfFilter : public cppu::WeakImplHelper
     <
     css::document::XFilter,
     css::document::XImporter,
commit 4b2ed2bda4f565d756cf45c346d2b07406e34863
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 10 14:05:05 2015 +0100

    RtfFilter: indentation fixes
    
    Change-Id: I584045f8b626ff3a51e868c586581219bf4a758c

diff --git a/writerfilter/source/filter/RtfFilter.hxx b/writerfilter/source/filter/RtfFilter.hxx
index bd12ba5..29f9cbc 100644
--- a/writerfilter/source/filter/RtfFilter.hxx
+++ b/writerfilter/source/filter/RtfFilter.hxx
@@ -30,65 +30,53 @@
 
 /// Common RTF filter, calls RtfImportFilter and RtfExportFilter via UNO.
 class RtfFilter : public cppu::WeakImplHelper5
-<
-    com::sun::star::document::XFilter,
-    com::sun::star::document::XImporter,
-    com::sun::star::document::XExporter,
-    com::sun::star::lang::XInitialization,
-    com::sun::star::lang::XServiceInfo
->
+    <
+    css::document::XFilter,
+    css::document::XImporter,
+    css::document::XExporter,
+    css::lang::XInitialization,
+    css::lang::XServiceInfo
+    >
 {
 
 protected:
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
-    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc, m_xDstDoc;
+    css::uno::Reference<css::uno::XComponentContext> m_xContext;
+    css::uno::Reference<css::lang::XComponent> m_xSrcDoc, m_xDstDoc;
     OUString m_sFilterName;
-    ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xHandler;
+    css::uno::Reference<css::xml::sax::XDocumentHandler> m_xHandler;
 
 
 public:
-   RtfFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext);
-   virtual ~RtfFilter();
+    RtfFilter(const css::uno::Reference<css::uno::XComponentContext>& xContext);
+    virtual ~RtfFilter();
 
     // 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>& rDescriptor) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL cancel() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // XImporter
-    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;
+    virtual void SAL_CALL setTargetDocument(const css::uno::Reference<css::lang::XComponent>& xDoc)
+    throw (css::lang::IllegalArgumentException, 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;
 
     // XInitialization
-    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;
+    virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName(  )
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    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()
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 };
 
 
-OUString RtfFilter_getImplementationName()
-    throw ( ::com::sun::star::uno::RuntimeException );
+OUString RtfFilter_getImplementationName() throw (css::uno::RuntimeException);
+css::uno::Sequence<OUString> SAL_CALL RtfFilter_getSupportedServiceNames() throw (css::uno::RuntimeException);
+css::uno::Reference<css::uno::XInterface> SAL_CALL RtfFilter_createInstance(const css::uno::Reference<css::uno::XComponentContext>& xContext) throw(css::uno::Exception);
 
-::com::sun::star::uno::Sequence< OUString > SAL_CALL RtfFilter_getSupportedServiceNames(  )
-    throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfFilter_createInstance(
-                                                                        const ::com::sun::star::uno::Reference<
-                                                                        ::com::sun::star::uno::XComponentContext > &xContext)
-    throw( ::com::sun::star::uno::Exception );
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list