/[packages]/updates/2/libreoffice/current/SOURCES/0002-Resolves-fdo-58730-workaround-UL-LR-Space-100-proble.patch
ViewVC logotype

Contents of /updates/2/libreoffice/current/SOURCES/0002-Resolves-fdo-58730-workaround-UL-LR-Space-100-proble.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 395235 - (show annotations) (download)
Thu Feb 7 22:09:33 2013 UTC (11 years, 2 months ago) by dmorgan
File size: 4502 byte(s)
- Resolves: rhbz#760765 Impress doesn't copy custom styles from one file
  to another
- Resolves: rhbz#810739 Incorrect displaying attached rtf document
- Resolves: rhbz#876606 regressions in MSO binary import filters
- Resolves: rhbz#890080 crash in SwXTextDocument::getRendererCount
- Resolves: fdo#58730 ODF fo:margin 100% bug
- Resolves: fdo#59366: Document Conversion wizard: enable "StarOffice" again
- Resolves: rhbz#894223 crash on export of .docx
- Resolves: rendering documents in browser plug-in
- Resolves: rhbz#882240 end of undo stack crash
- Resolves: rhbz#875140 fix position of cell-anchored charts
- Resolves: fdo#49517 Java macro embedded in document will not run
- Resolves: rhbz#865058 increase number of user-defined format codes
- Resolves: rhbz#854451 fdo#46278 Calc: import/export .xlsx comment visibility
- Resolves: rhbz#864858 Calc: import more than 256 sheets from .xlsx
- Resolves: rhbz#868953 Calc: open HTML documents from file dialog
- Resolves: rhbz#868479 guard against duplicated ~ in OK/Cancel
- Resolves: rhbz#863052 fix ZipIOException on mismatched timestamps
- Resolves: rhbz#820283 Writer: fix crashes in DOCX table import
- Resolves: rhbz#861680 Writer: DOCX import: fix crash on tables in substreams
- Related: rhbz#826526 Inform user about unsupported PDF encryption formats
- Resolves: rhbz#852128 Writer: avoid table undo crash
- Resolves: rhbz#689053 Writer: fix crash following delete at last table cell
- Resolves: rhbz#820283 Writer: fix crashes in DOCX table import
- Resolves: rhbz#827695 Writer: prevent crashes after incomplete print
- Resolves: fdo#54565 text misaligned in pptx
- Resolves: rhbz#855541 XIOError handler multithread woes
- Resolves: rhbz#836827 Connection to datasource could not be established using
  gcj
- Related: rhbz#850709 hunspell en-US available standalone so
  make English langpack require hunspell-en and core just
  bare bones hunspell-en-US
- Resolves: rhbz#855507 large ole2 compound files fail to load
- Resolves: rhbz#855972 crash on switching to outline view
- Resolves: rhbz#846775 Clipboard must be disposed before Selection
- Resolves: rhbz#842292 crash in scrolling multiselection in draw
- Resolves: rhbz#842552 crash in pptx import
- Resolves: rhbz#832603 abi problems with c++11
- Resolves: rhbz#836937 insanely slow with Zemberek

SILENT: Sync with fedora

