summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-07-04 10:55:50 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-04 12:35:35 +0000
commitce5d99b706ee4d34a710041ef0acbc2319e02561 (patch)
treec5cbca62974985caec25dd893fac1166a56c87c5 /oox
parent69876d6bdca0a527c4d10b9a3c724f5df9d035ec (diff)
bnc#820504 VML import: don't anchor shapes TO_PAGE
In theory, this is a problem because Word formats only support AT_CHAR and AS_CHAR, so importing something as AT_PAGE is buggy. In practice, this also leads to unvisible shapes, since f0d001a378c64ea457e722266e60c96522c72e9b. Change-Id: Ie730d67a789ef12734cede1f9b6c27764a66f237 (cherry picked from commit f5b7acac624f07fa95835b6054b8d295901bb1dd) Reviewed-on: https://gerrit.libreoffice.org/4716 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlshape.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 872ccace661a..9a5278b301a8 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -441,18 +441,8 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel)
if ( rTypeModel.maPosition == "absolute" )
{
- if (rTypeModel.moWrapAnchorX.get() == "page" && rTypeModel.moWrapAnchorY.get() == "page")
- {
- // I'm not sure if AT_PAGE is always correct here (not sure what the parent that
- // the spec talks about can be), but with Writer SwXDrawPage::add()
- // always in practice uses this because of pDoc->GetCurrentLayout() being NULL at this point.
- rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PAGE);
- }
- else
- {
- // Map to as-character by default, that fixes vertical position of some textframes.
- rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER);
- }
+ // Word supports as-character (inline) and at-character only, absolute can't be inline.
+ rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER);
if ( rTypeModel.maPositionVerticalRelative == "page" )
{