#include "qt_helpers.h"
#include "Language.h"
+#include "Buffer.h"
#include "BufferParams.h"
#include "BufferList.h"
+#include "BufferView.h"
+#include "Text.h"
#include "TextClass.h"
#include "Cursor.h"
#include "FuncRequest.h"
+#include "LyX.h"
#include "lyxfind.h"
#include "frontends/alert.h"
}
+void FindAndReplaceWidget::dockLocationChanged(Qt::DockWidgetArea area)
+{
+ if (area == Qt::RightDockWidgetArea || area == Qt::LeftDockWidgetArea) {
+ dynamicLayoutBasic_->setDirection(QBoxLayout::TopToBottom);
+ dynamicLayoutAdvanced_->setDirection(QBoxLayout::TopToBottom);
+ } else {
+ dynamicLayoutBasic_->setDirection(QBoxLayout::LeftToRight);
+ dynamicLayoutAdvanced_->setDirection(QBoxLayout::LeftToRight);
+ }
+}
+
+
bool FindAndReplaceWidget::eventFilter(QObject * obj, QEvent * event)
{
if (event->type() != QEvent::KeyPress
}
-/** Switch p_buf to point to next document buffer.
+/** Switch buf to point to next document buffer.
**
** Return true if restarted from master-document buffer.
**/
LYXERR(Debug::FIND, "children.size()=" << children.size());
ListOfBuffers::const_iterator it =
find(children.begin(), children.end(), buf);
- LASSERT(it != children.end(), /**/);
+ LASSERT(it != children.end(), return false);
++it;
if (it == children.end()) {
buf = *children.begin();
LYXERR(Debug::FIND, "children.size()=" << children.size());
ListOfBuffers::const_iterator it =
find(children.begin(), children.end(), buf);
- LASSERT(it != children.end(), /**/)
+ LASSERT(it != children.end(), return false)
if (it == children.begin()) {
it = children.end();
--it;
else if (AllManualsRB->isChecked())
scope = FindAndReplaceOptions::S_ALL_MANUALS;
else
- LASSERT(false, /**/);
+ LATTEST(false);
LYXERR(Debug::FIND, "FindAndReplaceOptions: "
<< "find_buf_name=" << find_buf_name
<< ", casesensitiv=" << casesensitive
Buffer & dest_buf = dest_bv.buffer();
dest_buf.params().setLanguage(lang);
dest_buf.params().setBaseClass(doc_class);
- dest_buf.params().makeDocumentClass();
+ dest_bv.makeDocumentClass();
dest_bv.cursor().current_font.setLanguage(doc_bp.language);
}
widget_ = new FindAndReplaceWidget(parent);
setWidget(widget_);
setFocusProxy(widget_);
+
+ connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
+ widget_, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
}