From 129f5b6431e03f799446c919680acff580bc39d4 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Thu, 4 Jan 2007 11:00:09 +0000 Subject: [PATCH] Get rid of InsetTabular::hasPasteBuffer. I verified that it was equivalent to cap::tabularStackDirty(). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16494 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CutAndPaste.C | 2 +- src/insets/insettabular.C | 10 ++-------- src/insets/insettabular.h | 2 -- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index 0ca4429da9..c899efac69 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -74,7 +74,7 @@ CutStack theCuts(10); // store whether the tabular stack is newer than the normal copy stack // FIXME: this is a workaround for bug 1919. Should be removed for 1.5, // when we (hopefully) have a one-for-all paste mechanism. -bool dirty_tabular_stack_; +bool dirty_tabular_stack_ = false; void region(CursorSlice const & i1, CursorSlice const & i2, diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 3e920eadf9..38e1511799 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -174,12 +174,6 @@ string const featureAsString(LyXTabular::Feature feature) } -bool InsetTabular::hasPasteBuffer() const -{ - return (paste_tabular.get() != 0); -} - - InsetTabular::InsetTabular(Buffer const & buf, row_type rows, col_type columns) : tabular(buf.params(), max(rows, row_type(1)), @@ -729,7 +723,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) } case LFUN_PASTE: - if (hasPasteBuffer() && tabularStackDirty()) { + if (tabularStackDirty()) { recordUndoInset(cur, Undo::INSERT); pasteSelection(cur); break; @@ -1802,7 +1796,7 @@ bool InsetTabular::copySelection(LCursor & cur) // mark tabular stack dirty // FIXME: this is a workaround for bug 1919. Should be removed for 1.5, // when we (hopefully) have a one-for-all paste mechanism. - cap::dirtyTabularStack(true); + dirtyTabularStack(true); return true; } diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index cb785f4b5e..d5b50b7ca3 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -177,8 +177,6 @@ private: /// void removeTabularRow(); /// - bool hasPasteBuffer() const; - /// bool copySelection(LCursor & cur); /// bool pasteSelection(LCursor & cur);