summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteve Yin <steve_y@apache.org>2013-11-25 16:15:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-25 16:52:36 +0000
commitb755fb8c0f6b1282f62c12f378c0a5ecac64d490 (patch)
tree4e6df42c862fe4eafef3f52267797e811bac59e0 /include
parent74bf915fb48c660bd1e3a04bec6c3a20c754b6af (diff)
Integrate branch of IAccessible2
Change-Id: I3b5936bb92bb258f9e9e76402dd2b55f29aa686a
Diffstat (limited to 'include')
-rw-r--r--include/svtools/accessibleruler.hxx247
-rw-r--r--include/svtools/embedhlp.hxx2
-rw-r--r--include/svtools/headbar.hxx7
-rw-r--r--include/svtools/ruler.hxx6
-rw-r--r--include/svtools/svlbitm.hxx2
-rw-r--r--include/svtools/svtools.hrc6
-rw-r--r--include/svtools/treelistbox.hxx17
-rw-r--r--include/svtools/treelistentry.hxx4
-rw-r--r--include/svtools/valueset.hxx4
-rw-r--r--include/svtools/vclxaccessibleheaderbar.hxx82
-rw-r--r--include/svtools/vclxaccessibleheaderbaritem.hxx115
-rw-r--r--include/svtools/viewdataentry.hxx2
-rw-r--r--include/vcl/texteng.hxx2
13 files changed, 492 insertions, 4 deletions
diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx
new file mode 100644
index 000000000000..0f989819a22c
--- /dev/null
+++ b/include/svtools/accessibleruler.hxx
@@ -0,0 +1,247 @@
+/*
+ * 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 _SVTRULERACCESSIBLE_HXX
+#define _SVTRULERACCESSIBLE_HXX
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <cppuhelper/weak.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/compbase5.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <comphelper/servicehelper.hxx>
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Point;
+ struct Rectangle;
+ struct Size;
+ class XFocusListener;
+} } } }
+
+class Rectangle;
+class Ruler;
+class Window;
+
+
+typedef ::cppu::WeakAggComponentImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo >
+ SvtRulerAccessible_Base;
+
+class SvtRulerAccessible : public ::comphelper::OBaseMutex, public SvtRulerAccessible_Base
+{
+public:
+ //===== internal ========================================================
+ SvtRulerAccessible(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, Ruler& rRepresentation, const ::rtl::OUString& rName );
+protected:
+ virtual ~SvtRulerAccessible();
+public:
+ //===== XAccessible =====================================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ //===== XAccessibleComponent ============================================
+
+ virtual sal_Bool SAL_CALL
+ containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL
+ getBounds() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Point SAL_CALL
+ getLocation() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Point SAL_CALL
+ getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::awt::Size SAL_CALL
+ getSize() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isShowing() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isVisible() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ addFocusListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeFocusListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ grabFocus() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL
+ getForeground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL
+ getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild( sal_Int32 nIndex )
+ throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale( void )
+ throw( ::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
+ //===== XAccessibleEventBroadcaster =====================================
+
+ virtual void SAL_CALL
+ addAccessibleEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )throw( com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL
+ removeAccessibleEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL
+ supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ //===== XTypeProvider ===================================================
+
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+
+
+public:
+
+ /// Sets the name
+ void setName( const ::rtl::OUString& rName );
+
+ /// Sets the description
+ void setDescription( const ::rtl::OUString& rDescr );
+private:
+ static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
+protected:
+
+ /// @Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+ /// @Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ virtual void SAL_CALL disposing();
+
+ /// @returns true if it's disposed or in disposing
+ inline sal_Bool IsAlive( void ) const;
+
+ /// @returns true if it's not disposed and no in disposing
+ inline sal_Bool IsNotAlive( void ) const;
+
+ /// throws the exception DisposedException if it's not alive
+ void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
+
+private:
+ /** Description of this object. This is not a constant because it can
+ be set from the outside.
+ */
+ ::rtl::OUString msDescription;
+
+ /** Name of this object.
+ */
+ ::rtl::OUString msName;
+
+ /// Reference to the parent object.
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ mxParent;
+
+ /// pointer to internal representation
+ Ruler* mpRepr;
+
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 mnClientId;
+
+
+};
+
+inline sal_Bool SvtRulerAccessible::IsAlive( void ) const
+{
+ return !rBHelper.bDisposed && !rBHelper.bInDispose;
+}
+
+inline sal_Bool SvtRulerAccessible::IsNotAlive( void ) const
+{
+ return rBHelper.bDisposed || rBHelper.bInDispose;
+}
+
+#endif
diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx
index a2ad1aa830c0..49763a20c344 100644
--- a/include/svtools/embedhlp.hxx
+++ b/include/svtools/embedhlp.hxx
@@ -108,6 +108,8 @@ public:
bool IsLocked() const;
bool IsChart() const;
+ OUString GetChartType();
+
// #i104867#
// Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
// that number is incremented at each change of the Graphic. This mechanism is needed to identify if a
diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index 6d85b0e1c1da..76789d08ca82 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -231,6 +231,8 @@ typedef sal_uInt16 HeaderBarItemBits;
// - HeaderBar -
// -------------
+class VCLXHeaderBar;
+
class SVT_DLLPUBLIC HeaderBar : public Window
{
private:
@@ -259,6 +261,9 @@ private:
Link maDoubleClickHdl;
Link maCreateAccessibleHdl;
+ VCLXHeaderBar* m_pVCLXHeaderBar;
+
+
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >
mxAccessible;
@@ -368,6 +373,8 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible > CreateAccessible();
void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( sal_Bool bCreate );
+
};
#endif // INCLUDED_SVTOOLS_HEADBAR_HXX
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index a6ae1e5a19fc..5d53a964adfc 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -28,6 +28,8 @@
#include <boost/scoped_ptr.hpp>
+#include <svtools/accessibleruler.hxx>
+
class MouseEvent;
class TrackingEvent;
class DataChangedEvent;
@@ -658,6 +660,8 @@ private:
boost::scoped_ptr<RulerSelection> mpCurrentHitTest;
boost::scoped_ptr<RulerSelection> mpPreviousHitTest;
+ SvtRulerAccessible* pAccContext;
+
SVT_DLLPRIVATE void ImplVDrawLine( long nX1, long nY1, long nX2, long nY2 );
SVT_DLLPRIVATE void ImplVDrawRect( long nX1, long nY1, long nX2, long nY2 );
SVT_DLLPRIVATE void ImplVDrawText( long nX, long nY, const OUString& rText, long nMin = LONG_MIN, long nMax = LONG_MAX );
@@ -813,6 +817,8 @@ public:
void SetLineHeight( long nHeight ) { mnLineHeight = nHeight ; }
void DrawTicks();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
};
#endif // _RULER_HXX
diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx
index cdc461375e24..c74b1ec0a945 100644
--- a/include/svtools/svlbitm.hxx
+++ b/include/svtools/svlbitm.hxx
@@ -101,6 +101,7 @@ public:
virtual sal_uInt16 GetType() const;
virtual void InitViewData(SvTreeListBox*, SvTreeListEntry*, SvViewDataItem*);
OUString GetText() const { return maText; }
+ virtual OUString GetExtendText() const { return OUString(); }
void SetText( const OUString& rText ) { maText = rText; }
virtual void Paint(
@@ -176,6 +177,7 @@ public:
// Check whether this button can be modified via UI
bool CheckModification() const;
+ SvLBoxButtonData* GetButtonData() const{ return pData;}
};
inline void SvLBoxButton::SetStateChecked()
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index cceb888ef4f0..301d2f7b955f 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -180,8 +180,9 @@
#define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4)
#define STR_SVT_ACC_DESC_FILE (STR_SVT_ACC_BEGIN+5)
#define STR_SVT_ACC_EMPTY_FIELD (STR_SVT_ACC_BEGIN+6)
-//IAccessible2 implementation
-#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9)
+#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE (STR_SVT_ACC_BEGIN+7)
+#define STR_SVT_ACC_RULER_VERT_NAME (STR_SVT_ACC_BEGIN+8)
+#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9)
#define STR_SVT_ACC_END (STR_SVT_ACC_RULER_HORZ_NAME)
#define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1)
@@ -313,7 +314,6 @@
#define RID_IMG_PRNDLG_NOCOLLATE (STR_SVT_PRNDLG_START + 30)
-// IAccessible2 implementation in 2009
#define STR_PARAGRAPH_START (STR_SVT_PRNDLG_START + 50)
#define STR_PARAGRAPH (STR_PARAGRAPH_START + 0)
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 980f88ce9a53..0d9b768a73f8 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -97,6 +97,10 @@ enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE
#define TREEFLAG_MANINS 0x0004
#define TREEFLAG_RECALCTABS 0x0008
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_NOTSET 0x00
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_LIST 0x01
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_TREE 0x02
+
typedef sal_Int64 ExtendedWinBits;
// disable the behavior of automatically selecting a "CurEntry" upon painting the control
@@ -106,6 +110,7 @@ typedef sal_Int64 ExtendedWinBits;
#define SV_ITEM_ID_LBOXBMP 2
#define SV_ITEM_ID_LBOXBUTTON 3
#define SV_ITEM_ID_LBOXCONTEXTBMP 4
+#define SV_ITEM_ID_EXTENDRLBOXSTRING 5
class SvLBoxTab
{
@@ -226,6 +231,7 @@ class SVT_DLLPUBLIC SvTreeListBox
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
+ short nAllItemAccRoleType;
sal_uInt16 nFirstSelTab;
sal_uInt16 nLastSelTab;
long mnCheckboxItemWidth;
@@ -502,6 +508,17 @@ public:
/** Enables, that one cell of a tablistbox entry can be focused */
void EnableCellFocus();
+ // For overwriting accessible role for all entries - normally 0, so each entry can be different
+ void SetAllEntriesAccessibleRoleType( short n ) { nAllItemAccRoleType = n; }
+ short GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
+
+ sal_uInt16 GetTreeFlags() const {return nTreeFlags;}
+
+ OUString headString;
+ OUString SearchEntryTextWithHeadTitle(SvTreeListEntry* pEntry);
+ virtual OUString GetEntryAltText(SvTreeListEntry* pEntry) const;
+ virtual OUString GetEntryLongDescription(SvTreeListEntry* pEntry) const;
+
void set_min_width_in_chars(sal_Int32 nChars);
virtual bool set_property(const OString &rKey, const OString &rValue);
diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx
index f839b2621c33..812fd058b7da 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -53,6 +53,7 @@ class SVT_DLLPUBLIC SvTreeListEntry
sal_uLong nAbsPos;
sal_uLong nListPos;
ItemsType maItems;
+ sal_Bool bIsMarked;
void* pUserData;
sal_uInt16 nEntryFlags;
@@ -97,6 +98,9 @@ public:
sal_uInt16 GetFlags() const;
void SetFlags( sal_uInt16 nFlags );
+
+ sal_Bool GetIsMarked() const { return bIsMarked; }
+ void SetMarked( sal_Bool IsMarked ) { bIsMarked = IsMarked; }
};
#endif
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index de237cab5f85..368e092c50df 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -321,6 +321,8 @@ public:
size_t nPos = VALUESET_APPEND );
void InsertItem( sal_uInt16 nItemId,
size_t nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const OUString& rStr,
+ size_t nPos = VALUESET_APPEND );
void RemoveItem( sal_uInt16 nItemId );
void Clear();
@@ -364,7 +366,7 @@ public:
bool IsColor() const { return maColor.GetTransparency() == 0; }
void SetExtraSpacing( sal_uInt16 nNewSpacing );
- sal_uInt16 GetExtraSpacing() { return mnSpacing; }
+ sal_uInt16 GetExtraSpacing() { return mnSpacing; }
void Format();
diff --git a/include/svtools/vclxaccessibleheaderbar.hxx b/include/svtools/vclxaccessibleheaderbar.hxx
new file mode 100644
index 000000000000..770f1512546e
--- /dev/null
+++ b/include/svtools/vclxaccessibleheaderbar.hxx
@@ -0,0 +1,82 @@
+/*
+ * 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 _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+#define _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+#ifndef _HEADBAR_HXX
+#include <svtools/headbar.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include "toolkit/awt/vclxwindow.hxx"
+#endif
+class HeaderBar;
+
+// ----------------------------------------------------
+// class VCLXAccessibleHeaderBar
+// ----------------------------------------------------
+
+typedef std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > >
+ ListItems;
+
+class VCLXAccessibleHeaderBar : public VCLXAccessibleComponent
+{
+
+public:
+ HeaderBar* m_pHeadBar;
+ virtual ~VCLXAccessibleHeaderBar();
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ VCLXAccessibleHeaderBar( VCLXWindow* pVCLXindow );
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ virtual void SAL_CALL disposing (void);
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateChild(sal_Int32 i);
+
+private:
+ ListItems m_aAccessibleChildren;
+
+
+};
+
+class VCLXHeaderBar : public VCLXWindow
+{
+public:
+ VCLXHeaderBar(Window* pHeaderBar);
+ virtual ~VCLXHeaderBar();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+
+};
+
+#endif // _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+
diff --git a/include/svtools/vclxaccessibleheaderbaritem.hxx b/include/svtools/vclxaccessibleheaderbaritem.hxx
new file mode 100644
index 000000000000..e5c695074b2c
--- /dev/null
+++ b/include/svtools/vclxaccessibleheaderbaritem.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+#define _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+#include <tools/link.hxx>
+
+#include <vector>
+
+class HeaderBar;
+class VCLExternalSolarLock;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+
+// ----------------------------------------------------
+// class VCLXAccessibleHeaderBarItem
+// ----------------------------------------------------
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
+
+typedef ::cppu::ImplHelper2<
+::com::sun::star::accessibility::XAccessible,
+::com::sun::star::lang::XServiceInfo > VCLXAccessibleHeaderBarItem_BASE;
+
+class VCLXAccessibleHeaderBarItem : public AccessibleExtendedComponentHelper_BASE,
+ public VCLXAccessibleHeaderBarItem_BASE
+{
+private:
+ VCLExternalSolarLock* m_pExternalLock;
+ HeaderBar* m_pHeadBar;
+ sal_Int32 m_nIndexInParent;
+
+protected:
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ // OCommonAccessibleComponent
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL disposing();
+
+public:
+ VCLXAccessibleHeaderBarItem( HeaderBar* pHeadBar, sal_Int32 _nIndexInParent );
+ ~VCLXAccessibleHeaderBarItem();
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException){};
+ virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleExtendedComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getToolTipText( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/viewdataentry.hxx b/include/svtools/viewdataentry.hxx
index 31681af4dc19..5ddf18bee3e7 100644
--- a/include/svtools/viewdataentry.hxx
+++ b/include/svtools/viewdataentry.hxx
@@ -47,6 +47,7 @@ class SVT_DLLPUBLIC SvViewDataEntry
std::vector<SvViewDataItem> maItems;
sal_uLong nVisPos;
bool mbSelected:1;
+ bool mbObjectSelected:1;
bool mbHighlighted:1;
bool mbExpanded:1;
bool mbFocused:1;
@@ -69,6 +70,7 @@ public:
void SetHighlighted( bool bHighlighted );
void SetExpanded( bool bExpanded );
void SetSelectable( bool bSelectable );
+ void SetObjectSelected( bool bSelected );
void Init(size_t nSize);
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 767820e62fd8..163d62c4a886 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -316,6 +316,8 @@ public:
static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
+
+ Color GetTextColor() const { return maTextColor; }
};
#endif // INCLUDED_VCL_TEXTENG_HXX