mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-04 16:42:57 +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>
|
2000-07-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* src/frontends/xforms/FormGraphics.C (apply): add some
|
* src/frontends/xforms/FormGraphics.C (apply): add some
|
||||||
|
@ -26,7 +26,6 @@ src/ext_l10n.h
|
|||||||
src/filedlg.C
|
src/filedlg.C
|
||||||
src/FontLoader.C
|
src/FontLoader.C
|
||||||
src/form1.C
|
src/form1.C
|
||||||
src/frontends/gnome/Menubar_pimpl.C
|
|
||||||
src/frontends/xforms/FormCitation.C
|
src/frontends/xforms/FormCitation.C
|
||||||
src/frontends/xforms/form_citation.C
|
src/frontends/xforms/form_citation.C
|
||||||
src/frontends/xforms/FormCopyright.C
|
src/frontends/xforms/FormCopyright.C
|
||||||
@ -37,12 +36,6 @@ src/frontends/xforms/FormPreferences.C
|
|||||||
src/frontends/xforms/form_preferences.C
|
src/frontends/xforms/form_preferences.C
|
||||||
src/frontends/xforms/FormPrint.C
|
src/frontends/xforms/FormPrint.C
|
||||||
src/frontends/xforms/form_print.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/FormTabular.C
|
||||||
src/frontends/xforms/form_tabular.C
|
src/frontends/xforms/form_tabular.C
|
||||||
src/frontends/xforms/FormUrl.C
|
src/frontends/xforms/FormUrl.C
|
||||||
|
@ -73,10 +73,11 @@ bool BufferView::insertLyXFile(string const & filen)
|
|||||||
MakeDisplayPath(fname, 50));
|
MakeDisplayPath(fname, 50));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char c = ifs.peek();
|
||||||
|
|
||||||
LyXLex lex(0, 0);
|
LyXLex lex(0, 0);
|
||||||
lex.setStream(ifs);
|
lex.setStream(ifs);
|
||||||
char c; ifs.get(c);
|
|
||||||
ifs.putback(c);
|
|
||||||
|
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
|
||||||
|
@ -9,13 +9,18 @@
|
|||||||
* This file Copyright 2000 Baruch Even
|
* This file Copyright 2000 Baruch Even
|
||||||
* ================================================= */
|
* ================================================= */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include "GraphicsCache.h"
|
#include "GraphicsCache.h"
|
||||||
|
|
||||||
|
|
||||||
|
GraphicsCache * GraphicsCache::singleton = 0;
|
||||||
|
|
||||||
|
|
||||||
GraphicsCache *
|
GraphicsCache *
|
||||||
GraphicsCache::getInstance()
|
GraphicsCache::getInstance()
|
||||||
{
|
{
|
||||||
@ -27,8 +32,14 @@ GraphicsCache::getInstance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GraphicsCache::~GraphicsCache()
|
||||||
|
{
|
||||||
|
delete singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GraphicsCacheItem *
|
GraphicsCacheItem *
|
||||||
GraphicsCache::addFile(string filename)
|
GraphicsCache::addFile(string const & filename)
|
||||||
{
|
{
|
||||||
CacheType::const_iterator it = cache.find(filename);
|
CacheType::const_iterator it = cache.find(filename);
|
||||||
|
|
||||||
@ -39,8 +50,9 @@ GraphicsCache::addFile(string filename)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
GraphicsCache::removeFile(string filename)
|
GraphicsCache::removeFile(string const & filename)
|
||||||
{
|
{
|
||||||
CacheType::const_iterator it = cache.find(filename);
|
CacheType::const_iterator it = cache.find(filename);
|
||||||
|
|
||||||
|
@ -33,19 +33,17 @@ public:
|
|||||||
static GraphicsCache * getInstance();
|
static GraphicsCache * getInstance();
|
||||||
|
|
||||||
/// Add a file to the cache.
|
/// Add a file to the cache.
|
||||||
GraphicsCacheItem * addFile(string filename);
|
GraphicsCacheItem * addFile(string const & filename);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Remove a cache item if it's count has gone to zero.
|
/// 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.
|
/// Private c-tor so we can control how many objects are instantiated.
|
||||||
GraphicsCache() {}
|
GraphicsCache() {}
|
||||||
|
|
||||||
/// Private d-tor so that no-one will destroy us.
|
/// Private d-tor so that no-one will destroy us.
|
||||||
~GraphicsCache() {
|
~GraphicsCache();
|
||||||
delete singleton;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Holder of the single instance of the class.
|
/// Holder of the single instance of the class.
|
||||||
static GraphicsCache * singleton;
|
static GraphicsCache * singleton;
|
||||||
@ -53,7 +51,4 @@ private:
|
|||||||
typedef std::map<string, GraphicsCacheItem *> CacheType;
|
typedef std::map<string, GraphicsCacheItem *> CacheType;
|
||||||
CacheType cache;
|
CacheType cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
GraphicsCache * GraphicsCache::singleton = 0;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,10 +9,11 @@
|
|||||||
* This file Copyright 2000 Baruch Even
|
* This file Copyright 2000 Baruch Even
|
||||||
* ================================================= */
|
* ================================================= */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include "GraphicsCacheItem.h"
|
#include "GraphicsCacheItem.h"
|
||||||
|
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
///
|
||||||
class GraphicsCacheItem {
|
class GraphicsCacheItem {
|
||||||
public:
|
public:
|
||||||
~GraphicsCacheItem() {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
///
|
||||||
GraphicsCacheItem() {}
|
GraphicsCacheItem() {}
|
||||||
|
//
|
||||||
friend class GraphicsCache;
|
friend class GraphicsCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -114,11 +114,11 @@ void LyXLex::Pimpl::popTable()
|
|||||||
|
|
||||||
bool LyXLex::Pimpl::setFile(string const & filename)
|
bool LyXLex::Pimpl::setFile(string const & filename)
|
||||||
{
|
{
|
||||||
//if (fb__.is_open())
|
if (fb__.is_open())
|
||||||
// lyxerr << "Error in LyXLex::setFile: "
|
lyxerr << "Error in LyXLex::setFile: "
|
||||||
// "file or stream already set." << endl;
|
"file or stream already set." << endl;
|
||||||
fb__.open(filename.c_str(), ios::in);
|
fb__.open(filename.c_str(), ios::in);
|
||||||
//is.rdbuf(&fb__);
|
is.rdbuf(&fb__);
|
||||||
name = filename;
|
name = filename;
|
||||||
lineno = 0;
|
lineno = 0;
|
||||||
return fb__.is_open() && is.good();
|
return fb__.is_open() && is.good();
|
||||||
|
@ -33,34 +33,33 @@ struct LyXLex::Pimpl {
|
|||||||
///
|
///
|
||||||
int table_siz;
|
int table_siz;
|
||||||
};
|
};
|
||||||
|
///
|
||||||
Pimpl(keyword_item * tab, int num);
|
Pimpl(keyword_item * tab, int num);
|
||||||
|
///
|
||||||
string GetString() const;
|
string GetString() const;
|
||||||
|
///
|
||||||
void printError(string const & message) const;
|
void printError(string const & message) const;
|
||||||
|
///
|
||||||
void printTable(std::ostream & os);
|
void printTable(std::ostream & os);
|
||||||
|
///
|
||||||
void pushTable(keyword_item * tab, int num);
|
void pushTable(keyword_item * tab, int num);
|
||||||
|
///
|
||||||
void popTable();
|
void popTable();
|
||||||
|
///
|
||||||
bool setFile(string const & filename);
|
bool setFile(string const & filename);
|
||||||
|
///
|
||||||
void setStream(std::istream & i);
|
void setStream(std::istream & i);
|
||||||
|
///
|
||||||
bool next(bool esc = false);
|
bool next(bool esc = false);
|
||||||
|
|
||||||
///
|
///
|
||||||
int search_kw(char const * const tag) const;
|
int search_kw(char const * const tag) const;
|
||||||
|
///
|
||||||
int lex();
|
int lex();
|
||||||
|
///
|
||||||
bool EatLine();
|
bool EatLine();
|
||||||
|
///
|
||||||
bool nextToken();
|
bool nextToken();
|
||||||
|
///
|
||||||
void pushToken(string const &);
|
void pushToken(string const &);
|
||||||
|
|
||||||
/// fb__ is only used to open files, the stream is accessed through is
|
/// 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) {}
|
equal_1st_in_pair(T1 const & value) : value_(value) {}
|
||||||
|
|
||||||
typedef std::pair<T1, T2> pair_type;
|
typedef std::pair<T1, T2> pair_type;
|
||||||
bool operator() (pair_type p) const {
|
bool operator() (pair_type const & p) const {
|
||||||
return p.first == value_;
|
return p.first == value_;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
@ -38,7 +38,7 @@ public:
|
|||||||
equal_2nd_in_pair(T2 const & value) : value_(value) {}
|
equal_2nd_in_pair(T2 const & value) : value_(value) {}
|
||||||
|
|
||||||
typedef std::pair<T1, T2> pair_type;
|
typedef std::pair<T1, T2> pair_type;
|
||||||
bool operator() (pair_type p) const {
|
bool operator() (pair_type const & p) const {
|
||||||
return p.second == value_;
|
return p.second == value_;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
@ -62,8 +62,6 @@ public:
|
|||||||
Translator(T1 const & t1, T2 const & t2)
|
Translator(T1 const & t1, T2 const & t2)
|
||||||
: default_t1(t1), default_t2(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.
|
/// Add a mapping to the translator.
|
||||||
void addPair(T1 const & first, T2 const & second) {
|
void addPair(T1 const & first, T2 const & second) {
|
||||||
|
Loading…
Reference in New Issue
Block a user