Commit Graph

53 Commits

Author SHA1 Message Date
Tor Lillqvist
c989f5e0e1 These constants are now in the scoped enum MouseEventModifiers
Change-Id: I73e1498198cbb55ccd969713a38b6cd678c94643
2014-11-08 00:51:21 +02:00
Andras Timar
d634a61ebd vcl/layout.hxx was included twice
Change-Id: I03a30793e02def731cb6c8f130c48aeb325a2528
2014-10-18 11:19:27 +02:00
Noel Grandin
a1740a682a use vcl::Font
Change-Id: I22fd5c1340ca0c646725d9fce77304c10d9eb5d5
2014-09-18 14:47:28 +02:00
Tor Lillqvist
d08a81d678 Bin "temporary" code that doesn't compile any longer
Change-Id: I7550a40bab4ffd1b585ad37dceb59c38cf1e4ca3
2014-08-18 22:30:59 +03:00
Caolán McNamara
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
Tor Lillqvist
231050ddcc No need for these fields for iOS
Change-Id: I3fff002919a1f15ae370c7d0c7f65e67108a6232
2014-05-26 16:11:55 +03:00
Tor Lillqvist
848ff96d0b With tiled rendering for iOS there is no need for a "frame buffer"
The resulting dropping of the basebmp code reduces app size by 0.7 MB.

Change-Id: Id263873ed5c4bb2435d929a1319fedeedb6daa14
2014-04-22 14:43:55 +03:00
Julien Nabet
80915b8f21 cppcheck: Prefer prefix ++/-- operators for non-primitive types
Change-Id: Ic24715d86b3f822babd236ac73c041f3a5c1d92b
2014-04-20 22:54:56 +02:00
Tor Lillqvist
cb10a184b9 Kill the ImplSVGDIData::mbNoXORClipping flag
Instead, act as if it was true on all platforms. Don't do XOR clipping on any
platform. Simpler code is better code, and XOR tricks are generally very much
out of fashion these days, I have been told. Didn't seem to have any visible
ill effects on Linux at least.

Change-Id: I6192006c77a4a81363ec7b3292f72d512d5e9b53
Reviewed-on: https://gerrit.libreoffice.org/8901
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-04-10 11:42:41 +00:00
Tor Lillqvist
5a79f2dcbb For consistency, set the same "GDI" and "Win" flags for iOS as for OS X
No visible effect, though. Which is both good and bad: Good because it
means that without ill effects a larger degree of idenical code paths
can be used for both iOS and OS X. Bad because this change didn't help
in getting rid of the annoying misrenderings on iOS of some Smart Art
objects.

Change-Id: I9da0f98ca90554dbac963688705b3c7955021741
2014-04-07 12:54:46 +03:00
Tor Lillqvist
50bf123ddb Kill superfluous vertical whitespace
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-04-02 16:54:18 +03:00
Chris Sherlock
381f8a5673 sal_Bool -> bool in mostly vcl module
Conflicts:
	include/vcl/settings.hxx
	svtools/source/table/tablecontrol_impl.cxx
	sw/source/core/frmedt/fecopy.cxx
	vcl/inc/canvasbitmap.hxx
	vcl/inc/headless/svpframe.hxx
	vcl/inc/unx/salframe.h
	vcl/inc/win/salframe.h
	vcl/inc/win/salprn.h
	vcl/inc/win/salvd.h
	vcl/osx/DragSource.cxx
	vcl/osx/DragSource.hxx
	vcl/osx/DropTarget.cxx
	vcl/osx/DropTarget.hxx
	vcl/osx/OSXTransferable.cxx
	vcl/osx/OSXTransferable.hxx
	vcl/osx/clipboard.cxx
	vcl/osx/clipboard.hxx
	vcl/osx/salprn.cxx
	vcl/qa/cppunit/canvasbitmaptest.cxx
	vcl/source/components/fontident.cxx
	vcl/source/control/edit.cxx
	vcl/source/control/spinfld.cxx
	vcl/source/gdi/gdimtf.cxx
	vcl/source/gdi/virdev.cxx
	vcl/source/helper/canvasbitmap.cxx
	vcl/source/window/dockwin.cxx
	vcl/unx/generic/dtrans/X11_selection.hxx
	vcl/unx/kde/UnxFilePicker.cxx
	vcl/unx/kde/UnxFilePicker.hxx
	vcl/unx/kde4/KDE4FilePicker.cxx
	vcl/unx/kde4/KDE4FilePicker.hxx
	vcl/unx/kde4/KDESalFrame.hxx

