Author: vfr
Date: Mon Jan 10 10:38:20 2011
New Revision: 37160
URL: http://www.lyx.org/trac/changeset/37160
Log:
Cursor: constify.
Modified:
lyx-devel/trunk/src/Cursor.cpp
lyx-devel/trunk/src/Cursor.h
lyx-devel/trunk/src/CutAndPaste.cpp
Modified: lyx-devel/trunk/src/Cursor.cpp
==============================================================================
--- lyx-devel/trunk/src/Cursor.cpp Mon Jan 10 01:06:36 2011 (r37159)
+++ lyx-devel/trunk/src/Cursor.cpp Mon Jan 10 10:38:20 2011 (r37160)
@@ -2132,31 +2132,31 @@
}
-void Cursor::undispatched()
+void Cursor::undispatched() const
{
disp_.dispatched(false);
}
-void Cursor::dispatched()
+void Cursor::dispatched() const
{
disp_.dispatched(true);
}
-void Cursor::screenUpdateFlags(Update::flags f)
+void Cursor::screenUpdateFlags(Update::flags f) const
{
disp_.screenUpdate(f);
}
-void Cursor::forceBufferUpdate()
+void Cursor::forceBufferUpdate() const
{
disp_.forceBufferUpdate();
}
-void Cursor::clearBufferUpdate()
+void Cursor::clearBufferUpdate() const
{
disp_.clearBufferUpdate();
}
@@ -2168,7 +2168,7 @@
}
-void Cursor::noScreenUpdate()
+void Cursor::noScreenUpdate() const
{
disp_.screenUpdate(Update::None);
}
Modified: lyx-devel/trunk/src/Cursor.h
==============================================================================
--- lyx-devel/trunk/src/Cursor.h Mon Jan 10 01:06:36 2011 (r37159)
+++ lyx-devel/trunk/src/Cursor.h Mon Jan 10 10:38:20 2011 (r37160)
@@ -225,15 +225,15 @@
* Right Thing (even if my getStatus partner said that I can do it).
* It is sort of a kludge that should be used only rarely...
*/
- void undispatched();
+ void undispatched() const;
/// the event was already dispatched
- void dispatched();
+ void dispatched() const;
/// Set which screen update should be done
- void screenUpdateFlags(Update::flags f);
+ void screenUpdateFlags(Update::flags f) const;
/// Forces an updateBuffer() call
- void forceBufferUpdate();
+ void forceBufferUpdate() const;
/// Removes any pending updateBuffer() call
- void clearBufferUpdate();
+ void clearBufferUpdate() const;
/// Do we need to call updateBuffer()?
bool needBufferUpdate() const;
/**
@@ -246,7 +246,7 @@
* This is a fairly rare event as well and only some optimization.
* Not using noScreenUpdate() should never be wrong.
*/
- void noScreenUpdate();
+ void noScreenUpdate() const;
/// fix cursor in circumstances that should never happen.
/// \retval true if a fix occured.
bool fixIfBroken();
Modified: lyx-devel/trunk/src/CutAndPaste.cpp
==============================================================================
--- lyx-devel/trunk/src/CutAndPaste.cpp Mon Jan 10 01:06:36 2011 (r37159)
+++ lyx-devel/trunk/src/CutAndPaste.cpp Mon Jan 10 10:38:20 2011 (r37160)
@@ -97,7 +97,7 @@
pair<PitPosPair, pit_type>
-pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
+pasteSelectionHelper(Cursor const & cur, ParagraphList const & parlist,
DocumentClass const * const oldDocClass, ErrorList &
errorlist)
{
Buffer const & buffer = *cur.buffer();