X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInset.cpp;h=397a8d0380db6f773df9689221d731b4fdde025a;hb=c0adb03a7ae15cf6409ee3cb64f4cc91c24c052e;hp=812aba5bfaa4ca8f07b6d8331d6c91f213567caf;hpb=425c190d623daeb6d05bce1aa2244b548225305a;p=lyx.git diff --git a/src/insets/Inset.cpp b/src/insets/Inset.cpp index 812aba5bfa..397a8d0380 100644 --- a/src/insets/Inset.cpp +++ b/src/insets/Inset.cpp @@ -62,7 +62,7 @@ static InsetName insetnames[INSET_CODE_SIZE]; // This list should be kept in sync with the list of dialogs in -// src/frontends/qt4/GuiView.cpp, I.e., if a dialog goes with an +// src/frontends/qt/GuiView.cpp, I.e., if a dialog goes with an // inset, the dialog should have the same name as the inset. // Changes should be also recorded in LFUN_DIALOG_SHOW doxygen // docs in LyXAction.cpp. @@ -117,7 +117,7 @@ static void build_translator() insetnames[MATH_MACROARG_CODE] = InsetName("mathmacroarg"); insetnames[LISTINGS_CODE] = InsetName("listings"); insetnames[INFO_CODE] = InsetName("info", _("Info")); - insetnames[COLLAPSABLE_CODE] = InsetName("collapsable"); + insetnames[COLLAPSIBLE_CODE] = InsetName("collapsible"); insetnames[NEWPAGE_CODE] = InsetName("newpage"); insetnames[SCRIPT_CODE] = InsetName("script"); insetnames[CELL_CODE] = InsetName("tablecell"); @@ -202,7 +202,7 @@ Buffer & Inset::buffer() << " name: " << iname); s << "LyX Code: " << lyxCode() << " name: " << from_ascii(iname); LATTEST(false); - throw ExceptionMessage(BufferException, + throw ExceptionMessage(BufferException, from_ascii("Inset::buffer_ member not initialized!"), s.str()); } return *buffer_; @@ -223,7 +223,7 @@ bool Inset::isBufferLoaded() const bool Inset::isBufferValid() const { - return buffer_ + return buffer_ && (isBufferLoaded() || buffer_->isClone()); } @@ -234,7 +234,7 @@ docstring Inset::layoutName() const } -bool Inset::isFreeSpacing() const +bool Inset::isFreeSpacing() const { return getLayout().isFreeSpacing(); } @@ -246,7 +246,7 @@ bool Inset::allowEmpty() const } -bool Inset::forceLTR() const +bool Inset::forceLTR(OutputParams const &) const { return getLayout().forceLTR(); } @@ -298,14 +298,14 @@ InsetCode insetCode(string const & name) } -string insetName(InsetCode c) +string insetName(InsetCode c) { build_translator(); return insetnames[c].name; } -docstring insetDisplayName(InsetCode c) +docstring insetDisplayName(InsetCode c) { build_translator(); return insetnames[c].display_name; @@ -316,7 +316,7 @@ void Inset::dispatch(Cursor & cur, FuncRequest & cmd) { if (buffer_ == 0) { lyxerr << "Unassigned buffer_ member in Inset::dispatch()" << std::endl; - lyxerr << "LyX Code: " << lyxCode() << " name: " + lyxerr << "LyX Code: " << lyxCode() << " name: " << insetName(lyxCode()) << std::endl; } else if (cur.buffer() != buffer_) lyxerr << "cur.buffer() != buffer_ in Inset::dispatch()" << std::endl; @@ -414,7 +414,7 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd, } case LFUN_IN_MATHMACROTEMPLATE: - // By default we're not in a MathMacroTemplate inset + // By default we're not in a InsetMathMacroTemplate inset flag.setEnabled(false); return true; @@ -553,22 +553,6 @@ void Inset::drawMarkers(PainterInfo & pi, int x, int y) const } -void Inset::drawMarkers2(PainterInfo & pi, int x, int y) const -{ - ColorCode pen_color = mouseHovered(pi.base.bv) || editing(pi.base.bv)? - Color_mathframe : Color_mathcorners; - - drawMarkers(pi, x, y); - Dimension const dim = dimension(*pi.base.bv); - int const t = x + dim.width() - 1; - int const a = y - dim.ascent(); - pi.pain.line(x, a + 3, x, a, pen_color); - pi.pain.line(t, a + 3, t, a, pen_color); - pi.pain.line(x, a, x + 3, a, pen_color); - pi.pain.line(t - 3, a, t, a, pen_color); -} - - bool Inset::editing(BufferView const * bv) const { return bv->cursor().isInside(this); @@ -644,7 +628,7 @@ bool Inset::resetFontEdit() const } -docstring Inset::completionPrefix(Cursor const &) const +docstring Inset::completionPrefix(Cursor const &) const { return docstring(); }