Commit Graph
90 Commits
Author SHA1 Message Date
Tomaž Vajngerl 7fbb96c2fb Move (and rename) graphic stuff from svtools to vcl
This is preparing to change how GraphicManager works where it
won't base itself around GraphicObject anymore but Graphic. No
functional or cosmetic change was made to the classes, only
changes that were needed because of the move and rename.

The only thing that wasn't moved is the GraphicRenderer as it
is not needed in vcl for now (but makes sense to move it in the
future to keep graphic stuff together).

grfmgr was renamed to GraphicObject as the GraphicManager will be
changed a lot and most likely moved out, so the name grfmgr won't
make any sense anymore.

All the UNO implementations were renamed with a prefix Uno and
used the same name as the class name. This is made to be more
specific which are the Uno objects (for example graphic.cxx
contained the implementation of XGraphic, which is similar to
graph.cxx contains Graphic).

Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137
Reviewed-on: https://gerrit.libreoffice.org/51068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11 13:37:21 +01:00
Caolán McNamara 6a4c464b49 weld native message dialogs
just the straight-forward MessageDialog cases first

a) remove border_width from message dialog .ui so as to take
the default border width
b) retain 12 as default message dialog border for vcl widget case
c) remove layour_style from message dialog button boxes so as to
take the default mode (a no-op for vcl widget case)
d) use gtk response ids (vcl builder will converts to vcl ones)

Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154
Reviewed-on: https://gerrit.libreoffice.org/50143
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22 22:07:38 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Stephan Bergmann 97059fbd09 loplugin:includeform: svx
Change-Id: I4057fe05983fb2b63b592ffd325894c12b9cb5b2
2017-10-23 22:45:50 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +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 ef8341f05e bump FileDialogHelper to XFilePicker3
Change-Id: I726676aaa8944bc3b6418abe305ad03f8ec96c59
Reviewed-on: https://gerrit.libreoffice.org/41783
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-01 16:58:41 +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::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-21 08:20:50 +01:00
Marco Cecchetti f715c6cfa4 support for filter dialog when an image is exported from context menu
When user save the selected image in a non-vector format the filter
dialog used in Draw pops up for filter setting.

Change-Id: Ic98b48a47322e807627b7a2ccd8044ec0db30efc
Reviewed-on: https://gerrit.libreoffice.org/40223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-20 15:35:11 +02:00
Armin Le Grand 5868745db7 emfplus: make VectorFormats Emf/Wmf/Svg work
make complete turn around and internal buffering
for Emf/Wmf/Svg work, including images in ODF and
re-save from UI. The correct FileType has to be
determined. It has shown that *.wmf exist that really
contain *.emf, so this turn around will not alter
the binary data, but may change the mimetype

Change-Id: I4fd92629236c12114f7b7c30234a3d3a9917dfaf
2017-07-15 11:01:29 +02:00
Marco Cecchetti dd74a659c6 support for saving a modified image instead of original version
Normally when you save an image through the "Save..." entry in the
context menu for an image, the saved image is the original one more
eventually applied filters (which are not removeable).
Further applied transformations like rotations, cropping, color
effects are not included in the saved image.
This patch offers the user to choose if saving the original image
(with filters) or the modified version through a pop-up dialog.
The new feature is available in Writer, Draw and Calc.

Change-Id: I4f983e3a5e8a6839fa5789a96c4d8c44477c1fd7
Reviewed-on: https://gerrit.libreoffice.org/39480
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-04 10:28:35 +02:00
Noel Grandin a6aa57ff59 use ERRCODE_NONE instead of 0
peeling off a small chunk of my ErrCode strong_int conversion

Change-Id: Idc89e8496083beed7608cba705cd981139eb7111
Reviewed-on: https://gerrit.libreoffice.org/38777
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14 15:42:31 +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 2962ceec4b remove some unnecessary temporary OUStrings
found with:
git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return

Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02
Reviewed-on: https://gerrit.libreoffice.org/37463
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-11 09:26:28 +02:00
Jochen Nitschke 959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Gabor Kelemen 577ae613e0 tdf#103872 Localize "Export as image" window title
In Calc select Export as image from the local menu
of a chart to see this

Change-Id: I9753f4750bd619f161c52f9e067290743ad2f2ec
Reviewed-on: https://gerrit.libreoffice.org/36758
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-04-21 09:56:47 +02:00
Noel Grandin bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin 0552ec9828 convert SdrHintKind to scoped enum
Change-Id: I77ad33425d440263a71bc94f41d8e141f16dfb78
2016-08-22 08:24:48 +02:00
Miklos Vajna 7d76bb251e vcl: add graphic export-as-pdf filter
In case the metafile was imported from a PDF originally, then this
allows storing the PDF stream next to the graphic. This means that e.g.
in Writer choosing 'Save' from the context menu of the graphic can write
the original PDF stream, not the replacement metafile.

