Bulk cleanup/fix incorrect annotation at the end of namespaces.

This commit does a bulk fix of incorrect annotations (comments) at the
end of namespaces.

The commit was generated by initially running clang-format, and then
from the diff of the result extracting the hunks corresponding to
fixes of namespace comments. The changes being applied and all the
results have been manually reviewed. The source code successfully
builds on macOS.

Further details on the steps below, in case they're of interest to
someone else in the future.

1. Checkout a fresh and up to date version of src/

    git pull && git checkout -- src && git status src

2. Ensure there's a suitable .clang-format in place, i.e. with options
   to fix the comment at the end of namespaces, including:

    FixNamespaceComments:                           true
    SpacesBeforeTrailingComments:                   1

and that clang-format is >= 5.0.0, by doing e.g.:

    clang-format -dump-config | grep Comments:
    clang-format --version

3. Apply clang-format to the source:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")

4. Create and filter out hunks related to fixing the namespace

    git diff -U0 src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace.patch

5. Filter out hunks corresponding to simple fixes into to a separate patch:

    pcregrep -M -e '^diff[^\n]+\nindex[^\n]+\n--- [^\n]+\n\+\+\+ [^\n]+\n'  \
        -e '^@@ -[0-9]+ \+[0-9]+ @@[^\n]*\n-\}[^\n]*\n\+\}[^\n]*\n'         \
        fix_namespace.patch > fix_namespace_simple.patch

6. Manually review the simple patch and then apply it, after first
   restoring the source.

    git checkout -- src
    patch -p1 < fix_namespace_simple.path

7. Manually review the (simple) changes and then stage the changes

    git diff src
    git add src

8. Again apply clang-format and filter out hunks related to any
   remaining fixes to the namespace, this time filter with more
   context. There will be fewer hunks as all the simple cases have
   already been handled:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")
    git diff src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace2.patch

9. Manually review/edit the resulting patch file to remove hunks for files
   which need to be dealt with manually, noting the file names and
   line numbers. Then restore files to as before applying clang-format
   and apply the patch:

    git checkout src
    patch -p1 < fix_namespace2.patch

10. Manually fix the files noted in the previous step. Stage files,
    review changes and commit.
This commit is contained in:
Christian Ridderström 2017-07-23 13:11:54 +02:00
parent d50e2aa7bf
commit e30f3d76d2
154 changed files with 245 additions and 252 deletions

View File

