From be0dd890197624f5722b875e288766150090188a Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Fri, 28 Apr 2006 07:28:10 +0000 Subject: [PATCH] Change capitalization for outline (DOWN -> Down etc.) * BufferView_pimpl.C (BufferView::Pimpl::dispatch): change * frontends/controllers/ControlToc.C (ControlToc::outline): replace by outlineUp ... outlineOut * toc.[Ch] (outline): change * frontends/qt3/QToc.C (QToc::set_depth): change git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13772 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 8 +++--- src/frontends/controllers/ControlToc.C | 35 +++++++++++++++----------- src/frontends/qt3/QToc.C | 8 +++--- src/toc.C | 8 +++--- src/toc.h | 8 +++--- 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 421942ae41..2c8745c3ce 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -1235,21 +1235,21 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd) } case LFUN_OUTLINE_UP: - lyx::toc::outline(lyx::toc::UP, cursor_); + lyx::toc::outline(lyx::toc::Up, cursor_); cursor_.text()->setCursor(cursor_, cursor_.pit(), 0); updateLabels(*buffer_); break; case LFUN_OUTLINE_DOWN: - lyx::toc::outline(lyx::toc::DOWN, cursor_); + lyx::toc::outline(lyx::toc::Down, cursor_); cursor_.text()->setCursor(cursor_, cursor_.pit(), 0); updateLabels(*buffer_); break; case LFUN_OUTLINE_IN: - lyx::toc::outline(lyx::toc::IN, cursor_); + lyx::toc::outline(lyx::toc::In, cursor_); updateLabels(*buffer_); break; case LFUN_OUTLINE_OUT: - lyx::toc::outline(lyx::toc::OUT, cursor_); + lyx::toc::outline(lyx::toc::Out, cursor_); updateLabels(*buffer_); break; diff --git a/src/frontends/controllers/ControlToc.C b/src/frontends/controllers/ControlToc.C index 8ccc1c0162..fae3cf7458 100644 --- a/src/frontends/controllers/ControlToc.C +++ b/src/frontends/controllers/ControlToc.C @@ -45,22 +45,27 @@ bool ControlToc::canOutline(string const & type) } -void ControlToc::outline(toc::OutlineOp op) +void ControlToc::outlineUp() { - switch (op) { - case toc::UP: - kernel().dispatch(FuncRequest(LFUN_OUTLINE_UP)); - break; - case toc::DOWN: - kernel().dispatch(FuncRequest(LFUN_OUTLINE_DOWN)); - break; - case toc::IN: - kernel().dispatch(FuncRequest(LFUN_OUTLINE_IN)); - break; - case toc::OUT: - kernel().dispatch(FuncRequest(LFUN_OUTLINE_OUT)); - break; - } + kernel().dispatch(FuncRequest(LFUN_OUTLINE_UP)); +} + + +void ControlToc::outlineDown() +{ + kernel().dispatch(FuncRequest(LFUN_OUTLINE_DOWN)); +} + + +void ControlToc::outlineIn() +{ + kernel().dispatch(FuncRequest(LFUN_OUTLINE_IN)); +} + + +void ControlToc::outlineOut() +{ + kernel().dispatch(FuncRequest(LFUN_OUTLINE_OUT)); } diff --git a/src/frontends/qt3/QToc.C b/src/frontends/qt3/QToc.C index 929d2bf085..4cdd0db3de 100644 --- a/src/frontends/qt3/QToc.C +++ b/src/frontends/qt3/QToc.C @@ -223,28 +223,28 @@ void QToc::set_depth(int depth) void QToc::moveup() { - controller().outline(toc::UP); + controller().outlineUp(); updateToc(depth_); } void QToc::movedn() { - controller().outline(toc::DOWN); + controller().outlineDown(); updateToc(depth_); } void QToc::movein() { - controller().outline(toc::IN); + controller().outlineIn(); updateToc(depth_); } void QToc::moveout() { - controller().outline(toc::OUT); + controller().outlineOut(); updateToc(depth_); } diff --git a/src/toc.C b/src/toc.C index c2d1d789ea..9cc013ecb5 100644 --- a/src/toc.C +++ b/src/toc.C @@ -143,7 +143,7 @@ void outline(OutlineOp mode, LCursor & cur) int const thistoclevel = s->layout()->toclevel; int toclevel; switch (mode) { - case UP: { + case Up: { if (p != end) ++p; for (; p != end; ++p) { @@ -175,7 +175,7 @@ void outline(OutlineOp mode, LCursor & cur) pars.erase(s, t); break; } - case DOWN: { + case Down: { if (p != end) ++p; for (; p != end; ++p) { @@ -206,7 +206,7 @@ void outline(OutlineOp mode, LCursor & cur) pars.erase(s, t); break; } - case IN: + case In: for (; lit != lend; ++lit) { if ((*lit)->toclevel == thistoclevel + 1 && s->layout()->labeltype == (*lit)->labeltype) { @@ -215,7 +215,7 @@ void outline(OutlineOp mode, LCursor & cur) } } break; - case OUT: + case Out: for (; lit != lend; ++lit) { if ((*lit)->toclevel == thistoclevel - 1 && s->layout()->labeltype == (*lit)->labeltype) { diff --git a/src/toc.h b/src/toc.h index e3d1cf982a..919d1ba282 100644 --- a/src/toc.h +++ b/src/toc.h @@ -56,10 +56,10 @@ std::string const getGuiName(std::string const & type, Buffer const &); /// the type of outline operation enum OutlineOp { - UP, // Move this header with text down - DOWN, // Move this header with text up - IN, // Make this header deeper - OUT // Make this header shallower + Up, // Move this header with text down + Down, // Move this header with text up + In, // Make this header deeper + Out // Make this header shallower }; -- 2.39.2