diff options
author | Sascha Ballach <sab@openoffice.org> | 2002-02-20 12:50:58 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2002-02-20 12:50:58 +0000 |
commit | 53b8b453550b55d22d2fbd197508b76c4b1cf68e (patch) | |
tree | 6e674ab9296ce028f0ee70884ddfaee04603d782 | |
parent | a14348c22a41cc635c4c020b84042c4852a240d4 (diff) |
#95584#; create base classes
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleCell.cxx | 161 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleCellBase.cxx | 277 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 33 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocumentBase.cxx | 84 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 253 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 111 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/makefile.mk | 19 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleCell.hxx | 216 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleCellBase.hxx | 238 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleContextBase.hxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleDocument.hxx | 20 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleDocumentBase.hxx | 84 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleDocumentPagePreview.hxx | 180 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleSpreadsheet.hxx | 37 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleTableBase.hxx | 8 |
15 files changed, 1497 insertions, 232 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index ca0df65477b2..dcd5d9d24db7 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleCell.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:26:13 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,11 +111,8 @@ ScAccessibleCell::ScAccessibleCell ( sal_Int32 nIndex, ScSplitPos eSplitPos) : - ScAccessibleContextBase (rxParent, AccessibleRole::TABLE_CELL), + ScAccessibleCellBase (rxParent, GetDocument(pViewShell), rCellAddress, nIndex), mpViewShell(pViewShell), - mpDoc(GetDocument(pViewShell)), - maCellAddress(rCellAddress), - mnIndex(nIndex), meSplitPos(eSplitPos) { } @@ -124,36 +121,6 @@ ScAccessibleCell::~ScAccessibleCell () { } - //===== XInterface ====================================================== - -uno::Any SAL_CALL - ScAccessibleCell::queryInterface( - const uno::Type & rType ) - throw(uno::RuntimeException) -{ - SC_QUERYINTERFACE( XAccessibleValue ) - - return ScAccessibleContextBase::queryInterface( rType ); -} - -/** Increase the reference count. -*/ -void SAL_CALL - ScAccessibleCell::acquire (void) - throw () -{ - OWeakObject::acquire (); -} - -/** Decrease the reference count. -*/ -void SAL_CALL - ScAccessibleCell::release (void) - throw () -{ - OWeakObject::release (); -} - //===== XAccessibleComponent ============================================ uno::Reference< XAccessible > SAL_CALL ScAccessibleCell::getAccessibleAt( @@ -249,45 +216,6 @@ uno::Reference< XAccessible > SAL_CALL return uno::Reference< XAccessible >(); } -sal_Int32 - ScAccessibleCell::getAccessibleIndexInParent (void) - throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard (maMutex); - return mnIndex; -} - -::rtl::OUString SAL_CALL - ScAccessibleCell::createAccessibleDescription (void) - throw (uno::RuntimeException) -{ - rtl::OUString sDescription; - - if (mpDoc) - { - ScPostIt aNote; - mpDoc->GetNote(maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), aNote); - sDescription = rtl::OUString (aNote.GetText()); - } - - if (!sDescription.getLength()) - sDescription = getAccessibleName(); - - return sDescription; -} - -::rtl::OUString SAL_CALL - ScAccessibleCell::createAccessibleName (void) - throw (uno::RuntimeException) -{ - rtl::OUString sName; - String sAddress; - // Document not needed, because only the cell address, but not the tablename is needed - maCellAddress.Format( sAddress, SCA_VALID, NULL ); - sName = rtl::OUString(sAddress); - return sName; -} - uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleCell::getAccessibleStateSet (void) throw (uno::RuntimeException) @@ -315,63 +243,14 @@ uno::Reference<XAccessibleStateSet> SAL_CALL pStateSet->AddState(AccessibleStateType::SELECTABLE); if (IsSelected(xParentStates)) pStateSet->AddState(AccessibleStateType::SELECTED); - if (IsShowing(xParentStates)) + if (isShowing()) pStateSet->AddState(AccessibleStateType::SHOWING); pStateSet->AddState(AccessibleStateType::TRANSIENT); - if (IsVisible(xParentStates)) + if (isVisible()) pStateSet->AddState(AccessibleStateType::VISIBLE); return pStateSet; } - //===== XAccessibleValue ================================================ - -uno::Any SAL_CALL - ScAccessibleCell::getCurrentValue( ) - throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard (maMutex); - uno::Any aAny; - if (mpDoc) - aAny <<= mpDoc->GetValue(maCellAddress); - - return aAny; -} - -sal_Bool SAL_CALL - ScAccessibleCell::setCurrentValue( const uno::Any& aNumber ) - throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard (maMutex); - double fValue; - sal_Bool bResult(sal_False); - if((aNumber >>= fValue) && mpDoc) - { - mpDoc->SetValue(maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), fValue); - bResult = sal_True; - } - return bResult; -} - -uno::Any SAL_CALL - ScAccessibleCell::getMaximumValue( ) - throw (uno::RuntimeException) -{ - uno::Any aAny; - aAny <<= DBL_MAX; - - return aAny; -} - -uno::Any SAL_CALL - ScAccessibleCell::getMinimumValue( ) - throw (uno::RuntimeException) -{ - uno::Any aAny; - aAny <<= DBL_MIN; - - return aAny; -} - //===== XServiceInfo ==================================================== ::rtl::OUString SAL_CALL ScAccessibleCell::getImplementationName (void) @@ -394,24 +273,6 @@ uno::Sequence< ::rtl::OUString> SAL_CALL return aSequence; } - //===== XTypeProvider =================================================== - -uno::Sequence< uno::Type> SAL_CALL ScAccessibleCell::getTypes (void) - throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard (maMutex); - uno::Sequence< uno::Type> - aTypeSequence = ScAccessibleContextBase::getTypes(); - sal_Int32 nOldSize(aTypeSequence.getLength()); - aTypeSequence.realloc(nOldSize + 1); - uno::Type* pTypes = aTypeSequence.getArray(); - - pTypes[nOldSize] = ::getCppuType((const uno::Reference< - XAccessibleValue>*)0); - - return aTypeSequence; -} - //==== internal ========================================================= sal_Bool ScAccessibleCell::IsDefunc( @@ -459,18 +320,6 @@ sal_Bool ScAccessibleCell::IsSelected(const uno::Reference<XAccessibleStateSet>& return sal_False; } -sal_Bool ScAccessibleCell::IsShowing( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::SHOWING)); -} - -sal_Bool ScAccessibleCell::IsVisible( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::VISIBLE)); -} - ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell) { ScDocument* pDoc = NULL; diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx new file mode 100644 index 000000000000..11147b391faf --- /dev/null +++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx @@ -0,0 +1,277 @@ +/************************************************************************* + * + * $RCSfile: AccessibleCellBase.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ + * + * 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): _______________________________________ + * + * + ************************************************************************/ + + +#include "AccessibleCellBase.hxx" +#ifndef SC_SCATTR_HXX +#include "attrib.hxx" +#endif +#ifndef SC_ITEMS_HXX +#include "scitems.hxx" +#endif +#ifndef SC_MISCUNO_HXX +#include "miscuno.hxx" +#endif +#ifndef SC_DOCUMENT_HXX +#include "document.hxx" +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEROLE_HPP_ +#include <drafts/com/sun/star/accessibility/AccessibleRole.hpp> +#endif + +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX +#include <svx/brshitem.hxx> +#endif + +#include <float.h> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::accessibility; + +//===== internal ============================================================ + +ScAccessibleCellBase::ScAccessibleCellBase ( + const uno::Reference<XAccessible>& rxParent, + ScDocument* pDoc, + ScAddress& rCellAddress, + sal_Int32 nIndex) + : + ScAccessibleContextBase (rxParent, AccessibleRole::TABLE_CELL), + mpDoc(pDoc), + maCellAddress(rCellAddress), + mnIndex(nIndex) +{ +} + +ScAccessibleCellBase::~ScAccessibleCellBase () +{ +} + + //===== XInterface ====================================================== + +uno::Any SAL_CALL + ScAccessibleCellBase::queryInterface( + const uno::Type & rType ) + throw(uno::RuntimeException) +{ + SC_QUERYINTERFACE( XAccessibleValue ) + + return ScAccessibleContextBase::queryInterface( rType ); +} + +/** Increase the reference count. +*/ +void SAL_CALL + ScAccessibleCellBase::acquire (void) + throw () +{ + OWeakObject::acquire (); +} + +/** Decrease the reference count. +*/ +void SAL_CALL + ScAccessibleCellBase::release (void) + throw () +{ + OWeakObject::release (); +} + + //===== XAccessibleComponent ============================================ + +sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + // test whether the cell is hidden (column/row - hidden/filtered) + sal_Bool bVisible(sal_True); + if (mpDoc) + { + BYTE nColFlags = mpDoc->GetColFlags(maCellAddress.Col(), maCellAddress.Tab()); + BYTE nRowFlags = mpDoc->GetRowFlags(maCellAddress.Row(), maCellAddress.Tab()); + if (((nColFlags & CR_HIDDEN) == CR_HIDDEN) || ((nColFlags & CR_FILTERED) == CR_FILTERED) || + ((nRowFlags & CR_HIDDEN) == CR_HIDDEN) || ((nRowFlags & CR_FILTERED) == CR_FILTERED)) + bVisible = sal_False; + } + return bVisible; +} + + //===== XAccessibleContext ============================================== + +sal_Int32 + ScAccessibleCellBase::getAccessibleIndexInParent (void) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + return mnIndex; +} + +::rtl::OUString SAL_CALL + ScAccessibleCellBase::createAccessibleDescription (void) + throw (uno::RuntimeException) +{ + rtl::OUString sDescription; + + if (mpDoc) + { + ScPostIt aNote; + mpDoc->GetNote(maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), aNote); + sDescription = rtl::OUString (aNote.GetText()); + } + + if (!sDescription.getLength()) + sDescription = getAccessibleName(); + + return sDescription; +} + +::rtl::OUString SAL_CALL + ScAccessibleCellBase::createAccessibleName (void) + throw (uno::RuntimeException) +{ + rtl::OUString sName; + String sAddress; + // Document not needed, because only the cell address, but not the tablename is needed + maCellAddress.Format( sAddress, SCA_VALID, NULL ); + sName = rtl::OUString(sAddress); + return sName; +} + + //===== XAccessibleValue ================================================ + +uno::Any SAL_CALL + ScAccessibleCellBase::getCurrentValue( ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Any aAny; + if (mpDoc) + aAny <<= mpDoc->GetValue(maCellAddress); + + return aAny; +} + +sal_Bool SAL_CALL + ScAccessibleCellBase::setCurrentValue( const uno::Any& aNumber ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + double fValue; + sal_Bool bResult(sal_False); + if((aNumber >>= fValue) && mpDoc) + { + mpDoc->SetValue(maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), fValue); + bResult = sal_True; + } + return bResult; +} + +uno::Any SAL_CALL + ScAccessibleCellBase::getMaximumValue( ) + throw (uno::RuntimeException) +{ + uno::Any aAny; + aAny <<= DBL_MAX; + + return aAny; +} + +uno::Any SAL_CALL + ScAccessibleCellBase::getMinimumValue( ) + throw (uno::RuntimeException) +{ + uno::Any aAny; + aAny <<= DBL_MIN; + + return aAny; +} + + //===== XServiceInfo ==================================================== + +::rtl::OUString SAL_CALL ScAccessibleCellBase::getImplementationName (void) + throw (uno::RuntimeException) +{ + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("ScAccessibleCellBase")); +} + + //===== XTypeProvider =================================================== + +uno::Sequence< uno::Type> SAL_CALL ScAccessibleCellBase::getTypes (void) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Sequence< uno::Type> + aTypeSequence = ScAccessibleContextBase::getTypes(); + sal_Int32 nOldSize(aTypeSequence.getLength()); + aTypeSequence.realloc(nOldSize + 1); + uno::Type* pTypes = aTypeSequence.getArray(); + + pTypes[nOldSize] = ::getCppuType((const uno::Reference< + XAccessibleValue>*)0); + + return aTypeSequence; +} + + diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 661731a490b2..86cabd677900 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleDocument.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:26:13 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,9 +66,6 @@ #ifndef _SC_ACCESSIBLESPREADSHEET_HXX #include "AccessibleSpreadsheet.hxx" #endif -#ifndef SC_UNONAMES_HXX -#include "unonames.hxx" -#endif #ifndef SC_TABVWSH_HXX #include "tabvwsh.hxx" #endif @@ -82,9 +79,6 @@ #include "drwlayer.hxx" #endif -#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEROLE_HPP_ -#include <drafts/com/sun/star/accessibility/AccessibleRole.hpp> -#endif #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_ #include <drafts/com/sun/star/accessibility/AccessibleEventId.hpp> #endif @@ -98,9 +92,6 @@ #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif -#ifndef _COMPHELPER_EXTRACT_HXX_ -#include <comphelper/extract.hxx> -#endif #ifndef _SV_GEN_HXX #include <tools/gen.hxx> #endif @@ -120,7 +111,7 @@ ScAccessibleDocument::ScAccessibleDocument( const uno::Reference<XAccessible>& rxParent, ScTabViewShell* pViewShell, ScSplitPos eSplitPos) - : ScAccessibleContextBase(rxParent, AccessibleRole::DOCUMENT), + : ScAccessibleDocumentBase(rxParent), mpViewShell(pViewShell), meSplitPos(eSplitPos), mpAccessibleSpreadsheet(NULL) @@ -147,7 +138,7 @@ void ScAccessibleDocument::SetDefunc() mpViewShell = NULL; } - ScAccessibleContextBase::SetDefunc(); + ScAccessibleDocumentBase::SetDefunc(); } //===== SfxListener ===================================================== @@ -306,9 +297,9 @@ uno::Reference<XAccessibleStateSet> SAL_CALL pStateSet->AddState(AccessibleStateType::EDITABLE); pStateSet->AddState(AccessibleStateType::ENABLED); pStateSet->AddState(AccessibleStateType::OPAQUE); - if (IsShowing(xParentStates)) + if (isShowing()) pStateSet->AddState(AccessibleStateType::SHOWING); - if (IsVisible(xParentStates)) + if (isVisible()) pStateSet->AddState(AccessibleStateType::VISIBLE); return pStateSet; } @@ -441,15 +432,3 @@ sal_Bool ScAccessibleDocument::IsEditable( // what is with document protection? return sal_True; } - -sal_Bool ScAccessibleDocument::IsShowing( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::SHOWING)); -} - -sal_Bool ScAccessibleDocument::IsVisible( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::VISIBLE)); -} diff --git a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx new file mode 100644 index 000000000000..49852750f6c9 --- /dev/null +++ b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: AccessibleDocumentBase.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ + * + * 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 _SC_ACCESSIBLEDOCUMENTBASE_HXX +#include "AccessibleDocumentBase.hxx" +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEROLE_HPP_ +#include <drafts/com/sun/star/accessibility/AccessibleRole.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::accessibility; + + //===== internal ======================================================== + +ScAccessibleDocumentBase::ScAccessibleDocumentBase( + const uno::Reference<XAccessible>& rxParent) + : ScAccessibleContextBase(rxParent, AccessibleRole::DOCUMENT) +{ +} + +ScAccessibleDocumentBase::~ScAccessibleDocumentBase(void) +{ +} diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx new file mode 100644 index 000000000000..f0606bd0b140 --- /dev/null +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -0,0 +1,253 @@ +/************************************************************************* + * + * $RCSfile: AccessibleDocumentPagePreview.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ + * + * 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 _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX +#include "AccessibleDocumentPagePreview.hxx" +#endif +#ifndef SC_ACCESSIBILITYHINTS_HXX +#include "AccessibilityHints.hxx" +#endif +#ifndef SC_DOCUMENT_HXX +#include "document.hxx" +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_ +#include <drafts/com/sun/star/accessibility/AccessibleEventId.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLESTATETYPE_HPP_ +#include <drafts/com/sun/star/accessibility/AccessibleStateType.hpp> +#endif + +#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX +#include <unotools/accessiblestatesethelper.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _SV_GEN_HXX +#include <tools/gen.hxx> +#endif +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif +#ifndef _SVDOBJ_HXX +#include <svx/svdobj.hxx> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::accessibility; + + //===== internal ======================================================== + +ScAccessibleDocumentPagePreview::ScAccessibleDocumentPagePreview( + const uno::Reference<XAccessible>& rxParent) + : ScAccessibleDocumentBase(rxParent) +{ +} + +ScAccessibleDocumentPagePreview::~ScAccessibleDocumentPagePreview(void) +{ +} + +void ScAccessibleDocumentPagePreview::SetDefunc() +{ + ScAccessibleDocumentBase::SetDefunc(); +} + + //===== SfxListener ===================================================== + +void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) +{ + DBG_ERROR("not implemented"); +} + + //===== XAccessibleComponent ============================================ + +uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleAt( + const awt::Point& rPoint ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Reference<XAccessible> xAccessible = NULL; + DBG_ERROR("not implemented"); + return xAccessible; +} + +void SAL_CALL ScAccessibleDocumentPagePreview::grabFocus( ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + DBG_ERROR("not implemented"); +} + + //===== XAccessibleContext ============================================== + + /// Return the number of currently visible children. +long SAL_CALL + ScAccessibleDocumentPagePreview::getAccessibleChildCount (void) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + DBG_ERROR("not implemented"); + return 0; +} + + /// Return the specified child or NULL if index is invalid. +uno::Reference<XAccessible> SAL_CALL + ScAccessibleDocumentPagePreview::getAccessibleChild (long nIndex) + throw (uno::RuntimeException/*, + lang::IndexOutOfBoundsException*/) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Reference<XAccessible> xAccessible;// = GetChild(nIndex); + DBG_ERROR("not implemented"); + return xAccessible; +} + + /// Return the set of current states. +uno::Reference<XAccessibleStateSet> SAL_CALL + ScAccessibleDocumentPagePreview::getAccessibleStateSet (void) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + DBG_ERROR("not implemented"); + uno::Reference<XAccessibleStateSet> xParentStates; + if (getAccessibleParent().is()) + { + uno::Reference<XAccessibleContext> xParentContext = getAccessibleParent()->getAccessibleContext(); + xParentStates = xParentContext->getAccessibleStateSet(); + } + utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper(); + if (IsDefunc(xParentStates)) + pStateSet->AddState(AccessibleStateType::DEFUNC); + pStateSet->AddState(AccessibleStateType::ENABLED); + pStateSet->AddState(AccessibleStateType::OPAQUE); + if (isShowing()) + pStateSet->AddState(AccessibleStateType::SHOWING); + if (isVisible()) + pStateSet->AddState(AccessibleStateType::VISIBLE); + return pStateSet; +} + + //===== XServiceInfo ==================================================== + +::rtl::OUString SAL_CALL + ScAccessibleDocumentPagePreview::getImplementationName (void) + throw (uno::RuntimeException) +{ + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("ScAccessibleDocumentPagePreview")); +} + +uno::Sequence< ::rtl::OUString> SAL_CALL + ScAccessibleDocumentPagePreview::getSupportedServiceNames (void) + throw (uno::RuntimeException) +{ + uno::Sequence< ::rtl::OUString > aSequence = ScAccessibleContextBase::getSupportedServiceNames(); + sal_Int32 nOldSize(aSequence.getLength()); + aSequence.realloc(nOldSize + 1); + ::rtl::OUString* pNames = aSequence.getArray(); + + pNames[nOldSize] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("drafts.com.sun.star.AccessibleSpreadsheetPageView")); + + return aSequence; +} + + //===== internal ======================================================== + +::rtl::OUString SAL_CALL + ScAccessibleDocumentPagePreview::createAccessibleDescription (void) + throw (uno::RuntimeException) +{ + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("This is a page preview of a Spreadsheet Document.")); +} + +::rtl::OUString SAL_CALL + ScAccessibleDocumentPagePreview::createAccessibleName (void) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM ("Spreadsheet Document Page Preview ")); + return sName; +} + +Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() + throw (uno::RuntimeException) +{ + Rectangle aRect; + DBG_ERROR("not implemented"); + return aRect; +} + +Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() + throw (uno::RuntimeException) +{ + Rectangle aRect; + DBG_ERROR("not implemented"); + return aRect; +} + +sal_Bool ScAccessibleDocumentPagePreview::IsDefunc( + const uno::Reference<XAccessibleStateSet>& rxParentStates) +{ + return !getAccessibleParent().is() || + (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::DEFUNC)); +} diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 87c6ef33c6e7..47df04e041d5 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleSpreadsheet.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:26:13 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -161,6 +161,84 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint //===== XAccessibleTable ================================================ +uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessibleRows( ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Sequence<sal_Int32> aSequence; + if (mpViewShell && mpViewShell->GetViewData()) + { + aSequence.realloc(maRange.aEnd.Col() - maRange.aStart.Col() + 1); + const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); + sal_Int32* pSequence = aSequence.getArray(); + sal_Int32 nCount(0); + for (sal_uInt16 i = maRange.aStart.Row(); i <= maRange.aEnd.Row(); i++) + { + if (rMarkdata.IsRowMarked(i)) + { + pSequence[nCount] = i; + nCount++; + } + } + aSequence.realloc(nCount); + } + else + aSequence.realloc(0); + return aSequence; +} + +uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessibleColumns( ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + uno::Sequence<sal_Int32> aSequence; + if (mpViewShell && mpViewShell->GetViewData()) + { + aSequence.realloc(maRange.aEnd.Col() - maRange.aStart.Col() + 1); + const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); + sal_Int32* pSequence = aSequence.getArray(); + sal_Int32 nCount(0); + for (sal_uInt16 i = maRange.aStart.Col(); i <= maRange.aEnd.Col(); i++) + { + if (rMarkdata.IsColumnMarked(i)) + { + pSequence[nCount] = i; + nCount++; + } + } + aSequence.realloc(nCount); + } + else + aSequence.realloc(0); + return aSequence; +} + +sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nRow ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + sal_Bool bResult(sal_False); + if (mpViewShell && mpViewShell->GetViewData()) + { + const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); + bResult = rMarkdata.IsRowMarked((sal_uInt16)nRow); + } + return bResult; +} + +sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32 nColumn ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + sal_Bool bResult(sal_False); + if (mpViewShell && mpViewShell->GetViewData()) + { + const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); + bResult = rMarkdata.IsColumnMarked((sal_uInt16)nColumn); + } + return bResult; +} + uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (uno::RuntimeException) { @@ -171,6 +249,19 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCel return pAccessibleCell; } +sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw (uno::RuntimeException) +{ + ::osl::MutexGuard aGuard (maMutex); + sal_Bool bResult(sal_False); + if (mpViewShell && mpViewShell->GetViewData()) + { + const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); + bResult = rMarkdata.IsCellMarked((sal_uInt16)nColumn, (sal_uInt16)nRow); + } + return bResult; +} + //===== XAccessibleComponent ============================================ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAt( @@ -223,9 +314,9 @@ uno::Reference<XAccessibleStateSet> SAL_CALL pStateSet->AddState(AccessibleStateType::SELECTABLE); if (IsCompleteSheetSelected(xParentStates)) pStateSet->AddState(AccessibleStateType::SELECTED); - if (IsShowing(xParentStates)) + if (isShowing()) pStateSet->AddState(AccessibleStateType::SHOWING); - if (IsVisible(xParentStates)) + if (isVisible()) pStateSet->AddState(AccessibleStateType::VISIBLE); return pStateSet; } @@ -302,18 +393,6 @@ sal_Bool ScAccessibleSpreadsheet::IsCompleteSheetSelected( return sal_False; } -sal_Bool ScAccessibleSpreadsheet::IsShowing( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::SHOWING)); -} - -sal_Bool ScAccessibleSpreadsheet::IsVisible( - const uno::Reference<XAccessibleStateSet>& rxParentStates) -{ - return (rxParentStates.is() && rxParentStates->contains(AccessibleStateType::VISIBLE)); -} - ScDocument* ScAccessibleSpreadsheet::GetDocument(ScTabViewShell* pViewShell) { ScDocument* pDoc = NULL; diff --git a/sc/source/ui/Accessibility/makefile.mk b/sc/source/ui/Accessibility/makefile.mk index bbe9cfdfbbe5..c57f12779b2d 100644 --- a/sc/source/ui/Accessibility/makefile.mk +++ b/sc/source/ui/Accessibility/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: sab $ $Date: 2002-02-14 16:49:28 $ +# last change: $Author: sab $ $Date: 2002-02-20 13:49:21 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -88,14 +88,20 @@ CXXFILES = \ AccessibleSpreadsheet.cxx \ AccessibleCell.cxx \ AccessibleSpreadsheet.cxx \ - AccessibilityHints.cxx + AccessibilityHints.cxx \ + AccessibleDocumentBase.cxx \ + AccessibleCellBase.cxx \ + AccessibleDocumentPagePreview.cxx EXCEPTIONSFILES=\ $(SLO)$/AccessibleContextBase.obj \ $(SLO)$/AccessibleTableBase.obj \ $(SLO)$/AccessibleDocument.obj \ $(SLO)$/AccessibleSpreadsheet.obj \ - $(SLO)$/AccessibleCell.obj + $(SLO)$/AccessibleCell.obj \ + $(SLO)$/AccessibleDocumentBase.obj \ + $(SLO)$/AccessibleCellBase.obj \ + $(SLO)$/AccessibleDocumentPagePreview.obj SLOFILES = \ $(SLO)$/AccessibleContextBase.obj \ @@ -103,7 +109,10 @@ SLOFILES = \ $(SLO)$/AccessibleDocument.obj \ $(SLO)$/AccessibleSpreadsheet.obj \ $(SLO)$/AccessibleCell.obj \ - $(SLO)$/AccessibilityHints.obj + $(SLO)$/AccessibilityHints.obj \ + $(SLO)$/AccessibleDocumentBase.obj \ + $(SLO)$/AccessibleCellBase.obj \ + $(SLO)$/AccessibleDocumentPagePreview.obj # --- Tagets ------------------------------------------------------- diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx new file mode 100644 index 000000000000..ac09651a046b --- /dev/null +++ b/sc/source/ui/inc/AccessibleCell.hxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * $RCSfile: AccessibleCell.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ + * + * 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 _SC_ACCESSIBLECELL_HXX +#define _SC_ACCESSIBLECELL_HXX + +#ifndef _SC_ACCESSIBLECELLBASE_HXX +#include "AccessibleCellBase.hxx" +#endif +#ifndef SC_SCGLOB_HXX +#include "global.hxx" +#endif +#ifndef SC_VIEWDATA_HXX +#include "viewdata.hxx" +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_ +#include <drafts/com/sun/star/accessibility/XAccessibleValue.hpp> +#endif + +class ScTabViewShell; + +/** @descr + This base class provides an implementation of the + <code>AccessibleCell</code> service. +*/ +class ScAccessibleCell + : public ScAccessibleCellBase +{ +public: + //===== internal ======================================================== + ScAccessibleCell ( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessible>& rxParent, + ScTabViewShell* pViewShell, + ScAddress& rCellAddress, + sal_Int32 nIndex, + ScSplitPos eSplitPos); +protected: + virtual ~ScAccessibleCell (); +public: + + //===== XAccessibleComponent ============================================ + + /** Returns the Accessible child that is rendered under the given point. + + @param aPoint + Coordinates of the test point for which to find the Accessible + child. + + @return + If there is one child which is rendered so that its bounding box + contains the test point then a reference to that object is + returned. If there is more than one child which satisfies that + condition then a reference to that one is returned that is + painted on top of the others. If no there is no child which is + rendered at the test point an empty reference is returned. + */ + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > + SAL_CALL getAccessibleAt( + const ::com::sun::star::awt::Point& rPoint ) + throw (::com::sun::star::uno::RuntimeException); + + /** Determines if the object is visible. + + <p>If an object and all of its parents are visible then the object + is also called showing. If an object is showing then it has also + set the <const>AccessibleStateType::VISIBLE</const> state set in its + <type>AccessibleStateSet</type>.</p> + + @return + Returns <TRUE/> if the object is visible and <FALSE/> otherwise. + + @see isShowing + */ + virtual sal_Bool SAL_CALL isVisible( ) + throw (::com::sun::star::uno::RuntimeException); + + /** Grabs the focus to this object. + + <p>If this object can not accept the focus, + i.e. <member>isFocusTraversable</member> returns <FALSE/> for this + object then nothing happens. Otherwise the object will attempt to + take the focus. Nothing happens if that fails, otherwise the object + has the focus. This method is called <code>requestFocus</code> in + the Java Accessibility API 1.4.</p> + */ + virtual void SAL_CALL grabFocus( ) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleContext ============================================== + + /// Return the number of currently visible children. + // is overloaded to calculate this on demand + virtual sal_Int32 SAL_CALL + getAccessibleChildCount (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the specified child or NULL if index is invalid. + // is overloaded to calculate this on demand + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 nIndex) + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::lang::IndexOutOfBoundsException); + +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); +public: + /// Return the set of current states. + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns a list of all supported services. + */ + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + +private: + ScTabViewShell* mpViewShell; + + ScSplitPos meSplitPos; + + sal_Bool IsDefunc( + const com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); + sal_Bool IsEditable( + const com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); + sal_Bool IsOpaque( + const com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); + sal_Bool IsSelected( + const com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); + + ScDocument* GetDocument(ScTabViewShell* mpViewShell); +}; + + +#endif diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx new file mode 100644 index 000000000000..1639a91ff517 --- /dev/null +++ b/sc/source/ui/inc/AccessibleCellBase.hxx @@ -0,0 +1,238 @@ +/************************************************************************* + * + * $RCSfile: AccessibleCellBase.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ + * + * 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 _SC_ACCESSIBLECELLBASE_HXX +#define _SC_ACCESSIBLECELLBASE_HXX + +#ifndef _SC_ACCESSIBLECONTEXTBASE_HXX +#include "AccessibleContextBase.hxx" +#endif +#ifndef SC_SCGLOB_HXX +#include "global.hxx" +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_ +#include <drafts/com/sun/star/accessibility/XAccessibleValue.hpp> +#endif + +class ScTabViewShell; + +class ScAccessibleCellBase + : public ::drafts::com::sun::star::accessibility::XAccessibleValue, + public ScAccessibleContextBase +{ +public: + //===== internal ======================================================== + ScAccessibleCellBase ( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessible>& rxParent, + ScDocument* pDoc, + ScAddress& rCellAddress, + sal_Int32 nIndex); +protected: + virtual ~ScAccessibleCellBase (); +public: + + //===== XInterface ====================================================== + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw(::com::sun::star::uno::RuntimeException); + + /** Increase the reference count. + */ + virtual void SAL_CALL + acquire (void) + throw (); + + /** Decrease the reference count. + */ + virtual void SAL_CALL + release (void) + throw (); + + //===== XAccessibleComponent ============================================ + + /** Determines if the object is visible. + + <p>If an object and all of its parents are visible then the object + is also called showing. If an object is showing then it has also + set the <const>AccessibleStateType::VISIBLE</const> state set in its + <type>AccessibleStateSet</type>.</p> + + @return + Returns <TRUE/> if the object is visible and <FALSE/> otherwise. + + @see isShowing + */ + virtual sal_Bool SAL_CALL isVisible( ) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleContext ============================================== + + /// Return this objects index among the parents children. + virtual sal_Int32 SAL_CALL + getAccessibleIndexInParent (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /// Return this object's description. + virtual ::rtl::OUString SAL_CALL + createAccessibleDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the object's current name. + virtual ::rtl::OUString SAL_CALL + createAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleValue ================================================ + + /** Returns the value of this object as a number. + + <p>The exact return type is implementation dependent. Typical types + are long and double.</p> + + @return + Returns the current value represented by this object. + */ + virtual ::com::sun::star::uno::Any SAL_CALL + getCurrentValue( ) + throw (::com::sun::star::uno::RuntimeException); + + /** Sets the value of this object to the given number. + + <p>The argument is clipped to the valid interval whose upper and + lower bounds are returned by the methods + <member>getMaximumAccessibleValue</member> and + <member>getMinimumAccessibleValue</member>, i.e. if it is lower than + the minimum value the new value will be the minimum and if it is + greater than the maximum then the new value will be the maximum.</p> + + @param aNumber + The new value represented by this object. The set of admissible + types for this argument is implementation dependent. + + @return + Returns <TRUE/> if the new value could successfully be set and + <FALSE/> otherwise. + */ + virtual sal_Bool SAL_CALL + setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns the maximal value that can be represented by this object. + + <p>The type of the returned value is implementation dependent. It + does not have to be the same type as that returned by + <member>getCurrentAccessibleValue</member>.</p> + + @return + Returns the maximal value in an implementation dependent type. + If this object has no upper bound then an empty object is + returned. + */ + virtual ::com::sun::star::uno::Any SAL_CALL + getMaximumValue( ) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns the minimal value that can be represented by this object. + + <p>The type of the returned value is implementation dependent. It + does not have to be the same type as that returned by + <member>getCurrentAccessibleValue</member>.</p> + + @return + Returns the minimal value in an implementation dependent type. + If this object has no upper bound then an empty object is + returned. + */ + virtual ::com::sun::star::uno::Any SAL_CALL + getMinimumValue( ) + throw (::com::sun::star::uno::RuntimeException); + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XTypeProvider =================================================== + + /** Returns a sequence of all supported interfaces. + */ + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + ScAddress maCellAddress; + + ScDocument* mpDoc; + + sal_Int32 mnIndex; +}; + + +#endif diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index bab7c3a1f400..040e0460d2ff 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleContextBase.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:25:18 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,8 +60,8 @@ ************************************************************************/ -#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX -#define _SC_ACCESSIBLE_CONTEXT_BASE_HXX +#ifndef _SC_ACCESSIBLECONTEXTBASE_HXX +#define _SC_ACCESSIBLECONTEXTBASE_HXX #ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_ #include <drafts/com/sun/star/accessibility/XAccessible.hpp> diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx index 78047bb16e52..8a2dfb5bce63 100644 --- a/sc/source/ui/inc/AccessibleDocument.hxx +++ b/sc/source/ui/inc/AccessibleDocument.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleDocument.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:25:18 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,8 +63,8 @@ #ifndef _SC_ACCESSIBLEDOCUMENT_HXX #define _SC_ACCESSIBLEDOCUMENT_HXX -#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX -#include "AccessibleContextBase.hxx" +#ifndef _SC_ACCESSIBLEDOCUMENTBASE_HXX +#include "AccessibleDocumentBase.hxx" #endif #ifndef SC_VIEWDATA_HXX #include "viewdata.hxx" @@ -80,7 +80,7 @@ class SdrPage; */ class ScAccessibleDocument - : public ScAccessibleContextBase + : public ScAccessibleDocumentBase { public: //===== internal ======================================================== @@ -89,7 +89,9 @@ public: ::drafts::com::sun::star::accessibility::XAccessible>& rxParent, ScTabViewShell* pViewShell, ScSplitPos eSplitPos); +protected: virtual ~ScAccessibleDocument (void); +public: virtual void SetDefunc(); @@ -195,8 +197,6 @@ private: void FreeAccessibleSpreadsheet(); - void ClearMemberAndDisableListening(); - SdrPage* GetDrawPage(); sal_Bool IsDefunc( @@ -205,12 +205,6 @@ private: sal_Bool IsEditable( const com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); - sal_Bool IsShowing( - const com::sun::star::uno::Reference< - ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); - sal_Bool IsVisible( - const com::sun::star::uno::Reference< - ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); }; diff --git a/sc/source/ui/inc/AccessibleDocumentBase.hxx b/sc/source/ui/inc/AccessibleDocumentBase.hxx new file mode 100644 index 000000000000..dcda24201813 --- /dev/null +++ b/sc/source/ui/inc/AccessibleDocumentBase.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: AccessibleDocumentBase.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ + * + * 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 _SC_ACCESSIBLEDOCUMENTBASE_HXX +#define _SC_ACCESSIBLEDOCUMENTBASE_HXX + +#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX +#include "AccessibleContextBase.hxx" +#endif + +class ScAccessibleDocumentBase + : public ScAccessibleContextBase +{ +public: + //===== internal ======================================================== + ScAccessibleDocumentBase( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessible>& rxParent); +protected: + virtual ~ScAccessibleDocumentBase (void); +}; + + +#endif + diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx new file mode 100644 index 000000000000..aac240bff1c7 --- /dev/null +++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx @@ -0,0 +1,180 @@ +/************************************************************************* + * + * $RCSfile: AccessibleDocumentPagePreview.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ + * + * 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 _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX +#define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX + +#ifndef _SC_ACCESSIBLEDOCUMENTBASE_HXX +#include "AccessibleDocumentBase.hxx" +#endif + +class ScAccessibleDocumentPagePreview + : public ScAccessibleDocumentBase +{ +public: + //===== internal ======================================================== + ScAccessibleDocumentPagePreview( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessible>& rxParent); +protected: + virtual ~ScAccessibleDocumentPagePreview(void); +public: + + virtual void SetDefunc(); + + //===== SfxListener ===================================================== + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + //===== XAccessibleComponent ============================================ + + /** Returns the Accessible child that is rendered under the given point. + + @param aPoint + Coordinates of the test point for which to find the Accessible + child. + + @return + If there is one child which is rendered so that its bounding box + contains the test point then a reference to that object is + returned. If there is more than one child which satisfies that + condition then a reference to that one is returned that is + painted on top of the others. If no there is no child which is + rendered at the test point an empty reference is returned. + */ + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > + SAL_CALL getAccessibleAt( + const ::com::sun::star::awt::Point& rPoint ) + throw (::com::sun::star::uno::RuntimeException); + + /** Grabs the focus to this object. + + <p>If this object can not accept the focus, + i.e. <member>isFocusTraversable</member> returns <FALSE/> for this + object then nothing happens. Otherwise the object will attempt to + take the focus. Nothing happens if that fails, otherwise the object + has the focus. This method is called <code>requestFocus</code> in + the Java Accessibility API 1.4.</p> + */ + virtual void SAL_CALL grabFocus( ) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleContext ============================================== + + /// Return the number of currently visible children. + virtual long SAL_CALL + getAccessibleChildCount (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the specified child or NULL if index is invalid. + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild (long nIndex) + throw (::com::sun::star::uno::RuntimeException/*, + ::com::sun::star::lang::IndexOutOfBoundsException*/); + + /// Return the set of current states. + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns a list of all supported services. + */ + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /// Return this object's description. + virtual ::rtl::OUString SAL_CALL + createAccessibleDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the object's current name. + virtual ::rtl::OUString SAL_CALL + createAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + + /// 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); + +private: + sal_Bool IsDefunc( + const com::sun::star::uno::Reference< + ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); +}; + + +#endif diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 5901bc8afee5..80a332d837d3 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleSpreadsheet.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:25:18 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,7 +85,9 @@ public: ScTabViewShell* pViewShell, sal_uInt16 nTab, ScSplitPos eSplitPos); +protected: virtual ~ScAccessibleSpreadsheet (); +public: void SetDefunc(); @@ -95,11 +97,36 @@ public: //===== XAccessibleTable ================================================ + /// Returns the selected rows in a table. + virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleRows( ) + throw (::com::sun::star::uno::RuntimeException); + + /// Returns the selected columns in a table. + virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleColumns( ) + throw (::com::sun::star::uno::RuntimeException); + + /// Returns a boolean value indicating whether the specified row is selected. + virtual sal_Bool SAL_CALL + isAccessibleRowSelected( sal_Int32 nRow ) + throw (::com::sun::star::uno::RuntimeException); + + /// Returns a boolean value indicating whether the specified column is selected. + virtual sal_Bool SAL_CALL + isAccessibleColumnSelected( sal_Int32 nColumn ) + throw (::com::sun::star::uno::RuntimeException); + /// Returns the Accessible at a specified row and column in the table. virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::uno::RuntimeException); + /// Returns a boolean value indicating whether the accessible at a specified row and column is selected. + virtual sal_Bool SAL_CALL + isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw (::com::sun::star::uno::RuntimeException); + //===== XAccessibleComponent ============================================ /** Returns the Accessible child that is rendered under the given point. @@ -177,12 +204,6 @@ private: sal_Bool IsCompleteSheetSelected( const com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); - sal_Bool IsShowing( - const com::sun::star::uno::Reference< - ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); - sal_Bool IsVisible( - const com::sun::star::uno::Reference< - ::drafts::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); ScDocument* GetDocument(ScTabViewShell* mpViewShell); }; diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx index 8078b862a548..9f57831f1742 100644 --- a/sc/source/ui/inc/AccessibleTableBase.hxx +++ b/sc/source/ui/inc/AccessibleTableBase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AccessibleTableBase.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2002-02-19 08:25:18 $ + * last change: $Author: sab $ $Date: 2002-02-20 13:50:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,7 +63,7 @@ #ifndef _SC_ACCESSIBLETABLEBASE_HXX #define _SC_ACCESSIBLETABLEBASE_HXX -#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX +#ifndef _SC_ACCESSIBLECONTEXTBASE_HXX #include "AccessibleContextBase.hxx" #endif #ifndef SC_SCGLOB_HXX @@ -91,7 +91,9 @@ public: ::drafts::com::sun::star::accessibility::XAccessible>& rxParent, ScDocument* pDoc, const ScRange& rRange); +protected: virtual ~ScAccessibleTableBase (); +public: virtual void SetDefunc(); |