Commit Graph

171 Commits

Author SHA1 Message Date
4e31977bcd WaE: unused parameter
Change-Id: Ie3e6e2f0a498f0871e8b757cd7ab73fa4eba0060
2014-08-22 23:43:27 +02:00
46ac7d60dd font lookup - cleanup GetEnglishSearchName function signature.
Change-Id: I6e3ca358d88e0285fe6e07b0617f3078a5edb857
2014-08-22 16:22:13 +01:00
5660bc11b0 vcl: convert a couple of macros to static functions
Change-Id: I037dd97049aecff023f0ffb8dfdbb772dbde7ae0
Reviewed-on: https://gerrit.libreoffice.org/11069
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-08-22 08:17:07 -05:00
a69f8ea61c vcl: convert push flags to type-safe enum-like class
Change-Id: Ib49a0dd5ecee0225f51bea2ff1c0ab5326595a47
2014-08-21 09:17:32 +02:00
794d5ac4ac vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make
working with them reasonably type safe.

Move the definitions to outdevstate.hxx, since we need the values there,
and that appears to be the "root most" header file.

Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing
as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write
weird code thinking that it's a real flag.

Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343
Reviewed-on: https://gerrit.libreoffice.org/10676
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-20 09:01:26 -05:00
47f3485579 Revert "Resolves: fdo#82550 MacOSX GetTextBreak always return -1"
This reverts commit 4c1e2c446865b355f50720b8b96ec704822006dc.
it was just hiding the underlying bug.
2014-08-14 22:43:26 +02:00
d8584f62e2 fdo#82550 LogicWidthToDeviceCoordinate missed handling of mbMap == false
Change-Id: I98902ed266ae7b2737fa9720d69a4b87cc958d51
2014-08-14 22:42:16 +02:00
4c1e2c4468 Resolves: fdo#82550 MacOSX GetTextBreak always return -1
so multiline text ends up splitting over a huge number of
lines leading to massively tall dialogs when they contain
text which is supposed to line break

regression from 6ca2d0d6645a697d323593a401ea8b1da02445bf

Change-Id: I51cecd9164112af3208bffced63aed7e261ea9e2
2014-08-14 14:46:35 +01:00
ff209b1446 Avoid needless truncation to int
Change-Id: Ibb9088e73e3e48952ce7f2f4ec42392f7633e8a7
2014-07-30 16:21:55 +02:00
c61d0c6071 function abs given an argument of type long but has parameter of type int
Change-Id: Ibc64a17dc4a779e05946dfe5d1d12109e643a7fd
2014-07-29 10:25:18 +02:00
4cc1ed9ae9 coverity#707564 Uninitialized scalar variable
and

coverity#707566 Uninitialized scalar variable
coverity#707568 Uninitialized scalar variable
coverity#707576 Uninitialized scalar variable
coverity#1028320 Uninitialized scalar variable

Change-Id: I7191d019c1d7c4382253272fe7d58d82a4b41e13
2014-07-26 21:25:16 +01:00
6ca2d0d664 vcl use DeviceCoordinate got GetNextGlyphs
Change-Id: I0b03973b2d09a0ce51a6ee7dcca5a310a544c3a9
2014-07-20 22:11:00 +02:00
cd3d26b7ed vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.

Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20 22:10:59 +02:00
8e21a02520 vcl: add floating equivalent for MapRes
Change-Id: I165e403d2834d341f7da7a280859afccb995a3bb
2014-07-20 22:10:59 +02:00
2b8528a274 Use DeviceCorrdinate for DXArray in FillDXArray and ImplLayoutArgs
Change-Id: Ifba7104a13cf737200c81d1a1bd5ece9a29da60e
2014-07-20 22:10:58 +02:00
7a8fcfca98 fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass
the current implementation of CoreText simply dropped the proper
implementation of DrawTextArray, by ignoring DXArray
this very visibly borked the show-non-displayable character
feature of writer.. the bullet representing the 'spaces'
was quite misplaced.
This solve specifically this problem.
More work is needed to bring proper support of DXArray back to CoreText


Conflicts:
	vcl/inc/sallayout.hxx
	vcl/source/outdev/text.cxx

Change-Id: Idb2cc90d5ffaa8b83f79241cee2d512112d1c3be
2014-07-15 21:45:11 +02:00
bdab2dc21c avoid memory leak
Change-Id: I89e458dbd01a45761948b64cb457424383ca5f51
2014-07-14 18:51:00 +02:00
ee36fc7add fdo#80498: vcl: Revert "fdo#74124: Scale the pictures before calling ...
... ImplDrawAlpha()."

