cui/source/inc/helpid.hrc                  |    2 
 helpcontent2                               |    2 
 sfx2/Library_sfx.mk                        |    2 
 sfx2/source/sidebar/Accessible.cxx         |   63 ++++++++++++++++++++++++++
 sfx2/source/sidebar/Accessible.hxx         |   70 +++++++++++++++++++++++++++++
 sfx2/source/sidebar/AccessibleTitleBar.cxx |   67 +++++++++++++++++++++++++++
 sfx2/source/sidebar/AccessibleTitleBar.hxx |   49 ++++++++++++++++++++
 sfx2/source/sidebar/DeckTitleBar.cxx       |   11 ++++
 sfx2/source/sidebar/DeckTitleBar.hxx       |    1 
 sfx2/source/sidebar/PanelTitleBar.cxx      |   21 +++++---
 sfx2/source/sidebar/PanelTitleBar.hxx      |    2 
 sfx2/source/sidebar/TitleBar.cxx           |   32 ++++++++-----
 sfx2/source/sidebar/TitleBar.hxx           |    5 +-
 13 files changed, 302 insertions(+), 25 deletions(-)

New commits:
commit 8502b8006fdf03d2bc634f53490200f853474867
Author: Andre Fischer <a...@apache.org>
Date:   Fri May 31 09:03:08 2013 +0000

    Resolves: #i122271# FOCUSABLE flag at accessibility object sidebar title 
bars
    
    so that bridges create focus events and title bars become visible
    to AT devices.
    
    (cherry picked from commit 6055c2b50b36a0fc1b26c18b030827e3e08a51fc)
    
    Conflicts:
        sfx2/source/sidebar/TitleBar.cxx
    
    Change-Id: If863c2c9d5ba19ba627639b294a430869f245abd

diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 03775fd..aefe3a2 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -233,6 +233,8 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/sidebar/SidebarController \
     sfx2/source/sidebar/SidebarPanelBase \
     sfx2/source/sidebar/SidebarToolBox \
+    sfx2/source/sidebar/Accessible \
+    sfx2/source/sidebar/AccessibleTitleBar \
     sfx2/source/sidebar/AsynchronousCall \
     sfx2/source/sidebar/CommandInfoProvider \
     sfx2/source/sidebar/Context \
diff --git a/sfx2/source/sidebar/Accessible.cxx 
b/sfx2/source/sidebar/Accessible.cxx
new file mode 100644
index 0000000..13d52aa
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.cxx
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   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 .
+ */
+
+#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..d6b8584
--- /dev/null
+++ b/sfx2/source/sidebar/Accessible.hxx
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   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 .
+ */
+#ifndef SFX_SIDEBAR_ACCESSIBLE_HXX
+#define SFX_SIDEBAR_ACCESSIBLE_HXX
+
+#include <boost/noncopyable.hpp>
+
+#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..47600f0
--- /dev/null
+++ b/sfx2/source/sidebar/AccessibleTitleBar.cxx
@@ -0,0 +1,67 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   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 .
+ */
+
+#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..ffbe8ac
--- /dev/null
+++ b/sfx2/source/sidebar/AccessibleTitleBar.hxx
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   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 .
+ */
+#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
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index ed7fd17..7855347 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -134,6 +134,17 @@ void DeckTitleBar::HandleToolBoxItemClick (const 
sal_uInt16 nItemIndex)
 
 
 
