summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/dataprovider.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc/dataprovider.hxx')
-rw-r--r--sc/source/ui/inc/dataprovider.hxx53
1 files changed, 51 insertions, 2 deletions
diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx
index 162ecbeb5411..0ffb82c66cd4 100644
--- a/sc/source/ui/inc/dataprovider.hxx
+++ b/sc/source/ui/inc/dataprovider.hxx
@@ -14,24 +14,73 @@
#include <tools/stream.hxx>
#include <rtl/ustring.hxx>
#include <address.hxx>
+#include <osl/mutex.hxx>
+#include <osl/conditn.hxx>
+#include <queue>
+
+#include <config_orcus.h>
+#include "officecfg/Office/Calc.hxx"
+
+#if ENABLE_ORCUS
+#if defined(_WIN32)
+#define __ORCUS_STATIC_LIB
+#endif
+#include <orcus/csv_parser.hpp>
+#endif
namespace sc {
+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;
+
class CSVFetchThread : public salhelper::Thread
{
SvStream *mpStream;
+ size_t mnColCount;
+
bool mbTerminate;
+ osl::Mutex maMtxTerminate;
+
+#if ENABLE_ORCUS
+ orcus::csv::parser_config maConfig;
+#endif
virtual void execute() override;
public:
- CSVFetchThread();
+ CSVFetchThread(SvStream*);
virtual ~CSVFetchThread() override;
void RequestTerminate();
- void IsRequestedTerminate();
+ bool IsRequestedTerminate();
void Terminate();
void EndThread();
+ void EmptyLineQueue(std::queue<LinesType*>& );
};
class DataProvider