summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-05Index returned by getToken is always lower than string lengthMatteo Casalin
Also take care of handling possibly empty strings, for which the initial 0 index would fail the comparison. Change-Id: I280fac697554f2a4513a641ac258b1d2baf803f4 Reviewed-on: https://gerrit.libreoffice.org/68117 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Index is not needed for single getToken callMatteo Casalin
Change-Id: I46d466c0526797e5c246dea3c68a6b2f865964e0 Reviewed-on: https://gerrit.libreoffice.org/68116 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Use indexed getToken()Matteo Casalin
Change-Id: I76b565d24a27eda62383df757f97d197c3b276a8 Reviewed-on: https://gerrit.libreoffice.org/67646 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Introduce o3tl::underlyingEnumValueStephan Bergmann
Change-Id: I6554eb86326159b0da707539f45c411f61c0f3de Reviewed-on: https://gerrit.libreoffice.org/68761 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05Resolves: tdf#123815 null terminator included in stringCaolán McNamara
regression from... commit 18d636063fd7be165e7888af49372a6e2b851776 Author: Caolán McNamara <caolanm@redhat.com> Date: Mon Jun 19 09:46:31 2017 +0100 ofz: use OString instead of bare char* this is no use to the reporter though, as the document format is 10 and 11 is the oldest the filter will open Change-Id: I4cdfe92e37f047493a6eab95f0e8e9f5dced1a35 Reviewed-on: https://gerrit.libreoffice.org/68745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05Use o3tl::is_typed_flags for ControlStateStephan Bergmann
Change-Id: If54f385e8c7e19106f03f4a52f99bc50b4878f37 Reviewed-on: https://gerrit.libreoffice.org/68760 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05OptimizerDialog: use local method to reduce OUString operationsMatteo Casalin
Change-Id: I356693ba9992c691c9079b3eaa2f26e57b005e1c Reviewed-on: https://gerrit.libreoffice.org/67640 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05deal with code duplication at drawing from a definition fileTomaž Vajngerl
Change-Id: Ie2f6ace37562a251d639c5049c91a4ba09576c0b Reviewed-on: https://gerrit.libreoffice.org/68754 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Add spinbox SVG buttons, but use a definition draw for nowTomaž Vajngerl
Change-Id: Iff40c7c315ed2473e7a5bd84a6449aedcf646e2f Reviewed-on: https://gerrit.libreoffice.org/68753 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic tabbar widgets from the theme definitionTomaž Vajngerl
Change-Id: I51f8868abff3f3e38bd70ea1fc99a9cf5aca92a6 Reviewed-on: https://gerrit.libreoffice.org/68752 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic progress from the theme definitionTomaž Vajngerl
Change-Id: If2c6f434dd64cf1b3bab340dc6c4d73f439bcfdf Reviewed-on: https://gerrit.libreoffice.org/68751 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic fixedline from the theme definitionTomaž Vajngerl
Change-Id: I791d33e4cea14f49609434e39f681cf47864fc67 Reviewed-on: https://gerrit.libreoffice.org/68750 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic scrollbar from the theme definitionTomaž Vajngerl
Change-Id: I2a017746f02c547413c949a1728ebbfa781a7f66 Reviewed-on: https://gerrit.libreoffice.org/68749 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05sw_redlinehide: fix RSID related asserts regressionMichael Stahl
Due to sw_redlinehide the SwTextNode::MakeFrame() is skipped on SwTextNodes that are merged due to redlining. But then the IgnoreStart/IgnoreEnd flags on the hints are not initialised and some assert like assert(pHt->IsFormatIgnoreStart()) fails. tdf90056-1.odt is an example document. There doesn't appear to be a convenient place to initialise it per-node as it is finished; the ODF import inserts APPEND_PARAGRAPH before inserting the hints themselves. So remove the initialisation from MakeFrame() and just do it in SwReader::Read(). Change-Id: Ib33fe3033fc05bd2f5ef2ac8d059d587642ccf48 Reviewed-on: https://gerrit.libreoffice.org/68748 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-05rename CuiConfigGroupBoxResource_Impl back to SvxConfigGroupBoxResource_ImplCaolán McNamara
Change-Id: I21e9258f5f57acd5e27cee5c1cca37b8b56f3040 Reviewed-on: https://gerrit.libreoffice.org/68702 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05unused SfxConfigGroupListBoxCaolán McNamara
Change-Id: Ia31f70b0d22b4bca13e46f3fbce440288bafd26f Reviewed-on: https://gerrit.libreoffice.org/68700 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05weld SfxAcceleratorConfigPageCaolán McNamara
fixes a leak in the KeyList too Change-Id: I603218ff99481bc006df329c770ea6fe6f147483 Reviewed-on: https://gerrit.libreoffice.org/68694 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05sync get_selected_id with get_active_idCaolán McNamara
Change-Id: I983cc45d13e02a020f608b8e9abfd2f12f7b10f5 Reviewed-on: https://gerrit.libreoffice.org/68741 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05improve documentation of soffice --accept parameterMichael Stahl
Change-Id: I8058bad949c973981013d099dba78b3e64cee0aa Reviewed-on: https://gerrit.libreoffice.org/68735 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05sync get_active_id implsCaolán McNamara
Change-Id: I6b0595f6386657afa28b2cb249ea69aa51e5fb4a Reviewed-on: https://gerrit.libreoffice.org/68740 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05Upgrade to latest HarfBuzz 2.3.1Stephan Bergmann
As a side-effect, this gets rid of some Clang -fsanitize=implicit-signed-integer-truncation warnings. The various external/harfbuzz/*.patch no longer applied and appear not to be necessary any more. (But a new external/harfbuzz/msvc.patch became necessary.) <https://dev-www.libreoffice.org/src/harfbuzz-2.3.1.tar.bz2> was downloaded from <https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.3.1.tar.bz2>, and HARFBUZZ_SHA256SUM in download.lst matches <https://www.freedesktop.org/ software/harfbuzz/release/harfbuzz-2.3.1.tar.bz2.sha256>. Change-Id: Ic85acd14b4f488b3d88ce1bafc93be271928006e Reviewed-on: https://gerrit.libreoffice.org/68731 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05Use pkgconfig to detect PostgreSQL if there is no pg_configTomáš Chvátal
pg_config is meant for linking server extensions, clients should use pkg-config instead to build against libpq. This fixes build with PostgreSQL 11. Change-Id: Ic0b5fc9cb7169f44c00a1edf7218212c360ec235 Reviewed-on: https://gerrit.libreoffice.org/68734 Tested-by: Jenkins Reviewed-by: Tomáš Chvátal <tchvatal@suse.cz>
2019-03-05Draw basic slider from the theme definitionTomaž Vajngerl
Change-Id: I5ccd6c2e743324cee2a030e55425df4791e12e2f Reviewed-on: https://gerrit.libreoffice.org/68719 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Use a unordered_map for mapping of xml element to control typeTomaž Vajngerl
Change-Id: Id0409f35a21307ed41a0da27c625c4b7784811d6 Reviewed-on: https://gerrit.libreoffice.org/68718 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Update checkbox and radiobutton SVG imagesTomaž Vajngerl
Change-Id: I5e9d5c9fb71340b55145bd2db09cd43982fbb275 Reviewed-on: https://gerrit.libreoffice.org/68717 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Draw basic spinbox from the theme definitionTomaž Vajngerl
Change-Id: I9b8379846a82f51365da7e7e2fd63cc21eb575a2 Reviewed-on: https://gerrit.libreoffice.org/68714 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05Use SVG image to draw the checkbox widgetTomaž Vajngerl
Change-Id: I559ac167970581477bf9f9a02904b11050e31766 Reviewed-on: https://gerrit.libreoffice.org/68713 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05fix ScDetOpList::operator==Noel Grandin
should be comparing the values of the elements, not the pointers. Regression from commit 927447356fb7025d2b61073f525adc24643c7925 Date: Sat Sep 12 16:49:29 2015 -0600 replace boost::ptr_container with std::container<std::unique_ptr> noticed while doing some other plugin work Change-Id: I96230e52571e9a96e1c96f53f61bbc5afe902b31 Reviewed-on: https://gerrit.libreoffice.org/68738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Add missing DoCloseAurimas Fišeras
Change-Id: I7c6f055a93ece2c80eb0f9c4974829d479d1edca Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/68617 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05Add missing DoCloseAurimas Fišeras
Change-Id: Ie315d490da6d8c1f62edc54d662e169fa827f610 Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/68618 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#123745 vcl: fix some crash in Window::SetHelpHdl()Michael Stahl
Qt5 has some QEvent::DeferredDelete thing, perhaps that's why it calls this on a disposed Window? 0 vcl::Window::SetHelpHdl(Link<vcl::Window&, bool> const&) (this=0x60cf9e0, rLink=...) at vcl/source/window/window.cxx:1825 1 SalInstanceWindow::clear_child_help(vcl::Window*) (this=0x7fa40c0, pParent=0x60cf9e0) at vcl/source/app/salvtables.cxx:825 2 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:962 3 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:963 4 std::default_delete<weld::Window>::operator()(weld::Window*) const (this=0x60d0b90, __ptr=0x7fa4190) at /usr/include/c++/8/bits/unique_ptr.h:81 5 std::unique_ptr<weld::Window, std::default_delete<weld::Window> >::~unique_ptr() (this=0x60d0b90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274 6 SalFrame::~SalFrame() (this=0x60d0b40, __in_chrg=<optimized out>) at vcl/source/app/salvtables.cxx:73 7 Qt5Frame::~Qt5Frame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/qt5/Qt5Frame.cxx:167 8 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34 9 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34 10 QObject::event(QEvent*) (this=0x60d0b30, e=<optimized out>) at kernel/qobject.cpp:1242 Change-Id: I2ac8cb24924ea3178c2b3eed14350515d8506ec3 Reviewed-on: https://gerrit.libreoffice.org/68581 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: convert Qt5FilePicker and Qt5Menu to RunInMainThreadMichael Stahl
... and also convert KDE5FilePicker. And Qt5Frame. The UNO methods in Qt5FilePicker/KDE5FilePicker have to ensure that the thread actually owns SolarMutex, because if RunInMainThread() is called without that it will deadlock. Change-Id: Ie4d2f494ac81c799ec7c9a3acb3a9b0f77bb6361 Reviewed-on: https://gerrit.libreoffice.org/68357 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: fix Qt warning Qt5Frame::SetModal()Michael Stahl
This prints a warning "Cannot create children for a parent that is in a different thread"; let's fix it before it causes another hard to debug crash. 0 check_parent_thread(QObject*, QThreadData*, QThreadData*) (parent=parent@entry=0xe88ca0, parentThreadData=<optimized out>, currentThreadData=<optimized out>) at kernel/qobject.cpp:781 1 check_parent_thread (currentThreadData=<optimized out>, parentThreadData=<optimized out>, parent=0xe88ca0) at kernel/qobject.cpp:822 2 QObject::QObject(QObject*) (this=0x9ed2e80, parent=0xe88ca0) at kernel/qobject.cpp:810 3 Adwaita::GenericData::GenericData(QObject*, QWidget*, int) () at /usr/lib64/qt5/plugins/styles/adwaita.so 4 Adwaita::WidgetStateEngine::registerWidget(QWidget*, QFlags<Adwaita::AnimationMode>) () at /usr/lib64/qt5/plugins/styles/adwaita.so 5 Adwaita::Animations::registerWidget(QWidget*) const () at /usr/lib64/qt5/plugins/styles/adwaita.so 6 Adwaita::Style::polish(QWidget*) () at /usr/lib64/qt5/plugins/styles/adwaita.so 7 QWidget::event(QEvent*) () at /lib64/libQt5Widgets.so.5 8 Qt5Widget::event(QEvent*) (this=0x7321790, pEvent=0x7f90c27d3750) at vcl/qt5/Qt5Widget.cxx:416 9 QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5 10 QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5 11 QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7321790, event=0x7f90c27d3750) at kernel/qcoreapplication.cpp:1047 12 QWidget::ensurePolished() const () at /lib64/libQt5Widgets.so.5 13 QWidget::setVisible(bool) () at /lib64/libQt5Widgets.so.5 14 Qt5Frame::SetModal(bool) (this=0x9f411b0, bModal=true) at vcl/qt5/Qt5Frame.cxx:482 Change-Id: Ib6b4d1ee859dfce650422a6c7860abf2eb2686f1 Reviewed-on: https://gerrit.libreoffice.org/68356 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: fix Qt5FilePicker destructor to run in main threadMichael Stahl
During QFileDialog dtor, QSocketNotifier::setEnabled(false) is called, but it doesn't do anything other than print a stupid warning and so it's still registered and later it receives events after it's dead. 0 QSocketNotifier::setEnabled(bool) (this=this@entry=0x991c058, enable=enable@entry=false) at kernel/qsocketnotifier.cpp:240 1 QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:260 2 QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:258 3 QObjectPrivate::deleteChildren() (this=this@entry=0x991c240) at kernel/qobject.cpp:1997 4 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025 5 QFileSystemWatcher::~QFileSystemWatcher() (this=0x9641b60, __in_chrg=<optimized out>) at io/qfilesystemwatcher.cpp:277 6 QObjectPrivate::deleteChildren() (this=this@entry=0x2a30130) at kernel/qobject.cpp:1997 7 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025 8 QThread::~QThread() (this=0x2a079b8, __in_chrg=<optimized out>) at thread/qmutex.h:217 9 () at /lib64/libQt5Widgets.so.5 10 QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (pointer=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52 11 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (this=0x98aa4d8, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107 12 QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:884 13 QFileSystemModel::~QFileSystemModel() () at /lib64/libQt5Widgets.so.5 14 QObjectPrivate::deleteChildren() (this=0x97bab00) at kernel/qobject.cpp:1997 15 QWidget::~QWidget() () at /lib64/libQt5Widgets.so.5 16 QFileDialog::~QFileDialog() () at /lib64/libQt5Widgets.so.5 17 std::default_delete<QFileDialog>::operator()(QFileDialog*) const (this=0x9770f90, __ptr=0x926e970) at /usr/include/c++/8/bits/unique_ptr.h:81 18 std::unique_ptr<QFileDialog, std::default_delete<QFileDialog> >::~unique_ptr() (this=0x9770f90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274 19 Qt5FilePicker::~Qt5FilePicker() (this=0x9770ed0, __in_chrg=<optimized out>) at vcl/qt5/Qt5FilePicker.cxx:155 Change-Id: Iddfa3d44de59e1760e20a389566d9e6815ab26f7 Reviewed-on: https://gerrit.libreoffice.org/68355 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#119856 vcl: Qt5/KDE5 RunInMainThreadMichael Stahl
The problem with the current approach of transferring calls to the main thread with Q_EMIT signals is that if the code that should run in the main thread needs SolarMutex, then the non-main-thread must use SolarMutexReleaser - but then the main thread will run not only the call that is needed right now, but will potentially process all pending events, and the other thread hasn't prepared for that. We need the inter-thread feature of Qt::BlockingQueuedConnection and the non-queued feature of Qt::DirectConnection, but this combination doesn't appear to exist. So the SolarMutexReleaser needs to go - but then the main thread does need SolarMutex for some things, and hence we need to trick it into believing it has SolarMutex with the m_bNoYieldLock hack. Then it becomes apparent that the main thread may be blocked on either Qt events, which is fine, or on the SalYieldMutex's m_aMutex, which will never be released now. So the main thread must never block on m_aMutex; the alternative is to use the same approach as the osx code (and, in a somewhat different form, the svp code), and add some condition variables on which the main thread can block if it fails to acquire the m_aMutex immediately. It's even possible to do this in a somewhat generic way with lambdas. This does appear to work, but it makes the Q_EMIT approach entirely untenable, because now the main thread will be blocked on the condition variable and the non-main-thread will be blocked until the Qt event is processed. Change-Id: I6480a6b909d5ec8814b2ff10dbefb0f3686a83c7 Reviewed-on: https://gerrit.libreoffice.org/68232 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#120783: take suggested/preferred DnD ops into accountKatarina Behrens
use those for drag operation start in Qt5Widget and eventually to construct DropTargetDragEnterEvent Change-Id: I3a92cbe722dadc64f8a210f7fd4016c8eb17216b Reviewed-on: https://gerrit.libreoffice.org/68675 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05Add missing DoCloseAurimas Fišeras
Change-Id: Ia051ba960102e53a4dc6cb6b3444ea923a351c3d Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/68619 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-05tdf#123446 sw_redlinehide: fix crash on Redo of ToXMichael Stahl
The problem is that the ToX must be updated with the same layout redline setting as it was originally created, so that subsequent Redo actions see the expected node indexes. Unfortunately it's not enough to just pass a flag to the ToX update functions, because they check GetTextNodeForParaProps() so we need a layout corresponding to the layout setting; if there isn't one, the existing one is temporarily toggled. This could be much better if the MergedPara would be independent of the layout and always exist, but with the various SwModify design issues that looks tricky to do... (regression from 80cedb5dcb6a7dd6c01349b93fab49ecee5f6594) Change-Id: Ibdc5b4ace54ace27e5223a25ecaf39bb493fb69b Reviewed-on: https://gerrit.libreoffice.org/68704 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Add support for <image> draw definition to draw a SVG imageTomaž Vajngerl
Attribute "source" is used to get the relative path to the image. Path is relative to the definition file. Change-Id: I6ca0c113385e26ad74b928e1f56635b4b0cef995 Reviewed-on: https://gerrit.libreoffice.org/68712 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-05tdf#122920 uitest: XMouseListener is not called for top most windowSerge Krot
Change-Id: Ia6f79e50b93004b8bf896e24450ce8666b303037 Reviewed-on: https://gerrit.libreoffice.org/66856 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-05Better types for nFc and nLenStephan Bergmann
...given that they get assigned with values of those types. This change has no actual effect on the results, but silences Clang -fsanitize=implicit-signed-integer-truncation warnings like "implicit conversion from type 'long' of value -671088640 (64-bit, signed) to type 'sal_uInt32' (aka 'unsigned int') changed the value to 3623878656 (32-bit, unsigned)". Change-Id: I763a9d85b9e40797312688551206c308fc3d36e3 Reviewed-on: https://gerrit.libreoffice.org/68705 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05weld ODatasourceSelectDialogCaolán McNamara
Change-Id: I33a45f6d68c4a6cba63301dbb6c94ea661365a9a Reviewed-on: https://gerrit.libreoffice.org/68651 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-05tdf#42949 Fix IWYU warnings in include/cppcanvas/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8174b6e684b5b46a8abd3ca825b7de75f9255df3 Reviewed-on: https://gerrit.libreoffice.org/68703 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05Avoid overflowing sal_Int16 PROP_GRID_LINESStephan Bergmann
...as seen with Clang's -fsanitize=implicit-signed-integer-truncation during CppunitTest_sw_ooxmlexport4 when nTextAreaHeight=36920 and m_nGridLinePitch=1: > writerfilter/source/dmapper/PropertyMap.cxx:1519:38: runtime error: implicit conversion from type 'int' of value 36920 (32-bit, signed) to type 'const sal_Int16' (aka 'const short') changed the value to -28616 (16-bit, signed) > #0 in writerfilter::dmapper::SectionPropertyMap::CloseSectionGroup(writerfilter::dmapper::DomainMapper_Impl&) at writerfilter/source/dmapper/PropertyMap.cxx:1519:38 > #1 in writerfilter::dmapper::DomainMapper::lcl_endSectionGroup() at writerfilter/source/dmapper/DomainMapper.cxx:2881:30 > #2 in writerfilter::LoggedStream::endSectionGroup() at writerfilter/source/dmapper/LoggedResources.cxx:101:5 > #3 in writerfilter::ooxml::OOXMLFastContextHandler::endSectionGroup() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:434:23 > #4 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7517:19 > #5 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at writerfilter/source/ooxml/OOXMLFactory.cxx:199:19 > #6 in writerfilter::ooxml::OOXMLFastContextHandler::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:195:5 > #7 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:177:9 > #8 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:483:27 > #9 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1274:17 > #10 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:310:18 > #11 in xmlParseEndTag2 at workdir/UnpackedTarball/libxml2/parser.c:9680:2 > #12 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11531:7 > #13 in xmlParseChunk__internal_alias at workdir/UnpackedTarball/libxml2/parser.c:12244:13 > #14 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1043:21 > #15 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:863:9 > #16 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1359:13 > #17 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:504:22 > #18 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:192:24 > #19 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2212:34 > #20 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:741:23 > #21 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1844:36 > #22 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:689:28 > #23 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1150:37 > #24 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:384:20 > #25 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:170:14 > #26 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:619:12 > #27 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 > #28 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:50:60 > #29 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:761:23 > #30 in SwModelTestBase::load(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:716:16 > #31 in SwModelTestBase::executeImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:264:13 > #32 in testTdf86926_A3::Import() at sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:1140:1 [...] Change-Id: Idf694b0dda871f1313d36c03764b0199e10d1b25 Reviewed-on: https://gerrit.libreoffice.org/68710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05tdf#105445 Change label "Export comments" to "Comments as PDF annotations"Roman Kuznetsov
Change-Id: I7036c2e699eb394f008fe3eeb1b93247b8c6fb22 Reviewed-on: https://gerrit.libreoffice.org/68696 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-03-05nPara[1] needs clamping too, after allStephan Bergmann
Follow-up to 4bf2b13647030d4e5a44d6a23d5570aeea70c333 "Clamp equation values when exporting to binary MS format", during CppunitTest_sw_ooxmlexport6: > filter/source/msfilter/escherex.cxx:2935:50: runtime error: implicit conversion from type 'sal_Int32' (aka 'int') of value 2700000 (32-bit, signed) to type 'sal_Int16' (aka 'short') changed the value to 13024 (16-bit, signed) > #0 in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at filter/source/msfilter/escherex.cxx:2935:50 > #1 in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) at filter/source/msfilter/eschesdo.cxx:283:26 > #2 in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) at filter/source/msfilter/eschesdo.cxx:215:25 > #3 in ImplEESdrWriter::ImplWriteTheShape(ImplEESdrObject&, bool) at filter/source/msfilter/eschesdo.cxx:932:12 > #4 in EscherEx::AddSdrObject(SdrObject const&, bool) at filter/source/msfilter/eschesdo.cxx:951:35 > #5 in oox::vml::VMLExport::AddSdrObject(SdrObject const&, short, short, short, short, bool) at oox/source/export/vmlexport.cxx:1425:15 > #6 in DocxSdrExport::writeVMLDrawing(SdrObject const*, SwFrameFormat const&) at sw/source/filter/ww8/docxsdrexport.cxx:844:40 > #7 in DocxSdrExport::writeDMLAndVMLDrawing(SdrObject const*, SwFrameFormat const&, int) at sw/source/filter/ww8/docxsdrexport.cxx:1051:9 > #8 in DocxAttributeOutput::OutputFlyFrame_Impl(ww8::Frame const&, Point const&) at sw/source/filter/ww8/docxattributeoutput.cxx:5586:57 > #9 in AttributeOutputBase::OutputFlyFrame(ww8::Frame const&) at sw/source/filter/ww8/wrtw8nds.cxx:3265:5 > #10 in SwWW8AttrIter::OutFlys(int) at sw/source/filter/ww8/wrtw8nds.cxx:665:41 > #11 in MSWordExportBase::OutputTextNode(SwTextNode&) at sw/source/filter/ww8/wrtw8nds.cxx:2274:42 > #12 in MSWordExportBase::OutputContentNode(SwContentNode&) at sw/source/filter/ww8/wrtw8nds.cxx:3329:13 > #13 in MSWordExportBase::WriteText() at sw/source/filter/ww8/wrtww8.cxx:2725:13 > #14 in DocxExport::WriteMainText() at sw/source/filter/ww8/docxexport.cxx:1489:5 > #15 in DocxExport::ExportDocument_Impl() at sw/source/filter/ww8/docxexport.cxx:527:5 > #16 in MSWordExportBase::ExportDocument(bool) at sw/source/filter/ww8/wrtww8.cxx:3210:19 > #17 in DocxExportFilter::exportDocument() at sw/source/filter/ww8/docxexportfilter.cxx:86:17 > #18 in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at oox/source/core/filterbase.cxx:497:55 > #19 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:150:23 > #20 in SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2414:25 > #21 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1496:19 > #22 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&) at sfx2/source/doc/objstor.cxx:2821:39 > #23 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objstor.cxx:2678:9 > #24 in SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objserv.cxx:323:19 > #25 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:3018:42 > #26 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1689:13 > #27 in SwModelTestBase::reload(char const*, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:796:20 > #28 in SwModelTestBase::executeImportExportImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:283:9 > #29 in testDmlGroupshapeRelsize::Import_Export_Import() at sw/qa/extras/ooxmlexport/ooxmlexport6.cxx:80:1 [...] Change-Id: I40fdbcc599960aecabc4b2c96820eb3492509be0 Reviewed-on: https://gerrit.libreoffice.org/68715 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05Change type of buffer to unsigned charStephan Bergmann
This change has no actual effect on the results, but silences benign Clang -fsanitize=implicit-signed-integer-truncation warnings. Change-Id: I0e96d998f9030c5bb4431dc0ccd689c8f2f3aeea Reviewed-on: https://gerrit.libreoffice.org/68711 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05Assume that EMR_SETVIEWPORTEXTEX wants to read signed valuesStephan Bergmann
...similar to 095e1ca4372d90da7fc56051f1271ddd975a9e3a "Assume that EMR_SETWINDOWEXTEX wants to read signed values", this time causing "implicit conversion from type 'long' of value 4294967200 (64-bit, signed) to type 'sal_Int32' (aka 'int') changed the value to -96 (32-bit, signed)" in emfio::MtfTools::SetDevExt (emfio/source/reader/mtftools.cxx) during CppunitTest_sw_rtfexport2. Change-Id: I114cc883fd3ac78291df8190b8528384966b563f Reviewed-on: https://gerrit.libreoffice.org/68709 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-05Simplify Sequence constructionStephan Bergmann
Change-Id: I96100bcca965943aa59a4da4e578a0792303d2bb Reviewed-on: https://gerrit.libreoffice.org/68707 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>