Commit Graph

55 Commits

Author SHA1 Message Date
Stephan Bergmann
8cafd08278 Use typed Timer::SetTimeoutHdl Link
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-05-05 10:21:54 +02:00
Noel Grandin
03e6cc9130 loplugin:staticmethods
Change-Id: I912187d6c481a2ba61fed9c01998bf6f3c08a6a0
2015-05-05 09:30:40 +02:00
Noel Grandin
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
xukai
fcf953b8ec make streamtimeout a config variable instead of an env. var.
Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b
2014-10-09 09:54:30 +01:00
Markus Mohrhard
678ad50a5e fix coding style
Change-Id: I4841929ac8f1a50892d72f7b2a32ba2f55b62a85
2014-07-24 23:18:50 +02:00
xukai
dc0b5fa230 avoid static variables
Change-Id: Ib73464cbd9ddc644b008ab7fdcab5ca70dcaa2f1
2014-07-24 23:18:50 +02:00
Markus Mohrhard
37e6631cc5 remove whitespace
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-06-25 05:41:10 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Stephan Bergmann
141a87dd3c Clean up function declarations and some unused functions
Change-Id: If2c233a8ced8815b065a72caff907f10ef6166ff
2014-04-14 15:41:27 +02:00
Markus Mohrhard
36788e95fd upgrade liborcus
Conflicts:

	external/boost/StaticLibrary_boost_system.mk

Change-Id: Ie4af26c87a100b67baeedbaa7fb1ac428845f92b
2014-03-03 17:53:57 +01:00
Noel Grandin
7e6981c3ea remove unused method sc::DataStream::ToMoveType(rtl::OUString const&)
Change-Id: I76a677df30649b42c22f6c72525717b8224d2f79
2014-02-25 15:17:00 +02:00
Markus Mohrhard
989c7ce9a8 CID#1158211: out-of-bounds access 2014-01-19 19:35:54 +01:00
Kohei Yoshida
226f4f037c Remove CallerThread and use Timer to do the same, on the main thread.
This makes the UI more responsive in general.

Change-Id: I5f8a4fab84a73812af868262cc7daa9d92cb3777
2013-12-30 19:40:08 -05:00
Kohei Yoshida
4e85af9d93 This part requires orcus library presence.
Change-Id: I6bfba9872deb7318721ce4d73795ef7569a24e89
2013-12-30 14:32:11 -05:00
Kohei Yoshida
9a623cdca2 Parse CSV lines in the reader thread.
Change-Id: I6329a0e6e6fa6576df2ed473482d558bfd6cce08
2013-12-30 12:33:28 -05:00
Kohei Yoshida
3ccb783be1 Disallow direct access to member variables.
Change-Id: I82d6c2a2c2844fbb6c2976327b129e42f6b63053
2013-12-30 12:33:27 -05:00
Kohei Yoshida
bb19d62a27 Protect access to the terminate flag.
Change-Id: I9c47e8f114f3d4dcdd5e62b1fffd2b65e7bfb00e
2013-12-30 12:33:27 -05:00
Kohei Yoshida
2c79510521 Misc cleanup.
Change-Id: Ia3d0f2e098804dabdbdd324562097b9f69528d35
2013-12-30 12:33:27 -05:00
Michael Meeks
7a4b8676a2 implement datastream timings.
Change-Id: I8b3a1747ff291cbfcc650887bb8557fb5dc24c0d
2013-12-28 22:48:10 +00:00
Kohei Yoshida
f2a3848bee Put all these back in...
Change-Id: If2168a57e0c77cf7fe85d66a6c6fd6a810d45035
2013-12-20 15:34:04 -05:00
Kohei Yoshida
c3bd435387 Call Yield() to unblock the main thread when refreshing.
Also, we don't seem to need this solar mutex locking and checking for
needs repaint flag here anymore, and not having these make the streaming
much faster esp on Windows.

Change-Id: I6e8ae82e5d986492ac576d28f11e2afffe954bc2
2013-12-20 13:16:49 -05:00
Kohei Yoshida
23f0930219 Properly import data stream data from ods.
Change-Id: Iedae2226ba08c614f1b700a5444715a990899d38
2013-12-19 15:33:09 -05:00
Kohei Yoshida
8fe1f12459 Save the data stream settings to ODS but only for 1.2 extended.
And only when the experimental mode is turned on.

Change-Id: I49dc8a2588cae5ee4a987a47d882672efb93e1c2
2013-12-19 15:33:09 -05:00
Kohei Yoshida
a0577b43f2 Initialize data stream dialog properly.
Change-Id: I86d4cfe946de896951d5eca2317f6d515113b249
2013-12-19 15:33:09 -05:00
Kohei Yoshida
a17794d5fa Switch away from using the sfx2 link manager for data stream.
Change-Id: I05ac5a8151135ace7f4e351cfedab0170c8d9a57
2013-12-19 15:33:08 -05:00
Kohei Yoshida
d5452cef5f Don't forget to set document modified afterward.
Change-Id: I5b2b9a3dad2aeee6bc5a4a4767b239c92865b2f4
2013-12-18 18:15:33 -05:00
Kohei Yoshida
df57f73ff7 Handle "refresh on empty line" setting from the UI.
With this set, when we detect an empty line, we'll trigger refresh and
discard the line.  If not set, we'll import an empty line.