This reverts commit 3cf3700b7a903e88f5296076c40ae854bce91cdc.

It may look nicer but is unusably slow when scrolling in Writer.

Conflicts:
	vcl/source/gdi/outdev2.cxx

Change-Id: I582f3f02a2f8915c244b04b2fe95b6af926396b9
2014-07-10 18:06:59 +02:00
cfca22cf7f vcl/source/outdev/outdev.cxx: drop unused svsys.h header
Change-Id: I21308351e86372ce938480a8514415756f9bf549
Reviewed-on: https://gerrit.libreoffice.org/10165
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-10 15:04:32 +00:00
07dcd679ff coverity#1225002 Uninitialized scalar field
Change-Id: Iec71c9b509b785a6fe043c62e103cb4a930fd416
2014-07-10 13:39:14 +01:00
d51f53fedb fdo#80014: vcl: fix drawing of linear gradients
There is an off-by-one error in OutputDevice::ImplDrawLinearGradient()
that causes the bottom line to remain black.

(regression from 04d937c1ec36c2d9fa8c90604c81a37d30e97da6)

Change-Id: I33948ec8065e446a9ec7efeab5e506c93fa2e9e8
2014-07-01 18:01:06 +02:00
59a2e1b9fa Cleanup: removed comments and debugging output
Change-Id: I41f13d33da641153784725344f5bd526ca69542b
2014-06-30 22:54:44 +02:00
ae915ba34f More debugging; fixed Font::IsTransparent
Change-Id: Idcb54408dd3cf6561b78eb28fdb409d2e31df541
(cherry picked from commit d84dba8b01c1f240f22b774c951ebf206d5a3ac9)
2014-06-30 22:54:42 +02:00
2f54ab7089 Minor changes.
Change-Id: I3b8c51690eb14601435653e9a2255a5c6ed4fd7e
(cherry picked from commit 0b8fe9834b398db7550f30718b3cb63860c6165d)
2014-06-30 22:54:40 +02:00
f7f4059805 Debugging output in OutputDevice::SetTextFillColor
Change-Id: I78a75a94e4012eded1a4a5b4c36d8b399a4dda6c
(cherry picked from commit 1441ae75b005b4ff1ae2683755a12c5813a3a6b3)
2014-06-30 22:54:40 +02:00
a74e588518 Setting SetTextFillColor from Attrs. Experiment with line color
Change-Id: If34f000d6c5ef6ec38f7f735ada194b8fff4f56d
(cherry picked from commit 7fb0e8c9a659417607c85f9b0e8245e4af4552dc)
2014-06-30 22:54:39 +02:00
7b59e44925 Cleaned up code from tranparency in vcl. Trying setfillcolor from edit attrs
Change-Id: I263012332e43573f260ac8c54612576eb21a11a1
(cherry picked from commit 02385eb4d8de3c5a57511d8bae3c42a523470838)
2014-06-30 22:54:39 +02:00
be34ea6f62 Cleaned up code from operations in vcl
Change-Id: Ica5194f0cf6e30ec099974ae8b794fb2bc5e654a
(cherry picked from commit 4445f361aa2730b61fdd339dcdd7014b266e5c42)
2014-06-30 22:54:38 +02:00
dbff42a078 SetTextFillColor immediately before DrawTransparent. DrawTextRect commented
Change-Id: Id283624484dfcda91546fd4965bc0b6b92614f55
(cherry picked from commit ebc7be61df384120f1d0420d3e4dc5e3ac5599f4)
2014-06-30 22:54:38 +02:00
44f6d7a2c5 Transparency with DrawTransparent in addition to DrawRect
Change-Id: I9e8221652b74a3004857ef4b12c6b45563a373b5
(cherry picked from commit 2f8660008ddd32c8f24825d5ba3e751bc65d6d3e)
2014-06-30 22:54:38 +02:00
6b490f6be9 Transparency by replacing DrawRect
Change-Id: I5ba220df841cbe650c910c1c7bc1815900f13c53
(cherry picked from commit 6ec2a1a6922d22fa5efb25982b0b51cef7a97499)
2014-06-30 22:54:38 +02:00
f850bbb4cb Changed SetFillColor to SetTextFillColor
Change-Id: I3c19ac80318733ccae1e8829e3269ec8c716869e
(cherry picked from commit 33384f3d23958b62e1ec9f72f2a0e6424313a177)
2014-06-30 22:54:38 +02:00
23cd36d876 Fixed color problem
Change-Id: I7e9340ebab26d3c979571155a3e9d051c41c58f4
(cherry picked from commit aa7d40399758c7f2270dfb0b71f4bcc39d0e24ea)
2014-06-30 22:54:37 +02:00
be085bf523 Moved Text Filling Color in OutDev. Text Filling occurs in ImplDrawText
Change-Id: I9c75066a8dea32721757d0511a2af58c68408438
(cherry picked from commit b09cf493611f2521e66159287b88acc3c05d6d33)
2014-06-30 22:54:37 +02:00
039599e9d5 Put text filling in SvxFont
Change-Id: I290fff0cb66fc07122b976d977dff24ac491e108
(cherry picked from commit ea56441757a34082b9ffc5f28936413fcb55e31a)
2014-06-30 22:54:37 +02:00
d097bc8e15 HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7
(cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)
2014-06-30 22:54:37 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
17b1cf0a03 loplugin:staticcall
Change-Id: I16195f2278ae67f17db55e02bb38fe3c5cd063be
2014-06-13 17:54:36 +02:00
f634cda2a2 avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-06-04 07:49:15 +02:00
507efabe8b Resolves: #i124922# allow late setting of the font color...
for CoreText-layouted text

