X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetHFill.cpp;h=76af40d23f839be8b0dcc6e3162db23d927afde1;hb=06254d11dfdf670fab3548dc2a2674e7a261262c;hp=cc02b0b6c81fcb246e50f34ec7bfe4b0fd222754;hpb=920c3c3e366b8452f62b170361ffffc56fd08199;p=lyx.git diff --git a/src/insets/InsetHFill.cpp b/src/insets/InsetHFill.cpp index cc02b0b6c8..76af40d23f 100644 --- a/src/insets/InsetHFill.cpp +++ b/src/insets/InsetHFill.cpp @@ -20,16 +20,17 @@ #include +using namespace std; namespace lyx { InsetHFill::InsetHFill() - : InsetCommand(InsetCommandParams(HFILL_CODE), std::string()) + : InsetCommand(InsetCommandParams(HFILL_CODE), string()) {} -CommandInfo const * InsetHFill::findInfo(std::string const & /* cmdName */) +CommandInfo const * InsetHFill::findInfo(string const & /* cmdName */) { static const char * const paramnames[] = {""}; static const CommandInfo info = {0, paramnames, 0}; @@ -56,8 +57,8 @@ void InsetHFill::draw(PainterInfo & pi, int x, int y) const Dimension const dim = Inset::dimension(*pi.base.bv); int const x0 = x + 1; int const x1 = x + dim.wid - 2; - int const y0 = y + dim.des; - int const y1 = y - dim.asc; + int const y0 = y + dim.des - 1; + int const y1 = y - dim.asc + 1; pi.pain.line(x0, y1, x0, y0, Color_added_space); pi.pain.line(x0, y, x1, y, Color_added_space, @@ -88,7 +89,7 @@ int InsetHFill::docbook(Buffer const &, odocstream & os, } -void InsetHFill::write(Buffer const &, std::ostream & os) const +void InsetHFill::write(Buffer const &, ostream & os) const { os << "\n\\hfill\n"; }