- params_.width = Length(width);
-
- i = 0;
- spec = false;
- special = heightUnitsLC->currentText();
- value = heightED->text();
- if (special == qt_("Height")) {
- i = 1;
- spec = true;
- } else if (special == qt_("Depth")) {
- i = 2;
- spec = true;
- } else if (special == qt_("Total Height")) {
- i = 3;
- spec = true;
- } else if (special == qt_("Width")) {
- i = 4;
- spec = true;
- }
- // the user might insert a non-special value in the line edit
- if (isValidLength(fromqstr(value))) {
- i = 0;
- spec = false;
- }
- params_.height_special = fromqstr(ids_spec_[i]);
-
- string height;
- if (spec && !isValidLength(fromqstr(heightED->text()))) {
- height = fromqstr(value);
- // beware: bogosity! the unit is simply ignored in this case
- height += "in";
- } else
- height = widgetsToLength(heightED, heightUnitsLC);
-
- // the height parameter is omitted in InsetBox.cpp when the value