fdo#45187 revert "writerfilter import, fixed the shapes import"

This reverts commit 0e26bd20978cbdd7c59368044c2a21b98ffba164. Sadly
without a test document for the original issue there is no better fix
for this one.

Acked-by: Luboš Luňák <l.lunak@suse.cz>
Acked-by: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d775650..8e5b9ea 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -192,7 +192,7 @@ DomainMapper_Impl::DomainMapper_Impl(
        m_bIsColumnBreakDeferred( false ),
        m_bIsPageBreakDeferred( false ),
        m_bIsInShape( false ),
        m_bRemovedLastAnchored( false ),
        m_bShapeContextAdded( false ),
        m_pLastSectionContext( ),
        m_nCurrentTabStopIndex( 0 ),
        m_sCurrentParaStyleId(),
@@ -1062,8 +1062,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
                        // this is normal: the shape is already attached
                    }
                    m_aAnchoredStack.pop( );
                    m_aTextAppendStack.pop( );
                    m_bRemovedLastAnchored = true;
                }

                // Get the end of paragraph character inserted
@@ -1204,10 +1202,10 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle
        // gives a better ( visually ) result
        xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ),  uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
        // remove ( if valid ) associated shape ( used for graphic replacement )
        if ( m_aAnchoredStack.size() > 0 )
        if ( m_bShapeContextAdded )
        {
            if ( lcl_removeShape(  m_xTextDocument, pOLEHandler->getShape(), m_aAnchoredStack, m_aTextAppendStack ) )
                m_bRemovedLastAnchored = true; // ensure PopShapeContext processing doesn't pop the append stack
                m_bShapeContextAdded = false; // ensure PopShapeContext processing doesn't pop the append stack
        }

        //
@@ -1219,6 +1217,7 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle
        (void)rEx;
        OSL_FAIL( "Exception in creation of OLE object" );
    }

}

void DomainMapper_Impl::appendStarMath( const Value& val )
@@ -1549,7 +1548,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape 
    {
        // Add the shape to the text append stack
        m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xShape, uno::UNO_QUERY_THROW ) );
        m_bRemovedLastAnchored = false;
        m_bShapeContextAdded = true;

        // Add the shape to the anchored objects stack
        uno::Reference< text::XTextContent > xTxtContent( xShape, uno::UNO_QUERY_THROW );
@@ -1588,11 +1587,11 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape 

void DomainMapper_Impl::PopShapeContext()
{
    if ( !m_bRemovedLastAnchored && m_aAnchoredStack.size() > 0 )
    if ( m_bShapeContextAdded )
    {
        RemoveLastParagraph();
        m_aTextAppendStack.pop();
        m_aAnchoredStack.pop();
        m_bShapeContextAdded = false;
    }
    m_bIsInShape = false;
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index c4899cb..924c8dd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -295,7 +295,7 @@ private:
    bool                                                                            m_bIsColumnBreakDeferred;
    bool                                                                            m_bIsPageBreakDeferred;
    bool                                                                            m_bIsInShape;
    bool                                                                            m_bRemovedLastAnchored;
    bool                                                                            m_bShapeContextAdded;

    LineNumberSettings                                                              m_aLineNumberSettings;