diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-10-25 06:46:28 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-10-25 06:46:28 +0000 |
commit | 7384ff1768fed4258063e99d4db866a29ca477de (patch) | |
tree | 21d9f9f78e63855361debff409847e45027f79bf /svx/source | |
parent | f644a3b31cac112771d198acab17e4cd7201dce5 (diff) |
#104493# Reorganization of XAccessibleComponent and XAccessibleExtendedComponent
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/accessibility/charmapacc.cxx | 63 | ||||
-rw-r--r-- | svx/source/inc/charmapacc.hxx | 8 |
2 files changed, 67 insertions, 4 deletions
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index bf80a028f666..bf19675ebff9 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: charmapacc.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2002-09-20 11:49:08 $ + * last change: $Author: oj $ $Date: 2002-10-25 07:46:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -864,6 +864,65 @@ uno::Reference< accessibility::XAccessible > SAL_CALL SvxShowCharSetItemAcc::get return uno::Reference< accessibility::XAccessible >(); } // ----------------------------------------------------------------------------- +sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getForeground( ) throw (RuntimeException) +{ + OExternalLockGuard aGuard( this ); + + sal_Int32 nColor = 0; + if ( mpParent ) + { + if ( mpParent->IsControlForeground() ) + nColor = mpParent->GetControlForeground().GetColor(); + else + { + Font aFont; + if ( mpParent->IsControlFont() ) + aFont = mpParent->GetControlFont(); + else + aFont = mpParent->GetFont(); + nColor = aFont.GetColor().GetColor(); + } + } + + return nColor; +} +// ----------------------------------------------------------------------------- +sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getBackground( ) throw (RuntimeException) +{ + OExternalLockGuard aGuard( this ); + sal_Int32 nColor = 0; + if ( mpParent ) + { + if ( mpParent->IsControlBackground() ) + nColor = mpParent->GetControlBackground().GetColor(); + else + nColor = mpParent->GetBackground().GetColor().GetColor(); + } + + return nColor; +} +// ----------------------------------------------------------------------------- +sal_Int32 SAL_CALL SvxShowCharSetAcc::getForeground( ) throw (RuntimeException) +{ + OExternalLockGuard aGuard( this ); + + sal_Int32 nColor = 0; + if ( m_pParent ) + nColor = m_pParent->getForeground(); + return nColor; +} +// ----------------------------------------------------------------------------- +sal_Int32 SAL_CALL SvxShowCharSetAcc::getBackground( ) throw (RuntimeException) +{ + OExternalLockGuard aGuard( this ); + sal_Int32 nColor = 0; + if ( m_pParent ) + nColor = m_pParent->getBackground(); + return nColor; +} +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- } // namespace svx // ----------------------------------------------------------------------------- diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index c94df6210dd1..a2e1657a129f 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: charmapacc.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2002-07-30 10:32:58 $ + * last change: $Author: oj $ $Date: 2002-10-25 07:45:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,6 +132,8 @@ namespace svx virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; } + virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // call the fireEvent method from the table when it exists. @@ -211,6 +213,8 @@ namespace svx virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; } + virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleTable virtual sal_Int32 SAL_CALL getAccessibleRowCount( ) throw (::com::sun::star::uno::RuntimeException); |