summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)AuthorFilesLines
2021-11-26sw: allow viewing OLE objects in protected sectionsMiklos Vajna1-1/+20
The problem was that we don't allow even opening embedded objects in protected sections, which means the content of multi-page embedded objects can't even be viewed in protected sections, which probably goes too far. Fix this relaxing the condition in SwEditWin::MouseButtonDown() to allow launching the OLE object on double-click, and then make sure that the native data is not updated in SfxInPlaceClient_Impl::saveObject() and the replacement image is not updated in svt::EmbedEventListener_Impl::stateChanged(). This is complicated by only the Writer layout knowing if a given OLE object is anchored in a protected frame, so pass down a callback to sfx2/ and svtools/ to check if the OLE object is protected. Not copying the protected bit has the benefit of behaving correctly if the section turns into non-protected: copying would not work properly, as SfxInPlaceClient is created on demand, so not re-created when the protectedness of the section is changed. (cherry picked from commit 4f9f1ac33366817df61c488a9f36b09c592ee939) Conflicts: sw/source/core/ole/ndole.cxx Change-Id: Ib3a8f2092d27dc1ebd3ef355c95a4a473988b163
2021-05-12embeddedobj: handle getting the visible area on a threadMiklos Vajna1-0/+2
The Windows OLE2 implementation of the embedded object interface assumes that the same thread is used for loading and saving the embedded objects. This means that in case the main thread is used for loading (e.g. from remote UNO, but with OnMainThead=true), but a thread is used for storing (without an explicit OnMainThead=true), then the underlying win32 API call failed and we returned a fixed size in EmbeddedObjectRef::GetSize(). Fix the problem by explicitly checking for RPC_E_WRONG_THREAD and adding error handling for that case. (cherry picked from commit d5cd62164d32273a25913c93aa04be9f7f3a4073) Change-Id: Icf1e7722d33a809fa671d1505b2a0155af040c71
2020-08-11tdf#134887 NewToolbarController: Use different icons for extra largeMaxim Monastirsky2-11/+54
Changes from master: - Resolved merge conflicts caused by the fact we're not backporting the other commit of tdf#134887. - Added a simple workaround for tdf#135369. Conflicts: framework/source/uielement/popuptoolbarcontroller.cxx Change-Id: I30621ab2e98c2387f3de67b2871516e5e25da761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99565 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> (cherry picked from commit 789f67940af461c18b0a2ffbc6313b91fb08f26a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100224
2020-07-05tdf#134479 allow disable font preview to work on existing font comboboxesCaolán McNamara1-9/+17
not just newly created one. you can only restore back to a text-only view, not a text+(icon/whatever) view Change-Id: Ic3becd7a942ee6b1dbabb57eebf1e25d1b626fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-15Related: tdf#132966 scrollbar not tracking valueset cursor positionCaolán McNamara1-4/+14
Change-Id: I408d872f89da67cd91f0282c1624fd33ddc6c538 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96298 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 5cce65171b12cd652d6a9857a9c0bad1c608a65c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96333
2020-06-15Resolves: tdf#132966 flag scrollbar to reformat when QueueReformat calledCaolán McNamara1-0/+1
Change-Id: I0fbb6eeab86b6ea43b271975eacad5faf7205246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96297 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit b31bcdd8322b57dc0cd5b093b8f3e8e59b32c37e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96286
2020-06-15bundle copies of the same ValueSet pattern together as a methodCaolán McNamara1-35/+16
Change-Id: Iea3c1de70ca840371aaffa3de678a622aa450c74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96296 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ec336de1bd600a131e6b7b0f2c2fdda98dd04fa3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96281 Tested-by: Jenkins
2020-06-13Language list: + Aka (CAR); Yaka -> Yaka (Congo), + Yaka (DRC) [yaf-CD]Eike Rathke1-1/+3
Change-Id: I4bf1e1affa046fcc9c7f06c8bbf6a40fc9c26cf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96167 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 90f5a2702c5c5968ee332880f3a200f1ce66d70a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96221
2020-06-07tdf#129537 call it none_line_button not none_color_buttonCaolán McNamara1-1/+1
Change-Id: I8b4c7028b7622d98531b1a0276d1047f47205368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95741 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-06tdf#129537 duplicate context in two different modulesCaolán McNamara1-1/+1
Change-Id: I39c710c224081175d62a0d419e6cbece5576a7a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95568 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann1-3/+3
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-22Related: tdf#133189 values not updated when units changedCaolán McNamara1-0/+4
do it for all of them, not just the writer one. A braver move. Change-Id: Ib1f635ccc6a70c1ef00f82449bd351c82da7a13d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94707 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-22tdf#133043 explicitly set the combobox edit textCaolán McNamara1-4/+2
because earlier we set it to "" rather that set_active(-1) so its still at the same active pos with the wrong text so setting a new active pos that's the same as the old active pos is a nop from the vcl case the original code used Edit::SetText so leave the logic as it is traditionally rather than try to change that Change-Id: I520d1c0371579850d073d37295ccc7d852298aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94699 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-22move InterimItemWindow to vclCaolán McNamara2-99/+0
Change-Id: If0a4a14708810c44d087b51961f2ecb3fda4df23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-22remove Size arg from Window::Draw and depend on GetSizePixelCaolán McNamara2-11/+9
90% of cases pass GetSizePixel as the Size arg already and this aligns Window::Draw with how Window::PaintToDevice works Change-Id: If5b024179a4b7a3b099177c2f6d4b1fb006b95ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21tweak to narrow stretchable widget defaultsCaolán McNamara1-0/+2
Change-Id: Idcaea1fbd9df0389e2182f1014e8d3ed45d1b2f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21center vertically the interactive cell widgets if they won't fitCaolán McNamara1-3/+11
Change-Id: Iae7cc83ece1707e9fd38708e4f0911e529565f23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94605 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21use for-range on Sequence in sfx2..swNoel Grandin1-4/+6
Change-Id: I09806869f2fdbae61f4c5d5c9db6859202bb63b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21weld ListBoxControlCaolán McNamara1-42/+17
Change-Id: I5a8c7d68e4c147eb938b0217dc6368c832e465c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94154 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-20weld ComboBoxControlCaolán McNamara1-44/+15
Change-Id: Ie862bb782b4c3e203af88d45c850ce0cab60f2e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-19Related: tdf#132536 limit to ~25 pre-rendered font previews for nowCaolán McNamara1-1/+6
The font caches look b0rked, the massive charmaps are ~never swapped out, and don't count towards the size of a font in the font cache and if the freetype font cache size is set experimentally very low then we crash, so there's an awful lot to consider there. Change-Id: I0e322109c02b00cfb6aff88b4fa650ac3cb1f178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94466 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15Resolves: tdf#132461 set color on mouse release, not pressCaolán McNamara1-1/+11
and rearrange to allow dnd to drop the currently selected color, not the one seen by SelectHdl which is now called on mouse release which allows the dnd from color bar to gradiant tool to work as expected Change-Id: Ib54850ff8f73dc3a0d08c76060309a7a74d2cc8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94314 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13loplugin:unusedmethodsNoel Grandin1-14/+0
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-1/+1
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10compact namespace in svtoolsNoel Grandin20-41/+41
Change-Id: I281e162e4aafaf27fa4956b33a45883de163cca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08remove TriStateBox classCaolán McNamara1-1/+2
Change-Id: Ia6c76a9f0fc0be7790d0c801cbca4a7b8d478976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93680 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-29don't run generate preview idle if there are no fonts in the listCaolán McNamara1-2/+4
and reset preview idle when font list is cleared Change-Id: Ice8c149754fbf64c9f81aa812465f0269de4c9d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93161 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I50a80014addf5fb6a3974139249f45f6a2e67d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92939 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann2-0/+2
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-26tdf#132424 don't generate font previews in advance for loolCaolán McNamara1-1/+2
Change-Id: I393db7b019fe16b2b7361bd20ec99dc5671ba1ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-26fix make screenshot breakageCaolán McNamara1-32/+0
Change-Id: Ieb2a4ee7475de2f3f0b6de6c1f3a5c305805131f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-26update pchesCaolán McNamara1-2/+2
Change-Id: I83a61da7dda6c72552eecd377f1c3744c92a797e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25rename SvtValueSet back to ValueSetCaolán McNamara4-216/+216
Change-Id: I51ab96ffef7acc0d416d13ac8e380e49381f4d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25remove newly unused ValueSetCaolán McNamara6-3082/+0
Change-Id: Ia2c587af9846129278caf66ab504d1a1a1ac6256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92897 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25loplugin:unusedenumconstantsNoel Grandin1-2/+1
Change-Id: If2473097c1c8e66e09238061da9d186d4c8e3d9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92871 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24Typo: LANGUAGE_ENGLISH_CARRIBEAN->LANGUAGE_ENGLISH_CARIBBEANJulien Nabet1-1/+1
Change-Id: Ibae29e8f0c083991ee66cc32113025d0cc8a6891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92877 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-24loplugin:unusedenumconstants BrowserModeNoel Grandin1-2/+1
Change-Id: Ida607fedc15062863f9de771fc7005f8c60cb0b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24weld StylesPropertyPanelCaolán McNamara1-1/+1
and SvxStyleToolBoxControl, etc. use a GtkOverlay to support the submenu hackery in the Style wysiwyg combobox dropdown Change-Id: I17baa56f382243070ee49e6d707e97324e4f4d67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85720 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-24loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: Ieec5099a8ce9fa3f07e36be244071efc1b101cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-23weld ListBoxControlCaolán McNamara3-2/+24
Change-Id: I7f47814a724920f04ce1638b8afa3549ccb6a7c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-23weld ComboBoxControlCaolán McNamara2-0/+30
Change-Id: Ifdb76cc61e6270f8a04fec2534dcd29d27e8281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92724 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22weld EditControlCaolán McNamara2-0/+27
as used by the LibreLogo toolbar Change-Id: Ice60d1f5146a58cab5bab44a12a2bdcf4dbd77ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22move InterimItemWindow to svtoolsCaolán McNamara2-0/+99
Change-Id: I058b1d96a3ddfaa1aa96f66d0ebc6fa68900a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen1-0/+1
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-21weld FontNameBoxCaolán McNamara2-202/+307
with custom row rendering Change-Id: Ia909b5b9ad56b6ea4611e9ea0a1e2cb0064a8cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91841 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-20drop EnableSelectAllCaolán McNamara1-1/+0
Change-Id: I57dcca28daf7fe8544ee524b8b41bbc1fe591fac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92489 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-19tdf#131951 related, improve perfNoel Grandin2-26/+4
similar to commit 9429dacc7ff93f99dd84532357020669df33a0c5 tdf#131951: automatically increase buffer size in a few places, let the OUStringBuffer handle large tokens, it has faster handling than repeatedly appending to an OUString Change-Id: I609b84b36e817fbcd6d366c53cd2e8b865216712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92503 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-19tdf#131951: automatically increase buffer sizePavel Klevakin1-21/+1
This will reduce number of string concatenations and therefore reading time of large data chunks. Change-Id: I6d59ba60270511edf03a604aef06dab0a1de2478 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92456 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17Revert "[API CHANGE] remove some primitives rendering settings"Noel Grandin1-4/+149
This reverts commit c71656f51a09e88ecae4f3423c96fee84778647d. Reason for revert: I give up Change-Id: I2a09c36c1f0d731f4d3f7d809364de7efa8d8a58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-16[API CHANGE] remove some primitives rendering settingsNoel Grandin1-149/+4
Remove the following settings: QuadraticFormControlRenderLimit Quadratic3DRenderLimit RenderSimpleTextDirect RenderDecoratedTextDirect SnapHorVerLinesToDiscrete which have no way to be set from the user interface. Change-Id: Ie96531425f5ba6021ade4f247b18b99092fd7e5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>