]> git.lyx.org Git - lyx.git/commitdiff
pt->bp patch from Herbert Voss
authorLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 5 Apr 2002 14:10:56 +0000 (14:10 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 5 Apr 2002 14:10:56 +0000 (14:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3911 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormGraphics.C

index 82210fc6804b2f3fe08c828adf021fef117a5544..0d21aa697cb90d0853414a20d4259d63d651b063 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-05  Herbert Voss  <voss@perce.de>
+
+       * FormGraphics.C: use correct unit bp (big point - PostScript point)
+       for the bounding box values
+
 2002-04-05  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormGraphics.C (updateBB, input): Don't set the path of the file
index 31b9ff10d2d980be57e44b14f5bdf0a6d74068d2..dda36d298a6247700fb1eb73d3a7afe7ad6c5c07 100644 (file)
@@ -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