mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-02 08:10:39 +00:00
small changes read ChangeLog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@941 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b8a28930df
commit
7110b8eda4
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
2000-07-31 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/support/translator.h (equal_1st_in_pair::operator()): take
|
||||
const ref pair_type as arg.
|
||||
(equal_2nd_in_pair::operator()): ditto
|
||||
(Translator::~Translator): remove empty d-tor.
|
||||
|
||||
* src/graphics/GraphicsCache.C: move include config.h to top, also
|
||||
put initialization of GraphicsCache::singleton here.
|
||||
(~GraphicsCache): move here
|
||||
(addFile): take const ref as arg
|
||||
(removeFile): ditto
|
||||
|
||||
* src/lyxlex_pimpl.C (setFile): comment in old behaviour
|
||||
|
||||
* src/BufferView2.C (insertLyXFile): change te with/without header
|
||||
check slightly.
|
||||
|
||||
2000-07-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/frontends/xforms/FormGraphics.C (apply): add some
|
||||
|
@ -26,7 +26,6 @@ src/ext_l10n.h
|
||||
src/filedlg.C
|
||||
src/FontLoader.C
|
||||
src/form1.C
|
||||
src/frontends/gnome/Menubar_pimpl.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/form_citation.C
|
||||
src/frontends/xforms/FormCopyright.C
|
||||
@ -37,12 +36,6 @@ src/frontends/xforms/FormPreferences.C
|
||||
src/frontends/xforms/form_preferences.C
|
||||
src/frontends/xforms/FormPrint.C
|
||||
src/frontends/xforms/form_print.C
|
||||
src/frontends/xforms/forms/form_citation.C
|
||||
src/frontends/xforms/forms/form_copyright.C
|
||||
src/frontends/xforms/forms/form_preferences.C
|
||||
src/frontends/xforms/forms/form_print.C
|
||||
src/frontends/xforms/forms/form_tabular.C
|
||||
src/frontends/xforms/forms/form_url.C
|
||||
src/frontends/xforms/FormTabular.C
|
||||
src/frontends/xforms/form_tabular.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
|
@ -73,10 +73,11 @@ bool BufferView::insertLyXFile(string const & filen)
|
||||
MakeDisplayPath(fname, 50));
|
||||
return false;
|
||||
}
|
||||
|
||||
char c = ifs.peek();
|
||||
|
||||
LyXLex lex(0, 0);
|
||||
lex.setStream(ifs);
|
||||
char c; ifs.get(c);
|
||||
ifs.putback(c);
|
||||
|
||||
bool res = true;
|
||||
|
||||
|
@ -9,13 +9,18 @@
|
||||
* This file Copyright 2000 Baruch Even
|
||||
* ================================================= */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include "GraphicsCache.h"
|
||||
|
||||
|
||||
GraphicsCache * GraphicsCache::singleton = 0;
|
||||
|
||||
|
||||
GraphicsCache *
|
||||
GraphicsCache::getInstance()
|
||||
{
|
||||
@ -27,8 +32,14 @@ GraphicsCache::getInstance()
|
||||
}
|
||||
|
||||
|
||||
GraphicsCache::~GraphicsCache()
|
||||
{
|
||||
delete singleton;
|
||||
}
|
||||
|
||||
|
||||
GraphicsCacheItem *
|
||||
GraphicsCache::addFile(string filename)
|
||||
GraphicsCache::addFile(string const & filename)
|
||||
{
|
||||
CacheType::const_iterator it = cache.find(filename);
|
||||
|
||||
@ -39,8 +50,9 @@ GraphicsCache::addFile(string filename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GraphicsCache::removeFile(string filename)
|
||||
GraphicsCache::removeFile(string const & filename)
|
||||
{
|
||||
CacheType::const_iterator it = cache.find(filename);
|
||||
|
||||
|
@ -33,19 +33,17 @@ public:
|
||||
static GraphicsCache * getInstance();
|
||||
|
||||
/// Add a file to the cache.
|
||||
GraphicsCacheItem * addFile(string filename);
|
||||
GraphicsCacheItem * addFile(string const & filename);
|
||||
|
||||
private:
|
||||
/// Remove a cache item if it's count has gone to zero.
|
||||
void removeFile(string filename);
|
||||
void removeFile(string const & filename);
|
||||
|
||||
/// Private c-tor so we can control how many objects are instantiated.
|
||||
GraphicsCache() {}
|
||||
|
||||
/// Private d-tor so that no-one will destroy us.
|
||||
~GraphicsCache() {
|
||||
delete singleton;
|
||||
}
|
||||
~GraphicsCache();
|
||||
|
||||
/// Holder of the single instance of the class.
|
||||
static GraphicsCache * singleton;
|
||||
@ -53,7 +51,4 @@ private:
|
||||
typedef std::map<string, GraphicsCacheItem *> CacheType;
|
||||
CacheType cache;
|
||||
};
|
||||
|
||||
GraphicsCache * GraphicsCache::singleton = 0;
|
||||
|
||||
#endif
|
||||
|
@ -9,10 +9,11 @@
|
||||
* This file Copyright 2000 Baruch Even
|
||||
* ================================================= */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include "GraphicsCacheItem.h"
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
///
|
||||
class GraphicsCacheItem {
|
||||
public:
|
||||
~GraphicsCacheItem() {}
|
||||
|
||||
private:
|
||||
///
|
||||
GraphicsCacheItem() {}
|
||||
|
||||
//
|
||||
friend class GraphicsCache;
|
||||
};
|
||||
|
||||
|
@ -114,11 +114,11 @@ void LyXLex::Pimpl::popTable()
|
||||
|
||||
bool LyXLex::Pimpl::setFile(string const & filename)
|
||||
{
|
||||
//if (fb__.is_open())
|
||||
// lyxerr << "Error in LyXLex::setFile: "
|
||||
// "file or stream already set." << endl;
|
||||
if (fb__.is_open())
|
||||
lyxerr << "Error in LyXLex::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
fb__.open(filename.c_str(), ios::in);
|
||||
//is.rdbuf(&fb__);
|
||||
is.rdbuf(&fb__);
|
||||
name = filename;
|
||||
lineno = 0;
|
||||
return fb__.is_open() && is.good();
|
||||
|
@ -33,34 +33,33 @@ struct LyXLex::Pimpl {
|
||||
///
|
||||
int table_siz;
|
||||
};
|
||||
|
||||
///
|
||||
Pimpl(keyword_item * tab, int num);
|
||||
|
||||
///
|
||||
string GetString() const;
|
||||
|
||||
///
|
||||
void printError(string const & message) const;
|
||||
|
||||
///
|
||||
void printTable(std::ostream & os);
|
||||
|
||||
///
|
||||
void pushTable(keyword_item * tab, int num);
|
||||
|
||||
///
|
||||
void popTable();
|
||||
|
||||
///
|
||||
bool setFile(string const & filename);
|
||||
|
||||
///
|
||||
void setStream(std::istream & i);
|
||||
|
||||
///
|
||||
bool next(bool esc = false);
|
||||
|
||||
///
|
||||
int search_kw(char const * const tag) const;
|
||||
|
||||
///
|
||||
int lex();
|
||||
|
||||
///
|
||||
bool EatLine();
|
||||
|
||||
///
|
||||
bool nextToken();
|
||||
|
||||
///
|
||||
void pushToken(string const &);
|
||||
|
||||
/// fb__ is only used to open files, the stream is accessed through is
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
equal_1st_in_pair(T1 const & value) : value_(value) {}
|
||||
|
||||
typedef std::pair<T1, T2> pair_type;
|
||||
bool operator() (pair_type p) const {
|
||||
bool operator() (pair_type const & p) const {
|
||||
return p.first == value_;
|
||||
}
|
||||
private:
|
||||
@ -38,7 +38,7 @@ public:
|
||||
equal_2nd_in_pair(T2 const & value) : value_(value) {}
|
||||
|
||||
typedef std::pair<T1, T2> pair_type;
|
||||
bool operator() (pair_type p) const {
|
||||
bool operator() (pair_type const & p) const {
|
||||
return p.second == value_;
|
||||
}
|
||||
private:
|
||||
@ -62,8 +62,6 @@ public:
|
||||
Translator(T1 const & t1, T2 const & t2)
|
||||
: default_t1(t1), default_t2(t2)
|
||||
{}
|
||||
/// d-tor. Not virtual since it's not going to be inherited.
|
||||
~Translator() {}
|
||||
|
||||
/// Add a mapping to the translator.
|
||||
void addPair(T1 const & first, T2 const & second) {
|
||||
|
Loading…
Reference in New Issue
Block a user