fdo#72156: GraphicObject: Added missing delete of stream

Change-Id: I1b84941b0e4b17d5819b1e4af0da9ce3f673710f
Signed-off-by: Ulrich Kitzinger <ulkitz@hotmail.de>
(cherry picked from commit cc36dfc9bf4f327c359d171d8d05f0ede049164e)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
fdo#72488: Broken text when showing visible space

Turning on showing nonprinting characters replaces the space with bullet
character, but still draws the text with the original kern array, this
works fine until there are ligatures involving the space character as
the number of glyphs after replacing the space with the bullet will be
different and the kern array will be completely off.

This is a hack that gives up on replacing the space with a bullet when
its width is zero, not sure if it would interfere with other legitimate
uses.

Change-Id: I3803a2097b7c9dab1fb53b24404e8550c5bf537e
Reviewed-on: https://gerrit.libreoffice.org/7005
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
CID#736170, CID#736171, CID#736172 Out-of-Bounds read/write

Let's be sure that nMaxcolorIndex < 256

Change-Id: I349184ad92c8e7b10a90a32e093972bfaee52467
Reviewed-on: https://gerrit.libreoffice.org/6970
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/6972
be able to read the correct 'sort-ascending' value, fdo#72548

... for <table:content-validation table:display-list='sort-ascending' ...>
but do not write it yet.

Change-Id: I05bdf27cee27f7456b660267b95126420474eb99
(cherry picked from commit 8047ae4a8244199717698f2e2f5281551e97912c)
Reviewed-on: https://gerrit.libreoffice.org/7016
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
resolved fdo#72537 write <loext:fill-character>

... instead of <number:fill-character> but read both.

(cherry picked from commit 9f87de91cee05656808a98ab1bd65ad9509ef7df)

Also needed for this is:

xmloff: add a generic LibreOffice ODF extension namespace

XML_NAMESPACE_LO_EXT can be used for elements and attributes that are
not yet specified by OpenDocument.

(Change-Id: Id29392533d46f6592d964ce79c05ffefa4d69ebc)
Reviewed-on: https://gerrit.libreoffice.org/5419
Tested-by: Thorsten Behrens <tbehrens@suse.com>
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
(cherry picked from commit de9b067bd13ec6632b49c9683255bd3a1d7ae13e)

Change-Id: Ia620fad575782f6174a9ee5fbbd8b396b21948e3
Reviewed-on: https://gerrit.libreoffice.org/7013
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
fdo#70198: sw: don't truncate Time values on 32bit platforms

SwDoc::SetFixFields() uses sal_uLong to store Time.GetTime() which needs
64 bits.

Also fix same problem on Time fields in HTML import.

(regression from 9830fd36dbdb72c79703b0c61efc027fba793c5a)

(cherry picked from commit 17dab5bf8efb3fd676e6854474b199b681d0dc28)

Conflicts:
	sw/source/filter/html/htmlfld.cxx

Change-Id: I5d0388cbc364e1f9dfb60ff9e83c7d2f101c69d8
Reviewed-on: https://gerrit.libreoffice.org/7020
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
editeng: fix more 32-bit Time breakage

SfxDateTimeItem and SvxExtTimeField need to use 64-bit integer to store
Time as well.  These classes also have binary serialization
Load()/Save() methods but they are unlikely to be used in a persistent
way, just for the clipboard.

The problem is easy to reproduce in Impress: Insert->Field->Time(fixed)

(regression from 9830fd36dbdb72c79703b0c61efc027fba793c5a)

Change-Id: I5946c5b94dd5a509805b6dc40461bbd910caffc4
(cherry picked from commit 7b9c61c7f20a679c5316a288c2ec2ffbf04b4200)
Reviewed-on: https://gerrit.libreoffice.org/7021
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#70278: editeng: fix Time fields in Impress

Apparenty an uninitialized SvxTimeField is created instead of the
SvxExtTimeField that is needed to preserve the value and format.

(regression from ee5fc5d25fe102c30daf7d181b8181d40b85a4f3)

(cherry picked from commit 1235e694c21f6e3e000e24a176123c386ea91df1)

Conflicts:
	editeng/source/items/flditem.cxx

Change-Id: I36b16af0c143e8b5451a1925806756492dc2334e
Reviewed-on: https://gerrit.libreoffice.org/7022
Reviewed-by: Thorsten Behrens <thb@documentfoundation.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
sax, xmloff: fix ODF import/export of text:time/text:time-value

The value written for an Impress time field is something like
text:time-value="0000-00-00T23:28:07" (in LO 3.5+) or
text:time-value="0-00-00T23:28:07" (in OOo 3.3) which contains an
invalid all-zero date.  Such values are actually rejected by the
ODF import since commit ae3e2f170045a1525f67e9f3e9b7e03d94f2b56b.

Actually there was no real support to read the RelaxNG type
timeOrDateTime before.

So fix that by:
- adding convertTimeOrDateTime/parseTimeOrDateTime functions to
  sax::Converter
- recognizing and ignoring the 2 invalid all-zero values written by
  LO 3.5 and historic OOo respectively
- writing a bare "time" in text:time-value if the DateTime struct
  contains zero Date members
  (Older OOo versions and AOO cannot actually read that, but everything
  they _can_ read is invalid ODF...)

(cherry picked from commit cc407e50e8a1a74f9d1ed29d444dce9bd2e9167a)

The backport contains one change:
XMLTextFieldExport::ProcessTimeOrDateTime() still writes the invalid
value (to not add new backwards compat issues in stable branch),
so this patch only fixes the import side of things.

Conflicts:
	sax/source/tools/converter.cxx
	xmloff/source/text/txtfldi.cxx