@ -49,7 +49,7 @@ struct Speller {
typedef std::map<std::string, Speller> Spellers;
typedef map<std::string, PersonalWordList *> LangPersonalWordList;
} // anon namespace
} // namespace
struct AspellChecker::Private
{

View File

@ -476,7 +476,7 @@ docstring processRichtext(docstring const & str, bool richtext)
return ret;
}
} // anon namespace
} // namespace
//////////////////////////////////////////////////////////////////////
@ -756,7 +756,7 @@ docstring parseOptions(docstring const & format, string & optkey,
}
} // anon namespace
} // namespace
/* FIXME
Bug #9131 revealed an oddity in how we are generating citation information
@ -1148,7 +1148,7 @@ public:
}
};
} // namespace anon
} // namespace
vector<docstring> const BiblioInfo::getXRefs(BibTeXInfo const & data, bool const nested) const
@ -1409,7 +1409,7 @@ bool lSorter(BibTeXInfo const * lhs, BibTeXInfo const * rhs)
|| (lauth == rauth && lyear == ryear && ltitl < rtitl);
}
}
} // namespace
void BiblioInfo::collectCitedEntries(Buffer const & buf)

View File

@ -42,7 +42,7 @@ private:
docstring name_;
};
}
} // namespace
Branch::Branch()

View File

@ -136,7 +136,7 @@ int const LYX_FORMAT = LYX_FORMAT_LYX;
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
} // namespace anon
} // namespace
// A storehouse for the cloned buffers.
@ -4100,7 +4100,7 @@ int AutoSaveBuffer::generateChild()
return pid;
}
} // namespace anon
} // namespace
FileName Buffer::getEmergencyFileName() const

View File

@ -64,18 +64,18 @@ class WordLangTuple;
namespace frontend {
class GuiBufferDelegate;
class WorkAreaManager;
}
} // namespace frontend
namespace support {
class DocFileName;
class FileName;
class FileNamePairList;
}
} // namespace support
namespace graphics {
class PreviewLoader;
class Cache;
}
} // namespace graphics
class Buffer;

View File

@ -26,7 +26,7 @@ class OutputParams;
namespace support {
class FileName;
class FileNameList;
}
} // namespace support
/**
* The class holds all all open buffers, and handles construction

View File

@ -323,7 +323,7 @@ bool inSystemDir(FileName const & document_dir, string & system_dir)
return false;
}
} // anon namespace
} // namespace
class BufferParams::Impl
@ -1119,7 +1119,7 @@ namespace {
return "\"" + str + "\"";
return str;
}
}
} // namespace
void BufferParams::writeFile(ostream & os, Buffer const * buf) const

View File

@ -216,7 +216,7 @@ enum ScreenUpdateStrategy {
DecorationUpdate
};
} // anon namespace
} // namespace
/////////////////////////////////////////////////////////////////////

View File

@ -382,7 +382,7 @@ docstring getLaTeXMarkup(docstring const & macro, docstring const & author,
return ods.str();
}
} //namespace anon
} // namespace
int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,

View File

@ -148,7 +148,7 @@ CiteEngineTypeTranslator const & citeenginetypetranslator()
return translator;
}
} // namespace anon
} // namespace
string CiteEnginesList::getTypeAsString(CiteEngineType const & et) const

View File

@ -156,5 +156,5 @@ public:
};
extern CiteEnginesList theCiteEnginesList;
}
} // namespace lyx
#endif

View File

@ -95,7 +95,7 @@ private:
string const to_;
};
} // namespace anon
} // namespace
Converter::Converter(string const & f, string const & t,

View File

@ -76,7 +76,7 @@ public:
unsigned long checksum;
};
}
} // namespace
/** The cache contains one item per orig file and target format, so use a

View File

@ -482,7 +482,7 @@ docstring const fnsymbolCounter(int const n)
};
}
} // namespace anon
} // namespace
docstring Counters::labelItem(docstring const & ctr,

View File

@ -115,7 +115,7 @@ DocIterator bruteFind(Cursor const & c, int x, int y)
}
} // namespace anon
} // namespace
CursorData::CursorData()
@ -758,7 +758,7 @@ bool findNonVirtual(Row const & row, Row::const_iterator & cit, bool onleft)
return cit != row.end() && !cit->isVirtual();
}
}
} // namespace
void Cursor::getSurroundingPos(pos_type & left_pos, pos_type & right_pos) const
{
@ -2054,7 +2054,7 @@ docstring parbreak(Cursor const * cur)
return os.str();
}
}
} // namespace
docstring Cursor::selectionAsString(bool with_label) const

View File

@ -659,9 +659,7 @@ void copySelectionHelper(Buffer const & buf, Text const & text,
cutstack.push(make_pair(copy_pars, dc));
}
} // namespace anon
} // namespace
namespace cap {
@ -933,7 +931,7 @@ void cutSelectionHelper(Cursor & cur, CutStack & cuts, bool doclear, bool realcu
}
}
}
} // namespace
void cutSelection(Cursor & cur, bool doclear, bool realcut)
{
@ -1010,7 +1008,7 @@ void copySelectionToStack(Cursor const & cur, CutStack & cutstack)
}
}
}
} // namespace
void copySelectionToStack()

View File

@ -164,6 +164,6 @@ void dirtyTabularStack(bool b);
/// is the tabular paste stack newer than the ordinary one?
bool tabularStackDirty();
} // namespace cap
} // namespce lyx
} // namespace lyx
#endif

View File

@ -19,6 +19,6 @@ class DocumentClass;
typedef std::shared_ptr<DocumentClass> DocumentClassPtr;
typedef std::shared_ptr<DocumentClass const> DocumentClassConstPtr;
}
} // namespace lyx
#endif // DISPATCH_RESULT_H

View File

@ -36,7 +36,7 @@ struct Speller {
typedef map<string, Speller> Spellers;
} // anon namespace
} // namespace
struct EnchantChecker::Private
{

View File

@ -59,7 +59,7 @@ MathAlphaSet mathalpha;
/// The highest code point in UCS4 encoding (1<<20 + 1<<16)
char_type const max_ucs4 = 0x110000;
} // namespace anon
} // namespace
EncodingException::EncodingException(char_type c)

View File

@ -94,7 +94,7 @@ char const * LaTeXSizeNames[NUM_SIZE + 4] =
{ "tiny", "scriptsize", "footnotesize", "small", "normalsize", "large",
"Large", "LARGE", "huge", "Huge", "error8", "error9", "error10", "error11" };
} // namespace anon
} // namespace
Font::Font(FontInfo bits, Language const * l)

View File

@ -524,7 +524,7 @@ string getSizeCSS(FontSize const & s)
return "";
}
} // namespace anonymous
} // namespace
// FIXME This does not yet handle color

View File

@ -102,7 +102,7 @@ private:
};
} //namespace anon
} // namespace
bool Format::formatSorter(Format const * lhs, Format const * rhs)
{
@ -397,7 +397,7 @@ string guessFormatFromContents(FileName const & fn)
return string();
}
}
} // namespace
string Formats::getFormatFromFile(FileName const & filename) const
@ -857,7 +857,7 @@ FlavorTranslator const & flavorTranslator()
return translator;
}
}
} // namespace
std::string flavor2format(OutputParams::FLAVOR flavor)

View File

@ -101,7 +101,7 @@ void splitArg(vector<string> & args, string const & str,
}
}
}
} // namespace
string FuncRequest::getArg(unsigned int i) const
{

View File

@ -47,7 +47,7 @@ typedef map<std::string, PersonalWordList *> LangPersonalWordList;
typedef vector<WordLangTuple> IgnoreList;
} // anon namespace
} // namespace
struct HunspellChecker::Private

View File

@ -58,7 +58,7 @@ private:
docstring shortc_;
};
}
} // namespace
/////////////////////////////////////////////////////////////////////

View File

@ -36,7 +36,7 @@ struct InsetTablePosLess
}
};
} // namespace anon
} // namespace
InsetList::InsetList(InsetList const & il) : list_(il.list_)

View File

@ -58,7 +58,7 @@ docstring runMessage(unsigned int count)
return bformat(_("Waiting for LaTeX run number %1$d"), count);
}
} // anon namespace
} // namespace
/*
* CLASS TEXERRORS
@ -1132,7 +1132,7 @@ int iterateLine(string const & token, regex const & reg, string const & closing,
return result;
}
} // anon namespace
} // namespace
void LaTeX::deplog(DepTable & head)

View File

@ -682,7 +682,7 @@ TexString getSnippets(std::list<TexString> const & list)
return snip.release();
}
} //anon namespace
} // namespace
void LaTeXFeatures::addPreambleSnippet(TexString ts, bool allow_dupes)
@ -997,7 +997,7 @@ int const nb_bibliofeatures = sizeof(bibliofeatures) / sizeof(char const *);
int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
}
} // namespace
string const LaTeXFeatures::getColorOptions() const
@ -1770,7 +1770,7 @@ docstring const i18npreamble(docstring const & templ, Language const * lang,
return from_utf8(preamble);
}
}
} // namespace
docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel,

View File

@ -329,7 +329,7 @@ Match match(string const & code, Language const & lang)
return NoMatch;
}
}
} // namespace
void Languages::readLayoutTranslations(support::FileName const & filename)

View File

@ -1578,7 +1578,7 @@ string makeMarginValue(char const * side, double d)
return os.str();
}
}
} // namespace
void Layout::makeDefaultCSS() const

View File

@ -96,5 +96,5 @@ private:
///
std::list<std::string> lml_;
};
}
} // namespace lyx
#endif

View File

@ -148,7 +148,7 @@ public:
}
};
} // end of anon namespace
} // namespace
Lexer::Pimpl::Pimpl(LexerKeyword * tab, int num)

View File

@ -150,7 +150,7 @@ void showFileError(string const & error)
"Please check your installation."), from_utf8(error)));
}
} // namespace anon
} // namespace
/// The main application class private implementation.
struct LyX::Impl {
@ -775,7 +775,7 @@ namespace {
return std::string(line, nameLen);
}
}
}
} // namespace
void cleanDuplicateEnvVars()
{
@ -1384,7 +1384,7 @@ int parse_force(string const & arg, string const &, string &)
}
} // namespace anon
} // namespace
void LyX::easyParse(int & argc, char * argv[])

View File

@ -212,7 +212,7 @@ LexerKeyword lyxrcTags[] = {
const int lyxrcCount = sizeof(lyxrcTags) / sizeof(lyxrcTags[0]);
} // namespace anon
} // namespace
LyXRC::LyXRC()
@ -377,7 +377,7 @@ void oldFontFormat(string & family, string & foundry)
foundry.erase();
}
} // namespace anon
} // namespace
bool LyXRC::read(FileName const & filename, bool check_format)
@ -1287,7 +1287,7 @@ namespace {
"\"", "\\\"");
}
}
} // namespace
void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const

View File

@ -155,5 +155,5 @@ public:
};
extern ModuleList theModuleList;
}
} // namespace lyx
#endif

View File

@ -87,7 +87,7 @@ namespace {
/// Inset identifier (above 0x10ffff, for ucs-4)
char_type const META_INSET = 0x200001;
}
} // namespace
/////////////////////////////////////////////////////////////////////
@ -1569,7 +1569,7 @@ void flushString(ostream & os, docstring & s)
s.erase();
}
}
} // namespace
void Paragraph::write(ostream & os, BufferParams const & bparams,
@ -2200,7 +2200,7 @@ bool corrected_env(otexstream & os, string const & suffix, string const & env,
return true;
}
} // namespace anon
} // namespace
int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
@ -2928,7 +2928,7 @@ void doFontSwitch(vector<html::FontTag> & tagsToOpen,
flag = false;
}
}
}
} // namespace
docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,

View File

@ -117,7 +117,7 @@ string errormsg(DWORD const error)
return message;
}
} // namespace anon
} // namespace
DWORD WINAPI pipeServerWrapper(void * arg)
@ -997,7 +997,7 @@ struct Sleep : QThread
}
};
} // namespace anon
} // namespace
bool LyXComm::loadFilesInOtherInstance()

View File

@ -36,7 +36,7 @@ string const sec_toolbars = "[toolbars]";
string const sec_lastcommands = "[last commands]";
string const sec_authfiles = "[auth files]";
} // anon namespace
} // namespace
namespace lyx {
@ -480,4 +480,4 @@ void AuthFilesSection::write(ostream & os) const
}
}
} // namespace lyx

View File

@ -408,6 +408,6 @@ private:
/// Implemented in LyX.cpp.
Session & theSession();
} // lyx
} // namespace lyx
#endif

View File

@ -99,7 +99,7 @@ string envName(Spacing::Space space, bool useSetSpace)
return useSetSpace ? name : support::ascii_lowercase(name);
}
}
} // namespace
string const Spacing::writeEnvirBegin(bool useSetSpace) const
{

View File

@ -948,7 +948,7 @@ bool canInsertChar(Cursor const & cur, char_type c)
return true;
}
}
} // namespace
// insert a character, moves all the following breaks in the

View File

@ -491,7 +491,7 @@ namespace {
return lang.empty() ? cur.getFont().language() : languages.getLanguage(lang);
}
}
} // namespace
void Text::dispatch(Cursor & cur, FuncRequest & cmd)

View File

@ -133,7 +133,7 @@ string translateReadType(TextClass::ReadType rt)
return string();
}
} // namespace anon
} // namespace
// This string should not be translated here,
@ -282,7 +282,7 @@ LexerKeyword textClassTags[] = {
{ "tocdepth", TC_TOCDEPTH }
};
} //namespace anon
} // namespace
bool TextClass::convertLayoutFormat(support::FileName const & filename, ReadType rt)

View File

@ -97,7 +97,7 @@ int numberOfHfills(Row const & row, ParagraphMetrics const & pm,
}
}
} // namespace
/////////////////////////////////////////////////////////////////////
//
@ -806,7 +806,7 @@ private:
pos_type bodypos_;
};
} // anon namespace
} // namespace
/** This is the function where the hard work is done. The code here is
* very sensitive to small changes :) Note that part of the

View File

@ -46,7 +46,7 @@ namespace {
typedef std::map<docstring, MyThes *> Thesauri;
} // namespace anon
} // namespace
struct Thesaurus::Private
{

View File

@ -584,8 +584,8 @@ QString const & CategorizedCombo::filter() const
return d->filter_;
}
} // namespace frontend
} // namespace lyx
} // namespace frontend
} // namespace lyx
#include "moc_CategorizedCombo.cpp"

View File

@ -54,7 +54,7 @@ QPalette::ColorRole role(ColorCode col)
}
}
}
} // namespace
void ColorCache::init()

View File

@ -48,7 +48,7 @@ void DockView::keyPressEvent(QKeyEvent * ev)
}
} // frontend
} // lyx
} // namespace frontend
} // namespace lyx
#include "moc_DockView.cpp"

View File

@ -61,7 +61,7 @@ protected Q_SLOTS:
void onBufferViewChanged() {} //override
};
} // frontend
} // lyx
} // namespace frontend
} // namespace lyx
#endif // DOCK_VIEW_H

View File

@ -314,9 +314,9 @@ void IconButton::animateShow(bool visible)
}
}
}
} // namespace frontend
}
} // namespace lyx
#endif // QT_VERSION >= 0x040600

View File

@ -107,7 +107,7 @@ private:
QString m_oldText;
};
}
}
} // namespace frontend
} // namespace lyx
#endif // FANCYLINEEDIT_H

View File

@ -474,7 +474,7 @@ QString findImg(QString const & name)
return img_name;
}
} // namespace anon
} // namespace
QString themeIconName(QString const & action)
@ -2657,7 +2657,7 @@ namespace {
const QFontInfo fi(font);
return fi.fixedPitch();
}
}
} // namespace
QFont const GuiApplication::typewriterSystemFont()

View File

@ -193,7 +193,7 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
combo->addItem(qt_("Reset"), "inherit");
}
} // namespace anon
} // namespace
GuiCharacter::GuiCharacter(GuiView & lv)
: GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font, ignore_language),

View File

@ -358,7 +358,7 @@ QString tidyHtml(QString input)
converter.setHtml(input);
return converter.toHtml("utf-8");
}
}
} // namespace
docstring const GuiClipboard::getAsText(TextType type) const

View File

@ -79,7 +79,7 @@ protected:
}
};
} // end of anon
} // namespace
GuiCommandBuffer::GuiCommandBuffer(GuiView * view)
@ -272,7 +272,7 @@ public:
bool operator()(string const & s) const { return prefixIs(s, p); }
};
} // end of anon namespace
} // namespace
string const GuiCommandBuffer::historyUp()

View File

@ -177,7 +177,7 @@ string getDelimiterName(QListWidgetItem const * lwi)
}
} // anon namespace
} // namespace
GuiDelimiter::GuiDelimiter(GuiView & lv)

View File

@ -183,7 +183,7 @@ public:
}
};
}
} // namespace
namespace frontend {
namespace {

View File

@ -52,7 +52,7 @@ string const guiErrorType(string const & s)
return s;
}
} // namespace anon
} // namespace
namespace lyx {
namespace frontend {

View File

@ -80,7 +80,7 @@ char const * const origin_gui_strs[] = {
N_("Top right"), N_("Bottom right"), N_("Baseline right")
};
} // namespace anon
} // namespace
GuiExternal::GuiExternal(GuiView & lv)

View File

@ -234,7 +234,7 @@ QFont symbolFont(QString const & family, bool * ok)
return font;
}
} // namespace anon
} // namespace
FontLoader::FontLoader()
@ -370,7 +370,7 @@ QFont makeQFont(FontInfo const & f)
return font;
}
} // anon namespace
} // namespace
GuiFontInfo::GuiFontInfo(FontInfo const & f)

View File

@ -41,7 +41,7 @@ uint qHash(lyx::docstring const & s)
s.size() * sizeof(lyx::docstring::value_type)));
}
}
} // namespace std
namespace lyx {
namespace frontend {
@ -84,7 +84,7 @@ inline QChar const ucs4_to_qchar(char_type const ucs4)
LATTEST(is_utf16(ucs4));
return QChar(static_cast<unsigned short>(ucs4));
}
} // anon namespace
} // namespace
GuiFontMetrics::GuiFontMetrics(QFont const & font)

View File

@ -77,7 +77,7 @@ size_t const rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *);
static string const autostr = N_("automatically");
} // namespace anon
} // namespace
namespace lyx {

View File

@ -24,8 +24,8 @@ namespace lyx {
namespace frontend {
bool operator==(lyx::docstring const & d, char const * c)
{ return lyx::operator ==(d, c); }
}
}
} // namespace frontend
} // namespace lyx
#endif

View File

@ -121,6 +121,6 @@ private:
};
}
}
} // namespace frontend
} // namespace lyx
#endif //GUIIDLISTMODEL_H

View File

@ -213,4 +213,4 @@ bool GuiImage::scale(Params const & params)
}
} // namespace graphics
} // lyx
} // namespace lyx

View File

@ -2030,7 +2030,7 @@ string const l10n_shortcut(docstring const & prettyname, string const & shortcut
return split(l10n_format, '|');
}
} // namespace anon
} // namespace
void PrefFileformats::applyRC(LyXRC & rc) const
@ -2262,7 +2262,7 @@ namespace {
}
}
}
}
} // namespace
void PrefFileformats::updateViewers()

View File

@ -58,7 +58,7 @@ bool DebugSorter(DebugMap const & a, DebugMap const & b)
{
return a.second < b.second;
}
}
} // namespace
GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,

View File

@ -192,7 +192,7 @@ QString getBlock(char_type c)
}
} // namespace anon
} // namespace
/////////////////////////////////////////////////////////////////////

View File

@ -178,7 +178,7 @@ public:
}
};
}
} // namespace
MenuButton::MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const sticky)

View File

@ -263,7 +263,7 @@ typedef map<string, GuiToolbar *> ToolbarMap;
typedef shared_ptr<Dialog> DialogPtr;
} // namespace anon
} // namespace
class GuiView::GuiViewPrivate
@ -4358,7 +4358,7 @@ bool isValidName(string const & name)
cmpCStr(name.c_str())) != end_dialognames;
}
} // namespace anon
} // namespace
void GuiView::resetDialogs()

View File

@ -56,7 +56,7 @@ Q_SIGNALS:
};
} // namesapce frontend
} // namespace frontend
} // namespace lyx
#endif // LENGTHCOMBO_H

View File

@ -1890,7 +1890,7 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv)
}
}
} // namespace anon
} // namespace
/////////////////////////////////////////////////////////////////////

View File

@ -91,7 +91,7 @@ double locstringToDouble(QString const & str)
return res;
}
} // namespace anon
} // namespace
namespace frontend {

View File

@ -160,8 +160,7 @@ typedef map<pid_t, InProgress> InProgressProcesses;
typedef InProgressProcesses::value_type InProgressProcess;
} // namespace anon
} // namespace
namespace lyx {
@ -379,7 +378,7 @@ void InProgress::stop() const
}
}
} // namespace anon
} // namespace
namespace lyx {
@ -507,7 +506,7 @@ private:
string const snippet_;
};
} // namespace anon
} // namespace
PreviewLoader::Status
PreviewLoader::Impl::status(string const & latex_snippet) const
@ -569,7 +568,7 @@ private:
string const & snippet_;
};
} // namespace anon
} // namespace
void PreviewLoader::Impl::remove(string const & latex_snippet)

View File

@ -75,7 +75,7 @@ string const subst_path(string const & input,
return subst(input, placeholder, path2);
}
} // namespace anon
} // namespace
string const doSubstitution(InsetExternalParams const & params,
@ -348,7 +348,7 @@ string const substituteCommands(InsetExternalParams const & params,
string const substituteOptions(InsetExternalParams const & params,
string const & input, string const & format);
} // namespace anon
} // namespace
void writeExternal(InsetExternalParams const & params,
@ -553,7 +553,7 @@ string const substituteOptions(InsetExternalParams const & params,
return output;
}
} // namespace anon
} // namespace
} // namespace external

View File

@ -516,7 +516,7 @@ void setOptionFactory(Template::Format & format, string const & transform,
transform_class_not_found(lyxerr, transformer_class);
}
} // namespace anon
} // namespace
void Template::Format::readFormat(Lexer & lex)

View File

@ -78,7 +78,7 @@ namespace {
typedef Translator<RotationData::OriginType, string> OriginTranslator;
OriginTranslator const & originTranslator();
} // namespace anon
} // namespace
void RotationData::origin(string const & o)
@ -183,7 +183,7 @@ ostream & operator<<(ostream & os, RotationData::OriginType type)
return os;
}
} // namespace anon
} // namespace
string const RotationLatexCommand::front_impl() const
@ -337,7 +337,7 @@ void extractIt(boost::any const & any_factory,
transformer = factory(data);
}
} // namespace anon
} // namespace
TransformCommand::ptr_type
@ -426,7 +426,7 @@ OriginTranslator const & originTranslator()
return translator;
}
} // namespace anon
} // namespace
} // namespace external
} // namespace lyx

View File

@ -642,7 +642,7 @@ namespace {
return true;
}
}
} // namespace
void InsetBibtex::collectBibKeys(InsetIterator const & /*di*/) const

