summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unotxdoc.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-10-02Instantiate spell dialog and paint in a paintDialog callTomaž Vajngerl1-4/+13
Change-Id: I7bd7f9cb33cd79d1e55ce51fe39917c5741bdf18
2017-10-02Add IDialogRenderable interface for rendering of dialogsTomaž Vajngerl1-0/+22
Change-Id: I1d85729a1ac1a99d33ea2bde1b50ccf4c05ca9a9
2017-09-26loplugin:flatten in swNoel Grandin1-179/+169
Change-Id: I77d92e7adc9af5c88ca1930c25a0585713f9e0d3 Reviewed-on: https://gerrit.libreoffice.org/42788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-07tdf#42982 Improve exceptions in text document apiSamuel Mehrbrodt1-55/+58
* Throw DisposedException instead of RuntimeException when the document has been destroyed * Add messages to RuntimeExceptions Change-Id: I5cc370ed835a0f620596754ac6339d2ef543f6c4 Reviewed-on: https://gerrit.libreoffice.org/42062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-1/+1
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17implementing callback for ruler invalidationAditya Dewan1-0/+8
adding commands to fetch and changee ruler state '.uno:RulerState' and '.uno:RulerStateChange' Change-Id: I66107039a7ae5893691feb45c8ab2e4aa476ea76 Reviewed-on: https://gerrit.libreoffice.org/40727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin1-2/+2
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-07Fix typosAndrea Gelmini1-1/+1
Change-Id: I4969e9e66de602a8c79774460a0215ef9d150372 Reviewed-on: https://gerrit.libreoffice.org/40795 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-07loplugin:constparams in sw part8Noel Grandin1-1/+1
Change-Id: I0fb51270da4b8f3049f1af2c2c788e516b3641e8 Reviewed-on: https://gerrit.libreoffice.org/40821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03lok - add support for in place chart editingMarco Cecchetti1-3/+86
This commit add a minimal support for editing chart embedded in a spreadsheet or a text document or a presentation. Graphic objects can be moved and resized, text objects can be edited. Change-Id: I8e637dabf328a94bd6bb0e309a245302cff421d8 Reviewed-on: https://gerrit.libreoffice.org/39342 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-21migrate to boost::gettextCaolán McNamara1-1/+1
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-06rework as a shared_ptrCaolán McNamara1-1/+1
mostly to try and track down a crash on exit of sw uwriter under windows Change-Id: Id67e93863056da319dd8225038d60a7f5783b103 Reviewed-on: https://gerrit.libreoffice.org/39604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-05new loplugin unnecessaryparenNoel Grandin1-1/+1
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: swStephan Bergmann1-1/+0
Change-Id: I224e9995962901e8740bfaed06d57f7c0389236c
2017-06-27loplugin:oncevar in swNoel Grandin1-17/+5
Change-Id: Ia96172489eec09607113d388a5b683bb6e0d2dec Reviewed-on: https://gerrit.libreoffice.org/39290 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann1-5/+7
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann1-9/+6
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-05Improved loplugin:cstylecast to reference types: swStephan Bergmann1-1/+1
Change-Id: I7206d3325b4bfedb852d559b68dc1678da524b41
2017-05-19make string translation loading more uniformCaolán McNamara1-9/+9
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-12remove unused uno::Reference varsNoel Grandin1-1/+0
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08loplugin:checkunusedparams in sw(part1)Noel Grandin1-1/+1
Change-Id: I4847b0f96033016e020212fb8d7331309db25b55 Reviewed-on: https://gerrit.libreoffice.org/37287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04loplugin:checkunusedparams in sfx2Noel Grandin1-1/+1
Change-Id: Iea88ddd619f10a2a2586ee24edbf07e246dcbb49 Reviewed-on: https://gerrit.libreoffice.org/37191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27remove sw bitmaps from .src filesCaolán McNamara1-10/+11
Change-Id: I9ccd69662f9d3a77d1921b3433b0e2f541960a90 Reviewed-on: https://gerrit.libreoffice.org/37020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-11loplugin:mergeclasses merge SwAnnotationWin and SwSidebarWinNoel Grandin1-3/+2
Change-Id: Idaf7d7e8e4da37e0ba423dca3e22dc6711ba806a Reviewed-on: https://gerrit.libreoffice.org/36380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: swStephan Bergmann1-1/+1
Change-Id: I1d52df4fe3f276ebf017aa7cfb7b313cefaf0844
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna1-2/+2
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-27create SfxInterfaceId o3tl::strong_intNoel Grandin1-2/+2
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6 Reviewed-on: https://gerrit.libreoffice.org/35722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22loplugin:redundantcast find redundant c-style enum castsNoel Grandin1-3/+3
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17sw lok: Use unique redline identifier, instead of array indicesPranav Kant1-1/+1
Use a static integer counter as identifier to each redline Change few unit-tets that was testing redlines by using a hardcoded array index. Instead use these unique redline identifiers now. Change-Id: I63aec3fc8ab10d0dad0c936600d16e96999a2bcd Reviewed-on: https://gerrit.libreoffice.org/35276 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-14sw: Simplify - no need to create a pointer herePranav Kant1-6/+6
Change-Id: I5c7d1d47f347b3ce8de6e2e4995da8724a464941 Reviewed-on: https://gerrit.libreoffice.org/35045 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-03-08lok: Do not use UNO for fetching tracked changesPranav Kant1-0/+47
See inline comment for reasons. Also, move the SwRedlineTypeToOUString function as inline to same header file containing redline types. Change-Id: I9b4be4f104c095b2ccd8287d935347c81fd25974 Reviewed-on: https://gerrit.libreoffice.org/34950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-03-07convert RES_FIELDS to scoped enumNoel Grandin1-3/+3
and rename to SwFieldIds Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6 Reviewed-on: https://gerrit.libreoffice.org/34924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-06remove some unnecessary use of OUString constructorNoel Grandin1-2/+2
found with git grep -nP '<<= OUString\(\w*[A-Za-z]+' Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67 Reviewed-on: https://gerrit.libreoffice.org/34864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin1-3/+3
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-22lok: these are not always plain asciiPranav Kant1-1/+1
Change-Id: I9783b6b2839805189015dbad8a97128c89e0a4a9
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann1-2/+2
Change-Id: I1a2239b596201bc0172f2a6ade177c10491be9c2 Reviewed-on: https://gerrit.libreoffice.org/34255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-05lok: Send complete anchor rectanglePranav Kant1-2/+6
... instead of just sending the X, Y coordinates Change-Id: Ie87b252ebfd64e806e1e5f66cfc27e77282cbaab Reviewed-on: https://gerrit.libreoffice.org/33875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-01-29cppcheck: postfix operatorJulien Nabet1-1/+1
Change-Id: I2b6f0c922b0e70ecbf79f60831ff5d71cd1438fb Reviewed-on: https://gerrit.libreoffice.org/33656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27Fix android buildPranav Kant1-2/+2
Change-Id: I3a39b7adc44a61f1bd4379c2a46e559ad12e7184
2017-01-27lok: Calculate and return parent comment idPranav Kant1-1/+1
... instead of just checking if its a root comment or reply one. Change-Id: I2539e6893ee69bfe12911807504df49edf422be2 Reviewed-on: https://gerrit.libreoffice.org/33470 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27lok: New commandvalues command - .uno:ViewAnnotationsPranav Kant1-0/+44
Change-Id: I1c3560ab4609c64da7a77e9a65febeb569ec1a3c Reviewed-on: https://gerrit.libreoffice.org/33468 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-127/+51
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-25use rtl::Reference in SwXTextDocumentNoel Grandin1-10/+7
instead of storing both a raw pointer and an uno::Reference Change-Id: I94746e7fafcc7d2206ac0c1a6481e6006421529b
2017-01-23lok: New feature flag to turn off tiled annotationsPranav Kant1-0/+8
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0 Reviewed-on: https://gerrit.libreoffice.org/33472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-21coverity#1399023 Unchecked dynamic_castCaolán McNamara1-1/+1
Change-Id: Id5d0a3cca9587f577000244a9776d7f1f61b5487
2017-01-20loplugin:staticaccessNoel Grandin1-1/+1
Change-Id: Ifed67e3c34663b056529719d78aa22f2a9f1da8d
2017-01-19Preserve whitespace with tiled rendering.Jan Holesovsky1-0/+4
Online is often used for taking minutes, and during that, people don't have time to play with the formatting - so it is annoying when autocorrect goes in the way. Change-Id: Ia1794c46d3003198764f666951821f693d710653
2017-01-14CreateBitmap takes a BitmapEx so no need to drop alphaCaolán McNamara1-1/+1
Change-Id: Ib0f70ea6d2a4733b16048e03d7019cf735b3b353
2016-12-14Disable the auto-completion for LibreOfficeKit for good.Jan Holesovsky1-0/+6
The editeng-like approach is terribly annoying when typing, particularly in bullet lists. Change-Id: I66175579f801fa028273d9680d7383d8eb37bf28
2016-12-05unroll IMG_NAVI_ENTRYBMP ImageListCaolán McNamara1-17/+12
Change-Id: Icb00102f064b845b33a072880c60a9aae5dc4a55