summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-18 18:34:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-18 20:19:17 +0100
commitff02109b65052a1d17d18f1f66a43480c8792691 (patch)
tree314e1f7b111226fbe4cd7a93992c25b088c5f53b /writerfilter
parent3db6d2cb99f9559ba29759990675e469613a8bb0 (diff)
Clean up DomainMapper_Impl::PushShapeContext()
It doesn't make sense to set anchor type here: either the VML import already set it, or it should be set when the anchor/inline token arrives. Additionally, this basically ensured that non-inline pictures are either inline or at-page anchored, and both of those values are incorrect. Change-Id: Ic71aeca9da333665a2749bb0aabbb9b63cee0c00
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2cbc7374425c..b60c2a80a0f4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1732,18 +1732,8 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->unoPropertySet(xProps);
#endif
- bool bIsGraphic = xSInfo->supportsService( "com.sun.star.drawing.GraphicObjectShape" );
-
- // If there are position properties, the shape should not be inserted "as character".
- sal_Int32 nHoriPosition = 0, nVertPosition = 0;
- xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT_POSITION)) >>= nHoriPosition;
- xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION)) >>= nVertPosition;
- if (nHoriPosition != 0 || nVertPosition != 0)
- bIsGraphic = false;
text::TextContentAnchorType nAnchorType(text::TextContentAnchorType_AT_PARAGRAPH);
xProps->getPropertyValue(rPropNameSupplier.GetName( PROP_ANCHOR_TYPE )) >>= nAnchorType;
- if (nAnchorType == text::TextContentAnchorType_AT_PAGE)
- bIsGraphic = false;
if (!m_bInHeaderFooterImport)
xProps->setPropertyValue(
@@ -1772,11 +1762,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
// we need to re-set this value to xTextContent, then only values are preserved.
xPropertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag));
}
- else if (nAnchorType != text::TextContentAnchorType_AS_CHARACTER)
- {
- xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
- }
- else
+ else if (nAnchorType == text::TextContentAnchorType_AS_CHARACTER)
{
// Fix spacing for as-character objects. If the paragraph has CT_Spacing_after set,
// it needs to be set on the object too, as that's what object placement code uses.