summaryrefslogtreecommitdiff
path: root/sw/inc/swcrsr.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2010-12-01 15:49:10 +0100
committerLuboš Luňák <l.lunak@suse.cz>2010-12-01 15:49:10 +0100
commit0e9523e3c5fb34e5ca6aacc676efa59675f86e88 (patch)
treef20a46481b1fe34d22c0e3b83d1061fec349d915 /sw/inc/swcrsr.hxx
parentfe40a2a43d1eaf03b3e2172a3f33d627dba6b633 (diff)
document SwCrsrSaveState usage
Diffstat (limited to 'sw/inc/swcrsr.hxx')
-rw-r--r--sw/inc/swcrsr.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 14878734d615..bbd51c90436d 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -207,7 +207,8 @@ public:
BOOL bChgCrsr = TRUE );
BOOL IsNoCntnt() const;
- void RestoreSavePos(); // Point auf die SavePos setzen
+ /** Restore cursor state to the one saved by SwCrsrSaveState **/
+ void RestoreSavePos();
// TRUE: an die Position kann der Cursor gesetzt werden
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
@@ -231,6 +232,13 @@ public:
};
+/**
+ A helper class to save cursor state (position). Create SwCrsrSaveState
+ object to save current state, use SwCursor::RestoreSavePos() to actually
+ restore cursor state to the saved state (SwCrsrSaveState destructor only
+ removes the saved state from an internal stack). It is possible to stack
+ several SwCrsrSaveState objects.
+**/
class SwCrsrSaveState
{
SwCursor& rCrsr;
@@ -239,6 +247,7 @@ public:
~SwCrsrSaveState() { rCrsr.RestoreState(); }
};
+// internal, used by SwCursor::SaveState() etc.
struct _SwCursor_SavePos
{
ULONG nNode;