mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-22 07:57:22 +00:00
8b67659646
Known problems: - No space is output after a \hfill. I probably broke this with the InsetCommand patch. I'll have a look later. - Although the encoding is now UTF8 the arguments of the inputenc package are still the old ones, so LaTeX will not run. - Labels and references with non-ASCII characters are broken. This needs to be fixed in lyx::support::escape(), but this is a file format change. - Something seems to be wrong with index entries, but this is probably also due to the InsetCommand changes. Have fun! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15378 a592a061-630c-0410-9148-cb99ea01b6c8
83 lines
1.3 KiB
C
83 lines
1.3 KiB
C
/**
|
|
* \file insethfill.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author André Pönitz
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "insethfill.h"
|
|
|
|
#include "support/std_ostream.h"
|
|
|
|
using lyx::docstring;
|
|
using lyx::odocstream;
|
|
|
|
using std::ostream;
|
|
|
|
|
|
InsetHFill::InsetHFill()
|
|
: InsetCommand(InsetCommandParams("hfill"), std::string())
|
|
{}
|
|
|
|
|
|
std::auto_ptr<InsetBase> InsetHFill::doClone() const
|
|
{
|
|
return std::auto_ptr<InsetBase>(new InsetHFill);
|
|
}
|
|
|
|
|
|
void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const
|
|
{
|
|
dim.wid = 3;
|
|
dim.asc = 3;
|
|
dim.des = 3;
|
|
dim_ = dim;
|
|
}
|
|
|
|
|
|
docstring const InsetHFill::getScreenLabel(Buffer const &) const
|
|
{
|
|
return lyx::from_ascii(getContents());
|
|
}
|
|
|
|
|
|
int InsetHFill::latex(Buffer const &, odocstream & os,
|
|
OutputParams const &) const
|
|
{
|
|
os << getCommand();
|
|
return 0;
|
|
}
|
|
|
|
|
|
int InsetHFill::plaintext(Buffer const &, odocstream & os,
|
|
OutputParams const &) const
|
|
{
|
|
os << '\t';
|
|
return 0;
|
|
}
|
|
|
|
|
|
int InsetHFill::docbook(Buffer const &, std::ostream & os,
|
|
OutputParams const &) const
|
|
{
|
|
os << '\n';
|
|
return 0;
|
|
}
|
|
|
|
|
|
void InsetHFill::write(Buffer const &, ostream & os) const
|
|
{
|
|
os << "\n\\hfill\n";
|
|
}
|
|
|
|
|
|
bool InsetHFill::isSpace() const
|
|
{
|
|
return true;
|
|
}
|