]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetexternal.C
* support/os_unix.C (canAutoOpen, autoOpenFile): on Mac OS X, use
[lyx.git] / src / insets / insetexternal.C
index 6726d9859e69bbedae220d330ddf67d5ac4d6d6c..a047a4fb9426ffb5ea3e7422268f4e89d37c35ef 100644 (file)
@@ -70,11 +70,11 @@ namespace external {
 
 TempName::TempName()
 {
-       string const tempname = support::tempName(string(), "lyxext");
+       support::FileName const tempname(support::tempName(support::FileName(), "lyxext"));
        // FIXME: This is unsafe
-       support::unlink(support::FileName(tempname));
+       support::unlink(tempname);
        // must have an extension for the converter code to work correctly.
-       tempname_ = support::FileName(tempname + ".tmp");
+       tempname_ = support::FileName(tempname.absFilename() + ".tmp");
 }
 
 
@@ -482,10 +482,12 @@ void InsetExternal::edit(LCursor & cur, bool)
 }
 
 
-void InsetExternal::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetExternal::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        renderer_->metrics(mi, dim);
+       bool const changed = dim_ != dim;
        dim_ = dim;
+       return changed;
 }