two small patches

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1122 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-10-15 03:46:23 +00:00
parent 085b92730c
commit a5af5783ac
11 changed files with 46 additions and 21 deletions

View File

@ -1,3 +1,15 @@
2000-10-13 Angus Leeming <a.leeming@ic.ac.uk>
* src/combox.[Ch]:
* src/frontends/xforms/FormDocument.C:
* src/frontends/xforms/Menubar_pimpl.C: small changes so that they
compile without "conversion to integral type of smaller size"
warnings.
2000-10-13 Dekel Tsur <dekelts@tau.ac.il>
* src/text.C (GetColumnNearX): Fixed disabled code.
2000-10-13 Lars Gullik Bjønnes <larsbj@lyx.org>
* configure.in (CPPFLAGS): add snprintf and vsnprintf to

View File

@ -187,7 +187,7 @@ dnl Check the version of g++
2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti -fno-exceptions";;
2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
2.96*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
2.97*) CXXFLAGS="-g $lyx_opt -fhonor-std -fvtable-thunks -ffunction-sections -fdata-sections";;
2.97*) CXXFLAGS="-g $lyx_opt -fhonor-std";;
*2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
esac

View File

@ -31,6 +31,7 @@ src/frontends/kde/formcopyrightdialogdata.C
src/frontends/kde/FormIndex.C
src/frontends/kde/formindexdialog.C
src/frontends/kde/FormPrint.C
src/frontends/kde/formprintdialogdata.C
src/frontends/kde/FormRef.C
src/frontends/kde/formrefdialog.C
src/frontends/kde/FormToc.C

View File

@ -142,7 +142,7 @@ bool Combox::select_text(string const & t)
}
void Combox::select(int i)
void Combox::select(size_t i)
{
if (!browser || !button) return;
if (i > 0 && i <= fl_get_browser_maxline(browser)) sel = i;

View File

@ -75,7 +75,7 @@ public:
string const getline() const;
/// Select an arbitrary item
void select(int);
void select(size_t);
///
bool select_text(string const &);

View File

@ -8,4 +8,6 @@ INCLUDES = -I${srcdir}/../../ $(SIGC_CFLAGS)
libfrontendsupport_la_SOURCES = \
LyXImage.h \
LyXImage.C
LyXImage.C \
LyXImage_X.h \
LyXImage_X.C

View File

@ -432,7 +432,7 @@ bool FormDocument::class_apply()
#endif
}
}
char tmpsep = params.paragraph_separation;
BufferParams::PARSEP tmpsep = params.paragraph_separation;
if (fl_get_button(class_->radio_doc_indent))
params.paragraph_separation = BufferParams::PARSEP_INDENT;
else
@ -505,8 +505,10 @@ void FormDocument::paper_apply()
{
BufferParams & params = lv_->buffer()->params;
params.papersize2 = fl_get_choice(paper_->choice_papersize2)-1;
params.paperpackage = fl_get_choice(paper_->choice_paperpackage)-1;
params.papersize2 =
static_cast<char>(fl_get_choice(paper_->choice_papersize2)-1);
params.paperpackage =
static_cast<char>(fl_get_choice(paper_->choice_paperpackage)-1);
params.use_geometry = fl_get_button(paper_->push_use_geometry);
if (fl_get_button(paper_->radio_landscape))
params.orientation = BufferParams::ORIENTATION_LANDSCAPE;
@ -827,7 +829,7 @@ void FormDocument::checkMarginValues()
bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
{
string str;
char val;
int val;
bool ok = true;
char const * input;

View File

@ -56,7 +56,8 @@ inline
int string_width(string const & str)
{
return fl_get_string_widthTAB(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
str.c_str(), str.length());
str.c_str(),
static_cast<int>(str.length()));
}
@ -195,7 +196,8 @@ int get_new_submenu(vector<int> & smn, Window win)
{
static size_type max_number_of_menus = 32;
if (smn.size() >= max_number_of_menus)
max_number_of_menus = fl_setpup_maxpup(2*smn.size());
max_number_of_menus =
fl_setpup_maxpup(static_cast<int>(2*smn.size()));
int menu = fl_newpup(win);
smn.push_back(menu);
return menu;

View File

@ -2,6 +2,10 @@
#include <cstdio>
#include <cstdarg>
#ifndef HAVE_VSNPRINTF
#include "support/snprintf.h"
#endif
#include "LString.h"
/* This output manipulator gives the option to use Old style format

View File

@ -240,6 +240,10 @@
* implementation, there may be other incompatibilities.
*/
/* added by Lgb, the LyX Project */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* ============================================= */

View File

@ -3834,7 +3834,7 @@ int LyXText::GetColumnNearX(BufferView * bview, Row * row, int & x,
++vc;
}
if (vc > row->pos() && (tmpx + last_tmpx) / 2 > x) {
if ((tmpx + last_tmpx) / 2 > x) {
tmpx = last_tmpx;
left_side = true;
}
@ -3843,22 +3843,20 @@ int LyXText::GetColumnNearX(BufferView * bview, Row * row, int & x,
vc = last + 1;
boundary = false;
#if 0 // currently unused
bool lastrow = (!row->next() || row->next()->par() != row->par());
bool lastrow = lyxrc.rtl_support // This is not needed, but gives
// some speedup if rtl_support=false
&& (!row->next() || row->next()->par() != row->par());
bool rtl = (lastrow)
? row->par()->isRightToLeftPar(bview->buffer()->params)
: false;
#endif
: false; // If lastrow is false, we don't need to compute
// the value of rtl.
if (row->pos() > last) // Row is empty?
c = row->pos();
#warning This is wrong, please have a look Dekel (Jug)
#if 0
else if (lastrow &&
( (rtl && vc == row->pos()&& x < tmpx - 5) ||
(!rtl && vc == last + 1 && x > tmpx + 5) ))
( ( rtl && left_side && vc == row->pos() && x < tmpx - 5) ||
(!rtl && !left_side && vc == last + 1 && x > tmpx + 5) ))
c = last + 1;
#endif
else if (vc == row->pos()) {
c = vis2log(vc);
if (bidi_level(c) % 2 == 1)