[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source include/svtools svtools/source unoidl/source

Stephan Bergmann sbergman at redhat.com
Tue Nov 26 06:57:40 PST 2013


 accessibility/inc/accessibility/extended/textwindowaccessibility.hxx |    2 
 accessibility/source/extended/textwindowaccessibility.cxx            |    2 
 accessibility/source/helper/acc_factory.cxx                          |    6 -
 include/svtools/accessiblefactory.hxx                                |    2 
 include/svtools/textwindowpeer.hxx                                   |    3 
 svtools/source/edit/textwindowpeer.cxx                               |    6 -
 svtools/source/misc/svtaccessiblefactory.cxx                         |    2 
 unoidl/source/sourceprovider-parser.y                                |   56 ++++++++--
 8 files changed, 56 insertions(+), 23 deletions(-)

New commits:
commit 62fcdfa34aa302aa9051e90e75b94eb442fa1db7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 26 15:54:26 2013 +0100

    -Werror,-Wunused-private-field
    
    ...fixed more thoroughly than 49c1964b427c9f2f169ba4d826d346adc7555ae0 "WaE:
    private field 'm_bCompoundControlChild' is not used."
    
    Change-Id: Ief1093c054fe272b82da78ab103e8ca3feb72b90

diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index befe02a..20433be 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -396,7 +396,7 @@ class Document: public ::VCLXAccessibleComponent, public ::SfxListener
 {
 public:
     Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
-             ::TextView & rView, bool bCompoundControlChild);
+             ::TextView & rView);
 
     inline css::uno::Reference< css::accessibility::XAccessible >
     getAccessible() { return m_xAccessible; }
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index f969bcb..002326f 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -770,7 +770,7 @@ void ParagraphImpl::checkDisposed()
 }
 
 Document::Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
-                   ::TextView & rView, bool /* bCompoundControlChild */):
+                   ::TextView & rView):
     VCLXAccessibleComponent(pVclXWindow),
     m_xAccessible(pVclXWindow),
     m_rEngine(rEngine),
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 93f6bf5..640c2d5 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -158,7 +158,7 @@ inline bool hasFloatingChild(Window *pWindow)
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
             createAccessibleTextWindowContext(
-                VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild
+                VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView
             ) const;
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
@@ -451,9 +451,9 @@ inline bool hasFloatingChild(Window *pWindow)
 
     //--------------------------------------------------------------------
     Reference< XAccessibleContext > AccessibleFactory::createAccessibleTextWindowContext(
-        VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild ) const
+        VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView ) const
     {
-        return new Document( pVclXWindow, rEngine, rView, bCompoundControlChild );
+        return new Document( pVclXWindow, rEngine, rView );
     }
 
     //--------------------------------------------------------------------
diff --git a/include/svtools/accessiblefactory.hxx b/include/svtools/accessiblefactory.hxx
index 18eec03..cd8a654 100644
--- a/include/svtools/accessiblefactory.hxx
+++ b/include/svtools/accessiblefactory.hxx
@@ -103,7 +103,7 @@ namespace svt
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
             createAccessibleTextWindowContext(
-                VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild
+                VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView
             ) const = 0;
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
diff --git a/include/svtools/textwindowpeer.hxx b/include/svtools/textwindowpeer.hxx
index cdcc6f8..14ef753 100644
--- a/include/svtools/textwindowpeer.hxx
+++ b/include/svtools/textwindowpeer.hxx
@@ -35,7 +35,7 @@ namespace svt
 class TextWindowPeer: public ::VCLXWindow
 {
 public:
-    SVT_DLLPUBLIC TextWindowPeer(::TextView & rView, bool bCompoundControlChild = false);
+    SVT_DLLPUBLIC TextWindowPeer(::TextView & rView);
 
     virtual ~TextWindowPeer();
 
@@ -53,7 +53,6 @@ private:
 
     ::TextEngine & m_rEngine;
     ::TextView & m_rView;
-    bool m_bCompoundControlChild;
 
     ::std::auto_ptr< ::svt::AccessibleFactoryAccess  >  m_pFactoryAccess;
 };
