The tokenizer(s) are more generic than the protocol
logic, and are used from contexts that don't involve
the protocol as such.
Change-Id: Ie8c256bf11a91e466bff794021f41603c9596a7f
More readable and typically more efficient.
Change-Id: I9bd5bfc91f4ac255bb8ae0987708fb8b56b398f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95285
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Allows comparing tokens with C strings without a heap allocation. Do the
same when comparing two tokens from two different StringVectors.
And use it at all places where operator ==() has an argument, which is a
StringVector::operator []() result.
Change-Id: Id36eff96767ab99b235ecbd12fb14446a3efa869
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90201
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.
The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.
This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)
Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.
Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
removed use of Poco::StringTokenizer from the tools directory using LOOLProtocol::tokenize and std::vecor<std::string>
Change-Id: I0673e658fd35cbdc7425a99f1dcea0b54923f52c
Reviewed-on: https://gerrit.libreoffice.org/82568
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Also, avoid repeatedly converting INT_MAX to string.
It's an arbitrary large number, so use 1 billion,
which is probably more easily recognizable as an
arbitrary large number.
Change-Id: Ie6f898d6e8978efa29c355f3cb50b60114870f0d
Reviewed-on: https://gerrit.libreoffice.org/77593
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This adds table markers for resizing rows and columns if the user
has the table selected or the cursor is in the table. The code
reacts to the callback "tableselected:", where the markers are
created for each column and row, if the payload (json) of course
has any data. When the marker is dragged, a uno command to resize
the table column or row border is send to the core.
Change-Id: I9b21d09639c1b2be70a1a897f9e3340b453d847e
Reviewed-on: https://gerrit.libreoffice.org/77360
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This replaces the standard text selection marker with a cell
selection markers to resize the cell selection. This looks and
behaves better for cells in Calc and it is also easier to deal
with.
Additionally add auto fill marker to perform the auto fill action
on the cells. This was not possible to do previously unless you
hit an invisible part of the cell selection, which is not
convenient when using touch.
Change-Id: Ia02d03b7b8e8d98412ea98eb92fb47d1505ef979
Reviewed-on: https://gerrit.libreoffice.org/76494
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
And also:
* Hint the compiler to warn about the missing callbacks.
* Add few missing ones.
* Update the bundled headers.
Change-Id: I8d31363eaaea289e8a517c0b9b1142b33ce3027e
This adds handling of signature status (manually request for the
status or as a callback) in WSD.
In addition prepare support for signing of document, but don't yet
trigger the actual LOKit function (needs the JS building blocks
set up first to know how to handle the payload - certificate and
private key)
Change-Id: Ic76baa5847bb52adde616338187d5979e0093c6d
Reviewed-on: https://gerrit.libreoffice.org/62533
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Now when a row/col is inserted/removed or resized is the core to
notify the client that current header is no more valid and a new
header should be requested by the client to core.
In this way core can notify the header invalidation to all views.
Change-Id: Ia3c1872b73cfb3458cd0d35907291a9fc9eebd11
Reviewed-on: https://gerrit.libreoffice.org/36729
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
As far as I see, we tend to use the same namespace name as the
basename of the corresponding include file, and this stuff is defined
in a file called Png.hpp.
Change-Id: Id859e13e94568abd9f1d5b4ef3bfbbb0c156db11