Commit Graph

176 Commits

Author SHA1 Message Date
Stephan Bergmann
3784e4d5ef loplugin:includeform: sd
Change-Id: I4b75316c8644a591e6d1cfab4945ef123f945b53
2017-10-23 22:45:55 +02:00
Andrea Gelmini
42e8ca0f12 Removed duplicated includes
Change-Id: I7517640b028f2922a2dc45e76edd226240df434a
Reviewed-on: https://gerrit.libreoffice.org/43314
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-10 23:55:37 +02:00
jan Iversen
64b3b366da sd, implement HAVE_FEATURE_AVMEDIA
iOS does not support avmedia, therefore HAVE_FEATURE_AVMEDIA
is set, however not all sources test for it.

Change-Id: I7315dce08fef6e18c026d628c87d29ca201b1f8a
2017-10-09 19:13:55 +02:00
Caolán McNamara
1af5f6e8d1 set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a
Reviewed-on: https://gerrit.libreoffice.org/42048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08 11:27:18 +02:00
Caolán McNamara
1abd3b0e00 set parent for insert media file dialog
Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1
Reviewed-on: https://gerrit.libreoffice.org/41851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-03 16:14:42 +02:00
Varun Dhall
8a8bcd65e8 EditEngine: Removing BIN format from sd
Change-Id: Iafd88cdb0d0a84b611deda3bd276fb4b16604b92
Reviewed-on: https://gerrit.libreoffice.org/40331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-07 15:45:25 +02:00
Andrea Gelmini
b66cfdbc1a Removed duplicated includes
Mainly about "core_resource.hxx" and "strings.hrc".
It passed "make check" on Linux.

Change-Id: I994420d5e33d02b64929f8a51c548a7322d88a79
Reviewed-on: https://gerrit.libreoffice.org/40311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-23 13:22:07 +02:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* 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::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin
a98ac7220a TransferableObjectDescriptor::mnOle2Misc field is unused
which means that SfxObjectShell::GetMiscStatus becomes unused

Change-Id: I5c89a2cd5c77c7f08a57fdac08237aab514fc7fa
Reviewed-on: https://gerrit.libreoffice.org/38843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17 08:36:31 +02:00
Varun Dhall
112a825664 EditEngine: Added ODF_TEXT_FLAT copy/paste for sd
Change-Id: I23777477d31f30ee18ee8926a8f3170505f74264
Reviewed-on: https://gerrit.libreoffice.org/38535
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-08 20:36:50 +02:00
Noel Grandin
0265bdb92e convert GRFILTER constants to ERRCODE_GRFILTER_
since various code mixes these constants in with ErrCode values from
other code, let us just make it into real ErrCode values.

Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95
Reviewed-on: https://gerrit.libreoffice.org/38313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02 09:00:13 +02:00
Caolán McNamara
2155e04d63 make string translation loading more uniform
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-19 15:40:40 +02:00
Noel Grandin
dc735109bf loplugin:checkunusedparams in accessibility and avmedia
Change-Id: I94df9a65578792fb06f3b3259603f70ca1e0b3db
Reviewed-on: https://gerrit.libreoffice.org/37059
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28 13:56:32 +02:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
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-31 06:27:11 +00:00
Michael Stahl
653e181fb8 Revert "remove ugly operator* in DynamicErrorInfo"
This reverts commit b5e3f8a5fa.

The problem is this:

==24217== Conditional jump or move depends on uninitialised value(s)
==24217==    at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220)
==24217==    by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun::uno::Reference<com::sun::text::XTextRange> const&) (objstor.cxx:2300)
==24217==    by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765)
==24217==    by 0x29A6BC48:
SfxBaseModel::load(com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) (sfxbasemodel.cxx:1802)

The commit is bogus because it introduces a
DynamicErrorInfo::GetErrorCode(), which overloads
ErrorInfo::GetErrorCode(), which is used at least in
DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor
argument of DynamicErrorInfo but now returns pImpl->lErrId,
which is what this statement is trying to initialize.

Ultimately this causes my clang+ASAN build to fail because the
uninitialized error code happens to be detected as a mere Warning:

Test name: testMathMalformedXml::Import
assertion failed
- Expression: !xComponent.is()
- loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx

Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
2017-02-07 23:02:57 +01:00
Noel Grandin
b5e3f8a5fa remove ugly operator* in DynamicErrorInfo
I can see why you'd want to hide this horrible tunnelling of
information with objects registering themselves in a global list.
Urrgh.

Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095
Reviewed-on: https://gerrit.libreoffice.org/33984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07 09:12:58 +00:00
Oliver Specht
048e30c1f8 tdf#101828 handle rtf/richtext correctly
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0
Reviewed-on: https://gerrit.libreoffice.org/32682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-01-09 00:34:30 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin
beb8cfcf32 convert inventorId to scoped enum
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the
ScOrSwDraw enum constant

Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724
Reviewed-on: https://gerrit.libreoffice.org/31037
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21 12:09:09 +00:00
Caolán McNamara
117fc49c97 ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivatives
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2
Reviewed-on: https://gerrit.libreoffice.org/30344
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28 09:08:50 +00:00
Noel Grandin
d58c604eb3 convert DocumentType to scoped enum
Change-Id: I5a66d71db075df4680c54676dd1420e94c1a90b2
2016-10-11 14:32:40 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Noel Grandin
b1164b07f9 loplugin:constantparam in sd
Change-Id: I2bc989802c12b379a1ba4202f54ecfef1f339c8c
Reviewed-on: https://gerrit.libreoffice.org/28774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-10 11:28:16 +00:00
Samuel Mehrbrodt
fd6655080e tdf#73742 Don't replace existing image when inserting one
If we want to replace an image, we have an entry in the context menu for that.

Change-Id: I7a5326fecb72896c0709c9272769b8d51e4a5ca2
Reviewed-on: https://gerrit.libreoffice.org/26947
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-07-05 19:58:48 +00:00
Pranav Kant
9fee132c18 sd lok: Fix image insertion
OutputDevice::GetOutputSizePixel() returns invalid value for LOK
case which leads to incorrect image positioning when inserted.

Lets use page size for LOK, and place the image correctly to center
of the page.

Change-Id: Ie002d9a2d638cfab954c75a8cb545a003740f547
2016-07-05 20:24:52 +05:30
Noel Grandin
1342818790 convert SFXWB file dialog flags to scoped enum
Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b
Reviewed-on: https://gerrit.libreoffice.org/24881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12 06:57:19 +00:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Oliver Specht
96c1ae1d8e fix headless build
disables OpenGL and glew usage, lets --without-gui do what
--without-x did before and disables X related test

Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb
Reviewed-on: https://gerrit.libreoffice.org/23474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-03-25 11:05:47 +00:00
Noel Grandin
c09d0aa46c loplugin:constantparam in sd
Change-Id: I1a7f4cab28a70c45e5232e1c44f6ca6f7b014bff
2016-03-24 11:41:01 +02:00
Henry Castro
dc9ec9f359 tdf#97719: Canceling insert image dialog gives error dialog
Change-Id: I3ac9b0fe4d5a91d16af559ee8e38bc7be97cc694
Reviewed-on: https://gerrit.libreoffice.org/22408
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2016-02-17 00:33:19 +00:00
David Tardon
ec935c9b83 tdf#97814 make "insert 3D model" dlg translatable
Change-Id: I45865bdce1957bb4f970e069241e1bb7714b4f4c
2016-02-16 07:36:18 +01:00
Michael Stahl
d406d7c3a6 resolve TODO, remove SVVERB_SHOW
Change-Id: I10148330f1a356dbd423af98267c25d7128c3a86
2016-01-13 23:42:33 +01:00
Maxim Monastirsky
41dde8319c Kill remaining plugin bits
Change-Id: Icd99757b48626ef43313e8de42c4e5462f85a958
Reviewed-on: https://gerrit.libreoffice.org/21008
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-30 09:31:22 +00:00
Henry Castro
76a98f9d13 sd: fix not necessary to pass default argument
Change-Id: I4f4277bdf6b513bfce58d96000c485fbdc82a1b1
2015-12-23 23:40:01 -04:00
Henry Castro
30f1fa9993 sd tiled rendering: enable map mode to center images
In the tiled rendering case the map mode is disabled,
and conversion pixel to logical is not computed.

Change-Id: I0d54aaa897f0fe0df6e8b55334053dc66b6ea925
Reviewed-on: https://gerrit.libreoffice.org/20912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2015-12-23 19:39:47 +00:00
Thorsten Behrens
42645fe67c related tdf#96398 pull out more NPAPI-related code
Fixup windows PCH plus pulling out more code now unused due to NPAPI
removal. Follow-up to 4c18af27bf.

Change-Id: I8ad42a28139ceeab0cae1f608d55beb28c159db3
Reviewed-on: https://gerrit.libreoffice.org/20783
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-18 01:58:23 +00:00
Thorsten Behrens
06726aa39e [API CHANGE] Remove NPAPI-related UNO API
Follow-up to 4c18af27bf, related to
tdf#96398, removing more client code. The following published
interfaces are removed:

com::sun::mozilla::XPluginInstance
com::sun::mozilla::XPluginInstanceNotifySink
com::sun::mozilla::XPluginInstancePeer
com::sun::mozilla::XPluginInstanceSyncPeer
com::sun::mozilla::XPluginWindowPeer
com::sun::plugin::PluginDescription
com::sun::plugin::PluginException
com::sun::plugin::PluginManager
com::sun::plugin::PluginMode
com::sun::plugin::PluginVariable
com::sun::plugin::XPlugin
com::sun::plugin::XPluginContext
com::sun::plugin::XPluginManager

Change-Id: I3818a23e0f46fd01bfe9be11b57f6a551c013441
Reviewed-on: https://gerrit.libreoffice.org/20780
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-17 19:45:00 +00:00
Henry Castro
348d7f6170 sd: enable insert graphic when UNO command has URL file argument
When LOOL requires to insert a graphic, it uses UNO command ".uno:InsertGraphic", 
and the corresponding URL file image argument.

However Impress, ignores URL file image argument, and by default
pop up a dialog, so no image is inserted in LOOL.

Change-Id: If1939247f5df0bb4e7daf8816a2306e34419ae2f
Reviewed-on: https://gerrit.libreoffice.org/20747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2015-12-17 14:08:39 +00:00
Noel Grandin
a508f639a0 mark UNO structs as SAL_WARN_UNUSED, where possible
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
92c697c0e3 loplugin:nullptr (automatic rewrite)
Change-Id: If1b80da64ba575f07b31dce9bc0e34b7eb9f11a4
2015-11-10 10:31:38 +01:00
Stephan Bergmann
c50ab3b3b2 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I60f792a9047d8d9ad9cfc2a442c4dd179efec53a
2015-11-06 09:37:00 +01:00
Noel Grandin
a279535660 com::sun::star->css in sd
Change-Id: Ic0cbc857a3a9c66241b94c30bf8c859435f5a4b4
2015-10-29 09:50:19 +02:00
Jan Holesovsky
e5be07f516 sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
2015-10-16 12:12:27 +02:00
Jan Holesovsky
427c5dc6e0 sfx items: The bDeep parameter of SFX_REQUEST_ARG is always false.
Change-Id: I6d4f4cd09c83f94b26dd90577bdc6bc3226f58ab
2015-10-16 12:12:27 +02:00
Caolán McNamara
4920bbf768 coverity#736803 Dereference before null check
Change-Id: I0bdd28c1f43da999ae2bd35d45c1958061f90c07
2015-10-14 15:02:42 +01:00
Oliver Specht
89d39bc100 tdf#94559: 4th step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
    idl, editeng, sc, sd, sw, sfx2, sot, starmath

Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653
Reviewed-on: https://gerrit.libreoffice.org/19132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-06 07:29:37 +00:00
Caolán McNamara
7de2777bff sd/source/ui/func boost->std
Change-Id: I67874a8bad1549fd98e22a816d9fa52a17629a1e
Reviewed-on: https://gerrit.libreoffice.org/18850
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-25 15:13:45 +00:00
Caolán McNamara
b71ba617e5 sd/source/ui/inc boost::scoped_ptr->std::unique_ptr
Change-Id: Icf32ccd437c97dfa0ac3a569a3f2ec2b746ac300
Reviewed-on: https://gerrit.libreoffice.org/18822
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-24 16:54:36 +00:00
Caolán McNamara
177ea7a281 boost::shared_ptr->std::shared_ptr
Change-Id: I2c6ac98f0984534894759cfbf4449eb554801cf8
Reviewed-on: https://gerrit.libreoffice.org/18678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-23 11:19:17 +00:00