diff --git a/svtools/source/edit/textwindowpeer.cxx b/svtools/source/edit/textwindowpeer.cxx
index bbe30dd..11fa8c9 100644
--- a/svtools/source/edit/textwindowpeer.cxx
+++ b/svtools/source/edit/textwindowpeer.cxx
@@ -24,8 +24,8 @@
 
 namespace svt
 {
-    TextWindowPeer::TextWindowPeer(::TextView & rView, bool bCompoundControlChild):
-        m_rEngine(*rView.GetTextEngine()), m_rView(rView), m_bCompoundControlChild(bCompoundControlChild)
+    TextWindowPeer::TextWindowPeer(::TextView & rView):
+        m_rEngine(*rView.GetTextEngine()), m_rView(rView)
     {
         SetWindow(rView.GetWindow());
         m_pFactoryAccess.reset( new AccessibleFactoryAccess );
@@ -39,7 +39,7 @@ namespace svt
     css::uno::Reference< css::accessibility::XAccessibleContext > TextWindowPeer::CreateAccessibleContext()
     {
         return m_pFactoryAccess->getFactory().createAccessibleTextWindowContext(
-            this, m_rEngine, m_rView, m_bCompoundControlChild
+            this, m_rEngine, m_rView
         );
     }
 }
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index ee5a9c0..86b8103 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -124,7 +124,7 @@ namespace svt
 
             virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
                 createAccessibleTextWindowContext(
-                    VCLXWindow* /*pVclXWindow*/, TextEngine& /*rEngine*/, TextView& /*rView*/, bool /*bCompoundControlChild*/
+                    VCLXWindow* /*pVclXWindow*/, TextEngine& /*rEngine*/, TextView& /*rView*/
                 ) const
             {
                 return NULL;
commit 1dc1eaadd108883bd187411c721507df3d0d779e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 26 15:52:57 2013 +0100

    Fix unoidl sourceprovider old-style service duplicate member checks
    
    Change-Id: Ifa19a427543e76053e9b249c479e1e13f3599bcc

diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 2bcbcdd..77fcd7e 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -2673,9 +2673,21 @@ serviceBase:
                + " direct base service " + name + " is unpublished"));
           YYERROR;
       }
-      //TODO: check uniqueness
-      (opt ? pad->directOptionalBaseServices : pad->directMandatoryBaseServices)
-          .push_back(unoidl::AnnotatedReference(name, annotations($1)));
+      std::vector<unoidl::AnnotatedReference> & v(
+          opt
+          ? pad->directOptionalBaseServices : pad->directMandatoryBaseServices);
+      for (std::vector<unoidl::AnnotatedReference>::iterator i(v.begin());
+           i != v.end(); ++i)
+      {
+          if (name == i->name) {
+              error(
+                  @4, yyscanner,
+                  ("accumulation-based service " + data->currentName
+                   + " duplicate direct base service " + name));
+              YYERROR;
+          }
+      }
+      v.push_back(unoidl::AnnotatedReference(name, annotations($1)));
   }
 ;
 
@@ -2734,16 +2746,27 @@ serviceInterfaceBase:
       }
       if (data->publishedContext && !opt && !pubBase) {
           error(
-              @5, yyscanner,
+              @4, yyscanner,
               ("published accumulation-based service " + data->currentName
                + " direct base interface " + name + " is unpublished"));
           YYERROR;
       }
-      //TODO: check uniqueness
-      (opt
-       ? pad->directOptionalBaseInterfaces
-       : pad->directMandatoryBaseInterfaces)
-          .push_back(unoidl::AnnotatedReference(name, annotations($1)));
+      std::vector<unoidl::AnnotatedReference> & v(
+          opt
+          ? pad->directOptionalBaseInterfaces
+          : pad->directMandatoryBaseInterfaces);
+      for (std::vector<unoidl::AnnotatedReference>::iterator i(v.begin());
+           i != v.end(); ++i)
+      {
+          if (name == i->name) {
+              error(
+                  @4, yyscanner,
+                  ("accumulation-based service " + data->currentName
+                   + " duplicate direct base interface " + name));
+              YYERROR;
+          }
+      }
+      v.push_back(unoidl::AnnotatedReference(name, annotations($1)));
   }
 ;
 
@@ -2812,7 +2835,7 @@ serviceProperty:
           error(
               @3, yyscanner,
               ("illegal accumulation-based service " + data->currentName
-               + " direct attribute " + id + " type"));
+               + " direct property " + id + " type"));
           YYERROR;
           break;
       default:
@@ -2821,7 +2844,18 @@ serviceProperty:
       rtl::Reference<unoidl::detail::SourceProviderAccumulationBasedServiceEntityPad>
           pad(getCurrentPad<unoidl::detail::SourceProviderAccumulationBasedServiceEntityPad>(
                   data));
-      //TODO: check uniqueness
+      for (std::vector<unoidl::AccumulationBasedServiceEntity::Property>::iterator
+               i(pad->directProperties.begin());
+           i != pad->directProperties.end(); ++i)
+      {
+          if (id == i->name) {
+              error(
+                  @4, yyscanner,
+                  ("accumulation-based service " + data->currentName
+                   + " duplicate direct property " + id));
+              YYERROR;
+          }
+      }
       pad->directProperties.push_back(
           unoidl::AccumulationBasedServiceEntity::Property(
               id, t.getName(),


More information about the Libreoffice-commits mailing list