summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-07 17:42:26 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-08 04:27:55 +0000
commit60773144ad33a10c32ce43fa9fca80c8b3fe8202 (patch)
tree2647ece249c92cbbef1de2cc796e0180071b45d2 /writerfilter
parenta7223551f8d3c6d08fcfe951ac21ec8dc8ee00af (diff)
fdo#61343 fix DOCX import of OLE object after groupshape
Change-Id: I88d5e49cc3fb915d25c1b2576cdda1fffc9e2f23 (cherry picked from commit 344e4a25eac6505678f4ce8a6c1c8cef83c68276) Reviewed-on: https://gerrit.libreoffice.org/2587 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a3cc27cbe412..6074add28f9b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1625,6 +1625,19 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend;
try
{
+ uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
+ if (xSInfo->supportsService("com.sun.star.drawing.GroupShape"))
+ {
+ // A GroupShape doesn't implement text::XTextRange, but appending
+ // an empty reference to the stacks still makes sense, because this
+ // way bToRemove can be set, and we won't end up with duplicated
+ // shapes for OLE objects.
+ m_aTextAppendStack.push(TextAppendContext(uno::Reference<text::XTextAppend>(xShape, uno::UNO_QUERY), uno::Reference<text::XTextCursor>()));
+ uno::Reference<text::XTextContent> xTxtContent(xShape, uno::UNO_QUERY);
+ m_aAnchoredStack.push(xTxtContent);
+ }
+ else
+ {
uno::Reference< text::XTextRange > xShapeText( xShape, uno::UNO_QUERY_THROW);
// Add the shape to the text append stack
m_aTextAppendStack.push( TextAppendContext(uno::Reference< text::XTextAppend >( xShape, uno::UNO_QUERY_THROW ),
@@ -1640,7 +1653,6 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->unoPropertySet(xProps);
#endif
- uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
bool bIsGraphic = xSInfo->supportsService( "com.sun.star.drawing.GraphicObjectShape" );
// If there are position properties, the shape should not be inserted "as character".
@@ -1668,6 +1680,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
{
xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
}
+ }
appendTableManager( );
appendTableHandler( );