]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphMetrics.cpp
Improve fullscreen capabilities ( http://bugzilla.lyx.org/show_bug.cgi?id=4146 ).
[lyx.git] / src / ParagraphMetrics.cpp
index 36d850b1d9f867d9bee153852a94d03fb47cf189..873cded4db4561e2978665d5bbc54f2a5a9a1b1a 100644 (file)
@@ -47,7 +47,6 @@
 #include "support/lstrings.h"
 #include "support/textutils.h"
 #include "support/convert.h"
-#include "support/unicode.h"
 
 #include <boost/bind.hpp>
 #include <boost/crc.hpp>
@@ -214,8 +213,8 @@ int ParagraphMetrics::rightMargin(Buffer const & buffer) const
 int ParagraphMetrics::singleWidth(pos_type pos, Font const & font) const
 {
        // The most special cases are handled first.
-       if (par_->isInset(pos))
-               return insetDimension(par_->getInset(pos)).wid;
+       if (Inset const * inset = par_->getInset(pos))
+               return insetDimension(inset).wid;
 
        char_type c = par_->getChar(pos);
 
@@ -231,8 +230,9 @@ int ParagraphMetrics::singleWidth(pos_type pos, Font const & font) const
                                        return 0;
                                c = par_->transformChar(c, pos);
                } else if (language->lang() == "hebrew" &&
-                       Encodings::isComposeChar_hebrew(c))
-                       return 0;
+                               Encodings::isComposeChar_hebrew(c)) {
+                       return 0;       
+               }
        }
        return theFontMetrics(font).width(c);
 }