summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/accmap.hxx22
-rw-r--r--sw/inc/viewsh.hxx10
-rw-r--r--sw/source/ui/docvw/edtwin.cxx51
-rw-r--r--sw/source/ui/uiview/viewport.cxx9
4 files changed, 22 insertions, 70 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 7bb06c18ac1d..68ff084be886 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accmap.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2002-02-11 12:51:16 $
+ * last change: $Author: mib $ $Date: 2002-02-20 18:33:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,34 +81,33 @@ class SwRootFrm;
class SwAccessibleContext;
class SwAccessibleMap_Impl;
class SwRect;
+class ViewShell;
class SwAccessibleMap
{
::vos::OMutex aMutex;
SwAccessibleMap_Impl *pMap;
+ ViewShell *pVSh;
sal_Int32 nPara;
public:
- SwAccessibleMap();
+ SwAccessibleMap( ViewShell *pSh );
~SwAccessibleMap();
::com::sun::star::uno::Reference<
- ::drafts::com::sun::star::accessibility::XAccessible> GetDocumentView(
- const ::com::sun::star::uno::Reference<
- ::drafts::com::sun::star::accessibility::XAccessible>& rxParent,
- const Rectangle& rVisArea,
- const SwRootFrm *pRootFrm );
+ ::drafts::com::sun::star::accessibility::XAccessible> GetDocumentView();
::vos::ORef < SwAccessibleContext > GetContextImpl(
- const Rectangle& rVisArea,
const SwFrm *pFrm,
sal_Bool bCreate = sal_True );
::com::sun::star::uno::Reference<
::drafts::com::sun::star::accessibility::XAccessible> GetContext(
- const Rectangle& rVisArea,
const SwFrm *pFrm,
sal_Bool bCreate = sal_True );
+
+ ViewShell *GetShell() { return pVSh; }
+
void RemoveContext( SwAccessibleContext *pAcc );
void DisposeFrm( const SwFrm *pFrm );
@@ -116,7 +115,4 @@ public:
void MoveFrm( const SwFrm *pFrm, const SwRect& rOldFrm );
};
-
-extern SwAccessibleMap aAccMap;
-
#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index c6cdd7dff903..b9f67e02cc03 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewsh.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2001-05-10 12:54:50 $
+ * last change: $Author: mib $ $Date: 2002-02-20 18:33:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,6 +81,9 @@
#include <errhdl.hxx>
#endif
+namespace drafts {
+ namespace com { namespace sun { namespace star { namespace accessibility {
+ class XAccessible; } } } } }
class SwDoc;
class SfxPrinter;
@@ -157,6 +160,7 @@ class ViewShell : public Ring
sal_Bool bEnableSmooth :1; //Disable des SmoothScroll z.B. fuer
//Drag der Scrollbars.
sal_Bool bEndActionByVirDev:1; //Paints aus der EndAction immer ueber virtuelles
+
//Device (etwa beim Browsen)
//Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
@@ -407,6 +411,8 @@ public:
const Size& GetBrowseBorder() const{ return aBrowseBorder; }
void SetBrowseBorder( const Size& rNew );
+ ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
long nFlags = 0 );
ViewShell( SwDoc& rDoc, Window *pWin,
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 331b138d7ecc..74b4058740ec 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: edtwin.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: vg $ $Date: 2002-02-19 14:59:57 $
+ * last change: $Author: mib $ $Date: 2002-02-20 18:31:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -290,14 +290,6 @@
#ifndef _SWWDOCSH_HXX //autogen
#include <wdocsh.hxx>
#endif
-#ifdef ACCESSIBLE_LAYOUT
-#ifndef _ACCMAP_HXX
-#include <accmap.hxx>
-#endif
-#ifndef _DOC_HXX
-#include <doc.hxx>
-#endif
-#endif
#ifndef _HELPID_H
#include <helpid.h>
@@ -3392,9 +3384,6 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
nDropDestination( 0 ),
nInsFrmColCount( 1 ),
bLockInput(FALSE)
-#ifdef ACCESSIBLE_LAYOUT
- ,bHasAccessible( FALSE )
-#endif
{
SetHelpId(HID_EDIT_WIN);
EnableChildTransparentMode();
@@ -3865,45 +3854,11 @@ void SwEditWin::SetChainMode( BOOL bOn )
rView.GetViewFrame()->GetBindings().Invalidate(aInva);
}
-
-#ifdef ACCESSIBLE_LAYOUT
::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > SwEditWin::CreateAccessible()
{
- using namespace ::com::sun::star;
- using namespace ::drafts::com::sun::star;
-
- uno::Reference< accessibility::XAccessible > xAcc;
-
SwWrtShell &rSh = rView.GetWrtShell();
-
- SwDoc *pDoc = rSh.GetDoc();
- // We require a layout and an XModel to be accessible.
- ASSERT( pDoc->GetRootFrm(), "no layout, no access" );
-
- if( pDoc->GetRootFrm() )
- {
- xAcc = aAccMap.GetDocumentView( GetParent()->GetAccessible(),
- rView.GetVisArea(),
- pDoc->GetRootFrm() );
- bHasAccessible = sal_True;
- }
-
- return xAcc;
-}
-
-void SwEditWin::UpdateAccessible()
-{
- SwWrtShell &rSh = rView.GetWrtShell();
- SwDoc *pDoc = rSh.GetDoc();
-
- if( bHasAccessible && pDoc->GetRootFrm() )
- {
- aAccMap.GetDocumentView( GetParent()->GetAccessible(),
- rView.GetVisArea(),
- pDoc->GetRootFrm() );
- }
+ return rSh.CreateAccessible();
}
-#endif
//-------------------------------------------------------------
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 97d43e8d545f..571e6bcc8ccd 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewport.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: mib $ $Date: 2002-02-14 10:48:19 $
+ * last change: $Author: mib $ $Date: 2002-02-20 18:32:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -385,11 +385,6 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
if ( bOuterResize )
OuterResizePixel( Point(),
GetViewFrame()->GetWindow().GetOutputSizePixel() );
-
-#ifdef ACCESSIBLE_LAYOUT
- if( pEditWin )
- pEditWin->UpdateAccessible();
-#endif
}
/*--------------------------------------------------------------------