Avoid infinite loop when gathering "g" element styles

Same way of how fdo#74743 is fixed 3b7472b284131c09d91b69f26d5d26d54648f939

Change-Id: If6cc8eb6ff89b0081f27ff75a9b60a3e81cff1bd
Reviewed-on: https://gerrit.libreoffice.org/10326
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Fixed build fail on MacOSX after f634ec5 .

Change-Id: I26b9063aca5518f21f76ff22690eb55d51f9c5aa
Revert "remove unused SvRefBase constructor"

This reverts commit 09a90c2ff5d39c3ae61b4041c3b39d3da0c640c1.

Apparently causes a crash in CppunitTest_sc_macros_test; it is
suspicious that the copy ctor is not made private in this commit, since
the compiler generated one would do something different.

Change-Id: Icb1121332d83e9f08d89535e3da6e10d690ac88a
crashrep: loplugin:unreffun

Change-Id: I83d4c3ee02e59d40e793288d705c3fd06ebe3219
Resolves: #i125111# limit mem footprint for GraphicObjects...

in 32Bit environments

Conflicts:
	svtools/inc/svtools/grfmgr.hxx
	svtools/source/graphic/grfmgr.cxx
	svtools/source/graphic/grfmgr2.cxx
	sw/source/core/doc/notxtfrm.cxx
	sw/source/core/graphic/ndgrf.cxx

"commit 62b0eaf37c08dd27244e77b8bc90c691b000ebd6
 Related: fdo#50697 reset the cache timeout on GetGraphic

 so the graphic gets swapped out Xms after the last use and not Xms after
 initial creation regardless of if it got used a moment earlier."

corrected place for stl sort function for linux

(cherry picked from commit a48414a396f7de4e00510e82e3744c097ce3d5d6)

Conflicts:
	svtools/source/graphic/grfmgr2.cxx

Change-Id: I79158b7d42629f8dec2bc5565540701bcd3ef6f4
6f21c7fd4d2681446fc1a6d9607366a1e69165a1
use same swap stategy on all platforms

Change-Id: I565dfd9233088feae69de6261d1081fc51f10806
Resolves: #i125171# support lossless embedding of linked jpegs...

in writer for PDF export

(cherry picked from commit 131669af7168020750b726e4e6d1568975f73886)

Conflicts:
	sw/source/core/doc/notxtfrm.cxx

Add missing includes to fix build break

(cherry picked from commit 662b23eb1f1b7c178a7a5507864c647a390fae34)

Conflicts:
	sw/source/core/doc/notxtfrm.cxx

1e2c208ac91c8e666e4f3f6f89cd917736cdc44d

Change-Id: Ie560fa05964b79240fbd97825be74b0543c97aba
CID#1169815 Division or modulo by float zero (DIVIDE_BY_ZERO)

Change-Id: Id90a018645ae37be600f942a8391dd56ff156b68
CID#1038293 Division or modulo by float zero (DIVIDE_BY_ZERO)

Change-Id: I9115f34d5957fc974a8f693f97b27f4534344f62
CID#1000519 Logically dead code (DEADCODE)

Change-Id: I785901d6694fe914325965136852ed3098e59434
CID#1000520 Logically dead code (DEADCODE)

Change-Id: Ib33dcd05dd6a9216c6138eafc550a257af97d8ab
CID#735794 Dereference after null check (FORWARD_NULL)

pDok can't be NULL, remove superfluous check.

Change-Id: Ica1708f1b2c37bffbe388f22e8ac19a81b144f6d
pDok can't be NULL, remove superfluous check

Change-Id: I639d6e27dd1a44ff878a2e0188fc42e27993b39f
CID#703987 Unchecked return value (CHECKED_RETURN)

Change-Id: I0e5bf12f1b874e3aa5428c92487cb58ef16c9cc3
CID#703986 Unchecked return value (CHECKED_RETURN)

Change-Id: I44149fca38e36be6d4302b2af93e72ae9093796a
CID#703984 Unchecked return value (CHECKED_RETURN)

Change-Id: I5b0c633e25326272aed3bae0bf0847839a45d723
fdo#80569:FILEOPEN:4.4 Regression .docx chart not rendered properly

Change-Id: Ic3304c1bd11fcd372a0859a70a531675effe7af0
Reviewed-on: https://gerrit.libreoffice.org/10322
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
Related: bnc#875718 DOCX import: fix missing character grab-bag on fields

The problem was that in case:

1) The paragraph only had a single text portion, which was a field and
char grab-bag was set on it and
2) The paragraph had a style which also set the character grab-bag

then during import the field's gra-bag was set on the paragraph (as it's
the only portion) and later the paragraph style overwrote this, in case
that had a grab-bag, too.

Work this around by ensuring that in case of portion fields (i.e. not
ToC, which has its own paragraphs), there are always at least two
portions in a paragraph (the second is removed later).

This also fixes the fake paragraph problem at the end of the bnc#875718
testcase. (There was an empty paragraph at the end of the document, but
not in the file itself.)

Change-Id: Ie404bc043d46157ea6157b18c4a46395cf496118
WaE: unused variable 'sMarker'

Change-Id: Idba194e9bafa17dcedd5d1d45c5e0b4e3db54cee
-Werror,-Wheader-guard

Change-Id: I6b13c77975d8aeef63b424e418a4a4a98ced159f