[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/source

Andre Fischer af at apache.org
Fri May 31 05:07:29 PDT 2013


 sfx2/source/sidebar/Accessible.cxx         |   68 +++++++++++++++++++++++++++
 sfx2/source/sidebar/Accessible.hxx         |   72 +++++++++++++++++++++++++++++
 sfx2/source/sidebar/AccessibleTitleBar.cxx |   72 +++++++++++++++++++++++++++++
 sfx2/source/sidebar/AccessibleTitleBar.hxx |   53 +++++++++++++++++++++
 4 files changed, 265 insertions(+)

New commits:
commit 488befaed6d5203d8a6e1c9e986caa5d342f5b40
Author: Andre Fischer <af at apache.org>
Date:   Fri May 31 11:29:01 2013 +0000

    122271: Added missing files.

diff --git a/sfx2/source/sidebar/Accessible.cxx b/sfx2/source/sidebar/Accessible.cxx
new file mode 100644
index 0000000..19fb8f6
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.cxx
@@ -0,0 +1,68 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "Accessible.hxx"
+
+
+using namespace css;
+using namespace cssu;
+
+
+namespace sfx2 { namespace sidebar {
+
+
+Accessible::Accessible (
+    const Reference<accessibility::XAccessibleContext>& rxContext)
+    : AccessibleInterfaceBase(m_aMutex),
+      mxContext(rxContext)
+{
+}
+
+
+
+
+Accessible::~Accessible (void)
+{
+}
+
+
+
+
+void SAL_CALL Accessible::disposing (void)
+{
+    Reference<XComponent> xComponent (mxContext, UNO_QUERY);
+    if (xComponent.is())
+        xComponent->dispose();
+}
+
+
+
+
+Reference<accessibility::XAccessibleContext> SAL_CALL Accessible::getAccessibleContext (void)
+    throw (cssu::RuntimeException)
+{
+    return mxContext;
+}
+
+
+} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/Accessible.hxx b/sfx2/source/sidebar/Accessible.hxx
new file mode 100644
index 0000000..6209c27
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.hxx
@@ -0,0 +1,72 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_ACCESSIBLE_HXX
+#define SFX_SIDEBAR_ACCESSIBLE_HXX
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+namespace
+{
+    typedef ::cppu::WeakComponentImplHelper1 <
+        css::accessibility::XAccessible
+        > AccessibleInterfaceBase;
+}
+
+namespace sfx2 { namespace sidebar {
+
+
+/** Simple implementation of the XAccessible interface.
+    Its getAccessibleContext() method returns a context object given
+    to its constructor.
+*/
+class Accessible
+    : private ::boost::noncopyable,
+      private ::cppu::BaseMutex,
+      public AccessibleInterfaceBase
+{
+public:
+    Accessible (
+        const cssu::Reference<css::accessibility::XAccessibleContext>& rxContext);
+    virtual ~Accessible (void);
+
+    virtual void SAL_CALL disposing (void);
+
+
+    // XAccessible
+    virtual cssu::Reference<css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext (void)
+        throw (cssu::RuntimeException);
+
+private:
+    cssu::Reference<css::accessibility::XAccessibleContext> mxContext;
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif
diff --git a/sfx2/source/sidebar/AccessibleTitleBar.cxx b/sfx2/source/sidebar/AccessibleTitleBar.cxx
new file mode 100644
index 0000000..39f2cb6
--- /dev/null
+++ b/sfx2/source/sidebar/AccessibleTitleBar.cxx
@@ -0,0 +1,72 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "AccessibleTitleBar.hxx"
+#include "Accessible.hxx"
+#include "TitleBar.hxx"
+
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+
+using namespace css;
+using namespace cssu;
+
+namespace sfx2 { namespace sidebar {
+
+
+Reference<accessibility::XAccessible> AccessibleTitleBar::Create (TitleBar& rTitleBar)
+{
+    rTitleBar.GetComponentInterface(sal_True);
+    VCLXWindow* pWindow = rTitleBar.GetWindowPeer();
+    if (pWindow != NULL)
+        return new Accessible(new AccessibleTitleBar(pWindow));
+    else
+        return NULL;
+}
+
+
+
+
+AccessibleTitleBar::AccessibleTitleBar (VCLXWindow* pWindow)
+    : VCLXAccessibleComponent(pWindow)
+{
+}
+
+
+
+
+AccessibleTitleBar::~AccessibleTitleBar (void)
+{
+}
+
+
+
+
+void AccessibleTitleBar::FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet)
+{
+    VCLXAccessibleComponent::FillAccessibleStateSet(rStateSet);
+    rStateSet.AddState(accessibility::AccessibleStateType::FOCUSABLE);
+}
+
+
+} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/AccessibleTitleBar.hxx b/sfx2/source/sidebar/AccessibleTitleBar.hxx
new file mode 100644
index 0000000..ec44578
--- /dev/null
+++ b/sfx2/source/sidebar/AccessibleTitleBar.hxx
@@ -0,0 +1,53 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_ACCESSIBLE_TITLE_BAR_HXX
+#define SFX_SIDEBAR_ACCESSIBLE_TITLE_BAR_HXX
+
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+namespace sfx2 { namespace sidebar {
+
+class TitleBar;
+
+class AccessibleTitleBar
+    : public VCLXAccessibleComponent
+{
+public:
+    static cssu::Reference<css::accessibility::XAccessible> Create (TitleBar& rTitleBar);
+
+protected:
+    virtual void FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet);
+
+private:
+    AccessibleTitleBar (VCLXWindow* pWindow);
+    virtual ~AccessibleTitleBar (void);
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif


More information about the Libreoffice-commits mailing list