summaryrefslogtreecommitdiff
path: root/sw/source/uibase
AgeCommit message (Collapse)Author
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I62cb3b8927d664b3d5359ee6ac7db30d354f4821 Reviewed-on: https://gerrit.libreoffice.org/67496 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I67462369d93e9d9ff3c056800947c4b75f71ba5f Reviewed-on: https://gerrit.libreoffice.org/67486 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11using ScopedVclPtr with StartExecuteAsync not goodNoel Grandin
Which doesn't actually make much of a difference in this case because this is a welded dialog, which currently does not preserve a VclPtr owner of such dialogs. Perhaps we should rather fix the SfxTabDialogController::runAsync infrastructure to temporarily (a) preserve an owner for such dialogs (b) disposeAndClear such dialogs at least until we are done with welding? Otherwise this is very confusing. Change-Id: I568eb6813925299663ac3f90749b64076d404d19 Reviewed-on: https://gerrit.libreoffice.org/65708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10loplugin:indentation in swNoel Grandin
Change-Id: I4936284bff568b6bb47e5df3821f4ddd78260e92 Reviewed-on: https://gerrit.libreoffice.org/67568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-07[API CHANGE] Synchronize supported Writer document zoom rangesStephan Bergmann
On the one hand, SvxZoomSliderItem/SvxZoomSliderControl as used by SwView's SID_ATTR_ZOOMSLIDER support a range from MINZOOM (20) to MAXZOOM (600) (defined in sw/inc/view.hxx). Setting a zoom value outside that range for one causes the DBG_ASSERT "Looks like the zoom slider item is corrupted" in SvxZoomSliderControl::StateChanged (svx/source/stbctrls/zoomsliderctrl.cxx) to fire, and for another (when setting a too small value) tries to assign a negative value (which wraps around, and gets flagged by Clang's -fsanitize=implicit-signed-integer-truncation) to sal_uInt16 nCurrentZoom at nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom; in SvxZoomSliderControl::Zoom2Offset (svx/source/stbctrls/zoomsliderctrl.cxx). On the other hand, SwXViewSettings' support of css.text.ViewSettings' ZoomValue property allowed values in the range from 5 to 1000 (cf. SwXViewSettings::_setSingleValue in sw/source/uibase/uno/unomod.cxx), and some JunitTests actually set such values (10, 15) below the MINZOOM value of 20. The incompatible 5--1000 range was there ever since 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import", but looks rather random, so change it to match the 20--600 range instead. (And lets flag this as an [API CHANGE], to be on the safe side.) One of the JunitTests files that needed to be adapted, qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java, oddly mentioned a zoom value of 130% in a comment while using the value 15 in the actual code. (And did so ever since the test code's introduction in 26ebdfc472be16f0eb4110aab0335666d2ba5e62 "NEW: initial version".) Changing the code to 130 would cause JunitTest_sw_unoapi_1 to fail in strange ways, with disposed UNO objects, while changing the code (and comment) to 21 appears to work. Go figure. Change-Id: Id944ffdce501448312e008436e7038bf2aec63ac Reviewed-on: https://gerrit.libreoffice.org/67427 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-07o3tl::make_unique -> std::make_unique in swGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I871312c1077439377c67b76112f38b7019fa6fb1 Reviewed-on: https://gerrit.libreoffice.org/67376 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05tdf#42949 Fix IWYU warnings in include/svtools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57 Reviewed-on: https://gerrit.libreoffice.org/67102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-04Use indexed getToken()Matteo Casalin
Change-Id: Ie8e1a7fdc8c728c7e9e43a444f0d039b2d60b121 Reviewed-on: https://gerrit.libreoffice.org/67309 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin
Change-Id: I8484a6a6314d86026fd634e5c770443941aced48 Reviewed-on: https://gerrit.libreoffice.org/67310 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-04Use indexed getToken()Matteo Casalin
Change-Id: Iefbcb9c87a77264fa31b8554c122454dc1a88ead Reviewed-on: https://gerrit.libreoffice.org/67308 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-03sw: convert SwDBManager_Impl::pMergeData to unique_ptrMichael Stahl
Change-Id: I46848932bedc0287e55e950339bad9e656a6aca4 Reviewed-on: https://gerrit.libreoffice.org/67287 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-02-02tdf#105225 New background tab page for header and footer BorderJim Raykowski
and Background dialog Change-Id: I21979884b89a496ae36d5f1e48763680ae5da817 Reviewed-on: https://gerrit.libreoffice.org/64016 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-02-01One more "Don't add snap point < MINZOOM"Stephan Bergmann
...similar to a89f535d85bb7d32ccb5196813ba6233f45c0c83 "Don't add snap point < MINZOOM", this time triggered during CppunitTest_smoketest Change-Id: Ibee45c7b1ac9b29c7c4757bbdafd909076bcb058 Reviewed-on: https://gerrit.libreoffice.org/67243 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-01tdf#41202 allow decrease selection with shift-click in writerMartin van Zijl
Change-Id: Ic9522af1d3f41188f6feb31e68737fba83b3c6d4 Reviewed-on: https://gerrit.libreoffice.org/64995 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-01tdf#38101 remove highlight after using format painterMartin van Zijl
Change-Id: I631fd1357c7b066eaad98f5b2f0950f59330330e Reviewed-on: https://gerrit.libreoffice.org/64904 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-01tdf#44837 fix bug where replace all clears selectionMartin van Zijl
Change-Id: I3b1c95439434fab55ffd159dce0aacded4551a07 Reviewed-on: https://gerrit.libreoffice.org/65291 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-01-31tdf#79197 enable comment of a selected changeLászló Németh
with cursor position at the end of the change, ie. now using "Next Track Change" not only select the next track change, but it enables the icon "Insert Track Change Comment" and the menu item "Edit->Track Changes->Comment...", and it's possible to add comments as expected. Change-Id: I21318e70614d1285dd6fd90d8a7cc707fc0b5757 Reviewed-on: https://gerrit.libreoffice.org/67216 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-01-31Don't add snap point < MINZOOMStephan Bergmann
...as happens e.g. during JunitTest_forms_unoapi_1 when nFac is 0 (MINZOOM is 20), which then causes with Clang -fsanitize=implicit-signed-integer-truncation: > svx/source/stbctrls/zoomsliderctrl.cxx:137:24: runtime error: implicit conversion from type 'int' of value -20 (32-bit, signed) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 65516 (16-bit, unsigned) > #0 in SvxZoomSliderControl::Zoom2Offset(unsigned short) const at svx/source/stbctrls/zoomsliderctrl.cxx:137:24 > #1 in SvxZoomSliderControl::StateChanged(unsigned short, SfxItemState, SfxPoolItem const*) at svx/source/stbctrls/zoomsliderctrl.cxx:211:41 > #2 in SfxStatusBarControl::statusChanged(com::sun::star::frame::FeatureStateEvent const&) at sfx2/source/statbar/stbitem.cxx:283:13 > #3 in SfxDispatchController_Impl::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:859:16 > #4 in SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:247:16 > #5 in svt::StatusbarController::bindListener() at svtools/source/uno/statusbarcontroller.cxx:467:38 > #6 in svt::StatusbarController::update() at svtools/source/uno/statusbarcontroller.cxx:178:5 > #7 in framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > >::operator()(std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> >&) const at framework/source/uielement/statusbarmanager.cxx:72:34 > #8 in framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > > std::for_each<__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > >, std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > >, std::bidirectional_iterator_tag>, framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > > >(__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > >, std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > >, std::bidirectional_iterator_tag>, __gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > >, std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > >, std::bidirectional_iterator_tag>, framework::(anonymous namespace)::lcl_UpdateController<std::__debug::map<unsigned short, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController>, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, com::sun::star::uno::Reference<com::sun::star::frame::XStatusbarController> > > > >) at gcc/x86_64-pc-linux-gnu/9.0.1/../../../../include/c++/9.0.1/bits/stl_algo.h:3866:2 > #9 in framework::StatusBarManager::UpdateControllers() at framework/source/uielement/statusbarmanager.cxx:272:9 > #10 in framework::StatusBarManager::FillStatusBar(com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> const&) at framework/source/uielement/statusbarmanager.cxx:513:5 > #11 in framework::StatusBarWrapper::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) at framework/source/uielement/statusbarwrapper.cxx:123:40 > #12 in framework::MenuBarFactory::CreateUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ui::XUIElement> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) at framework/source/uifactory/menubarfactory.cxx:160:12 > #13 in (anonymous namespace)::StatusBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/statusbarfactory.cxx:73:5 > #14 in non-virtual thunk to (anonymous namespace)::StatusBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/statusbarfactory.cxx > #15 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx:441:39 > #16 in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx > #17 in framework::LayoutManager::implts_createElement(rtl::OUString const&) at framework/source/layoutmanager/layoutmanager.cxx:705:50 > #18 in framework::LayoutManager::implts_createStatusBar(rtl::OUString const&) at framework/source/layoutmanager/layoutmanager.cxx:822:44 > #19 in framework::LayoutManager::createElement(rtl::OUString const&) at framework/source/layoutmanager/layoutmanager.cxx:1472:13 > #20 in framework::LayoutManager::requestElement(rtl::OUString const&) at framework/source/layoutmanager/layoutmanager.cxx:1597:13 > #21 in SfxWorkWindow::UpdateStatusBar_Impl() at sfx2/source/appl/workwin.cxx:1456:29 > #22 in SfxWorkWindow::UpdateObjectBars_Impl2() at sfx2/source/appl/workwin.cxx:1225:5 > #23 in SfxWorkWindow::UpdateObjectBars_Impl() at sfx2/source/appl/workwin.cxx:1083:5 > #24 in SfxDispatcher::Update_Impl(bool) at sfx2/source/control/dispatch.cxx:1216:19 > #25 in SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) at sfx2/source/view/sfxbasecontroller.cxx:1250:50 > #26 in SfxBaseController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/sfxbasecontroller.cxx:528:13 > #27 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference<com::sun::star::frame::XModel2> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, comphelper::NamedValueCollection const&, rtl::OUString const&) at sfx2/source/view/frmload.cxx:595:18 > #28 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:712:13 > #29 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1149:37 > #30 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:383:20 > #31 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:169:14 > #32 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:620:12 > #33 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx > #34 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #35 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #36 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #37 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const at binaryurp/source/incomingrequest.cxx:236:13 Change-Id: I6875aa9cee8bd24231872c857be83b0d152a8dff Reviewed-on: https://gerrit.libreoffice.org/67178 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-30tdf#122428 show new comments in Manage ChangesLászló Németh
dialog window added by "Edit Comment..." of local menu of the listed changes. Change-Id: Ie6501d06f8ad233c44318cf8928892667534f6a2 Reviewed-on: https://gerrit.libreoffice.org/67162 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-01-30Unfloat: Need to move the page desc into the table node AttrSetTamás Zolnai
Change-Id: Ib9868bb31238905dd178fcf54c79f013079a037b Reviewed-on: https://gerrit.libreoffice.org/67126 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-01-29Unfloat: Fix some issues with unfloat operationTamás Zolnai
- Use the correct method to remove the frame, so DOC export will work correctly. - Remove pagedesc attribute of the first text node if the table is moved before it to avoid to generate a page break. Change-Id: I02802c4d25c947ec140b846c594848117815f1ce Reviewed-on: https://gerrit.libreoffice.org/67093 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-01-29tdf#52391 reject/clear formatting of format-only changesLászló Németh
Format-only changes had 1) disabled (in Manage Changes dialog window) or 2) bad rejection (Track Changes toolbar icons and Edit->Track Changes menu item functions "Reject"/"Reject All" resulted acception of the tracked format-only changes instead of rejection). Because format-only changes haven't had real rejection support, yet, this commit 1) adds an often useful reject-like function in the Manage Changes dialog window: instead of disabling Reject/Reject All, now these buttons clears direct text formatting in the area of the tracked format-only changes. Because this may be not a rejection (ie. the original text can contain direct text formatting), the labels of the button warn about it: "Reject/Clear formatting" and "Reject All/Clear formatting". Note: "Reject All" still rejects only insertions/deletions at (now first) pressing, as from commit a8a3928bd3614e52edc0a4df6f67ce53e787905c. 2) Icons and menu items "Reject"/"Reject All" clear direct text formatting in the areas of the tracked format-only changes. Note: this is still not ideal, but it can help to avoid of unintended direct text formatting until implementing upcoming ODF 1.3 change tracking. Change-Id: I87c3ac6165019cae9c49ed4591eaadef9e06beb5 Reviewed-on: https://gerrit.libreoffice.org/67080 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-01-29tdf#122079 - Document orientation is no longer changed in print dialogDaniel
Change-Id: I9d13cfd136f9b70674b3e43268525f8a6e1c0954 Reviewed-on: https://gerrit.libreoffice.org/66483 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-01-29Grab fous from child in spell dialogSzymon Kłos
Change-Id: I8c21623f7148ab2c05fe3d4198cf12231600f88d Reviewed-on: https://gerrit.libreoffice.org/67077 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-01-29Resolves: tdf#110429 width of page number wider than traditional widthCaolán McNamara
since... commit c80ac2ba4a6486e6161e17f9118ba1563b7fc00e Date: Fri Nov 11 18:16:52 2016 +0100 Avoid -fsanitize=signed-integer-overflow Change-Id: I2ec85e854ee1547d55b43b8540c357297d3b6cce Reviewed-on: https://gerrit.libreoffice.org/67068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-27Use indexed getTokenMatteo Casalin
Change-Id: I7c0bb328def955efce7b3866776e4d47a0ba32c0 Reviewed-on: https://gerrit.libreoffice.org/66947 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-27Use indexed getTokenMatteo Casalin
Change-Id: Icf0075e7487ea29db5f52846be531d30b231ee05 Reviewed-on: https://gerrit.libreoffice.org/66945 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-27Reduce OUString temporariesMatteo Casalin
Change-Id: I13777809dbee314e5b0002f8da9d5009c7fc3c5b Reviewed-on: https://gerrit.libreoffice.org/66946 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-25tdf52391 don't accept format-only changes secretlyLászló Németh
for Reject all in Manage changes dialog window. Now clicking on Reject all keeps format-only changes instead of accepting them during the requested rejection to allow to check them before acception. Note: LibreOffice cannot reject the format-only changes. If changes are all format-only changes, the Manage changes dialog hides the Reject all button, also the Reject button for the selected format-only changes. This patch extends this workaround to avoid unintended acceptance of rejected changes. Change-Id: I7e60ae1ed2bec660dcb19d372dcf6892be61dad6 Reviewed-on: https://gerrit.libreoffice.org/66902 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-01-25tdf#122607 Don't unnecessarily redo the layoutSamuel Mehrbrodt
Brings weird issues like out of place textboxes as described in the bug. Change-Id: I19341efc48188f0b52069401dc39ba05f4fcc7f6 Reviewed-on: https://gerrit.libreoffice.org/66874 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-01-25loplugin:unusedmethodsNoel Grandin
Change-Id: Ifb0c479e9d1aed1cd90d78ed23902fc05db556d6 Reviewed-on: https://gerrit.libreoffice.org/66862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24sw paste listener: expose pasted images as wellMiklos Vajna
Do it similar to SwXTextView::getSelection(), so that SwView::GetShellMode() determines when an image is selected (and otherwise assume text selection). Change-Id: I717e1358428daba842309260b54f82b62a0aaec1 Reviewed-on: https://gerrit.libreoffice.org/66879 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-01-24tdf#86731 Don't show 'spelling complete' when dictionary is missingSzymon Kłos
To check if dictionary is missing we have to run spelling which checks used language for each text portion. When AutoSpelling or manually invoked Spelling is performed SwDoc receives notification about missing dictionaries. Then it is possible to not show 'Completed' dialog. Change-Id: I040ce6565632294796c0206d20c4cd0066ca9643 Reviewed-on: https://gerrit.libreoffice.org/66813 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-01-24sw: make it possible to listen to paste eventsMiklos Vajna
The use-case is that the user pastes content and custom postprocessing is necessary for the pasted content. This is not easy by default, since the cursor is at the end of the pasted content, so the start is not known -- even if you intercept the paste UNO command. Precisely tracking the start is possible when using the internal API, SwReader::Read() does something similar already to track the undo range. Only expose the text selection after paste (as a start), but design the API in a way so that other pasted content type (e.g. image) can be added in a backwards-compatible way later. Change-Id: If35bda4244cc417e4858124fb75f7608b95fc556 Reviewed-on: https://gerrit.libreoffice.org/66807 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-01-24loplugin:constparams in swNoel Grandin
Change-Id: I4a0f51eae28c82eca3c44b9d06c0410f9645f62f Reviewed-on: https://gerrit.libreoffice.org/66833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24tdf#122901 track changes: keep paragraph top and bottom bordersLászló Németh
applied in Show Changes mode, instead of losing them after saving the document or hiding the changes. The bug occurred in paragraphs with directly preceding tracked deletions. Change-Id: I25a84aec0159f809dd7b67d4e530e87b01070f44 Reviewed-on: https://gerrit.libreoffice.org/66800 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-01-24tdf#122893 track changes: keep paragraph alignmentLászló Németh
and preset line spaces applied in Show Changes mode, instead of losing them after saving the document or hiding the changes. The bug occurred in paragraphs with directly preceding tracked deletions. Change-Id: I33d9db8ee3522470c4f2dfdcfbea4060db8769a2 Reviewed-on: https://gerrit.libreoffice.org/66789 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-01-23Related: tdf#122889 weld SwMailConfigPageCaolán McNamara
and reweld SwMailConfigDlg Change-Id: Icf7497db0cd2e9097752414eb11498c694723646 Reviewed-on: https://gerrit.libreoffice.org/66787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-23Resolves: tdf#122889 Mail config dialog is emptyCaolán McNamara
revert... commit 7ec12ce7e449d7849b3e67c443783110e2a50a17 Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Sep 28 20:24:35 2018 +0100 weld SwMailConfigDlg the contained page needs to be converted first Change-Id: I9788132b0ad11cec853be7339be1829386794511 Reviewed-on: https://gerrit.libreoffice.org/66781 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-21cleanup SwAuthEntry manual ref-countingNoel Grandin
And remove the "handle" nonsense and just pass plain honest pointers to a real type around Change-Id: Ic49443f5f8b20890d8335088331fff81585e8981 Reviewed-on: https://gerrit.libreoffice.org/66615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18Ensure itemset ranges are sortedMike Kaganski
What used to create sorted range automatically in FID_SEARCH_SEARCHSET handler in SwView::ExecSearch, over time turned into unsorted. this prevents using MergeRange on the sets created from the range list; see https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/24448/consoleFull > svl/source/items/itemset.cxx:641: > void SfxItemSet::MergeRange(sal_uInt16, sal_uInt16): > Assertion `!pRange[2] || (pRange[2] > pRange[1] && pRange[2] - pRange[1] > 1)' failed. So let's just use MergeRange in the SwView::ExecSearch itself, which would ensure early detection if the initial list gets unsorted. Change-Id: Id0232190f850e3feb463adfcb3153eafbaad7d9b Reviewed-on: https://gerrit.libreoffice.org/66607 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-01-18lok sw: When inserting shapes, do that in the middle of the visible area.Jan Holesovsky
Instead of in the middle of the entire document, which may be far away. Change-Id: I50a1a5f159b73a3803cd7a549939b73a366e7dc5 Reviewed-on: https://gerrit.libreoffice.org/66584 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-01-18lok: Make the welded Watermark dialog work with dialog tunneling.Mert Tumer
Change-Id: Ib5acd6fe4838aa09b74333c46cf38b9e0a926682 Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/66555 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-01-16pass RedlinData around by unique_ptrNoel Grandin
Change-Id: Ibe709e64b89e5e036e741203a14242f27df8c637 Reviewed-on: https://gerrit.libreoffice.org/66416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15rename GetBroadCaster->GetBroadcasterNoel Grandin
Change-Id: I76ca0cd28b4c6a95d9021c760f61db982283377b Reviewed-on: https://gerrit.libreoffice.org/66313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr in SwPostItMgrNoel Grandin
Change-Id: Icc946b986f62d986e979e6a3f3ba0d2c28cb9adf Reviewed-on: https://gerrit.libreoffice.org/66312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr in swNoel Grandin
Change-Id: I8c472a7d363eb308e9ec78aadd7f1f20c824447b Reviewed-on: https://gerrit.libreoffice.org/66317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15fix unnecessary deleteNoel Grandin
the erase on the preceding line will delete it, ever since commit a846c7106d4e4e1b8cc61e237cc2e158d037e816 Date: Wed Jul 25 12:26:15 2018 +0200 loplugin:useuniqueptr in SwGlossaryList Change-Id: I8f71bca8eebf762aeea3225d3a3b52ec2ac60e19 Reviewed-on: https://gerrit.libreoffice.org/66316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15simplify UCB_GetFileListOfFolderNoel Grandin
no need to use heap objects here Change-Id: Iadc35b019da7b9446ede79c96a9d8ce8c6db81ef Reviewed-on: https://gerrit.libreoffice.org/66315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr for SwTableAutoFormatNoel Grandin
Change-Id: Ib83be524b5c15e4639a834494726501ac7aa6755 Reviewed-on: https://gerrit.libreoffice.org/66314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>