]> git.lyx.org Git - lyx.git/commitdiff
change call to shared_ptr::reset, move some using declarations around
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 21 May 2002 23:50:36 +0000 (23:50 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 21 May 2002 23:50:36 +0000 (23:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4181 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/insets/ChangeLog
src/insets/insetgraphics.C
src/kbmap.C
src/support/ChangeLog
src/support/lyxsum.C

index 9952f6229964b9a151ef64a479d98b2cd570e5b5..6d533d0bb4e51becee7f26dfe554e1588c82b259 100644 (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
index a8227967605fa02d64edf4ea433770cab11b2a5e..1f475f2b885e26c08df7f99fb750dec069e344fc 100644 (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.
index 670e0450ee6f26cdf799b73b69518c4d6cb0eb10..b913292146450f1aff4e1a95995bdb4d926f0016 100644 (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
index 7004b3ec73298a54fc2ed3af5ab75f3f5ecfe960..31d4c7b5a76a249ada696867f8bb27baff3a2464 100644 (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);
index b8b6d6cddf6c95b582a48dc6fb285b8ab37bf787..79814a38e82c3a130095d1606f42d0c7328bf11b 100644 (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
index 9884c93d014b02c215f46eeefd6f14045493eb6e..a0fe80ecb10c263ed1ce4d26fdf7a7bea0274692 100644 (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]