# HG changeset patch # User Chris Cannam # Date 1149765167 0 # Node ID 7c3e1bc5108051899f8b9c21a78d478720791d6d # Parent e388730429b59a489592312af19cb113e3d5a287 * RFE 1497743: Adjust layer text file format to allow copy/paste into Excel Use \t as the default separator for text file export, and remove the leading space from RealTime::toString values diff -r e388730429b5 -r 7c3e1bc51080 base/RealTime.cpp --- a/base/RealTime.cpp Mon May 22 10:46:43 2006 +0000 +++ b/base/RealTime.cpp Thu Jun 08 11:12:47 2006 +0000 @@ -102,7 +102,7 @@ } std::string -RealTime::toString() const +RealTime::toString(bool align) const { std::stringstream out; out << *this; @@ -113,6 +113,11 @@ std::string s = out.str(); + if (!align && *this >= RealTime::zeroTime) { + // remove leading " " + s = s.substr(1, s.length() - 1); + } + // remove trailing R return s.substr(0, s.length() - 1); } diff -r e388730429b5 -r 7c3e1bc51080 base/RealTime.h --- a/base/RealTime.h Mon May 22 10:46:43 2006 +0000 +++ b/base/RealTime.h Thu Jun 08 11:12:47 2006 +0000 @@ -21,10 +21,10 @@ #ifndef _REAL_TIME_H_ #define _REAL_TIME_H_ -#include "vamp-sdk/RealTime.h" -using Vamp::RealTime; +//#include "vamp-sdk/RealTime.h" +//using Vamp::RealTime; -#ifdef NOT_DEFINED +//#ifdef NOT_DEFINED #include #include @@ -104,9 +104,11 @@ double operator/(const RealTime &r) const; // Return a human-readable debug-type string to full precision - // (probably not a format to show to a user directly) + // (probably not a format to show to a user directly). If align + // is true, prepend " " to the start of positive values so that + // they line up with negative ones (which start with "-"). // - std::string toString() const; + std::string toString(bool align = false) const; // Return a user-readable string to the nearest millisecond // in a form like HH:MM:SS.mmm @@ -123,6 +125,6 @@ std::ostream &operator<<(std::ostream &out, const RealTime &rt); -#endif +//#endif #endif