1642 Commits

Author SHA1 Message Date
Caolán McNamara
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
Miklos Vajna
88bd199e76 error: 'SvxColorBackgroundItem' was not declared in this scope
Change-Id: I296a1ba4128d5e1c9178a20df25875fd8baaefe5
2014-07-01 08:07:37 +02:00
matteocam
59a2e1b9fa Cleanup: removed comments and debugging output
Change-Id: I41f13d33da641153784725344f5bd526ca69542b
2014-06-30 22:54:44 +02:00
matteocam
c2d5c39b0c Removed assertion in EditCharAttribBackgroundColor
Change-Id: Ic9b41eed686ca8bf07c8e3e1555fc6953093a2d4
(cherry picked from commit e68c18f1afe93eba5e79829510df16a78d66c95e)
2014-06-30 22:54:43 +02:00
matteocam
6b30ff01ea VclProcessor's text rendering looks at fill color
Change-Id: I96dcafd01fb6d8a5e873719ee617008b5f2cbc13
(cherry picked from commit 74fa26c85ef79020a889d14db04130e52635b81e)
2014-06-30 22:54:42 +02:00
matteocam
4284ad3f27 Set transparency besides color for text with fill (i.e. underlined text)
Change-Id: I88a90facac656f846a88315951b4769f502662a0
(cherry picked from commit d4c1c038dbc554dcce9c081e736a72359e80d33f)
2014-06-30 22:54:42 +02:00
matteocam
3959563228 DbgOutItem supports Font Background Color
Change-Id: I1067e73593fdd116c3fc264b07f8bfd77057af0f
(cherry picked from commit 2bcaa1ca791ff64a1629d2451bd52323e7e814e3)
2014-06-30 22:54:41 +02:00
matteocam
fd0e1ea165 CreateFont supports Background Color
Change-Id: I3413c77db8e822aeb957909a661d175320555f6d
(cherry picked from commit a7f27d468dd92a2ffbe114a5bdedf423f657f1ad)
2014-06-30 22:54:41 +02:00
matteocam
39c84aafd3 ItemSet includes Background Color in SetFontInfoInItemSet
Change-Id: I0a5f5cebccc73eb3c0877fae0086861ac5b93d3d
(cherry picked from commit c52d374be19130c123d8316be6dac51219296abd)
2014-06-30 22:54:40 +02:00
matteocam
2f54ab7089 Minor changes.
Change-Id: I3b8c51690eb14601435653e9a2255a5c6ed4fd7e
(cherry picked from commit 0b8fe9834b398db7550f30718b3cb63860c6165d)
2014-06-30 22:54:40 +02:00
matteocam
6d658b15b8 Debugging output
Change-Id: I4e9418746ad50e1bdb1336459c00a4cf614e2350
(cherry picked from commit 4b2d62f02a386013d0004058a02fed80eb8df675)
2014-06-30 22:54:40 +02:00
matteocam
f9e020227a Added case in editdoc.cxx
Change-Id: I572d79dfd770eaa13d24b27f1c689a059cb79153
(cherry picked from commit 073be3ab511a33e639135703caa2229c1f105b54)
2014-06-30 22:54:40 +02:00
matteocam
c7d80ccb4c Added body of EditCharAttribBackgroundColor
Change-Id: Ieac410809b33b1b489cb7563f3fed133d32832d0
(cherry picked from commit 8fd668c43982f683dca945277a6c9d4bc8ea720a)
2014-06-30 22:54:39 +02:00
matteocam
139ca8f264 Added EE_CHAR_BKGCOLOR
Change-Id: If11271f4b3b8f9ab67961206856938046ea2a416
(cherry picked from commit c2580813426a58cd2ab22efacec9d28423201562)
2014-06-30 22:54:39 +02:00
matteocam
4693d7cc99 Added class SvxBackgroundColorItem
Change-Id: If10795bbbd9fc911896b57bbab5410bc1e62f71f
(cherry picked from commit ad6a2607f09d2f770e683a21ad7243a077d65a7a)
2014-06-30 22:54:39 +02:00
matteocam
a74e588518 Setting SetTextFillColor from Attrs. Experiment with line color
Change-Id: If34f000d6c5ef6ec38f7f735ada194b8fff4f56d
(cherry picked from commit 7fb0e8c9a659417607c85f9b0e8245e4af4552dc)
2014-06-30 22:54:39 +02:00
matteocam
7b59e44925 Cleaned up code from tranparency in vcl. Trying setfillcolor from edit attrs
Change-Id: I263012332e43573f260ac8c54612576eb21a11a1
(cherry picked from commit 02385eb4d8de3c5a57511d8bae3c42a523470838)
2014-06-30 22:54:39 +02:00
matteocam
be34ea6f62 Cleaned up code from operations in vcl
Change-Id: Ica5194f0cf6e30ec099974ae8b794fb2bc5e654a
(cherry picked from commit 4445f361aa2730b61fdd339dcdd7014b266e5c42)
2014-06-30 22:54:38 +02:00
matteocam
be085bf523 Moved Text Filling Color in OutDev. Text Filling occurs in ImplDrawText
Change-Id: I9c75066a8dea32721757d0511a2af58c68408438
(cherry picked from commit b09cf493611f2521e66159287b88acc3c05d6d33)
2014-06-30 22:54:37 +02:00
matteocam
039599e9d5 Put text filling in SvxFont
Change-Id: I290fff0cb66fc07122b976d977dff24ac491e108
(cherry picked from commit ea56441757a34082b9ffc5f28936413fcb55e31a)
2014-06-30 22:54:37 +02:00
matteocam
d097bc8e15 HasBkg method to Font.HasBkg iff HasSingleUnderline.SetBkgColor in OutputDev
Change-Id: I10e6e1b916df0c78d26596a37944e8b57b2897e7
(cherry picked from commit 181266201b5e6aaad1dcd9cbc2dd4db44ecf3dc5)
2014-06-30 22:54:37 +02:00
matteocam
285c6cd514 Test on changing background
Change-Id: Id1ad39eee375de229d63e749673021848690e363
(cherry picked from commit 422321340246104c0d8b11a2cf170606d8f476c3)
2014-06-30 22:54:37 +02:00
matteocam
6ffc9d1203 Debugging options in EditCharAttribColor::SetFont
Change-Id: I44790059cffed0c124c4f30db7ea5028f0a0148d
(cherry picked from commit 1091871d3e0c9ba556f223b210584aa0425ce642)
2014-06-30 22:54:36 +02:00
Caolán McNamara
4523dd0544 Called C++ object pointer is null
Change-Id: I88efc4be6ff869ef97a2b398d43f7b7914debfc6
2014-06-30 09:46:16 +01:00
Peter Senna Tschudin
0fef0d41f7 Drop unecessary continue
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-30 07:05:44 +00:00
Julien Nabet
430484932e Typo: beeing->being
Change-Id: I34937e400ac8576154d33e1e11b80690222f532c
2014-06-29 13:15:51 +02:00
Caolán McNamara
78bea877ff OSL_ENSURE->assert where guaranteed deref follows
Change-Id: I6e007cc3a9fd222c1c1381c8b4f890966c05cbab
2014-06-27 17:22:09 +01:00
Matúš Kukan
9388c45c02 bnc#882631: Do not hide top of the first row when editing text in table cells.
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-24 20:39:24 +02:00
Caolán McNamara
804c4983f2 coverity#1103694 Missing break in switch, assuming this is wrong
Change-Id: I9a631eb28647ecf2633d6443d7af95cb37b860a3
2014-06-24 14:28:27 +01:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
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-24 11:34:21 +02:00
Matúš Kukan
fc577e4f41 Revert "bnc#882631: keep line visible if proportional line spacing is < 100%."
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-21 09:40:04 +02:00
Caolán McNamara
ce61e7f9de Related: fdo#80140 a11y crash on changing text via spellchecker in impress
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-18 14:10:22 +01:00
Caolán McNamara
3f0011fbc5 coverity#1210038 Uncaught exception
and hopefully a bunch more

