summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2015-11-25tdf#61228: formatting and commentingMike Kaganski1-8/+10
Change-Id: Ic5d1090722945dce338973e9e3091546ed792057 Reviewed-on: https://gerrit.libreoffice.org/20160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mikekaganski@hotmail.com>
2015-11-24tdf#61228: Wrong function names in Formula Writer are considered as SUMJulien Nabet1-9/+14
Unknown names make the formula fail PythonTest_sw_python, especially set_expression is ok Variables are taken into account Thanks to Mike Kaganski for his help on this patch. Change-Id: Ia6f9c54d90ce88138fd9c9df9422b34ce8223ca2 Reviewed-on: https://gerrit.libreoffice.org/20122 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mikekaganski@hotmail.com>
2015-11-24Resolves: tdf#95962 incorrect scanline strideCaolán McNamara1-1/+1
we were reusing the stride of the surface we were cloning, but the new surface has a different underlying size. remove the custom stride argument and just change our stride calculation to use the same scheme that cairo and GDI uses, which remove another platform/drawing-system variable Change-Id: I257dac9757b121642e9ccfde7db0911edc9f3fb1 Reviewed-on: https://gerrit.libreoffice.org/20149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-24sw lok comments: fix map mode state after changing zoom levelsMiklos Vajna1-0/+2
Zoom level of SwEditWin is kept in sync with the client, so that the pixel-based comment widgets can be positioned correctly. But that does not mean in general the SwEditWin map mode should not be disabled: so that we don't have to tweak the map mode for each and every postMouseEvent() call and still be able to send them using logic coordinates. Change-Id: I6f686b93d2509d52fdd34e84a502cf04e1ce6e59
2015-11-24sw lok comments: avoid crash an exit after clicking the scrollbarMiklos Vajna2-0/+6
Without this, vcl::Window::ImplTrackTimerHdl() will be called on a deleted vcl::Window. Can be reproduced with a comment having a scrollbar in a LOK client, then clicking on the down button of the scrollbar a number of times -> crash on exit. Change-Id: I5d67f96e8baa199f65ec5cf39cb5d39c8162ff33
2015-11-24sw lok comments: implement drag of the scrollbarMiklos Vajna3-5/+11
With this, if a comment has a vertical scrollbar, then not only the buttons of the scrollbar can be clicked on, but also the slider of the scrollbar can be dragged. Change-Id: I2e39e18bf60c42a878bb8bfd808f1d47be27eecb
2015-11-24tdf#95970: Don't loose mirroring in SdrTextObj::TRSetBaseGeometryMike Kaganski2-0/+28
Currently, negative scaling (mirroring) is lost in SdrTextObj::NbcSetSnapRect, when rect is justified. This patch cares for this. Possibly it's better to make these changes directly in SdrTextObj::NbcSetSnapRect? Change-Id: I353ff01626e15b398de95e28eae78572991dfdc3 Reviewed-on: https://gerrit.libreoffice.org/20109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2015-11-24loplugin:unusedfields in include/comphelper,include/editengNoel Grandin2-128/+128
Change-Id: I619c2cf1765df97159fc52ee84e0e9e8d16a22fe
2015-11-24sw lok comments: fix missing invalidations from the scrollbarMiklos Vajna4-1/+118
If a comment had a scrollbar, and the user clicked on the down arrow of it, then the button remained in the "pushed" state, as the scrollbar invalidations were not routed to the LOK client. With this, the button gets back to its non-pushed state after the mouse button is released. Change-Id: Ie4ba5d0ec07229b0cfc08532e8e91ae25f7a4c9e
2015-11-24tdf#78902 VML import: workaround for extreme top marginMiklos Vajna2-0/+6
Regression from commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 (rhbz#988516: DOCX import: fix context stack when importing header/footer, 2014-03-05), though that just made an existing Writer layout problem visible. RTF/WW8/newer (drawingML) DOCX import doesn't have this problem, as those import pictures as sw graphics, not draw ones. <w10:wrap type="through"/> is normally mapped to our page wrap (as it uses "through" in the "not only wrap around, but also in the holes of the shape, if it has any" context, not in our "text should go through it, so no wrapping" one), but for some reason in this case (most probably due to the extreme large negative margins) Word handles the situation as our through, i.e. the text should not go to the second page, as it would normally happen with a "Word through" wrapping. Work around the strange situation by ignoring the wrapping request for extreme top margin values. Change-Id: I20555b1fa7a769e20c40a3a5ff3873807403e937
2015-11-24loplugin:unusedfields in sw/Noel Grandin11-31/+1
Change-Id: I0d9c79d0756ef85260d3b69cb1e879d7665bf356
2015-11-24loplugin:unusedfields in sw/Noel Grandin28-75/+13
Change-Id: I323a038e5581b00cd3a4ea2f362c66540377759e
2015-11-24loplugin:unusedfields in sw/Noel Grandin14-40/+14
Change-Id: I975f35031b1833be376881d534dc6f91fae6072f
2015-11-24loplugin:unusedfields in sw/Noel Grandin5-40/+18
Change-Id: I3e146c4287df70bbf58443caecfa62453c116ecb
2015-11-23loplugin:nullptrStephan Bergmann1-1/+1
Change-Id: Iefd6d4a08a4a5f90f4f2f95889f6425aabe61334
2015-11-23sw lok comments: handle mouse up/down events on the vertical scrollbarMiklos Vajna1-10/+45
Change-Id: Ib1c334825a6629224fe0c8fba564656d53e67410
2015-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara1-1/+1
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara2-4/+4
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-23sw lok comments: fix vertical scrollbar with custom zoomMiklos Vajna2-2/+12
With this, if a comment has enough content that it gets a vertical scrollbar, then tiled rendering output looks OK, even with non-100% zoom. Change-Id: I699aadc11b6c34fb0791e70705719fd61169d972
2015-11-23tdf#60351: Use Wrap Polygon also for PROP_SIZE_PIXELMike Kaganski2-0/+24
Since commit 2b5bf2f1c57d6585ec898c4c44a74c5b47f09ab9 "graphic import improved" from 2006-11-20 by Oliver Specht, there is an unused code reading pixel size (PROP_SIZE_PIXEL) of an image in a part of GraphicImport::createGraphicObject() that imports the wrap polygon. When there's no PROP_SIZE100th_M_M in graphic, the imported wrap polygon was simply dropped, and then automatic contour was generated for graphic. Now we import contour correctly in this case. Also, as paragraph background overlaps non-opaque graphics, we need to set opaque to true regardless of behindDoc value of wp:anchor. Change-Id: Ifa5eec9f8ccaf5ba051732b6e4f965ae8606a1cf Reviewed-on: https://gerrit.libreoffice.org/20103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-23sw: nTwipstoEMU -> nPosXEMU and nPosYEMUMiklos Vajna1-14/+14
It was used for both x and y positions, hard to read. Change-Id: Ie2461662671405a6348aa24c3946b376c123f699
2015-11-22Revert "tdf#95687: Wrong function names in Formula Writer are considered as SUM"Julien Nabet1-10/+1
This reverts commit e110397a2816037b421bdcdeed0a2fdab5cd99d7. Variables weren't dealt with this.
2015-11-22tdf#95687: Wrong function names in Formula Writer are considered as SUMJulien Nabet1-1/+10
New fix which deals with specific "foo" case Change-Id: I479b30abf22315ddca6151cba220574029cb1a91 Reviewed-on: https://gerrit.libreoffice.org/20113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-11-22Revert "tdf#95687: Wrong function names in Formula Writer are considered as SUM"Julien Nabet1-1/+1
This reverts commit 010ed5e6f4505647b0f9043d1cf5001db2057e0d. The fix was too naive and generated a problem during PythonTest_sw_python with set_expression test
2015-11-21tdf#95687: Wrong function names in Formula Writer are considered as SUMJulien Nabet1-1/+1
Just indicate there's an error if the function name is unknown Change-Id: Idad6dd1911c2e8a0206f70fb933fcfd540a887d2 Reviewed-on: https://gerrit.libreoffice.org/19919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-11-20Seems more natural to pass a homogenous list by initializer_listStephan Bergmann1-3/+3
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-20Remove last redundant toolbar:style propertiesSamuel Mehrbrodt43-96/+96
Change-Id: I42fa834464fd4cd7f0c1f11e310c1145fb1f071b
2015-11-20sw lok comments: implement painting of the vertical scrollbarMiklos Vajna1-0/+14
This one is special, as normally its map mode is in pixels, but we need all sub-widgets to work in twips when tiled rendering. With this, the scrollbar widget (both the buttons and the button/background area of the scrollbar itself) is painted at the correct location when Writer comments have enough content so the scrollbar is visible. Change-Id: I4ee9ef8618974b965339078d2262364ec19732ef
2015-11-20Remove redundant toolbar:style="radio" propertySamuel Mehrbrodt35-204/+204
Change-Id: I56969839a93af975466ab6c28f2f87557e4d7f1b Reviewed-on: https://gerrit.libreoffice.org/20074 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-20Remove redundant toolbar:style definitionsSamuel Mehrbrodt35-177/+177
Change-Id: If255e6bebe501f1b0959613ce091b322af064628
2015-11-20add mapKeysToSequence/mapValuesToSequence methods to comphelperNoel Grandin3-23/+4
and use them Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec Reviewed-on: https://gerrit.libreoffice.org/20055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20SwPageFrm::IsOverHeaderFooterArea: check for IsActive() only laterMiklos Vajna1-3/+3
Checking for a bool is certainly cheaper than a chain of member function calls. Change-Id: I9520194e58e75264f3fcbb413a618e3995f59a4e
2015-11-19Remove redundant toolbar:style attributesSamuel Mehrbrodt22-37/+37
These have been defined in the widgets Change-Id: If46a6862872286a454804846128bd8658f60af9b
2015-11-19sw lok comments: optimize sidebar text control invalidationMiklos Vajna1-15/+19
Instead of invalidating the whole area, invalidate the sub-widget when the whole area of the sub-widget would be invalidated. With this, a test comment with enough comment to have a scrollbar results in 3 paintTile() calls instead of 11 ones (70% save). Change-Id: I2fe317549eefac9a63aaf50f5a9a242e15c4dc86
2015-11-19loplugin:sallogareasStephan Bergmann4-5/+5
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19sw lok comments: don't paint hidden comment sub-widgetsMiklos Vajna1-5/+3
Change-Id: Ia513821b43729951c7b097fea498f0e22b9d10ea
2015-11-19use comphelper::containerToSequenceNoel Grandin5-45/+10
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-18sw: use the proper item SwFormatEditInReadonlyMichael Stahl1-3/+4
Change-Id: I09f3c5cc9e98639bf2b7c4cb37197cb9fb819c82
2015-11-18sw: use the proper item SwFormatRowSplitMichael Stahl1-1/+2
Change-Id: Ie7b0d7f7d4549afbd9152d6afb0d0b6078e24bd9
2015-11-18sw: handle arguments in SwXTextDocument::initializeForTiledRendering()Miklos Vajna1-1/+7
Change-Id: I19efc6050c78162e0889437d4c8285d1a6714e82
2015-11-18vcl::ITiledRenderable::initializeForTiledRendering: support init. argumentsMiklos Vajna3-4/+3
Change-Id: I9a6a75457078dc6383673f4c1a2012b69b5cefdd
2015-11-18Unify menu-based toolbar controllersMaxim Monastirsky1-2/+0
The new GenericPopupToolbarController takes by default the popup menu controller that registered for the same .uno:Something command, and sets ToolBoxItemBits to ToolBoxItemBits::DROPDOWNONLY. If a different command specified using the "Value" property - takes the popup menu controller that registered for this command, and sets bits to ToolBoxItemBits::DROPDOWN. Change-Id: I75c5300bd27fcc9f618f2ee0df2aa6aefd088239 Reviewed-on: https://gerrit.libreoffice.org/20040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-18Remove redundant toolbar:text labelsSamuel Mehrbrodt1-1/+1
Change-Id: I9ca5739462742a4e3ec3a034918891e53022d6de
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin3-10/+4
and improve the script a little Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84 Reviewed-on: https://gerrit.libreoffice.org/20033 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18tdf#95888 sw: make click to header area show header controls againMiklos Vajna1-2/+4
Regression from commit 54a2c8c006e2f216e9d8c6b0ed625180c843c48b (tdf#39080 Interactive hide-whitespace mode, 2015-08-30), the problem was that SwPageFrm::IsOverHeaderFooterArea() checked if the header is active before accepting that the user clicked in that area. Don't require an active header at least in non-hide-whitespace mode, as the member function is used in the "could there be a header here" sense in SwEditWin::MouseButtonDown() to show the controls that allows actually adding a header. Change-Id: I6f905920113aed1512e333e718a8f26d88a3245d
2015-11-17sw lok comments: implement clipboard copyMiklos Vajna1-0/+12
Change-Id: I0f45b1a6ab198a8403073eea05497e76f758250c
2015-11-17sw lok comments: fix meta author/data size with custom zoomMiklos Vajna1-2/+3
Change-Id: I3310813c971aa7abffccc0b7f462e05caa83482e
2015-11-17sw lok comments: fix comment widget width with custom zoomMiklos Vajna2-4/+5
When tiled rendering, then only the render context (or failing that, SwViewShell::GetOut()) has the correct zoom level, so use that when doing pixel-to-logic conversion or scaling pixel values. Change-Id: I265a642b8253c6eced42da2a0e06a2de25c36ca8
2015-11-17Toolbar: Remove empty attributesSamuel Mehrbrodt10-112/+112
Change-Id: Id78cae55eb89520bd87713f9ea6c009c922f2870
2015-11-17An SwMailMergeConfigItem_Impl instance per SwMailMergeConfigItem looks sanerStephan Bergmann2-244/+227
...than fixing the avalanche of loplugin:staticmethods issues caused by b5eaa0f9f00cd62f4769c3e8860d788844ccf557 "use unique_ptr for pImpl in sw/," given that SwMailMergeConfigItem_Impl has mutable state? Change-Id: I342511d0f39086f33e2a8abd2c377341455d54a7