When deciding whether the file on disk needs uploading
or not, we compare it with the last modified timestamp.
For this to work they need to be different.
When there is no file to upload (i.e. when there is
nothing new to save), the timestamp we get is
unix-time of 0. This is always different from 'now'.
So we incorrectly think there is data to be uploaded
when there isn't.
Better to initialize the last modified timestamp to
unix-time of 0, so in this case we correctly
conclude that there is nothing to upload.
Change-Id: I545e9021e9c76d009e08758342effaf3e9b964c7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When disconnecting from Kit we shouldn't bluntly stop
DocBroker, because even though we cannot save, we
can still upload the latest document version from
disk.
What makes this particularly problematic is that
we request to kill Kit when the last client is
disconnected.
This was caught through unit-tests, albeit it was
not very common or easy to reproduce.
This fixes cases where always_save_on_exit
doesn't save/upload.
Change-Id: Ib66281fc68d4c0264602852b0acdc453b6f79963
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
For some reason the disk-space check wasn't
done for WOPI storage. Here we add the check
and bubble the exception up to stop loading.
UnitStorage has been updated and re-enabled.
Change-Id: I15a093554b662d6c0828da7683ca0190a8225fc9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Forkit takes significantly longer to start than
to fork. At the startup of WSD we do wait 4 times
as long for forkit than when forking kits.
Similarly, we should also wait that much when
forkit crashes and we recover.
This stabalizes the forkit crash tests, which
did fail rather frequently (in one example,
2 out of 10 runs had failed locally).
Change-Id: I990c8e595b64c34a8e202933be833c53d7ebfc01
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This allows us to use multiple hosts using same coolwsd instance.
added aliases configuration to coolwsd.xml to avoid
possibility of opening the same file as two if the
WOPI host is accessed using different aliases
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I32913015c15fd396cecc702b76e0dcaa8bcafad3
this patch not only fixes the issue in the title
also fixes similar problems such as lets say the
browser page is not maximized and then it is decided
to be maximized. This operation normally does trigger redrawing
but it only draws tiles that are in the cache already and does not
trigger tile invalidation and cells can stay empty until something
retriggers tile invalidation again
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I5981aa36c77a87626809c92e72e1cd6263826953
When an image is inserted, the cursor is not shown.
Change-Id: Iea305a9a666bf06c68e7407eac3252f7faab627a
Signed-off-by: Henry Castro <hcastro@collabora.com>
The svg sent from core does not exactly match the corresponding contents
in tile of the shape - especially the legend texts. This commit does not
attempt to fix that.
Before the commit e64ff372fc, the svg
embedded image was always hidden when a shape/chart/ole is merely
selected and it is only shown while the shape is being resized or moved.
Because of the strict inequality used with getAttribute('opacity') this
condition is always true at least in Chrome as getAttribute() returns a
string. Comparing the parsed integer version of that results in the
intended behaviour and also hides the svg preview when chart/shape is
not dragged or resized.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0aef873e392b0959e93057e6399e8f77cf70042c
With changes from 76121778ca
- We started to overwrite default user agent styles and with it
decreasing the difference between disabled and enabled buttons making it
very difficult to distinguish between the two.
- Also border width was set to different values (disabled btn getting it
from our stylesheet and enabled from browsers styles) causing the btn to
"jump" in size and position when changing between states
Fix those and add new css vars for btns so to avoid mistakes
in the future
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3ec865ecbbff44c90357d1d6de44a2e6f633bc3f
This is to guard against 'faileddocloading' or other error message(s)
sent after the correct 'passwordrequired:to-view' message when a
protected document is loaded without providing password.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I13b1d4a805916fc7a209464f63cb2ecf883b11c4
Reproduction:
Opening a password protected document gives an error corresponding to
'faileddocloading' and then a blank file is displayed.
Fix:
Since 0b76383346, when Document::load()
fails without any exception, onLoad() sends
"error: cmd=load kind=faileddocloading"
to the client. This is a problem when load() fails just because the
client did not provide password for a password protected document.
Besides for all "exception free cases" load() already sends the correct
error message(s) to the client. So this patch also avoids sending
duplicate error messages.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I422740ab8855ed772461c23f42a5443afb729bb5
- Make sure overlay stays an overlay and not a solid opaque color
- Make sure dialogs' background is white and not gray
- Since they appear above the content they shouldn't be darker
- Also make sure Welcome dialog is not gray
related:
6f2be29ab74a5b3b646508a500e938
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4fbaa3f79f7fb1c348b5fe0ef87e98f9007ce007
replace white with var's
autofilter-container use var colors
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: If724c88829c0c69d09be4a29b218593542693add