Commit graph

11249 commits

Author SHA1 Message Date
Mihai Varga
55508c6680 Enabled doc. nagivation by keyboard and mousewheel
Scrolling now works from the arrowkeys, pgUp, pgDown
Home and End buttons and also from the mouseWheel
TODO update the compressed file
2015-05-04 16:29:23 +03:00
Mihai Varga
bc29447b86 Removed trailing whitespaces from scrollbar code 2015-05-04 16:26:02 +03:00
Mihai Varga
7d3458eb5e This fixes a bug that's triggered when zooming at document's end 2015-05-04 11:20:36 +03:00
Mihai Varga
a03e9f2e73 Updated readme to reflect the new changes 2015-05-04 11:20:36 +03:00
Mihai Varga
fa15ef1b20 Updated the example document 2015-05-04 11:20:36 +03:00
Mihai Varga
320e094a47 Scroll event handlers + document centering
The document is centered by setting map's maxBounds
There are 2 types of scroll events:
 - one generated during scrolling which actually pan's the map
 - one generated when scrolling stops, this is used to keep track of
    scrolling events
When the document is zoomed, the scrollbars are placed at the right
offset as the document's dimension changes and this is done with
the scrollTo method after temporarily disabling the event listener.
2015-05-04 11:20:36 +03:00
Mihai Varga
f0502879b4 New containers + restored some methods implementations to their original
Added scrollContainer - the div that will get scrollbars
mockDoc - a mock document div of size equal to the document's, which
    will cause the appearance of scrollbars

The size of the map now equals the visible area, so I've restored
the methods to work on this new size
2015-05-04 11:20:36 +03:00
Mihai Varga
c788ab8886 Event handlers for the new scrollbars 2015-05-04 11:20:36 +03:00
Mihai Varga
bee74de059 CSS updates for the new div elements 2015-05-04 11:20:36 +03:00
Mihai Varga
43c68037ec Custom scrollbars for document navigation
jQuery scrollbars, they should be easy to replace if we find something
better, maybe something written in vanilla javascript
Github project: https://github.com/malihu/malihu-custom-scrollbar-plugin
MIT license available at:
https://github.com/malihu/malihu-custom-scrollbar-plugin/blob/master/LICENSE.txt
2015-05-04 11:20:36 +03:00
Mihai Varga
dd8a9f8145 Leaflet small fixes 2015-05-04 11:20:36 +03:00
Tor Lillqvist
af1821bb3b Temporarily bypass modification time things for actual URLs
The code works only for pathnames currently. Need to fix soon.
2015-04-30 21:12:33 +03:00
Tor Lillqvist
dce8e0870e Just _Exit() in childMain
Otherwise various LO global objects will try to run dtors and whatnot, often
crashing.
2015-04-30 21:06:52 +03:00
Tor Lillqvist
600b5bc4d8 Log also when copying of the document is done 2015-04-30 21:05:16 +03:00
Tor Lillqvist
af400fcef4 This is cleaner 2015-04-30 18:44:27 +03:00
Tor Lillqvist
f7375bb5ba Try to be a little more robust 2015-04-30 18:03:00 +03:00
Tor Lillqvist
59055b975e Use Poco::StreamCopier, just because it looks nicer
A test program did not show any performance difference between using the
std::copy() thing, Poco::StreamCopier, or std output << input.rdbuf() trick.
2015-04-30 18:01:21 +03:00
Tor Lillqvist
8b43cd25b0 Handle file: and http: URLs 2015-04-30 15:58:13 +03:00
Tor Lillqvist
847ce0442e Add the part parameter to the example tile message here, too 2015-04-30 15:19:29 +03:00
Tor Lillqvist
e48ba86eb9 Mention using actual URLs 2015-04-30 13:50:10 +03:00
Tor Lillqvist
3ea260f972 Portability improvements
Allow the directory parameters to be relative paths; turn them into absolute
ones for later use in the script as we change directories back and forth.

Use cpio instead of cp --parent for each file separately. (The latter has the
problem that parent directories are created using the protection the
corresponding source directory has, and tht might not permit you to copy other
files later into the same directory.)

Also copy usr/share/liblangtag, for the (common) case when LibreOffice is
built to use a system liblangtag.

Don't bother with the special handling of /usr/share/fonts/ghostscript unless
it exists and is a symlink.

With these changes, it worked for CentOS 7, too.
2015-04-29 15:06:18 +03:00
Tor Lillqvist
19276ed5d8 Actually drop the chroot capability also in the child process
I forgot to do it in childMain() in 28c9561722.
2015-04-28 11:24:00 +03:00
Tor Lillqvist
25575961ed We need to check for cache dir access only in the master process 2015-04-28 11:17:26 +03:00
Tor Lillqvist
4d6dfebf8e Expand on debugging details 2015-04-28 11:14:46 +03:00
Tor Lillqvist
2110aef06a No need for this member to be public 2015-04-28 11:02:29 +03:00
Tor Lillqvist
6df6a5d58b Spawn just one child in the --test case 2015-04-28 11:01:18 +03:00
Tor Lillqvist
88cb21867b Spawn children only after starting to listen on the server port
Otherwise some children, especially when there are more than just a few of
them to spawn, might try to contact the server before it is listening.
2015-04-28 10:57:05 +03:00
Tor Lillqvist
9251fefe94 Clarify remaining need for part parameter in messages 2015-04-27 21:58:54 +03:00
Tor Lillqvist
28c9561722 Get rid of the CHROOT capability after using it, or when not needing it 2015-04-27 21:55:36 +03:00
Tor Lillqvist
1b06290d2b Add a part parameter to the tile messages
The JS code always passes in 0 for now. The server parses the parameter and
calls LibreOfficeKitDocument::setPart() before calling paintTile().