+cssu::Reference<css::accessibility::XAccessible> 
DeckTitleBar::CreateAccessible (void)
+{
+    const ::rtl::OUString sAccessibleName(msTitle);
+    SetAccessibleName(sAccessibleName);
+    SetAccessibleDescription(sAccessibleName);
+    return TitleBar::CreateAccessible();
+}
+
+
+
+
 void DeckTitleBar::DataChanged (const DataChangedEvent& rEvent)
 {
     maToolBox.SetItemImage(
diff --git a/sfx2/source/sidebar/DeckTitleBar.hxx 
b/sfx2/source/sidebar/DeckTitleBar.hxx
index aab0564..bc31d98 100644
--- a/sfx2/source/sidebar/DeckTitleBar.hxx
+++ b/sfx2/source/sidebar/DeckTitleBar.hxx
@@ -45,6 +45,7 @@ protected:
     virtual sidebar::Paint GetBackgroundPaint (void);
     virtual Color GetTextColor (void);
     virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex);
+    virtual cssu::Reference<css::accessibility::XAccessible> CreateAccessible 
(void);
 
 private:
     const sal_uInt16 mnCloserItemIndex;
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx 
b/sfx2/source/sidebar/PanelTitleBar.cxx
index 738593a..dd1b681 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -30,7 +30,6 @@
 #include <vcl/image.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 
-
 using namespace css;
 using namespace cssu;
 
@@ -50,16 +49,11 @@ PanelTitleBar::PanelTitleBar (
       mpPanel(pPanel),
       mnMenuItemIndex(1),
       mxFrame(),
-      msMoreOptionsCommand()
+      msMoreOptionsCommand(),
+      
msAccessibleNamePrefix(String(SfxResId(SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX)))
 {
     OSL_ASSERT(mpPanel != NULL);
 
-    const ::rtl::OUString sAccessibleName(
-        String(SfxResId(SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX))
-            + rsTitle);
-    SetAccessibleName(sAccessibleName);
-    SetAccessibleDescription(sAccessibleName);
-
 #ifdef DEBUG
     SetText(A2S("PanelTitleBar"));
 #endif
@@ -190,6 +184,17 @@ void PanelTitleBar::HandleToolBoxItemClick (const 
sal_uInt16 nItemIndex)
 
 
 
+Reference<accessibility::XAccessible> PanelTitleBar::CreateAccessible (void)
+{
+    const ::rtl::OUString sAccessibleName(msAccessibleNamePrefix + msTitle);
+    SetAccessibleName(sAccessibleName);
+    SetAccessibleDescription(sAccessibleName);
+    return TitleBar::CreateAccessible();
+}
+
+
+
+
 void PanelTitleBar::MouseButtonDown (const MouseEvent& rMouseEvent)
 {
     if (rMouseEvent.IsLeft())
diff --git a/sfx2/source/sidebar/PanelTitleBar.hxx 
b/sfx2/source/sidebar/PanelTitleBar.hxx
index f47f86e..6044e27 100644
--- a/sfx2/source/sidebar/PanelTitleBar.hxx
+++ b/sfx2/source/sidebar/PanelTitleBar.hxx
@@ -52,6 +52,7 @@ protected:
     virtual sidebar::Paint GetBackgroundPaint (void);
     virtual Color GetTextColor (void);
     virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex);
+    virtual cssu::Reference<css::accessibility::XAccessible> CreateAccessible 
(void);
 
 private:
     bool mbIsLeftButtonDown;
@@ -59,6 +60,7 @@ private:
     const sal_uInt16 mnMenuItemIndex;
     cssu::Reference<css::frame::XFrame> mxFrame;
     ::rtl::OUString msMoreOptionsCommand;
+    ::rtl::OUString msAccessibleNamePrefix;
 };
 
 
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index bab9631..e45a6fb 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -18,11 +18,16 @@
 
 #include "TitleBar.hxx"
 #include "Paint.hxx"
+#include "Accessible.hxx"
+#include "AccessibleTitleBar.hxx"
 
 #include <tools/svborder.hxx>
 #include <vcl/gradient.hxx>
 #include <vcl/lineinfo.hxx>
 
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+
+
 namespace
 {
     const static sal_Int32 gnLeftIconSpace (3);
@@ -89,8 +94,7 @@ void TitleBar::Paint (const Rectangle& rUpdateArea)
     PaintDecoration(aTitleBarBox);
     const Rectangle aTitleBox (GetTitleArea(aTitleBarBox));
     PaintTitle(aTitleBox);
-    if (HasFocus())
-        PaintFocus(aTitleBox);
+    PaintFocus(aTitleBox);
 }
 
 
@@ -149,6 +153,15 @@ void TitleBar::HandleToolBoxItemClick (const sal_uInt16 
nItemIndex)
 
 
 
+cssu::Reference<css::accessibility::XAccessible> TitleBar::CreateAccessible 
(void)
+{
+    SetAccessibleRole(css::accessibility::AccessibleRole::PANEL);
+    return AccessibleTitleBar::Create(*this);
+}
+
+
+
+
 void TitleBar::PaintTitle (const Rectangle& rTitleBox)
 {
     Push(PUSH_FONT | PUSH_TEXTCOLOR);
@@ -186,7 +199,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
 
 void TitleBar::PaintFocus (const Rectangle& rFocusBox)
 {
-    Push(PUSH_FONT | PUSH_TEXTCOLOR | PUSH_LINECOLOR | PUSH_FILLCOLOR);
+    Push(PUSH_FONT | PUSH_TEXTCOLOR);
 
     Font aFont(GetFont());
     aFont.SetWeight(WEIGHT_BOLD);
@@ -203,15 +216,10 @@ void TitleBar::PaintFocus (const Rectangle& rFocusBox)
         aTextBox.Right() + 2,
         aTextBox.Bottom() + 2);
 
-    LineInfo aDottedStyle (LINE_DASH);
-    aDottedStyle.SetDashCount(0);
-    aDottedStyle.SetDotCount(1);
-    aDottedStyle.SetDotLen(1);
-    aDottedStyle.SetDistance(1);
-
-    SetFillColor();
-    SetLineColor(COL_BLACK);
-    DrawPolyLine(Polygon(aLargerTextBox), aDottedStyle);
+    if (HasFocus())
+        Window::ShowFocus(aLargerTextBox);
+    else
+        Window::HideFocus();
 
     Pop();
 }
diff --git a/sfx2/source/sidebar/TitleBar.hxx b/sfx2/source/sidebar/TitleBar.hxx
index 229d3b7..36c31a6 100644
--- a/sfx2/source/sidebar/TitleBar.hxx
+++ b/sfx2/source/sidebar/TitleBar.hxx
@@ -20,7 +20,7 @@
 
 #include "Paint.hxx"
 
-#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
 #include "sfx2/sidebar/SidebarToolBox.hxx"
 
 
@@ -53,6 +53,7 @@ public:
 
 protected:
     SidebarToolBox maToolBox;
+    ::rtl::OUString msTitle;
 
     virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox) = 0;
     virtual void PaintDecoration (const Rectangle& rTitleBarBox) = 0;
@@ -60,9 +61,9 @@ protected:
     virtual sidebar::Paint GetBackgroundPaint (void) = 0;
     virtual Color GetTextColor (void) = 0;
     virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex);
