mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52: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/FileInfo.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "support/lyxfunctional.h" // equal_1st_in_pair
|
|
||||||
#include "support/types.h"
|
#include "support/types.h"
|
||||||
#include "support/lyxalgo.h" // lyx_count
|
#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
|
UpdatableInset * BufferView::theLockingInset() const
|
||||||
{
|
{
|
||||||
// If NULL is not allowed we should put an Assert here. (Lgb)
|
// If NULL is not allowed we should put an Assert here. (Lgb)
|
||||||
|
@ -197,8 +197,6 @@ public:
|
|||||||
|
|
||||||
/// FIXME
|
/// FIXME
|
||||||
bool ChangeRefsIfUnique(string const & from, string const & to);
|
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
|
/// get the contents of the window system clipboard
|
||||||
string const getClipboard() const;
|
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>
|
2003-07-28 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
* buffer.C (readBody, do_writeFile):
|
* 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>
|
2003-07-28 José Matos <jamatos@lyx.org>
|
||||||
|
|
||||||
* insetext.C (read): \end_document replaces \the_end.
|
* insetext.C (read): \end_document replaces \the_end.
|
||||||
|
@ -66,12 +66,6 @@ dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
|
|||||||
InsetCommandMailer::string2params(cmd.argument, p);
|
InsetCommandMailer::string2params(cmd.argument, p);
|
||||||
if (p.getCmdName().empty())
|
if (p.getCmdName().empty())
|
||||||
return DISPATCHED;
|
return DISPATCHED;
|
||||||
|
|
||||||
if (view() && p.getContents() != params().getContents()) {
|
|
||||||
view()->ChangeCitationsIfUnique(params().getContents(),
|
|
||||||
p.getContents());
|
|
||||||
}
|
|
||||||
|
|
||||||
setParams(p);
|
setParams(p);
|
||||||
cmd.view()->updateInset(this);
|
cmd.view()->updateInset(this);
|
||||||
cmd.view()->fitCursor();
|
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)
|
dispatch_result InsetBibtex::localDispatch(FuncRequest const & cmd)
|
||||||
{
|
{
|
||||||
switch (cmd.action) {
|
switch (cmd.action) {
|
||||||
@ -61,14 +67,7 @@ dispatch_result InsetBibtex::localDispatch(FuncRequest const & cmd)
|
|||||||
InsetCommandMailer::string2params(cmd.argument, p);
|
InsetCommandMailer::string2params(cmd.argument, p);
|
||||||
if (p.getCmdName().empty())
|
if (p.getCmdName().empty())
|
||||||
return DISPATCHED;
|
return DISPATCHED;
|
||||||
|
|
||||||
if (view() && p.getContents() != params().getContents()) {
|
|
||||||
view()->ChangeCitationsIfUnique(params().getContents(),
|
|
||||||
p.getContents());
|
|
||||||
}
|
|
||||||
|
|
||||||
setParams(p);
|
setParams(p);
|
||||||
cmd.view()->updateInset(this);
|
|
||||||
return DISPATCHED;
|
return DISPATCHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +159,6 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
|
|||||||
|
|
||||||
vector<string> const InsetBibtex::getFiles(Buffer const & buffer) const
|
vector<string> const InsetBibtex::getFiles(Buffer const & buffer) const
|
||||||
{
|
{
|
||||||
// Doesn't appear to be used (Angus, 31 July 2001)
|
|
||||||
Path p(buffer.filePath());
|
Path p(buffer.filePath());
|
||||||
|
|
||||||
vector<string> vec;
|
vector<string> vec;
|
||||||
|
@ -25,9 +25,7 @@ public:
|
|||||||
///
|
///
|
||||||
~InsetBibtex();
|
~InsetBibtex();
|
||||||
///
|
///
|
||||||
std::auto_ptr<InsetBase> clone() const {
|
std::auto_ptr<InsetBase> clone() const;
|
||||||
return std::auto_ptr<InsetBase>(new InsetBibtex(params()));
|
|
||||||
}
|
|
||||||
/// small wrapper for the time being
|
/// small wrapper for the time being
|
||||||
virtual dispatch_result localDispatch(FuncRequest const & cmd);
|
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));
|
return localDispatch(FuncRequest(cmd.view(), LFUN_INSET_EDIT));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return UNDISPATCHED;
|
return InsetOld::localDispatch(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user