1 From 1f04cd4415c88d3bcb27b118fa3121fe58de87db Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Thu, 17 Jan 2013 12:41:11 +0000
4 Subject: [PATCH 2/2] Resolves: fdo#58730 workaround [UL|LR]Space 100% problem
5
6 If all paragraph margins are 100% on import, ignore that as being the implicit
7 default. That avoids explicit 100% being set onto the awesome [UL|LR]Space
8 which takes a relative propsize of 100% as a flag that its value field is
9 absolute and so rejected by SwTxtFmtColl::Modify as a candidate for getting its
10 true value initialized relative to its parent, so it ends up as an absolute 0
11
12 Always elide the property on export because writing individual
13 margin-foos provides better backward compatibility with older versions
14 anyway.
15
16 Trigged by 3c5facfce42a0dbe362d6b9fa5ac374fd76f51a1
17
18 Change-Id: I55f6ceeae287b7d8e99befa4bd3cc06738a21299
19 (cherry picked from commit 23c099a0236062724430efb986251637095c8d4f)
20
21 Signed-off-by: Michael Stahl <mstahl@redhat.com>
22 (cherry picked from commit abb84c2cce54a903ef846cbfe297b2bbc62ff260)
23 ---
24 xmloff/source/text/txtexppr.cxx | 8 ++++++++
25 xmloff/source/text/txtimppr.cxx | 23 ++++++++++++++++++++++-
26 2 files changed, 30 insertions(+), 1 deletion(-)
27
28 diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
29 index 48c2e64..17991ec 100644
30 --- a/xmloff/source/text/txtexppr.cxx
31 +++ b/xmloff/source/text/txtexppr.cxx
32 @@ -467,6 +467,8 @@ void XMLTextExportPropertySetMapper::ContextFilter(
33 XMLPropertyState* pClip11State = NULL;
34 XMLPropertyState* pClipState = NULL;
35
36 + // filter fo:margin
37 + XMLPropertyState* pAllParaMarginRel = NULL;
38 XMLPropertyState* pAllParaMargin = NULL;
39 XMLPropertyState* pAllMargin = NULL;
40
41 @@ -584,6 +586,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
42 case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break;
43 case CTF_TEXT_CLIP11: pClip11State = propertie; break;
44 case CTF_TEXT_CLIP: pClipState = propertie; break;
45 + case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
46 case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
47 case CTF_MARGINALL: pAllMargin = propertie; break;
48 }
49 @@ -637,6 +640,11 @@ void XMLTextExportPropertySetMapper::ContextFilter(
50 lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
51 lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
52
53 + if (pAllParaMarginRel)
54 + { // because older OOo/LO versions can't read fo:margin:
55 + pAllParaMarginRel->mnIndex = -1; // just export individual attributes...
56 + pAllParaMarginRel->maValue.clear();
57 + }
58 if (pAllParaMargin)
59 {
60 pAllParaMargin->mnIndex = -1; // just export individual attributes...
61 diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
62 index 5c63fcb..c403794 100644
63 --- a/xmloff/source/text/txtimppr.cxx
64 +++ b/xmloff/source/text/txtimppr.cxx
65 @@ -266,6 +266,26 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
66 }
67 }
68
69 +//fdo#58730 The [UL|LR]Space class has a deficiency where "100%" also serves as
70 +//a flag that the value is an absolute value so we can't truly handle an
71 +//up/lower space property which wants to specify its 200% upper but 100% lower
72 +//of its parent (try typing 100% vs 200% into the edit style dialog and revisit
73 +//your style). So on xml load that ends up meaning 200%, 0 lower. This is a
74 +//crock.
75 +//
76 +//On import clear 100% all-margins relative sizes.
77 +static bool
78 +isNotDefaultRelSize(const XMLPropertyState* pRelState, const UniReference<XMLPropertySetMapper>& rPrMap)
79 +{
80 + if (rPrMap->GetEntryContextId(pRelState->mnIndex) == CTF_PARAMARGINALL_REL)
81 + {
82 + sal_Int32 nTemp = 0;
83 + pRelState->maValue >>= nTemp;
84 + return nTemp != 100;
85 + }
86 + return true;
87 +}
88 +
89 void XMLTextImportPropertyMapper::finished(
90 ::std::vector< XMLPropertyState >& rProperties,
91 sal_Int32 /*nStartIndex*/, sal_Int32 /*nEndIndex*/ ) const
92 @@ -434,7 +454,8 @@ void XMLTextImportPropertyMapper::finished(
93
94 for (sal_uInt16 i = 0; i < 4; i++)
95 {
96 - if (pAllParaMargin && !pParaMargins[i])
97 + if (pAllParaMargin && !pParaMargins[i]
98 + && isNotDefaultRelSize(pAllParaMargin, getPropertySetMapper()))
99 {
100 #if OSL_DEBUG_LEVEL > 0
101 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
102 --
103 1.7.11.7
104

  ViewVC Help
Powered by ViewVC 1.1.30