mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Kill ChangeCitationsIfUnique; various small bits 'n' bobs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7435 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dd750828d5
commit
7fa3f39b0d
@ -40,7 +40,6 @@
|
||||
|
||||
#include "support/FileInfo.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/lyxfunctional.h" // equal_1st_in_pair
|
||||
#include "support/types.h"
|
||||
#include "support/lyxalgo.h" // lyx_count
|
||||
|
||||
@ -650,21 +649,6 @@ bool BufferView::ChangeRefsIfUnique(string const & from, string const & to)
|
||||
}
|
||||
|
||||
|
||||
bool BufferView::ChangeCitationsIfUnique(string const & from, string const & to)
|
||||
{
|
||||
typedef pair<string, string> StringPair;
|
||||
|
||||
vector<StringPair> keys;
|
||||
buffer()->fillWithBibKeys(keys);
|
||||
if (count_if(keys.begin(), keys.end(),
|
||||
lyx::equal_1st_in_pair<StringPair>(from))
|
||||
> 1)
|
||||
return false;
|
||||
|
||||
return ChangeInsets(InsetOld::CITE_CODE, from, to);
|
||||
}
|
||||
|
||||
|
||||
UpdatableInset * BufferView::theLockingInset() const
|
||||
{
|
||||
// If NULL is not allowed we should put an Assert here. (Lgb)
|
||||
|
@ -197,8 +197,6 @@ public:
|
||||
|
||||
/// FIXME
|
||||
bool ChangeRefsIfUnique(string const & from, string const & to);
|
||||
/// FIXME
|
||||
bool ChangeCitationsIfUnique(string const & from, string const & to);
|
||||
|
||||
/// get the contents of the window system clipboard
|
||||
string const getClipboard() const;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-07-29 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* BufferView.[Ch] (ChangeCitationsIfUnique): This function most
|
||||
certainly does not do what it purports to do. I am doing it, and
|
||||
us, a favour by killing it.
|
||||
|
||||
2003-07-28 José Matos <jamatos@lyx.org>
|
||||
|
||||
* buffer.C (readBody, do_writeFile):
|
||||
|
@ -1,3 +1,15 @@
|
||||
2003-07-29 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetcommand.C (localDispatch): default to
|
||||
InsetOld::localDispatch.
|
||||
|
||||
* insetbibitem.C (localDispatch):
|
||||
* insetbibtex.C (localDispatch): remove call to
|
||||
ChangeCitationsIfUnique.
|
||||
|
||||
* insetbibtex.[Ch] (clone): move out of line; use copy c-tor.
|
||||
|
||||
|
||||
2003-07-28 José Matos <jamatos@lyx.org>
|
||||
|
||||
* insetext.C (read): \end_document replaces \the_end.
|
||||
@ -13,10 +25,10 @@
|
||||
|
||||
* insettabular.C (write): remove extra space
|
||||
|
||||
2003-07-28 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
2003-07-28 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
* insetnote.C: Umpf. Hope I *now* get it right :-(
|
||||
|
||||
2003-07-28 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
2003-07-28 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
*insetnote.C: did the right fix to greyedout: \color
|
||||
instead of \textcolor.
|
||||
|
||||
|
@ -66,12 +66,6 @@ dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
|
||||
InsetCommandMailer::string2params(cmd.argument, p);
|
||||
if (p.getCmdName().empty())
|
||||
return DISPATCHED;
|
||||
|
||||
if (view() && p.getContents() != params().getContents()) {
|
||||
view()->ChangeCitationsIfUnique(params().getContents(),
|
||||
p.getContents());
|
||||
}
|
||||
|
||||
setParams(p);
|
||||
cmd.view()->updateInset(this);
|
||||
cmd.view()->fitCursor();
|
||||
|
@ -48,6 +48,12 @@ InsetBibtex::~InsetBibtex()
|
||||
}
|
||||
|
||||
|
||||
std::auto_ptr<InsetBase> InsetBibtex::clone() const
|
||||
{
|
||||
return std::auto_ptr<InsetBase>(new InsetBibtex(*this));
|
||||
}
|
||||
|
||||
|
||||
dispatch_result InsetBibtex::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
switch (cmd.action) {
|
||||
@ -61,14 +67,7 @@ dispatch_result InsetBibtex::localDispatch(FuncRequest const & cmd)
|
||||
InsetCommandMailer::string2params(cmd.argument, p);
|
||||
if (p.getCmdName().empty())
|
||||
return DISPATCHED;
|
||||
|
||||
if (view() && p.getContents() != params().getContents()) {
|
||||
view()->ChangeCitationsIfUnique(params().getContents(),
|
||||
p.getContents());
|
||||
}
|
||||
|
||||
setParams(p);
|
||||
cmd.view()->updateInset(this);
|
||||
return DISPATCHED;
|
||||
}
|
||||
|
||||
@ -160,7 +159,6 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
|
||||
|
||||
vector<string> const InsetBibtex::getFiles(Buffer const & buffer) const
|
||||
{
|
||||
// Doesn't appear to be used (Angus, 31 July 2001)
|
||||
Path p(buffer.filePath());
|
||||
|
||||
vector<string> vec;
|
||||
|
@ -25,9 +25,7 @@ public:
|
||||
///
|
||||
~InsetBibtex();
|
||||
///
|
||||
std::auto_ptr<InsetBase> clone() const {
|
||||
return std::auto_ptr<InsetBase>(new InsetBibtex(params()));
|
||||
}
|
||||
std::auto_ptr<InsetBase> clone() const;
|
||||
/// small wrapper for the time being
|
||||
virtual dispatch_result localDispatch(FuncRequest const & cmd);
|
||||
///
|
||||
|
@ -114,7 +114,7 @@ dispatch_result InsetCommand::localDispatch(FuncRequest const & cmd)
|
||||
return localDispatch(FuncRequest(cmd.view(), LFUN_INSET_EDIT));
|
||||
|
||||
default:
|
||||
return UNDISPATCHED;
|
||||
return InsetOld::localDispatch(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user