diff options
author | Steve Yin <steve_y@apache.org> | 2013-11-29 13:03:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-02 10:25:33 +0000 |
commit | 76c549eb01dcb7b5bf28a271ce00e386f3d388ba (patch) | |
tree | bb09874a25b3b29c52556228abdf4aafb9ca6515 /sw/inc | |
parent | 84972949a3501003b0b6ad98f07f1b4ab83f3ca1 (diff) |
Integrate branch of IAccessible2
Conflicts:
everything
Change-Id: I9619634ee1e60d449025c006803da29c1e9d14b3
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/PostItMgr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/access.hrc | 5 | ||||
-rw-r--r-- | sw/inc/accmap.hxx | 45 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 5 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 38 | ||||
-rw-r--r-- | sw/inc/docsh.hxx | 6 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fldbas.hxx | 12 | ||||
-rw-r--r-- | sw/inc/frmfmt.hxx | 11 | ||||
-rw-r--r-- | sw/inc/index.hrc | 8 | ||||
-rw-r--r-- | sw/inc/mdiexp.hxx | 1 | ||||
-rw-r--r-- | sw/inc/ndole.hxx | 1 | ||||
-rw-r--r-- | sw/inc/node.hxx | 8 | ||||
-rw-r--r-- | sw/inc/tblsel.hxx | 3 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 1 |
15 files changed, 122 insertions, 26 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 4c38d4053f12..a87a9ba8c5c0 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -267,6 +267,8 @@ 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); + // get the PostIt window by index + sal_Int32 GetPostItCount() const {return mvPostItFlds.size();} void AssureStdModeAtShell(); void ConnectSidebarWinToFrm( const SwFrm& rFrm, diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index c2df846a2053..d42845fa5db7 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -50,8 +50,11 @@ #define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30) #define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31) +#define STR_ACCESS_FORMULA_TYPE (RC_ACCESS_BEGIN + 32) +#define STR_ACCESS_FORMULA_TEXT (RC_ACCESS_BEGIN + 33) +#define STR_ACCESS_FORMULA_TOOLBAR (RC_ACCESS_BEGIN + 34) -#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT +#define ACCESS_ACT_END STR_ACCESS_FORMULA_TOOLBAR #if ACCESS_ACT_END > RC_ACCESS_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 6df63884b7da..731518c57b0b 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -27,7 +27,12 @@ #include <svx/IAccessibleParent.hxx> #include <tools/fract.hxx> +#include <svx/AccessibleControlShape.hxx> +#include <svx/AccessibleShape.hxx> +#include "fesh.hxx" #include <vector> +#include <set> +class SwAccessibleParagraph; class SwViewShell; class Rectangle; @@ -69,8 +74,8 @@ class Window; typedef sal_uInt16 tAccessibleStates; -class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, - public accessibility::IAccessibleParent +class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, + public ::accessibility::IAccessibleParent { mutable ::osl::Mutex maMutex; ::osl::Mutex maEventMutex; @@ -103,10 +108,15 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, void InvalidateCursorPosition( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rAcc ); - void DoInvalidateShapeSelection(); - void DoInvalidateShapeFocus(); + void DoInvalidateShapeSelection(sal_Bool bInvalidateFocusMode = sal_False); + void InvalidateShapeSelection(); + //mpSelectedFrmMap contains the old selected objects. + SwAccessibleContextMap_Impl *mpSeletedFrmMap; + //IvalidateShapeInParaSelection() method is reponsible for the updating the selected states of the objects. + void InvalidateShapeInParaSelection(); + void _InvalidateRelationSet( const SwFrm* pFrm, bool bFrom ); ::com::sun::star::uno::Reference< @@ -159,6 +169,13 @@ public: { return mpVSh; } + sal_Bool IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh); + void AddShapeContext(const SdrObject *pObj, + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccShape); + + void AddGroupContext(const SdrObject *pParentObj, + ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent); + void RemoveGroupContext(const SdrObject *pParentObj, ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent); const SwRect& GetVisArea() const; @@ -193,7 +210,9 @@ public: void InvalidateCursorPosition( const SwFrm *pFrm ); void InvalidateFocus(); - + void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage); + void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); + void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); void SetCursorContext( const ::rtl::Reference < SwAccessibleContext >& rCursorContext ); @@ -262,6 +281,12 @@ public: const long _nIndex, const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo ) throw (::com::sun::star::uno::RuntimeException); + virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel + (::com::sun::star::beans::XPropertySet* pSet) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessibleCaption ( + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) + throw (::com::sun::star::uno::RuntimeException); // additional Core/Pixel conversions for internal use; also works // for preview @@ -290,6 +315,16 @@ private: */ void GetMapMode( const Point& _rPoint, MapMode& _orMapMode ) const; +public: + virtual sal_Bool IsDocumentSelAll(); + + ::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible > + GetCursorContext() const { return mxCursorContext; } + + //Para Container for InvalidateCursorPosition + typedef std::set< SwAccessibleParagraph* > SET_PARA; + SET_PARA m_setParaAdd; + SET_PARA m_setParaRemove; }; #endif diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index ddc4f2b4e601..0e3c06b14edf 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -824,6 +824,11 @@ public: // is cursor or the point in/over a right to left formatted text? sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const; + void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage); + SwFrm* oldColFrm; + bool bColumnChange(); + void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); + void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); // If the current cursor position is inside a hidden range, the hidden range // is selected and true is returned: bool SelectHiddenRange(); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 58980778849d..217590ce8f8a 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -466,6 +466,7 @@ private: bool mbClipBoard : 1; ///< TRUE: this document represents the clipboard bool mbColumnSelection : 1; /**< TRUE: this content has bee created by a column selection (clipboard docs only) */ + bool mbIsPrepareSelAll : 1; #ifdef DBG_UTIL bool mbXMLExport : 1; ///< sal_True: during XML export @@ -683,17 +684,21 @@ private: void DoUpdateAllCharts(); DECL_LINK( DoUpdateModifiedOLE, Timer * ); - SwFmt *_MakeCharFmt(const OUString &, SwFmt *, bool, bool ); - SwFmt *_MakeFrmFmt(const OUString &, SwFmt *, bool, bool ); - SwFmt *_MakeTxtFmtColl(const OUString &, SwFmt *, bool, bool ); + SwFmt *_MakeCharFmt(const OUString &, SwFmt *, bool, bool ); + SwFmt *_MakeFrmFmt(const OUString &, SwFmt *, bool, bool ); + SwFmt *_MakeTxtFmtColl(const OUString &, SwFmt *, bool, bool ); - void InitTOXTypes(); - void Paste( const SwDoc& ); - bool DeleteAndJoinImpl(SwPaM&, const bool); - bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false); - bool DeleteRangeImpl(SwPaM&, const bool unused = false); - bool DeleteRangeImplImpl(SwPaM &); - bool ReplaceRangeImpl(SwPaM&, OUString const&, const bool); +private: + sal_Bool mbReadOnly; + OUString msDocAccTitle; + + void InitTOXTypes(); + void Paste( const SwDoc& ); + bool DeleteAndJoinImpl(SwPaM&, const bool); + bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false); + bool DeleteRangeImpl(SwPaM&, const bool unused = false); + bool DeleteRangeImplImpl(SwPaM &); + bool ReplaceRangeImpl(SwPaM&, OUString const&, const bool); public: @@ -702,7 +707,7 @@ public: SwDoc(); ~SwDoc(); - inline bool IsInDtor() const { return mbDtor; } + bool IsInDtor() const { return mbDtor; } /* @@@MAINTAINABILITY-HORROR@@@ Implementation details made public. @@ -1015,6 +1020,11 @@ public: ::sw::tExternalDataPointer pPayload); virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType); + virtual void setDocReadOnly( sal_Bool b) { mbReadOnly = b; } + virtual sal_Bool getDocReadOnly() const { return mbReadOnly; } + virtual void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; } + virtual const OUString getDocAccTitle() const { return msDocAccTitle; } + /** INextInterface here */ @@ -1031,6 +1041,12 @@ public: bool InXMLExport() const { return mbXMLExport; } void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; } #endif + void SetSelAll( bool bSel ) + { + mbIsPrepareSelAll = bSel; + } + bool IsPrepareSelAll() const { return mbIsPrepareSelAll; } + void SetPrepareSelAll() { mbIsPrepareSelAll = true; } void SetContainsAtPageObjWithContentAnchor( const bool bFlag ) { diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 9c8f841a0dae..267060338d7a 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -283,6 +283,12 @@ public: read by the binary filter: */ virtual void UpdateLinks(); + virtual void setDocAccTitle( const OUString& rTitle ); + virtual const OUString getDocAccTitle() const; + + void setDocReadOnly( bool bReadOnly); + bool getDocReadOnly() const; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > GetController(); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 9daebe88256a..8f16c0de0382 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -460,6 +460,8 @@ public: sal_uInt16 IsObjSelected() const; ///< @return object count, but doesn't count the objects in groups. sal_Bool IsObjSelected( const SdrObject& rObj ) const; + sal_Bool IsObjSameLevelWithMarked(const SdrObject* pObj) const; + const SdrMarkList* GetMarkList() const{ return _GetMarkList(); }; void EndTextEdit(); ///< Deletes object if required. diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 453d2468e866..1e2091840207 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -126,8 +126,16 @@ enum SwFldTypesEnum TYP_DROPDOWN, TYP_END }; - - +enum SwAttrFieldTYpe +{ + ATTR_NONE, + ATTR_DATEFLD, + ATTR_TIMEFLD, + ATTR_PAGENUMBERFLD, + ATTR_PAGECOOUNTFLD, + ATTR_BOOKMARKFLD, + ATTR_SETREFATTRFLD +}; enum SwFileNameFormat { FF_BEGIN, diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index aa86dce5da9f..1b26316d7ee6 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -44,11 +44,13 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt ::com::sun::star::uno::XInterface> m_wXObject; protected: + SwFrmFmt* pCaptionFmt; SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT, const sal_uInt16* pWhichRange = 0 ) : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich ) + ,pCaptionFmt( NULL ) {} SwFrmFmt( SwAttrPool& rPool, const OUString &rFmtNm, @@ -56,9 +58,10 @@ protected: const sal_uInt16* pWhichRange = 0 ) : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich ) + ,pCaptionFmt( NULL ) {} - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); + virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); public: TYPEINFO(); ///< Already in base class Client. @@ -122,6 +125,10 @@ public: virtual OUString GetDescription() const; + sal_Bool HasCaption() const; + void SetCaptionFmt(SwFrmFmt* pFmt); + SwFrmFmt* GetCaptionFmt() const; + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface> const& GetXObject() const { return m_wXObject; } @@ -138,6 +145,8 @@ public: class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt { friend class SwDoc; + OUString msTitle; + OUString msDesc; /** Both not existent. it stores the previous position of Prt rectangle from RequestObjectResize diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc index bdb77968a19e..192e3c108d26 100644 --- a/sw/inc/index.hrc +++ b/sw/inc/index.hrc @@ -68,9 +68,11 @@ #define STR_TOKEN_HELP_LINK_END (STR_BUTTON_HELP_TEXT_START + 8) #define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9) -#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1) - - +#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1) +#define STR_STRUCTURE (STR_TOKEN_HELP_AUTHORITY + 2) +#define STR_ADDITIONAL_ACCNAME_STRING1 (STR_TOKEN_HELP_AUTHORITY + 3) +#define STR_ADDITIONAL_ACCNAME_STRING2 (STR_TOKEN_HELP_AUTHORITY + 4) +#define STR_ADDITIONAL_ACCNAME_STRING3 (STR_TOKEN_HELP_AUTHORITY + 5) #endif // _INDEX_HRC diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index e3319e5175f8..fe7b902de44b 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -65,6 +65,7 @@ TblChgMode GetTblChgDefaultMode(); bool JumpToSwMark( SwViewShell* pVwSh, const OUString& rMark ); +extern void AccessibilityScrollMDI(SwViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_uInt16 nRangeY, sal_Bool isLeftTop); #endif diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx index 6f027279f426..423f41bd1507 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -61,6 +61,7 @@ public: const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef(); svt::EmbeddedObjectRef& GetObject(); OUString GetCurrentPersistName() const { return aName; } + OUString GetStyleString(); sal_Bool IsOleRef() const; ///< To avoid unneccessary loading of object. }; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 93ebc5cfd330..ee28196e338a 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -422,8 +422,12 @@ public: void MakeFrms( SwCntntNode& rNode ); /** Method deletes all views of document for the node. The content- - frames are removed from the respective layout. */ - void DelFrms(); + frames are removed from the respective layout. + + Add an input param to identify if acc table should be disposed + */ + void DelFrms( sal_Bool bNeedDel = sal_False, sal_Bool bIsAccTableDispose = sal_True ); + /** @return count of elements of node content. Default is 1. There are differences between text node and formula node. */ diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 9c6cda63ddc1..62322abdae43 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -178,7 +178,8 @@ public: void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ); void SetTableLines( const SwTable &rTable ); - void DelFrms ( SwTable &rTable ); + //Add an input param to identify if acc table should be disposed + void DelFrms ( SwTable &rTable,sal_Bool bAccTableDispose = sal_False ); void MakeFrms( SwTable &rTable ); void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, const sal_Bool bBehind ); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index fd314eb2e7f5..ccd63e557fa6 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -352,6 +352,7 @@ public: inline Window* GetWin() const { return mpWin; } inline OutputDevice* GetOut() const { return mpOut; } + void SetWin(Window* win) { mpWin = win; } static inline sal_Bool IsLstEndAction() { return SwViewShell::mbLstAct; } // Change of all page descriptors. |