summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/TitleBar.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-31 09:03:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-31 13:37:28 +0100
commit8502b8006fdf03d2bc634f53490200f853474867 (patch)
tree424836d4e901a6f39808df7a49171daaf82c144e /sfx2/source/sidebar/TitleBar.cxx
parentc01c7832dde963ea261b75b7d1d090c0a157a954 (diff)
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
Diffstat (limited to 'sfx2/source/sidebar/TitleBar.cxx')
-rw-r--r--sfx2/source/sidebar/TitleBar.cxx32
1 files changed, 20 insertions, 12 deletions
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index bab96310ba84..e45a6fb9731c 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();
}