summaryrefslogtreecommitdiffstats
path: root/sw/inc/accmap.hxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-02-01 13:19:04 +0000
committerKurt Zenker <kz@openoffice.org>2006-02-01 13:19:04 +0000
commit46b4de558476a6db5561bba1e3d74ca9e83b5b25 (patch)
treefb5b9f20c56431c61b66aa7a68834c2e75e1f225 /sw/inc/accmap.hxx
parentINTEGRATION: CWS os74 (1.9.28); FILE MERGED (diff)
downloadcore-46b4de558476a6db5561bba1e3d74ca9e83b5b25.tar.gz
core-46b4de558476a6db5561bba1e3d74ca9e83b5b25.zip
INTEGRATION: CWS swqbf49 (1.25.132); FILE MERGED
2005/12/14 12:48:56 od 1.25.132.2: #i27301# - new pseudo state <ACC_STATE_TEXT_SELECTION_CHANGED> for event TEXT_SELECTION_CHANGED. - type definition <tAccessibleStates> for state bit field. - class <SwAccessibleMap> - new member <mpSelectedParas> for accessible selected paragraphs - new methods <_BuildSelectedParas()>, <InvalidateParaTextSelection(..)> and <InvalidateTextSelectionOfAllParas()> 2005/12/05 09:17:30 od 1.25.132.1: #i27138# class <SwAccessibleMap> - new method <InvalidateParaFlowRelation(..)>
Diffstat (limited to 'sw/inc/accmap.hxx')
-rw-r--r--sw/inc/accmap.hxx223
1 files changed, 141 insertions, 82 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 8a891bee26a7..3ea579739fd8 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: accmap.hxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 01:31:59 $
+ * last change: $Author: kz $ $Date: 2006-02-01 14:19:04 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -83,6 +83,9 @@ class SdrObject;
namespace accessibility { class AccessibleShape; }
class SwAccessibleShapeMap_Impl;
struct SwAccessibleEvent_Impl;
+// --> OD 2005-12-13 #i27301#
+class SwAccessibleSelectedParas_Impl;
+// <--
class SwRect;
class ViewShell;
class SwFrmOrObj;
@@ -92,11 +95,80 @@ class SwAccPreviewData;
#include <prevwpage.hxx>
#endif
+// helper class that stores preview data
+class SwAccPreviewData
+{
+ typedef std::vector<Rectangle> Rectangles;
+ Rectangles maPreviewRects;
+ Rectangles maLogicRects;
+
+ SwRect maVisArea;
+ Fraction maScale;
+
+ const SwPageFrm *mpSelPage;
+
+ /** adjust logic page retangle to its visible part
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _iorLogicPgSwRect
+ input/output parameter - reference to the logic page rectangle, which
+ has to be adjusted.
+
+ @param _rPrevwPgSwRect
+ input parameter - constant reference to the corresponding preview page
+ rectangle; needed to determine the visible part of the logic page rectangle.
+
+ @param _rPrevwWinSize
+ input paramter - constant reference to the preview window size in TWIP;
+ needed to determine the visible part of the logic page rectangle
+ */
+ void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
+ const SwRect& _rPrevwPgSwRect,
+ const Size& _rPrevwWinSize );
+
+public:
+ SwAccPreviewData();
+ ~SwAccPreviewData();
+
+ // OD 14.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void Update( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ // OD 14.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
+
+ const SwRect& GetVisArea() const;
+
+ MapMode GetMapModeForPreview( ) const;
+
+ /** Adjust the MapMode so that the preview page appears at the
+ * proper position. rPoint identifies the page for which the
+ * MapMode should be adjusted. If bFromPreview is true, rPoint is
+ * a preview coordinate; else it's a document coordinate. */
+ // OD 17.01.2003 #103492# - delete unused 3rd parameter.
+ void AdjustMapMode( MapMode& rMapMode,
+ const Point& rPoint ) const;
+
+ inline const SwPageFrm *GetSelPage() const { return mpSelPage; }
+
+ void DisposePage(const SwPageFrm *pPageFrm );
+};
+
// real states for events
#define ACC_STATE_EDITABLE 0x01
#define ACC_STATE_OPAQUE 0x02
// pseudo states for events
+// --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
+#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
+// <--
#define ACC_STATE_CARET 0x80
#define ACC_STATE_RELATION_FROM 0x40
#define ACC_STATE_RELATION_TO 0x20
@@ -105,6 +177,10 @@ class SwAccPreviewData;
#define ACC_STATE_MASK 0x1F
+// --> OD 2005-12-12 #i27301# - introduce type definition of states
+typedef sal_uInt16 tAccessibleStates;
+// <--
+
class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
public accessibility::IAccessibleParent
{
@@ -115,6 +191,10 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
SwShapeList_Impl *mpShapes;
SwAccessibleEventList_Impl *mpEvents;
SwAccessibleEventMap_Impl *mpEventMap;
+ // --> OD 2005-12-13 #i27301# - data structure to keep information about
+ // accessible paragraph, which have a selection.
+ SwAccessibleSelectedParas_Impl* mpSelectedParas;
+ // <--
ViewShell *mpVSh;
/// for page preview: store preview data, VisArea, and mapping of
/// preview-to-display coordinates
@@ -146,6 +226,16 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
::com::sun::star::accessibility::XAccessible>
_GetDocumentView( sal_Bool bPagePreview );
+ /** method to build up a new data structure of the accessible pararaphs,
+ which have a selection
+
+ OD 2005-12-13 #i27301#
+ Important note: method has to used inside a mutual exclusive section
+
+ @author OD
+ */
+ SwAccessibleSelectedParas_Impl* _BuildSelectedParas();
+
public:
SwAccessibleMap( ViewShell *pSh );
@@ -181,8 +271,19 @@ public:
SwAccessibleContext *pParentImpl,
sal_Bool bCreate = sal_True );
- ViewShell *GetShell() const { return mpVSh; }
- inline const SwRect& GetVisArea() const;
+ inline ViewShell* GetShell() const
+ {
+ return mpVSh;
+ }
+
+ inline const SwRect& GetVisArea() const
+ {
+ DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
+ "preview without preview data?" );
+ return GetShell()->IsPreView()
+ ? mpPreview->GetVisArea()
+ : GetShell()->VisArea();
+ }
/** get size of a dedicated preview page
@@ -219,10 +320,45 @@ public:
// Invalidate state of whole tree. If an action is open, this call
// is processed when the last action ends.
- void InvalidateStates( sal_uInt8 nStates, const SwFrm *pFrm=0 );
+ // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ void InvalidateStates( tAccessibleStates _nStates,
+ const SwFrm* _pFrm = 0 );
void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow );
+ /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+
+ @param _rTxtFrm
+ input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO
+ has to be invalidated.
+
+ @param _bFrom
+ input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM
+ (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated.
+ */
+ void InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
+ const bool _bFrom );
+
+ /** invalidation of text selection of a paragraph
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+ */
+ void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
+
+ /** invalidation of text selection of all paragraphs
+
+ OD 2005-12-13 #i27301#
+
+ @author OD
+ */
+ void InvalidateTextSelectionOfAllParas();
+
// update preview data (and fire events if necessary)
// OD 15.01.2003 #103492# - complete re-factoring of method due to new
// page/print preview functionality.
@@ -283,81 +419,4 @@ private:
void GetMapMode( const Point& _rPoint,
MapMode& _orMapMode ) const;
};
-
-
-
-// helper class that stores preview data
-class SwAccPreviewData
-{
- typedef std::vector<Rectangle> Rectangles;
- Rectangles maPreviewRects;
- Rectangles maLogicRects;
-
- SwRect maVisArea;
- Fraction maScale;
-
- const SwPageFrm *mpSelPage;
-
- /** adjust logic page retangle to its visible part
-
- OD 17.01.2003 #103492#
-
- @author OD
-
- @param _iorLogicPgSwRect
- input/output parameter - reference to the logic page rectangle, which
- has to be adjusted.
-
- @param _rPrevwPgSwRect
- input parameter - constant reference to the corresponding preview page
- rectangle; needed to determine the visible part of the logic page rectangle.
-
- @param _rPrevwWinSize
- input paramter - constant reference to the preview window size in TWIP;
- needed to determine the visible part of the logic page rectangle
- */
- void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
- const SwRect& _rPrevwPgSwRect,
- const Size& _rPrevwWinSize );
-
-public:
- SwAccPreviewData();
- ~SwAccPreviewData();
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void Update( const std::vector<PrevwPage*>& _rPrevwPages,
- const Fraction& _rScale,
- const SwPageFrm* _pSelectedPageFrm,
- const Size& _rPrevwWinSize );
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
-
- const SwRect& GetVisArea() const;
-
- MapMode GetMapModeForPreview( ) const;
-
- /** Adjust the MapMode so that the preview page appears at the
- * proper position. rPoint identifies the page for which the
- * MapMode should be adjusted. If bFromPreview is true, rPoint is
- * a preview coordinate; else it's a document coordinate. */
- // OD 17.01.2003 #103492# - delete unused 3rd parameter.
- void AdjustMapMode( MapMode& rMapMode,
- const Point& rPoint ) const;
-
- inline const SwPageFrm *GetSelPage() const { return mpSelPage; }
-
- void DisposePage(const SwPageFrm *pPageFrm );
-};
-
-
-
-inline const SwRect& SwAccessibleMap::GetVisArea() const
-{
- DBG_ASSERT( !mpVSh->IsPreView() || (mpPreview != NULL),
- "preview without preview data?" );
- return mpVSh->IsPreView() ? mpPreview->GetVisArea() : mpVSh->VisArea();
-}
#endif