summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/datastream.hxx44
1 files changed, 37 insertions, 7 deletions
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index 5a4d8cd444b7..5600a09c1eb4 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -14,6 +14,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
+#include <vcl/timer.hxx>
#include <address.hxx>
#include <boost/noncopyable.hpp>
@@ -33,15 +34,37 @@ namespace datastreams {
class ReaderThread;
}
-typedef std::vector<OString> LinesList;
class DataStream : boost::noncopyable
{
- OString ConsumeLine();
- void MoveData();
- void Text2Doc();
-
public:
+ struct Cell
+ {
+ struct Str
+ {
+ size_t Pos;
+ size_t Size;
+ };
+
+ union
+ {
+ Str maStr;
+ double mfValue;
+ };
+
+ bool mbValue;
+
+ Cell();
+ Cell( const Cell& r );
+ };
+
+ struct Line
+ {
+ OString maLine;
+ std::vector<Cell> maCells;
+ };
+ typedef std::vector<Line> LinesType;
+
enum MoveType { NO_MOVE, RANGE_DOWN, MOVE_DOWN, MOVE_UP };
enum { SCRIPT_STREAM = 1, VALUES_IN_LINE = 2 };
@@ -75,8 +98,13 @@ public:
void SetRefreshOnEmptyLine( bool bVal );
private:
+ Line ConsumeLine();
+ void MoveData();
+ void Text2Doc();
void Refresh();
+ DECL_LINK( ImportTimerHdl, void* );
+
private:
ScDocShell* mpDocShell;
ScDocument* mpDoc;
@@ -89,14 +117,16 @@ private:
bool mbRunning;
bool mbValuesInLine;
bool mbRefreshOnEmptyLine;
- LinesList* mpLines;
+ LinesType* mpLines;
size_t mnLinesCount;
size_t mnLinesSinceRefresh;
double mfLastRefreshTime;
SCROW mnCurRow;
ScRange maStartRange;
ScRange maEndRange;
- rtl::Reference<datastreams::CallerThread> mxThread;
+
+ Timer maImportTimer;
+
rtl::Reference<datastreams::ReaderThread> mxReaderThread;
};