summaryrefslogtreecommitdiff
path: root/sw/inc/PostItMgr.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-13 14:09:50 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-13 14:09:50 +0000
commit02280bac14369d1fb3cea6e3b8d342ca56f96493 (patch)
tree999eeda1c1ebc8eb390665c0b95f08d9c7cc8885 /sw/inc/PostItMgr.hxx
parent19203faa44439b953d670ca169d1f1900e937463 (diff)
CWS-TOOLING: integrate CWS notes8
2009-01-23 17:44:41 +0100 mba r266842 : #i98275#: start speller before setting text 2009-01-23 10:19:47 +0100 mod r266776 : minor cleanup 2009-01-22 16:45:38 +0100 mod r266742 : no looping through notes while saving 2009-01-22 16:40:55 +0100 mod r266741 : #i98055# 2009-01-22 15:56:27 +0100 os r266731 : #98358# dummy strings now hidden 2009-01-22 09:31:16 +0100 mod r266713 : correct hiding and layout order 2009-01-22 09:21:23 +0100 mod r266712 : need a speller 2009-01-21 17:21:33 +0100 mod r266691 : notes config 2009-01-21 17:18:23 +0100 mod r266690 : fix for editing states 2009-01-21 17:18:14 +0100 mod r266689 : fix for editing states 2009-01-20 14:15:16 +0100 mod r266578 : undo fix, mba will fix it by importing the props 2009-01-20 00:36:01 +0100 mod r266537 : do not show ankor of top reply note if we are still inside a note inside the same stack 2009-01-20 00:33:48 +0100 mod r266536 : fix typo which does not need to be translated 2009-01-20 00:17:19 +0100 mod r266535 : correct replacment of reply text 2009-01-19 23:36:12 +0100 mod r266534 : #i97693# 2009-01-19 23:32:26 +0100 mod r266533 : #i97380# 2009-01-19 23:30:05 +0100 mod r266532 : #i97380# 2009-01-19 23:21:35 +0100 mod r266531 : #i97299#
Diffstat (limited to 'sw/inc/PostItMgr.hxx')
-rw-r--r--sw/inc/PostItMgr.hxx56
1 files changed, 50 insertions, 6 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index ce3b1866007d..33f73b1ba932 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -39,7 +39,7 @@
#include <tools/string.hxx>
#include <tools/link.hxx>
#include <swrect.hxx>
-
+#include <unotools/configitem.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
class SwWrtShell;
@@ -66,6 +66,11 @@ class SwMarginItem;
#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
typedef std::list<SwMarginItem*> SwMarginItem_list;
+typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
struct SwPostItPageItem
{
@@ -96,7 +101,43 @@ struct FieldShadowState
}
};
-typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator;
+class SwNoteProps: public utl::ConfigItem
+{
+ private:
+ bool bIsShowAnkor;
+ public:
+ SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")), bIsShowAnkor(false)
+ {
+ const Sequence<OUString>& rNames = GetPropertyNames();
+ Sequence<Any> aValues = GetProperties(rNames);
+ const Any* pValues = aValues.getConstArray();
+ DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ if (aValues.getLength())
+ pValues[0]>>=bIsShowAnkor;
+ }
+
+ bool IsShowAnkor()
+ {
+ return bIsShowAnkor;
+ }
+ Sequence<OUString>& GetPropertyNames()
+ {
+ static Sequence<OUString> aNames;
+ if(!aNames.getLength())
+ {
+ static const char* aPropNames[] =
+ {
+ "ShowAnkor"
+ };
+ const int nCount = sizeof(aPropNames)/sizeof(const char*);
+ aNames.realloc(nCount);
+ OUString* pNames = aNames.getArray();
+ for(int i = 0; i < nCount; i++)
+ pNames[i] = OUString::createFromAscii(aPropNames[i]);
+ }
+ return aNames;
+ }
+};
class SwPostItMgr: public SfxListener
{
@@ -116,6 +157,7 @@ class SwPostItMgr: public SfxListener
bool mbDeleteNote;
FieldShadowState mShadowState;
OutlinerParaObject* mpAnswer;
+ bool mpIsShowAnkor;
typedef std::list<SwMarginWin*>::iterator SwMarginWin_iterator;
@@ -128,9 +170,9 @@ class SwPostItMgr: public SfxListener
bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
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;
+ 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;
@@ -161,6 +203,7 @@ class SwPostItMgr: public SfxListener
bool ShowScrollbar(const unsigned long aPage) const;
bool HasNotes() const ;
bool ShowNotes() const;
+ bool IsShowAnkor() { return mpIsShowAnkor;}
unsigned long GetSidebarWidth(bool bPx = false) const;
unsigned long GetSidebarBorderWidth(bool bPx = false) const;
unsigned long GetNoteWidth();
@@ -212,9 +255,10 @@ class SwPostItMgr: public SfxListener
void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
OutlinerParaObject* IsAnswer() {return mpAnswer;}
+ void CheckMetaText();
+ void StartSpelling();
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);
};