mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 02:28:19 +00:00
bolzano changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_1_6@2145 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58b46f31be
commit
3883c95207
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
|||||||
|
2001-06-24 The LyX Project <jug@sad.it>
|
||||||
|
|
||||||
|
* src/lyxlex_pimpl.C (compare_tags): use compare_ascii_no_case instead
|
||||||
|
of compare_no_case
|
||||||
|
|
||||||
|
* src/support/lstrings.C (compare_ascii_no_case): version of
|
||||||
|
compare_no_case which only considers case of ascii characters
|
||||||
|
|
||||||
|
* src/support/lyxstring.C (replace): a new version of replace(),
|
||||||
|
to help with compatibility with <sstream> in gcc 2.95.3.
|
||||||
|
|
||||||
|
2001-06-24 The LyX Project <Asger>
|
||||||
|
|
||||||
|
* src/insets/insettabular.C (getMaxWidth): We cache a mapping from
|
||||||
|
inset to cell in order to speed this method up.
|
||||||
|
|
||||||
|
2001-06-23 The LyX Project <jug@sad.it>
|
||||||
|
|
||||||
|
* lib/templates/dinbrief.lyx: remove obsolete \cursor statement
|
||||||
|
|
||||||
2001-06-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2001-06-18 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* lib/tex/cv.cls:
|
* lib/tex/cv.cls:
|
||||||
|
@ -207,9 +207,7 @@ dnl Check the version of g++
|
|||||||
2.95.2) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
2.95.2) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
||||||
2.95.*) CXXFLAGS="-g $lyx_opt -fno-exceptions";;
|
2.95.*) CXXFLAGS="-g $lyx_opt -fno-exceptions";;
|
||||||
2.96*) CXXFLAGS="-g $lyx_opt -fno-exceptions";;
|
2.96*) CXXFLAGS="-g $lyx_opt -fno-exceptions";;
|
||||||
2.97*) CXXFLAGS="-g $lyx_opt -fvtable-thunks -fno-builtin -ffunction-sections -fdata-sections"
|
3.0*) CXXFLAGS="-g $lyx_opt";;
|
||||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE=1";;
|
|
||||||
3.0*) CXXFLAGS="-g $lyx_opt -fvtable-thunks -fno-builtin -ffunction-sections -fdata-sections";;
|
|
||||||
*2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
*2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
||||||
*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
|
||||||
esac
|
esac
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
\newline
|
\newline
|
||||||
<Deine Stadt>
|
<Deine Stadt>
|
||||||
\layout Stadt
|
\layout Stadt
|
||||||
\cursor 17
|
|
||||||
<Stadt für Datum>
|
<Stadt für Datum>
|
||||||
\layout Datum
|
\layout Datum
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ void LaTeX::deplog(DepTable & head)
|
|||||||
// files used by the LaTeX run. The files are then entered into the
|
// files used by the LaTeX run. The files are then entered into the
|
||||||
// dependency file.
|
// dependency file.
|
||||||
|
|
||||||
string logfile = OnlyFilename(ChangeExtension(file, ".log"));
|
string const logfile = OnlyFilename(ChangeExtension(file, ".log"));
|
||||||
|
|
||||||
LRegex reg1("\\)* *\\(([^ )]+).*");
|
LRegex reg1("\\)* *\\(([^ )]+).*");
|
||||||
LRegex reg2("File: ([^ ]+).*");
|
LRegex reg2("File: ([^ ]+).*");
|
||||||
|
@ -1857,12 +1857,28 @@ int InsetTabular::GetMaxWidthOfCell(Painter &, int cell) const
|
|||||||
int InsetTabular::getMaxWidth(Painter & pain,
|
int InsetTabular::getMaxWidth(Painter & pain,
|
||||||
UpdatableInset const * inset) const
|
UpdatableInset const * inset) const
|
||||||
{
|
{
|
||||||
int const n = tabular->GetNumberOfCells();
|
typedef std::map<UpdatableInset const *, int> Cache;
|
||||||
int cell = 0;
|
static Cache cache;
|
||||||
for (; cell < n; ++cell) {
|
|
||||||
if (tabular->GetCellInset(cell) == inset)
|
int cell = -1;
|
||||||
break;
|
Cache::const_iterator ci = cache.find(inset);
|
||||||
|
if (ci != cache.end()) {
|
||||||
|
cell = (*ci).second;
|
||||||
|
if (tabular->GetCellInset(cell) != inset) {
|
||||||
|
cell = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int const n = tabular->GetNumberOfCells();
|
||||||
|
if (cell == -1) {
|
||||||
|
cell = 0;
|
||||||
|
for (; cell < n; ++cell) {
|
||||||
|
if (tabular->GetCellInset(cell) == inset)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
cache[inset] = cell;
|
||||||
|
}
|
||||||
|
|
||||||
if (cell >= n)
|
if (cell >= n)
|
||||||
return -1;
|
return -1;
|
||||||
int w = GetMaxWidthOfCell(pain, cell);
|
int w = GetMaxWidthOfCell(pain, cell);
|
||||||
|
@ -22,7 +22,7 @@ struct compare_tags {
|
|||||||
// used by lower_bound, sort and sorted
|
// used by lower_bound, sort and sorted
|
||||||
inline
|
inline
|
||||||
int operator()(keyword_item const & a, keyword_item const & b) const {
|
int operator()(keyword_item const & a, keyword_item const & b) const {
|
||||||
return compare_no_case(a.tag, b.tag) < 0;
|
return compare_ascii_no_case(a.tag, b.tag) < 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// } // end of anon namespace
|
// } // end of anon namespace
|
||||||
|
@ -241,7 +241,7 @@ void deco_cb(FL_OBJECT *, long data)
|
|||||||
case MM_APPLY:
|
case MM_APPLY:
|
||||||
case MM_OK:
|
case MM_OK:
|
||||||
{
|
{
|
||||||
int i = fl_get_bmtable(fd_deco->menu);
|
unsigned int i = fl_get_bmtable(fd_deco->menu);
|
||||||
// ideally the callback should not be called if the index is
|
// ideally the callback should not be called if the index is
|
||||||
// greater than the maxitem of the bmtable, but I do not know
|
// greater than the maxitem of the bmtable, but I do not know
|
||||||
// how to enforce that (JMarc)
|
// how to enforce that (JMarc)
|
||||||
|
@ -79,6 +79,35 @@ int compare_no_case(string const & s, string const & s2, unsigned int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
int ascii_tolower(int c) {
|
||||||
|
if (c >= 'A' && c <= 'Z')
|
||||||
|
return c - 'A' + 'a';
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
int compare_ascii_no_case(string const & s, string const & s2)
|
||||||
|
{
|
||||||
|
string::const_iterator p = s.begin();
|
||||||
|
string::const_iterator p2 = s2.begin();
|
||||||
|
|
||||||
|
while (p != s.end() && p2 != s2.end()) {
|
||||||
|
int const lc1 = ascii_tolower(*p);
|
||||||
|
int const lc2 = ascii_tolower(*p2);
|
||||||
|
if (lc1 != lc2)
|
||||||
|
return (lc1 < lc2) ? -1 : 1;
|
||||||
|
++p;
|
||||||
|
++p2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s.size() == s2.size())
|
||||||
|
return 0;
|
||||||
|
if (s.size() < s2.size())
|
||||||
|
return -1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isStrInt(string const & str)
|
bool isStrInt(string const & str)
|
||||||
{
|
{
|
||||||
if (str.empty()) return false;
|
if (str.empty()) return false;
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
///
|
///
|
||||||
int compare_no_case(string const & s, string const & s2);
|
int compare_no_case(string const & s, string const & s2);
|
||||||
|
|
||||||
|
///
|
||||||
|
int compare_ascii_no_case(string const & s, string const & s2);
|
||||||
|
|
||||||
///
|
///
|
||||||
int compare_no_case(string const & s, string const & s2, unsigned int len);
|
int compare_no_case(string const & s, string const & s2, unsigned int len);
|
||||||
|
|
||||||
|
@ -1332,6 +1332,12 @@ lyxstring & lyxstring::replace(size_type i, size_type n,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// FY! FY! FY! go away !
|
||||||
|
lyxstring & lyxstring::replace(size_type i, size_type n, value_type c)
|
||||||
|
{
|
||||||
|
return replace(i, n, 1, c);
|
||||||
|
}
|
||||||
|
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
|
lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
|
@ -441,6 +441,9 @@ public:
|
|||||||
lyxstring & replace(size_type i, size_type n,
|
lyxstring & replace(size_type i, size_type n,
|
||||||
size_type n2, value_type c);
|
size_type n2, value_type c);
|
||||||
|
|
||||||
|
/// FY! FY! FY! go away !
|
||||||
|
lyxstring & replace(size_type i, size_type n, value_type c);
|
||||||
|
|
||||||
///
|
///
|
||||||
lyxstring & replace(iterator i, iterator i2, const lyxstring & str);
|
lyxstring & replace(iterator i, iterator i2, const lyxstring & str);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user