[Libreoffice-commits] core.git: 2 commits - chart2/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Apr 24 13:04:20 PDT 2014


 chart2/source/controller/chartcontroller.component                |    3 
 chart2/source/controller/main/ElementSelector.cxx                 |    7 +
 chart2/source/controller/main/_serviceregistration_controller.cxx |    8 -
 writerfilter/source/rtftok/rtflookahead.cxx                       |   12 +
 writerfilter/source/rtftok/rtflookahead.hxx                       |   70 +++++-----
 5 files changed, 52 insertions(+), 48 deletions(-)

New commits:
commit b8fc1721d20c09de595824884943ad0ece68bf52
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 24 21:51:14 2014 +0200

    writerfilter: fix indentation in rtflookahead
    
    Change-Id: Ib012030799ef2602a4b61c38d5ad2374422fe8b8

diff --git a/writerfilter/source/rtftok/rtflookahead.cxx b/writerfilter/source/rtftok/rtflookahead.cxx
index d3a8d49..bab41e6 100644
--- a/writerfilter/source/rtftok/rtflookahead.cxx
+++ b/writerfilter/source/rtftok/rtflookahead.cxx
@@ -16,12 +16,14 @@
 
 using namespace com::sun::star;
 
-namespace writerfilter {
-namespace rtftok {
+namespace writerfilter
+{
+namespace rtftok
+{
 
 RTFLookahead::RTFLookahead(SvStream& rStream, sal_Size nGroupStart)
     : m_rStream(rStream),
-    m_bHasTable(false)
+      m_bHasTable(false)
 {
     sal_Size nPos = m_rStream.Tell();
     m_rStream.Seek(nGroupStart);
@@ -64,8 +66,8 @@ int RTFLookahead::dispatchValue(RTFKeyword /*nKeyword*/, int /*nParam*/)
 
 int RTFLookahead::resolveChars(char ch)
 {
-    while(!m_rStream.IsEof() && (ch != '{' && ch != '}' && ch != '\\'))
-        m_rStream.ReadChar( ch );
+    while (!m_rStream.IsEof() && (ch != '{' && ch != '}' && ch != '\\'))
+        m_rStream.ReadChar(ch);
     if (!m_rStream.IsEof())
         m_rStream.SeekRel(-1);
     return 0;
diff --git a/writerfilter/source/rtftok/rtflookahead.hxx b/writerfilter/source/rtftok/rtflookahead.hxx
index 6746ebe..f2103de 100644
--- a/writerfilter/source/rtftok/rtflookahead.hxx
+++ b/writerfilter/source/rtftok/rtflookahead.hxx
@@ -15,40 +15,42 @@
 
 class SvStream;
 
-namespace writerfilter {
-    namespace rtftok {
-        /**
-         * This acts like an importer, but used for looking ahead, e.g. to
-         * determine if the current group contains a table, etc.
-         */
-        class RTFLookahead : public RTFListener
-        {
-            public:
-                RTFLookahead(SvStream& rStream, sal_Size nGroupStart);
-                virtual ~RTFLookahead();
-                virtual int dispatchDestination(RTFKeyword nKeyword) SAL_OVERRIDE;
-                virtual int dispatchFlag(RTFKeyword nKeyword) SAL_OVERRIDE;
-                virtual int dispatchSymbol(RTFKeyword nKeyword) SAL_OVERRIDE;
-                virtual int dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) SAL_OVERRIDE;
-                virtual int dispatchValue(RTFKeyword nKeyword, int nParam) SAL_OVERRIDE;
-                virtual int resolveChars(char ch) SAL_OVERRIDE;
-                virtual int pushState() SAL_OVERRIDE;
-                virtual int popState() SAL_OVERRIDE;
-                virtual RTFDestinationState getDestinationState() SAL_OVERRIDE;
-                virtual void setDestinationState(RTFDestinationState nDestinationState) SAL_OVERRIDE;
-                virtual RTFInternalState getInternalState() SAL_OVERRIDE;
-                virtual void setInternalState(RTFInternalState nInternalState) SAL_OVERRIDE;
-                virtual bool getSkipUnknown() SAL_OVERRIDE;
-                virtual void setSkipUnknown(bool bSkipUnknown) SAL_OVERRIDE;
-                virtual void finishSubstream() SAL_OVERRIDE;
-                virtual bool isSubstream() const SAL_OVERRIDE;
-                bool hasTable();
-            private:
-                boost::shared_ptr<RTFTokenizer> m_pTokenizer;
-                SvStream& m_rStream;
-                bool m_bHasTable;
-        };
-    } // namespace rtftok
+namespace writerfilter
+{
+namespace rtftok
+{
+/**
+ * This acts like an importer, but used for looking ahead, e.g. to
+ * determine if the current group contains a table, etc.
+ */
+class RTFLookahead : public RTFListener
+{
+public:
+    RTFLookahead(SvStream& rStream, sal_Size nGroupStart);
+    virtual ~RTFLookahead();
+    virtual int dispatchDestination(RTFKeyword nKeyword) SAL_OVERRIDE;
+    virtual int dispatchFlag(RTFKeyword nKeyword) SAL_OVERRIDE;
+    virtual int dispatchSymbol(RTFKeyword nKeyword) SAL_OVERRIDE;
+    virtual int dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) SAL_OVERRIDE;
+    virtual int dispatchValue(RTFKeyword nKeyword, int nParam) SAL_OVERRIDE;
+    virtual int resolveChars(char ch) SAL_OVERRIDE;
+    virtual int pushState() SAL_OVERRIDE;
+    virtual int popState() SAL_OVERRIDE;
+    virtual RTFDestinationState getDestinationState() SAL_OVERRIDE;
+    virtual void setDestinationState(RTFDestinationState nDestinationState) SAL_OVERRIDE;
+    virtual RTFInternalState getInternalState() SAL_OVERRIDE;
+    virtual void setInternalState(RTFInternalState nInternalState) SAL_OVERRIDE;
+    virtual bool getSkipUnknown() SAL_OVERRIDE;
+    virtual void setSkipUnknown(bool bSkipUnknown) SAL_OVERRIDE;
+    virtual void finishSubstream() SAL_OVERRIDE;
+    virtual bool isSubstream() const SAL_OVERRIDE;
+    bool hasTable();
+private:
+    boost::shared_ptr<RTFTokenizer> m_pTokenizer;
+    SvStream& m_rStream;
+    bool m_bHasTable;
+};
+} // namespace rtftok
 } // namespace writerfilter
 
 #endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
commit c1e8cd6f825f9981a6473afd883ec667d5579746
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 24 21:49:54 2014 +0200

    chart2: use constructor feature for ElementSelectorToolbarController
    
    Change-Id: Iee99f1f86af4ed494dbbe33b31baeb707b7ed544

diff --git a/chart2/source/controller/chartcontroller.component b/chart2/source/controller/chartcontroller.component
index 75869e5..c315a61 100644
--- a/chart2/source/controller/chartcontroller.component
+++ b/chart2/source/controller/chartcontroller.component
@@ -19,7 +19,8 @@
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     prefix="chartcontroller" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.chart.ElementSelectorToolbarController">
+  <implementation name="com.sun.star.comp.chart.ElementSelectorToolbarController"
+      constructor="com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
   <implementation name="com.sun.star.comp.chart2.ChartController">
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 5205143..7a5d4e2 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -318,4 +318,11 @@ uno::Reference< awt::XWindow > SAL_CALL ElementSelectorToolbarController::create
 
 } // chart2
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_chart_ElementSelectorToolbarController_get_implementation(css::uno::XComponentContext *context,
+                                                                            css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new chart::ElementSelectorToolbarController(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/main/_serviceregistration_controller.cxx b/chart2/source/controller/main/_serviceregistration_controller.cxx
index 330c051..ffadb56 100644
--- a/chart2/source/controller/main/_serviceregistration_controller.cxx
+++ b/chart2/source/controller/main/_serviceregistration_controller.cxx
@@ -70,14 +70,6 @@ static const struct ::cppu::ImplementationEntry g_entries_chart2_controller[] =
         , 0
     }
     ,{
-          ::chart::ElementSelectorToolbarController::create
-        , ::chart::ElementSelectorToolbarController::getImplementationName_Static
-        , ::chart::ElementSelectorToolbarController::getSupportedServiceNames_Static
-        , ::cppu::createSingleComponentFactory
-        , 0
-        , 0
-    }
-    ,{
           ::chart::ShapeToolbarController::create
         , ::chart::ShapeToolbarController::getImplementationName_Static
         , ::chart::ShapeToolbarController::getSupportedServiceNames_Static


More information about the Libreoffice-commits mailing list