- FileName const name(makeAbsPath(fname, bufferFilepath()));
- return isFileReadable(name);
-}
-
-
-void GuiGraphics::editGraphics()
-{
- dialog().applyView();
- string const lfun =
- InsetGraphicsMailer::params2string(params_, buffer());
- dispatch(FuncRequest(LFUN_GRAPHICS_EDIT, lfun));
-}
-
-
-namespace {
-
-char const * const bb_units[] = { "bp", "cm", "mm", "in" };
-size_t const bb_size = sizeof(bb_units) / sizeof(char *);
-
-// These are the strings that are stored in the LyX file and which
-// correspond to the LaTeX identifiers shown in the comments at the
-// end of each line.
-char const * const rorigin_lyx_strs[] = {
- // the LaTeX default is leftBaseline
- "",
- "leftTop", "leftBottom", "leftBaseline", // lt lb lB
- "center", "centerTop", "centerBottom", "centerBaseline", // c ct cb cB
- "rightTop", "rightBottom", "rightBaseline" }; // rt rb rB
-
-// These are the strings, corresponding to the above, that the GUI should
-// use. Note that they can/should be translated.
-char const * const rorigin_gui_strs[] = {
- N_("Default"),
- N_("Top left"), N_("Bottom left"), N_("Baseline left"),
- N_("Center"), N_("Top center"), N_("Bottom center"), N_("Baseline center"),
- N_("Top right"), N_("Bottom right"), N_("Baseline right") };
-
-size_t const rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *);
-
-} // namespace anon
-
-
-vector<string> const getBBUnits()
-{
- return vector<string>(bb_units, bb_units + bb_size);
-}
-
-
-vector<RotationOriginPair> getRotationOriginData()
-{
- static vector<RotationOriginPair> data;
- if (!data.empty())
- return data;
-
- data.resize(rorigin_size);
- for (size_type i = 0; i < rorigin_size; ++i) {
- data[i] = make_pair(_(rorigin_gui_strs[i]),
- rorigin_lyx_strs[i]);
- }
-
- return data;