(cherry picked from commit 42f9768f771457c53a9f1e6a3581b2df9856401f)

Conflicts:
	vcl/aqua/source/gdi/ctfonts.cxx
	vcl/aqua/source/gdi/ctfonts.hxx
	vcl/aqua/source/gdi/ctlayout.cxx
	vcl/source/gdi/outdev3.cxx

Change-Id: Ie2685ab80ca87ea72e25f18d02f883fb36c24a36
2014-05-29 16:13:51 +01:00
16a6207901 Oops, this reference can't be const.
It's used in ImplFontCache::GetGlyphFallbackFont.

This is fix for commit a6b00d16eb27a5e7e31c721671001a909ecef960,
which caused huge performance regression for document in fdo#59882,
fortunately immediately detected by loperf.

Change-Id: I475742b5249f106d34c4f6c43b1e39e9bb7b897a
2014-05-28 15:25:52 +02:00
a6b00d16eb Related bnc#822625: Cache FontEntry with the original FontSelectPattern.
Otherwise we never hit cache directly, only after expensive call to
ImplFindByFont.

Change-Id: If15b368feeba94c8fff8ee7cbe049fc4a2069768
2014-05-27 19:38:23 +02:00
224fd0a946 Bin code that died in 2010 in d4dbc31173487a97e4b022f0bb9dae25440856a8
Change-Id: I5b88b7c66c1c3a3c68e6a837d10e7477cb7ae8fe
2014-05-21 13:36:30 +03:00
c1dbed8ac6 Use more specific tag
Change-Id: Ife10cae3f0bd7dd294c74799412528f2596369c8
2014-05-21 13:26:15 +03:00
566e47a19d Add a SAL_INFO
Change-Id: I3eb6a1f7dab30346a68050f37d31c082336ab7b6
2014-05-21 13:26:14 +03:00
8d54796bf1 enhance pass-by-ref plugin to detect large arguments
Detect arguments larger than 64 chars passed by value.

Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-20 11:17:22 +02:00
e77bb87b41 vcl: rename CopyAreaFinal to CopyDeviceArea
The name I gave this makes no sense. Basically, this function calls on
the SalGraphics function to copy the area, so really this name is much
more clear.

Change-Id: I842e6f2b81014a8222c39a62c5437bd53d66141c
2014-05-20 00:45:49 +10:00
07e7e54596 coverity#1209003: Unchecked return value
Just silence coverity, the code is OK.

Change-Id: I0968800d67ab53cbbc942fa495d08adc4e94de0d
2014-05-12 06:51:13 +02:00
11eb3330ea fdo#78567: Revert "coverity#1209003: Unchecked return value"
This reverts commit 24ec38a96fa33b75435786caaca04f9cef86c289.

The commit has unfortunately caused a regression, reverting it.

Change-Id: If3098d4fce05b3bf95e3ffe021ff4f35e1cc42fc
2014-05-12 06:51:12 +02:00
60eff2f442 Revert font initialization foo
this reverts 081a0854635f4bc9f6f743ef4e2675c208405f74

because the heights and widths of the non .ui-converted dialogs are all too low
and everything is squished in them

Change-Id: I103eda4b3d43365c02ecedb6f37b995a682b2cf9
2014-05-09 13:47:57 +01:00