]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiCitation.cpp
On Mac, moving down a paragraph should place the cursor at the end of the current...
[lyx.git] / src / frontends / qt4 / GuiCitation.cpp
1
2 /**
3  * \file GuiCitation.cpp
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Kalle Dalheimer
9  * \author Abdelrazak Younes
10  * \author Richard Heck
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #include <config.h>
16
17 #include "GuiCitation.h"
18
19 #include "GuiSelectionManager.h"
20 #include "qt_helpers.h"
21
22 #include "Buffer.h"
23 #include "BufferView.h"
24 #include "BiblioInfo.h"
25 #include "BufferParams.h"
26 #include "FuncRequest.h"
27
28 #include "insets/InsetCommand.h"
29
30 #include "support/debug.h"
31 #include "support/docstring.h"
32 #include "support/gettext.h"
33 #include "support/lstrings.h"
34
35 #include <QCloseEvent>
36 #include <QSettings>
37 #include <QShowEvent>
38 #include <QVariant>
39
40 #include <vector>
41 #include <string>
42
43 #undef KeyPress
44
45 #include "support/regex.h"
46
47 #include <algorithm>
48 #include <string>
49 #include <vector>
50
51 using namespace std;
52 using namespace lyx::support;
53
54 namespace lyx {
55 namespace frontend {
56
57 static vector<string> citeCmds_;
58 static vector<CitationStyle> citeStyles_;
59
60
61 template<typename String>
62 static QStringList to_qstring_list(vector<String> const & v)
63 {
64         QStringList qlist;
65
66         for (size_t i = 0; i != v.size(); ++i) {
67                 if (v[i].empty())
68                         continue;
69                 qlist.append(lyx::toqstr(v[i]));
70         }
71         return qlist;
72 }
73
74
75 static vector<lyx::docstring> to_docstring_vector(QStringList const & qlist)
76 {
77         vector<lyx::docstring> v;
78         for (int i = 0; i != qlist.size(); ++i) {
79                 if (qlist[i].isEmpty())
80                         continue;
81                 v.push_back(lyx::qstring_to_ucs4(qlist[i]));
82         }
83         return v;
84 }
85
86
87 GuiCitation::GuiCitation(GuiView & lv)
88         : DialogView(lv, "citation", qt_("Citation")),
89           params_(insetCode("citation"))
90 {
91         setupUi(this);
92
93         connect(citationStyleCO, SIGNAL(activated(int)),
94                 this, SLOT(on_citationStyleCO_currentIndexChanged(int)));
95         connect(fulllistCB, SIGNAL(clicked()),
96                 this, SLOT(changed()));
97         connect(forceuppercaseCB, SIGNAL(clicked()),
98                 this, SLOT(changed()));
99         connect(textBeforeED, SIGNAL(textChanged(QString)),
100                 this, SLOT(updateStyles()));
101         connect(textAfterED, SIGNAL(textChanged(QString)),
102                 this, SLOT(updateStyles()));
103         connect(findLE, SIGNAL(returnPressed()),
104                 this, SLOT(on_searchPB_clicked()));
105         connect(textBeforeED, SIGNAL(returnPressed()),
106                 this, SLOT(on_okPB_clicked()));
107         connect(textAfterED, SIGNAL(returnPressed()),
108                 this, SLOT(on_okPB_clicked()));
109
110         selectionManager = new GuiSelectionManager(availableLV, selectedLV,
111                         addPB, deletePB, upPB, downPB, &available_model_, &selected_model_);
112         connect(selectionManager, SIGNAL(selectionChanged()),
113                 this, SLOT(setCitedKeys()));
114         connect(selectionManager, SIGNAL(updateHook()),
115                 this, SLOT(updateControls()));
116         connect(selectionManager, SIGNAL(okHook()),
117                 this, SLOT(on_okPB_clicked()));
118
119         setFocusProxy(availableLV);
120 }
121
122
123 GuiCitation::~GuiCitation()
124 {
125         delete selectionManager;
126 }
127
128
129 void GuiCitation::closeEvent(QCloseEvent * e)
130 {
131         clearSelection();
132         DialogView::closeEvent(e);
133 }
134
135
136 void GuiCitation::applyView()
137 {
138         int const choice = max(0, citationStyleCO->currentIndex());
139         style_ = choice;
140         bool const full  = fulllistCB->isChecked();
141         bool const force = forceuppercaseCB->isChecked();
142
143         QString const before = textBeforeED->text();
144         QString const after = textAfterED->text();
145
146         apply(choice, full, force, before, after);
147 }
148
149
150 void GuiCitation::showEvent(QShowEvent * e)
151 {
152         findLE->clear();
153         availableLV->setFocus();
154         DialogView::showEvent(e);
155 }
156
157
158 void GuiCitation::on_okPB_clicked()
159 {
160         applyView();
161         clearSelection();
162         hide();
163 }
164
165
166 void GuiCitation::on_cancelPB_clicked()
167 {
168         clearSelection();
169         hide();
170 }
171
172
173 void GuiCitation::on_applyPB_clicked()
174 {
175         applyView();
176 }
177
178
179 void GuiCitation::on_restorePB_clicked()
180 {
181         init();
182 }
183
184
185 void GuiCitation::updateControls()
186 {
187         BiblioInfo const & bi = bibInfo();
188         updateControls(bi);
189 }
190
191
192 // The main point of separating this out is that the fill*() methods
193 // called in update() do not need to be called for INTERNAL updates,
194 // such as when addPB is pressed, as the list of fields, entries, etc,
195 // will not have changed.
196 void GuiCitation::updateControls(BiblioInfo const & bi)
197 {
198         QModelIndex idx = selectionManager->getSelectedIndex();
199         updateInfo(bi, idx);
200         selectionManager->update();
201 }
202
203
204 void GuiCitation::updateFormatting(CitationStyle currentStyle)
205 {
206         bool const force = currentStyle.forceUpperCase;
207         bool const full = currentStyle.fullAuthorList &&
208                 documentBuffer().params().fullAuthorList();
209         bool const textbefore = currentStyle.textBefore;
210         bool const textafter = currentStyle.textAfter;
211
212         bool const haveSelection =
213                 selectedLV->model()->rowCount() > 0;
214
215         forceuppercaseCB->setEnabled(force && haveSelection);
216         fulllistCB->setEnabled(full && haveSelection);
217         textBeforeED->setEnabled(textbefore && haveSelection);
218         textBeforeLA->setEnabled(textbefore && haveSelection);
219         textAfterED->setEnabled(textafter && haveSelection);
220         textAfterLA->setEnabled(textafter && haveSelection);
221         citationStyleCO->setEnabled(haveSelection);
222         citationStyleLA->setEnabled(haveSelection);
223 }
224
225
226 // Update the styles for the style combo, citationStyleCO, and mark the
227 // settings as changed. Called upon changing the cited keys (including
228 // merely reordering the keys) or editing the text before/after fields.
229 void GuiCitation::updateStyles()
230 {
231         BiblioInfo const & bi = bibInfo();
232         updateStyles(bi);
233         changed();
234 }
235
236
237 // Update the styles for the style combo, citationStyleCO.
238 void GuiCitation::updateStyles(BiblioInfo const & bi)
239 {
240         QStringList selected_keys = selected_model_.stringList();
241         int curr = selectedLV->model()->rowCount() - 1;
242
243         if (curr < 0 || selected_keys.empty()) {
244                 citationStyleCO->clear();
245                 citationStyleCO->setEnabled(false);
246                 citationStyleLA->setEnabled(false);
247                 return;
248         }
249
250         if (!selectedLV->selectionModel()->selectedIndexes().empty())
251                 curr = selectedLV->selectionModel()->selectedIndexes()[0].row();
252
253         QStringList sty = citationStyles(bi);
254
255         if (sty.isEmpty()) {
256                 // some error
257                 citationStyleCO->setEnabled(false);
258                 citationStyleLA->setEnabled(false);
259                 citationStyleCO->clear();
260                 return;
261         }
262
263         citationStyleCO->blockSignals(true);
264
265         // save old index
266         int const oldIndex = citationStyleCO->currentIndex();
267         citationStyleCO->clear();
268         citationStyleCO->insertItems(0, sty);
269         citationStyleCO->setEnabled(true);
270         citationStyleLA->setEnabled(true);
271         // restore old index
272         if (oldIndex != -1 && oldIndex < citationStyleCO->count())
273                 citationStyleCO->setCurrentIndex(oldIndex);
274
275         citationStyleCO->blockSignals(false);
276 }
277
278
279 void GuiCitation::fillFields(BiblioInfo const & bi)
280 {
281         fieldsCO->blockSignals(true);
282         int const oldIndex = fieldsCO->currentIndex();
283         fieldsCO->clear();
284         QStringList const fields = to_qstring_list(bi.getFields());
285         fieldsCO->insertItem(0, qt_("All fields"));
286         fieldsCO->insertItem(1, qt_("Keys"));
287         fieldsCO->insertItems(2, fields);
288         if (oldIndex != -1 && oldIndex < fieldsCO->count())
289                 fieldsCO->setCurrentIndex(oldIndex);
290         fieldsCO->blockSignals(false);
291 }
292
293
294 void GuiCitation::fillEntries(BiblioInfo const & bi)
295 {
296         entriesCO->blockSignals(true);
297         int const oldIndex = entriesCO->currentIndex();
298         entriesCO->clear();
299         QStringList const entries = to_qstring_list(bi.getEntries());
300         entriesCO->insertItem(0, qt_("All entry types"));
301         entriesCO->insertItems(1, entries);
302         if (oldIndex != -1 && oldIndex < entriesCO->count())
303                 entriesCO->setCurrentIndex(oldIndex);
304         entriesCO->blockSignals(false);
305 }
306
307
308 bool GuiCitation::isSelected(QModelIndex const & idx)
309 {
310         QString const str = idx.data().toString();
311         return selected_model_.stringList().contains(str);
312 }
313
314
315 void GuiCitation::setButtons()
316 {
317         int const srows = selectedLV->model()->rowCount();
318         applyPB->setEnabled(srows > 0);
319         okPB->setEnabled(srows > 0);
320 }
321
322
323 void GuiCitation::updateInfo(BiblioInfo const & bi, QModelIndex const & idx)
324 {
325         if (!idx.isValid() || bi.empty()) {
326                 infoML->document()->clear();
327                 return;
328         }
329
330         QString const keytxt = toqstr(
331                 bi.getInfo(qstring_to_ucs4(idx.data().toString()), documentBuffer(), true));
332         infoML->document()->setHtml(keytxt);
333 }
334
335
336 void GuiCitation::findText(QString const & text, bool reset)
337 {
338         //"All Fields" and "Keys" are the first two
339         int index = fieldsCO->currentIndex() - 2;
340         BiblioInfo const & bi = bibInfo();
341         vector<docstring> const & fields = bi.getFields();
342         docstring field;
343
344         if (index <= -1 || index >= int(fields.size()))
345                 //either "All Fields" or "Keys" or an invalid value
346                 field = from_ascii("");
347         else
348                 field = fields[index];
349
350         //Was it "Keys"?
351         bool const onlyKeys = index == -1;
352
353         //"All Entry Types" is first.
354         index = entriesCO->currentIndex() - 1;
355         vector<docstring> const & entries = bi.getEntries();
356         docstring entry_type;
357         if (index < 0 || index >= int(entries.size()))
358                 entry_type = from_ascii("");
359         else
360                 entry_type = entries[index];
361
362         bool const case_sentitive = caseCB->checkState();
363         bool const reg_exp = regexCB->checkState();
364         findKey(bi, text, onlyKeys, field, entry_type,
365                        case_sentitive, reg_exp, reset);
366         //FIXME
367         //It'd be nice to save and restore the current selection in
368         //availableLV. Currently, we get an automatic reset, since the
369         //model is reset.
370
371         updateControls(bi);
372 }
373
374
375 void GuiCitation::on_fieldsCO_currentIndexChanged(int /*index*/)
376 {
377         findText(findLE->text(), true);
378 }
379
380
381 void GuiCitation::on_entriesCO_currentIndexChanged(int /*index*/)
382 {
383         findText(findLE->text(), true);
384 }
385
386
387 void GuiCitation::on_citationStyleCO_currentIndexChanged(int index)
388 {
389         if (index >= 0 && index < citationStyleCO->count()) {
390                 vector<CitationStyle> const & styles = citeStyles_;
391                 updateFormatting(styles[index]);
392                 changed();
393         }
394 }
395
396
397 void GuiCitation::on_findLE_textChanged(const QString & text)
398 {
399         bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked);
400         searchPB->setDisabled(text.isEmpty() || searchAsWeGo);
401         if (!text.isEmpty()) {
402                 if (searchAsWeGo)
403                         findText(findLE->text());
404                 return;
405         }
406         findText(findLE->text());
407         findLE->setFocus();
408 }
409
410 void GuiCitation::on_searchPB_clicked()
411 {
412         findText(findLE->text(), true);
413 }
414
415
416 void GuiCitation::on_caseCB_stateChanged(int)
417 {
418         findText(findLE->text());
419 }
420
421
422 void GuiCitation::on_regexCB_stateChanged(int)
423 {
424         findText(findLE->text());
425 }
426
427
428 void GuiCitation::on_asTypeCB_stateChanged(int)
429 {
430         bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked);
431         searchPB->setDisabled(findLE->text().isEmpty() || searchAsWeGo);
432         if (searchAsWeGo)
433                 findText(findLE->text(), true);
434 }
435
436
437 void GuiCitation::changed()
438 {
439         setButtons();
440 }
441
442
443 void GuiCitation::apply(int const choice, bool full, bool force,
444         QString before, QString after)
445 {
446         if (cited_keys_.isEmpty())
447                 return;
448
449         vector<CitationStyle> const & styles = citeStyles_;
450
451         CitationStyle cs = styles[choice];
452
453         if (!cs.textBefore)
454                 before.clear();
455         if (!cs.textAfter)
456                 after.clear();
457
458         cs.forceUpperCase &= force;
459         cs.fullAuthorList &= full;
460         string const command = citationStyleToString(cs);
461
462         params_.setCmdName(command);
463         params_["key"] = qstring_to_ucs4(cited_keys_.join(","));
464         params_["before"] = qstring_to_ucs4(before);
465         params_["after"] = qstring_to_ucs4(after);
466         dispatchParams();
467 }
468
469
470 void GuiCitation::clearSelection()
471 {
472         cited_keys_.clear();
473         selected_model_.setStringList(cited_keys_);
474 }
475
476
477 void GuiCitation::init()
478 {
479         // Make the list of all available bibliography keys
480         BiblioInfo const & bi = bibInfo();
481         all_keys_ = to_qstring_list(bi.getKeys());
482         available_model_.setStringList(all_keys_);
483
484         // Ditto for the keys cited in this inset
485         QString str = toqstr(params_["key"]);
486         if (str.isEmpty())
487                 cited_keys_.clear();
488         else
489                 cited_keys_ = str.split(",");
490         selected_model_.setStringList(cited_keys_);
491
492         // Initialize the drop downs
493         fillEntries(bi);
494         fillFields(bi);
495
496         // Initialize the citation formatting
497         string const & cmd = params_.getCmdName();
498         CitationStyle const cs = citationStyleFromString(cmd);
499         forceuppercaseCB->setChecked(cs.forceUpperCase);
500         fulllistCB->setChecked(cs.fullAuthorList &&
501                 documentBuffer().params().fullAuthorList());
502         textBeforeED->setText(toqstr(params_["before"]));
503         textAfterED->setText(toqstr(params_["after"]));
504
505         // Update the interface
506         updateControls(bi);
507         updateStyles(bi);
508         if (selected_model_.rowCount()) {
509                 selectedLV->blockSignals(true);
510                 selectedLV->setFocus();
511                 QModelIndex idx = selected_model_.index(0, 0);
512                 selectedLV->selectionModel()->select(idx,
513                                 QItemSelectionModel::ClearAndSelect);
514                 selectedLV->blockSignals(false);
515
516                 // Find the citation style
517                 vector<string> const & cmds = citeCmds_;
518                 vector<string>::const_iterator cit =
519                         std::find(cmds.begin(), cmds.end(), cs.cmd);
520                 int i = 0;
521                 if (cit != cmds.end())
522                         i = int(cit - cmds.begin());
523
524                 // Set the style combo appropriately
525                 citationStyleCO->blockSignals(true);
526                 citationStyleCO->setCurrentIndex(i);
527                 citationStyleCO->blockSignals(false);
528                 updateFormatting(citeStyles_[i]);
529         } else
530                 availableLV->setFocus();
531
532         applyPB->setEnabled(false);
533         okPB->setEnabled(false);
534 }
535
536
537 void GuiCitation::findKey(BiblioInfo const & bi,
538         QString const & str, bool only_keys,
539         docstring field, docstring entry_type,
540         bool case_sensitive, bool reg_exp, bool reset)
541 {
542         // Used for optimisation: store last searched string.
543         static QString last_searched_string;
544         // Used to disable the above optimisation.
545         static bool last_case_sensitive;
546         static bool last_reg_exp;
547         // Reset last_searched_string in case of changed option.
548         if (last_case_sensitive != case_sensitive
549                 || last_reg_exp != reg_exp) {
550                         LYXERR(Debug::GUI, "GuiCitation::findKey: optimisation disabled!");
551                 last_searched_string.clear();
552         }
553         // save option for next search.
554         last_case_sensitive = case_sensitive;
555         last_reg_exp = reg_exp;
556
557         Qt::CaseSensitivity qtcase = case_sensitive ?
558                         Qt::CaseSensitive: Qt::CaseInsensitive;
559         QStringList keys;
560         // If new string (str) contains the last searched one...
561         if (!reset &&
562                 !last_searched_string.isEmpty() &&
563                 str.size() > 1 &&
564                 str.contains(last_searched_string, qtcase))
565                 // ... then only search within already found list.
566                 keys = available_model_.stringList();
567         else
568                 // ... else search all keys.
569                 keys = all_keys_;
570         // save searched string for next search.
571         last_searched_string = str;
572
573         QStringList result;
574
575         // First, filter by entry_type, which will be faster than
576         // what follows, so we may get to do that on less.
577         vector<docstring> keyVector = to_docstring_vector(keys);
578         filterByEntryType(bi, keyVector, entry_type);
579
580         if (str.isEmpty())
581                 result = to_qstring_list(keyVector);
582         else
583                 result = to_qstring_list(searchKeys(bi, keyVector, only_keys,
584                         qstring_to_ucs4(str), field, case_sensitive, reg_exp));
585
586         available_model_.setStringList(result);
587 }
588
589
590 QStringList GuiCitation::citationStyles(BiblioInfo const & bi)
591 {
592         docstring const before = qstring_to_ucs4(textBeforeED->text());
593         docstring const after = qstring_to_ucs4(textAfterED->text());
594         vector<docstring> const keys = to_docstring_vector(cited_keys_);
595         vector<CitationStyle> styles = citeStyles_;
596         // FIXME: pass a dictionary instead of individual before, after, dialog, etc.
597         vector<docstring> ret = bi.getCiteStrings(keys, styles, documentBuffer(),
598                 false, before, after, from_utf8("dialog"));
599         return to_qstring_list(ret);
600 }
601
602
603 void GuiCitation::setCitedKeys()
604 {
605         cited_keys_ = selected_model_.stringList();
606         updateStyles();
607 }
608
609
610 bool GuiCitation::initialiseParams(string const & data)
611 {
612         InsetCommand::string2params(data, params_);
613         citeCmds_ = documentBuffer().params().citeCommands();
614         citeStyles_ = documentBuffer().params().citeStyles();
615         init();
616         return true;
617 }
618
619
620 void GuiCitation::clearParams()
621 {
622         params_.clear();
623 }
624
625
626 void GuiCitation::filterByEntryType(BiblioInfo const & bi,
627         vector<docstring> & keyVector, docstring entry_type)
628 {
629         if (entry_type.empty())
630                 return;
631
632         vector<docstring>::iterator it = keyVector.begin();
633         vector<docstring>::iterator end = keyVector.end();
634
635         vector<docstring> result;
636         for (; it != end; ++it) {
637                 docstring const key = *it;
638                 BiblioInfo::const_iterator cit = bi.find(key);
639                 if (cit == bi.end())
640                         continue;
641                 if (cit->second.entryType() == entry_type)
642                         result.push_back(key);
643         }
644         keyVector = result;
645 }
646
647
648 // Escape special chars.
649 // All characters are literals except: '.|*?+(){}[]^$\'
650 // These characters are literals when preceded by a "\", which is done here
651 // @todo: This function should be moved to support, and then the test in tests
652 //        should be moved there as well.
653 static docstring escape_special_chars(docstring const & expr)
654 {
655         // Search for all chars '.|*?+(){}[^$]\'
656         // Note that '[' and '\' must be escaped.
657         // This is a limitation of lyx::regex, but all other chars in BREs
658         // are assumed literal.
659         static const lyx::regex reg("[].|*?+(){}^$\\[\\\\]");
660
661         // $& is a perl-like expression that expands to all
662         // of the current match
663         // The '$' must be prefixed with the escape character '\' for
664         // boost to treat it as a literal.
665         // Thus, to prefix a matched expression with '\', we use:
666         // FIXME: UNICODE
667         return from_utf8(lyx::regex_replace(to_utf8(expr), reg, string("\\\\$&")));
668 }
669
670
671 vector<docstring> GuiCitation::searchKeys(BiblioInfo const & bi,
672         vector<docstring> const & keys_to_search, bool only_keys,
673         docstring const & search_expression, docstring field,
674         bool case_sensitive, bool regex)
675 {
676         vector<docstring> foundKeys;
677
678         docstring expr = trim(search_expression);
679         if (expr.empty())
680                 return foundKeys;
681
682         if (!regex)
683                 // We must escape special chars in the search_expr so that
684                 // it is treated as a simple string by lyx::regex.
685                 expr = escape_special_chars(expr);
686
687         lyx::regex reg_exp;
688         try {
689                 reg_exp.assign(to_utf8(expr), case_sensitive ?
690                         lyx::regex_constants::ECMAScript : lyx::regex_constants::icase);
691         } catch (lyx::regex_error const & e) {
692                 // lyx::regex throws an exception if the regular expression is not
693                 // valid.
694                 LYXERR(Debug::GUI, e.what());
695                 return vector<docstring>();
696         }
697
698         vector<docstring>::const_iterator it = keys_to_search.begin();
699         vector<docstring>::const_iterator end = keys_to_search.end();
700         for (; it != end; ++it ) {
701                 BiblioInfo::const_iterator info = bi.find(*it);
702                 if (info == bi.end())
703                         continue;
704
705                 BibTeXInfo const & kvm = info->second;
706                 string data;
707                 if (only_keys)
708                         data = to_utf8(*it);
709                 else if (field.empty())
710                         data = to_utf8(*it) + ' ' + to_utf8(kvm.allData());
711                 else
712                         data = to_utf8(kvm[field]);
713
714                 if (data.empty())
715                         continue;
716
717                 try {
718                         if (lyx::regex_search(data, reg_exp))
719                                 foundKeys.push_back(*it);
720                 }
721                 catch (lyx::regex_error const & e) {
722                         LYXERR(Debug::GUI, e.what());
723                         return vector<docstring>();
724                 }
725         }
726         return foundKeys;
727 }
728
729
730 void GuiCitation::dispatchParams()
731 {
732         std::string const lfun = InsetCommand::params2string(params_);
733         dispatch(FuncRequest(getLfun(), lfun));
734 }
735
736
737 BiblioInfo const & GuiCitation::bibInfo() const
738 {
739         Buffer const & buf = documentBuffer();
740         buf.reloadBibInfoCache();
741         return buf.masterBibInfo();
742 }
743
744
745 void GuiCitation::saveSession() const
746 {
747         Dialog::saveSession();
748         QSettings settings;
749         settings.setValue(
750                 sessionKey() + "/regex", regexCB->isChecked());
751         settings.setValue(
752                 sessionKey() + "/casesensitive", caseCB->isChecked());
753         settings.setValue(
754                 sessionKey() + "/autofind", asTypeCB->isChecked());
755 }
756
757
758 void GuiCitation::restoreSession()
759 {
760         Dialog::restoreSession();
761         QSettings settings;
762         regexCB->setChecked(
763                 settings.value(sessionKey() + "/regex").toBool());
764         caseCB->setChecked(
765                 settings.value(sessionKey() + "/casesensitive").toBool());
766         asTypeCB->setChecked(
767                 settings.value(sessionKey() + "/autofind").toBool());
768 }
769
770
771 Dialog * createGuiCitation(GuiView & lv) { return new GuiCitation(lv); }
772
773
774 } // namespace frontend
775 } // namespace lyx
776
777 #include "moc_GuiCitation.cpp"
778