Change-Id: I4ab45d5af17fe46d7538df6d79d6b57ed163572a
Reviewed-on: https://gerrit.libreoffice.org/26628
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-24 11:51:01 +00:00
Noel Grandin fe6ac2d11a Convert GfxLinkType to scoped enum
Change-Id: Iae074ef0927a55f1fbf401cb66f4f183213f547c
Reviewed-on: https://gerrit.libreoffice.org/25656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:26:25 +00:00
Noel Grandin eaba47bce4 Convert XOUTBMP to scoped enum
Change-Id: I8d10cdc78ca73d86bdc9aa08fca591f6eb85eb9e
Reviewed-on: https://gerrit.libreoffice.org/25196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22 17:51:13 +00:00
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
Noel Grandin 789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Michael Stahl 0835f5b80c svx: replace boost::bind with C++11 lambda
Change-Id: I68f9559fab9a344979dc39b81f3738877483b5fe
Reviewed-on: https://gerrit.libreoffice.org/22106
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-04 14:25:38 +00:00
Stephan Bergmann 6cd7bf2043 loplugin:nullptr (automatic rewrite)
Change-Id: I71682f28c6a54d33da6b0c971f34d0a705ff04f5
2015-11-10 10:31:50 +01:00
Noel Grandin 3d96f1ef55 use uno::Reference::set method instead of assignment
Change-Id: I2f8c9cb71a06f7796576509f605796624e654422
2015-11-05 09:59:30 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Julien Nabet 8273350ff4 Prefer getSelectedFiles to getFiles (sfx2+sw)
+ tweak files of other modules which needed it

Change-Id: Ibb673eba6609734addd233ac1477698c01b94678
Reviewed-on: https://gerrit.libreoffice.org/19180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-10-07 05:05:47 +00:00
Caolán McNamara 31ebd9f475 boost->std
Change-Id: Ic18be8b86727dd1179a7e39c70493d088ed00557
2015-09-16 15:34:23 +01:00
Caolán McNamara afe5672fbc cppcheck: noExplicitConstructor
Change-Id: I27c24d3284a8e0678fc5c041426b4a7e71cbd363
2015-05-27 13:54:54 +01:00
Tor Lillqvist c07a3b0396 Get rid of initial :: for the svx namespace
Change-Id: I03e428a749bca409ebac9c142acaddafcbfeca23
2015-04-30 09:11:40 +03:00
Michael Stahl 582cdc273e tdf#89750: svx: fix ExternalToolEdit on Windows
While adding check that the temp file move succeeds, overlooked that the
file handle is actually leaked, which means the move will fail on WNT
because the file is already open.

(regression from ef490df2119523e1761f99b5fdbb387c2c71608d)

Change-Id: I779ccde79871930fef3bad7e17b633fb62e36a46
2015-04-14 23:40:06 +02:00
Stephan Bergmann a5d6cd83d7 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I571893a8340ee0f4a0de393395b5eef7a4795451
2015-03-31 13:17:04 +02:00
Stephan Bergmann 5429049e3b const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ic90647cc4da716b54b00520b683cee027a664c22
2015-03-26 15:33:38 +01:00
David Tardon 75fa617541 ensure the default export filter is really available
Change-Id: Ie9b8a25d8d33c6211c43277f4d3b4cdbd79f5783
2015-01-30 14:03:22 +01:00
David Tardon 89321e312b remove copypasta
Change-Id: If3e33ee0a24e8a4850b2242ab3806d8dc57ddf09
2015-01-30 14:03:22 +01:00
David Tardon be45f378d5 tdf#85195 only check export formats for default format
What good would would a pre-selected export filter format to me if I
cannot save into it?

Change-Id: I9e5d06cec5ffa0ba325b8bfcfadc4fd55d39017a
2015-01-30 14:03:22 +01:00
Michael Stahl e5bb4e6dbc argh damnit
Change-Id: I639d82ace116a09218cd71c62ac9e37efd6d957d
2015-01-19 12:44:05 +01:00
Michael Stahl 5e4dc85725 svx: ExternalToolEdit: don't terminate if SystemShellExecute throws
Change-Id: Ia527a2c9467e2ab097cf688164f4176a52fa1d36
2015-01-19 12:36:21 +01:00
Michael Stahl c8ae30a720 svx: ExternalToolEdit: check that temp file is actually created
Change-Id: I03e49493c549561b4dc806f1e191a73d06733cff
2015-01-19 12:32:04 +01:00
Michael Stahl 5f6bdce0c0 rhbz#1136013: svx: try to make the ExternalToolEdit not crash all the time
This thing was starting a timer that re-starts itself forever, and when
the file it was watching changed, it would just assume the drawing
objects were still there (and the document, for that matter...)

Change-Id: I35f187f0828097a05618dc1733dce819fc6bffc6
2015-01-17 01:03:30 +01:00
Noel Grandin 7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
Stephan Bergmann 0f5e917024 Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call).  Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).

(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added.  The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like

  'x' == s

is an abomination that shall not be abetted.)

Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-17 16:39:33 +01:00
Andrea Gelmini da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Phyzer 125c3a18db Changed some options from picture/graphics to image
Change-Id: If86fae691d4926c896c6d1da1863cd8397a38718
Reviewed-on: https://gerrit.libreoffice.org/11429
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-21 12:18:14 +00:00
Michael Stahl 57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
Takeshi Abe b9019d2920 Avoid possible memory leaks in case of exceptions
Change-Id: I0cea121c8a8dbbc7b9f44ab712ff692243889816
2014-06-23 18:54:35 +09:00
Stephan Bergmann 8f703221a0 Clean up function declarations and some unused functions
Change-Id: Ic720aa7b30bbe56d67e0b65f3e047ad3ae521a97
2014-04-10 11:24:39 +02:00
Caolán McNamara bd3015129a coverity#738868 Uninitialized pointer field
Change-Id: I150b47a6d4463479af7206b15441fefb27b8f603
2014-04-02 15:51:44 +01:00
Alex Henrie 156b5a1587 Do not convert SVGs to JPEGs when editing with external tool
This patch adds support for opening SVGs in the user's default SVG
viewer/editor. If the image cannot be exported to SVG directly, it is
exported as PNG instead. In no case will an SVG or an unrecognized
format be lossy-converted to JPEG.

Change-Id: I46dc8548c3cfb4d24a4a0078d4e3d7eee8367b1c
2014-03-07 19:37:54 +01:00