401 Commits

Author SHA1 Message Date
Michael Stahl
90dadcc9a0 vcl: fix obviously wrong mapping of WIDTH_ULTRA_EXPANDED
Change-Id: I2f23f51e7f04df6fcbc1e2d6661949b830cc248e
2013-07-30 16:32:47 +02:00
Stephan Bergmann
dd547e4a8c Fix headless mode glyph cache memory handling
...the original code was riddled with errors.  It leaked memory, which if it
didn't it would have deleted multiple times.

Change-Id: Ic70b425fac02ef894e35b3dc15039d217f8870f5
2013-07-12 18:51:26 +02:00
Caolán McNamara
bfc0605970 Related: fdo#66524 don't invalidate font cache every time
The afm dirs are misdetected as having had something in it in the past and
having nothing in it now.

AFAICS it seems that this particular code has always been like this, so keeping
this fix separate for master only.

Change-Id: I8960d0b0d22ee24d5691eecdce262011dc141ea6
2013-07-11 20:04:56 +01:00
Caolán McNamara
019a8f3f74 Resolves: fdo#66524 string conversion gone wrong
Change-Id: Ie885514cdfaecc14ac57bb53a2da7c51274d54b0
2013-07-11 20:04:56 +01:00
Stephan Bergmann
9e31cf2ae6 -Werror,-Wdeprecated-register (Clang trunk towards 3.4)
...in files generated by gperf; an alternative could be to use -isystem instead
of -I in gb_Library_use_custom_headers.

Change-Id: I316684ab5342977655a5642903b13e127adaf95c
2013-07-08 17:32:25 +02:00
Khaled Hosny
e703b429cf Minor
Change-Id: I6a9f34e6da1344e718ef5c8dc136fac7244b0f47
2013-07-04 01:23:38 +02:00
Mark Wielaard
9ab800829b Fix memory leak in ServerFont::GetGlyphOutline.
Always call FT_Done_Glyph before returning.

Change-Id: I861bcc66b065d9cfb909b3ea561af97caccc4593
Reviewed-on: https://gerrit.libreoffice.org/4635
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2013-06-30 20:23:56 +00:00
Khaled Hosny
feaebe7f93 Always embed 14 standard Postscript fonts in PDF
Ealier version of PDF standard allowed for not embedding the so called
standard PostScript fonts in the PDF files and all PDF readers had to
include them or a "suitable substitute". This behaviour had many issues
and is deprecated for 10 years now. The current version of PDF spec
says:

  Beginning with PDF 1.5, the special treatment given to the standard 14
  fonts is deprecated. Conforming writers should represent all fonts
  using a complete font descriptor. For backwards capability, conforming
  readers shall still provide the special treatment identified for the
  standard 14 fonts.

This commits removes support for not embedding these fonts, and the, now
redundant, option to embed them.

This has the side effect of elimanating the cause of fdo#66108 and
fdo#41547.

Change-Id: I4f1fc4137a2de7baeef9e504f2e4f84fbec0a491
Reviewed-on: https://gerrit.libreoffice.org/4495
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-06-27 19:03:31 +00:00
Caolán McNamara
7ec6baba68 Resolves: fdo#66042 get the bounds of the current grapheme
Change-Id: I5b1808d74f0a1dd0d8b6ea22136e574c0a6e8e2a
2013-06-24 16:20:51 +01:00
Jelle van der Waa
34f50399f1 fdo#43460 shell,vcl,xmlreader: use isEmpty()
Change-Id: Ie3d16da6c246b79c4c304b21476f84b2788f0d6e
Reviewed-on: https://gerrit.libreoffice.org/4444
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-24 09:00:20 +00:00
Stephan Bergmann
e7b87d69be -Werror,-Wdeprecated-register
Change-Id: I8edac5a93f9471c6f245bd484e845985c11027dd
2013-06-20 17:32:51 +02:00
Khaled Hosny
22d23d52b0 Fix calculation of internal leading
Stupid me, I totally messed this up! God only knows how many non-bugs
people had to fix because of this typo.

Has the side effect of fixing fdo#64972 (among many others of course,
but this is the only one still open).

Change-Id: I9d8fdb6d37d4af9b0ac973902e469e0bd3a2408a
2013-06-20 01:34:02 +02:00
Takeshi Abe
3c517e8a6c sal_Bool to bool
Change-Id: Id1c64ab4be262713204cfeeb6333ec7d33fffcfb
2013-06-18 11:27:35 +09:00
Khaled Hosny
b6ecac9fb9 Bye Bye ICU Layout Engine
Change-Id: I0f887ba378f9dac45a3736e4d1789585651148d1
2013-06-16 22:17:00 +02:00
Jelle van der Waa
040710161c fdo#43460 use isEmpty()
Change-Id: Ie33025fbd10f47efd6b97304b76b21166d4ee70e
Reviewed-on: https://gerrit.libreoffice.org/4307
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-06-16 15:56:43 +00:00
Armin Le Grand
9bb96049ad Resolves: #i121534# Reintegrating changes for rotated bitmap support
(cherry picked from commit b2cc0de3fc9adee90787ca760e86869f9255b380)

Conflicts:
	canvas/source/vcl/spritecanvashelper.cxx
	drawinglayer/Library_drawinglayer.mk
	drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
	drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
	drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
	drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
	drawinglayer/source/processor2d/vclprocessor2d.cxx
	officecfg/registry/schema/org/openoffice/Office/Draw.xcs
	svx/source/svdraw/svdograf.cxx
	vcl/aqua/source/gdi/salgdi.cxx
	vcl/inc/aqua/salgdi.h
	vcl/inc/os2/salgdi.h
	vcl/inc/salgdi.hxx
	vcl/inc/unx/pspgraphics.h
	vcl/inc/vcl/bitmapex.hxx
	vcl/inc/vcl/outdev.hxx
	vcl/inc/vcl/salbtype.hxx
	vcl/os2/source/gdi/salgdi2.cxx
	vcl/source/gdi/bitmapex.cxx
	vcl/source/gdi/outdev2.cxx
	vcl/source/gdi/salgdilayout.cxx
	vcl/source/gdi/salmisc.cxx
	vcl/unx/generic/gdi/pspgraphics.cxx
	vcl/unx/generic/gdi/salgdi2.cxx
	vcl/unx/headless/svpgdi.cxx
	vcl/unx/headless/svpgdi.hxx
	vcl/unx/headless/svppspgraphics.cxx
	vcl/unx/headless/svppspgraphics.hxx
	vcl/win/source/gdi/salbmp.cxx
	vcl/win/source/gdi/salgdi.cxx
	vcl/win/source/gdi/salgdi3.cxx
	vcl/win/source/gdi/salgdi_gdiplus.cxx
	vcl/win/source/gdi/winlayout.cxx

Change-Id: I871d1d107b019758f3913e5eb63bc9bc0ba403fd

Do not name unused arguments to prevent compiler warnings.

(cherry picked from commit f3118889a0cd941f193e9b6557c0792015d77a34)

Change-Id: I482d1f96d695c7bf9912ec464bb39e7fdd14adef

Related: #i121534# fix graphite-enabled windows build

(cherry picked from commit c90a6ca92b1239d01a2892e15488e4a183a88b1a)

Conflicts:
	vcl/win/source/gdi/winlayout.cxx

Change-Id: I95fd41ad6f7187f34ba9474674a471fb4fc65314
2013-06-14 16:00:13 +01:00
Julien Nabet
f52a86b459 cppcheck: fix several Prefer prefix ++/-- operators
Change-Id: Ie8ce0ebb9ec979575657a89ebbfe4d01142b04e5
2013-06-13 22:11:36 +02:00
Stephan Bergmann
3af0114a29 Introduce O[U]String::toUInt32
...which has become necessary since bd60d41176da540b01d7583cfe00637431967f39
"Handle oveflow in O(U)String::toInt() functions" reduces values in the range
(SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied
on getting a correct (unsigned) value for the whole input range ["0" ..
"FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3
"Revert overflow checks in O[U]String::toInt{32,64} again").

Audited all uses of toInt32/64 with non-decimal radix.  (There is still a TODO
comment in oox/source/helper/attributelist.cxx, and
stoc/source/typeconv/convert.cxx will still need some love and test code.)

Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95
2013-06-13 17:08:36 +02:00
Armin Le Grand
e717d1dcce Resolves: #i121237# Rework/Cleanup of Region code...
due to missing complete support for B2DPolygon class

(cherry picked from commit cab10eeb7878edf224a004fd7640bd4adf8d3c51)

Conflicts:
	cppcanvas/source/mtfrenderer/implrenderer.cxx
	svx/source/sdr/overlay/overlaymanagerbuffered.cxx
	svx/source/svdraw/svdpntv.cxx
	vcl/aqua/source/gdi/salgdi.cxx
	vcl/inc/region.h
	vcl/inc/unx/gtk/gtkgdi.hxx
	vcl/inc/vcl/regband.hxx
	vcl/inc/vcl/region.hxx
	vcl/os2/source/gdi/salgdi.cxx
	vcl/source/gdi/bmpacc3.cxx
	vcl/source/gdi/outdev2.cxx
	vcl/source/gdi/outmap.cxx
	vcl/source/gdi/regband.cxx
	vcl/source/gdi/region.cxx
	vcl/source/window/window.cxx
	vcl/unx/generic/gdi/pspgraphics.cxx
	vcl/unx/headless/svpgdi.cxx
	vcl/unx/headless/svppspgraphics.cxx
	vcl/win/source/gdi/salgdi.cxx

Change-Id: Iee9a66ff431c3cecb7603e445147b67715de0f7d

Remove unused variable to prevent compiler warning

(cherry picked from commit 0ac65ccf079e3e22ac23cbe7ae546504c863c31f)

Change-Id: Icbcaa9d576a7e560d96debc7360bdbe9090b3fd3

Wrong comparison with bool corrected

(cherry picked from commit 612cefdcf6176b6bb847ce899d89af40ef313a90)

Change-Id: I1cf5de6734b588f78d8e870ba7b7860634b461ce
2013-06-12 14:31:10 +01:00
Caolán McNamara
2e5800269d dump more info when encountering an odd language for a script
Change-Id: Icd8eaae44f81c7c6eb8a73a4e567a24b46f97870
2013-06-07 10:42:47 +01:00
Luboš Luňák
bd40bfd897 fix WM_CLASS
VCLSalFrame is definitely not the name of any instance of LibreOffice.

Change-Id: Iba227061c0c0541290c90876c94d1016aa1e783e
2013-06-06 18:35:22 +02:00
Caolán McNamara
0e89a49f67 Related: rhbz#968892 discard impossible languages for oriya script fallback
Change-Id: I2fa1a127fbd2f905a89f0c30898ad56099fa8df1
2013-06-05 16:04:05 +01:00
Caolán McNamara
b5bd2d1d8d Related: rhbz#968892 discard impossible languages for glyph fallback
Change-Id: I14f1bab09eb0be9c2c896a1dde45913b99aab6df
2013-06-04 17:13:54 +01:00
Caolán McNamara
3b4d361c21 Resolves: rhbz#968892 force render full grapheme with fallback font
Change-Id: I5bb98c61d047e69d74666261b2c489d80f344502
2013-06-04 16:14:42 +01:00
Thomas Arnhold
8079f40743 Make use of IsStarSymbol()
Change-Id: I7a2e3a6f11bbaaaff50e8163e4ce3e2583b1d03c
Reviewed-on: https://gerrit.libreoffice.org/4077
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-05-30 15:54:47 +00:00
Thomas Arnhold
a0f85534a7 be case-insensitive for open/starsymbol comparison
Change-Id: I7a342c809a723f5f9c03271c6145d9c367cea6de
Reviewed-on: https://gerrit.libreoffice.org/4015
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-05-27 15:42:33 +00:00
Khaled Hosny
753f572197 Fix fdo#64972 - strikethrough displays too high
I was calculating the leading before setting the ascent and descent,
oops.

Change-Id: Ic58ecb1a65cb33715ea06f5e3214c4acbcff1e40
2013-05-25 13:25:19 +02:00
Khaled Hosny
4f3d63efb5 A hack to fix mark placement in old fonts
We need a way to recognize non spacing marks in fonts lacking GDEF table
(like old Arabic fonts), so I just check for zero advance width and hope
nothing elsewhere will break...

Change-Id: I6fa848e97ba24d71fc9a381ae439e0fb98e50419
2013-05-25 12:10:25 +02:00
Khaled Hosny
736adbb468 Fix left to right full justification
I was overloading ApplyDXArray() with a HarfBuzz specific implementation
because the GenericSalLayout one was screwing right to left kerning, but
it seems to have broken left to right full justifications. Since
mnXOffset was introduced a bit earlier to fix a similar issue, it can
now be used here as well to minimize the possible side effects.

Seems to work fine for both left to right and right to left text now,
but at least one of my Arabic tests is regressing, so might need some
tweaking.

Change-Id: I1239b0ec77a4978f981a480400a6d01cda18af79
2013-05-23 09:50:46 +02:00
Tor Lillqvist
d664f27960 Revert "fdo#62846 incorrect glyph to Unicode mappings in PDFs"
Breaks the build for Windows: vcl/win/source/gdi/winlayout.cxx(1897) :
error C2065: 'nCharPos' : undeclared identifier

This reverts commit 0b70e4ea4fcf0adccdfdf4886e5cc45d46479692.
2013-05-22 15:30:36 +03:00
Jonathan Schultz
0b70e4ea4f fdo#62846 incorrect glyph to Unicode mappings in PDFs
Change-Id: Idebc7f69f95d8f72626373475d8611ea68f1483a
2013-05-22 14:10:34 +02:00
Caolán McNamara
1704b1200d absoletely guarantee there is no mem leak
Change-Id: If6960dea479bb8970cb94aa05a3c9d44bf60cfc5
2013-05-21 14:01:16 +01:00
Mark Wielaard
d95456fc4c Fix memory leak in mapToFontConfigLangTag.
FcGetLangs() will return a new FCStrSet that needs to be freed after usage.

Change-Id: Ie7fe0dd160fa59077d6a90878e70d0e034680812
Reviewed-on: https://gerrit.libreoffice.org/3967
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-05-20 18:54:52 +00:00
Thomas Arnhold
43c234b048 fix OUString conversion
Both were CompareIgnoreCaseToAscii( "starsymbol", 10) which is
startsWithIgnoreCaseAscii.

Fixes 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10

Change-Id: I21e2eb8c578b65d5f0e4181ed64af02ec480463e
2013-05-19 18:00:44 +02:00
ricardobotto
3384f229a4 Changed compareTo to startsWith
Change-Id: Ia72e220f29c26bdf789bd3f1102b850aafcf525d
Reviewed-on: https://gerrit.libreoffice.org/3956
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-05-19 07:06:16 +00:00
Tor Lillqvist
7689697566 WaE: unused functions
Change-Id: I45ae680a89848f32e045a0d3252fe6624decbde7
2013-05-16 17:30:36 +03:00
Noel Grandin
0fd4d12c62 Remove code associated with psprint::CompatMetricOverride service
We don't actually have any implementations of this service.

This service was introduced by
   commit 01cf481111436df2cc3f01d1c57cc4348fc037ef
   Author: Kurt Zenker <kz@openoffice.org>
   Date:   Wed Jun 20 09:07:44 2007 +0000
       INTEGRATION: CWS compmetric (1.77.2); FILE MERGED
       2007/05/09 16:27:46 pl 1.77.2.2: #146890# algorithm is needed
       2007/05/09 12:13:59 pl 1.77.2.1: #146890# backwards compatibility service for metrics

Michael Stahl seems to think it was a Sun-internal hack introduced
for a specific customer.

Change-Id: I1b27778f827504c2adb0e27e8d7c0f0dedcaf940
Reviewed-on: https://gerrit.libreoffice.org/3824
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-05-16 13:42:57 +00:00
Stephan Bergmann
11fd73acce SolarMutex does not belong into the URE interface
...so move it from osl/mutex.hxx to its own comphelper/solarmutex.hxx.  It looks
like a newbie mistake that 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 "Create an
abstract interface to be used to implement a SolarMutex" put it here in the
first place.

I do not consider this an incompatible change really, as no external URE client
code should have used SolarMutex anyway.

(Also included some clean up, like removing unused
{Clearable,Resettable}SolarGuard, and spelling out SolarGuard in the few places
it is used.)

Change-Id: I121ffb5b7cefbc19e88b5405e5a85ffc895be852
2013-05-14 14:41:54 +02:00
Khaled Hosny
dd5b15ebd8 Handle fonts without hhea or OS/2 table e.g. Type1
Change-Id: Ib7245e9f8b7874087966cb1098e63d1f83acaa6a
2013-05-13 16:35:38 +02:00
Khaled Hosny
c0417e8217 Typo
Change-Id: I28ea63722f542a79aef904f9be40645baac191e4
2013-05-13 02:46:21 +02:00
Khaled Hosny
2ede6c95e6 Some logging
Change-Id: I4515d4d6760e22ce4d77fbb3cbce93e3ce097b98
2013-05-12 18:47:36 +02:00
Khaled Hosny
96137f1ef8 Drop code for FreeTyope version we don't support
Change-Id: I404ac35010c243fad65b6d83c10c75665a0568f0
2013-05-11 08:55:40 +02:00
Khaled Hosny
f9560c8f99 Cleanup FreeType ascender/descender handling a bit
Change-Id: I9734f15811020ce1a7b761688d602c7e244167c7
2013-05-11 08:55:39 +02:00
Khaled Hosny
5e77c9e17b Revert 052f181dad89ad34d90513bc9dcd3e3239727933
Which in itself was effectively a revert of
3364fefe1e2dec522211040f2f9ea37bf5cd7466

Keeping the old broken line height calculation code is just masking of
the real problem; there are some code elsewhere that have fragile
workarounds to the real bug here (the removed code here shows a good
example of such workarounds). On Mac we use the correct metrics as well,
so we need to find the quirks and fix them, instead of pretending they
do not exist.

This fixes fdo#55469, among others.

Change-Id: I36f13b28eaba022b7c388feae7e0bfd0ed1c3e89
2013-05-11 08:55:39 +02:00
Herbert Dürr
1857688e1f Resolves: #i122208# introduce rtl::CStringHash and rtl::CStringEqual
unify the various c-string compares and hashes.

(cherry picked from commit b7e3470a154538a92f0a21b14e726d75723f4a92)

Conflicts:
	oox/inc/oox/export/shapes.hxx
	oox/source/export/shapes.cxx
	sal/inc/rtl/string.hxx
	sdext/source/minimizer/pppoptimizertoken.cxx
	svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
	vcl/source/glyphs/gcach_ftyp.cxx
	writerfilter/source/resourcemodel/TagLogger.cxx
	xmloff/source/draw/EnhancedCustomShapeToken.cxx

Change-Id: Ib742744077bfb4d38a462d88b44bdef45601b4ae
2013-05-10 12:36:33 +01:00
Caolán McNamara
7b91f87ab9 no FT_Face_GetCharVariantIndex on RHEL-5, dlsym it
Change-Id: Ie94e6d0acdfbb11801bc974b9ed37133df964245
2013-05-09 19:14:23 +01:00
Michael Stahl
8db0275b26 harfbuzz: stop delivering headers
Change-Id: I6a68b2df3a5bd4076e07729b675179e52f4f0615
2013-05-08 17:49:56 +02:00
Khaled Hosny
bff8fa97e1 Enable HarfBuzz by default
HarfBuzz integration should be functional now, so to give it more wider
testing it is made now a required dependency on non-Windows non-Mac OSs.
By default text layout is now done by HarfBuzz but ICU LayoutEngine is
kept as a fallback and can be enabled with SAL_USE_ICULE env variable.

After 4.1.x is branched, ICU LayoutEngine should be removed completely.

Change-Id: I4fe3beeaf6092f33dd436906c11b83aeafdfbd5d
2013-05-06 17:22:31 +02:00
Khaled Hosny
f0393d7ff6 [harfbuzz] Fix text width calculation, 3rd try
It turns out storing the width in the layout is not so good idea,
because in some mysterious cases when font fallback is involved we call
GetTextWidth() without calling LayoutText() first, and we return the
width of the previous text run.

It seems all I needed is to pass down the X offset with the glyph item,
and take it into account when calculating the width.

Change-Id: Idbdb6bba00573fb6ca773701757d667e21ac0912
2013-05-06 17:22:30 +02:00
Khaled Hosny
64fc186bb9 Remove unused variables
Change-Id: I7881af8907c0735e4d8e8c327103c8d8488ec496
2013-05-06 17:22:29 +02:00