summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-11 10:49:42 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-11 10:49:42 +0200
commit9b70288d9aa0b25151aadac9eac43e5fc3c698c6 (patch)
treeb497bb3c23cf46379bf7f0f48f5866a0131bc94c /sw/inc
parent2b820dc56e0fda0626bb1a1d14f426112311f9b9 (diff)
parentcd57a8a3aee5d85bd2640daded02092857272cd2 (diff)
CWS-TOOLING: integrate CWS sw33a11y01
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/AnnotationWin.hxx83
-rw-r--r--sw/inc/PostItMgr.hxx139
-rw-r--r--sw/inc/SidebarWin.hxx272
-rw-r--r--sw/inc/SidebarWindowsTypes.hxx53
-rw-r--r--sw/inc/access.hrc35
-rw-r--r--sw/inc/accmap.hxx107
-rw-r--r--sw/inc/fesh.hxx4
-rw-r--r--sw/inc/postit.hxx413
-rw-r--r--sw/inc/postithelper.hxx99
-rw-r--r--sw/inc/rcid.hrc9
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx8
-rw-r--r--sw/inc/unotextmarkup.hxx3
-rwxr-xr-xsw/inc/viewsh.hxx14
13 files changed, 612 insertions, 627 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
new file mode 100644
index 0000000000..93b35694c8
--- /dev/null
+++ b/sw/inc/AnnotationWin.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _ANNOTATIONWIN_HXX
+#define _ANNOTATIONWIN_HXX
+
+#include <SidebarWin.hxx>
+
+class PopupMenu;
+class OutlinerParaObject;
+
+namespace sw { namespace annotation {
+
+class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
+{
+ public:
+ SwAnnotationWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem,
+ SwFmtFld* aField );
+ virtual ~SwAnnotationWin();
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual sal_uInt32 MoveCaret();
+
+ virtual bool CalcFollow();
+ void InitAnswer(OutlinerParaObject* pText);
+
+ virtual bool IsProtected();
+
+ protected:
+ virtual MenuButton* CreateMenuButton();
+
+ private:
+ virtual SvxLanguageItem GetLanguage(void);
+ sal_uInt32 CountFollowing();
+
+ SwFmtFld* mpFmtFld;
+ SwPostItField* mpFld;
+ PopupMenu* mpButtonPopup;
+
+};
+
+} } // end of namespace sw::annotation
+#endif
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 85b73c05cf..c3d485142a 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,13 +39,14 @@
#include <unotools/options.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/uno/Any.hxx>
+#include <SidebarWindowsTypes.hxx>
#include <svl/lstner.hxx>
class SwWrtShell;
class SwDoc;
class SwView;
class SwPostItField;
-class SwFmtFld;
+class SwFmtFld;
class SwField;
class SfxBroadcaster;
class SfxHint;
@@ -53,9 +54,16 @@ class SwEditWin;
class Color;
class SvxSearchItem;
class SvxLanguageItem;
-class SwPostIt;
-class SwMarginWin;
-class SwMarginItem;
+namespace sw { namespace annotation {
+ class SwAnnotationWin;
+}}
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+ class SwFrmSidebarWinContainer;
+}}
+class SwSidebarItem;
+class SwFrm;
+class Window;
#define SORT_POS 1
#define SORT_AUTHOR 2
@@ -64,23 +72,20 @@ class SwMarginItem;
#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
-typedef std::list<SwMarginItem*> SwMarginItem_list;
-typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator;
+typedef std::list<SwSidebarItem*> SwSidebarItem_list;
+typedef std::list<SwSidebarItem*>::iterator SwSidebarItem_iterator;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
struct SwPostItPageItem
{
bool bScrollbar;
- bool bMarginSide;
+ sw::sidebarwindows::SidebarPosition eSidebarPosition;
long lOffset;
SwRect mPageRect;
- SwMarginItem_list* mList;
+ SwSidebarItem_list* mList;
SwPostItPageItem(): bScrollbar(false),lOffset(0)
{
- mList = new SwMarginItem_list;
+ mList = new SwSidebarItem_list;
}
~SwPostItPageItem()
{
@@ -102,26 +107,28 @@ struct FieldShadowState
class SwNoteProps: public utl::ConfigItem
{
- private:
- bool bIsShowAnkor;
+ private:
+ bool bIsShowAnchor;
public:
- SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")), bIsShowAnkor(false)
+ SwNoteProps()
+ : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
+ , bIsShowAnchor(false)
{
- const Sequence<OUString>& rNames = GetPropertyNames();
- Sequence<Any> aValues = GetProperties(rNames);
- const Any* pValues = aValues.getConstArray();
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames);
+ const ::com::sun::star::uno::Any* pValues = aValues.getConstArray();
DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
if (aValues.getLength())
- pValues[0]>>=bIsShowAnkor;
+ pValues[0]>>=bIsShowAnchor;
}
- bool IsShowAnkor()
+ bool IsShowAnchor()
{
- return bIsShowAnkor;
+ return bIsShowAnchor;
}
- Sequence<OUString>& GetPropertyNames()
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
{
- static Sequence<OUString> aNames;
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames;
if(!aNames.getLength())
{
static const char* aPropNames[] =
@@ -130,9 +137,9 @@ class SwNoteProps: public utl::ConfigItem
};
const int nCount = sizeof(aPropNames)/sizeof(const char*);
aNames.realloc(nCount);
- OUString* pNames = aNames.getArray();
+ ::rtl::OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
- pNames[i] = OUString::createFromAscii(aPropNames[i]);
+ pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]);
}
return aNames;
}
@@ -147,11 +154,11 @@ class SwPostItMgr: public SfxListener
SwView* mpView;
SwWrtShell* mpWrtShell;
SwEditWin* mpEditWin;
- std::list< SwMarginItem*> mvPostItFlds;
+ std::list< SwSidebarItem*> mvPostItFlds;
std::vector<SwPostItPageItem*> mPages;
ULONG mnEventId;
bool mbWaitingForCalcRects;
- SwMarginWin* mpActivePostIt;
+ sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
bool mbLayout;
long mbLayoutHeight;
long mbLayouting;
@@ -159,52 +166,62 @@ class SwPostItMgr: public SfxListener
bool mbDeleteNote;
FieldShadowState mShadowState;
OutlinerParaObject* mpAnswer;
- bool mpIsShowAnkor;
+ bool mbIsShowAnchor;
+
+ // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances.
+ sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer;
- typedef std::list<SwMarginWin*>::iterator SwMarginWin_iterator;
+ typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator;
void AddPostIts(bool bCheckExistance = true,bool bFocus = true);
//void AddRedlineComments(bool bCheckExistance, bool bFocus);
- void RemoveMarginWin();
+ void RemoveSidebarWin();
void PreparePageContainer();
void Scroll(const long lScroll,const unsigned long aPage );
- void AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage );
+ void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage );
bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
- bool LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight);
+ bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &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 Focus(SfxBroadcaster& rBC);
-
+
sal_Int32 GetInitialAnchorDistance() const;
sal_Int32 GetScrollSize() const;
sal_Int32 GetSpaceBetween() const;
void SetReadOnlyState();
DECL_LINK( CalcHdl, void*);
- protected:
+
+ sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const;
+
+ void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
+ void RemoveItem( SfxBroadcaster* pBroadcast );
+
+ void Sort(const short aType);
public:
SwPostItMgr(SwView* aDoc);
~SwPostItMgr();
- typedef std::list< SwMarginItem* >::const_iterator const_iterator;
+ typedef std::list< SwSidebarItem* >::const_iterator const_iterator;
const_iterator begin() const { return mvPostItFlds.begin(); }
const_iterator end() const { return mvPostItFlds.end(); }
- 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 SwMarginWin* pPostIt,long aPage = -1);
+ void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt,
+ long aPage = -1);
bool ShowScrollbar(const unsigned long aPage) const;
bool HasNotes() const ;
bool ShowNotes() const;
- bool IsShowAnkor() { return mpIsShowAnkor;}
+ bool IsShowAnchor() { return mbIsShowAnchor;}
unsigned long GetSidebarWidth(bool bPx = false) const;
unsigned long GetSidebarBorderWidth(bool bPx = false) const;
unsigned long GetNoteWidth();
@@ -212,8 +229,6 @@ class SwPostItMgr: public SfxListener
void PrepareView(bool bIgnoreCount = false);
void CorrectPositions();
-
- void Sort(const short aType);
void SetLayout() { mbLayout = true; };
void Delete(String aAuthor);
@@ -232,28 +247,35 @@ class SwPostItMgr: public SfxListener
bool IsHit(const Point &aPointPixel);
Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
- SwMarginWin* GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt);
+ sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
+
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection,
+ sw::sidebarwindows::SwSidebarWin* aPostIt);
long GetNextBorder();
- SwMarginWin* GetActivePostIt() { return mpActivePostIt; }
- void SetActivePostIt( SwMarginWin* p);
+
+ sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; }
+ void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p);
+ bool HasActiveSidebarWin() const;
+ bool HasActiveAnnotationWin() const;
+ void GrabFocusOnActiveSidebarWin();
+ void UpdateDataOnActiveSidebarWin();
+ void DeleteActiveSidebarWin();
+ void HideActiveSidebarWin();
+ void ToggleInsModeOnActiveSidebarWin();
+
sal_Int32 GetMinimumSizeWithMeta() const;
sal_Int32 GetSidebarScrollerHeight() const;
- SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const;
- SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const;
- SwPostIt* GetPostIt(const SwPostItField* pFld) const;
- SwPostIt* GetPostIt(SwPostItField* pFld) const;
-
void SetShadowState(const SwPostItField* pFld,bool bCursor = true);
void SetSpellChecking();
Color GetColorDark(sal_uInt16 aAuthorIndex);
Color GetColorLight(sal_uInt16 aAuthorIndex);
- Color GetColorAnkor(sal_uInt16 aAuthorIndex);
+ Color GetColorAnchor(sal_uInt16 aAuthorIndex);
bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const;
-
+
void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
OutlinerParaObject* IsAnswer() {return mpAnswer;}
void CheckMetaText();
@@ -263,7 +285,18 @@ class SwPostItMgr: public SfxListener
sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
- void AssureStdModeAtShell();
+ void AssureStdModeAtShell();
+
+ void ConnectSidebarWinToFrm( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ void DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ bool HasFrmConnectedSidebarWins( const SwFrm& rFrm );
+ Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
+ const sal_Int32 nIndex );
+ void GetAllSidebarWinForFrm( const SwFrm& rFrm,
+ std::vector< Window* >* pChildren );
};
#endif
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
new file mode 100644
index 0000000000..41decf8024
--- /dev/null
+++ b/sw/inc/SidebarWin.hxx
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SIDEBARWIN_HXX
+#define _SIDEBARWIN_HXX
+
+#include <postithelper.hxx>
+#include <SidebarWindowsTypes.hxx>
+
+#include <vcl/window.hxx>
+#include <swrect.hxx>
+
+#include <tools/datetime.hxx>
+#include <tools/date.hxx>
+
+#include <vcl/lineinfo.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <editeng/editstat.hxx>
+
+class SwPostItMgr;
+class SwPostItField;
+class OutlinerView;
+class Outliner;
+class ScrollBar;
+class SwEditWin;
+class SwView;
+class Edit;
+class MenuButton;
+//class SwRedline;
+class SwFrm;
+
+
+namespace sw { namespace sidebarwindows {
+
+class SidebarTxtControl;
+class AnchorOverlayObject;
+class ShadowOverlayObject;
+
+typedef sal_Int64 SwPostItBits;
+
+#define PB_Preview ((SwPostItBits)0x00000001)
+
+
+class SwSidebarWin : public Window
+{
+ public:
+ SwSidebarWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem );
+ virtual ~SwSidebarWin();
+
+ void SetSize( const Size& rNewSize );
+ void SetPosSizePixelRect( long nX,
+ long nY,
+ long nWidth,
+ long nHeight,
+ const SwRect &aRect,
+ const long PageBorder);
+ void SetPosAndSize();
+ void TranslateTopPosition(const long aAmount);
+ virtual void CheckMetaText();
+
+ inline Point GetAnchorPos() { return mAnchorRect.Pos(); }
+ SwEditWin* EditWin();
+
+ inline OutlinerView* GetOutlinerView() { return mpOutlinerView;}
+ bool HasScrollbar() const;
+ bool IsScrollbarVisible() const;
+ inline ScrollBar* Scrollbar() { return mpVScrollbar; }
+ inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;}
+ inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;}
+
+ long GetPostItTextHeight();
+
+ void SwitchToPostIt(USHORT aDirection);
+ virtual void SwitchToFieldPos();
+
+ virtual sal_uInt32 MoveCaret() = 0;
+
+ virtual void UpdateData() = 0;
+ virtual void SetPostItText() = 0;
+ virtual void Delete();
+ virtual void GotoPos() = 0;
+
+ virtual String GetAuthor() = 0;
+ virtual Date GetDate() = 0;
+ virtual Time GetTime() = 0;
+
+ void ExecuteCommand(USHORT nSlot);
+ void InitControls();
+ void HidePostIt();
+ void DoResize();
+ void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
+ void SetScrollbar();
+
+ void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
+ const Point VirtualPos() { return mPosSize.TopLeft(); }
+ const Size VirtualSize() { return mPosSize.GetSize(); }
+
+ void ShowAnchorOnly(const Point &aPoint);
+ void ShowNote();
+ void HideNote();
+
+ void ResetAttributes();
+
+ void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
+ void SetReadonly(BOOL bSet);
+ BOOL IsReadOnly() { return mbReadonly;}
+ bool IsPreview() { return nFlags & PB_Preview;}
+
+ void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
+ const Color& ColorAnchor() { return mColorAnchor; }
+ const Color& ColorDark() { return mColorDark; }
+ const Color& ColorLight() { return mColorLight; }
+ void Rescale();
+
+ void SetViewState(::sw::sidebarwindows::ViewState bViewState);
+
+ bool IsFollow() { return mbIsFollow; }
+ void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
+ virtual bool CalcFollow() = 0;
+
+
+ sal_Int32 GetMetaHeight();
+ sal_Int32 GetMinimumSizeWithMeta();
+ sal_Int32 GetMinimumSizeWithoutMeta();
+ sal_Int32 GetMetaButtonAreaWidth();
+ sal_Int32 GetScrollbarWidth();
+
+ void SetSpellChecking();
+
+ void ToggleInsMode();
+
+ virtual void ActivatePostIt();
+ virtual void DeactivatePostIt();
+
+ void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
+ const Color& aColor);
+ SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
+ Color GetChangeColor() { return mChangeColor; }
+
+ virtual bool IsProtected() {return mbReadonly;};
+
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+ inline const bool IsMouseOverSidebarWin() const { return mbMouseOver; }
+
+ void SetLanguage(const SvxLanguageItem aNewItem);
+
+ void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ protected:
+ virtual void DataChanged( const DataChangedEvent& aEvent);
+ virtual void LoseFocus();
+ virtual void Paint( const Rectangle& rRect);
+ virtual void GetFocus();
+ virtual MenuButton* CreateMenuButton() = 0;
+
+ void SetSizePixel( const Size& rNewSize );
+ SfxItemSet DefaultItem();
+
+ DECL_LINK(ModifyHdl, void*);
+ DECL_LINK(ScrollHdl, ScrollBar*);
+ DECL_LINK(DeleteHdl, void*);
+
+ inline SwView& DocView() { return mrView;}
+ inline SwPostItMgr& Mgr() { return mrMgr; }
+ inline Outliner* Engine() { return mpOutliner;}
+
+ private:
+ SwSidebarWin* GetTopReplyNote();
+
+ virtual SvxLanguageItem GetLanguage(void);
+
+ SwPostItMgr& mrMgr;
+ SwView& mrView;
+ const SwPostItBits nFlags;
+
+ ULONG mnEventId;
+
+ OutlinerView* mpOutlinerView;
+ Outliner* mpOutliner;
+
+ sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
+ ScrollBar* mpVScrollbar;
+ Edit* mpMetadataAuthor;
+ Edit* mpMetadataDate;
+ MenuButton* mpMenuButton;
+
+ sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
+ sw::sidebarwindows::ShadowOverlayObject* mpShadow;
+
+ Color mColorAnchor;
+ Color mColorDark;
+ Color mColorLight;
+ Color mChangeColor;
+
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
+
+ Rectangle mPosSize;
+ SwRect mAnchorRect;
+ long mPageBorder;
+
+ bool mbMouseOver;
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+
+ bool mbReadonly;
+ bool mbIsFollow;
+
+ SwSidebarItem& mrSidebarItem;
+ const SwFrm* mpAnchorFrm;
+};
+
+} } // eof namespace sw::sidebarwindows
+
+
+// implementation for change tracking comments, fully functional, but not yet used
+/*
+class SwRedComment : public SwSidebarWin
+{
+ private:
+ SwRedline* pRedline;
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ public:
+ 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();
+};
+*/
+
+#endif
diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx
new file mode 100644
index 0000000000..8b86f87edf
--- /dev/null
+++ b/sw/inc/SidebarWindowsTypes.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SIDEBARWINDOWSTYPES_HXX
+#define _SIDEBARWINDOWSTYPES_HXX
+
+namespace sw { namespace sidebarwindows {
+
+enum ViewState
+{
+ VS_NORMAL,
+ VS_VIEW,
+ VS_EDIT
+};
+
+enum SidebarPosition
+{
+ SIDEBAR_LEFT, // sidebar on left side
+ SIDEBAR_RIGHT, // sidebar on right side
+ SIDEBAR_NONE // sidebar on neither side
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
index f1215375fb..b6c6bb3008 100644
--- a/sw/inc/access.hrc
+++ b/sw/inc/access.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,28 +30,29 @@
#include "rcid.hrc"
-// --> OD 2004-09-27 #117970# - remove STR_ACCESS_PARAGRAPH_NAME, STR_ACCESS_HEADING_NAME
-// STR_ACCESS_PARAGRAPH_DESC and STR_ACCESS_HEADING_DESC
-#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1)
-#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2)
-#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3)
-#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4)
-#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5)
-#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6)
-#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7)
+#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1)
+#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2)
+#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3)
+#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4)
+#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5)
+#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6)
+#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7)
#define STR_ACCESS_FOOTNOTE_NAME (RC_ACCESS_BEGIN + 8)
#define STR_ACCESS_FOOTNOTE_DESC (RC_ACCESS_BEGIN + 9)
-#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10)
-#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11)
-#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12)
-#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13)
-#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14)
+#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10)
+#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11)
+#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12)
+#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13)
+#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14)
#define STR_ACCESS_TABLE_DESC (RC_ACCESS_BEGIN + 15)
#define STR_ACCESS_PAGE_NAME (RC_ACCESS_BEGIN + 16)
#define STR_ACCESS_PAGE_DESC (RC_ACCESS_BEGIN + 17)
-// <--
+#define STR_ACCESS_ANNOTATION_AUTHOR_NAME (RC_ACCESS_BEGIN + 18)
+#define STR_ACCESS_ANNOTATION_DATE_NAME (RC_ACCESS_BEGIN + 19)
+#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20)
+#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21)
-#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC
+#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC
#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 5137cdbe34..38cc40fd80 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -33,14 +33,15 @@
#include <vos/mutex.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
#include <svx/IAccessibleParent.hxx>
-#include "viewsh.hxx"
#include <tools/debug.hxx>
#include <tools/fract.hxx>
#include <vector>
+class ViewShell;
class Rectangle;
class SwFrm;
+class SwTxtFrm;
class SwPageFrm;
class SwAccessibleContext;
class SwAccessibleContextMap_Impl;
@@ -48,85 +49,17 @@ class SwAccessibleEventList_Impl;
class SwAccessibleEventMap_Impl;
class SwShapeList_Impl;
class SdrObject;
-namespace accessibility { class AccessibleShape; }
+namespace accessibility {
+ class AccessibleShape;
+}
class SwAccessibleShapeMap_Impl;
struct SwAccessibleEvent_Impl;
-// --> OD 2005-12-13 #i27301#
class SwAccessibleSelectedParas_Impl;
-// <--
class SwRect;
class MapMode;
class SwAccPreviewData;
-// OD 14.01.2003 #103492#
-#ifndef _PREVWPAGE_HXX
-#include <prevwpage.hxx>
-#endif
-
-// helper class that stores preview data
-class SwAccPreviewData
-{
- typedef std::vector<Rectangle> Rectangles;
- Rectangles maPreviewRects;
- Rectangles maLogicRects;
-
- SwRect maVisArea;
- Fraction maScale;
-
- const SwPageFrm *mpSelPage;
-
- /** adjust logic page retangle to its visible part
-
- OD 17.01.2003 #103492#
-
- @author OD
-
- @param _iorLogicPgSwRect
- input/output parameter - reference to the logic page rectangle, which
- has to be adjusted.
-
- @param _rPrevwPgSwRect
- input parameter - constant reference to the corresponding preview page
- rectangle; needed to determine the visible part of the logic page rectangle.
-
- @param _rPrevwWinSize
- input paramter - constant reference to the preview window size in TWIP;
- needed to determine the visible part of the logic page rectangle
- */
- void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
- const SwRect& _rPrevwPgSwRect,
- const Size& _rPrevwWinSize );
-
-public:
- SwAccPreviewData();
- ~SwAccPreviewData();
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void Update( const std::vector<PrevwPage*>& _rPrevwPages,
- const Fraction& _rScale,
- const SwPageFrm* _pSelectedPageFrm,
- const Size& _rPrevwWinSize );
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
-
- const SwRect& GetVisArea() const;
-
- MapMode GetMapModeForPreview( ) const;
-
- /** Adjust the MapMode so that the preview page appears at the
- * proper position. rPoint identifies the page for which the
- * MapMode should be adjusted. If bFromPreview is true, rPoint is
- * a preview coordinate; else it's a document coordinate. */
- // OD 17.01.2003 #103492# - delete unused 3rd parameter.
- void AdjustMapMode( MapMode& rMapMode,
- const Point& rPoint ) const;
-
- inline const SwPageFrm *GetSelPage() const { return mpSelPage; }
-
- void DisposePage(const SwPageFrm *pPageFrm );
-};
+struct PrevwPage;
+class Window;
// real states for events
#define ACC_STATE_EDITABLE 0x01
@@ -154,7 +87,7 @@ typedef sal_uInt16 tAccessibleStates;
class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
public accessibility::IAccessibleParent
{
- ::vos::OMutex maMutex;
+ mutable ::vos::OMutex maMutex;
::vos::OMutex maEventMutex;
SwAccessibleContextMap_Impl *mpFrmMap;
SwAccessibleShapeMap_Impl *mpShapeMap;
@@ -246,14 +179,7 @@ public:
return mpVSh;
}
- inline const SwRect& GetVisArea() const
- {
- DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
- "preview without preview data?" );
- return GetShell()->IsPreView()
- ? mpPreview->GetVisArea()
- : GetShell()->VisArea();
- }
+ const SwRect& GetVisArea() const;
/** get size of a dedicated preview page
@@ -274,10 +200,14 @@ public:
void RemoveContext( const SdrObject *pObj );
// Dispose frame and its children if bRecursive is set
- void Dispose( const SwFrm *pFrm, const SdrObject *pObj,
- sal_Bool bRecursive=sal_False );
-
- void InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj,
+ void Dispose( const SwFrm* pFrm,
+ const SdrObject* pObj,
+ Window* pWindow,
+ sal_Bool bRecursive = sal_False );
+
+ void InvalidatePosOrSize( const SwFrm* pFrm,
+ const SdrObject* pObj,
+ Window* pWindow,
const SwRect& rOldFrm );
void InvalidateContent( const SwFrm *pFrm );
@@ -333,6 +263,9 @@ public:
*/
void InvalidateTextSelectionOfAllParas();
+ sal_Int32 GetChildIndex( const SwFrm& rParentFrm,
+ Window& rChild ) const;
+
// update preview data (and fire events if necessary)
// OD 15.01.2003 #103492# - complete re-factoring of method due to new
// page/print preview functionality.
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index b272292f82..88b6712612 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -476,7 +476,7 @@ public:
void EndTextEdit(); //Loescht ggf. das Objekt.
//Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
- //Rahmenselektion; FLY_PAGE bzw. FLY_AT_CNTNT aus frmatr.hxx sonst.
+ //Rahmenselektion; FLY_AT_PAGE bzw. FLY_AT_PARA aus frmatr.hxx sonst.
short GetAnchorId() const;
//Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx
deleted file mode 100644
index e5484741d9..0000000000
--- a/sw/inc/postit.hxx
+++ /dev/null
@@ -1,413 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _POSTIT_HXX
-#define _POSTIT_HXX
-
-#include <postithelper.hxx>
-
-#include <vcl/window.hxx>
-#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 <editeng/editstat.hxx>
-
-class SwPostItMgr;
-class SwPostItField;
-class SwFmtFld;
-class OutlinerView;
-class Outliner;
-class ScrollBar;
-class SwEditWin;
-class SwView;
-class SwPostIt;
-class Edit;
-class MultiLineEdit;
-class PopupMenu;
-class SvxLanguageItem;
-class SwRedline;
-class OutlinerParaObject;
-
-#define ANKORLINE_WIDTH 1
-
-enum AnkorState {AS_ALL, AS_START, AS_END,AS_TRI};
-
-class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
-{
- protected:
- /* 6------------7
- 1 /
- /4\ ---------------5
- 2 - 3
- */
-
- basegfx::B2DPoint maSecondPosition;
- basegfx::B2DPoint maThirdPosition;
- basegfx::B2DPoint maFourthPosition;
- basegfx::B2DPoint maFifthPosition;
- basegfx::B2DPoint maSixthPosition;
- basegfx::B2DPoint maSeventhPosition;
-
- // helpers to fill and reset geometry
- void implEnsureGeometry();
- void implResetGeometry();
-
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
- private:
- // object's geometry
- basegfx::B2DPolygon maTriangle;
- basegfx::B2DPolygon maLine;
- basegfx::B2DPolygon maLineTop;
- unsigned long mHeight;
- AnkorState mAnkorState;
-
- // bitfield
- unsigned mbShadowedEffect : 1;
- unsigned mbLineSolid : 1;
-
- public:
- SwPostItAnkor(const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos,
- const basegfx::B2DPoint& rFourthPos,
- const basegfx::B2DPoint& rFifthPos,
- const basegfx::B2DPoint& rSixthPos,
- const basegfx::B2DPoint& rSeventhPos,
- Color aBaseColor,
- bool bShadowedEffect,
- bool bLineSolid);
- virtual ~SwPostItAnkor();
-
- const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
- const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; }
- const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; }
- const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; }
- const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; }
- const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; }
-
- void SetAllPosition(const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2, const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4, const basegfx::B2DPoint& rPoint5, const basegfx::B2DPoint& rPoint6, const basegfx::B2DPoint& rPoint7);
- void SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5);
- void SetSixthPosition(const basegfx::B2DPoint& rNew);
- void SetSeventhPosition(const basegfx::B2DPoint& rNew);
-
- bool getLineSolid() const { return mbLineSolid; }
- void setLineSolid(bool bNew);
-
- void SetHeight(const unsigned long aHeight) {mHeight = aHeight;};
-
- bool getShadowedEffect() const { return mbShadowedEffect; }
-
- void SetAnkorState(AnkorState aState);
- AnkorState GetAnkorState() const {return mAnkorState;}
-};
-
-enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT};
-
-class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition
-{
- protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
- private:
- basegfx::B2DPoint maSecondPosition;
- ShadowState mShadowState;
-
- public:
- SwPostItShadow(const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, Color aBaseColor,ShadowState aState);
- virtual ~SwPostItShadow();
-
- void SetShadowState(ShadowState aState);
- ShadowState GetShadowState() {return mShadowState;}
-
- const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
- void SetSecondPosition(const basegfx::B2DPoint& rNew);
- void SetPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2);
-};
-
-class PostItTxt : public Window
-{
- private:
- OutlinerView* mpOutlinerView;
- SwMarginWin* mpMarginWin;
-
- bool mMouseOver;
- BOOL mbShowPopup;
-
- protected:
- virtual void Paint( const Rectangle& rRect);
- virtual void KeyInput( const KeyEvent& rKeyEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void Command( const CommandEvent& rCEvt );
- virtual void DataChanged( const DataChangedEvent& aData);
- virtual void LoseFocus();
- virtual void RequestHelp(const HelpEvent &rEvt);
- virtual XubString GetSurroundingText() const;
- virtual Selection GetSurroundingTextSelection() const;
-
- DECL_LINK( Select, Menu* );
-
- public:
- PostItTxt(Window* pParent, WinBits nBits);
- ~PostItTxt();
-
- virtual void GetFocus();
- void SetTextView( OutlinerView* aEditView ) { mpOutlinerView = aEditView; }
-
- DECL_LINK( WindowEventListener, VclSimpleEvent* );
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
-};
-
-typedef sal_Int64 SwPostItBits;
-
-#define PB_Preview ((SwPostItBits)0x00000001)
-
-
-class SwMarginWin : public Window
-{
- private:
- ULONG mnEventId;
- SwView* mpView;
- sdr::overlay::OverlayManager* pOverlayManager;
- OutlinerView* mpOutlinerView;
- Outliner* mpOutliner;
- PostItTxt* mpPostItTxt;
- MultiLineEdit* mpMeta;
- ScrollBar* mpVScrollbar;
- SwPostItAnkor* mpAnkor;
- SwPostItShadow* mpShadow;
- SwPostItMgr* mpMgr;
- bool mbMeta;
- Color mColorAnkor;
- Color mColorDark;
- Color mColorLight;
- basegfx::B2DPolygon aPopupTriangle;
- bool mbMarginSide;
- Rectangle mPosSize;
- SwRect mAnkorRect;
- long mPageBorder;
- SwPostItBits nFlags;
- bool mbMouseOverButton;
-
- protected:
- bool mbReadonly;
- PopupMenu* mpButtonPopup;
- bool mbIsFollow;
- Rectangle mRectMetaButton;
- 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 SetSizePixel( const Size& rNewSize );
- SfxItemSet DefaultItem();
-
- DECL_LINK(ModifyHdl, void*);
- DECL_LINK(ScrollHdl, ScrollBar*);
- DECL_LINK(DeleteHdl, void*);
-
- public:
- 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 SetPosAndSize();
- void TranslateTopPosition(const long aAmount);
- virtual void CheckMetaText();
-
- PostItTxt* PostItText() { return mpPostItTxt;}
- ScrollBar* Scrollbar() { return mpVScrollbar;}
- SwPostItAnkor* Ankor() { return mpAnkor;}
- SwPostItShadow* Shadow() { return mpShadow;}
- OutlinerView* View() { return mpOutlinerView;}
- SwView* DocView() { return mpView;}
- Outliner* Engine() { return mpOutliner;}
- SwPostItMgr* Mgr() { return mpMgr; }
-
- SwRect GetAnkorRect() { return mAnkorRect; }
- SwEditWin* EditWin();
-
- long GetPostItTextHeight();
-
- void SwitchToPostIt(USHORT aDirection);
- //void SwitchToPostIt(bool aDirection);
- 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;
-
- 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);
- void SetScrollbar();
-
- void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
- const Point VirtualPos() { return mPosSize.TopLeft(); }
- const Size VirtualSize() { return mPosSize.GetSize(); }
-
- void ShowAnkorOnly(const Point &aPoint);
- void ShowNote();
- void HideNote();
-
- void ResetAttributes();
-
- 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 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();
- sal_Int32 GetMinimumSizeWithoutMeta();
- sal_Int32 GetMetaButtonAreaWidth();
- sal_Int32 GetScrollbarWidth();
-
- void SetSpellChecking();
-
- 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);
- virtual SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; }
- Color GetChangeColor() { return mChangeColor; }
-
- sal_uInt32 CountFollowing();
- virtual bool CalcFollow();
- void InitAnswer(OutlinerParaObject* pText);
-
- virtual SvxLanguageItem GetLanguage(void);
-
- virtual bool IsProtected();
-};
-
-#endif
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 7ef25ede3c..560cdd143a 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,14 +32,18 @@
#include <redline.hxx>
#include <vector>
#include <vcl/window.hxx>
+#include <SidebarWindowsTypes.hxx>
#include <svl/brdcst.hxx>
class SwTxtFld;
class SwRootFrm;
class SwPostIt;
class String;
-class SwMarginWin;
class SwPostItMgr;
+class SwEditWin;
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+} }
struct SwPosition;
@@ -47,12 +51,23 @@ typedef sal_Int64 SwPostItBits;
struct SwLayoutInfo
{
+ const SwFrm* mpAnchorFrm;
SwRect mPosition;
SwRect mPageFrame;
SwRect mPagePrtArea;
unsigned long mnPageNumber;
- bool mbMarginSide;
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
USHORT mRedlineAuthor;
+
+ SwLayoutInfo()
+ : mpAnchorFrm(0)
+ , mPosition()
+ , mPageFrame()
+ , mPagePrtArea()
+ , mnPageNumber(1)
+ , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE)
+ , mRedlineAuthor(0)
+ {}
};
namespace SwPostItHelper
@@ -69,71 +84,77 @@ namespace SwPostItHelper
unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
}
-class SwMarginItem
+class SwSidebarItem
{
public:
- SwMarginWin* pPostIt;
+ sw::sidebarwindows::SwSidebarWin* pPostIt;
bool bShow;
bool bFocus;
- bool bMarginSide;
- SwRect mPos;
- SwRect mFramePos;
- SwRect mPagePos;
- unsigned long mnPageNumber;
+
SwPostItHelper::SwLayoutStatus mLayoutStatus;
- USHORT mRedlineAuthor;
- SwMarginItem(bool aShow, bool aFocus)
- : pPostIt(0),
- bShow(aShow),
- bFocus(aFocus),
- bMarginSide(false),
- mnPageNumber(1),
- mLayoutStatus( SwPostItHelper::INVISIBLE ),
- mRedlineAuthor(0)
+ SwLayoutInfo maLayoutInfo;
+
+ SwSidebarItem( const bool aShow,
+ const bool aFocus)
+ : pPostIt(0)
+ , bShow(aShow)
+ , bFocus(aFocus)
+ , mLayoutStatus( SwPostItHelper::INVISIBLE )
+ , maLayoutInfo()
{}
- virtual ~SwMarginItem(){}
- virtual SwPosition GetPosition() = 0;
+ virtual ~SwSidebarItem(){}
+ virtual SwPosition GetAnchorPosition() const = 0;
virtual bool UseElement() = 0;
- virtual SwFmtFld* GetFmtFld() = 0;
+ virtual SwFmtFld* GetFmtFld() const = 0;
virtual SfxBroadcaster* GetBroadCaster() const = 0;
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) = 0;
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits) = 0;
};
/*
-class SwRedCommentItem: public SwMarginItem
+class SwRedCommentItem: public SwSidebarItem
{
private:
SwRedline* pRedline;
public:
- SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
- : SwMarginItem(aShow,aFocus),
+ SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
+ : SwSidebarItem(aShow,aFocus),
pRedline(pRed) {}
virtual ~SwRedCommentItem() {}
- virtual SwPosition GetPosition();
+ virtual SwPosition GetAnchorPosition() const;
virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() {return 0; }
+ virtual SwFmtFld* GetFmtFld() const {return 0; }
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
};
*/
-class SwPostItItem: public SwMarginItem
+class SwAnnotationItem: public SwSidebarItem
{
private:
SwFmtFld* pFmtFld;
public:
- SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus)
- : SwMarginItem(aShow,aFocus) ,
- pFmtFld(p)
- {
- }
- virtual ~SwPostItItem() {}
- virtual SwPosition GetPosition();
+ SwAnnotationItem( SwFmtFld* p,
+ const bool aShow,
+ const bool aFocus)
+ : SwSidebarItem( aShow, aFocus )
+ , pFmtFld(p)
+ {}
+ virtual ~SwAnnotationItem() {}
+ virtual SwPosition GetAnchorPosition() const;
virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() {return pFmtFld;}
+ virtual SwFmtFld* GetFmtFld() const {return pFmtFld;}
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
};
#endif // _POSTITHELPER_HXX
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index c5f7d7d6d0..e5cd3e1ace 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,6 +78,7 @@
#define RC_UNDO (RC_BASE + 3750)
#define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS
#define RC_UNOCORE (RC_BASE + 4050)
+#define RC_ANNOTATION (RC_BASE + 4150)
/*--------------------------------------------------------------------
Beschreibung: Bereiche ausspannen
@@ -87,8 +88,6 @@
#define RC_APP_BEGIN RC_APP
#define RC_APP_END (RC_APP_BEGIN + 199)
-
-
// Dialog-Verzeichnis
#define RC_DIALOG_BEGIN RC_DIALOG
#define RC_DIALOG_END (RC_DIALOG_BEGIN + 99)
@@ -97,6 +96,10 @@
#define RC_DOCVW_BEGIN RC_DOCVW
#define RC_DOCVW_END (RC_DOCVW_BEGIN + 99)
+// Annotation
+#define RC_ANNOTATION_BEGIN RC_ANNOTATION
+#define RC_ANNOTATION_END (RC_ANNOTATION_BEGIN + 99)
+
// SW/Web
#define RC_WEB_BEGIN RC_WEB
#define RC_WEB_END (RC_WEB_BEGIN + 199)
diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 3d1ef30711..12e245791f 100644
--- a/sw/inc/sw_primitivetypes2d.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,9 +34,9 @@
//////////////////////////////////////////////////////////////////////////////
-#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
-#define PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
-#define PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
+#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
+#define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
+#define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
//////////////////////////////////////////////////////////////////////////////
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
index 33c497e79e..98bb3416d3 100644
--- a/sw/inc/unotextmarkup.hxx
+++ b/sw/inc/unotextmarkup.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,6 @@ namespace com { namespace sun { namespace star { namespace container {
} } } }
class SwTxtNode;
-class SwWrongList;
class SfxPoolItem;
/** Implementation of the css::text::XTextMarkup interface
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 4ed3eab196..0744eb53ee 100755
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -77,19 +77,15 @@ struct ShellResource;
class SwRegionRects;
class SwFrm;
class SvtAccessibilityOptions;
-// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
-// --> OD 2005-12-01 #i27138#
class SwTxtFrm;
-// <--
class BitmapEx;
struct SwAccessibilityOptions;
class Region;
class SwPostItMgr;
-
-// #i74769#
class SdrPaintWindow;
+class SwAccessibleMap;
namespace vcl
{
@@ -264,7 +260,7 @@ public:
sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
- const SwRect &VisArea() const { return aVisArea; }
+ const SwRect& VisArea() const { return aVisArea; }
//Es wird, wenn notwendig, soweit gescrollt, dass das
//uebergebene Rect im sichtbaren Ausschnitt liegt.
void MakeVisible( const SwRect & );
@@ -557,9 +553,11 @@ public:
*/
void InvalidateAccessibleParaTextSelection();
- /** invalidate attributes for paragraphs
+ /** invalidate attributes for paragraphs and paragraph's characters
OD 2009-01-06 #i88069#
+ OD 2010-02-16 #i104008# - usage also for changes of the attributes of
+ paragraph's characters.
@author OD
@@ -568,6 +566,8 @@ public:
*/
void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+ SwAccessibleMap* GetAccessibleMap();
+
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
long nFlags = 0 );
ViewShell( SwDoc& rDoc, Window *pWin,