View File

@ -21,7 +21,7 @@ class BiblioInfo;
namespace support {
class FileName;
class FileNamePairList;
}
} // namespace support
/** Used to insert BibTeX's information
*/

View File

@ -92,7 +92,7 @@ BoxTranslatorLoc const & boxtranslator_loc()
return translator;
}
} // namespace anon
} // namespace
/////////////////////////////////////////////////////////////////////////

View File

@ -61,7 +61,7 @@ unsigned int const defaultLyxScale = 100;
string defaultTemplateName;
} // namespace anon
} // namespace
namespace lyx {
@ -148,7 +148,7 @@ void clearIfNotFound(T & data, external::TransformID value,
data = T();
}
} // namespace anon
} // namespace
void InsetExternalParams::settemplate(string const & name)
@ -414,8 +414,7 @@ docstring screenLabel(InsetExternalParams const & params,
return gui;
}
} // namespace anon
} // namespace
InsetExternal::InsetExternal(Buffer * buf)
@ -553,7 +552,7 @@ graphics::Params get_grfx_params(InsetExternalParams const & eparams)
return gparams;
}
} // namespace anon
} // namespace
static bool isPreviewWanted(InsetExternalParams const & params)

View File

@ -165,7 +165,7 @@ void readInsetGraphics(Lexer & lex, Buffer const & buf, bool allowOrigin,
}
}
} // namespace anon
} // namespace
InsetGraphics::InsetGraphics(Buffer * buf)
@ -559,7 +559,7 @@ string const stripExtensionIfPossible(string const & file, string const & to, bo
return latex_path(file, EXCLUDE_EXTENSION);
}
} // namespace anon
} // namespace
string InsetGraphics::prepareFile(OutputParams const & runparams) const

