summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky1-4/+6
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky1-1/+1
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon1-1/+1
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-13create a macro library for implementing bit-flags typesNoel Grandin1-1/+1
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, changed from a macro- to a template-based solution. (Unfortunately MSVC 2012 does not support explicit conversion operators. Worked around that with explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a baseline that requires unconditional support for them.) Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca1-6/+4
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-09-18fdo#82577: Handle FontNoel Grandin1-16/+16
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-06sal_uInt16: use more proper types, avoid downcasts/temporariesMatteo Casalin1-26/+20
Change-Id: Ib76af3f664dc259e8596d33492bd078c9e4536bd
2014-09-06Group some more common code and reduce castsMatteo Casalin1-35/+13
Change-Id: Ib2f23f098377a07237cdba973edd8e854db05625
2014-09-06Make GetDefaultFontHeight() localMatteo Casalin1-0/+5
Change-Id: I91dad2b1f806a1b7fab823e590ff97121ad5db31
2014-08-20vcl: use enum for complex text layout constantsNoel Grandin1-1/+1
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-19Refactored SwDoc::GetEditShell .Valentin Kettner1-2/+2
Removed its output paramater as GetCurrentViewShell should be used instead and added a const version. Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
2014-08-18drop unnecessary shl.hxx includesCaolán McNamara1-1/+0
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-07-20vcl consitent use of long for corrdinateNorbert Thiebaud1-15/+15
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-15fdo#79673 quartz: draw 'bullet' for 'space' directly in one passNorbert Thiebaud1-9/+23
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-15Revert "fdo#79673 revert to old NPC for MacOSX only"Norbert Thiebaud1-25/+0
This reverts commit 3a2010c711b0ca4d762681dd0967ad08bc1e23fc. Prep to apply a full fix. Change-Id: I3b71ad79f65e48456d9fd9d257bf471faa0f3482
2014-07-15fdo#79673 revert to old NPC for MacOSX onlyTomaž Vajngerl1-0/+25
Change-Id: I83cfa2f11e76e03b919216e8dd04d1121ea6afd8
2014-07-11new loplugin: externalandnotdefinedNoel Grandin1-7/+1
Find "missing headers," where a function is declared directly in the .cxx (as extern) and not defined, and should arguably instead be declared in an include file. Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-01Related: #i124638# Second step of DrawingLayer FillAttributes...Armin Le Grand1-1/+1
for Writer objects, now added support for Paragraph and PageStyle (including Header and Footer) for direct attributes and style attributes (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b) Conflicts: cui/source/factory/dlgfact.cxx cui/source/factory/dlgfact.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cuires.hrc cui/source/tabpages/bbdlg.cxx cui/source/tabpages/bbdlg.src cui/source/tabpages/page.cxx cui/source/tabpages/tparea.cxx include/svx/pagectrl.hxx include/svx/svxdlg.hxx include/svx/svxids.hrc include/xmloff/PageMasterStyleMap.hxx include/xmloff/prstylei.hxx include/xmloff/txtprmap.hxx svx/Package_inc.mk svx/inc/svx/hdft.hxx svx/source/dialog/hdft.cxx svx/source/dialog/pagectrl.cxx svx/source/tbxctrls/tbxcolorupdate.cxx svx/source/unodraw/unobrushitemhelper.cxx sw/Library_sw.mk sw/inc/fillattributes.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/swunohelper.hxx sw/inc/unobrushitemhelper.hxx sw/inc/unoprnms.hxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/node.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/rolbck.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/fillattributes.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/rolbck.cxx sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/chrdlg/paradlg.src sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/uibase/app/docst.cxx sw/source/uibase/app/docstyle.cxx sw/source/uibase/frmdlg/colex.cxx sw/source/uibase/shells/basesh.cxx sw/source/uibase/shells/textsh1.cxx sw/source/uibase/uiview/viewstat.cxx sw/source/uibase/utlui/uitool.cxx xmloff/inc/PageMasterImportContext.hxx xmloff/inc/xmloff/XMLShapeStyleContext.hxx xmloff/source/draw/XMLShapeStyleContext.cxx xmloff/source/draw/sdpropls.hxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterImportContext.cxx xmloff/source/style/PageMasterPropHdlFactory.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx xmloff/source/text/txtstyli.cxx Conflicts: svx/source/dialog/hdft.cxx sw/source/core/doc/visiturl.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/unocore/unostyle.cxx Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
2014-06-24new compilerplugin returnbyrefNoel Grandin1-2/+2
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante1-2/+2
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c Reviewed-on: https://gerrit.libreoffice.org/9356 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-04-30sw: sal_Bool->boolNoel Grandin1-18/+18
Change-Id: I324a0ffde2ddcca105451c19e7aadcfad15211d8
2014-04-24Finish cleaning up ASCII art in the sw moduleChris Laplante1-71/+13
Change-Id: If4f11093b791902514dee8e216c92f66b075211d Reviewed-on: https://gerrit.libreoffice.org/9117 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-03-28Merge back branch alg_writerframes to trunkArmin Le Grand1-3/+4
(cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62) Conflicts: comphelper/inc/comphelper/TypeGeneration.hxx comphelper/source/property/TypeGeneration.cxx cui/source/factory/dlgfact.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/tabarea.cxx cui/source/tabpages/tabarea.hrc cui/source/tabpages/tabarea.src cui/source/tabpages/tparea.cxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/texture/texture.cxx editeng/inc/editeng/unotext.hxx editeng/source/items/frmitems.cxx include/drawinglayer/texture/texture.hxx include/editeng/brushitem.hxx include/svx/sdr/primitive2d/sdrdecompositiontools.hxx include/svx/svxids.hrc include/xmloff/xmltypes.hxx reportdesign/source/ui/misc/UITools.cxx sc/source/ui/drawfunc/drawsh.cxx sfx2/source/dialog/tabdlg.cxx svl/source/undo/undo.cxx svx/inc/svx/unoshprp.hxx sw/Library_sw.mk sw/inc/doc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/swatrset.hxx sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/access/accpara.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/app/docst.cxx sw/source/core/uibase/app/docstyle.cxx sw/source/core/uibase/shells/drawdlg.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmpage.src sw/source/ui/inc/frmsh.hxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
2014-03-07sw: remove that GETGRID abominationMichael Stahl1-16/+16
Change-Id: Ib2299dae7c1aab2d9af992930c29381a1027141b
2014-03-05Simplify DrawWaveKeith Curtis1-32/+2
This patch simplifies the DrawWave logic. Callers of that code would try to figure out what size wave to draw and pass down a style integer to DrawWaveLine, but DrawWaveLine already has logic which trims the height of the wave so it doesn't need the hint. This doesn't change the UNO API (::com::sun::star::awt::FontUnderline::SMALLWAVE), but it does get rid of internal usages and maps those small waves to normal. Note that changing the zoom in Calc right now causes spelling underlines to disappear. That bug is not related to these changes. Conflicts: editeng/source/editeng/impedit3.cxx Change-Id: I3caa2a74a0f5228b924d4e1b0a77f96eaef5fa00 Reviewed-on: https://gerrit.libreoffice.org/8168 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-03-03Use cstdlib std::abs instead of stdlib.h absStephan Bergmann1-1/+5
...because the latter lacks the abs(long) overload in some popular environments, cf. <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60401> "stdlib.h does not provide abs(long) overload." Similarly, stdlib.h lacks the abs(float), abs(double), abs(long double) overloads compared to cmath there, whose use was apparently intended in sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx. Rewrote that to use CPPUNIT_ASSERT_DOUBLES_EQUAL instead, which revealed that the comparisons need rather large deltas of .1 resp. .2 (which the original code hid with an implicit conversion to integral type, thus using an effective delta of 1). Discovered with -Wabsolute-value ("absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value") recently introduced on Clang trunk towards 3.5. Change-Id: I4c41575ffdccb2944498b662bd3a53fd510cb0c0
2014-02-27Remove visual noise from swAlexander Wilms1-25/+5
Conflicts: sw/inc/unodraw.hxx sw/inc/unoframe.hxx sw/sdi/swriter.sdi sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/ui/inc/unotxvw.hxx sw/source/ui/lingu/hyp.cxx sw/source/ui/lingu/sdrhhcwrap.cxx sw/source/ui/uno/swdetect.hxx Change-Id: Ic0a3fb2392187c277c9b36915ffb10dcf0317908 Reviewed-on: https://gerrit.libreoffice.org/8322 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms1-3/+3
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-06fdo#68071 NPC characters now use a fixed color.Tomaž Vajngerl1-3/+37
The color for non-printing characters (enable with CTRL+F10) has now been changed to a fixed color. Change-Id: I93dfc69fa4be1c1f1373f25434c8f4afa71355d3
2014-01-24coverity#1130488 Uninitialized scalar fieldCaolán McNamara1-11/+13
Change-Id: Ia1def7b58a9d7709d11336e2e27bd3b3679d7aea
2014-01-22bool improvementsStephan Bergmann1-1/+1
Change-Id: Ib65a1e987ad6511e90fd66a36c0105593a1df27c
2014-01-15Resolves: #i17171# Writer paragraph cannot be longer than 65534 charactersCaolán McNamara1-34/+33
Change-Id: I2052ae96571cba8fe2191dff53b1c61c95c94c60
2014-01-14fdo#73095: fix invalid access in SwFntObj::DrawText()Michael Stahl1-1/+4
aStr may be 1 larger than pKernArray. Trivial fix by checking the largest index; not sure if it would be a good idea to allocate pKernArray with the larger size in the first place, but that would be a bigger change... (regression from 02ce734450559c9353ca7f42b2519239220dd265) Change-Id: Ia33feab001c34e85066b7596d8873f41588984e9
2014-01-13longparas: convert ValidateKashidas to sal_Int32Caolán McNamara1-3/+3
we can use -1 as the failure return code as return value is always checked and isolated from the rest of the code. Change-Id: I87a743de82d681a7e4eabc61a576c4e50f1279a8
2013-12-20typo fixesAndras Timar1-1/+1
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-15xub_StrLen to sal_Int32 with minor optimizationsMatteo Casalin1-9/+9
Change-Id: I111e7c84e003b2bd4599824e42215066c4726023
2013-12-09fdo#72488: Broken text when showing visible spaceKhaled Hosny1-1/+7
Turning on showing nonprinting characters replaces the space with bullet character, but still draws the text with the original kern array, this works fine until there are ligatures involving the space character as the number of glyphs after replacing the space with the bullet will be different and the kern array will be completely off. This is a hack that gives up on replacing the space with a bullet when its width is zero, not sure if it would interfere with other legitimate uses. Change-Id: I5ed17132ead7cd141a4e8b0372e37541c163be30 Reviewed-on: https://gerrit.libreoffice.org/6995 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-12-03longparas: convert GetTextBreak to sal_Int32Caolán McNamara1-25/+22
Change-Id: I693e4c9916e1968c33ebd922829662f6efc27bfb
2013-11-21longparas: nTxtBreak is really a xub_StrLenCaolán McNamara1-1/+1
Change-Id: If8c3b366bfdf1e626823aca0d7026e877e21c63b
2013-11-06convert xub_StrLen to sal_Int32Noel Grandin1-9/+9
convert for loops using xub_StrLen to use sal_Int32 Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
2013-11-05convert xub_StrLen to sal_Int32Noel Grandin1-4/+4
Convert code like: xub_StrLen nLen = aStr.getLength(); into sal_Int32 nLen = aStr.getLength(); Change-Id: Ib0af6b747068257478918fd1cc93e4925f32ac47
2013-10-26sw: ViewShell -> SwViewShell renameMiklos Vajna1-9/+9
It's a public class, so it should have the 'Sw' prefix. Change-Id: I0040c1cc37ffcba7fc5f58b71c86f4a7cb0bfce4
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist1-3/+3
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-09-14cppcheck: reduce scopeJulien Nabet1-1/+1
Change-Id: I4d74c6444e3816306cba8b731280bb90899f4ea7
2013-09-12Related: fdo#38838 remove XubString aliasCaolán McNamara1-4/+4
Change-Id: I29efbe2bee94c0059f5a2e3dc4d163375e439e1a
2013-08-12fix build after recent OUString cleanupsNoel Grandin1-1/+1
I think my changes and Caolon's changes are colliding in mid-air. Change-Id: I45398b358b53662164c6a332e68ce8cd61a79cef
2013-07-07remove unused SwDoGetCapitalBreak::pExtraPosMichael Stahl1-1/+4
Change-Id: I6b64d25c3bddc73ba168ed0c7b6a0f12d0042fad
2013-07-07fdo#66478: sw: un-break hyphenationMichael Stahl1-2/+2
The main problem is calling SetHyphPos with a stack pointer. Converting STRING_LEN <-> -1 can't hurt though. (regression from a2f6402b1fe769a430019042e14e63c9414715dc) Change-Id: I59a4e3b16b418082de468c7d7f7f38a9b0bccd01
2013-06-11ugly workaround for external leading with symbol fonts (bnc#823626)Luboš Luňák1-0/+17
I'd much rather find the code using external leading in Writer's layout, but this font rendering and layout stuff is so complicated. Change-Id: Iaf58af387a6727eb18f5a9d1613de3ae30d7c35e
2013-05-23Resolves: #i121733# enhancement for colored smarttagsJürgen Schmidt1-87/+108
Patch By: Kai Labusch Review by: arielch, jsc (cherry picked from commit 5da75c78a80e43cb2bb4ed777ae5efcc1449cdda) Conflicts: sw/source/core/inc/wrong.hxx sw/source/core/txtnode/fntcache.cxx Change-Id: Ibc609ce4ef3492b537bb1ddec5ff7c460eb2c573