Change-Id: Ic3ccb1adbd0c7273c3affff82a2d111c378f2af3
2013-12-18 18:15:33 -05:00
Kohei Yoshida
b8e85af1ed Fine-tune our refresh policy during streaming.
Change-Id: I9eff0bc0e4087261e2283a55211c8a9daf2a8b24
2013-12-18 18:15:33 -05:00
Kohei Yoshida
b9524c17b5 Just do hard-recalc on stream refresh. That takes care of all our needs.
Change-Id: I9a454089843d1373153988a29843b95db22ee284
2013-12-18 18:15:32 -05:00
Stephan Bergmann
e23951b81f -Werror,-Wunused-private-field
Change-Id: I6db1082fa4797c312268d2768d9573f2e3a0f427
2013-12-18 18:34:19 +01:00
Kohei Yoshida
6dc1ea1c67 Pass enum values around rather than OUString ones.
Ditto with the range type.

Change-Id: Iab37d50b6d58d76c60872f49f13d77ff0c918974
2013-12-18 10:13:32 -05:00
Kohei Yoshida
9c369f7183 Detect numbers which are to be inserted as numeric cells.
Also, disable automatic scrolling.

Change-Id: I2f3facfd91b9b4e3f86b9685a546a094180bf1ee
2013-12-18 10:13:31 -05:00
Kohei Yoshida
ecc884e9b8 Use orcus csv parser to streamd data which has much less overhead.
Also, use DocumentStreamAccess to modify ScDocument's content.

Change-Id: I516260cff1f2315267afcff05e36e620798a1aed
2013-12-18 10:13:31 -05:00
Kohei Yoshida
df63ec609f Only keep track of current row position, not a whole range.
Change-Id: I8ad56284b9c5422d102c7e8688e5b1e4c37ae877
2013-12-18 10:13:31 -05:00
Kohei Yoshida
d76bc6b5c7 Re-organize it a bit.
Change-Id: Idbd8c62a51e2de9df0396c2f18b8b25f0ad8ebf2
2013-12-18 10:13:31 -05:00
Kohei Yoshida
49c2c79286 Check the parse result and handle an error case.
Change-Id: Ie61f8c274754669a15e12a6f1517dacb7645c752
2013-12-18 10:13:28 -05:00
Kohei Yoshida
507c0a0fe7 Ensure that the initial data range has only one row.
Change-Id: I97731ba02bab0ab44f19ab9cae2563ee0f71fef2
2013-12-18 10:13:27 -05:00
Kohei Yoshida
8538722a49 Add sc::DocumentStreamAccess class.
To provide the DataStream class with a fast way to manipulate document
content without altering broadcaster positions or unnecessary broadcasting.

Change-Id: Ib329313b8668c9a1698ea05372de6269d089859c
2013-12-18 10:13:27 -05:00
Kohei Yoshida
2fe4112c5b Put these new classes in sc namespace.
Change-Id: Id75c63521def501a4c8c55d4cd45b66a010a9580
2013-12-18 10:13:27 -05:00
Kohei Yoshida
5945b187a5 Try to consolidate all broadcast calls into one place. Still WIP.
Change-Id: I7b75307de3ae91726facb67ea8d3fb6999e1f9c7
2013-12-18 10:13:26 -05:00
Kohei Yoshida
1d6e5dbaff Try to reduce the amount of repainting during streaming. 2013-12-18 10:13:26 -05:00
Matúš Kukan
29533e1871 datastreams: Wait with import if we need to repaint.
Change-Id: I31e8371999afafeeaad201496becf1f2f9d8d276
2013-12-12 14:47:57 +01:00
Matúš Kukan
78e4da913c datastreams: Broadcast data changes.
Change-Id: Iedf07a9ef59a695cb56c2e160f269cd5d542735b
2013-12-12 14:47:57 +01:00
Stephan Bergmann
99d3733c7f static, not mysterious
Change-Id: Ib080dd7fcbc8abb52f762a8071b0233e970b2691
2013-11-29 16:00:59 +01:00
Tor Lillqvist
1e1302b89d WaE: Silence bogus MSVC 2012 warning
Change-Id: I166e40e7b6d91fa406f9f3649001c12f054bbf2a
2013-11-29 14:06:27 +02:00
Matúš Kukan
39bc5e1155 fix memory leak
Change-Id: Ic84ace8ac3aa52009f43aafe78283730f97881f2
2013-11-28 20:40:41 +01:00
Matúš Kukan
75997ec53c datastreams: No need to disable undo. We do not add undo actions.
Also fixes memory leak, because EnableUndo()
was called from Document's destructor.

Change-Id: I637ff62bde6f8c3238238323e6e4a5a5d2b81881
2013-11-28 20:40:41 +01:00
Matúš Kukan
2f4a148751 datastreams: Simplify code for importing CSV data.
The code is copied and simplified from sc/source/ui/docshell/impex.cxx.

Change-Id: I15a426a16c4f2ba659af86492c1b2e4ba879d8b6
2013-11-28 20:40:40 +01:00
Matúš Kukan
1e7196461e datastreams: for security, ask before executing a script when importing
Change-Id: I76a11dae2569eb7e0c791c9f1fb20626c4ff7528
2013-11-28 20:40:40 +01:00