View File

@ -155,7 +155,7 @@ namespace graphics {
void unifyGraphicsGroups(Buffer &, std::string const &);
InsetGraphics * getCurrentGraphicsInset(Cursor const &);
}
} // namespace graphics
} // namespace lyx

View File

@ -94,7 +94,7 @@ IPACharTranslator const & ipachartranslator()
return chartranslator;
}
} // anon
} // namespace
InsetIPADecoParams::InsetIPADecoParams()

View File

@ -165,7 +165,7 @@ InsetLabel * createLabel(Buffer * buf, docstring const & label_str)
return new InsetLabel(buf, icp);
}
} // namespace anon
} // namespace
InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p)
@ -1209,7 +1209,7 @@ void add_preview(RenderMonitoredPreview & renderer, InsetInclude const & inset,
}
}
} // namespace anon
} // namespace
void InsetInclude::addPreview(DocIterator const & /*inset_pos*/,

View File

@ -690,7 +690,7 @@ bool operator<(IndexEntry const & lhs, IndexEntry const & rhs)
return (comp < 0);
}
} // anon namespace
} // namespace
docstring InsetPrintIndex::xhtml(XHTMLStream &, OutputParams const & op) const

View File

@ -81,7 +81,7 @@ NameTranslator const & nameTranslator()
return translator;
}
} // namespace anon
} // namespace
/////////////////////////////////////////////////////////////////////////
//