Change-Id: I754076caee74a5163ed3f972af0f23796aa14f9f
Reviewed-on: https://gerrit.libreoffice.org/7026
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
fdo#68160 Revert "Resolves: #ii122335# Disabling the old task pane"

fdo#68160 Revert "Partly revert "Resolves: #ii122335# Disabling the old task pane""

This reverts commit cb4225144f1fff44f9bb972fe06f51524da11b8b.

To be able to revert 95ae39c0c34c9a5e6fa6e72bf3a631a9a799b872 entirely.

fdo#68160 Revert "Resolves: #ii122335# Disabling the old task pane"

This reverts commit 95ae39c0c34c9a5e6fa6e72bf3a631a9a799b872.

We need a TaskPane even in Writer and Calc to be used by extensions.
Sidebar is experimental so TaskPane is needed anyway for Impress (see
fdo#72371).

Change-Id: Ia94ab377a59996ba434b56e3823117183674afb7
Reviewed-on: https://gerrit.libreoffice.org/7042
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
fdo#66864: Return from full-screen should restore toolbars.

The fix for fdo#37758 was not correct, we shouldn't fiddle with the m_bVisible
itself, but instead react on the m_bMasterHide flag; or at least that is my
understanding of the related framework code (why is it so confusing?!)

Change-Id: I791fcea9e5e5313b6a5b776cb3187cbd1a028386
(cherry picked from commit 986644335c3f9e99ec3c6bebc0b75cca0acdf79b)
Reviewed-on: https://gerrit.libreoffice.org/7065
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
fdo#70499 selectn of lock/unlocked cells with worksheet protection reversed

The ooxml spec documentation is rather confusing ( for me at least ) and the
sense of the of the sheetProtection attributes as described seems reversed to
how I read it ( or maybe it is the equivelant option in ScTableProtection that
operates with the reverse sense <shrug>  ) In anycase the import ( and export )
have been adjusted to take that into consideration, also the export now actually
deals with the defaults correctly.

Change-Id: Ia69567b8898b39c9d171486cfa800e1748c5814b
Reviewed-on: https://gerrit.libreoffice.org/7075
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
handle invalid xml files in orcus, fdo#63844

Change-Id: I82fff6ab89acece0e46c92bfca2c7faf967639b8
Signed-off-by: Kohei Yoshida <kohei.yoshida@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/7077
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
correctly dispose to avoid cyclic dependencies

accessibility cruft is still listening to dead tables so crashes in
slidesorting in main panel if moved slide has tables in it after visiting slide
sorter once.

(cherry picked from commit 0b8e2e5efe20519e8b5563314bac0cbb84a3b967)

Conflicts:
	svx/source/table/svdotable.cxx

Change-Id: I09f9a73b01fb2ddf059402146acdc7bd823798b9
Reviewed-on: https://gerrit.libreoffice.org/7051
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
disposed but not dtored

just die when you are supposed to, without this endless amounts of accessiblity
cells remain after sorting slides with tables in them

(cherry picked from commit 1c28065d8fe3e9a1394a7ecfc29e95a9639a1012)

Conflicts:
	svx/source/table/accessibletableshape.cxx

Change-Id: Ice9a86b8b806e58f9bf871341a38f7729798dda9
(cherry picked from commit a90e08cb15e712e1d15a16de9a2677e57d81fd13)
Reviewed-on: https://gerrit.libreoffice.org/7052
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#72697 accept future <loext:sender-initials>

... of to-be <text:sender-initials>

Change-Id: Ia601c0debc5d66682aa92e14fb063395f9f48ab5
(cherry picked from commit 1379294741ff85d4c09d9ded7579ad50dea88fb7)
Reviewed-on: https://gerrit.libreoffice.org/7076
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
odbc DBMetaData: NULL pattern equivalent to "%", not "%foo"

Change-Id: Ief475a1bf6e65b4786e8ee9c025b204f143a30e0
Reviewed-on: https://gerrit.libreoffice.org/7080
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#72697 actually write this only in ODF 1.2 extended

(cherry picked from commit 49f9694e34d07468cff4a7e4de332f11be3e0dd8)

Conflicts:
	xmloff/source/text/txtflde.cxx

Change-Id: I32097cc4b8a67615b0b6d6172cafd0edad7469b6
(cherry picked from commit 4031765b004dded31f04c54f9a055b7a3d0053f2)
Reviewed-on: https://gerrit.libreoffice.org/7078
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#72163: fix safer way

Do not dispose m_xComposer, might still be used by our m_pCache.

Change-Id: I6540c035c9159017c694b36e676721ec3e42db51
Reviewed-on: https://gerrit.libreoffice.org/7094
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Revert "fdo#72163 after updating m_xComposer, command facets are not dirty"

This reverts commit d4a709cbf4710555b1518816f1eaa9b43dc5cae7.

This caused too many bugs to be cleaned up within a stable branch:
 - unittest failure; fixed (in master) only for the unittested driver.
   (commit 917f9576349240796dfc0cef0f38c9b861c316e7
   Issue of RowSet and Statement each thinking they own
   the ResultSet, and both calling dispose on it...
   After this revert, will not happen because RowSet
   will never generate two ResultSets from the same Statement.)
   Still needs fixing for all other drivers... Not realistic
   in a stable branch.
 - fdo#72696
 - fdo#72463

fdo#72163 is now fixed in libreoffice-4-1 by what was originally
thought as the "belts and suspenders" approach, in commit
"fdo#72163: fix safer way".

Change-Id: I7af95aa73f2001989ec3679f58eb455ebfd7eb38
Reviewed-on: https://gerrit.libreoffice.org/7095
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>