summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <od@openoffice.org>2010-02-02 15:11:26 +0100
committerOliver-Rainer Wittmann <od@openoffice.org>2010-02-02 15:11:26 +0100
commit84a72b88e50b60765fadd00c8caa73112a7e5830 (patch)
tree7407bab76e6161e81cbf1cd62fb36ebe4e247ea1 /sw/inc
parentbb1a225066bc5a57f5a194e6f4dfd585a6d5a30e (diff)
sw33a11y01: #i88070# - accessible Writer comments - part 1
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/AnnotationWin.hxx6
-rw-r--r--sw/inc/PostItMgr.hxx35
-rw-r--r--sw/inc/SidebarWin.hxx12
-rw-r--r--sw/inc/accmap.hxx91
-rw-r--r--sw/inc/postithelper.hxx16
-rw-r--r--sw/inc/viewsh.hxx10
6 files changed, 60 insertions, 110 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 38388fd8e985..ef39ad6e4c8f 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -35,6 +35,7 @@
#include <SidebarWin.hxx>
class PopupMenu;
+class OutlinerParaObject;
namespace sw { namespace annotation {
@@ -43,9 +44,10 @@ class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
public:
SwAnnotationWin( SwEditWin& rEditWin,
WinBits nBits,
- SwFmtFld* aField,
SwPostItMgr& aMgr,
- SwPostItBits aBits );
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem,
+ SwFmtFld* aField );
virtual ~SwAnnotationWin();
virtual void UpdateData();
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 8b2e85945989..48249b794f43 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -62,8 +62,11 @@ namespace sw { namespace annotation {
}}
namespace sw { namespace sidebarwindows {
class SwSidebarWin;
+ class SwFrmSidebarWinContainer;
}}
class SwSidebarItem;
+class SwFrm;
+class Window;
#define SORT_POS 1
#define SORT_AUTHOR 2
@@ -108,23 +111,23 @@ struct FieldShadowState
class SwNoteProps: public utl::ConfigItem
{
private:
- bool bIsShowAnkor;
+ bool bIsShowAnchor;
public:
SwNoteProps()
: ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
- , bIsShowAnkor(false)
+ , bIsShowAnchor(false)
{
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames();
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames);
const ::com::sun::star::uno::Any* pValues = aValues.getConstArray();
DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
if (aValues.getLength())
- pValues[0]>>=bIsShowAnkor;
+ pValues[0]>>=bIsShowAnchor;
}
- bool IsShowAnkor()
+ bool IsShowAnchor()
{
- return bIsShowAnkor;
+ return bIsShowAnchor;
}
::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
{
@@ -163,7 +166,10 @@ class SwPostItMgr: public SfxListener
bool mbDeleteNote;
FieldShadowState mShadowState;
OutlinerParaObject* mpAnswer;
- bool mpIsShowAnkor;
+ bool mbIsShowAnchor;
+
+ // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances.
+ sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer;
typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator;
@@ -216,7 +222,7 @@ class SwPostItMgr: public SfxListener
bool ShowScrollbar(const unsigned long aPage) const;
bool HasNotes() const ;
bool ShowNotes() const;
- bool IsShowAnkor() { return mpIsShowAnkor;}
+ bool IsShowAnchor() { return mbIsShowAnchor;}
unsigned long GetSidebarWidth(bool bPx = false) const;
unsigned long GetSidebarBorderWidth(bool bPx = false) const;
unsigned long GetNoteWidth();
@@ -265,7 +271,7 @@ class SwPostItMgr: public SfxListener
Color GetColorDark(sal_uInt16 aAuthorIndex);
Color GetColorLight(sal_uInt16 aAuthorIndex);
- Color GetColorAnkor(sal_uInt16 aAuthorIndex);
+ Color GetColorAnchor(sal_uInt16 aAuthorIndex);
bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const;
@@ -278,7 +284,18 @@ class SwPostItMgr: public SfxListener
sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
- void AssureStdModeAtShell();
+ void AssureStdModeAtShell();
+
+ void ConnectSidebarWinToFrm( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ void DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ bool HasFrmConnectedSidebarWins( const SwFrm& rFrm );
+ Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
+ const sal_Int32 nIndex );
+ void GetAllSidebarWinForFrm( const SwFrm& rFrm,
+ std::vector< Window* >* pChildren );
};
#endif
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index c7b81cf1d18f..abeba2e2c6aa 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -47,7 +47,6 @@
class SwPostItMgr;
class SwPostItField;
-class SwFmtFld;
class OutlinerView;
class Outliner;
class ScrollBar;
@@ -56,7 +55,8 @@ class SwView;
class Edit;
class MenuButton;
//class SwRedline;
-class OutlinerParaObject;
+class SwFrm;
+
namespace sw { namespace sidebarwindows {
@@ -75,7 +75,8 @@ class SwSidebarWin : public Window
SwSidebarWin( SwEditWin& rEditWin,
WinBits nBits,
SwPostItMgr& aMgr,
- SwPostItBits aBits );
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem );
virtual ~SwSidebarWin();
void SetSize( const Size& rNewSize );
@@ -175,6 +176,9 @@ class SwSidebarWin : public Window
void SetLanguage(const SvxLanguageItem aNewItem);
+ void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
protected:
virtual void DataChanged( const DataChangedEvent& aEvent);
virtual void LoseFocus();
@@ -232,6 +236,8 @@ class SwSidebarWin : public Window
bool mbReadonly;
bool mbIsFollow;
+
+ SwSidebarItem& mrSidebarItem;
};
} } // eof namespace sw::sidebarwindows
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index ba18cf599872..ce8ffa4514bf 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -36,14 +36,15 @@
#include <vos/mutex.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
#include <svx/IAccessibleParent.hxx>
-#include "viewsh.hxx"
#include <tools/debug.hxx>
#include <tools/fract.hxx>
#include <vector>
+class ViewShell;
class Rectangle;
class SwFrm;
+class SwTxtFrm;
class SwPageFrm;
class SwAccessibleContext;
class SwAccessibleContextMap_Impl;
@@ -51,85 +52,18 @@ class SwAccessibleEventList_Impl;
class SwAccessibleEventMap_Impl;
class SwShapeList_Impl;
class SdrObject;
-namespace accessibility { class AccessibleShape; }
+namespace accessibility {
+ class AccessibleShape;
+}
class SwAccessibleShapeMap_Impl;
struct SwAccessibleEvent_Impl;
-// --> OD 2005-12-13 #i27301#
class SwAccessibleSelectedParas_Impl;
-// <--
class SwRect;
class MapMode;
class SwAccPreviewData;
-// OD 14.01.2003 #103492#
-#ifndef _PREVWPAGE_HXX
-#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 );
-};
+struct PrevwPage;
+class Window;
+class SwFmtFld;
// real states for events
#define ACC_STATE_EDITABLE 0x01
@@ -249,14 +183,7 @@ public:
return mpVSh;
}
- inline const SwRect& GetVisArea() const
- {
- DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
- "preview without preview data?" );
- return GetShell()->IsPreView()
- ? mpPreview->GetVisArea()
- : GetShell()->VisArea();
- }
+ const SwRect& GetVisArea() const;
/** get size of a dedicated preview page
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 5d9d58ed75d7..4f9d04dc4ab7 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -54,7 +54,7 @@ typedef sal_Int64 SwPostItBits;
struct SwLayoutInfo
{
- SwFrm* mpAssociatedFrm;
+ const SwFrm* mpAnchorFrm;
SwRect mPosition;
SwRect mPageFrame;
SwRect mPagePrtArea;
@@ -63,7 +63,7 @@ struct SwLayoutInfo
USHORT mRedlineAuthor;
SwLayoutInfo()
- : mpAssociatedFrm(0)
+ : mpAnchorFrm(0)
, mPosition()
, mPageFrame()
, mPagePrtArea()
@@ -106,9 +106,9 @@ public:
, maLayoutInfo()
{}
virtual ~SwSidebarItem(){}
- virtual SwPosition GetPosition() = 0;
+ virtual SwPosition GetAnchorPosition() const = 0;
virtual bool UseElement() = 0;
- virtual SwFmtFld* GetFmtFld() = 0;
+ virtual SwFmtFld* GetFmtFld() const = 0;
virtual SfxBroadcaster* GetBroadCaster() const = 0;
virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
WinBits nBits,
@@ -126,9 +126,9 @@ public:
: SwSidebarItem(aShow,aFocus),
pRedline(pRed) {}
virtual ~SwRedCommentItem() {}
- virtual SwPosition GetPosition();
+ virtual SwPosition GetAnchorPosition() const;
virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() {return 0; }
+ virtual SwFmtFld* GetFmtFld() const {return 0; }
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
WinBits nBits,
@@ -150,9 +150,9 @@ class SwAnnotationItem: public SwSidebarItem
, pFmtFld(p)
{}
virtual ~SwAnnotationItem() {}
- virtual SwPosition GetPosition();
+ virtual SwPosition GetAnchorPosition() const;
virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() {return pFmtFld;}
+ virtual SwFmtFld* GetFmtFld() const {return pFmtFld;}
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
WinBits nBits,
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 7a8d0eb0c273..abf2111edc6b 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -78,19 +78,15 @@ struct ShellResource;
class SwRegionRects;
class SwFrm;
class SvtAccessibilityOptions;
-// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
-// --> OD 2005-12-01 #i27138#
class SwTxtFrm;
-// <--
class BitmapEx;
struct SwAccessibilityOptions;
class Region;
class SwPostItMgr;
-
-// #i74769#
class SdrPaintWindow;
+class SwAccessibleMap;
//JP 19.07.98: - Bug 52312
// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
@@ -266,7 +262,7 @@ public:
sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
- const SwRect &VisArea() const { return aVisArea; }
+ const SwRect& VisArea() const { return aVisArea; }
//Es wird, wenn notwendig, soweit gescrollt, dass das
//uebergebene Rect im sichtbaren Ausschnitt liegt.
void MakeVisible( const SwRect & );
@@ -575,6 +571,8 @@ public:
*/
void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+ SwAccessibleMap* GetAccessibleMap();
+
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
long nFlags = 0 );
ViewShell( SwDoc& rDoc, Window *pWin,