Change-Id: I2acdf069555873303835324a877cd7c38d617ca7
2014-06-18 11:12:10 +01:00
Matúš Kukan
e42c05c1f9 bnc#882631: keep line visible if proportional line spacing is < 100%.
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-17 12:04:19 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Caolán McNamara
05f90a9afe Paragraph argument never used in InvalidateBullet
Change-Id: I07ba855e473fb137551e70de9cfa858c5e079324
2014-06-13 17:06:06 +01:00
Stephan Bergmann
e45366826c loplugin:staticcall
Change-Id: If6fca7f7761877b5642eddb800de46efb59aa6dc
2014-06-13 17:54:26 +02:00
Stephan Bergmann
4348dfbd4a Clean up
Change-Id: I14ababd3adb39cbde0ae3b5622b21fe72eb06ad9
2014-06-12 15:28:00 +02:00
Stephan Bergmann
4e2cc748f5 Clean up
Change-Id: I3fc017fb5ef1fe704d273d667405eee588fa35cb
2014-06-12 15:26:06 +02:00
Stephan Bergmann
5c961fa9ea Missing SolarMutexGuard
...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-12 15:19:41 +02:00
Caolán McNamara
e123213f46 coverity#735422 Logically dead code
Change-Id: I5639746f25024b0808e9c4e620bb0fa9f1a2c0b6
2014-06-10 10:48:42 +01:00
Caolán McNamara
eb4cd7e74d some remaining sal_uInt16 to sal_Int32 editeng ESelection bounds
Change-Id: Ib47dea5c2d965cf613c465e624a1bdd81becb1c2
2014-06-09 12:27:56 +01:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Caolán McNamara
b24739c98f coverity#705153 Missing break in switch, surely this is not intentional
since the initial commit of c04e60275f273dacf8796e957e1ebadc08b497a1

Change-Id: I9d3c3c2870c145b2fdb5c4f6c6ed17a14d1162c2
2014-06-05 09:51:06 +01:00
Noel Grandin
5ceded62aa editeng: remove SAL_THROW macro
Change-Id: I8e36112a10cdef6250dba4b4cf75e5eba443e0b9
2014-06-05 08:17:47 +02:00
Caolán McNamara
7f694bed84 coverity#736033 Missing break in switch
Change-Id: Iabfc6fc76a80ad30bd412826f60edbf8b3facdd2
2014-06-04 12:41:37 +01:00
Caolán McNamara
ff998ca882 coverity#705374 Mixing enum types
Change-Id: Ie18131e7207d8f93a775c21abfc77d768352a5d3
2014-06-04 12:34:15 +01:00
Stephan Bergmann
369d95931f DeInitVCL at end of tests
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-04 08:55:12 +02:00
Markus Mohrhard
f634cda2a2 avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-06-04 07:49:15 +02:00
Michael Stahl
55070972b3 fdo#64956: editeng: fix RTF color table export
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-31 00:40:19 +02:00