diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-04-29 13:25:33 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-04-29 13:25:33 +0000 |
commit | b913f676b01b96be3271b42e6dea57f809771916 (patch) | |
tree | 7821b0c54eb903009eb25c20d2e405555f5dc033 | |
parent | a19f13eee603fd33bec5922ed55ec4830e386517 (diff) |
#98772# enable new imagelist
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 40 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.src | 19 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowseboximpl.hxx | 5 |
3 files changed, 54 insertions, 10 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 6ea9644a4225..5e9d2bf089f7 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editbrowsebox.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2002-04-17 11:56:23 $ + * last change: $Author: oj $ $Date: 2002-04-29 14:25:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,6 +115,24 @@ namespace svt { // ....................................................................... + namespace + { + sal_Bool isHiContrast(Window* _pWindow) + { + OSL_ENSURE(_pWindow,"Window must be not null!"); + Window* pIter = _pWindow; + // while( pIter && pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT ) + while( pIter ) + { + const Color& aColor = pIter->GetBackground().GetColor(); + if ( aColor.GetColor() == COL_TRANSPARENT ) + pIter = pIter->GetParent(); + else + break; + } + return pIter && pIter->GetBackground().GetColor().IsDark(); + } + } using namespace drafts::com::sun::star::accessibility::AccessibleEventId; //================================================================== @@ -175,6 +193,8 @@ namespace svt void EditBrowseBox::Construct() { m_aImpl = ::std::auto_ptr<EditBrowseBoxImpl>(new EditBrowseBoxImpl()); + m_aImpl->m_bHiContrast = isHiContrast(&GetDataWindow()); + SetCompoundControl(sal_True); SetLineColor(Color(COL_LIGHTGRAY)); @@ -356,8 +376,12 @@ namespace svt //------------------------------------------------------------------------------ Image EditBrowseBox::GetImage(RowStatus eStatus) const { - if (!m_aStatusImages.GetImageCount()) - const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX)); + sal_Bool bHiContrast = isHiContrast(&GetDataWindow()); + if ( !m_aStatusImages.GetImageCount() || (bHiContrast != m_aImpl->m_bHiContrast) ) + { + m_aImpl->m_bHiContrast = bHiContrast; + const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList(SvtResId(bHiContrast ? RID_SVTOOLS_IMAGELIST_EDITBWSEBOX_H : RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX)); + } Image aImage; switch (eStatus) @@ -783,8 +807,9 @@ namespace svt { BrowseBox::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS ) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || + ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); @@ -1456,6 +1481,9 @@ namespace svt /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.6 2002/04/17 11:56:23 oj + * #98286# improve accessibility + * * Revision 1.5 2002/04/11 15:57:05 fs * #98483# allow for row/column selection (event when currently editing) * diff --git a/svtools/source/brwbox/editbrowsebox.src b/svtools/source/brwbox/editbrowsebox.src index fc3d84497cf1..70dc27aa1773 100644 --- a/svtools/source/brwbox/editbrowsebox.src +++ b/svtools/source/brwbox/editbrowsebox.src @@ -2,9 +2,9 @@ * * $RCSfile: editbrowsebox.src,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2002-03-27 07:33:39 $ + * last change: $Author: oj $ $Date: 2002-04-29 14:24:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,3 +83,18 @@ ImageList RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX IdCount = { 8; }; }; +ImageList RID_SVTOOLS_IMAGELIST_EDITBWSEBOX_H +{ + ImageBitmap = Bitmap { File = "edh_itbrowse.bmp"; }; + MaskColor = Color { + Red = 0xff00; + Green = 0x0000; + Blue = 0xff00; + }; + IdList = { + IMG_EBB_CURRENT; IMG_EBB_MODIFIED; + IMG_EBB_NEW;IMG_EBB_DELETED;IMG_EBB_CURRENTNEW; + IMG_EBB_PRIMARYKEY; IMG_EBB_CURRENT_PRIMARYKEY; IMG_EBB_FILTER; + }; + IdCount = { 8; }; +}; diff --git a/svtools/source/brwbox/editbrowseboximpl.hxx b/svtools/source/brwbox/editbrowseboximpl.hxx index 4409742a70e8..5a0dcc1c83cd 100644 --- a/svtools/source/brwbox/editbrowseboximpl.hxx +++ b/svtools/source/brwbox/editbrowseboximpl.hxx @@ -2,9 +2,9 @@ * * $RCSfile: editbrowseboximpl.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2002-04-17 12:04:31 $ + * last change: $Author: oj $ $Date: 2002-04-29 14:24:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,7 @@ namespace svt { public: ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > m_xActiveCell; + sal_Bool m_bHiContrast; void disposeCell(); }; } |