From 5e6b00a5464369fc854b623808d22fb0788ef732 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Fri, 5 Apr 2002 14:10:56 +0000 Subject: [PATCH] pt->bp patch from Herbert Voss git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3911 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormGraphics.C | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 82210fc680..0d21aa697c 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-04-05 Herbert Voss + + * FormGraphics.C: use correct unit bp (big point - PostScript point) + for the bounding box values + 2002-04-05 Angus Leeming * FormGraphics.C (updateBB, input): Don't set the path of the file diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 31b9ff10d2..dda36d298a 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -169,7 +169,7 @@ void FormGraphics::build() setPrehandler(bbox_->input_bb_x1); setPrehandler(bbox_->input_bb_y1); - string const bb_units = "pt|cm|in"; + string const bb_units = "bp|cm|in"; fl_addto_choice(bbox_->choice_bb_units, bb_units.c_str()); bc().addReadOnly(bbox_->button_getBB); bc().addReadOnly(bbox_->check_clip); @@ -296,6 +296,7 @@ void FormGraphics::apply() } + void FormGraphics::update() { // Update dialog with details from inset InsetGraphicsParams & igp = controller().params(); @@ -453,7 +454,7 @@ void FormGraphics::updateBB(string const & filename, string const & bb_inset) fl_set_input(bbox_->input_bb_x1, bb.c_str()); fl_set_input(bbox_->input_bb_y1, bb.c_str()); } - // "pt" + // "bp" fl_set_choice(bbox_->choice_bb_units, 1); } else { @@ -464,16 +465,16 @@ void FormGraphics::updateBB(string const & filename, string const & bb_inset) LyXLength anyLength; anyLength = LyXLength(token(bb_inset,' ',0)); updateWidgetsFromLength(bbox_->input_bb_x0, - bbox_->choice_bb_units,anyLength,"pt"); + bbox_->choice_bb_units,anyLength,"bp"); anyLength = LyXLength(token(bb_inset,' ',1)); updateWidgetsFromLength(bbox_->input_bb_y0, - bbox_->choice_bb_units,anyLength,"pt"); + bbox_->choice_bb_units,anyLength,"bp"); anyLength = LyXLength(token(bb_inset,' ',2)); updateWidgetsFromLength(bbox_->input_bb_x1, - bbox_->choice_bb_units,anyLength,"pt"); + bbox_->choice_bb_units,anyLength,"bp"); anyLength = LyXLength(token(bb_inset,' ',3)); updateWidgetsFromLength(bbox_->input_bb_y1, - bbox_->choice_bb_units,anyLength,"pt"); + bbox_->choice_bb_units,anyLength,"bp"); } } @@ -590,7 +591,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str()); fl_set_input(bbox_->input_bb_x1, token(bb,' ',2).c_str()); fl_set_input(bbox_->input_bb_y1, token(bb,' ',3).c_str()); - string const unit("pt"); + string const unit("bp"); fl_set_choice_text(bbox_->choice_bb_units, unit.c_str()); } controller().bbChanged = false; @@ -599,7 +600,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) fl_set_input(bbox_->input_bb_y0, ""); fl_set_input(bbox_->input_bb_x1, ""); fl_set_input(bbox_->input_bb_y1, ""); - fl_set_choice_text(bbox_->choice_bb_units, "pt"); + fl_set_choice_text(bbox_->choice_bb_units, "bp"); } // the size section -- 2.39.2