View File

@ -74,7 +74,7 @@ InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
return InsetLayout::ILT_ERROR;
}
} // namespace anon
} // namespace
bool InsetLayout::read(Lexer & lex, TextClass const & tclass)

View File

@ -959,7 +959,7 @@ bool ParValidator::onoff(string const & name) const
return false;
}
} // namespace anon.
} // namespace
// define a global ParValidator
ParValidator * par_validator = 0;

View File

@ -388,7 +388,7 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams)
<< "' in nomencl widest string!");
return latex_symb.first;
}
} // namespace anon
} // namespace
void InsetPrintNomencl::latex(otexstream & os, OutputParams const & runparams_in) const

View File

@ -69,7 +69,7 @@ NoteTranslator const & notetranslator()
}
} // anon
} // namespace
InsetNoteParams::InsetNoteParams()

View File

@ -85,7 +85,7 @@ PhantomTranslatorLoc const & phantomtranslator_loc()
return translator;
}
} // anon
} // namespace
InsetPhantomParams::InsetPhantomParams()

View File

@ -75,7 +75,7 @@ char const * const style_char = "esgpcaqbwfirjkx";
char const * const side_char = "lr" ;
char const * const level_char = "sd";
} // namespace anon
} // namespace
/////////////////////////////////////////////////////////////////////

