]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
Small fixes to various InsetText problems.
[lyx.git] / src / insets / inset.C
index 151107a2c48b509137a37f1110264bf1091e0ce1..90c7d74e2dbbe96c2904041858b0fa47ed6e89b3 100644 (file)
@@ -315,7 +315,7 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
                w = static_cast<UpdatableInset*>
                        (owner())->getMaxWidth(bv, this);
        } else {
-               w = bv->workWidth();
+               w = bv->text->workWidth(bv, const_cast<UpdatableInset *>(this));
        }
        if (w < 0) {
                return -1;
@@ -326,12 +326,16 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
        if (topx_set && owner()) {
                w -= top_x;
                w += owner()->x();
-       } else if (!owner()) {
+       }
+#if 0 // already handled above now!!!
+       else if (!owner()) {
                // give some left margin this should be made better!
                // Idea: LyXText::giveLeftMargin(Inset * inset) will search the
                //       inset in the text and return the LeftMargin of that row!
+               lyxerr << "w -= 20\n";
                w -= 20;
        }
+#endif
        if (w < 10) {
                w = 10;
        }
@@ -345,7 +349,7 @@ LyXCursor const & Inset::cursor(BufferView * bv) const
 }
 
 
-string const UpdatableInset::selectNextWord(BufferView *bv,
+string const UpdatableInset::selectNextWordToSpellcheck(BufferView *bv,
                                            float & value) const
 {
        // we have to unlock ourself in this function by default!