Change-Id: I9866d985da86dea2a56feff23f91c1467a1636b0
Reviewed-on: https://gerrit.libreoffice.org/8219
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28 03:19:47 -06:00
Stephan Bergmann
fe7a4bccfd Adapt vcl to various loplugin warnings on Mac OS X
Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c
2014-02-21 23:47:23 +01:00
tsahi glik
24dd10c727 fix compilation of ios 2014-02-20 17:59:35 -08:00
Tor Lillqvist
512d8f0495 Make sure ShowNativeDialog() shows something: Use NSLog()
Change-Id: I5ca0a471c980aa19d243500e95ee8cf585e1be9e
2014-01-26 12:04:19 +02:00
Tor Lillqvist
6265876ae9 iOS tiled rendering work
Possibly quite broken intermediate commit. But anyway, now it is
possible to render the tile diretly to a CGContext. Can be seen in
the MobileLibreOffice app when build in the Debug_tile_tester
configuration. See touch_lo_draw_tile() in viewsh.cxx. Unfortunately
the old plain LibreOffice test app is now broken, though, and
displays nothing at all.

This refactoring and hacking in vcl was done in a quite ugly fashion,
with ifdefs etc. But trust me, I did try, several times, for many
days, to get where I wanted in an elegant and clean fashion. But doing
it cleanly meant not being able to actually build it for days while
trying to figure ut which bits go where and which class should be
split into what base and derived class(es), and it was too much for my
limited brain capacity. I just couldn't juggle all the vcl class
structure in my head, especially as I don't have any good
understanding of the general design of it all.

Change-Id: Ia59d6a9cce15a63e63f94e8d8574bef21993fb1f
2013-12-14 01:42:02 +02:00
Tor Lillqvist
69baf700b6 Try to fix colour issues
Use RGBA consistenly. Wonder why the code was changed to use BGRA at
some point?

I got the picture in the document to show up with correct colours but
unfortunately not the RED GREEN BLUE etc text. Weird. Even weirder, if
I add a temporary hack in CoreTextStyle::SetTextColor() to use some
other colours for non-black text (instead of the ones passed in the
parameter), those colours do show up. This is a mystery.

Change-Id: I591424a19fa02b3f095035e989cbc49fff94b8ca
2013-12-11 18:17:18 +02:00
Ptyl Dragon
5b0ff56e12 releasing the CGDataProvider to prevent possible memory leaks
Change-Id: Ib64f457bd9cc185e979b1a3e9f07fdba93da88d7
2013-11-15 16:52:07 +01:00
Ptyl Dragon
2c27c563ef created a long long unit for MLOContentSize
Change-Id: I41910058088161119d3cae8ca625d456652d890f
2013-11-15 16:51:56 +01:00
Ptyl Dragon
46f2b5388c changed to CGSize
Change-Id: Ic84fcadf4332210693586825cdd8e32ef0f2a727
2013-11-15 16:51:55 +01:00
Ptyl Dragon
2ffb7509ec refactored to allow copying FixedImage to ios
Change-Id: Icecdae8ea2bb68c228f038758af8fb688ce9dd4a
2013-11-15 16:51:51 +01:00
Jan Holesovsky
8b853bde21 Tiled rendering: Tunnel the request for a tile to the ViewShell.
Change-Id: I6271546ab2c0e92832c501617d94d5ad155de705
2013-11-15 16:51:49 +01:00
Tor Lillqvist
54ef5bd641 More work on selection handling in iOS
Got the selection start and end handle dragging working... The trick was not
to call SwWrtShell::SetCursor(), but SwCrsrShell::SetCrsr(). Sounds easy but
took a lot of guessing and experimentation to figure out. Anyway, now it does
what I had expected it to do a few das ago already.

There are glitches, especially in corner cases like if you move the start
handle past the end handle or vice versa.

more

Change-Id: Id6c1d99a4052531789bccf0d48165cfb41b89cfe
9b94c0dd55b04a7b6b3c40654562a9c51fa9b450
2013-10-23 00:19:20 +03:00
Tor Lillqvist
657a3a8182 Try to handle selection resizing in a more "correct" way
Faking mouse clicks is a stupid way to do it of course. Try to do it
"right". For now just worked on moving the end handle, but once that
works, similar code should be used for the start handle, too.