Probably also the status, key, mouse and selection messages will need a part
number. The intent is after all that the protocol is as stateless as
possible. (So maybe we should also pass the document URL in each message?)
2015-04-27 21:30:26 +03:00
Tor Lillqvist
389815ac63 Introduce LOLProtocol::getTokenKeyword() and use it
The new function takes a map from keywords to integer values, and accepts
parameters in the form of either name=keyword, or for backward compatibility,
name='keyword'. Use it to parse the type parameter of the key, mouse,
selecttext and selectgraphic messages. This restricts the accepted keywords to
those actually valid for each message.
2015-04-27 21:12:20 +03:00
Tor Lillqvist
5267753b82 Add mention that MasterProcessSession::dispatchChild() should wait 2015-04-27 18:03:52 +03:00
Mihai Varga
9cd120f7ab Restore scrollbar offset 2015-04-27 16:03:50 +03:00
Tor Lillqvist
b2f34b0c3d Maybe /usr/share/fonts/ghostscript is also good to have 2015-04-27 16:01:11 +03:00
Tor Lillqvist
0019dc4943 Preserve timestamp of directories created in the jail
Needed for /usr/share/fonts so that fontconfig trusts its cache, but no harm
doing it for all directories. (Except a slight slowdown, need to see it if
has any significant impact if we would do the utime() only for directories
under /usr/share/fonts.)

Thus we need to pass the FTW_DEPTH flag to nftw() and handle FTP_DP instead of
FTP_D. We also need to make sure the directory is created also in the case of
an empty directory, for which no FTW_F callback of files inside it has been
received.

It is safest to not exit the nftw() in the FTW_SLN case.
2015-04-27 15:57:18 +03:00
Tor Lillqvist
074a54dd6c Make sure the fontconfig cache works for the sys-template
Need to copy /var/cache/fontconfig, too. For it to be valid, the directory
timestamps in /usr/share/fonts must be preserved.
2015-04-27 15:49:25 +03:00
Tor Lillqvist
be2bb356c3 Add seconds.milliseconds to the log prefix 2015-04-27 14:16:37 +03:00
Michael Meeks
6b17e8b022 Update README, and install ld.so.* into the jail. 2015-04-27 10:00:31 +01:00
Michael Meeks
1317941b5a Use shell variables to make it more cut/paste-able. 2015-04-27 09:44:59 +01:00
Tor Lillqvist
68d15726c4 Rephrase statement more logically 2015-04-27 11:27:29 +03:00
Tor Lillqvist
bced6a0771 Clarification 2015-04-27 11:26:00 +03:00
Mihai Varga
b6671341a7 The map handles keypress events but no panning keys 2015-04-27 10:18:13 +03:00
Mihai Varga
7fa1ae861d The map should not yet handle keyboard events 2015-04-27 09:57:06 +03:00
Miklos Vajna
0615ce950f LOOLSession: log error if nftw() fails
Should help finding out the problem if --lotemplate is given a
non-existing directory by mistake.
2015-04-25 01:40:16 +02:00
Tor Lillqvist
7d25ffada6 Remove part that is not relevant any longer
I don't see the busy looping any more, and child porcesses are indeed now
pre-spawned as needed (not just "re-started").
2015-04-24 18:56:24 +03:00
Tor Lillqvist
d6005eb524 Mention we need a part number parameter in many places 2015-04-24 18:54:50 +03:00
Miklos Vajna
4a7265ae76 Makefile: fix autoreconf warning
Makefile.am:18: warning: deprecated feature: target 'SETCAP' overrides 'SETCAP$(EXEEXT)'
Makefile.am:18: change your target to read 'SETCAP$(EXEEXT)'
/usr/share/automake-1.13/am/program.am: target 'SETCAP$(EXEEXT)' was defined here
Makefile.am:1:   while processing program 'SETCAP'
2015-04-24 17:27:21 +02:00
Tor Lillqvist
e9f3e815fe Don't try to run the 'display' program if there is no $DISPLAY 2015-04-24 18:18:56 +03:00
Tor Lillqvist
3ff60eaea1 Mention that the tile cache directory needs to be created 2015-04-24 17:46:01 +03:00
Mihai Varga
caf7c2e6c6 The map should not trace a resize event
The container div should handle the resize by updating the scrollbars
This fixes the map crash during window resize.
2015-04-24 17:21:38 +03:00