diff options
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 132 | ||||
-rw-r--r-- | sw/inc/PostItMgr.hxx | 4 | ||||
-rw-r--r-- | sw/inc/access.hrc | 5 | ||||
-rw-r--r-- | sw/inc/accmap.hxx | 59 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 50 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 40 | ||||
-rw-r--r-- | sw/inc/docsh.hxx | 6 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 7 | ||||
-rw-r--r-- | sw/inc/expfld.hxx | 40 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/fldbas.hxx | 21 | ||||
-rw-r--r-- | sw/inc/fmtfld.hxx | 30 | ||||
-rw-r--r-- | sw/inc/frmfmt.hxx | 18 | ||||
-rw-r--r-- | sw/inc/hintids.hxx | 12 | ||||
-rw-r--r-- | sw/inc/mdiexp.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ndole.hxx | 3 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 102 | ||||
-rw-r--r-- | sw/inc/node.hxx | 7 | ||||
-rw-r--r-- | sw/inc/tblsel.hxx | 6 | ||||
-rw-r--r-- | sw/inc/txatbase.hxx | 22 | ||||
-rw-r--r-- | sw/inc/txtfld.hxx | 75 | ||||
-rw-r--r-- | sw/inc/txtrfmrk.hxx | 1 | ||||
-rw-r--r-- | sw/inc/txttxmrk.hxx | 1 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/viscrs.hxx | 20 |
25 files changed, 431 insertions, 240 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 82fdb9caa405..e82b3f82d204 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -21,36 +21,37 @@ - #ifndef IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED - #define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED - - #ifndef _SAL_TYPES_H_ - #include <sal/types.h> - #endif - - class SwPaM; - struct SwPosition; - class SwNode; - class SwNodeRange; - class String; - class Graphic; - class SfxItemSet; - class SfxPoolItem; - class GraphicObject; - class SdrObject; - class SwFrmFmt; - class SwDrawFrmFmt; - class SwFlyFrmFmt; - class SwNodeIndex; - - namespace utl { class TransliterationWrapper; } - namespace svt { class EmbeddedObjectRef; } - - /** Text operation/manipulation interface - */ - class IDocumentContentOperations - { - public: +#ifndef IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED +#define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED + +#ifndef _SAL_TYPES_H_ +#include <sal/types.h> +#endif + +class SwPaM; +struct SwPosition; +class SwNode; +class SwNodeRange; +class String; +class Graphic; +class SfxItemSet; +class SfxPoolItem; +class GraphicObject; +class SdrObject; +class SwFrmFmt; +class SwDrawFrmFmt; +class SwFlyFrmFmt; +class SwNodeIndex; +class SwFmtFld; + +namespace utl { class TransliterationWrapper; } +namespace svt { class EmbeddedObjectRef; } + +/** Text operation/manipulation interface +*/ +class IDocumentContentOperations +{ +public: enum SwMoveFlags { DOC_MOVEDEFAULT = 0x00, @@ -68,9 +69,9 @@ , INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position }; - public: +public: /** Kopieren eines Bereiches im oder in ein anderes Dokument ! - Die Position kann auch im Bereich liegen !! + Die Position kann auch im Bereich liegen !! */ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0; @@ -88,12 +89,12 @@ /** complete delete of a given PaM - OD 2009-08-20 #i100466# - Add optional parameter <bForceJoinNext>, default value <false> - Needed for hiding of deletion redlines + OD 2009-08-20 #i100466# + Add optional parameter <bForceJoinNext>, default value <false> + Needed for hiding of deletion redlines */ virtual bool DeleteAndJoin( SwPaM&, - const bool bForceJoinNext = false ) = 0; + const bool bForceJoinNext = false ) = 0; /** verschieben eines Bereiches */ @@ -114,7 +115,7 @@ /** Insert string into existing text node at position rRg.Point(). */ virtual bool InsertString(const SwPaM &rRg, const String&, - const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0; + const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0; /** change text to Upper/Lower/Hiragana/Katagana/... */ @@ -123,29 +124,29 @@ /** Einfuegen einer Grafik, Formel. Die XXXX werden kopiert. */ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, - const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; + const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; /** */ virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; + const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; /** austauschen einer Grafik (mit Undo) */ virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0; /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel - angemeldet sein. + angemeldet sein. */ virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0; /** Einfuegen von OLE-Objecten. */ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; + const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; + const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; /** Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert) */ @@ -156,45 +157,48 @@ virtual bool AppendTxtNode(SwPosition& rPos) = 0; /** Ersetz einen selektierten Bereich in einem TextNode mit dem - String. Ist fuers Suchen&Ersetzen gedacht. - bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String - ein ( nicht \& ) - z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&" - --> "xx\t<Tab>..zzz..&" + String. Ist fuers Suchen&Ersetzen gedacht. + bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String + ein ( nicht \& ) + z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&" + --> "xx\t<Tab>..zzz..&" */ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr, - const bool bRegExReplace) = 0; + const bool bRegExReplace) = 0; /** Einfuegen eines Attributs. Erstreckt sich rRg ueber - mehrere Nodes, wird das Attribut aufgespaltet, sofern - dieses Sinn macht. Nodes, in denen dieses Attribut keinen - Sinn macht, werden ignoriert. In vollstaendig in der - Selektion eingeschlossenen Nodes wird das Attribut zu - harter Formatierung, in den anderen (Text-)Nodes wird das - Attribut in das Attributearray eingefuegt. Bei einem - Zeichenattribut wird ein "leerer" Hint eingefuegt, - wenn keine Selektion - vorliegt; andernfalls wird das Attribut als harte - Formatierung dem durch rRg.Start() bezeichneten Node - hinzugefuegt. Wenn das Attribut nicht eingefuegt werden - konnte, liefert die Methode sal_False. + mehrere Nodes, wird das Attribut aufgespaltet, sofern + dieses Sinn macht. Nodes, in denen dieses Attribut keinen + Sinn macht, werden ignoriert. In vollstaendig in der + Selektion eingeschlossenen Nodes wird das Attribut zu + harter Formatierung, in den anderen (Text-)Nodes wird das + Attribut in das Attributearray eingefuegt. Bei einem + Zeichenattribut wird ein "leerer" Hint eingefuegt, + wenn keine Selektion + vorliegt; andernfalls wird das Attribut als harte + Formatierung dem durch rRg.Start() bezeichneten Node + hinzugefuegt. Wenn das Attribut nicht eingefuegt werden + konnte, liefert die Methode sal_False. */ //Modify here for #119405, by chengjh, 2012-08-16 //Add a para for the char attribute exp... - virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, - const sal_uInt16 nFlags,bool bExpandCharToPara=false) = 0; + virtual bool InsertPoolItem( + const SwPaM &rRg, + const SfxPoolItem&, + const sal_uInt16 nFlags, + const bool bExpandCharToPara=false ) = 0; //End /** */ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, - const sal_uInt16 nFlags) = 0; + const sal_uInt16 nFlags) = 0; /** Removes any leading white space from the paragraph */ virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ) = 0; - protected: +protected: virtual ~IDocumentContentOperations() {}; }; diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 139bfdbc1bb3..4e8e885c3925 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -282,6 +282,10 @@ 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); + //IAccessibility2 Implementation 2009----- + // get the PostIt window by index + sal_Int32 GetPostItCount() {return mvPostItFlds.size();}; + //-----IAccessibility2 Implementation 2009 void AssureStdModeAtShell(); void ConnectSidebarWinToFrm( const SwFrm& rFrm, diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc index b6e83ee49a1b..43c3f4f0fc00 100644 --- a/sw/inc/access.hrc +++ b/sw/inc/access.hrc @@ -59,9 +59,12 @@ #define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29) #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) //-----IAccessibility2 Implementation 2009 -#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 a74534bd13b8..6b935cf89755 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -32,7 +32,14 @@ #include <tools/debug.hxx> #include <tools/fract.hxx> +//IAccessibility2 Implementation 2009----- +#include <svx/AccessibleControlShape.hxx> +#include <svx/AccessibleShape.hxx> +#include "fesh.hxx" #include <vector> +#include <set> +class SwAccessibleParagraph; +//-----IAccessibility2 Implementation 2009 class ViewShell; class Rectangle; @@ -80,8 +87,8 @@ class Window; typedef sal_uInt16 tAccessibleStates; // <-- -class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, - public accessibility::IAccessibleParent +class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder, + public ::accessibility::IAccessibleParent { mutable ::vos::OMutex maMutex; ::vos::OMutex maEventMutex; @@ -115,10 +122,19 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, void InvalidateCursorPosition( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rAcc ); - void DoInvalidateShapeSelection(); - void DoInvalidateShapeFocus(); + //IAccessibility2 Implementation 2009----- + void DoInvalidateShapeSelection(sal_Bool bInvalidateFocusMode = sal_False); + + //Replace by DoInvalidateShapeSelection + //void DoInvalidateShapeFocus(); 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(); + //-----IAccessibility2 Implementation 2009 + void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom ); ::com::sun::star::uno::Reference< @@ -174,6 +190,15 @@ public: { return mpVSh; } + //IAccessibility2 Implementation 2009----- + 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); + //-----IAccessibility2 Implementation 2009 const SwRect& GetVisArea() const; @@ -214,7 +239,11 @@ public: void InvalidateCursorPosition( const SwFrm *pFrm ); void InvalidateFocus(); - + //IAccessibility2 Implementation 2009----- + void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage); + void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); + void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); + //-----IAccessibility2 Implementation 2009 void SetCursorContext( const ::vos::ORef < SwAccessibleContext >& rCursorContext ); @@ -292,6 +321,14 @@ public: const long _nIndex, const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo ) throw (::com::sun::star::uno::RuntimeException); + //IAccessibility2 Implementation 2009----- + 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); + //-----IAccessibility2 Implementation 2009 // additional Core/Pixel conversions for internal use; also works // for preview @@ -321,5 +358,17 @@ private: */ void GetMapMode( const Point& _rPoint, MapMode& _orMapMode ) const; +//IAccessibility2 Implementation 2009----- +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; + //-----IAccessibility2 Implementation 2009 }; #endif diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 0bd9571ec5ce..2b25d5d50da6 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -69,10 +69,9 @@ class SwCellFrms; class SwTOXMark; class SwRedline; class IBlockCursor; -class SwCntntNode; // #i23726# -// --> OD 2008-06-19 #i90516# +class SwCntntNode; class SwPostItField; -// <-- +class SwTxtFld; struct SwPosition; namespace com { namespace sun { namespace star { namespace util { @@ -218,10 +217,8 @@ private: sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst - // --> OD 2008-04-02 #refactorlists# String sMarkedListId; int nMarkedListLevel; - // <-- sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv" sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar @@ -249,9 +246,9 @@ private: // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true) bool mbMacroExecAllowed : 1; - SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags - =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE, - sal_Bool bIdleEnd = sal_False ); + SW_DLLPRIVATE void UpdateCrsr( + sal_uInt16 eFlags = SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE, + sal_Bool bIdleEnd = sal_False ); SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ); @@ -731,12 +728,27 @@ public: inline void UnSetVisCrsr(); // springe zum nachsten/vorherigen Feld des entsprechenden Types - sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext, - sal_uInt16 nSubType = USHRT_MAX, - sal_uInt16 nResType = USHRT_MAX ); + sal_Bool MoveFldType( + const SwFieldType* pFldType, + const bool bNext, + const sal_uInt16 nResType = USHRT_MAX, + const bool bAddSetExpressionFldsToInputFlds = true ); // springe genau zu diesem Feld sal_Bool GotoFld( const SwFmtFld& rFld ); + SwTxtFld* GetTxtFldAtPos( + const SwPosition* pPos, + const bool bIncludeInputFldAtStart ) const; + SwField* GetFieldAtCrsr( + const SwPaM* pCrsr, + const bool bIncludeInputFldAtStart ) const; + SwField* GetCurFld( const bool bIncludeInputFldAtStart = false ) const; + bool CrsrInsideInputFld() const; + bool PosInsideInputFld( const SwPosition& rPos ) const; + bool DocPtInsideInputFld( const Point& rDocPt ) const; + xub_StrLen StartOfInputFldAtPos( const SwPosition& rPos ) const; + xub_StrLen EndOfInputFldAtPos( const SwPosition& rPos ) const; + // returne die Anzahl der Cursor im Ring (Flag besagt ob man nur // aufgepspannte haben will - sprich etwas selektiert ist (Basic)) sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const; @@ -826,15 +838,14 @@ public: sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr ); const SwFmtINetFmt* FindINetAttr( const String& rName ) const; + sal_Bool SelectTxt( const xub_StrLen nStart, + const xub_StrLen nEnd ); + sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 ); void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); void ClearTblBoxCntnt(); sal_Bool EndAllTblBoxEdit(); - // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird, - // ohne das die UI davon etaws weiss - virtual void NewCoreSelection(); - void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; } sal_Bool IsSelTblCells() const { return bSelTblCells; } @@ -854,6 +865,13 @@ public: // is cursor or the point in/over a right to left formatted text? sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const; + //IAccessibility2 Implementation 2009----- + 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); + //-----IAccessibility2 Implementation 2009 // If the current cursor position is inside a hidden range, the hidden range // is selected and true is returned: bool SelectHiddenRange(); @@ -882,8 +900,6 @@ public: @return the textual description of the current selection */ String GetCrsrDescr() const; - - SwRect GetRectOfCurrentChar(); }; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ff6405bfc485..c0dba525e1cc 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -481,6 +481,9 @@ 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) + //IAccessibility2 Implementation 2009----- + sal_Bool bIsPrepareSelAll :1; + //-----IAccessibility2 Implementation 2009 #ifdef DBG_UTIL bool mbXMLExport : 1; // sal_True: during XML export @@ -701,6 +704,11 @@ private: SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool ); SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool ); +//IAccessibility2 Implementation 2009----- +private: + sal_Bool bReadOnly; + String msDocAccTitle; + void InitTOXTypes(); void Paste( const SwDoc& ); bool DeleteAndJoinImpl(SwPaM&, const bool); @@ -710,6 +718,12 @@ private: bool ReplaceRangeImpl(SwPaM&, String const&, const bool); public: + virtual void setDocReadOnly( sal_Bool b) { bReadOnly = b; } + virtual sal_Bool getDocReadOnly() const { return bReadOnly; } + virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; } + virtual const String getDocAccTitle() const { return msDocAccTitle; } + //-----IAccessibility2 Implementation 2009 + enum DocumentType { DOCTYPE_NATIVE, DOCTYPE_MSWORD //This doc medul is come from Ms Word @@ -853,13 +867,13 @@ public: @param rPos position to search at @return pointer to field at the given position or NULL in case no field is found */ - static SwField* GetField(const SwPosition& rPos); + static SwField* GetFieldAtPos(const SwPosition& rPos); /** Returns the field at a certain position. @param rPos position to search at @return pointer to field at the given position or NULL in case no field is found */ - static SwTxtFld* GetTxtFld(const SwPosition& rPos); + static SwTxtFld* GetTxtFldAtPos(const SwPosition& rPos); /** IDocumentContentOperations */ @@ -867,12 +881,10 @@ public: virtual void DeleteSection(SwNode* pNode); virtual bool DeleteRange(SwPaM&); virtual bool DelFullPara(SwPaM&); - // --> OD 2009-08-20 #i100466# // Add optional parameter <bForceJoinNext>, default value <false> // Needed for hiding of deletion redlines virtual bool DeleteAndJoin( SwPaM&, const bool bForceJoinNext = false ); - // <-- virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags); virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags); virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags); @@ -886,11 +898,13 @@ public: virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*); virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - //Modify here for #119405, by chengjh, 2012-08-16 - //Add a para for the char attribute exp... - virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, - const SetAttrMode nFlags,bool bExpandCharToPara=false); - //End + + virtual bool InsertPoolItem( + const SwPaM &rRg, + const SfxPoolItem&, + const SetAttrMode nFlags, + const bool bExpandCharToPara=false); + virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, const SetAttrMode nFlags); virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj); @@ -1049,6 +1063,14 @@ public: bool InXMLExport() const { return mbXMLExport; } void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; } #endif + //-----IAccessibility2 Implementation 2009 + void SetSelAll( sal_Bool bSel ) + { + bIsPrepareSelAll = bSel; + } + sal_Bool IsPrepareSelAll() { return bIsPrepareSelAll; } + void SetPrepareSelAll() { bIsPrepareSelAll = sal_True; } + //IAccessibility2 Implementation 2009----- void SetContainsAtPageObjWithContentAnchor( const bool bFlag ) { diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 76e24988169e..a9395dc59167 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -303,7 +303,13 @@ public: // read by the binary filter: virtual void UpdateLinks(); // <-- + //IAccessibility2 Implementation 2009----- + virtual void setDocAccTitle( const String& rTitle ); + virtual const String getDocAccTitle() const; + void setDocReadOnly( sal_Bool bReadOnly); + sal_Bool getDocReadOnly() const; + //-----IAccessibility2 Implementation 2009 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > GetController(); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 6c2a69c3e082..7f9d8c818957 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -54,7 +54,7 @@ class SfxPoolItem; class SfxItemSet; class SvxAutoCorrect; -class SwField; // fuer Felder +class SwField; class SwFieldType; class SwDDEFieldType; class SwNewDBMgr; @@ -256,8 +256,8 @@ public: sal_Bool GetCurAttr( SfxItemSet& , const bool bMergeIndentValuesOfNumRule = false ) const; // <-- - void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 ); - void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 ); + void SetAttrItem( const SfxPoolItem&, sal_uInt16 nFlags = 0 ); + void SetAttrSet( const SfxItemSet&, sal_uInt16 nFlags = 0 ); // Setze das Attribut als neues default Attribut im Dokument. void SetDefault( const SfxPoolItem& ); @@ -332,7 +332,6 @@ public: // Felder void Insert2(SwField&, const bool bForceExpandHints = false); - SwField* GetCurFld() const; void UpdateFlds( SwField & ); // ein einzelnes Feld diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index f5e2f6e95c79..784f0fb15919 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -312,20 +312,40 @@ public: class SW_DLLPUBLIC SwInputField : public SwField { - String aContent; - String aPText; - String aHelp; - String aToolTip; - sal_uInt16 nSubType; + mutable String aContent; + String aPText; + String aHelp; + String aToolTip; + sal_uInt16 nSubType; + bool mbIsFormField; + + SwFmtFld* mpFmtFld; // attribute to which the <SwInputField> belongs to virtual String Expand() const; virtual SwField* Copy() const; + // Accessing Input Field's content + const String& getContent() const; + public: // Direkte Eingabe ueber Dialog alten Wert loeschen - SwInputField(SwInputFieldType*, const String& rContent , - const String& rPrompt, sal_uInt16 nSubType = 0, - sal_uLong nFmt = 0); + SwInputField( + SwInputFieldType* pFieldType, + const String& rContent, + const String& rPrompt, + sal_uInt16 nSubType = 0, + sal_uLong nFmt = 0, + bool bIsFormField = true ); + virtual ~SwInputField(); + + void SetFmtFld( SwFmtFld& rFmtFld ); + SwFmtFld* GetFmtFld(); + + // Providing new Input Field's content: + // Fill Input Field's content depending on <nSupType>. + void applyFieldContent( const String& rNewFieldContent ); + + bool isFormField() const; virtual String GetFieldName() const; @@ -343,9 +363,7 @@ public: virtual String GetToolTip() const; virtual void SetToolTip(const String & rStr); - virtual sal_Bool isFormField() const; - - virtual sal_uInt16 GetSubType() const; + virtual sal_uInt16 GetSubType() const; virtual void SetSubType(sal_uInt16 nSub); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index aef64ebc19fd..59989a526abd 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -476,6 +476,10 @@ public: sal_uInt32 GetNumberOfSelectedObjects() const; //Liefert gleich die Anzahl der Objekte, zaehlt aber nicht die Objekte in Gruppen. sal_Bool IsObjSelected() const; sal_Bool IsObjSelected( const SdrObject& rObj ) const; + //IAccessibility2 Implementation 2009----- + bool IsObjSameLevelWithMarked(const SdrObject& rObj) const; + SdrObject* getSingleSelected() const; + //-----IAccessibility2 Implementation 2009 void EndTextEdit(); //Loescht ggf. das Objekt. diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 536da65ccc93..43d6d5bcd551 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -138,8 +138,18 @@ enum SwFldTypesEnum TYP_DROPDOWN, TYP_END }; - - +//IAccessibility2 Implementation 2009----- +enum SwAttrFieldTYpe +{ + ATTR_NONE, + ATTR_DATEFLD, + ATTR_TIMEFLD, + ATTR_PAGENUMBERFLD, + ATTR_PAGECOOUNTFLD, + ATTR_BOOKMARKFLD, + ATTR_SETREFATTRFLD +}; +//-----IAccessibility2 Implementation 2009 enum SwFileNameFormat { FF_BEGIN, @@ -298,6 +308,8 @@ class SW_DLLPUBLIC SwField { private: mutable String m_Cache; /// #i85766# cached expansion (for clipboard) + bool m_bUseFieldValueCache; /// control the usage of the cached field value + sal_uInt16 nLang; // Immer ueber SetLanguage aendern! sal_Bool bIsAutomaticLanguage; sal_uInt32 nFormat; @@ -310,7 +322,10 @@ private: protected: void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} - SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM); + SwField( SwFieldType* pTyp, + sal_uInt32 nFmt = 0, + sal_uInt16 nLang = LANGUAGE_SYSTEM, + bool m_bUseFieldValueCache = true ); public: virtual ~SwField(); diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index c5a6fb8fa7d2..661cdac01ec5 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -39,15 +39,13 @@ class SwFieldType; // ATT_FLD *********************************** class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster { - friend class SwTxtFld; friend void _InitCore(); + SwFmtFld( sal_uInt16 nWhich ); // for default-Attibute - SwField *pField; - SwTxtFld* pTxtAttr; // mein TextAttribut + SwField* mpField; + SwTxtFld* mpTxtFld; // the TextAttribute - SwFmtFld(); // das default-Attibut - // geschuetzter CopyCtor // @@@ copy construction allowed, but copy assignment is not? @@@ SwFmtFld& operator=(const SwFmtFld& rFld); @@ -72,11 +70,11 @@ public: const SwField* GetField() const { - return pField; + return mpField; } SwField* GetField() { - return pField; + return mpField; } // #111840# @@ -87,13 +85,23 @@ public: @attention The current field will be destroyed before setting the new field. */ - void SetFld(SwField * pField); + void SetField( SwField * pField ); + + + const SwTxtFld* GetTxtFld() const + { + return mpTxtFld; + } + SwTxtFld* GetTxtFld() + { + return mpTxtFld; + } + void SetTxtFld( SwTxtFld& rTxtFld ); + void ClearTxtFld(); - const SwTxtFld *GetTxtFld() const { return pTxtAttr; } - SwTxtFld *GetTxtFld() { return pTxtAttr; } void RegisterToFieldType( SwFieldType& ); - sal_Bool IsFldInDoc() const; + bool IsFldInDoc() const; sal_Bool IsProtect() const; }; diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 5becae28b4a8..67fd68a1a096 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -48,11 +48,17 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt ::com::sun::star::uno::XInterface> m_wXObject; protected: + //IAccessibility2 Implementation 2009----- + SwFrmFmt* pCaptionFmt; + //-----IAccessibility2 Implementation 2009 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 ) + //IAccessibility2 Implementation 2009----- + ,pCaptionFmt( NULL ) + //-----IAccessibility2 Implementation 2009 {} SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm, @@ -60,6 +66,9 @@ protected: const sal_uInt16* pWhichRange = 0 ) : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), pDrvdFrm, nFmtWhich ) + //IAccessibility2 Implementation 2009----- + ,pCaptionFmt( NULL ) + //-----IAccessibility2 Implementation 2009 {} virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); @@ -126,6 +135,11 @@ public: // <-- virtual String GetDescription() const; + //IAccessibility2 Implementation 2009----- + sal_Bool HasCaption() const; + void SetCaptionFmt(SwFrmFmt* pFmt); + SwFrmFmt* GetCaptionFmt() const; + //-----IAccessibility2 Implementation 2009 SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface> const& GetXObject() const @@ -143,6 +157,10 @@ public: class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt { friend class SwDoc; + //IAccessibility2 Implementation 2009----- + String msTitle; + String msDesc; + //-----IAccessibility2 Implementation 2009 // #i972: // it stores the previous position of Prt rectangle from RequestObjectResize diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index 97081343daf0..f5b4ce13f01f 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -33,11 +33,15 @@ #define CH_TXTATR_INWORD ((sal_Unicode)0x02) #define CH_TXTATR_TAB ((sal_Unicode)'\t') #define CH_TXTATR_NEWLINE ((sal_Unicode)'\n') -#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x04) -#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05) +#define CH_TXT_ATR_INPUTFIELDSTART ((sal_Unicode)0x04) +#define CH_TXT_ATR_INPUTFIELDEND ((sal_Unicode)0x05) + +#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06) + +#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x07) +#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x08) #define CH_TXT_ATR_SUBST_FIELDSTART ("[") #define CH_TXT_ATR_SUBST_FIELDEND ("]") -#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06) /* * Hier kommen erst mal die enums fuer die Hints @@ -129,7 +133,7 @@ RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN , RES_TXTATR_CHARFMT, // 49 RES_TXTATR_CJK_RUBY, // 50 RES_TXTATR_UNKNOWN_CONTAINER, // 51 - RES_TXTATR_DUMMY5, // 52 + RES_TXTATR_INPUTFIELD, // 52 RES_TXTATR_WITHEND_END, // alle TextAttribute ohne ein Ende diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index 66201521dab9..51a65bd6efb5 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -70,5 +70,7 @@ TblChgMode GetTblChgDefaultMode(); sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark ); +// IAccessible2 Implementation +extern void AccessibilityScrollMDI(ViewShell* 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 20660278795e..6fa58cba5b3f 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -66,6 +66,9 @@ public: const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef(); svt::EmbeddedObjectRef& GetObject(); const String& GetCurrentPersistName() const { return aName; } + //IAccessibility2 Implementation 2009----- + String GetStyleString(); + //-----IAccessibility2 Implementation 2009 sal_Bool IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss. #endif }; diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 789b41639a48..8d0b987e8fb4 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -52,7 +52,8 @@ namespace utl { class SwTxtFmtColl; class SwCntntFrm; -class SwTxtFld; // Fuer GetTxtFld() +class SwTxtFld; +class SwTxtInputFld; class SfxItemSet; class SwUndoTransliterate; @@ -92,9 +93,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable //Also niemals direkt zugreifen! SwpHints *m_pSwpHints; - // --> OD 2005-11-02 #i51089 - TUNING# mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz - // <-- XubString m_Text; SwParaIdleData_Impl* m_pParaIdleData_Impl; @@ -111,20 +110,15 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable bool m_bNotifiable; // sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei. - // --> OD 2008-11-19 #i70748# + bool mbEmptyListStyleSetDueToSetOutlineLevelAttr; - // <-- - // --> OD 2008-03-27 #refactorlists# // boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or // <ResetAllAttr(..)> method is running. // Needed to avoid duplicate handling of attribute change actions. bool mbInSetOrResetAttr; - // <-- - // --> OD 2008-05-06 #refactorlists# // pointer to the list, to whose the text node is added to SwList* mpList; - // <-- /// #i111677# cached expansion (for clipboard) ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache; @@ -184,9 +178,6 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable /** create number for this text node, if not already existing - OD 2005-11-02 #i51089 - TUNING# - OD 2007-10-26 #i83479# - made private - @return number of this node */ SwNodeNum* CreateNum() const; @@ -195,6 +186,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet); + const SwTxtInputFld* GetOverlappingInputFld( const SwTxtAttr& rTxtAttr ) const; + public: //Bug 120881:Modify here for Directly Page Numbering bool HasPageNumberField(); @@ -211,9 +204,7 @@ public: void SetAutoCompleteWordDirty( bool bNew ) const; void SetWrong( SwWrongList* pNew, bool bDelete = true ); SwWrongList* GetWrong(); - // --> OD 2008-05-23 #i71360# const SwWrongList* GetWrong() const; - // <-- void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true ); SwGrammarMarkUp* GetGrammarCheck(); // SMARTTAGS @@ -252,14 +243,12 @@ public: void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs, OutputDevice* pOut = 0 ) const; - // --> OD 2008-03-13 #refactorlists# // overriding to handle change of certain paragraph attributes virtual sal_Bool SetAttr( const SfxPoolItem& ); virtual sal_Bool SetAttr( const SfxItemSet& rSet ); virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ); virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr ); virtual sal_uInt16 ResetAllAttr(); - // <-- /// insert text content void InsertText( const XubString & rStr, const SwIndex & rIdx, @@ -285,7 +274,7 @@ public: refmarks, toxmarks, and metas will be ignored unless this is true ATTENTION: setting bInclRefToxMark is only allowed from UNDO! */ - void RstAttr( + void RstTxtAttr( const SwIndex &rIdx, const xub_StrLen nLen, const sal_uInt16 nWhich = 0, @@ -310,11 +299,13 @@ public: // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt, // dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr) - sal_Bool SetAttr( const SfxItemSet& rSet, - xub_StrLen nStt, xub_StrLen nEnd, - const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); + sal_Bool SetAttr( + const SfxItemSet& rSet, + const xub_StrLen nStt, + const xub_StrLen nEnd, + const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); + // erfrage die Attribute vom TextNode ueber den Bereich - // --> OD 2008-01-16 #newlistlevelattrs# // Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>. // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of // the corresponding list level of an applied list style is merged into @@ -337,7 +328,6 @@ public: void DeleteAttribute ( SwTxtAttr * const pTxtAttr ); // Aktionen auf Text und Attributen - // --> OD 2008-11-18 #i96213# // introduce optional parameter to control, if all attributes have to be copied. void CopyText( SwTxtNode * const pDest, const SwIndex &rStart, @@ -348,7 +338,6 @@ public: const SwIndex &rStart, xub_StrLen nLen, const bool bForceCopyOfAllAttrs = false ); - // <-- void CutText(SwTxtNode * const pDest, const SwIndex & rStart, const xub_StrLen nLen); @@ -374,8 +363,8 @@ public: sal_Bool bFmtToTxtAttributes = sal_True ); enum GetTxtAttrMode { - DEFAULT, /// DEFAULT: (Start < nIndex <= End) - EXPAND, /// EXPAND : (Start <= nIndex < End) + DEFAULT, /// DEFAULT: (Start <= nIndex < End) + EXPAND, /// EXPAND : (Start < nIndex <= End) PARENT, /// PARENT : (Start < nIndex < End) }; @@ -387,20 +376,19 @@ public: hints of which several may cover a single position, like RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK */ - SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode = DEFAULT) const; - //Bug 120881:Modify here for Directly Page Numbering - SwTxtFld *GetTxtFld( xub_StrLen const rIdx ) - { return (SwTxtFld *)GetTxtAttrAt( rIdx, RES_TXTATR_FIELD ); } - //Bug 120881(End) + SwTxtAttr *GetTxtAttrAt( + xub_StrLen const nIndex, + RES_TXTATR const nWhich, + enum GetTxtAttrMode const eMode = DEFAULT ) const; /** get the innermost text attributes covering position nIndex. @param nWhich only attributes with this id are returned. @param eMode the predicate for matching (@see GetTxtAttrMode). */ - ::std::vector<SwTxtAttr *> GetTxtAttrsAt(xub_StrLen const nIndex, - RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode = DEFAULT) const; + ::std::vector<SwTxtAttr *> GetTxtAttrsAt( + xub_StrLen const nIndex, + RES_TXTATR const nWhich, + enum GetTxtAttrMode const eMode = DEFAULT ) const; /** get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position, if one exists. @@ -409,8 +397,13 @@ public: attribute with given which id @return the text attribute at nIndex of type nWhich, if it exists */ - SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex, - const RES_TXTATR nWhich = RES_TXTATR_END ) const; + SwTxtAttr *GetTxtAttrForCharAt( + const xub_StrLen nIndex, + const RES_TXTATR nWhich = RES_TXTATR_END ) const; + + SwTxtFld* GetFldTxtAttrAt( + const xub_StrLen nIndex, + const bool bIncludeInputFldAtStart = false ) const; // Aktuelles Wort zurueckliefern XubString GetCurWord(xub_StrLen) const; @@ -427,8 +420,6 @@ public: // (Methode steht im ndcopy.cxx!!) void CopyCollFmt( SwTxtNode& rDestNd ); - //const SwNodeNum* _GetNodeNum() const { return pNdNum; } - // // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF: // @@ -461,20 +452,6 @@ public: void UpdateOutlineState(); - /** -> #i23730# - - Returns if this text node may be numbered. - - A text node may be numbered if - - it has no SwNodeNum - - it has a SwNodeNum and it has a numbering rule and the according - SwNumFmt defines a numbering type that is an enumeration. - - @retval sal_True this text node may be numbered - @retval sal_False else - */ - //sal_Bool MayBeNumbered() const; - /** Notify this textnode that its numbering rule has changed. */ @@ -482,7 +459,6 @@ public: /** Returns outline of numbering string - OD 2005-11-17 #128041# Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control, if the prefix and the suffix strings have to been included or not. @@ -518,9 +494,7 @@ public: */ sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const; - // --> OD 2010-01-05 #b6884103# SwTwips GetAdditionalIndentForStartingNewList() const; - // <-- // --> OD 2008-12-02 #i96772# void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const; @@ -667,15 +641,12 @@ public: */ bool HasVisibleNumberingOrBullet() const; - // --> OD 2008-02-19 #refactorlists# void SetListId( const String sListId ); String GetListId() const; - // <-- /** Determines, if the list level indent attributes can be applied to the paragraph. - OD 2008-01-17 #newlistlevelattrs# The list level indents can be applied to the paragraph under the one of following conditions: - the list style is directly applied to the paragraph and the paragraph @@ -694,8 +665,6 @@ public: /** Retrieves the list tab stop position, if the paragraph's list level defines one and this list tab stop has to merged into the tap stops of the paragraph - OD 2008-01-17 #newlistlevelattrs# - @author OD @param nListTabStopPosition @@ -708,8 +677,6 @@ public: /** Retrieves the character following the list label, if the paragraph's list level defines one. - OD 2008-01-17 #newlistlevelattrs# - @author OD @return XubString - the list tab stop position @@ -803,8 +770,11 @@ public: // <-- // override SwIndexReg - virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen, - const bool bNegative = false, const bool bDelete = false ); + virtual void Update( + SwIndex const & rPos, + const xub_StrLen nChangeLen, + const bool bNegative = false, + const bool bDelete = false ); // change text to Upper/Lower/Hiragana/Katagana/... void TransliterateText( utl::TransliterationWrapper& rTrans, @@ -834,13 +804,9 @@ public: void SetCountedInList( bool bCounted ); bool IsCountedInList() const; - // --> OD 2008-03-13 #refactorlists# -// void SyncNumberAndNumRule(); -// void UnregisterNumber(); void AddToList(); void RemoveFromList(); bool IsInList() const; - // <-- bool IsFirstOfNumRule() const; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 39b134305cfa..e58005f24934 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -440,7 +440,12 @@ public: * Dokument. Die Contentframes werden aus dem entsprechenden * Layout ausgehaengt. */ - void DelFrms(); + //IAccessibility2 Implementation 2009----- + //Solution:Add an input param to identify if acc table should be disposed + //void DelFrms(); + void DelFrms( sal_Bool bNeedDel = sal_False, sal_Bool bIsAccTableDispose = sal_True ); + //void DelFrms(sal_Bool bNeedDel = sal_False);//added by zlcdl for al + //-----IAccessibility2 Implementation 2009 /* * liefert die Anzahl der Elemente des Inhalts des Nodes; diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index a8dc3f1c7980..a122bda7fb2a 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -177,7 +177,11 @@ public: void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ); void SetTableLines( const SwTable &rTable ); - void DelFrms ( SwTable &rTable ); + //IAccessibility2 Implementation 2009----- + //Solution:Add an input param to identify if acc table should be disposed + //void DelFrms ( SwTable &rTable ); + void DelFrms ( SwTable &rTable,sal_Bool bAccTableDispose = sal_False ); + //-----IAccessibility2 Implementation 2009 void MakeFrms( SwTable &rTable ); void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, const sal_Bool bBehind ); diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx index 1213fdff6360..1d7fd4b79e73 100644 --- a/sw/inc/txatbase.hxx +++ b/sw/inc/txatbase.hxx @@ -60,6 +60,7 @@ private: bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby) bool m_bNesting : 1; // SwTxtAttrNesting bool m_bHasDummyChar : 1; // without end + meta + bool m_bHasContent : 1; // text attribute with content protected: SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart ); @@ -72,6 +73,7 @@ protected: void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; } void SetNesting(const bool bFlag) { m_bNesting = bFlag; } void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; } + void SetHasContent( const bool bFlag ) { m_bHasContent = bFlag; } public: @@ -83,10 +85,10 @@ public: const xub_StrLen* GetStart() const { return & m_nStart; } /// end position - virtual xub_StrLen* GetEnd(); - inline const xub_StrLen* GetEnd() const; - /// end (if available), else start - inline const xub_StrLen* GetAnyEnd() const; + virtual xub_StrLen* GetEnd(); // also used to change the end position + inline const xub_StrLen* End() const; + /// end (if available), else start + inline const xub_StrLen* GetAnyEnd() const; inline void SetDontExpand( bool bDontExpand ); bool DontExpand() const { return m_bDontExpand; } @@ -99,6 +101,7 @@ public: bool IsDontExpandStartAttr() const { return m_bDontExpandStart; } bool IsNesting() const { return m_bNesting; } bool HasDummyChar() const { return m_bHasDummyChar; } + bool HasContent() const { return m_bHasContent; } inline const SfxPoolItem& GetAttr() const; inline SfxPoolItem& GetAttr(); @@ -127,21 +130,20 @@ protected: public: SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); - using SwTxtAttr::GetEnd; virtual xub_StrLen* GetEnd(); }; // --------------- Inline Implementierungen ------------------------ -inline const xub_StrLen* SwTxtAttr::GetEnd() const +inline const xub_StrLen* SwTxtAttr::End() const { return const_cast<SwTxtAttr * >(this)->GetEnd(); } inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const { - const xub_StrLen* pEnd = GetEnd(); + const xub_StrLen* pEnd = End(); return pEnd ? pEnd : GetStart(); } @@ -183,8 +185,10 @@ inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const inline const SwFmtFld& SwTxtAttr::GetFmtFld() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD, - "Wrong attribute" ); + ASSERT( m_pAttr + && ( m_pAttr->Which() == RES_TXTATR_FIELD + || m_pAttr->Which() == RES_TXTATR_INPUTFIELD ), + "Wrong attribute" ); return (const SwFmtFld&)(*m_pAttr); } diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 48c97074275d..83ca7396ba71 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -33,44 +33,69 @@ class SwTxtNode; class SwTxtFld : public SwTxtAttr { - mutable String m_aExpand; + mutable String m_aExpand; // only used to determine, if field content is changing in <ExpandTxtFld()> SwTxtNode * m_pTxtNode; public: - SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart); + SwTxtFld( + SwFmtFld & rAttr, + xub_StrLen const nStart ); + virtual ~SwTxtFld(); - void CopyFld( SwTxtFld *pDest ) const; - void Expand() const; - inline void ExpandAlways(); + void CopyTxtFld( SwTxtFld *pDest ) const; + + void ExpandTxtFld() const; + inline void ExpandAlways() + { + m_aExpand += ' '; // changing current value to assure that <ExpandTxtFld()> changes the value. + ExpandTxtFld(); + } // get and set TxtNode pointer - SwTxtNode* GetpTxtNode() const { return m_pTxtNode; } - inline SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - // enable notification that field content has changed and needs reformatting - void NotifyContentChange(SwFmtFld& rFmtFld); + inline SwTxtNode* GetpTxtNode() const + { + return m_pTxtNode; + } + inline SwTxtNode& GetTxtNode() const + { + ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); + return *m_pTxtNode; + } + inline void ChgTxtNode( SwTxtNode* pNew ) + { + m_pTxtNode = pNew; + } - // #111840# - /** - Returns position of this field. + bool IsFldInDoc() const; + + // enable notification that field content has changed and needs reformatting + virtual void NotifyContentChange( SwFmtFld& rFmtFld ); - @return position of this field. Has to be deleted explicitly. - */ -// SwPosition * GetPosition() const; }; -inline SwTxtNode& SwTxtFld::GetTxtNode() const +class SwTxtInputFld : public SwTxtFld { - ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); - return *m_pTxtNode; -} +public: + SwTxtInputFld( + SwFmtFld & rAttr, + xub_StrLen const nStart, + xub_StrLen const nEnd ); -inline void SwTxtFld::ExpandAlways() -{ - m_aExpand += ' '; - Expand(); -} + virtual ~SwTxtInputFld(); + + virtual xub_StrLen* GetEnd(); + + virtual void NotifyContentChange( SwFmtFld& rFmtFld ); + + void UpdateTextNodeContent( const String& rNewContent ); + + const String GetFieldContent() const; + void UpdateFieldContent(); + +private: + xub_StrLen m_nEnd; +}; #endif diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx index d9620ef78911..8ad7410ade61 100644 --- a/sw/inc/txtrfmrk.hxx +++ b/sw/inc/txtrfmrk.hxx @@ -40,7 +40,6 @@ public: xub_StrLen const nStart, xub_StrLen const*const pEnd = 0); virtual xub_StrLen * GetEnd(); // SwTxtAttr - inline const xub_StrLen * GetEnd() const { return m_pEnd; } // get and set TxtNode pointer inline const SwTxtNode& GetTxtNode() const; diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx index 73c14166d15d..1db53e9eb8fe 100644 --- a/sw/inc/txttxmrk.hxx +++ b/sw/inc/txttxmrk.hxx @@ -42,7 +42,6 @@ public: virtual ~SwTxtTOXMark(); virtual xub_StrLen *GetEnd(); // SwTxtAttr - inline const xub_StrLen* GetEnd() const { return m_pEnd; } void CopyTOXMark( SwDoc* pDestDoc ); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 34bb47a3510c..086dec73902e 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -351,7 +351,9 @@ public: OutputDevice& GetRefDev() const; inline Window* GetWin() const { return pWin; } inline OutputDevice* GetOut() const { return pOut; } - + //IAccessibility2 Implementation 2009----- + void SetWin(Window* win) { pWin = win; } + //-----IAccessibility2 Implementation 2009 static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; } //Andern alle PageDescriptoren diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 3d52b90f48e6..352f48adba4a 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -30,6 +30,7 @@ class SwCrsrShell; class SwShellCrsr; +class SwTxtInputFld; // -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------ @@ -76,6 +77,7 @@ public: // #i75172# predefines namespace sdr { namespace overlay { class OverlayObject; }} +namespace sw { namespace overlay { class OverlayRangesOutline; }} class SwSelPaintRects : public SwRects { @@ -89,7 +91,6 @@ class SwSelPaintRects : public SwRects const SwCrsrShell* pCShell; virtual void Paint( const Rectangle& rRect ); - virtual void FillRects() = 0; // #i75172# sdr::overlay::OverlayObject* mpCursorOverlay; @@ -98,10 +99,17 @@ class SwSelPaintRects : public SwRects sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; } void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; } + bool mbShowTxtInputFldOverlay; + sw::overlay::OverlayRangesOutline* mpTxtInputFldOverlay; + + void HighlightInputFld(); + public: SwSelPaintRects( const SwCrsrShell& rCSh ); virtual ~SwSelPaintRects(); + virtual void FillRects() = 0; + // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To // make a complete swap access to mpCursorOverlay is needed there void swapContent(SwSelPaintRects& rSwap); @@ -110,6 +118,11 @@ public: void Hide(); void Invalidate( const SwRect& rRect ); + inline void SetShowTxtInputFldOverlay( const bool bShow ) + { + mbShowTxtInputFldOverlay = bShow; + } + const SwCrsrShell* GetShell() const { return pCShell; } // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY @@ -124,8 +137,6 @@ class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects Point aMkPt, aPtPt; const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt - virtual void FillRects(); // fuer Table- und normalen Crsr - using SwCursor::UpDown; public: @@ -135,6 +146,8 @@ public: SwShellCrsr( SwShellCrsr& ); virtual ~SwShellCrsr(); + virtual void FillRects(); // fuer Table- und normalen Crsr + void Show(); // Update und zeige alle Selektionen an void Hide(); // verstecke alle Selektionen void Invalidate( const SwRect& rRect ); @@ -182,7 +195,6 @@ class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCurso // TabellenBoxen. D.h., wird aus dem einen Array an einer Position // etwas geloescht, dann muss es auch im anderen erfolgen!! - public: SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos ); SwShellTableCrsr( const SwCrsrShell& rCrsrSh, |