+    virtual cssu::Reference<css::accessibility::XAccessible> CreateAccessible 
(void);
 
 private:
-    ::rtl::OUString msTitle;
     Image maIcon;
 
     void PaintTitle (const Rectangle& rTitleBox);
commit c01c7832dde963ea261b75b7d1d090c0a157a954
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri May 31 13:09:57 2013 +0100

    drop unused helpids
    
    Change-Id: Ia50366201e7ce490fb66f99f700a27bac9aef6b8

diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 24d11fb..bbae785 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -245,10 +245,8 @@
 #define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE"
 #define HID_PAGE_MEASURE "CUI_HID_PAGE_MEASURE"
 #define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION"
-#define HID_FORMAT_PARAGRAPH_STD "CUI_HID_FORMAT_PARAGRAPH_STD"
 #define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
 #define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
-#define HID_FORMAT_PARAGRAPH_ALIGN "CUI_HID_FORMAT_PARAGRAPH_ALIGN"
 #define HID_SVXPAGE_SWPOSSIZE "CUI_HID_SVXPAGE_SWPOSSIZE"
 #define HID_AREA_TRANSPARENCE "CUI_HID_AREA_TRANSPARENCE"
 #define HID_AREA_AREA "CUI_HID_AREA_AREA"
commit d7c6fb9634dcd1b38d177e402c20a4d935e370b3
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri May 31 13:19:37 2013 +0100

    Updated core
    Project: help  c80240cf0171f821d88110662b506774f15d89fe

diff --git a/helpcontent2 b/helpcontent2
index c21054c..c80240c 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c21054cc80929b42d0a4a2c22ce8b2f6392a33d0
+Subproject commit c80240cf0171f821d88110662b506774f15d89fe
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to