summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2015-01-14fdo#85451 classic draw rectangles "fit to contour" utterly brokenCaolán McNamara1-1/+1
regression from commit 3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 Date: Sun Feb 2 22:16:48 2014 -0600 xub_StrLen and tools/string.hxx final straw There is still some 0xffff limit left and possibly some less than gracefully handled overflow/error cases (cherry picked from commit 9977cbba8a36d3e6365cf886630d213ec7c1240c) Change-Id: I82bdcb6951c42fdcaa68808a251f9b2f76f8ed0b Reviewed-on: https://gerrit.libreoffice.org/13903 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-01-05Resolves fdo#87968 : Assertion failed: false rtl_uString_newFromSubStringJulien Nabet1-3/+3
aNewText already contains the good string so calling copy method is wrong (same pb for i18n::TransliterationModulesExtra::TITLE_CASE and i18n::TransliterationModulesExtra::SENTENCE_CASE) Change-Id: Ifce92f33e98af3a58a70d25da9c60cf3d584a001 Reviewed-on: https://gerrit.libreoffice.org/13724 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 31de7888660f551597263413bfdf467aade36680) Reviewed-on: https://gerrit.libreoffice.org/13753
2014-12-10Resolves: fdo#87141 Remove deletes the node, release doesn'tCaolán McNamara1-1/+1
regression from introduction of boost::ptr_vector originally one had to Remove and delete the return to delete it, while now the Remove automatically delete it. This bare Remove to just "release" it seems to have been overlooked Change-Id: I175f7c95862ce47402993e5e3b8feaa93af43e75 (cherry picked from commit efcbb12a27a380a442292f17c7f508555a66d4af)
2014-12-08Resolves: fdo#86931 wrong offsets used to set languageCaolán McNamara2-5/+4
after Chinese conversion. the _aOldSel is the one that has the start and end index set to the end of the replacement text and so the calculation only makes sense on that selection Change-Id: I152067550d7741579bfc6ca026072b16ac7c2dd6 (cherry picked from commit 6d10a42d5b1690b3b1ed81d99a3a1bc9b65c30d9)
2014-12-02Adapt to int/sal_Int32 mismatch on 32-bit buildTor Lillqvist1-1/+1
Change-Id: I9c5cb458ea7595c1b623ce14ed58fd3d5b3d961e (cherry picked from commit f1e7489d98a1d1fd9e261e4a7e83fff03e5daf63)
2014-12-02Adapt to int/sal_Int32 mismatch on 32-bit buildTor Lillqvist1-1/+1
Change-Id: Ifef81d53bee4241be3c0dd6b7ddb2c1bbf419b5e (cherry picked from commit 9bdde8b420265c7e77f4b310fb4c1214b715aa72)
2014-12-01fdo#85496: add some asserts to detect this sort of problemMichael Stahl1-0/+5
Change-Id: Iff787c8d2a71bc3082192cc98e3d916badee65dd (cherry picked from commit 7a242b463132d67a4a2d6e69319e0da367145cc0)
2014-12-01fdo#85496: editeng: do not add multiple 0-length attributes...Michael Stahl2-7/+55
... at the same position. Since commit 0d57434180db6c8eda8c5b9b704f8a1c18b371df these will be exported by the ODF filter as duplicate attributes. Change-Id: I8befe55f61c59ab968409fa03359540c300f9198 (cherry picked from commit 846b56b6b99e334dfa44f1a24640aa3158509854)
2014-11-23Resolves: fdo#86392 the assert seems to just want the attrs to be sortedCaolán McNamara1-1/+1
i.e. two at the same position is ok assert added in commit 8220b70fe2dc270188751950ac6d872320db1aa2 Date: Sun Jul 27 00:21:50 2014 -0400 bnc#467459 - fix editeng text search with expanded fields. Change-Id: Ifc65f3301a7d505a7d2d13e5914f53cbe263fc1f (cherry picked from commit e37e8f38d1f5c6bc427965dc535f1a64f0c8649c) Reviewed-on: https://gerrit.libreoffice.org/13024 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-11-18cppuhelper: clean up public headers with include-what-you-useMichael Stahl1-0/+1
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-17editeng: Avoid calling expensive getLineBreak() if possibleMatúš Kukan1-27/+38
ImpEditEngine::ImpBreakLine: if nMinBreakPos == nMaxBreakPos just set nBreakPos to the same value directly. Change-Id: I4544cb6c56f68071cba739260161bb24ef5a3f7f
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl3-1/+3
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-14coverity#1242632 Untrusted loop boundCaolán McNamara1-2/+11
Change-Id: Ib821adfbca149091d4fbe52d05837e232c3caf55
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava6-14/+14
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14vcl: move the Impl class of MapMode ...uhm... out of the public header?Michael Stahl1-0/+1
And remove the tools/fract.hxx include. grep -l -r fract.hxx workdir/Dep/*Object* |wc -l before: 4569 after: 1851 Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3: libvcllo.so by 473k (0.35%) libswlo.so by ~1Mb (sadly that is just 0.2%) Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
2014-11-13sw: delete global SwAutoCorrect instance to avoid crash...Michael Stahl1-3/+3
... in exit handlers because VCL and the SolarMutex is gone. (regression from 4404b718bdb547cb9b7b17c73a53574724cdeeb7) Change-Id: I9f33b2cb8c87f7137e3ba0ae033879861f9fe11b
2014-11-12rename variables in makefileDaniel Sikeler1-11/+11
Change-Id: Ie1a7a8d83cc9c1ae4b6d015b77713f446fdd871e Reviewed-on: https://gerrit.libreoffice.org/12388 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini7-7/+7
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12Guard against wrap-around in SvxFontHeightItemStephan Bergmann1-2/+10
...though the whole design there looks broken Change-Id: I6c3a53d606ea835d34729fcfb661fad0f1897716
2014-11-11Copy the original prop/prop unitStephan Bergmann1-1/+4
...instead of scaling the translated nNewHeight once more by the original prop Change-Id: Iadb53361a79f0b37b3c7c50066e4cfb7d24ed5e8
2014-11-11Revert "Some SvxFontHeightItem clean-up"Stephan Bergmann1-8/+3
This reverts commit d5f93eb47ec4c27e93ad908b0199790c702491a0, SvxFontHeightItem::SetProp was used to override "dummy" 100% nProp/ePropUnit values that did not match the computed nHeight value with nProp/ePropUnit values that are supposed to match the computed nHeight value. Yuck. Change-Id: Ic12e824054b3c5da7aca766b9b3eb076d1837d9a
2014-11-11Some SvxFontHeightItem clean-upStephan Bergmann1-3/+8
...and operator= shall probably copy rSize.ePropUnit... Change-Id: I112c02b3a3b2ce23f3d03f03881136e05be29017
2014-11-11callcatcher: dropping SwChapterNumRules binary Load/Store has knock-on effectCaolán McNamara1-12/+2
Change-Id: I2567026af23dd5fc42812b90bd6098c4c74a4f92
2014-11-11WaE: 'register' storage class specifier is deprecatedTor Lillqvist1-0/+11
Silly gperf generates 'register' storage class specifiers. So ignore those warnings from the generated tokens.cxx file. Change-Id: Ia80139f904f949bd2ae0267b6790d17b7f0e93d0
2014-11-11fdo#80403: TokenHandler impl. FastTokenHandlerBaseDaniel Sikeler7-10/+56
getTokenFromUTF8: calls getTokenDirect getTokenDirect: uses perfect hash New makefile creates perfect hash table with perl-script gentoken.pl. I found the script on https://wiki.openoffice.org/wiki/XFastTokenHandler and made some changes. XMLTokens are defined in tokens.txt Change-Id: Id04134a896ee082e2d0ba55a715fede19ff04928 Reviewed-on: https://gerrit.libreoffice.org/12335 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann1-4/+4
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin1-4/+4
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05coverity#1242632 Untrusted loop boundCaolán McNamara1-5/+13
Change-Id: I4ec2e1a21a6a27c31c3308a5f72dbdcb33a62f39
2014-11-05changed some timer to idleJennifer Liebel2-2/+2
Change-Id: Ifd5e2d87732d3e537c7754e52be24ef768ecb8d9
2014-11-05editeng: SvxRTFParser sal_Bool to boolMichael Stahl4-33/+33
Change-Id: I2159f5c45ec6e6df965836705792cf2d71abbc42
2014-11-05fdo#79761: parse BlockList.xml only onceDaniel Sikeler2-3/+7
Change-Id: I3cfc5b66ee73b0e4d07a84c8255c5a006e4fbb25 Reviewed-on: https://gerrit.libreoffice.org/12210 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-11-03coverity#982161 unchecked return valueDavid Tardon1-1/+13
Change-Id: I3c8370915898e322f40812b52929132e192b3a2c
2014-11-03coverity#982160 unchecked return valueDavid Tardon1-1/+13
Change-Id: I94117e9f53f1929906b88b2a31d0fcfdf2e40c8d
2014-11-01fdo#84938: replace MIB_ constants with enumNoel Grandin1-2/+2
Change-Id: I58c1b4c9e4c4b3751b233d2fe10b9c953b945c4a Reviewed-on: https://gerrit.libreoffice.org/12179 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-31missing SAL_CALLMatúš Kukan2-4/+4
Change-Id: Ifa9034f12f42c0ddc5aa5e363fbcc04bab36492b
2014-10-31fdo#80403: AutoCorrect uses XFastParserDaniel Sikeler6-160/+188
depends on c0a5d390e519603dbc19a38c610d0a114b80cfa1 ContextClasses implement fast methods. ImportClasses implement fast methods. New TokenHandler for AutoCorrectTokens. Change-Id: I41ef7266da2068da3ab5f047280b13e57ee2e763
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin16-16/+0
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-28coverity#735305 Unchecked return valueCaolán McNamara1-5/+5
Change-Id: I0f03b67a5df3427e78f70f2b86aba26024ea575f
2014-10-27cid#1209201 Logically dead codeNoel Grandin1-2/+0
Change-Id: I8a7a9e23ad33f0c62813ae4ebd84cece3fe75283
2014-10-27fdo#84938: replace KEYTYPE_ constants with enumNoel Grandin3-23/+23
Change-Id: I563cf96f8ca815d6c8ad9f5fe365fc7ce7a2a328 Reviewed-on: https://gerrit.libreoffice.org/12104 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky1-3/+3
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-17coverity#1247635 Uncaught exceptionCaolán McNamara1-2/+2
Change-Id: Ic346a5820102a922f54c971e01587601991bd484
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-15coverity#735333 flush out pointless calls to IsRemote and IsOpenCaolán McNamara2-2/+0
etc. Change-Id: I588d4486071b1e31897d4e6468a2c634d6856832
2014-10-15convert PORTION_KIND constants to enumNoel Grandin5-77/+84
Change-Id: I32d65cfd7a67cd7ebca0f99061293a9ac3398133 Reviewed-on: https://gerrit.libreoffice.org/11970 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-13create a macro library for implementing bit-flags typesNoel Grandin7-19/+19
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-3/+3
* 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-10-07Resolves: fdo#44998 crash when opening context menu of a fieldCaolán McNamara5-1/+22
If you right click on a field in an inactive text box, then a mouse down, context command, mouse up sequence is sent. The mouse up is supposed to be captured by the context menu here. But it doesn't because the mouse down in draw sends an artificial mouse down to the editengine which eventually sets up a MouseCapture window so the context menu doesn't get considered (because it occurs before the capture window is released) so the mouse up gets send to sd while the context menu is up and that causes all sorts of havoc. Change-Id: If3b7c501586f8561be484d0828c630d84644f770
2014-10-06Resolves: fdo#84698 crash in autoreplacementCaolán McNamara1-1/+2
Change-Id: I44d5dacb21870f77ca993b24f3a31433edb17c6d