mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Be more specific that 'using lyx::support'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7653 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3355993a43
commit
3f50312db5
@ -1,3 +1,16 @@
|
||||
2003-09-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* GraphicsCache.C:
|
||||
* GraphicsCacheItem.C:
|
||||
* GraphicsConverter.C:
|
||||
* PreviewImage.C:
|
||||
* PreviewLoader.C:
|
||||
* PreviewedInset.C:
|
||||
* Previews.C: 'namespace support = lyx::support' rather than
|
||||
'using lyx::support'.
|
||||
|
||||
* Previews.h: cleaned up some comments.
|
||||
|
||||
2003-07-26 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* GraphicsTypes.h: do not declare displayTranstor here (and remove
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
using namespace lyx::support;
|
||||
namespace support = lyx::support;
|
||||
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
@ -64,7 +64,7 @@ std::vector<string> Cache::loadableFormats() const
|
||||
|
||||
void Cache::add(string const & file) const
|
||||
{
|
||||
if (!AbsolutePath(file)) {
|
||||
if (!support::AbsolutePath(file)) {
|
||||
lyxerr << "Cache::add(" << file << "):\n"
|
||||
<< "The file must be have an absolute path."
|
||||
<< std::endl;
|
||||
|
@ -28,7 +28,19 @@
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
using namespace lyx::support;
|
||||
namespace support = lyx::support;
|
||||
|
||||
using support::Assert;
|
||||
using support::ChangeExtension;
|
||||
using support::FileMonitor;
|
||||
using support::IsFileReadable;
|
||||
using support::MakeDisplayPath;
|
||||
using support::OnlyFilename;
|
||||
using support::getExtFromContents;
|
||||
using support::tempName;
|
||||
using support::unlink;
|
||||
using support::unzipFile;
|
||||
using support::zippedFile;
|
||||
|
||||
using std::endl;
|
||||
|
||||
|
@ -31,7 +31,19 @@
|
||||
#include <fstream>
|
||||
#include <sys/types.h> // needed for pid_t
|
||||
|
||||
using namespace lyx::support;
|
||||
namespace support = lyx::support;
|
||||
|
||||
using support::ChangeExtension;
|
||||
using support::Forkedcall;
|
||||
using support::ForkedCallQueue;
|
||||
using support::LibFileSearch;
|
||||
using support::LibScriptSearch;
|
||||
using support::OnlyPath;
|
||||
using support::OnlyFilename;
|
||||
using support::QuoteName;
|
||||
using support::subst;
|
||||
using support::tempName;
|
||||
using support::unlink;
|
||||
|
||||
using std::endl;
|
||||
using std::ostream;
|
||||
|
@ -20,7 +20,8 @@
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signals/trackable.hpp>
|
||||
|
||||
using namespace lyx::support;
|
||||
namespace support = lyx::support;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
@ -114,7 +115,7 @@ PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l,
|
||||
|
||||
PreviewImage::Impl::~Impl()
|
||||
{
|
||||
unlink(iloader_.filename());
|
||||
support::unlink(iloader_.filename());
|
||||
}
|
||||
|
||||
|
||||
@ -147,7 +148,7 @@ void PreviewImage::Impl::statusChanged()
|
||||
break;
|
||||
|
||||
case Ready:
|
||||
unlink(iloader_.filename());
|
||||
support::unlink(iloader_.filename());
|
||||
ploader_.emitSignal(parent_);
|
||||
break;
|
||||
}
|
||||
|
@ -42,7 +42,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using namespace lyx::support;
|
||||
namespace support = lyx::support;
|
||||
|
||||
|
||||
using std::endl;
|
||||
using std::find;
|
||||
@ -292,16 +293,16 @@ InProgress::InProgress(string const & filename_base,
|
||||
void InProgress::stop() const
|
||||
{
|
||||
if (pid)
|
||||
ForkedcallsController::get().kill(pid, 0);
|
||||
support::ForkedcallsController::get().kill(pid, 0);
|
||||
|
||||
if (!metrics_file.empty())
|
||||
unlink(metrics_file);
|
||||
support::unlink(metrics_file);
|
||||
|
||||
BitmapFile::const_iterator vit = snippets.begin();
|
||||
BitmapFile::const_iterator vend = snippets.end();
|
||||
for (; vit != vend; ++vit) {
|
||||
if (!vit->second.empty())
|
||||
unlink(vit->second);
|
||||
support::unlink(vit->second);
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,7 +394,7 @@ void PreviewLoader::Impl::add(string const & latex_snippet)
|
||||
if (!pconverter_ || status(latex_snippet) != NotFound)
|
||||
return;
|
||||
|
||||
string const snippet = trim(latex_snippet);
|
||||
string const snippet = support::trim(latex_snippet);
|
||||
if (snippet.empty())
|
||||
return;
|
||||
|
||||
@ -486,14 +487,15 @@ void PreviewLoader::Impl::startLoading()
|
||||
cs << pconverter_->command << ' ' << latexfile << ' '
|
||||
<< int(font_scaling_factor_) << ' ' << pconverter_->to;
|
||||
|
||||
string const command = "sh " + LibScriptSearch(STRCONV(cs.str()));
|
||||
string const command = "sh " + support::LibScriptSearch(STRCONV(cs.str()));
|
||||
|
||||
// Initiate the conversion from LaTeX to bitmap images files.
|
||||
Forkedcall::SignalTypePtr convert_ptr(new Forkedcall::SignalType);
|
||||
support::Forkedcall::SignalTypePtr
|
||||
convert_ptr(new support::Forkedcall::SignalType);
|
||||
convert_ptr->connect(
|
||||
boost::bind(&Impl::finishedGenerating, this, _1, _2));
|
||||
|
||||
Forkedcall call;
|
||||
support::Forkedcall call;
|
||||
int ret = call.startscript(command, convert_ptr);
|
||||
|
||||
if (ret != 0) {
|
||||
@ -649,7 +651,7 @@ string const unique_filename(string const bufferpath)
|
||||
{
|
||||
static int theCounter = 0;
|
||||
string const filename = tostr(theCounter++) + "lyxpreview";
|
||||
return AddName(bufferpath, filename);
|
||||
return support::AddName(bufferpath, filename);
|
||||
}
|
||||
|
||||
|
||||
@ -746,7 +748,7 @@ void setAscentFractions(vector<double> & ascent_fractions,
|
||||
double const a = ascent + tp_ascent;
|
||||
double const d = descent - tp_descent;
|
||||
|
||||
if (!float_equal(a + d, 0, 0.1))
|
||||
if (!support::float_equal(a + d, 0, 0.1))
|
||||
*it = a / (a + d);
|
||||
|
||||
if (++it == end)
|
||||
|
@ -25,9 +25,8 @@
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "debug.h" // temporary
|
||||
namespace support = lyx::support;
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
@ -63,7 +62,7 @@ void PreviewedInset::addPreview(PreviewLoader & ploader)
|
||||
if (!Previews::activated() || !previewWanted())
|
||||
return;
|
||||
|
||||
snippet_ = trim(latexString());
|
||||
snippet_ = support::trim(latexString());
|
||||
if (snippet_.empty())
|
||||
return;
|
||||
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace support = lyx::support;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace graphics {
|
||||
|
||||
bool Previews::activated()
|
||||
|
@ -36,20 +36,15 @@ public:
|
||||
|
||||
/** Returns the PreviewLoader for this buffer.
|
||||
* Used by individual insets to update their own preview.
|
||||
* We assert that (buffer != 0) but do not pass a Buffer &
|
||||
* so that insets do not need to #include buffer.h
|
||||
*/
|
||||
PreviewLoader & loader(Buffer const & buffer) const;
|
||||
|
||||
/** Called from the Buffer d-tor.
|
||||
* If (buffer == 0), does nothing.
|
||||
*/
|
||||
/// Called from the Buffer d-tor.
|
||||
void removeLoader(Buffer const & buffer) const;
|
||||
|
||||
/** For a particular buffer, initiate the generation of previews
|
||||
* for each and every snippetof LaTeX that's of interest with
|
||||
* for each and every snippet of LaTeX that's of interest with
|
||||
* a single forked process.
|
||||
* If (buffer == 0), does nothing.
|
||||
*/
|
||||
void generateBufferPreviews(Buffer const & buffer) const;
|
||||
|
||||
@ -58,7 +53,6 @@ private:
|
||||
* are instantiated.
|
||||
*/
|
||||
Previews();
|
||||
///
|
||||
~Previews();
|
||||
|
||||
/// Use the Pimpl idiom to hide the internals.
|
||||
|
Loading…
Reference in New Issue
Block a user