fdo#53920 Switch back tab at RefButton closure time

Bug occurs because visible tab is not the initial tab. So, instead of
switching back to initial tab at dialog closure time (removed from
cellsh2.cxx), this commit proposes that switching back to initial tab
is operate when expanding the RefButton shrink dialog.

Reviewed-on: https://gerrit.libreoffice.org/11660
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
(cherry picked from commit 31432c4469e7e0d05516143533d6b5e0b411dda3)

Change-Id: I3cf7ed14054fa69881d4ecbc55c48dfbfc4356aa
server font dtor always calls ReleaseFaceFT

therefore we must always call GetFaceFT in the ctor
and not return early *before* calling GetFaceFT which
could happen in case of inane font size requests, i.e.

if( (mnWidth < 0) || (mfStretch > +64.0) || (mfStretch < -64.0) )

valgrind+bff

Change-Id: If22f8f7ff6aaed3ffa9eec68630da8601dfd5cae
(cherry picked from commit 884229ed3ee2f84eb052c866e22bdb242a385788)
Reviewed-on: https://gerrit.libreoffice.org/11400
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#79269: fix ODF import of style:footer-first

The implementation of SwXStyle's FirstIsShared property is busted, and
that causes xmloff to write the footer-first content into the master
footer.

This is a re-implementation of 0f21f932081471b2a5eda820fa1a194fbf3ab85c
because unostyle.cxx is very different on master...

Change-Id: I485d8089c1fb5ba3ca369fbfe8f3115bf700ba13
Reviewed-on: https://gerrit.libreoffice.org/11722
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
with show changes on we can have negative offsets

for counting words in a range of text which has redline deleted
text at the start

Change-Id: I34149822d43f8ee3fbde58a166dad408fb588fce
(cherry picked from commit 93e7ae6f5719c56c90679e46a6e817dedf5c54c6)
Reviewed-on: https://gerrit.libreoffice.org/11610
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Resolves: fdo#79130 Crash in DomainMapper_Impl::CloseFieldCommand

Change-Id: Ia59e0c79ec7f2066891b78657559f41eaeb80a09
(cherry picked from commit a392a1deb0bb55f39f0232f9b3df8ad9ac9062af)
Reviewed-on: https://gerrit.libreoffice.org/11665
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Related: fdo#73608 don't crash on missing table styles

(cherry picked from commit 5fd7382651d64f77e8ad1d9a5c053f52f3641f9f)

Conflicts:
	writerfilter/source/dmapper/DomainMapperTableHandler.cxx

Change-Id: I340b43b7afc4c5c4d6dc8e4ed182279240306540

Resolves: fdo#73608 bail out on loop in style sheet hierarchy

Change-Id: I03975d1ce8eaceceb4d5c263eb11c1521bcd57eb
(cherry picked from commit be18133e84120625734a09380594ee89b23c4322)
Reviewed-on: https://gerrit.libreoffice.org/11679
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fix/improve handling of mso-position-(horizontal|vertical)(-relative)

This is a squash of commits f6fa787 to e5bbc721 .

Change-Id: Ieb76ccb2fe8a425af3204de144021b7a731d0778
Reviewed-on: https://gerrit.libreoffice.org/11701
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Resolves: fdo#79131 crash in EnhancedCustomShapeTypeNames::Get

Change-Id: Ib21a4a1574119120f09d4ecac73b93a0f2f6739f
(cherry picked from commit 65277f994ae25d930c15aebba0ed19f8de0abba1)
Reviewed-on: https://gerrit.libreoffice.org/11703
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Resolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShape

Change-Id: I0bafd2c43d29806eea0ff0cb165e67aece53488f
Reviewed-on: https://gerrit.libreoffice.org/11726
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
fdo#78907 fdo#82895 : File crashed while saving.

   - There is pagebreak in file and footer has nested table.
   - While exporting LO write section break instead of PAGE_BREAK.
   - Due to this it was writing two sections in file and same footer
     for both sections.
   - This was causing wrong table depth values due to this it was crashing
     while writing table.
   - So in MSWordExportBase::OutputSectionBreaks if next node has
     RES_BREAK(page break) then bNewPageDesc value should be false.

Reviewed-on: https://gerrit.libreoffice.org/9568
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 2df0d9d32d05f08ccf673fd0f61f650438511acb)

Change-Id: I2ccc4e48a26253716253a7280a244f06e172770a
error C2782: template parameter '_Ty' is ambiguous

Change-Id: Ieb8f91a629b9e14480c0372e747fea326c549833
(cherry picked from commit 02e0bac73be8d11abf539130f3d3541fa72af93a)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
fdo#84315 quick fix

In mergedlib case, load ourselves (that is, mergedlib).
Fixes bug symptoms, while waiting for fully clean solution,
which is killing svx/dbtoolsclient completely.

Change-Id: Ib8ad34ee4697f89bdc6bbe64d406053f9e7f7521
Reviewed-on: https://gerrit.libreoffice.org/11739
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
fdo#63483: support for modify passwd in Impress and Draw

iow, allow opening Impress and Draw ODF documents read-only

Change-Id: I379b9f92b9bfb20e99998177d9a5fae80069d98f
Reviewed-on: https://gerrit.libreoffice.org/11758
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
coverity#1242906 Unused value

Change-Id: I7a282e5adc60e4b123469f46fb480805377626b4
(cherry picked from commit a165aa38d9009bf46e203bbdfbac3b7cd8f71b4c)
Reviewed-on: https://gerrit.libreoffice.org/11764
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
sd: fix up e5222cf76a94c4ec20664b3e6f5a48e00ee9669f

Change-Id: Ib12f889e65f348b0313a64e8f3b7449d4708244a
Related: fdo#37691 \shptxt ... \jpegblip

text shape with jpeg data, should we throw away
the text shape here or keep it ?

Change-Id: I9e4463b5863bf68cdcd18ea5d1f6c831a0de8ec9
(cherry picked from commit cfbcce701cd6dc3af6086428399136efef33ff59)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
fix Windows build again

Change-Id: I7f671af4f4841bf68496f99ef8ae14adf801713d
error C2216: 'override' cannot be used with 'inline'

libreoffice-4-3 is supposed to be buildable vith VS2010...

Change-Id: Id980c709ee167133e2d8ba41902e43d0abe1034f
Reviewed-on: https://gerrit.libreoffice.org/11777
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Don't assign NULL to boost::shared_ptr

This is already done by the constructor.

Fixes the libreoffic-4-3 build on Ubuntu 12.04.

Change-Id: I7bbec905c0d1efb5670c61c975f36f2e37a74cac
Reviewed-on: https://gerrit.libreoffice.org/11778
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
bnc#657899: Paragraph vertical spacing differs from PowerPoint

We need to set the "paragraph summation" flag also for .pptx import. (As is
already done for .ppt import.)

This is what in the Options (Preferences) UI is called "Add spacing between
paragraphs and tables (in current document)", on the LibreOffice
Impress:General page. This is a setting that when set becomes local to the
document. I actually don't really understand why this needs to be a
user-visible option, wouldn't it be enough for it to be an internal flag that
is set for documents imported from .ppt and .pptx, and is clear otherwise?

Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27
(cherry picked from commit 96d210bf9ca0a99fc8256d6e0a4952207cce69e0)
Signed-off-by: Andras Timar <andras.timar@collabora.com>