summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-08-03 21:09:34 +0200
committerDavid Tardon <dtardon@redhat.com>2012-08-06 10:18:07 +0200
commitd5c66878ddb902c2121fc6efa77b376ff9fa752f (patch)
tree02a6ecda90492d2247bb73dd3c299f22ba9a8023
parent58b45e3052938d55458cc0c1300bf234ca4f39d6 (diff)
fdo#38056: fix XMLTextImportPropertyMapper regression:
The invalidation introduced in 7f9928bfa561ccb6ed4e2baacc7d6960bc1ce231 is unfortunately in the wrong place; the pAllFoo actually point at vector elements, and so they must not be dereferenced after new elements are added to the vector, so move the invalidation up a bit. Change-Id: I244d1d5cfd40469ff6d2c081e057355460d34cf4 (cherry picked from commit 9e74e9f3c0931f34fb5421056851a06b83501ce9) Signed-off-by: Ivan Timofeev <timofeev.i.s@gmail.com> (cherry picked from commit 3347e2644f44d4a4165d594126bcd1c924b82a9a) Signed-off-by: David Tardon <dtardon@redhat.com> Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--xmloff/source/style/PageMasterImportPropMapper.cxx103
1 files changed, 52 insertions, 51 deletions
diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx
index 005c732351ca..0cacf028d491 100644
--- a/xmloff/source/style/PageMasterImportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterImportPropMapper.cxx
@@ -353,6 +353,58 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
aAny.setValue( &bValue, ::getBooleanCppuType() );
pFooterDynamic = new XMLPropertyState(pFooterMinHeight->mnIndex + 1, aAny);
}
+
+ // fdo#38056: nerf the various AllFoo properties so they do not override
+ // the individual Foo properties later on
+ if (pAllPaddingProperty)
+ {
+ pAllPaddingProperty->mnIndex = -1;
+ }
+ if (pAllBorderProperty)
+ {
+ pAllBorderProperty->mnIndex = -1;
+ }
+ if (pAllBorderWidthProperty)
+ {
+ pAllBorderWidthProperty->mnIndex = -1;
+ }
+ if (pAllHeaderPaddingProperty)
+ {
+ pAllHeaderPaddingProperty->mnIndex = -1;
+ }
+ if (pAllHeaderBorderProperty)
+ {
+ pAllHeaderBorderProperty->mnIndex = -1;
+ }
+ if (pAllHeaderBorderWidthProperty)
+ {
+ pAllHeaderBorderWidthProperty->mnIndex = -1;
+ }
+ if (pAllFooterPaddingProperty)
+ {
+ pAllFooterPaddingProperty->mnIndex = -1;
+ }
+ if (pAllFooterBorderProperty)
+ {
+ pAllFooterBorderProperty->mnIndex = -1;
+ }
+ if (pAllFooterBorderWidthProperty)
+ {
+ pAllFooterBorderWidthProperty->mnIndex = -1;
+ }
+ if (pAllMarginProperty)
+ {
+ pAllMarginProperty->mnIndex = -1;
+ }
+ if (pAllHeaderMarginProperty)
+ {
+ pAllHeaderMarginProperty->mnIndex = -1;
+ }
+ if (pAllFooterMarginProperty)
+ {
+ pAllFooterMarginProperty->mnIndex = -1;
+ }
+
for (sal_uInt16 i = 0; i < 4; i++)
{
if (pNewMargins[i].get())
@@ -408,57 +460,6 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
rProperties.push_back(*pFooterDynamic);
delete pFooterDynamic;
}
-
- // fdo#38056: nerf the various AllFoo properties so they do not override
- // the individual Foo properties later on
- if (pAllPaddingProperty)
- {
- pAllPaddingProperty->mnIndex = -1;
- }
- if (pAllBorderProperty)
- {
- pAllBorderProperty->mnIndex = -1;
- }
- if (pAllBorderWidthProperty)
- {
- pAllBorderWidthProperty->mnIndex = -1;
- }
- if (pAllHeaderPaddingProperty)
- {
- pAllHeaderPaddingProperty->mnIndex = -1;
- }
- if (pAllHeaderBorderProperty)
- {
- pAllHeaderBorderProperty->mnIndex = -1;
- }
- if (pAllHeaderBorderWidthProperty)
- {
- pAllHeaderBorderWidthProperty->mnIndex = -1;
- }
- if (pAllFooterPaddingProperty)
- {
- pAllFooterPaddingProperty->mnIndex = -1;
- }
- if (pAllFooterBorderProperty)
- {
- pAllFooterBorderProperty->mnIndex = -1;
- }
- if (pAllFooterBorderWidthProperty)
- {
- pAllFooterBorderWidthProperty->mnIndex = -1;
- }
- if (pAllMarginProperty)
- {
- pAllMarginProperty->mnIndex = -1;
- }
- if (pAllHeaderMarginProperty)
- {
- pAllHeaderMarginProperty->mnIndex = -1;
- }
- if (pAllFooterMarginProperty)
- {
- pAllFooterMarginProperty->mnIndex = -1;
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */