]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSpellchecker.cpp
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / GuiSpellchecker.cpp
index e65e22346cca8179be72634fb51401e113ede81a..aa62a9a448ccd7ead8149f010b58cf018c50b69e 100644 (file)
@@ -457,8 +457,13 @@ void SpellcheckerWidget::on_replacePB_clicked()
                return;
        docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
        docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
-       docstring const datastring = replace2string(replacement, textfield,
-               true, true, false, false);
+       docstring const datastring = 
+               replace2string(replacement, textfield,
+                       true,   // case sensitive
+                       true,   // match word
+                       false,  // all words
+                       true,   // forward
+                       false); // find next
 
        LYXERR(Debug::GUI, "Replace (" << replacement << ")");
        dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
@@ -474,8 +479,13 @@ void SpellcheckerWidget::on_replaceAllPB_clicked()
                return;
        docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
        docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
-       docstring const datastring = replace2string(replacement, textfield,
-               true, true, true, true);
+       docstring const datastring =
+               replace2string(replacement, textfield,
+                       true,   // case sensitive
+                       true,   // match word
+                       true,   // all words
+                       true,   // forward
+                       false); // find next
 
        LYXERR(Debug::GUI, "Replace all (" << replacement << ")");
        dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
@@ -604,7 +614,7 @@ void GuiSpellchecker::updateView()
 Dialog * createGuiSpellchecker(GuiView & lv) 
 { 
        GuiSpellchecker * gui = new GuiSpellchecker(lv, Qt::RightDockWidgetArea);
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
        gui->setFloating(true);
 #endif
        return gui;