Kaydet (Commit) 0d6373e6 authored tarafından Daniel Rentz's avatar Daniel Rentz

#98286# BrowseBox accessibility

üst 1c1bd3a6
......@@ -329,6 +329,13 @@ hedabu: ..\inc\inettbc.hxx %_DEST%\inc%_EXT%\svtools\inettbc.hxx
hedabu: ..\inc\controldims.hrc %_DEST%\inc%_EXT%\svtools\controldims.hrc
hedabu: ..\inc\AccessibleBrowseBoxObjType.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBoxObjType.hxx
hedabu: ..\inc\AccessibleBrowseBoxBase.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBoxBase.hxx
hedabu: ..\inc\AccessibleBrowseBox.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBox.hxx
hedabu: ..\inc\AccessibleBrowseBoxTableBase.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBoxTableBase.hxx
hedabu: ..\inc\AccessibleBrowseBoxTable.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBoxTable.hxx
hedabu: ..\inc\AccessibleBrowseBoxHeaderBar.hxx %_DEST%\inc%_EXT%\svtools\AccessibleBrowseBoxHeaderBar.hxx
hedabu: ..\inc\helpid.hrc %_DEST%\inc%_EXT%\svtools\helpid.hrc
hedabu: ..\inc\wizardheader.hxx %_DEST%\inc%_EXT%\svtools\wizardheader.hxx
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: brwbox1.cxx,v $
*
* $Revision: 1.9 $
* $Revision: 1.10 $
*
* last change: $Author: fs $ $Date: 2001-11-08 11:25:50 $
* last change: $Author: dr $ $Date: 2002-04-02 08:51:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -65,6 +65,7 @@
#include <vcl/sound.hxx>
#include "brwhead.hxx"
#include "datwin.hxx"
#include <algorithm>
#pragma hdrstop
......@@ -1682,14 +1683,14 @@ void BrowseBox::SelectAll()
//-------------------------------------------------------------------
void BrowseBox::SelectRow( long nRow, BOOL bSelect, BOOL bExpand )
void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
if ( !bMultiSelection )
{
// deselecting is impossible, selecting via cursor
if ( bSelect )
if ( _bSelect )
GoToRow(nRow, FALSE);
return;
}
......@@ -1710,7 +1711,7 @@ void BrowseBox::SelectRow( long nRow, BOOL bSelect, BOOL bExpand )
// set new selection
if ( !bHideSelect &&
( (bMultiSelection && uRow.pSel->GetTotalRange().Max() >= nRow && uRow.pSel->Select(nRow,bSelect)) ||
( (bMultiSelection && uRow.pSel->GetTotalRange().Max() >= nRow && uRow.pSel->Select(nRow,_bSelect)) ||
(!bMultiSelection && ( uRow.nSel = nRow ) != BROWSER_ENDOFSELECTION ) ) )
{
// Handle-Column nicht highlighten
......@@ -1745,7 +1746,7 @@ long BrowseBox::GetSelectRowCount() const
//-------------------------------------------------------------------
void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL bSelect, BOOL bMakeVisible )
void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVisible )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
......@@ -1754,7 +1755,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL bSelect, BOOL bMakeVisi
if ( !bMultiSelection )
{
if ( bSelect )
if ( _bSelect )
GoToColumnId( pCols->GetObject(nNewColPos)->GetId(), bMakeVisible );
return;
}
......@@ -1865,6 +1866,15 @@ BOOL BrowseBox::IsColumnSelected( USHORT nColumnId ) const
//-------------------------------------------------------------------
sal_Bool BrowseBox::IsAllSelected() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
return bMultiSelection && uRow.pSel->IsAllSelected();
}
//-------------------------------------------------------------------
BOOL BrowseBox::MakeFieldVisible
(
long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: brwbox2.cxx,v $
*
* $Revision: 1.14 $
* $Revision: 1.15 $
*
* last change: $Author: fs $ $Date: 2001-11-08 11:25:50 $
* last change: $Author: dr $ $Date: 2002-04-02 08:51:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -528,9 +528,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
Range aJustifiedRange( aSelRange );
aJustifiedRange.Justify();
BOOL bSelectThis =
( bSelect && !aJustifiedRange.IsInside( rEvt.GetRow() ) ) ||
( !bSelect && aJustifiedRange.IsInside( rEvt.GetRow() ) );
BOOL bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
if ( aJustifiedRange.IsInside( rEvt.GetRow() ) )
{
......
/*************************************************************************
*
* $RCSfile: brwbox3.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: dr $ $Date: 2002-04-02 08:51:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SVX_BRWBOX_HXX
#include "brwbox.hxx"
#endif
#ifndef _SVTOOLS_ACCESSIBLEBROWSEBOX_HXX
#include "AccessibleBrowseBox.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
// Accessibility ==============================================================
using ::rtl::OUString;
using ::svt::AccessibleBrowseBox;
using ::com::sun::star::uno::Reference;
using ::drafts::com::sun::star::accessibility::XAccessible;
// ============================================================================
Reference< XAccessible > BrowseBox::CreateAccessible()
{
Window* pParent = GetAccessibleParentWindow();
DBG_ASSERT( pParent, "BrowseBox::CreateAccessible - parent not found" );
Reference< XAccessible > xAccessible;
if( pParent && !m_xAccessible.is() )
{
Reference< XAccessible > xAccParent = pParent->GetAccessible();
if( xAccParent.is() )
m_xAccessible = new AccessibleBrowseBox( xAccParent, *this );
}
return m_xAccessible;
}
// Children -------------------------------------------------------------------
Reference< XAccessible > BrowseBox::CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId )
{
return NULL;
}
Reference< XAccessible > BrowseBox::CreateAccessibleRowHeader( sal_Int32 nRow )
{
return NULL;
}
Reference< XAccessible > BrowseBox::CreateAccessibleColumnHeader( sal_uInt16 nColumnId )
{
return NULL;
}
sal_Int32 BrowseBox::GetAccessibleControlCount() const
{
return 0;
}
Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 nIndex )
{
return NULL;
}
// Conversions ----------------------------------------------------------------
sal_Bool BrowseBox::ConvertPointToCellAddress(
sal_Int32& rnRow, sal_uInt16& rnColumnId, const Point& rPoint )
{
//! TODO
return sal_False;
}
sal_Bool BrowseBox::ConvertPointToRowHeader( sal_Int32& rnRow, const Point& rPoint )
{
//! TODO
return sal_False;
}
sal_Bool BrowseBox::ConvertPointToColumnHeader( sal_uInt16& rnColumnId, const Point& rPoint )
{
//! TODO
return sal_False;
}
sal_Bool BrowseBox::ConvertPointToControlIndex( sal_Int32& rnIndex, const Point& rPoint )
{
//! TODO
return sal_False;
}
// Object data and state ------------------------------------------------------
OUString BrowseBox::GetAccessibleName( ::svt::AccessibleBrowseBoxObjType eObjType ) const
{
OUString aRetText;
switch( eObjType )
{
case ::svt::BBTYPE_BROWSEBOX:
//! TODO only a test name
aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "BrowseBox" ) );
break;
#if 0
//! TODO all texts
case ::svt::BBTYPE_TABLE:
case ::svt::BBTYPE_ROWHEADERBAR:
case ::svt::BBTYPE_COLUMNHEADERBAR:
case ::svt::BBTYPE_CORNERCONTROL:
case ::svt::BBTYPE_TABLECELL:
case ::svt::BBTYPE_ROWHEADERCELL:
case ::svt::BBTYPE_COLUMNHEADERCELL:
#endif
}
return aRetText;
}
OUString BrowseBox::GetAccessibleDescription( ::svt::AccessibleBrowseBoxObjType eObjType ) const
{
OUString aRetText;
switch( eObjType )
{
case ::svt::BBTYPE_BROWSEBOX:
//! TODO only a test name
aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "BrowseBox description" ) );
break;
#if 0
//! TODO all texts
case ::svt::BBTYPE_TABLE:
case ::svt::BBTYPE_ROWHEADERBAR:
case ::svt::BBTYPE_COLUMNHEADERBAR:
case ::svt::BBTYPE_CORNERCONTROL:
case ::svt::BBTYPE_TABLECELL:
case ::svt::BBTYPE_ROWHEADERCELL:
case ::svt::BBTYPE_COLUMNHEADERCELL:
#endif
}
return aRetText;
}
OUString BrowseBox::GetRowDescription( sal_Int32 nRow ) const
{
return OUString();
}
void BrowseBox::FillAccessibleStateSet(
::utl::AccessibleStateSetHelper& rStateSet,
::svt::AccessibleBrowseBoxObjType eObjType ) const
{
//! TODO
}
void BrowseBox::GrabTableFocus()
{
//! TODO EditBrowseBox has to grab focus of the edit control of the current cell (ActivateCell)
GrabFocus();
}
......@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.6 $
# $Revision: 1.7 $
#
# last change: $Author: hr $ $Date: 2001-08-14 12:12:56 $
# last change: $Author: dr $ $Date: 2002-04-02 08:56:01 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
......@@ -86,6 +86,7 @@ SLOFILES= \
$(SLO)$/editbrowsebox.obj \
$(SLO)$/brwbox1.obj \
$(SLO)$/brwbox2.obj \
$(SLO)$/brwbox3.obj \
$(SLO)$/brwhead.obj \
$(SLO)$/datwin.obj
......
......@@ -2,9 +2,9 @@
#*
#* $RCSfile: makefile.mk,v $
#*
#* $Revision: 1.33 $
#* $Revision: 1.34 $
#*
#* last change: $Author: hjs $ $Date: 2002-02-05 17:39:59 $
#* last change: $Author: dr $ $Date: 2002-04-02 08:56:18 $
#*
#* The Contents of this file are made available subject to the terms of
#* either of the following licenses
......@@ -104,6 +104,7 @@ LIB7TARGET= $(SLB)$/svt.lib
LIB7FILES= \
$(SLB)$/misc2.lib \
$(SLB)$/items2.lib \
$(SLB)$/accessibility.lib \
$(SLB)$/browse.lib \
$(SLB)$/ctrl.lib \
$(SLB)$/dialogs.lib \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment