Commit Graph

14576 Commits

Author SHA1 Message Date
92ffe57f6b Don’t shrink text from fallback fonts
This code is bogus in multiple ways:
* It scales text based on ascent or descent, but this makes no sense
  as those control line height and nothing else, if one is to scale two
  different fonts to “fit” together, cap or x height would be more
  appropriate. This results in some text being ridiculously shrunk.
* Not only that, but it is comparing apples to oranges; original font
  ascent/descent with the bounding box of the fallback glyphs, which
  results in different scale ratios depending on the shape of the glyphs
  at hand, which leads to all sorts of funny and irregular text.
* Even worse, the PDF export is completely broken in this case; it uses
  the scaled down glyph widths but the unscaled font size, resulting in
  cramped unreadable text.

Change-Id: Iaa6117ecfdad8388887d9a03b538e7327544ad5e
Reviewed-on: https://gerrit.libreoffice.org/4293
Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-01 12:23:04 +00:00
ba8bcc2681 Resolves: #i119994# Range picker dialog is changed to modal mode wrongly
Patch by: Peng YunQuan
Review by: mayongl
Reported by: Yan Ji

(cherry picked from commit 94c8978a16536738bbad7a52cdfb9f37a4d19ed0)

Change-Id: I66bb91bf07a5c52b2a5e2b2a91187ac9580fbb0a
2013-07-01 12:34:38 +01:00
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
fea12c4710 using primary font for secondary max text width
Change-Id: If4d5d4be2a5552c52e7e98ff891e2166b7541800
2013-06-30 20:40:15 +01:00
0306e253fe XubString->OUString
Change-Id: I40ff06facc304630ccedd82d2f20b3573bdc5cb4
2013-06-30 20:40:15 +01:00
de2cdeabfe Handle synthetic italic with Core Text
Core Text does not fake missing italic and bold (unlike ATSUI), so we
have to do it on our own. This commit handles fake italic, bold is a bit
harder.

Change-Id: I4e705669638f67e3c8ec414f2cadd0c6daea9bcb
2013-06-30 15:07:57 +02:00
3ed5b347c5 Fix debug code
Change-Id: If8cd564b03712a8835788386afd83cc97ce04a98
2013-06-30 15:07:57 +02:00
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
5e0813fc8e fdo#66385: bad line spacing under Core Text
We should be setting mnExtLeading not mnIntLeading, at least this is
what ATSUI code was doing.

Change-Id: Ibe69da4ea60630a31593b538f55fd2cd95642bf9
2013-06-30 02:38:11 +02:00
9bd0a97601 fdo#66288: fix RegionBand (de)serialization
Commit e717d1dcce7f8906311c5ccdbb2326b61a702630 interacts badly with
commit 7b2a0e541567be9750dfc7d98374555967da3470:
the newly added "long" variables serialized to SvStream with
operator>>/<< now read/write 8 bytes.

Using "long" for binary serialized integers is an idiotic idea in the
first place.

Change-Id: I9432c1bb2c339e797c064371f2cbdcfec2200994
2013-06-30 00:34:33 +02:00
36e42c0bc0 fdo#66288: fix MetaAction::Read()
This is "collateral damage" from the actual bug, and is broken since CVS
initial import (which likely means that in practice no bare MetaActions
exist), but the MetaAction::Read() must not read the type from the
stream since MetaAction::ReadMetaAction() has already done that!

Change-Id: I9ab06ec3112c1eefb86ab70ddfa2f588af257b88
2013-06-30 00:34:32 +02:00
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
9911631895 SVGWriter can now be initialized properly. Removing some strange code peaces.
Change-Id: Ia3011d002c4028008b207505352384f6bb72ce10
Reviewed-on: https://gerrit.libreoffice.org/4619
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-06-29 20:02:45 +00:00
318f2b64cc remove some createFromAscii usage
there are a lot more of them:

git grep 'createFromAscii[^)]*"'

Change-Id: Ibc2e9cae208d8b9c91667bb3b177c6bd6d3a9424
2013-06-29 16:23:23 +02:00
231fb4182f make HitTestNativeControl const
Change-Id: I1d3f09cce87fadd8bdc18b2775ebe2a6968d99c1
2013-06-29 18:06:15 +04:00
7d1e257a6b make IsNativeControlSupported const
Change-Id: I4346b2df94fc8767fce734362901b6248bb6342d
2013-06-29 18:06:15 +04:00
1a8addc137 GetNativeControlRegion is const
Change-Id: I0b34001e99036f197a50ff24b854e5a07eac6f06
2013-06-29 18:06:15 +04:00
c08a20b648 reduce indentation level
Change-Id: I4411ffaa3c8bc73891fc854894cca9d5ab1a1dc5
2013-06-29 18:06:15 +04:00
0230e6677d Fix jitter when editing RTL text
When drawing right aligned text, rounding errors in the position
returned by GetDrawPosition() cause the right margin of the text to
change whenever text width changes causing "jumping letters" effect. So
here we calculate the drawing position relative to the right margin on
our own to avoid the rounding errors. That is basically a hack, and it
should go away if one day we managed to get rid of those rounding
errors.

Continue using GetDrawPosition() for non-right aligned text, to minimize
any unforeseen side effects.

Change-Id: Ia095a17a41f723f5fb7afc99df4250262e9a0051
2013-06-29 14:50:34 +02:00
a08f579e37 fdo#63254: correct re-mirroring formula
This patch fixes horizontal scrollbar in Calc when a sheet is RTL and UI is LTR.

When a particular window (horizontal scrollbar in this case) is RTL and a whole
UI is LTR this code used for mirroring and re-mirroring back coordinates. AFAICS
mirroring is correct, but re-mirroring is not.

The used formula comes from commit 69b684b12e42bf1396bdffca88ca880ac3c2e00b, and
the same formula appears in the other variant of overloaded function "mirror":
 mirror(sal_uInt32, const SalPoint*, SalPoint*, const OutputDevice*, bool),
but it does not affect the bug.

Change-Id: Iec9c53edce9d33be6b676d1094bed8bf92f2e435
2013-06-28 22:35:48 +04:00
e3a801e245 fdo#44582: fix scrollbars in RTL UI
Change-Id: I518e9bcf673ffd1f17ecb51c2c4f962a2f722446
2013-06-28 22:35:48 +04:00
48e1d9c7af fdo#66335: gtk: Revert hacks for RTL scrollbars
returning false here in getNativeControlRegion results in a fallback to
square buttons in vcl scrollbar code. But there is no problem in gtk+ backend
in this case, let's fix the problem differently.

This reverts commits 898a3e84807bccbb876e3f5583728f6d24e05e9a and
e8e82bd2109b82ddd535cdac30303249c6b62942.

Change-Id: I66fcdd1f27d471321852445e5881cee03baef7b1
2013-06-28 22:35:47 +04:00
6491e0ed5b Mark as const
Change-Id: Ia390987749be2d1d642d4add11efcc892a81722a
2013-06-29 01:43:57 +09:00
31fc0b7442 always call setDeferredProperties for dialog get/set title
Change-Id: I57f9cc8fbdb9d2a304c346e03893fa55d6a61bd5
2013-06-28 11:50:15 +01:00
344d80ee1d coverity#1028110 Dereference before null check
Change-Id: Ie5fb6a0ecad185c1849f55111c17692c280d9454
Reviewed-on: https://gerrit.libreoffice.org/4531
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:11:49 +00:00
776de8a239 coverity#1027396 : Logically dead code
Change-Id: Ia1d0358b95e036f3866487db12cb42e0e81d76cf
Reviewed-on: https://gerrit.libreoffice.org/4532
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 09:10:37 +00:00
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
949f97ba48 Resolves: #i121162# ImageScaleMode constants should be in UPPERCASE
(cherry picked from commit 734b532fb77d2d5be7eb7becb6720dbd7b3d8978)

Conflicts:
	offapi/com/sun/star/awt/ImageScaleMode.idl
	oox/source/ole/axcontrol.cxx
	reportdesign/source/filter/xml/xmlHelper.cxx
	wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java

Change-Id: Ib5fa7b82edddb809129a4e5619a20ca7a7b2e38a
2013-06-27 16:58:09 +01:00
067a0b32c4 valgrind: mismatched new[]/delete
Change-Id: I9895ca15680c01da17a59cb7da51478d5f61657e
2013-06-27 11:21:57 +01:00
fcae9bf3b1 fdo#31525 Dialogues now have an appropriate background in OSX
The proper background is now set using HIThemeBackground.

Change-Id: I71e4287273f7345a18eee4c4fc494eea10f2deb2
Reviewed-on: https://gerrit.libreoffice.org/4287
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-06-26 09:51:26 +00:00
96329b45a8 There is already the AddTempDevFont() in coretext
Change-Id: I384e9d499eedbe87030417952bf057b16cf549d2
2013-06-26 10:46:49 +03:00
b2d9ebf1b9 add safety check for '_' if had been put in the end of the text
Change-Id: I7fae615f644158c9e5137330daa4873ad4192fd5
2013-06-25 12:55:25 +02:00
692fa32997 Fix local var non initialized
Change-Id: I096742a1849d7fc8310aac8addd18b15cc40fea3
2013-06-25 07:30:57 +02:00
3d4603e641 fix typo in higher debug level code
Change-Id: I2e30bc94c78dcc4cfb26d5fbde4441fa9f9513f6
2013-06-24 20:11:12 +01:00
7ec6baba68 Resolves: fdo#66042 get the bounds of the current grapheme
Change-Id: I5b1808d74f0a1dd0d8b6ea22136e574c0a6e8e2a
2013-06-24 16:20:51 +01:00
b139f6fedf Remove leftover debugging printf
Besides, it caused a WaE: format '%d' expects argument of type 'int', but
argument 3 has type 'sal_Int32 {aka long int}'

Change-Id: Ib0360816e7d0a4829aff4267aa922269950d520c
2013-06-24 18:04:14 +03:00
9495e91279 Resolves: fdo#66105 set max growth width for labels/edits which take paths
Change-Id: I12220821f76550baacdc8ce604f2e612d260c1a1
2013-06-24 14:40:40 +01:00
cf003b228e Robustify GraphicDescriptor::ImpDetect* reading SvStream.
The >>operator of SvStream doesn't initialize a variable if the stream
is faulty. So initialize the variables before usage to prevent accidental
matches. Also explicitly check stream status in while loop to prevent
looping on eof or error.

Change-Id: I21c0acc1c9217b4523c593cbcef5718f4cdc7597
Reviewed-on: https://gerrit.libreoffice.org/4469
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-06-24 12:15:05 +00:00
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
0e7237e762 fix missing content of header tabs with gtk vclplug
regression since e717d1dcce7f8906311c5ccdbb2326b61a702630

Change-Id: I72e6e2f3ef093f272765036ebfc60b3f56a8fc34
2013-06-23 08:35:36 +01:00
beb198b8c0 fdo#50506, incomplete indent markers in Mac rulers
AquaSalGraphics::drawPolygon() should close the path like other polygon
drawing functions. It have been like that for 5 years since
3ca40fb8a2e8c805517b351ebd97c1385cfc92a3, no idea how it was never
noticed.

Change-Id: Ifba740afa66ad485943c7873d78e007b778cd7b3
Reviewed-on: https://gerrit.libreoffice.org/4448
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-23 04:08:25 +00:00
d88b434e10 Export-Import GraphicFilter Test
Change-Id: Ic24543ea62bf1ab922ff49fb0f2c82feb1782e83
2013-06-22 13:55:21 +02:00
4449a227c8 fdo#65934 and fdo#64189 External export graphic filter name fix
Change-Id: I798fac589abeac61115210cd4805e6b53a8767c6
2013-06-22 13:55:21 +02:00
d6fd801c62 Fix indentation
Change-Id: Iece106040fb7c0962d7f918151bff8c4488704a3
2013-06-22 11:25:19 +02:00
4e6b13fb23 Fix indentation
Change-Id: I8e1621a160ea78b18a5b366f61938fa4dadd72e4
2013-06-22 11:23:53 +02:00
9fdd5db03b Attempt to fix Core Text full justification
Apparently we need to subtract the trailing white space from the desired
line length or text will sometimes protrude to the margin.

Change-Id: Iee5ef40670c2fefc189afa319387b180c4ed648d
2013-06-21 19:34:20 +02:00
bfbdb2d4f4 sidebar: Improve runtime error reporting (mostly missing .ui).
Change-Id: If7e0f24eab77028ddbfdb17dff82679b214efc74
2013-06-21 16:46:48 +02:00
d67c5b58f6 coverity#707562 : Unitialized scalar variable
Change-Id: I3e3bebb25c5d2509de7017ece49d927f1d59c592
Reviewed-on: https://gerrit.libreoffice.org/4403
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-06-21 13:40:35 +00:00
f47b777a0b sal_Bool to bool
Change-Id: I0673e9ec1d3e69a338313c568c462ab1e820d2b0
2013-06-21 21:42:40 +09:00
0a5c151b62 Resolves: fdo#65635 don't include border gap in height for borderless edits
Change-Id: If778fdeb5bdbd5a5cac33f57ef8d598ddc1408f2
2013-06-21 13:22:16 +01:00