summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2014-06-30Debugging options in EditCharAttribColor::SetFontmatteocam
Change-Id: I44790059cffed0c124c4f30db7ea5028f0a0148d (cherry picked from commit 1091871d3e0c9ba556f223b210584aa0425ce642)
2014-06-30Called C++ object pointer is nullCaolán McNamara
Change-Id: I88efc4be6ff869ef97a2b398d43f7b7914debfc6
2014-06-30Drop unecessary continuePeter Senna Tschudin
Change-Id: Ibd16b4328da70d6ae48669a9becdb4690c6ef4df Reviewed-on: https://gerrit.libreoffice.org/9969 Tested-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-06-29Typo: beeing->beingJulien Nabet
Change-Id: I34937e400ac8576154d33e1e11b80690222f532c
2014-06-27OSL_ENSURE->assert where guaranteed deref followsCaolán McNamara
Change-Id: I6e007cc3a9fd222c1c1381c8b4f890966c05cbab
2014-06-24bnc#882631: Do not hide top of the first row when editing text in table cells.Matúš Kukan
This can happen when proportional line spacing is less than 100% and "FontIndependentLineSpacing" is set, so just keep the height of the very first line in case of IsFixedCellHeight() too. Change-Id: Id231fc1f2373645e5420f877e8c2568ce8a1f099
2014-06-24coverity#1103694 Missing break in switch, assuming this is wrongCaolán McNamara
Change-Id: I9a631eb28647ecf2633d6443d7af95cb37b860a3
2014-06-24new compilerplugin returnbyrefNoel Grandin
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-06-21Revert "bnc#882631: keep line visible if proportional line spacing is < 100%."Matúš Kukan
This reverts commit 339e5d44a2afa0f5309a970f1ff11968103e336a and commit d1987a3eaccfc3add35e6b9f8307ede857c5468e "fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29dd". It would need more work and understanding, so just revert. Also, the problem with bnc#882631 is somewhere else, though this helped too.
2014-06-18Related: fdo#80140 a11y crash on changing text via spellchecker in impressCaolán McNamara
i.e. with French dictionary available, open test case of fdo#80140, open spell checking dialog and choose "correct" on the first example. Every version of LibreOffice crashes on this, so its an old bug. As can be seen from the following bt, if a11y is enabled then on calling ImpEditEngine::ImpInsertText from ImpEditEngine::ImpDeleteSelection then FormatDoc may be called and throw away all the old portions so the following ParaPortion* pPortion = FindParaPortion(aStartPaM.GetNode()) will get the new ParaPortion, not the old one, and so the MarkInvalid that uses the old ParaPortion invalid range is not correct anymore. Seeing as the only caller of ImpRemoveChars is ImpDeleteSelection and ImpDeleteSelection calls TextModified after ImpRemoveChars and after the use of MarkInvalid, it seems safe and logical to remove the TextModified from ImpRemoveChars and rely on the ImpDeleteSelection TextModified. #0 TextPortion::TextPortion (this=0x30bd020, nL=5) at /home/caolan/LibreOffice/core/editeng/source/editeng/editdoc.hxx:401 #1 0x00007fffd93f4d5a in ImpEditEngine::CreateTextPortions (this=0x3f42700, pParaPortion=0x3584930, rStart=@0x7fffffffa234: 0) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit3.cxx:2372 #2 0x00007fffd93ed087 in ImpEditEngine::CreateLines (this=0x3f42700, nPara=0, nStartPosY=0) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit3.cxx:687 #3 0x00007fffd93ebb3b in ImpEditEngine::FormatDoc (this=0x3f42700) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit3.cxx:394 #4 0x00007fffd93fd239 in ImpEditEngine::FormatAndUpdate (this=0x3f42700, pCurView=0x0) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit3.cxx:4156 #5 0x00007fffd937c3f4 in EditEngine::GetDocPosTopLeft (this=0x3f42690, nParagraph=0) at /home/caolan/LibreOffice/core/editeng/source/editeng/editeng.cxx:1920 #6 0x00007fffd94d298a in Outliner::GetDocPosTopLeft (this=0x3f42390, nParagraph=0) at /home/caolan/LibreOffice/core/editeng/source/outliner/outlin2.cxx:429 #7 0x00007fffd951c2d3 in SvxOutlinerForwarder::GetParaBounds (this=0x36015a0, nPara=0) at /home/caolan/LibreOffice/core/editeng/source/uno/unoforou.cxx:344 #8 0x00007fffd950efe5 in SvxAccessibleTextAdapter::GetParaBounds (this=0x3394e88, nPara=0) at /home/caolan/LibreOffice/core/editeng/source/uno/unoedprx.cxx:798 #9 0x00007fffd9aa25b5 in accessibility::AccessibleTextHelper_Impl::UpdateVisibleChildren (this=0x3394e00, bBroadcastEvents=true) at /home/caolan/LibreOffice/core/svx/source/accessibility/AccessibleTextHelper.cxx:851 #10 0x00007fffd9aa38b3 in accessibility::AccessibleTextHelper_Impl::ProcessQueue (this=0x3394e00) at /home/caolan/LibreOffice/core/svx/source/accessibility/AccessibleTextHelper.cxx:1332 #11 0x00007fffd9aa400c in accessibility::AccessibleTextHelper_Impl::Notify (this=0x3394e00, rHint=...) at /home/caolan/LibreOffice/core/svx/source/accessibility/AccessibleTextHelper.cxx:1482 #12 0x00007ffff548c6ba in SfxBroadcaster::Broadcast (this=0x3394ac0, rHint=...) at /home/caolan/LibreOffice/core/svl/source/notify/brdcst.cxx:43 #13 0x00007fffd895ce27 in SvxTextEditSourceImpl::NotifyHdl (this=0x3394a50, aNotify=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/svx/source/unodraw/unoshtxt.cxx:1030 #14 0x00007fffd895cd61 in SvxTextEditSourceImpl::LinkStubNotifyHdl (pThis=0x3394a50, pCaller=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/svx/source/unodraw/unoshtxt.cxx:1023 #15 0x00007fffd936252a in Link::Call (this=0x3f426a8, pCaller=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/include/tools/link.hxx:123 #16 0x00007fffd94db186 in Outliner::EditEngineNotifyHdl (this=0x3f42390, pNotify=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/editeng/source/outliner/outliner.cxx:2041 #17 0x00007fffd94db149 in Outliner::LinkStubEditEngineNotifyHdl (pThis=0x3f42390, pCaller=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/editeng/source/outliner/outliner.cxx:2038 #18 0x00007fffd936252a in Link::Call (this=0x7fffffffb490, pCaller=0x7fffffffb4c0) at /home/caolan/LibreOffice/core/include/tools/link.hxx:123 #19 0x00007fffd93e0155 in ImpEditEngine::CallNotify (this=0x3f42700, rNotify=...) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit2.cxx:4339 #20 0x00007fffd93cf462 in ImpEditEngine::TextModified (this=0x3f42700) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit2.cxx:707 #21 0x00007fffd93d5a73 in ImpEditEngine::ImpRemoveChars (this=0x3f42700, rPaM=..., nChars=8, pCurUndo=0x0) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit2.cxx:2064 #22 0x00007fffd93d77bd in ImpEditEngine::ImpDeleteSelection (this=0x3f42700, rCurSel=...) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit2.cxx:2424 #23 0x00007fffd93d89f6 in ImpEditEngine::ImpInsertText (this=0x3f42700, aCurSel=..., rStr="Smoothie") at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit2.cxx:2645 #24 0x00007fffd94139f7 in ImpEditEngine::ApplyChangedSentence (this=0x3f42700, rEditView=..., rNewPortions=std::__debug::vector of length 2, capacity 2 = {...}, bRecheck=false) at /home/caolan/LibreOffice/core/editeng/source/editeng/impedit4.cxx:2172 #25 0x00007fffd937d0f1 in EditEngine::ApplyChangedSentence (this=0x3f42690, rEditView=..., rNewPortions=std::__debug::vector of length 2, capacity 2 = {...}, bRecheck=false) Change-Id: I6d0a96c8875858d8a25455f0dd1408f07e1f6e14
2014-06-18coverity#1210038 Uncaught exceptionCaolán McNamara
and hopefully a bunch more Change-Id: I2acdf069555873303835324a877cd7c38d617ca7
2014-06-17bnc#882631: keep line visible if proportional line spacing is < 100%.Matúš Kukan
If line height is smaller than text height, we still want to see whole first line, so add the difference where necessary. This also helps to see paragraphs as separate to each other. Change-Id: I51a87edf0cc03d5b5e130290c90347099a581d4e
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-13Paragraph argument never used in InvalidateBulletCaolán McNamara
Change-Id: I07ba855e473fb137551e70de9cfa858c5e079324
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: If6fca7f7761877b5642eddb800de46efb59aa6dc
2014-06-12Clean upStephan Bergmann
Change-Id: I14ababd3adb39cbde0ae3b5622b21fe72eb06ad9
2014-06-12Clean upStephan Bergmann
Change-Id: I3fc017fb5ef1fe704d273d667405eee588fa35cb
2014-06-12Missing SolarMutexGuardStephan Bergmann
...the non-mutex'ed access to the static LinguMgr members from other functions makes it look like those are all assumed to be called with SolarMutex locked; but that does not hold for calls to LinguMgrAppExitLstnr::disposing. Change-Id: I225a9f7ace65774460502a4aa510abddd48d12ca
2014-06-10coverity#735422 Logically dead codeCaolán McNamara
Change-Id: I5639746f25024b0808e9c4e620bb0fa9f1a2c0b6
2014-06-09some remaining sal_uInt16 to sal_Int32 editeng ESelection boundsCaolán McNamara
Change-Id: Ib47dea5c2d965cf613c465e624a1bdd81becb1c2
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-05coverity#705153 Missing break in switch, surely this is not intentionalCaolán McNamara
since the initial commit of c04e60275f273dacf8796e957e1ebadc08b497a1 Change-Id: I9d3c3c2870c145b2fdb5c4f6c6ed17a14d1162c2
2014-06-05editeng: remove SAL_THROW macroNoel Grandin
Change-Id: I8e36112a10cdef6250dba4b4cf75e5eba443e0b9
2014-06-04coverity#736033 Missing break in switchCaolán McNamara
Change-Id: Iabfc6fc76a80ad30bd412826f60edbf8b3facdd2
2014-06-04coverity#705374 Mixing enum typesCaolán McNamara
Change-Id: Ie18131e7207d8f93a775c21abfc77d768352a5d3
2014-06-04DeInitVCL at end of testsStephan Bergmann
This required some changes to the framework: * Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but once per CppunitTest invocation in a new vclbootstrapprotector (similarly to the exisiting unobootstrapprotector). CppunitTests that need VCL now need to declare gb_CppunitTest_use_vcl. * For things to work properly, the UNO component context needs to be disposed from within DeInitVCL (cf. Desktop's Application::DeInit called from DeInitVCL). The easiest solution was to introduce an Application::setDeInitHook (where the hook is called from DeInitVCL) specifically for vclbootstrapprotector to call. * PythonTests don't (yet) call DeInitVCL; they still hook into BootstrapFixture's original test_init functionality (to call InitVCL), and do not make use of the vclbootstrapprotector. Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-04avoid problems with poppler's and vcl's FontInfo during runtimeMarkus Mohrhard
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-05-31fdo#64956: editeng: fix RTF color table exportMichael Stahl
The editengine RTF export produces this: {\colortbl\red255\green255\blue255;;} ... and then it proceeds to map COL_AUTO to \cf0 i.e. the "white" entry that is the result of erroneously writing out the 0th entry regardless of whether it is COL_AUTO or not. Fix the color table export to always put COL_AUTO first (as the Writer RTF export already does), and simplify the code a bit. Change-Id: Ia8ce19f387e3627a1b4a26bcc723edcf5b1ffdf8
2014-05-28coverity#706505 Uncaught exceptionCaolán McNamara
Change-Id: Ia00361fb1d86223a7ed65f0be295b291183e3ad6
2014-05-28coverity#706506 Uncaught exceptionCaolán McNamara
Change-Id: I60f0a08029ef4599403c9853a55fff25cdf3f0bc
2014-05-27remove unnecessary use of OUString constructor when throwingNoel Grandin
Change-Id: I4a3f3f911dcfbf88696053215a2fb7a94678244c
2014-05-27Remove unnecessary semicolonsPeter Senna Tschudin
A simplified version of the semantic match that finds this problem is follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e Reviewed-on: https://gerrit.libreoffice.org/9493 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-26coverity#705152 Missing break in switchCaolán McNamara
Change-Id: I9b56f5fe890d0d60e451cd35b69dcfb68e7b86b4
2014-05-26coverity#705151 Missing break in switchCaolán McNamara
Change-Id: I7bfddf3bb7be3ade65c8b33c6d41901522498d56
2014-05-26coverity#705150 Missing break in switchCaolán McNamara
Change-Id: I09249504ace6b38ae3dac677678995bbb5080a28
2014-05-23coverity#707758 Uninitialized scalar fieldCaolán McNamara
Change-Id: I39954506deafc42e854d556170417af67f5461b2
2014-05-23coverity#984086 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iba162efd0b582541199f343b64ac3b8c59dcc3d8
2014-05-22Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19Julien Nabet
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-19hrc and src files: squeeze multiple newlinesThomas Arnhold
for i in `find . -name *.src -or -name *.hrc`; do FILE=$(cat -s "$i"); echo "$FILE" > "$i"; done Change-Id: I2bac5ad3e1eb3c566e5c867ccf45893a19e1561e
2014-05-17Correct common misspellings, and remove some ASCII art along the way.Chris Laplante
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-05-14various loplugin:passsequencebyrefNoel Grandin
Change-Id: Id1045a7f66b4fa10b6491587ba07246a31ceba72
2014-05-13Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11Julien Nabet
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
2014-05-13remove dead codeNoel Grandin
Change-Id: Ic4fb478921714429af138ca212bd7f67f408d434
2014-05-11coverity#707751 Uninitialized pointer fieldCaolán McNamara
Change-Id: Iaa8aebe1649d4805394bdc559f57e7f256097ca5
2014-05-11coverity#1038495 Uninitialized scalar fieldCaolán McNamara
Change-Id: I49c7c79f8b28b50d7289ec0bba575520c370d7b4
2014-05-11coverity#984086 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iab787537a4212e58710a1db1b30f953784824dfa
2014-05-11coverity#707758 Uninitialized scalar fieldCaolán McNamara
Change-Id: I2f123b0be283b1cb7d890f0e2318dabb5a5930ec
2014-05-11coverity#1019408 Uninitialized scalar fieldCaolán McNamara
Change-Id: I63bc844627ca9eaf43f9b4b01ab987ef4f188afa
2014-05-10coverity#1213528 Uncaught exceptionCaolán McNamara
Change-Id: Ieaa7a7312cb50622f0c1b03f9e2a491b81ddc8ea
2014-05-10Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8Julien Nabet
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf