} else {
// get the values from the inset
LyXLength anyLength;
- string const xl(token(igp.bb,' ',0));
- string const yl(token(igp.bb,' ',1));
- string const xr(token(igp.bb,' ',2));
- string const yr(token(igp.bb,' ',3));
+ string const xl(token(igp.bb, ' ', 0));
+ string const yl(token(igp.bb, ' ', 1));
+ string const xr(token(igp.bb, ' ', 2));
+ string const yr(token(igp.bb, ' ', 3));
if (isValidLength(xl, &anyLength)) {
dialog_->lbX->setText(tostr(anyLength.value()).c_str());
string const unit(unit_name[anyLength.unit()]);
{
InsetGraphicsParams & igp = controller().params();
- igp.filename = dialog_->filename->text();
+ igp.filename = dialog_->filename->text().latin1();
// the bb section
igp.bb.erase();
if (controller().bbChanged) {
string bb;
- string lbX(dialog_->lbX->text());
- string lbY(dialog_->lbY->text());
- string rtX(dialog_->rtX->text());
- string rtY(dialog_->rtY->text());
+ string lbX(dialog_->lbX->text().latin1());
+ string lbY(dialog_->lbY->text().latin1());
+ string rtX(dialog_->rtX->text().latin1());
+ string rtY(dialog_->rtY->text().latin1());
int bb_sum =
strToInt(lbX) + strToInt(lbY) +
strToInt(rtX) + strToInt(rtX);
igp.draft = dialog_->draftCB->isChecked();
igp.clip = dialog_->clip->isChecked();
igp.subcaption = dialog_->subfigure->isChecked();
- igp.subcaptionText = dialog_->subcaption->text();
+ igp.subcaptionText = dialog_->subcaption->text().latin1();
switch (dialog_->showCB->currentItem()) {
case 0: igp.display = grfx::DefaultDisplay; break;
if (!dialog_->displayCB->isChecked())
igp.display = grfx::NoDisplay;
- string value(dialog_->width->text());
+ string value(dialog_->width->text().latin1());
if (dialog_->widthUnit->currentItem() > 0) {
// width/height combination
int const unitNo = getUnitNo(unit_name_gui,
- string(dialog_->widthUnit->currentText()));
+ dialog_->widthUnit->currentText().latin1());
igp.width = LyXLength(value + unit_name_ltx[unitNo]);
igp.scale = 0.0;
} else {
igp.scale = strToDbl(value);
igp.width = LyXLength();
}
- value = string(dialog_->height->text());
+ value = dialog_->height->text().latin1();
int const unitNo = getUnitNo(unit_name_gui,
- string(dialog_->heightUnit->currentText()));
+ dialog_->heightUnit->currentText().latin1());
igp.height = LyXLength(value + unit_name_ltx[unitNo]);
igp.keepAspectRatio = dialog_->aspectratio->isChecked();
igp.noUnzip = dialog_->unzipCB->isChecked();
- igp.lyxscale = strToInt(string(dialog_->displayscale->text()));
+ igp.lyxscale = strToInt(dialog_->displayscale->text().latin1());
- igp.rotateAngle = strToDbl(string(dialog_->angle->text()));
+ igp.rotateAngle = strToDbl(dialog_->angle->text().latin1());
while (igp.rotateAngle < -360.0)
igp.rotateAngle += 360.0;
while (igp.rotateAngle > 360.0)
QGraphics::origin_ltx[dialog_->origin->currentItem()];
// more latex options
- igp.special = dialog_->latexoptions->text();
+ igp.special = dialog_->latexoptions->text().latin1();
}
void QGraphics::getBB()
{
- string const filename(dialog_->filename->text());
+ string const filename(dialog_->filename->text().latin1());
if (!filename.empty()) {
string const bb(controller().readBB(filename));
if (!bb.empty()) {
bool QGraphics::isValid()
{
- // FIXME: we need more here.
- // why?? LaTeX needs a filename, the rest is user-specific (Herbert)
return !string(dialog_->filename->text().latin1()).empty();
}
VSpace const space_top =
setVSpaceFromWidgets(dialog_->spacingAbove->currentItem(),
- string(dialog_->valueAbove->text()),
- string(dialog_->unitAbove->currentText()),
+ dialog_->valueAbove->text().latin1(),
+ dialog_->unitAbove->currentText().latin1(),
dialog_->keepAbove->isChecked());
params.spaceTop(space_top);
VSpace const space_bottom =
setVSpaceFromWidgets(dialog_->spacingBelow->currentItem(),
- string(dialog_->valueBelow->text()),
- string(dialog_->unitBelow->currentText()),
+ dialog_->valueBelow->text().latin1(),
+ dialog_->unitBelow->currentText().latin1(),
dialog_->keepBelow->isChecked());
params.spaceBottom(space_bottom);
break;
case 4:
linespacing = Spacing::Other;
- other = dialog_->linespacingValue->text();
+ other = dialog_->linespacingValue->text().latin1();
break;
}