]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormGraphics.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormGraphics.C
index b8848293019e645198a1d93ed2d8b27022fca49b..af3f41d5cccedf081fc626648ca5f27369ac51d5 100644 (file)
@@ -4,47 +4,48 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Baruch Even
- * \author Herbert Voss
+ * \author Herbert Voß
  * \author Rob Lahaye
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-#include "xformsBC.h"
-#include "ControlGraphics.h"
 #include "FormGraphics.h"
+#include "ControlGraphics.h"
 #include "forms/form_graphics.h"
 
+#include "controllers/helper_funcs.h"
+
 #include "checkedwidgets.h"
 #include "input_validators.h"
 #include "Tooltips.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
 
-#include "buffer.h"
-#include "debug.h" // for lyxerr
 #include "lyxrc.h" // for lyxrc.display_graphics
 
 #include "insets/insetgraphicsParams.h"
 
-#include "controllers/helper_funcs.h" // for getStringFromVector
-
 #include "frontends/Alert.h"
 
-#include "support/tostr.h"
-#include "support/lstrings.h"  // for strToDbl
 #include "support/lyxlib.h"  // for float_equal
-#include "support/filetools.h"  // for MakeAbsPath etc
-
-#include "support/BoostFormat.h"
+#include "support/tostr.h"
 
 #include "lyx_forms.h"
 
-using namespace lyx::support;
+using lyx::support::bformat;
+using lyx::support::float_equal;
+using lyx::support::getStringFromVector;
+using lyx::support::strToDbl;
+using lyx::support::strToInt;
+using lyx::support::token;
 
 using std::endl;
+
 using std::vector;
+using std::string;
 
 
 namespace {
@@ -275,14 +276,14 @@ void FormGraphics::build()
 
        // set the right default unit
        switch (lyxrc.default_papersize) {
-       case BufferParams::PAPER_DEFAULT: break;
-       case BufferParams::PAPER_USLETTER:
-       case BufferParams::PAPER_LEGALPAPER:
-       case BufferParams::PAPER_EXECUTIVEPAPER: defaultUnit = "in"; break;
-       case BufferParams::PAPER_A3PAPER:
-       case BufferParams::PAPER_A4PAPER:
-       case BufferParams::PAPER_A5PAPER:
-       case BufferParams::PAPER_B5PAPER: defaultUnit = "cm"; break;
+       case PAPER_DEFAULT: break;
+       case PAPER_USLETTER:
+       case PAPER_LEGALPAPER:
+       case PAPER_EXECUTIVEPAPER: defaultUnit = "in"; break;
+       case PAPER_A3PAPER:
+       case PAPER_A4PAPER:
+       case PAPER_A5PAPER:
+       case PAPER_B5PAPER: defaultUnit = "cm"; break;
        }
 }
 
@@ -294,7 +295,7 @@ void FormGraphics::apply()
 
        // the file section
        igp.filename.set(getString(file_->input_filename),
-                        kernel().buffer()->filePath());
+                        kernel().bufferFilepath());
 
        igp.lyxscale = strToInt(getString(file_->input_lyxscale));
        if (igp.lyxscale == 0) {
@@ -427,7 +428,7 @@ void FormGraphics::update() {
 
        // the file section
        string const name =
-               igp.filename.outputFilename(kernel().buffer()->filePath());
+               igp.filename.outputFilename(kernel().bufferFilepath());
        fl_set_input(file_->input_filename, name.c_str());
        fl_set_input(file_->input_lyxscale, tostr(igp.lyxscale).c_str());
 
@@ -573,7 +574,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
        if (ob == file_->button_browse) {
                // Get the filename from the dialog
                string const in_name = getString(file_->input_filename);
-               string const out_name = controller().Browse(in_name);
+               string const out_name = controller().browse(in_name);
                lyxerr[Debug::GRAPHICS]
                        << "[FormGraphics]out_name: " << out_name << endl;
                if (out_name != in_name && !out_name.empty()) {