View File

@ -84,7 +84,7 @@ void capitalize(docstring & s) {
s[0] = t;
}
}
} // namespace
// the ref argument is the label name we are referencing.

View File

@ -81,7 +81,7 @@ ScriptTranslatorLoc const & scripttranslator_loc()
return translator;
}
} // anon
} // namespace
InsetScriptParams::InsetScriptParams()

View File

@ -84,7 +84,7 @@ int logoWidth(FontInfo const & font, InsetSpecialChar::Kind kind) {
return width;
}
}
} // namespace
docstring InsetSpecialChar::toolTip(BufferView const &, int, int) const
{
@ -248,7 +248,7 @@ void drawLogo(PainterInfo & pi, int & x, int const y, InsetSpecialChar::Kind kin
}
}
}
} // namespace
void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const
{

View File

@ -45,7 +45,7 @@ string cmd2type(string const & cmd)
return "listing";
return cmd;
}
}
} // namespace
InsetTOC::InsetTOC(Buffer * buf, InsetCommandParams const & p)

View File

@ -1146,7 +1146,7 @@ void toggleFixedWidth(Cursor & cur, InsetTableCell * inset, bool fixedWidth)
cur.pop();
}
}
} // namespace
void Tabular::setColumnPWidth(Cursor & cur, idx_type cell,

View File

@ -46,7 +46,7 @@ namespace {
int const ADD_TO_VSPACE_WIDTH = 5;
} // namespace anon
} // namespace
InsetVSpace::InsetVSpace(VSpace const & space)

Some files were not shown because too many files have changed in this diff Show More