Does not work yet. It is hard to extract out from
SwEditWin::MouseButtonDown() exactly what all is relevant, and what
isn't, for this use case.

Change-Id: I76a226f787facbac645aaff8b4852d693bcf4ccb
2013-10-22 01:10:41 +03:00
Tor Lillqvist
4d8f12f57b More text selection WIP hacking
Change-Id: Ia29725295613faf875a688b3917b144a5f05bbe3
2013-10-18 18:48:03 +03:00
Jan Holesovsky
f2202fed9e Tiles: Documentation of the parameters.
Change-Id: Ibe31a105972cee2aff9b6896cdd80bd93a1a0e7d
2013-10-17 11:11:39 +02:00
ptyl@cloudon.com
d8e8e6bcbe added draw tile signature and select all fix
Change-Id: I6118c55caa12d9ba52000f89e869e27b218859be
2013-10-17 11:11:39 +02:00
ptyl@cloudon.com
79d83741eb New iOS client code
does not work yet - needs fix by tor after refactoring of ios-bootstrap.h

Change-Id: I0728306beb734511bd3f16e2e4922fd726bb37da
2013-10-15 22:38:04 +03:00
Tor Lillqvist
e9f260b380 Minor refactoring of iOS code
Rename functions so that functions called by the UI layer for actions
to happen in the LO layer and functions called by the LO layer for
things to happen in the UI layer use different prefixes. Move
declarations to the generic <touch/touch.h> and avoid iOS-specific
types in the API.

Change-Id: Ieb8979065e02a87c4a415c934163265f2790d011
2013-10-13 23:17:38 +03:00
ptyl@cloudon.com
da69a3ef5c iOS experimental app support for selection marking via long press gesture
Change-Id: Ib7a71797a2dc967f9d8ddd60fdc10c78201a87c8
Reviewed-on: https://gerrit.libreoffice.org/5911
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2013-10-11 08:19:50 +00:00
ptyl@cloudon.com
4e7495ac2c Fix for iOS scroll by pixels, and pinch to zoom
Minor further changes by tml to match the coding style of surrounding
code mainly.

Change-Id: Ied6087a264f1c6b00763ea36fba9808329afede4
Reviewed-on: https://gerrit.libreoffice.org/5742
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2013-10-09 14:37:46 +00:00
tsahi glik
015a0a652f in iOS avoid copying covered windows to screen
Change-Id: Iebf53e5c2e3909e068739351ccce497ca91b67a5
Reviewed-on: https://gerrit.libreoffice.org/5710
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2013-09-12 12:25:01 +00:00
tsahi glik
16a53253e5 Sync IOS screen invalidate to end of paint
Change-Id: If179c5280366a377ace710e4acf7df737544b224
Reviewed-on: https://gerrit.libreoffice.org/5706
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2013-09-12 11:44:36 +00:00
Stephan Bergmann
d8dbf1b5db Turn basebmp::Format into a proper enum
Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf
2013-07-12 14:41:35 +02:00
Tor Lillqvist
1e7bf8de3b Add pan gesture handling
I get exactly the same kind of artefacts as in the Android app, which
I guess is good as it is at least consistent, as the implementation at
the LO layer is identical...

Change-Id: Icf0690fd2c48a133cb66de2ab7977b7088d2199e
2013-04-19 00:18:33 +03:00
Tor Lillqvist
ab49c55bbc More orientation experimentation and hacking
Now it re-orients and re-sizes the LO "frame" correctly upon rotation,
but it still starts wrongly if starting in landscape orientation.

