mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
No trailing whitespace left in src...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7904 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
16e1f90daa
commit
18b220ac99
@ -52,7 +52,7 @@ void ControlBox::dispatchParams()
|
|||||||
void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
|
void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
|
||||||
{
|
{
|
||||||
char const * const ids_[] = {
|
char const * const ids_[] = {
|
||||||
"Frameless", "Boxed", "ovalbox",
|
"Frameless", "Boxed", "ovalbox",
|
||||||
"Ovalbox", "Shadowbox", "Doublebox"};
|
"Ovalbox", "Shadowbox", "Doublebox"};
|
||||||
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
||||||
ids = vector<string>(ids_, ids_ + ids_size);
|
ids = vector<string>(ids_, ids_ + ids_size);
|
||||||
@ -65,11 +65,11 @@ void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
|
|||||||
gui_names.push_back(_("Double box"));
|
gui_names.push_back(_("Double box"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void box_gui_tokens_special_length(vector<string> & ids,
|
void box_gui_tokens_special_length(vector<string> & ids,
|
||||||
vector<string> & gui_names)
|
vector<string> & gui_names)
|
||||||
{
|
{
|
||||||
char const * const ids_[] = {
|
char const * const ids_[] = {
|
||||||
"none", "height", "depth",
|
"none", "height", "depth",
|
||||||
"totalheight", "width"};
|
"totalheight", "width"};
|
||||||
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
||||||
ids = vector<string>(ids_, ids_ + ids_size);
|
ids = vector<string>(ids_, ids_ + ids_size);
|
||||||
|
@ -43,7 +43,7 @@ private:
|
|||||||
///
|
///
|
||||||
void box_gui_tokens(std::vector<std::string> &, std::vector<std::string> &);
|
void box_gui_tokens(std::vector<std::string> &, std::vector<std::string> &);
|
||||||
///
|
///
|
||||||
void box_gui_tokens_special_length(std::vector<std::string> &,
|
void box_gui_tokens_special_length(std::vector<std::string> &,
|
||||||
std::vector<std::string> &);
|
std::vector<std::string> &);
|
||||||
|
|
||||||
#endif // CONTROLBOX_H
|
#endif // CONTROLBOX_H
|
||||||
|
@ -18,7 +18,7 @@ def cppClass(gladeClass):
|
|||||||
return "Gtk::" + gladeClass[3:]
|
return "Gtk::" + gladeClass[3:]
|
||||||
elif gnome.search(gladeClass):
|
elif gnome.search(gladeClass):
|
||||||
return "Gnome::" + gladeClass[5:]
|
return "Gnome::" + gladeClass[5:]
|
||||||
|
|
||||||
class widget:
|
class widget:
|
||||||
def __init__(self, clss, name):
|
def __init__(self, clss, name):
|
||||||
self.clss = cppClass(clss)
|
self.clss = cppClass(clss)
|
||||||
@ -27,7 +27,7 @@ class widget:
|
|||||||
def getAccessor(self):
|
def getAccessor(self):
|
||||||
function = ""
|
function = ""
|
||||||
function += self.clss + " * " + dialog +"::" + self.name
|
function += self.clss + " * " + dialog +"::" + self.name
|
||||||
function += "() const \n{\n return getWidget<" + self.clss
|
function += "() const \n{\n return getWidget<" + self.clss
|
||||||
function += ">(\"" + "r_" + self.name + "\");\n}\n"
|
function += ">(\"" + "r_" + self.name + "\");\n}\n"
|
||||||
|
|
||||||
return function
|
return function
|
||||||
@ -47,17 +47,17 @@ class GnomeFrontendHandler(ContentHandler):
|
|||||||
self.elemstack = []
|
self.elemstack = []
|
||||||
self.widget = 0
|
self.widget = 0
|
||||||
self.TODO = []
|
self.TODO = []
|
||||||
|
|
||||||
def startElement(self, name, attrs):
|
def startElement(self, name, attrs):
|
||||||
self.elemstack.append(name)
|
self.elemstack.append(name)
|
||||||
if name == "widget" and rn.search(attrs["id"]):
|
if name == "widget" and rn.search(attrs["id"]):
|
||||||
self.TODO.append(widget(attrs["class"],
|
self.TODO.append(widget(attrs["class"],
|
||||||
re.sub("^r_", "", attrs["id"])))
|
re.sub("^r_", "", attrs["id"])))
|
||||||
|
|
||||||
def endElement(self, name):
|
def endElement(self, name):
|
||||||
self.elemstack.pop()
|
self.elemstack.pop()
|
||||||
|
|
||||||
|
|
||||||
def characters(self, data):
|
def characters(self, data):
|
||||||
|
|
||||||
elem = self.elemstack[-1]
|
elem = self.elemstack[-1]
|
||||||
@ -97,7 +97,7 @@ for i in hndlr.widgets():
|
|||||||
dotH.close()
|
dotH.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char const * const dialognames[] = {
|
char const * const dialognames[] = {
|
||||||
"aboutlyx", "bibitem", "bibtex", "branch", "box", "changes",
|
"aboutlyx", "bibitem", "bibtex", "branch", "box", "changes",
|
||||||
"character", "citation", "error", "errorlist" , "ert", "external", "file",
|
"character", "citation", "error", "errorlist" , "ert", "external", "file",
|
||||||
"float", "graphics", "include", "index", "label", "latexlog", "mathpanel",
|
"float", "graphics", "include", "index", "label", "latexlog", "mathpanel",
|
||||||
|
@ -97,19 +97,19 @@ void FormBox::build()
|
|||||||
}
|
}
|
||||||
|
|
||||||
string choice = getStringFromVector(getLatexUnits(), "|");
|
string choice = getStringFromVector(getLatexUnits(), "|");
|
||||||
fl_addto_choice(dialog_->choice_width_unit,
|
fl_addto_choice(dialog_->choice_width_unit,
|
||||||
subst(choice, "%", "%%").c_str());
|
subst(choice, "%", "%%").c_str());
|
||||||
|
|
||||||
bcview().addReadOnly(dialog_->input_height);
|
bcview().addReadOnly(dialog_->input_height);
|
||||||
bcview().addReadOnly(dialog_->choice_height_unit);
|
bcview().addReadOnly(dialog_->choice_height_unit);
|
||||||
bcview().addReadOnly(dialog_->choice_height_special);
|
bcview().addReadOnly(dialog_->choice_height_special);
|
||||||
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
||||||
fl_addto_choice(dialog_->choice_height_special,
|
fl_addto_choice(dialog_->choice_height_special,
|
||||||
gui_names_spec_[i].c_str());
|
gui_names_spec_[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
choice = getStringFromVector(getLatexUnits(), "|");
|
choice = getStringFromVector(getLatexUnits(), "|");
|
||||||
fl_addto_choice(dialog_->choice_height_unit,
|
fl_addto_choice(dialog_->choice_height_unit,
|
||||||
subst(choice, "%", "%%").c_str());
|
subst(choice, "%", "%%").c_str());
|
||||||
|
|
||||||
bcview().setOK(dialog_->button_ok);
|
bcview().setOK(dialog_->button_ok);
|
||||||
@ -151,7 +151,7 @@ void FormBox::update()
|
|||||||
string special(controller().params().special);
|
string special(controller().params().special);
|
||||||
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
||||||
if (special == ids_spec_[i])
|
if (special == ids_spec_[i])
|
||||||
fl_set_choice_text(dialog_->choice_special,
|
fl_set_choice_text(dialog_->choice_special,
|
||||||
gui_names_spec_[i].c_str());
|
gui_names_spec_[i].c_str());
|
||||||
}
|
}
|
||||||
// Special width unit must be default for general units to be enabled
|
// Special width unit must be default for general units to be enabled
|
||||||
@ -165,7 +165,7 @@ void FormBox::update()
|
|||||||
string const height_special(controller().params().height_special);
|
string const height_special(controller().params().height_special);
|
||||||
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
|
||||||
if (height_special == ids_spec_[i])
|
if (height_special == ids_spec_[i])
|
||||||
fl_set_choice_text(dialog_->choice_height_special,
|
fl_set_choice_text(dialog_->choice_height_special,
|
||||||
gui_names_spec_[i].c_str());
|
gui_names_spec_[i].c_str());
|
||||||
}
|
}
|
||||||
setEnabled(dialog_->input_height, controller().params().inner_box);
|
setEnabled(dialog_->input_height, controller().params().inner_box);
|
||||||
@ -183,46 +183,46 @@ void FormBox::apply()
|
|||||||
controller().params().type = ids_[i - 1];
|
controller().params().type = ids_[i - 1];
|
||||||
|
|
||||||
controller().params().inner_box = fl_get_button(dialog_->check_inner_box);
|
controller().params().inner_box = fl_get_button(dialog_->check_inner_box);
|
||||||
controller().params().use_parbox =
|
controller().params().use_parbox =
|
||||||
fl_get_button(dialog_->radio_parbox);
|
fl_get_button(dialog_->radio_parbox);
|
||||||
controller().params().width =
|
controller().params().width =
|
||||||
LyXLength(getLengthFromWidgets(dialog_->input_width,
|
LyXLength(getLengthFromWidgets(dialog_->input_width,
|
||||||
dialog_->choice_width_unit));
|
dialog_->choice_width_unit));
|
||||||
|
|
||||||
controller().params().pos =
|
controller().params().pos =
|
||||||
"tcb"[fl_get_choice(dialog_->choice_pos) - 1];
|
"tcb"[fl_get_choice(dialog_->choice_pos) - 1];
|
||||||
controller().params().inner_pos =
|
controller().params().inner_pos =
|
||||||
"tcbs"[fl_get_choice(dialog_->choice_inner_pos) - 1];
|
"tcbs"[fl_get_choice(dialog_->choice_inner_pos) - 1];
|
||||||
controller().params().hor_pos =
|
controller().params().hor_pos =
|
||||||
"lcrs"[fl_get_choice(dialog_->choice_hor_pos) - 1];
|
"lcrs"[fl_get_choice(dialog_->choice_hor_pos) - 1];
|
||||||
|
|
||||||
i = fl_get_choice(dialog_->choice_special);
|
i = fl_get_choice(dialog_->choice_special);
|
||||||
controller().params().special = ids_spec_[i - 1];
|
controller().params().special = ids_spec_[i - 1];
|
||||||
|
|
||||||
controller().params().height =
|
controller().params().height =
|
||||||
LyXLength(getLengthFromWidgets(dialog_->input_height,
|
LyXLength(getLengthFromWidgets(dialog_->input_height,
|
||||||
dialog_->choice_height_unit));
|
dialog_->choice_height_unit));
|
||||||
i = fl_get_choice(dialog_->choice_height_special);
|
i = fl_get_choice(dialog_->choice_height_special);
|
||||||
controller().params().height_special = ids_spec_[i - 1];
|
controller().params().height_special = ids_spec_[i - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
||||||
{
|
{
|
||||||
if (ob == dialog_->check_inner_box) {
|
if (ob == dialog_->check_inner_box) {
|
||||||
setEnabled(dialog_->choice_pos,
|
setEnabled(dialog_->choice_pos,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->radio_parbox,
|
setEnabled(dialog_->radio_parbox,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->radio_minipage,
|
setEnabled(dialog_->radio_minipage,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->choice_width_unit, true);
|
setEnabled(dialog_->choice_width_unit, true);
|
||||||
setEnabled(dialog_->choice_special,
|
setEnabled(dialog_->choice_special,
|
||||||
!fl_get_button(dialog_->check_inner_box));
|
!fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->input_height,
|
setEnabled(dialog_->input_height,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->choice_height_unit,
|
setEnabled(dialog_->choice_height_unit,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->choice_height_special,
|
setEnabled(dialog_->choice_height_special,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
setEnabled(dialog_->choice_hor_pos,
|
setEnabled(dialog_->choice_hor_pos,
|
||||||
!fl_get_button(dialog_->check_inner_box));
|
!fl_get_button(dialog_->check_inner_box));
|
||||||
@ -237,15 +237,15 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ob == dialog_->choice_special || ob == dialog_->check_inner_box)
|
if (ob == dialog_->choice_special || ob == dialog_->check_inner_box)
|
||||||
setEnabled(dialog_->choice_width_unit,
|
setEnabled(dialog_->choice_width_unit,
|
||||||
fl_get_choice(dialog_->choice_special) == NONE);
|
fl_get_choice(dialog_->choice_special) == NONE);
|
||||||
if (ob == dialog_->choice_height_special || ob == dialog_->check_inner_box)
|
if (ob == dialog_->choice_height_special || ob == dialog_->check_inner_box)
|
||||||
if (fl_get_choice(dialog_->choice_height_special) != NONE)
|
if (fl_get_choice(dialog_->choice_height_special) != NONE)
|
||||||
setEnabled(dialog_->choice_height_unit, false);
|
setEnabled(dialog_->choice_height_unit, false);
|
||||||
else
|
else
|
||||||
setEnabled(dialog_->choice_height_unit,
|
setEnabled(dialog_->choice_height_unit,
|
||||||
fl_get_button(dialog_->check_inner_box));
|
fl_get_button(dialog_->check_inner_box));
|
||||||
|
|
||||||
// An inner box (parbox, minipage) is mandatory if no outer box
|
// An inner box (parbox, minipage) is mandatory if no outer box
|
||||||
if (ob == dialog_->choice_type) {
|
if (ob == dialog_->choice_type) {
|
||||||
int i = fl_get_choice(dialog_->choice_type);
|
int i = fl_get_choice(dialog_->choice_type);
|
||||||
@ -263,7 +263,7 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
|||||||
if (invalid) {
|
if (invalid) {
|
||||||
postWarning(_("Invalid Length!"));
|
postWarning(_("Invalid Length!"));
|
||||||
return ButtonPolicy::SMI_INVALID;
|
return ButtonPolicy::SMI_INVALID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ob == dialog_->input_height) {
|
if (ob == dialog_->input_height) {
|
||||||
string const input = getString(dialog_->input_height);
|
string const input = getString(dialog_->input_height);
|
||||||
@ -271,10 +271,10 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
|||||||
if (invalid) {
|
if (invalid) {
|
||||||
postWarning(_("Invalid Length!"));
|
postWarning(_("Invalid Length!"));
|
||||||
return ButtonPolicy::SMI_INVALID;
|
return ButtonPolicy::SMI_INVALID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ob == dialog_->button_defaults) {
|
if (ob == dialog_->button_defaults) {
|
||||||
fl_set_button(dialog_->check_inner_box, true);
|
fl_set_button(dialog_->check_inner_box, true);
|
||||||
fl_set_button(dialog_->radio_parbox, false);
|
fl_set_button(dialog_->radio_parbox, false);
|
||||||
fl_set_input(dialog_->input_width, "100");
|
fl_set_input(dialog_->input_width, "100");
|
||||||
fl_set_choice(dialog_->choice_width_unit, LyXLength::PCW + 1);
|
fl_set_choice(dialog_->choice_width_unit, LyXLength::PCW + 1);
|
||||||
@ -282,7 +282,7 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
|
|||||||
fl_set_input(dialog_->input_height, "1");
|
fl_set_input(dialog_->input_height, "1");
|
||||||
fl_set_choice(dialog_->choice_height_special, TOTALHEIGHT);
|
fl_set_choice(dialog_->choice_height_special, TOTALHEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ButtonPolicy::SMI_VALID;
|
return ButtonPolicy::SMI_VALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
2003-10-07 Martin Vermeer <martin.vermeer@hut.fi>
|
2003-10-07 Martin Vermeer <martin.vermeer@hut.fi>
|
||||||
|
|
||||||
* GraphicsCache.h:
|
* GraphicsCache.h:
|
||||||
* PreviewImage.h: add <string> and other small fixes to make
|
* PreviewImage.h: add <string> and other small fixes to make
|
||||||
Lars' std::string patch compile with STLport.
|
Lars' std::string patch compile with STLport.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* ExternalTransforms.C:
|
* ExternalTransforms.C:
|
||||||
* insetbox.C:
|
* insetbox.C:
|
||||||
* insetbox.h: ws changes only
|
* insetbox.h: ws changes only
|
||||||
|
|
||||||
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* insetinclude.C (localDispatch): do not call
|
* insetinclude.C (localDispatch): do not call
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "math_nestinset.h"
|
#include "math_nestinset.h"
|
||||||
|
|
||||||
|
|
||||||
/// Inset for AMSTeX's \boldsymbol
|
/// Inset for AMSTeX's \boldsymbol
|
||||||
class MathBoldsymbolInset : public MathNestInset {
|
class MathBoldsymbolInset : public MathNestInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
|
@ -25,7 +25,7 @@ namespace lyx
|
|||||||
// used there...
|
// used there...
|
||||||
typedef ptrdiff_t pos_type;
|
typedef ptrdiff_t pos_type;
|
||||||
|
|
||||||
/// a type for paragraph offsets
|
/// a type for paragraph offsets
|
||||||
typedef ptrdiff_t paroffset_type;
|
typedef ptrdiff_t paroffset_type;
|
||||||
|
|
||||||
/// a type for the nesting depth of a paragraph
|
/// a type for the nesting depth of a paragraph
|
||||||
|
@ -366,7 +366,7 @@ public:
|
|||||||
///
|
///
|
||||||
InsetText & getCellInset(int row, int column) const;
|
InsetText & getCellInset(int row, int column) const;
|
||||||
/// Search for \param inset in the tabular, with the
|
/// Search for \param inset in the tabular, with the
|
||||||
///
|
///
|
||||||
int getCellFromInset(InsetOld const * inset) const;
|
int getCellFromInset(InsetOld const * inset) const;
|
||||||
///
|
///
|
||||||
int rows() const { return rows_; }
|
int rows() const { return rows_; }
|
||||||
|
Loading…
Reference in New Issue
Block a user