change call to shared_ptr::reset, move some using declarations around

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4181 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-05-21 23:50:36 +00:00
parent 9ed0ccbc32
commit 5296e9e995
6 changed files with 37 additions and 24 deletions

View File

@ -1,3 +1,7 @@
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* kbmap.C (defkey): change call to shared_ptr::reset
2002-05-21 Juergen Vigna <jug@sad.it>
* buffer.C (insertErtContents): fix to insert ert asis if it is

View File

@ -1,7 +1,12 @@
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* insetgraphics.C (InsetGraphics): change call of shared_ptr::reset
(draw): ditto
2002-05-15 John Levon <moz@compsoc.man.ac.uk>
* insettext.C: clear selection on paste (bug 393)
* insettext.C: clear selection on paste (bug 393)
2002-05-11 Dekel Tsur <dekelts@tau.ac.il>
* insettext.C (latex): Honor the moving_arg argument.

View File

@ -163,7 +163,7 @@ InsetGraphics::InsetGraphics(InsetGraphics const & ig,
InsetGraphics::~InsetGraphics()
{
cached_image_.reset(0);
cached_image_.reset();
grfx::GCache & gc = grfx::GCache::get();
gc.remove(*this);
@ -349,7 +349,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
// Reset the cache, ready for the next draw request
cached_status_ = grfx::ErrorUnknown;
cached_image_.reset(0);
cached_image_.reset();
cache_filled_ = false;
}
@ -631,19 +631,19 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
// Perform all these manipulations on a temporary file if possible.
// If we are not using a temp dir, then temp_file contains the
// original file.
// original file.
// to allow files with the same name in different dirs
// we manipulate the original file "any.dir/file.ext"
// to "any_dir_file.ext"! changing the dots in the
// we manipulate the original file "any.dir/file.ext"
// to "any_dir_file.ext"! changing the dots in the
// dirname is important for the use of ChangeExtension
string temp_file(orig_file);
if (lyxrc.use_tempdir) {
string const ext_tmp = GetExtension(orig_file);
// without ext and /
temp_file = subst(
temp_file = subst(
ChangeExtension(temp_file, string()), "/", "_");
// without . and again with ext
temp_file = ChangeExtension(
temp_file = ChangeExtension(
subst(temp_file, ".", "_"), ext_tmp);
// now we have any_dir_file.ext
temp_file = MakeAbsPath(temp_file, buf->tmppath);
@ -656,7 +656,7 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
if (lyxrc.use_tempdir && !IsFileReadable(temp_file)) {
bool const success = lyx::copy(orig_file_with_path, temp_file);
lyxerr[Debug::GRAPHICS]
<< "InsetGraphics::prepareFile. Copying from "
<< "InsetGraphics::prepareFile. Copying from "
<< orig_file << " to " << temp_file
<< (success ? " succeeded\n" : " failed\n");
if (!success) {
@ -668,7 +668,7 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
// Uncompress the file if necessary. If it has been uncompressed in
// a previous call to prepareFile, do nothing.
if (zipped) {
if (zipped) {
// What we want to end up with:
string const temp_file_unzipped =
ChangeExtension(temp_file, string());
@ -731,12 +731,12 @@ int InsetGraphics::latex(Buffer const *buf, ostream & os,
// A missing (e)ps-extension is no problem for LaTeX, so
// we have to test three different cases
string const file_(MakeAbsPath(params().filename, buf->filePath()));
bool const file_exists =
!file_.empty() &&
bool const file_exists =
!file_.empty() &&
(IsFileReadable(file_) || // original
IsFileReadable(file_ + ".eps") || // original.eps
IsFileReadable(file_ + ".eps") || // original.eps
IsFileReadable(file_ + ".ps")); // original.ps
string const message = file_exists ?
string const message = file_exists ?
string() : string("bb = 0 0 200 100, draft, type=eps]");
// if !message.empty() than there was no existing file
// "filename(.(e)ps)" found. In this case LaTeX

View File

@ -162,8 +162,8 @@ void kb_keymap::defkey(kb_sequence * seq, int action, unsigned int r)
<< seq->print()
<< "' is overriding old binding..."
<< endl;
if (it->table.get()) {
it->table.reset(0);
if (it->table.get()) {
it->table.reset();
}
it->action = action;
return;
@ -184,7 +184,7 @@ void kb_keymap::defkey(kb_sequence * seq, int action, unsigned int r)
newone->mod = modmsk;
if (r + 1 == seq->length()) {
newone->action = action;
newone->table.reset(0);
newone->table.reset();
return;
} else {
newone->table.reset(new kb_keymap);

View File

@ -1,3 +1,7 @@
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxsum.C: move some using declarations around.
2002-05-03 Herbert Voss <voss@perce.de>
* filetools.C (getExtFromContents): only print the first 60 chars of

View File

@ -32,12 +32,6 @@ using std::endl;
#include <unistd.h>
#include <sys/mman.h>
using std::ifstream;
using std::for_each;
using std::istreambuf_iterator;
using std::istream_iterator;
using std::ios;
unsigned long lyx::sum(string const & file)
{
@ -76,6 +70,8 @@ unsigned long lyx::sum(string const & file)
#include <fstream>
#include <iterator>
using std::for_each;
namespace {
template<typename InputIterator>
@ -107,6 +103,10 @@ unsigned long lyx::sum(string const & file)
return do_crc(beg,end);
}
#else
using std::istream_iterator;
using std::ios;
unsigned long lyx::sum(string const & file)
{
lyxerr[Debug::FILES]