diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-02 15:51:45 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-02 15:51:45 +0000 |
commit | 19f251c29311c23f071cc02fdaa6efd6917922a0 (patch) | |
tree | dcdd660d7eab7c6622efd45ac1baef869fd71c0f /sw/inc | |
parent | 16160041500efcc4cc8ad9b77e7c6aa90c0d1acc (diff) |
CWS-TOOLING: integrate CWS notes7
2008-12-29 19:45:08 +0100 mod r265824 : CWS-TOOLING: rebase CWS notes7 to trunk@265758 (milestone: DEV300:m38)
2008-12-16 14:54:42 +0100 mod r265544 : #i97239#
2008-12-16 14:53:18 +0100 mod r265543 : #i97239#
2008-12-16 13:36:43 +0100 mod r265537 : 96602
2008-12-13 13:02:54 +0100 mba r265452 : warning fixed
2008-12-13 08:20:21 +0100 mod r265448 : search inside notes
2008-12-13 00:11:47 +0100 mod r265447 : search inside notes
2008-12-13 00:11:09 +0100 mod r265446 : search inside notes
2008-12-13 00:10:52 +0100 mod r265445 : search inside notes
2008-12-12 19:39:14 +0100 mod r265439 : search inside notes
2008-12-12 19:02:44 +0100 mod r265438 : search inside notes
2008-12-12 16:42:07 +0100 mba r265431 : #i80135#: search in notes
2008-12-12 16:11:54 +0100 mba r265429 : #i80135#: search in notes
2008-12-12 16:11:02 +0100 mba r265428 : #i80135#: search in notes
2008-12-11 20:24:20 +0100 pb r265358 : fix: #i80135# fixes for aNotesBtn
2008-12-11 20:23:19 +0100 pb r265357 : fix: #i80135# fixes for aNotesBtn
2008-12-11 07:42:17 +0100 pb r265241 : fix: #i80135# CB_NOTES added
2008-12-11 07:40:36 +0100 pb r265240 : fix: #i80135# CB_NOTES added
2008-12-11 07:32:03 +0100 pb r265239 : fix: #i80135# CheckBox aNotesBtn added
2008-12-11 07:24:45 +0100 pb r265238 : fix: #i80135# CheckBox aNotesBtn added
2008-12-10 15:41:31 +0100 mod r265198 : crash using replies
2008-12-10 15:21:23 +0100 mod r265195 : crash using replies
2008-12-10 13:45:14 +0100 mba r265181 : warning fixed
2008-12-10 13:26:45 +0100 mba r265178 : warning fixed
2008-12-10 11:48:23 +0100 mba r265162 : fixed compilation error on Linux
2008-12-03 18:39:07 +0100 mod r264806 : we don't get the Ctrl-Alt-N on mac inside a note, let's do the whole reply thing using the shell, cleaner anyway
2008-12-03 17:13:59 +0100 mod r264802 : search dialog can be started and closed when focus is inside a note
2008-12-03 00:07:08 +0100 mod r264733 : search inside notes
2008-12-02 18:06:08 +0100 mod r264729 : WaE
2008-12-02 15:01:26 +0100 mod r264703 : WaE
2008-12-02 00:20:14 +0100 mod r264644 : WaE
2008-12-01 10:06:14 +0100 mod r264587 : WaE
2008-12-01 01:28:34 +0100 mod r264585 : WaE
2008-11-30 22:51:19 +0100 mod r264584 : search inside notes
2008-11-30 17:03:04 +0100 mod r264583 : search inside notes
2008-11-28 16:30:05 +0100 mod r264560 : #i96602#
2008-11-28 16:14:50 +0100 mod r264559 : test
2008-11-28 16:11:37 +0100 mod r264558 : test
2008-11-17 17:46:10 +0100 mod r263735 : WaE
2008-11-17 17:45:56 +0100 mod r263734 : WaE
2008-11-17 17:37:35 +0100 mod r263733 : revert manual fix for icu
2008-11-17 15:03:55 +0100 mod r263726 : manual fix for icu
2008-11-17 11:17:49 +0100 mod r263707 : manual fix for icu
2008-11-14 15:51:19 +0100 mod r263679 : fix
2008-11-14 14:48:02 +0100 mod r263676 : some more cleanup, redline comments not in the margin for 3.1
2008-11-14 08:37:07 +0100 mod r263664 : end of line missing
2008-11-13 18:36:53 +0100 mod r263660 : WaE
2008-11-13 18:20:04 +0100 mod r263659 : #i94374#
2008-11-13 15:51:28 +0100 mod r263648 : CWS-TOOLING: rebase CWS notes7 to trunk@263288 (milestone: DEV300:m35)
2008-11-13 08:33:19 +0100 mod r263622 : typos
2008-11-02 23:18:19 +0100 mod r263278 : changes notes, replies
2008-11-01 11:48:35 +0100 mod r262873 : replies, comments
2008-11-01 11:44:57 +0100 mod r262872 : notes search button
2008-10-10 14:34:34 +0200 mod r262150 : migration from cvs to svn
2008-10-10 14:33:39 +0200 mod r262149 : migration from cvs to svn
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/PostItMgr.hxx | 76 | ||||
-rw-r--r-- | sw/inc/cmdid.h | 6 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 1 | ||||
-rw-r--r-- | sw/inc/docufld.hxx | 6 | ||||
-rw-r--r-- | sw/inc/fmtfld.hxx | 10 | ||||
-rw-r--r-- | sw/inc/pam.hxx | 6 | ||||
-rw-r--r-- | sw/inc/postit.hxx | 162 | ||||
-rw-r--r-- | sw/inc/postithelper.hxx | 69 | ||||
-rw-r--r-- | sw/inc/redline.hxx | 29 | ||||
-rw-r--r-- | sw/inc/swcrsr.hxx | 1 |
10 files changed, 277 insertions, 89 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 731902105434..ce3b1866007d 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: PostItMgr.hxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.84.5 $ * * This file is part of OpenOffice.org. * @@ -35,10 +35,13 @@ #include <list> #include <vector> - +#include <svx/outlobj.hxx> +#include <tools/string.hxx> #include <tools/link.hxx> #include <swrect.hxx> +#include <com/sun/star/util/SearchOptions.hpp> + class SwWrtShell; class SwDoc; class SwView; @@ -47,11 +50,13 @@ class SwFmtFld; class SwField; class SfxBroadcaster; class SfxHint; -class SwPostIt; class SwEditWin; class Color; class SvxSearchItem; class SvxLanguageItem; +class SwPostIt; +class SwMarginWin; +class SwMarginItem; #define SORT_POS 1 #define SORT_AUTHOR 2 @@ -60,9 +65,7 @@ class SvxLanguageItem; #define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0) #define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153) -struct SwPostItItem; - -typedef std::list<SwPostItItem*> SwPostItItem_list; +typedef std::list<SwMarginItem*> SwMarginItem_list; struct SwPostItPageItem { @@ -70,10 +73,10 @@ struct SwPostItPageItem bool bMarginSide; long lOffset; SwRect mPageRect; - SwPostItItem_list* mList; + SwMarginItem_list* mList; SwPostItPageItem(): bScrollbar(false),lOffset(0) { - mList = new SwPostItItem_list; + mList = new SwMarginItem_list; } ~SwPostItPageItem() { @@ -93,44 +96,42 @@ struct FieldShadowState } }; +typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator; + class SwPostItMgr: public SfxListener { private: SwView* mpView; SwWrtShell* mpWrtShell; SwEditWin* mpEditWin; - std::list< SwPostItItem*> mvPostItFlds; + std::list< SwMarginItem*> mvPostItFlds; std::vector<SwPostItPageItem*> mPages; ULONG mnEventId; bool mbWaitingForCalcRects; - SwPostIt* mpActivePostIt; + SwMarginWin* mpActivePostIt; bool mbLayout; long mbLayoutHeight; long mbLayouting; bool mbReadOnly; bool mbDeleteNote; FieldShadowState mShadowState; + OutlinerParaObject* mpAnswer; - typedef std::list<SwPostItItem*>::iterator SwPostItItem_iterator; - typedef std::list<SwPostIt*>::iterator SwPostIt_iterator; + typedef std::list<SwMarginWin*>::iterator SwMarginWin_iterator; void AddPostIts(bool bCheckExistance = true,bool bFocus = true); - void RemovePostIts(); + //void AddRedlineComments(bool bCheckExistance, bool bFocus); + void RemoveMarginWin(); void PreparePageContainer(); void Scroll(const long lScroll,const unsigned long aPage ); - void AutoScroll(const SwPostIt* pPostIt,const unsigned long aPage ); + void AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage ); bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); - bool LayoutByPage(std::list<SwPostIt*> &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight); + bool LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight); void CheckForRemovedPostIts(); bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const; bool BorderOverPageBorder(unsigned long aPage) const; bool HasScrollbars() const; - - void SetColors(SwPostIt* pPostIt, SwPostItField* pFld); - - Color GetColorDark(sal_uInt16 aAuthorIndex); - Color GetColorLight(sal_uInt16 aAuthorIndex); - Color GetColorAnkor(sal_uInt16 aAuthorIndex); + void Focus(SfxBroadcaster& rBC); sal_Int32 GetInitialAnchorDistance() const; sal_Int32 GetScrollSize() const; @@ -144,18 +145,18 @@ class SwPostItMgr: public SfxListener SwPostItMgr(SwView* aDoc); ~SwPostItMgr(); - typedef std::list< SwPostItItem* >::const_iterator const_iterator; + typedef std::list< SwMarginItem* >::const_iterator const_iterator; const_iterator begin() const { return mvPostItFlds.begin(); } const_iterator end() const { return mvPostItFlds.end(); } - void InsertFld( SwFmtFld* aField, bool bCheckExistance, bool bFocus); - void RemoveFld( SfxBroadcaster* pFld ); + void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); + void RemoveItem( SfxBroadcaster* pBroadcast ); void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); void LayoutPostIts(); bool CalcRects(); - void MakeVisible(const SwPostIt* pPostIt,long aPage = -1); + void MakeVisible(const SwMarginWin* pPostIt,long aPage = -1); bool ShowScrollbar(const unsigned long aPage) const; bool HasNotes() const ; @@ -187,24 +188,35 @@ class SwPostItMgr: public SfxListener bool IsHit(const Point &aPointPixel); Color GetArrowColor(USHORT aDirection,unsigned long aPage) const; - SwPostIt* GetNextPostIt(USHORT aDirection, SwPostIt* aPostIt); + SwMarginWin* GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt); long GetNextBorder(); - SwPostIt* GetActivePostIt() { return mpActivePostIt; } - void SetActivePostIt( SwPostIt* p); + SwMarginWin* GetActivePostIt() { return mpActivePostIt; } + void SetActivePostIt( SwMarginWin* p); sal_Int32 GetMinimumSizeWithMeta() const; sal_Int32 GetSidebarScrollerHeight() const; - SwFmtFld* GetFmtFld(SwPostIt* mpPostIt) const; - SwPostIt* GetPostIt(const SwFmtFld* pFld) const; + SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; + SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; SwPostIt* GetPostIt(const SwPostItField* pFld) const; - SwPostIt* GetPostIt(SwFmtFld* pFld) const; SwPostIt* GetPostIt(SwPostItField* pFld) const; void SetShadowState(const SwPostItField* pFld,bool bCursor = true); void SetSpellChecking(); - bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; + Color GetColorDark(sal_uInt16 aAuthorIndex); + Color GetColorLight(sal_uInt16 aAuthorIndex); + Color GetColorAnkor(sal_uInt16 aAuthorIndex); + + bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; + + void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} + OutlinerParaObject* IsAnswer() {return mpAnswer;} + + sal_uInt16 Replace(SvxSearchItem* pItem); + void StartSearchAndReplace(const SvxSearchItem& rSearchItem); + 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); }; #endif diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index f78c0ce55f62..f5de3d518082 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: cmdid.h,v $ - * $Revision: 1.84 $ + * $Revision: 1.84.34.1 $ * * This file is part of OpenOffice.org. * @@ -1069,6 +1069,10 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_HIDE_NOTE_AUTHOR (FN_NOTES+4) #define FN_HIDE_ALL_NOTES (FN_NOTES+5) +#define FN_DELETE_COMMENT (FN_NOTES+6) +#define FN_REPLY (FN_NOTES+7) + + /*-------------------------------------------------------------------- Bereich: Parameter --------------------------------------------------------------------*/ diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index f997a4e6e97a..1f945cf6fdff 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -392,6 +392,7 @@ public: // die Suchfunktionen ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt, + BOOL bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnde, BOOL& bCancel, FindRanges eRng, int bReplace = FALSE ); diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 5dd199b11a81..3cd0f1bb034f 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: docufld.hxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.82.1 $ * * This file is part of OpenOffice.org. * @@ -30,10 +30,8 @@ #ifndef _DOCUFLD_HXX #define _DOCUFLD_HXX -#ifndef _DATE_HXX //autogen - #include <tools/date.hxx> -#endif +#include <tools/date.hxx> #include <tools/datetime.hxx> diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index 20c585dcfc9f..496df5c56a1c 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fmtfld.hxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.118.1 $ * * This file is part of OpenOffice.org. * @@ -31,17 +31,16 @@ #define _FMTFLD_HXX #include <svtools/poolitem.hxx> - +#include <svtools/brdcst.hxx> #include <svtools/smplhint.hxx> + #include "swdllapi.h" #include <calbck.hxx> -#include <svtools/brdcst.hxx> - class SwField; class SwTxtFld; -// ATT_FLD *********************************** +// ATT_FLD *********************************** class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster { friend class SwTxtFld; @@ -117,4 +116,3 @@ public: }; #endif - diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 09f2931c2176..f4237c6b964b 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -162,6 +162,7 @@ public: // Suchen BYTE Find( const com::sun::star::util::SearchOptions& rSearchOpt, + BOOL bSearchInNotes, utl::TextSearch& rSTxt, SwMoveFn fnMove = fnMoveForward, const SwPaM *pPam =0, BOOL bInReadOnly = FALSE); @@ -175,6 +176,9 @@ public: SwMoveFn fnMove, const SwPaM *pPam, BOOL bInReadOnly, BOOL bMoveFirst ); + bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, + SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd, + xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam); inline BOOL IsInFrontOfLabel() const { return bIsInFrontOfLabel; } inline void _SetInFrontOfLabel( BOOL bNew ) { bIsInFrontOfLabel = bNew; } @@ -195,7 +199,7 @@ public: void Exchange(); #endif /* - * Undokumented Feature: Liefert zurueck, ob das Pam ueber + * Undocumented Feature: Liefert zurueck, ob das Pam ueber * eine Selektion verfuegt oder nicht. Definition einer * Selektion: Point und Mark zeigen auf unterschiedliche * Puffer. diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index 62c419eb2dac..e1683477b334 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -8,7 +8,7 @@ * * $RCSfile: postit.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.8.84.7 $ * * This file is part of OpenOffice.org. * @@ -38,6 +38,9 @@ #include <swrect.hxx> #include <svx/sdr/overlay/overlayobject.hxx> +#include <tools/datetime.hxx> +#include <tools/date.hxx> + #include <vcl/lineinfo.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <svx/editstat.hxx> @@ -55,6 +58,12 @@ class Edit; class MultiLineEdit; class PopupMenu; class SvxLanguageItem; +class SwRedline; +class OutlinerParaObject; + +#define ANKORLINE_WIDTH 1 + +enum AnkorState {AS_ALL, AS_START, AS_END}; class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition { @@ -91,6 +100,7 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition LineInfo mLineInfo; unsigned long mHeight; bool mbShadowedEffect; + AnkorState mAnkorState; public: SwPostItAnkor(const basegfx::B2DPoint& rBasePos, @@ -125,6 +135,8 @@ class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition bool getShadowedEffect() const { return mbShadowedEffect; } + void SetAnkorState(AnkorState aState); + AnkorState GetAnkorState() const {return mAnkorState;} virtual void Trigger(sal_uInt32 nTime); //sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol) const; @@ -164,7 +176,7 @@ class PostItTxt : public Window { private: OutlinerView* mpOutlinerView; - SwPostIt* mpPostIt; + SwMarginWin* mpMarginWin; bool mMouseOver; BOOL mbShowPopup; @@ -179,6 +191,11 @@ class PostItTxt : public Window virtual void DataChanged( const DataChangedEvent& aData); virtual void LoseFocus(); virtual void RequestHelp(const HelpEvent &rEvt); + + // reconversion /*i94374*/ + virtual XubString GetSurroundingText() const; + virtual Selection GetSurroundingTextSelection() const; + DECL_LINK( Select, Menu* ); public: @@ -196,9 +213,11 @@ typedef sal_Int64 SwPostItBits; #define PB_Preview ((SwPostItBits)0x00000001) -class SwPostIt : public Window + +class SwMarginWin : public Window { private: + ULONG mnEventId; SwView* mpView; sdr::overlay::OverlayManager* pOverlayManager; OutlinerView* mpOutlinerView; @@ -206,33 +225,30 @@ class SwPostIt : public Window PostItTxt* mpPostItTxt; MultiLineEdit* mpMeta; ScrollBar* mpVScrollbar; - SwFmtFld* mpFmtFld; - SwPostItField* mpFld; SwPostItAnkor* mpAnkor; SwPostItShadow* mpShadow; SwPostItMgr* mpMgr; bool mbMeta; - bool mbReadonly; Color mColorAnkor; Color mColorDark; Color mColorLight; basegfx::B2DPolygon aPopupTriangle; - Rectangle mRectMetaButton; - PopupMenu* mpButtonPopup; - sal_Int32 mnEventId; bool mbMarginSide; Rectangle mPosSize; SwRect mAnkorRect; long mPageBorder; SwPostItBits nFlags; - Color mChangeColor; - SwPostItHelper::SwLayoutStatus mStatus; - + bool mbMouseOverButton; protected: - + bool mbReadonly; + PopupMenu* mpButtonPopup; + bool mbIsFollow; + Rectangle mRectMetaButton; + virtual void CheckMetaText(); virtual void DataChanged( const DataChangedEvent& aEvent); virtual void LoseFocus(); virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); virtual void Paint( const Rectangle& rRect); virtual void GetFocus(); void SetPosAndSize(); @@ -240,20 +256,17 @@ class SwPostIt : public Window DECL_LINK(ModifyHdl, void*); DECL_LINK(ScrollHdl, ScrollBar*); - - void InitControls(); - void CheckMetaText(); + DECL_LINK(DeleteHdl, void*); public: - SwPostIt( Window* pParent, WinBits nBits,SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits); - ~SwPostIt(); + TYPEINFO(); + SwMarginWin( Window* pParent, WinBits nBits, SwPostItMgr* aMgr,SwPostItBits aBits); + virtual ~SwMarginWin(); void SetSize( const Size& rNewSize ); void SetPosSizePixelRect( long nX, long nY,long nWidth, long nHeight,const SwRect &aRect,const long PageBorder); void TranslateTopPosition(const long aAmount); - void SetPostItText(); - PostItTxt* PostItText() { return mpPostItTxt;} ScrollBar* Scrollbar() { return mpVScrollbar;} SwPostItAnkor* Ankor() { return mpAnkor;} @@ -262,20 +275,29 @@ class SwPostIt : public Window SwView* DocView() { return mpView;} Outliner* Engine() { return mpOutliner;} SwPostItMgr* Mgr() { return mpMgr; } - SwFmtFld* Field() { return mpFmtFld; } + SwRect GetAnkorRect() { return mAnkorRect; } - String GetAuthor() const; SwEditWin* EditWin(); long GetPostItTextHeight(); - void UpdateData(); void SwitchToPostIt(USHORT aDirection); //void SwitchToPostIt(bool aDirection); - void SwitchToFieldPos(bool bAfter = true); + virtual void SwitchToFieldPos(); + virtual sal_uInt32 MoveCaret() { return 0;}; + + virtual void UpdateData() = 0; + virtual void SetPostItText() = 0; + virtual void Delete(); + virtual void GotoPos() = 0; + virtual void SetPopup() = 0; - void ExecuteCommand(USHORT aSlot); - void Delete(); + virtual String GetAuthor(); + virtual Date GetDate(); + virtual Time GetTime(); + + void ExecuteCommand(USHORT nSlot); + void InitControls(); void HidePostIt(); void DoResize(); void ResizeIfNeccessary(long aOldHeight, long aNewHeight); @@ -291,18 +313,27 @@ class SwPostIt : public Window void ResetAttributes(); - void SetLanguage(const SvxLanguageItem aNewItem); void SetMarginSide(bool aMarginSide); void SetReadonly(BOOL bSet); BOOL IsReadOnly() { return mbReadonly;} bool IsPreview() { return nFlags & PB_Preview;} + void SetLanguage(const SvxLanguageItem aNewItem); + virtual SvxLanguageItem GetLanguage(void); + void SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor); Color ColorDark() { return mColorDark; } Color ColorLight() { return mColorLight; } void Rescale(); - void SetShadowState(ShadowState bState); + void SetViewState(ShadowState bState); + + bool IsFollow() { return mbIsFollow; } + void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow;}; + virtual bool CalcFollow(); + + SwMarginWin* GetTopReplyNote(); + bool IsAnyStackParentVisible(); sal_Int32 GetMetaHeight(); sal_Int32 GetMinimumSizeWithMeta(); @@ -314,15 +345,82 @@ class SwPostIt : public Window void ToggleInsMode(); + virtual void ActivatePostIt(); + virtual void DeactivatePostIt(); + + virtual SwPostItHelper::SwLayoutStatus GetStatus() { return SwPostItHelper::NONE; } + + virtual bool IsProtected() {return mbReadonly;}; +}; + +// implementation for change tracking comments, fully functional, but not yet used +/* +class SwRedComment : public SwMarginWin +{ + private: + SwRedline* pRedline; + + protected: + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + public: + TYPEINFO(); + SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed); + virtual ~SwRedComment() {}; + + virtual void UpdateData(); + virtual void SetPostItText(); + virtual void Delete(); + virtual void GotoPos(); + virtual void SetPopup(); + virtual void ActivatePostIt(); + virtual void DeactivatePostIt(); + + virtual String GetAuthor(); + virtual Date GetDate(); + virtual Time GetTime(); + + virtual bool IsProtected(); +}; +*/ +class SwPostIt : public SwMarginWin +{ + private: + SwFmtFld* mpFmtFld; + SwPostItField* mpFld; + SwPostItHelper::SwLayoutStatus mStatus; + Color mChangeColor; + + protected: + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + + public: + TYPEINFO(); + SwPostIt( Window* pParent, WinBits nBits,SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits); + virtual ~SwPostIt() {}; + + virtual void UpdateData(); + virtual void SetPostItText(); + virtual void Delete(); + virtual void GotoPos(); + virtual void SetPopup(); + + virtual String GetAuthor(); + virtual Date GetDate(); + virtual Time GetTime(); + + virtual sal_uInt32 MoveCaret(); + void SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor); - SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; } + virtual SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; } Color GetChangeColor() { return mChangeColor; } + sal_uInt32 CountFollowing(); + virtual bool CalcFollow(); + void InitAnswer(OutlinerParaObject* pText); + virtual SvxLanguageItem GetLanguage(void); - void ActivatePostIt(); - void DeactivatePostIt(); + virtual bool IsProtected(); }; - #endif diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index ef0637684818..3f36c6015f6c 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: postithelper.hxx,v $ - * $Revision: 1.2 $ + * $Revision: 1.2.118.3 $ * * This file is part of OpenOffice.org. * @@ -31,15 +31,23 @@ #define _POSTITHELPER_HXX #include <swrect.hxx> +#include <fmtfld.hxx> +#include <redline.hxx> #include <vector> +#include <vcl/window.hxx> +#include <svtools/brdcst.hxx> class SwTxtFld; class SwRootFrm; -class SwFmtFld; class SwPostIt; +class String; +class SwMarginWin; +class SwPostItMgr; struct SwPosition; +typedef sal_Int64 SwPostItBits; + struct SwLayoutInfo { SwRect mPosition; @@ -54,7 +62,7 @@ namespace SwPostItHelper { enum SwLayoutStatus { - INVISIBLE, VISIBLE, INSERTED, DELETED + INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN }; SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); @@ -64,30 +72,71 @@ namespace SwPostItHelper unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); } -struct SwPostItItem +class SwMarginItem { +public: + SwMarginWin* pPostIt; bool bShow; bool bFocus; bool bMarginSide; - SwFmtFld* pFmtFld; - SwPostIt* pPostIt; SwRect mPos; SwRect mFramePos; SwRect mPagePos; unsigned long mnPageNumber; SwPostItHelper::SwLayoutStatus mLayoutStatus; USHORT mRedlineAuthor; - SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus) - : bShow(aShow), + SwMarginItem(bool aShow, bool aFocus) + : pPostIt(0), + bShow(aShow), bFocus(aFocus), bMarginSide(false), - pFmtFld(p), - pPostIt(0), mnPageNumber(1), mLayoutStatus( SwPostItHelper::INVISIBLE ), mRedlineAuthor(0) + {} + virtual ~SwMarginItem(){} + virtual SwPosition GetPosition() = 0; + virtual bool UseElement() = 0; + virtual SwFmtFld* GetFmtFld() = 0; + virtual SfxBroadcaster* GetBroadCaster() const = 0; + virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) = 0; +}; +/* +class SwRedCommentItem: public SwMarginItem +{ +private: + SwRedline* pRedline; +public: + + SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus) + : SwMarginItem(aShow,aFocus), + pRedline(pRed) {} + virtual ~SwRedCommentItem() {} + virtual SwPosition GetPosition(); + virtual bool UseElement(); + virtual SwFmtFld* GetFmtFld() {return 0; } + virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); } + virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits); +}; +*/ + +class SwPostItItem: public SwMarginItem +{ + private: + SwFmtFld* pFmtFld; + + public: + SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus) + : SwMarginItem(aShow,aFocus) , + pFmtFld(p) { } + virtual ~SwPostItItem() {} + virtual SwPosition GetPosition(); + virtual bool UseElement(); + virtual SwFmtFld* GetFmtFld() {return pFmtFld;} + virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); } + virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits); }; #endif // _POSTITHELPER_HXX diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index e9230c4228a7..b05f132b5e23 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: redline.hxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.180.1 $ * * This file is part of OpenOffice.org. * @@ -37,9 +37,9 @@ #include <svtools/svstdarr.hxx> #include <pam.hxx> -#ifndef IDOCUMENTREDLINEACCESS_HXX_INCLUDED #include <IDocumentRedlineAccess.hxx> -#endif + +#include <svtools/smplhint.hxx> class SfxItemSet; @@ -287,4 +287,27 @@ public: int operator<( const SwRedline& ) const; }; +class SW_DLLPUBLIC SwRedlineHint : public SfxHint +{ +#define SWREDLINE_INSERTED 1 +#define SWREDLINE_REMOVED 2 +#define SWREDLINE_FOCUS 3 +#define SWREDLINE_CHANGED 4 +#define SWREDLINE_LANGUAGE 5 + + const SwRedline* pRedline; + sal_Int16 nWhich; + +public: + SwRedlineHint( const SwRedline* p, sal_Int16 n ) + : pRedline(p) + , nWhich(n) + {} + + TYPEINFO(); + const SwRedline* GetRedline() const { return pRedline; } + sal_Int16 Which() const { return nWhich; } +}; + + #endif diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index d9a159554808..8dd654c4034a 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -126,6 +126,7 @@ public: ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt, + BOOL bSearchInNotes, SwDocPositions nStart, SwDocPositions nEnde, BOOL& bCancel, FindRanges = FND_IN_BODY, |