Change-Id: I4c12a7e00d687391435a47400b6e8b4c7e49bdda
2013-04-16 15:51:03 +03:00
Tor Lillqvist
bd2a91420e Try to propagate display size change to LO
Change-Id: If52c0aa9290c377c08f2cec8c9e36d987c0ed9b6
2013-04-16 11:19:35 +03:00
Tor Lillqvist
6b89688829 Add lo_keyboard_input()
Change-Id: I5904f673de9854af47eefac2f192295a281c5525
2013-04-14 01:52:22 +03:00
Tor Lillqvist
2cca078062 Add experimental lo_keyboard_did_hide() implementation
Change-Id: I24a7449848710c0e09a4bf0da0d906d30a59f0bd
2013-04-13 20:59:04 +03:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Tor Lillqvist
49c3be89e8 Bin some not longer interesting NSLogging
Change-Id: I1afd93fc9a56e85a30991bce9ca2350764cf1ec2
2013-04-07 01:13:36 +03:00
Tor Lillqvist
d054a817be Revert "Try redrawing in multiple phases to avoid blocking the UI thread too long"
This reverts commit 3aae02d02d418222b0b51748008ed5c9c1f1d3c2.
2013-03-31 21:56:40 +03:00
Tor Lillqvist
41a70cc2d3 Try redrawing in multiple phases to avoid blocking the UI thread too long
When initially calling lo_render_windows() from a redrawRect(), just
post the user event asking for a redraw of the (headless) windows, and
return without actually drawing anything to the context.

Then when the RenderWindows() callback for that user event eventually
gets called (which during startup and/or loading of a document might
be several seconds later, as there is lots of other activity going on
also as "user events"), ask the UI thread for a fresh redraw, and wait
for lo_render_windows() in that phase to signal the actual redraw of
the "headless" windows into the context.

Unfortunately this doesn't work well enough. It is not a good idea to
not draw anything in response to a drawRect() it seems. The affected
rectangle gets initialised to black. So there is now irritating
flashing. One sees an almost ready document (and the UI elements which
still are there), but then it goes away for some time before finally
re-appearding. Quite silly. So I will revert this, and I am committing
it just to keep the code for reference in git.

Change-Id: I9ee490345f093d80113c36f9e3268cab5a810dd0
2013-03-31 21:55:10 +03:00
Tor Lillqvist
428ae24e55 Unbreak use of pthread condition variables
I am not really satisfied yet with how the UI redrawing in the app now
works (during startup, which of course is more or less all the app
does so far).

It can take quite some time before a "link" (function to be called)
posted with PostUserEvent() gets run (if there are lots of
time-consuming other "user events" in the queue already, or
something?), and blocking the UI thread for that time is not
acceptable. Will have to come up with some more complicated solution.

Change-Id: Icab20183df3bc4980ae33f0502d10397802cc391
2013-03-30 14:32:10 +02:00
Tor Lillqvist
d08a58a684 Render the "headless" frames to the UI view in the LO thread
We used to render them in the app main (GUI) thread, which is
dangerous, accessing the headless frames in one thread while the LO
thread (where the "main" LibreOffice code is running) might be
updating and changing them.

This fixes some problems like that part of the document did not show
up. If I would test the app on a multi-core iPad, presumably I would
have seen even more problems.

But this also introduces new problems: Now the UI doesn't appear
incrementally (for instance, with an actually progressing progress bar
during the loading of the document) as it used to. Now it all appeads
all of a sudden, everything at once. Which would be fine if it
happened very quickly after starting the app, but it doesn't... on the
original iPad it takes half a minute.

Change-Id: I04068e0d884aa5cb86acefa76449aac4e081b193
2013-03-30 08:41:33 +02:00
Tor Lillqvist
62f6e67f6b IosSalInstance::BlitFrameToBuffer() and RedrawWindows() are unneeded now
Change-Id: I6873461aed7db7b7f06e45556eacb82bcf118aea
2013-03-30 07:53:41 +02:00
Tor Lillqvist
bb0b2744af Draw the frame virtual device bitmaps directly to the destination CGContext
Much faster. No need for the pixelBuffer inbetween.

Change-Id: I6493faca6da3a3e9a1285e00c887928b85dca56e
2013-03-30 07:53:40 +02:00
Tor Lillqvist
e36e86ee3c Refactor the iOS Viewer app and rename it to "LibreOffice"
No, it isn't any closer to being "ready" despite the name, but still,
using the current approach, it clearly isn't restricted to be just a
viewer.

Also drop the verbose LOViewer prefix from class and file names in it.

Change-Id: Ib4e8a31d6fa1b35169ee98cf2aa8f0f22957164c
2013-03-30 07:53:38 +02:00
Tor Lillqvist
d7b027bd10 Add lo_tap()
Change-Id: I635be54c27c93de0a11be7bdd01979b99dadda28
2013-03-30 07:53:37 +02:00
Tor Lillqvist
708270b616 Improve the blitting, use memcpy for each row
Change-Id: Idfc5efe8b2326748670fec82a7780f81b243dbc8
2013-03-26 19:06:00 +02:00