[Libreoffice-commits] core.git: 9 commits - sw/qa sw/README writerfilter/inc writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Oct 25 01:37:01 PDT 2014


 sw/README                                                |    1 
 sw/qa/core/data/rtf/pass/fdo82859.rtf                    |   25 ++++
 sw/qa/extras/htmlexport/htmlexport.cxx                   |    4 
 sw/qa/extras/rtfimport/data/fdo82859.rtf                 |   25 ++++
 sw/qa/extras/rtfimport/data/fdo85179.rtf                 |   33 +++++
 sw/qa/extras/rtfimport/rtfimport.cxx                     |   13 ++
 writerfilter/inc/ooxml/OOXMLDocument.hxx                 |    7 -
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx      |    5 
 writerfilter/inc/rtftok/RTFDocument.hxx                  |    3 
 writerfilter/source/dmapper/DomainMapper.cxx             |   12 --
 writerfilter/source/dmapper/GraphicImport.cxx            |   64 ++++++----
 writerfilter/source/dmapper/GraphicImport.hxx            |    4 
 writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx |    5 
 writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx |    2 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx          |    5 
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx          |    2 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx    |   90 ---------------
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx    |    8 -
 writerfilter/source/ooxml/OOXMLParserState.cxx           |   37 ------
 writerfilter/source/ooxml/OOXMLParserState.hxx           |    5 
 writerfilter/source/ooxml/OOXMLPropertySet.hxx           |    1 
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx       |   10 -
 writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx       |    2 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx           |    6 -
 writerfilter/source/rtftok/rtfdocumentimpl.hxx           |    1 
 writerfilter/source/rtftok/rtfreferenceproperties.cxx    |    7 -
 writerfilter/source/rtftok/rtfreferenceproperties.hxx    |    1 
 writerfilter/source/rtftok/rtfreferencetable.cxx         |    5 
 writerfilter/source/rtftok/rtfreferencetable.hxx         |    1 
 writerfilter/source/rtftok/rtfsdrimport.cxx              |    4 
 30 files changed, 138 insertions(+), 250 deletions(-)

New commits:
commit 04ea7b24ec1b5a027efa0b850f2bc3ac7116c52e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Oct 25 10:36:10 2014 +0200

    fdo#82859 RTF import: fillColor is unsigned
    
    Otherwise ARGB 0xFFFFFFFF would turn into black.
    
    Change-Id: I690f34d888ca9a013e8ce1af2c7ef8ed88ee28b0

diff --git a/sw/qa/extras/rtfimport/data/fdo82859.rtf b/sw/qa/extras/rtfimport/data/fdo82859.rtf
new file mode 100644
index 0000000..eac5e6f
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo82859.rtf
@@ -0,0 +1,25 @@
+{\rtf1
+{\shp
+{\*\shpinst\shpbypara\shpbyignore\shptop4154\shpbottom11234\shpbxcolumn\shpbxignore\shpleft-90\shpright9270
+{\sp
+{\sn fillColor}
+{\sv 4294967295}
+}
+{\sp
+{\sn shapeType}
+{\sv 202}
+}
+{\sp
+{\sn posrelv}
+{\sv 2}
+}
+{\sp
+{\sn posrelh}
+{\sv 2}
+}
+{\shptxt
+}
+}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 799151f..6ecd7a3 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1990,6 +1990,12 @@ DECLARE_RTFIMPORT_TEST(testFdo85179, "fdo85179.rtf")
     CPPUNIT_ASSERT_EQUAL(sal_uInt32(50800/360), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
 }
 
+DECLARE_RTFIMPORT_TEST(testFdo82859, "fdo82859.rtf")
+{
+    // This was 0: "0xffffff" was converted to 0, i.e. the background was black instead of the default.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(getShape(1), "BackColor"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index df1c185..f15a675 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -357,7 +357,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
         }
         else if (i->first == "fillColor" && xPropertySet.is())
         {
-            aAny <<= msfilter::util::BGRToRGB(i->second.toInt32());
+            aAny <<= msfilter::util::BGRToRGB(i->second.toUInt32());
             if (m_bTextFrame)
                 xPropertySet->setPropertyValue("BackColor", aAny);
             else
commit 6b7239855d8babdc1bcc7742f79ce2df64d1e476
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 24 16:21:51 2014 +0200

    fdo#82859 RTF import: don't try to set CustomShapeGeometry on a TextFrame
    
    Change-Id: I687fa609559f0484fe6bb804265243de154c3760

diff --git a/sw/qa/core/data/rtf/pass/fdo82859.rtf b/sw/qa/core/data/rtf/pass/fdo82859.rtf
new file mode 100644
index 0000000..72b1576
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/fdo82859.rtf
@@ -0,0 +1,25 @@
+{\rtf1
+{\field
+{\*\fldinst SHAPE }
+{\fldrslt
+{\shp
+{\*\shpinst\shpleft-90\shptop720\shpright9404\shpbottom2939\shpwr2\shpbxignore\shpbyignore
+{\sp
+{\sn shapeType}
+{\sv 1}
+}
+{\sp
+{\sn pVerticies}
+{\sv 8;4;(0,0);(-2147483645,0);(-2147483645,-2147483646);(0,-2147483646)}
+}
+{\sp
+{\sn pSegmentInfo}
+{\sv 2;4;16384;3;24577;32768}
+}
+{\shptxt hello}
+}
+}
+}
+}
+\par
+}
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index fcb5b9c..df1c185 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -824,7 +824,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
         aPropertyValue.Value <<= aPath.getAsConstList();
         aGeometry.push_back(aPropertyValue);
     }
-    if (!aGeometry.empty() && xPropertySet.is())
+    if (!aGeometry.empty() && xPropertySet.is() && !m_bTextFrame)
         xPropertySet->setPropertyValue("CustomShapeGeometry", uno::Any(aGeometry.getAsConstList()));
 
     // Set position and size
commit 6c10db81dedd906a45c72254b422f748739dc9c0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 24 15:47:10 2014 +0200

    sw README: ww1 is gone
    
    Change-Id: Ie8b8085c78ba0acc4fb363a1232ef26fc085a9c4

diff --git a/sw/README b/sw/README
index 0fe08cd..0fcfd16 100644
--- a/sw/README
+++ b/sw/README
@@ -21,7 +21,6 @@ comments show that Writer core dates back until at least November
    * inc: include files for filters
    * rtf: thin copy&paste helper around the UNO RTF import filter (in writerfilter)
    * writer
-   * ww1
    * ww8: DOC import, DOC/DOCX/RTF export
    * xml: ODF import/export, subclassed from xmloff (where most of the work is done)
  * uibase: user interface (those parts that are linked into sw & always loaded)
commit 40014cd070a2271ede0a73fd33de0121571df4eb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 24 15:44:49 2014 +0200

    only the now removed OOXML tokenizer called getType()
    
    Change-Id: Id9786ed75bf9d9b637312655af33d790caf93b13

diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 8032f60..3b778ba 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -133,13 +133,6 @@ public:
     virtual void resolve(Stream & rStream) SAL_OVERRIDE = 0;
 
     /**
-       Returns string representation of the type of this reference.
-
-       DEBUGGING PURPOSE ONLY.
-     */
-    virtual std::string getType() const SAL_OVERRIDE = 0;
-
-    /**
        Resolves a footnote to a stream handler.
 
        A footnote is resolved if either the note type or
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index e30a771..b4254b6 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -98,11 +98,6 @@ public:
      */
     virtual void resolve(T & rHandler) = 0;
 
-    /**
-       Returns the type of the reference aka the name of the access class.
-     */
-    virtual std::string getType() const = 0;
-
 protected:
     ~Reference() {}
 };
diff --git a/writerfilter/inc/rtftok/RTFDocument.hxx b/writerfilter/inc/rtftok/RTFDocument.hxx
index 1959505..7f5391c 100644
--- a/writerfilter/inc/rtftok/RTFDocument.hxx
+++ b/writerfilter/inc/rtftok/RTFDocument.hxx
@@ -32,9 +32,6 @@ public:
 
     /// Resolves this document to a stream handler.
     virtual void resolve(Stream& rHandler) SAL_OVERRIDE = 0;
-
-    /// Returns string representation of the type of this reference. (Debugging purpose only.)
-    virtual ::std::string getType() const SAL_OVERRIDE = 0;
 };
 
 /// Interface to create an RTFDocument instance.
diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx
index c98cf6f..734e55a 100644
--- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx
+++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx
@@ -70,11 +70,6 @@ void OOXMLBinaryObjectReference::resolve(BinaryObj & rHandler)
                   mSequence.getLength(), pRef);
 }
 
-std::string OOXMLBinaryObjectReference::getType() const
-{
-    return "OOXMLBinaryObjectReference";
-}
-
 }}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
index 89478a0..929a27f 100644
--- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
+++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
@@ -39,8 +39,6 @@ public:
     virtual ~OOXMLBinaryObjectReference();
 
     virtual void resolve(BinaryObj & rHandler) SAL_OVERRIDE;
-
-    virtual std::string getType() const SAL_OVERRIDE;
 };
 }}
 
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 89aa80d..e8af6d0 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -850,11 +850,6 @@ uno::Reference<io::XInputStream> OOXMLDocumentImpl::getInputStreamForId(const OU
     return pStream->getDocumentStream();
 }
 
-std::string OOXMLDocumentImpl::getType() const
-{
-    return "OOXMLDocumentImpl";
-}
-
 void OOXMLDocumentImpl::setModel(uno::Reference<frame::XModel> xModel)
 {
     mxModel.set(xModel);
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
index 30d7592..b074b54 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
@@ -95,8 +95,6 @@ public:
 
     virtual void resolve(Stream & rStream) SAL_OVERRIDE;
 
-    virtual std::string getType() const SAL_OVERRIDE;
-
     virtual void resolveFootnote(Stream & rStream,
                                  const Id & rType,
                                  const sal_Int32 nNoteId) SAL_OVERRIDE;
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index 3476ae8..214781f 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -54,7 +54,6 @@ public:
     virtual ~OOXMLPropertySet();
 
     virtual void resolve(Properties & rHandler) SAL_OVERRIDE = 0;
-    virtual std::string getType() const SAL_OVERRIDE = 0;
     virtual void add(OOXMLProperty::Pointer_t pProperty) = 0;
     virtual void add(OOXMLPropertySet::Pointer_t pPropertySet) = 0;
     virtual OOXMLPropertySet * clone() const = 0;
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index d4a0904..01b8b4d 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -455,11 +455,6 @@ OOXMLPropertySetImpl::end() const
     return mProperties.end();
 }
 
-string OOXMLPropertySetImpl::getType() const
-{
-    return string(maType.getStr());
-}
-
 void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
 {
     if (pProperty.get() != nullptr && pProperty->getId() != 0x0)
@@ -808,11 +803,6 @@ void OOXMLTableImpl::add(ValuePointer_t pPropertySet)
         mPropertySets.push_back(pPropertySet);
 }
 
-string OOXMLTableImpl::getType() const
-{
-    return "OOXMLTableImpl";
-}
-
 OOXMLTable * OOXMLTableImpl::clone() const
 {
     return new OOXMLTableImpl(*this);
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
index 02c1d31..1231600 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
@@ -169,7 +169,6 @@ public:
     virtual ~OOXMLPropertySetImpl();
 
     virtual void resolve(Properties & rHandler) SAL_OVERRIDE;
-    virtual std::string getType() const SAL_OVERRIDE;
     virtual void add(OOXMLProperty::Pointer_t pProperty) SAL_OVERRIDE;
     virtual void add(OOXMLPropertySet::Pointer_t pPropertySet) SAL_OVERRIDE;
     virtual OOXMLPropertySet * clone() const SAL_OVERRIDE;
@@ -293,7 +292,6 @@ public:
 
     virtual void resolve(Table & rTable) SAL_OVERRIDE;
     virtual void add(ValuePointer_t pPropertySet);
-    virtual std::string getType() const SAL_OVERRIDE;
     virtual OOXMLTable * clone() const SAL_OVERRIDE;
 };
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 50e2719..8dbf3b0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5937,12 +5937,6 @@ int RTFDocumentImpl::popState()
     return 0;
 }
 
-::std::string RTFDocumentImpl::getType() const
-{
-    return "RTFDocumentImpl";
-}
-
-
 bool RTFDocumentImpl::isInBackground()
 {
     return m_aStates.top().bInBackground;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index c0f6067..2f34299 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -333,7 +333,6 @@ public:
 
     // RTFDocument
     virtual void resolve(Stream& rHandler) SAL_OVERRIDE;
-    virtual std::string getType() const SAL_OVERRIDE;
 
     // RTFListener
     virtual int dispatchDestination(RTFKeyword nKeyword) SAL_OVERRIDE;
diff --git a/writerfilter/source/rtftok/rtfreferenceproperties.cxx b/writerfilter/source/rtftok/rtfreferenceproperties.cxx
index 793305e..e33d526 100644
--- a/writerfilter/source/rtftok/rtfreferenceproperties.cxx
+++ b/writerfilter/source/rtftok/rtfreferenceproperties.cxx
@@ -41,13 +41,6 @@ void RTFReferenceProperties::resolve(Properties& rHandler)
     }
 }
 
-std::string RTFReferenceProperties::getType() const
-{
-    return "RTFReferenceProperties";
-}
-
-
-
 } // namespace rtftok
 } // namespace writerfilter
 
diff --git a/writerfilter/source/rtftok/rtfreferenceproperties.hxx b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
index 90d30be..a38db24 100644
--- a/writerfilter/source/rtftok/rtfreferenceproperties.hxx
+++ b/writerfilter/source/rtftok/rtfreferenceproperties.hxx
@@ -25,7 +25,6 @@ public:
     RTFReferenceProperties(RTFSprms rAttributes);
     virtual ~RTFReferenceProperties();
     virtual void resolve(Properties& rHandler) SAL_OVERRIDE;
-    virtual std::string getType() const SAL_OVERRIDE;
     RTFSprms& getAttributes()
     {
         return m_aAttributes;
diff --git a/writerfilter/source/rtftok/rtfreferencetable.cxx b/writerfilter/source/rtftok/rtfreferencetable.cxx
index 7d4cefd..67b6284 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.cxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.cxx
@@ -29,11 +29,6 @@ void RTFReferenceTable::resolve(Table& rHandler)
         rHandler.entry(i->first, i->second);
 }
 
-std::string RTFReferenceTable::getType() const
-{
-    return "RTFReferenceTable";
-}
-
 } // namespace rtftok
 } // namespace writerfilter
 
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx b/writerfilter/source/rtftok/rtfreferencetable.hxx
index feb7848..91c3e7b 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.hxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.hxx
@@ -27,7 +27,6 @@ public:
     RTFReferenceTable(Entries_t const& rEntries);
     virtual ~RTFReferenceTable();
     virtual void resolve(Table& rHandler) SAL_OVERRIDE;
-    virtual std::string getType() const SAL_OVERRIDE;
 private:
     Entries_t m_aEntries;
 };
commit d5b4eccee3c462a12f8caf1fccf38cc6e2a34a68
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Oct 24 11:41:39 2014 +0200

    writerfilter: remove unused dumpXml() methods
    
    Unused since 51d1545e0ce8b30eea710501b84853288dd2563b (writerfilter:
    Kill debug_logger., 2014-06-11).
    
    Change-Id: I01743a9f5c603da06cfd422d29d3258a17d4dd40

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 7bdebfc..ba60f70 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -57,33 +57,6 @@ using namespace ::com::sun::star;
 using namespace oox;
 using namespace ::std;
 
-#ifdef DEBUG_WRITERFILTER
-static string resourceToString(OOXMLFastContextHandler::ResourceEnum_t eResource)
-{
-    string sResult;
-
-    switch (eResource)
-    {
-    case OOXMLFastContextHandler::STREAM:
-        sResult = "Stream";
-        break;
-    case OOXMLFastContextHandler::PROPERTIES:
-        sResult = "Properties";
-        break;
-    case OOXMLFastContextHandler::TABLE:
-        sResult = "Table";
-        break;
-    case OOXMLFastContextHandler::SHAPE:
-        sResult = "Shape";
-        break;
-    default:
-        sResult = "??";
-    }
-
-    return sResult;
-}
-#endif
-
 set<OOXMLFastContextHandler *> aSetContexts;
 
 #ifdef DEBUG_WRITERFILTER
@@ -375,37 +348,6 @@ void OOXMLFastContextHandler::endAction(Token_t Element)
     OOXMLFactory::getInstance()->endAction(this, Element);
 }
 
-#ifdef DEBUG_WRITERFILTER
-void OOXMLFastContextHandler::dumpXml( const TagLogger::Pointer_t pLogger ) const
-{
-    pLogger->startElement("context");
-
-    static char sBuffer[128];
-    snprintf(sBuffer, sizeof(sBuffer), "%p", this);
-
-    pLogger->attribute("parent", std::string(sBuffer));
-    pLogger->attribute("type", getType());
-    pLogger->attribute("resource", resourceToString(getResource()));
-    pLogger->attribute("token", fastTokenToId(getToken()));
-    pLogger->attribute("id", (*QNameToString::Instance())(getId()));
-
-    OOXMLValue::Pointer_t pVal(getValue());
-
-    if (pVal.get() != nullptr)
-        pLogger->attribute("value", pVal->toString());
-    else
-        pLogger->attribute("value", std::string("(null)"));
-
-    pLogger->propertySet(getPropertySet(),
-            IdToString::Pointer_t(new OOXMLIdToString()));
-
-    mpParserState->dumpXml( pLogger );
-
-    pLogger->endElement();
-}
-
-#endif
-
 void OOXMLFastContextHandler::setId(Id rId)
 {
     mId = rId;
@@ -1093,38 +1035,6 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const
     return OOXMLValue::Pointer_t(new OOXMLPropertySetValue(mpPropertySet));
 }
 
-#ifdef DEBUG_WRITERFILTER
-void OOXMLFastContextHandlerProperties::dumpXml( const TagLogger::Pointer_t pLogger) const
-{
-    pLogger->startElement("context");
-
-    static char sBuffer[128];
-    snprintf(sBuffer, sizeof(sBuffer), "%p", this);
-
-    pLogger->attribute("parent", std::string(sBuffer));
-    pLogger->attribute("type", getType());
-    pLogger->attribute("resource", resourceToString(getResource()));
-    pLogger->attribute("token", fastTokenToId(getToken()));
-    pLogger->attribute("id", (*QNameToString::Instance())(getId()));
-
-    OOXMLValue::Pointer_t pVal(getValue());
-
-    if (pVal.get() != nullptr)
-        pLogger->attribute("value", pVal->toString());
-    else
-        pLogger->attribute("value", std::string("(null)"));
-
-    pLogger->attribute("resolve", mbResolve ? "resolve" : "noResolve");
-
-    pLogger->propertySet(getPropertySet(),
-            IdToString::Pointer_t(new OOXMLIdToString()));
-
-    mpParserState->dumpXml( pLogger );
-
-    pLogger->endElement();
-}
-#endif
-
 void OOXMLFastContextHandlerProperties::newProperty
 (const Id & rId, OOXMLValue::Pointer_t pVal)
 {
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 7dfb793..33ea6e0 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -203,10 +203,6 @@ public:
 
     void sendPropertyToParent();
 
-#ifdef DEBUG_WRITERFILTER
-    virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const;
-#endif
-
     sal_uInt32 getInstanceNumber() { return mnInstanceNumber; }
 protected:
     OOXMLFastContextHandler * mpParent;
@@ -306,10 +302,6 @@ public:
     virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) SAL_OVERRIDE;
     virtual OOXMLPropertySet::Pointer_t getPropertySet() const SAL_OVERRIDE;
 
-#ifdef DEBUG_WRITERFILTER
-    virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const SAL_OVERRIDE;
-#endif
-
 protected:
     /// the properties
     OOXMLPropertySet::Pointer_t mpPropertySet;
diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx
index 3b8f764..d8cffa4 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.cxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.cxx
@@ -264,43 +264,6 @@ void OOXMLParserState::endTxbxContent()
     inTxbxContent = false;
 }
 
-#ifdef DEBUG_WRITERFILTER
-void OOXMLParserState::dumpXml( const TagLogger::Pointer_t& pLogger )
-{
-    pLogger->startElement("parserstate");
-
-    std::string sTmp;
-
-    if (isInSectionGroup())
-        sTmp += "s";
-    else
-        sTmp += "-";
-
-    if (isInParagraphGroup())
-        sTmp += "p";
-    else
-        sTmp += "-";
-
-    if (isInCharacterGroup())
-        sTmp += "c";
-    else
-        sTmp += "-";
-
-    if (isForwardEvents())
-        sTmp += "f";
-    else
-        sTmp += "-";
-
-    pLogger->attribute("state", sTmp);
-    pLogger->attribute("XNoteId", getXNoteId() );
-    if (mpCharacterProps != OOXMLPropertySet::Pointer_t())
-        pLogger->chars(mpCharacterProps->toString());
-
-    pLogger->endElement();
- }
-
-#endif
-
 }}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx
index eff9d87..5e22257 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.hxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.hxx
@@ -115,11 +115,6 @@ public:
     void startTxbxContent();
     void endTxbxContent();
 
-#ifdef DEBUG_WRITERFILTER
-public:
-    void dumpXml( const TagLogger::Pointer_t& pLogger );
-#endif
-
 };
 
 }}
commit 0f0a22ade666d33a10d9c83c0f636be9acf1ed39
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 23 19:05:09 2014 +0200

    writerfilter: nobody generates FSPA references anymore, only doctok did
    
    Change-Id: I3dbfb727c40a71eb70a26fd53ad651477a8a5220

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 0309c0b..a06935d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3033,13 +3033,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
 
 void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)
 {
-    std::string sType = ref->getType();
-    if( sType == "FSPA" )
-    {
-        m_pImpl->ImportGraphic(ref, IMPORT_AS_SHAPE);
-    }
-    else
-        ref->resolve(*this);
+    ref->resolve(*this);
 }
 
 void DomainMapper::lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index f916d4c..38b6c57 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1153,43 +1153,39 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
                 uno::UNO_QUERY_THROW);
             xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_GRAPHIC), uno::makeAny( xGraphic ));
             xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_ANCHOR_TYPE),
-                uno::makeAny( m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE || m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR ?
+                uno::makeAny( m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR ?
                                     text::TextContentAnchorType_AT_CHARACTER :
                                     text::TextContentAnchorType_AS_CHARACTER ));
             xGraphicObject = uno::Reference< text::XTextContent >( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
 
-            //shapes have only one border, PICF might have four
+            //shapes have only one border
             table::BorderLine2 aBorderLine;
-            for( sal_Int32 nBorder = 0; nBorder < 4; ++nBorder )
+            GraphicBorderLine& rBorderLine = m_pImpl->aBorders[0];
+            if (rBorderLine.isEmpty() && xShapeProps.is())
             {
-                if( !nBorder )
-                {
-                    GraphicBorderLine& rBorderLine = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder)];
-                    if (rBorderLine.isEmpty() && xShapeProps.is())
-                    {
-                        // In case we got no border tokens and we have the
-                        // original shape, then use its line properties as the
-                        // border.
-                        aBorderLine.Color = xShapeProps->getPropertyValue("LineColor").get<sal_Int32>();
-                        aBorderLine.LineWidth = xShapeProps->getPropertyValue("LineWidth").get<sal_Int32>();
-                    }
-                    else
-                    {
-                        aBorderLine.Color = rBorderLine.nLineColor;
-                        aBorderLine.InnerLineWidth = 0;
-                        aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
-                        aBorderLine.LineDistance = 0;
-                    }
-                }
-                PropertyIds aBorderProps[4] =
-                {
-                    PROP_LEFT_BORDER,
-                    PROP_RIGHT_BORDER,
-                    PROP_TOP_BORDER,
-                    PROP_BOTTOM_BORDER
-                };
-                xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( aBorderProps[nBorder]), uno::makeAny(aBorderLine));
+                // In case we got no border tokens and we have the
+                // original shape, then use its line properties as the
+                // border.
+                aBorderLine.Color = xShapeProps->getPropertyValue("LineColor").get<sal_Int32>();
+                aBorderLine.LineWidth = xShapeProps->getPropertyValue("LineWidth").get<sal_Int32>();
             }
+            else
+            {
+                aBorderLine.Color = rBorderLine.nLineColor;
+                aBorderLine.InnerLineWidth = 0;
+                aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
+                aBorderLine.LineDistance = 0;
+            }
+            PropertyIds aBorderProps[4] =
+            {
+                PROP_LEFT_BORDER,
+                PROP_RIGHT_BORDER,
+                PROP_TOP_BORDER,
+                PROP_BOTTOM_BORDER
+            };
+
+            for( sal_Int32 nBorder = 0; nBorder < 4; ++nBorder )
+                xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( aBorderProps[nBorder]), uno::makeAny(aBorderLine));
 
             // setting graphic object shadow proerties
             if (m_pImpl->bShadow)
@@ -1231,15 +1227,9 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
                 xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SIZE_PROTECTED ),
                     uno::makeAny(true));
 
-            if( m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE || m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR )
+            if (m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
             {
                 sal_Int32 nWidth = m_pImpl->nRightPosition - m_pImpl->nLeftPosition;
-                if( m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE )
-                {
-                    sal_Int32 nHeight = m_pImpl->nBottomPosition - m_pImpl->nTopPosition;
-                    xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_SIZE),
-                        uno::makeAny( awt::Size( nWidth, nHeight )));
-                }
                 //adjust margins
                 if( (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT &&
                     (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx
index 06c5423..75dad4f 100644
--- a/writerfilter/source/dmapper/GraphicImport.hxx
+++ b/writerfilter/source/dmapper/GraphicImport.hxx
@@ -57,7 +57,6 @@ class DomainMapper;
 
 enum GraphicImportType
 {
-    IMPORT_AS_SHAPE,
     IMPORT_AS_DETECTED_INLINE,
     IMPORT_AS_DETECTED_ANCHOR
 };
commit 4bd9d49498e958d49697b1482ca8f29b8e626796
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 23 18:59:11 2014 +0200

    writerfilter: nobody generates PICF references anymore, only doctok did
    
    Change-Id: I65576f09cbc39f98f3d27739e06ec9520d5032c5

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 12763b9..0309c0b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3034,11 +3034,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
 void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)
 {
     std::string sType = ref->getType();
-    if( sType == "PICF" )
-    {
-        m_pImpl->ImportGraphic(ref, IMPORT_AS_GRAPHIC);
-    }
-    else if( sType == "FSPA" )
+    if( sType == "FSPA" )
     {
         m_pImpl->ImportGraphic(ref, IMPORT_AS_SHAPE);
     }
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 0b58ddc..f916d4c 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1162,7 +1162,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
             table::BorderLine2 aBorderLine;
             for( sal_Int32 nBorder = 0; nBorder < 4; ++nBorder )
             {
-                if( m_pImpl->eGraphicImportType == IMPORT_AS_GRAPHIC || !nBorder )
+                if( !nBorder )
                 {
                     GraphicBorderLine& rBorderLine = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder)];
                     if (rBorderLine.isEmpty() && xShapeProps.is())
diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx
index 5b8e101..06c5423 100644
--- a/writerfilter/source/dmapper/GraphicImport.hxx
+++ b/writerfilter/source/dmapper/GraphicImport.hxx
@@ -57,7 +57,6 @@ class DomainMapper;
 
 enum GraphicImportType
 {
-    IMPORT_AS_GRAPHIC,
     IMPORT_AS_SHAPE,
     IMPORT_AS_DETECTED_INLINE,
     IMPORT_AS_DETECTED_ANCHOR
commit 01a32b7d074511bed24044dc94e1159aea62722b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 23 17:09:25 2014 +0200

    fdo#85179 RTF filter: import image border
    
    Also adjust CppunitTest_sw_htmlexport that implicitly tested that there
    is no color around the image.
    
    Change-Id: I8e14dfa7e7be80c4f8c492999071decae6a492e8

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 2db20ef..8e202eb 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -122,7 +122,7 @@ DECLARE_HTMLEXPORT_TEST(testExportOfImages, "textAndImage.docx")
     CPPUNIT_ASSERT(pDoc);
 
     assertXPath(pDoc, "/html/body", 1);
-    assertXPath(pDoc, "/html/body/p/img", 1);
+    assertXPath(pDoc, "/html/body/p/font/img", 1);
 }
 
 DECLARE_HTMLEXPORT_TEST(testExportOfImagesWithSkipImageEnabled, "textAndImage.docx")
@@ -131,7 +131,7 @@ DECLARE_HTMLEXPORT_TEST(testExportOfImagesWithSkipImageEnabled, "textAndImage.do
     CPPUNIT_ASSERT(pDoc);
 
     assertXPath(pDoc, "/html/body", 1);
-    assertXPath(pDoc, "/html/body/p/img", 0);
+    assertXPath(pDoc, "/html/body/p/font/img", 0);
 }
 
 DECLARE_HTMLEXPORT_TEST(testSkipImageEmbedded, "skipimage-embedded.doc")
diff --git a/sw/qa/extras/rtfimport/data/fdo85179.rtf b/sw/qa/extras/rtfimport/data/fdo85179.rtf
new file mode 100644
index 0000000..fb9bcfa
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo85179.rtf
@@ -0,0 +1,33 @@
+{\rtf1
+\pard\plain
+{\*\shppict
+{\pict
+{\*\picprop\shplid1025
+{\sp
+{\sn shapeType}
+{\sv 75}
+}
+{\sp
+{\sn lineColor}
+{\sv 65535}
+}
+{\sp
+{\sn lineWidth}
+{\sv 50800}
+}
+}
+\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw1806\pich1806\picwgoal1024\pichgoal1024\pngblip
+89504e470d0a1a0a0000000d49484452000000400000004008040000000060b9550000000467414d410000b18f0bfc6105000000017352474200aece1ce90000
+00206348524d00007a26000080840000fa00000080e8000075300000ea6000003a98000017709cba513c00000002624b47440000aa8d2332000000096f464673
+0000000600000000000c7355d3000000097048597300000dd700000dd70142289b7800000009767041670000004c00000040009d31381b000001cd4944415468
+deedd93d4fc24018c0f17f89c6cdc44940e3e222be2c0e7e0417e3a8113571707632514012a320c6f84d34be2c2ec2b750f40be8e6e4a00113cfe14a5b69b108
+f4589ee71652eefafce0b9f42e3d7063822aaac3f641d173a75d3efee85b6582c0c8749c5eb7332cfb4e6f213d336ed29807304477b1c7a94db80ae9e9c934d0
+fcdd12e7ffcefcc9168f9a0059143b8cb0d2de581f609854073fbecc220f60b18722479d0d14abed8c8cb5d3293ce2949903b0d8a7047cb1c98541008cba840c
+a736e1d2200046b967567f740961d3b197008873cf74835002eaac7363100009ca0d4296121675d2dc1a0440d2256428625163ed2f42cf011e8245d621b42c44
+0400485261a699706d1000092fa100d4490713220240dc25e438b1090185880ca09f8ece5c28d9843b009e82471ca25069d5cb785529bd007fdbfb8541b65b2f
+531100947a51530d42c1d92f9829818e31ca4ce9421c70e427440e80712a7a89b7c8fb0906003046a5311df31cf501a01f4d0ee1b80f00bd4c398558ee0340ff
+0b939a30df17002459f05d330a080a0108400002108000042000010840000210800004200001f8ce0ddf798e30dd7b38e0ce7ea16d2abc25a819cbda225337c7
+f7ff69bf8eef7f0084e08d42bdf8a03e00000025744558746372656174652d6461746500323031302d31322d32305431373a30383a33362b30313a30307ae51b1c00000025744558746d6f646966792d6461746500323031302d31322d32305431373a30383a33372b30313a30308323669c0000000049454e44ae4260820a}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index b3cfec9..799151f 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1983,6 +1983,13 @@ DECLARE_RTFIMPORT_TEST(testFdo83464, "fdo83464.rtf")
     CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), getProperty<OUString>(getRun(getParagraphOfText(1, xFrameText->getText()), 1), "CharFontName"));
 }
 
+DECLARE_RTFIMPORT_TEST(testFdo85179, "fdo85179.rtf")
+{
+    // This was 0, border around the picture was ignored on import.
+    // 360: EMU -> MM100
+    CPPUNIT_ASSERT_EQUAL(sal_uInt32(50800/360), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 995a7a4..0b58ddc 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -179,6 +179,11 @@ struct GraphicBorderLine
         ,bHasShadow(false)
         {}
 
+    bool isEmpty()
+    {
+        return nLineWidth == 0 && nLineColor == 0 && bHasShadow == false;
+    }
+
 };
 
 class GraphicImport_Impl
@@ -704,7 +709,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
 
                         // fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation
                         if ( nRotation == 0 && !bContainsEffects )
-                            m_xGraphicObject = createGraphicObject( aMediaProperties );
+                            m_xGraphicObject = createGraphicObject( aMediaProperties, xShapeProps );
 
                         bUseShape = !m_xGraphicObject.is( );
 
@@ -1131,7 +1136,7 @@ void GraphicImport::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::
 {
 }
 
-uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const beans::PropertyValues& aMediaProperties )
+uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const beans::PropertyValues& aMediaProperties, const uno::Reference<beans::XPropertySet>& xShapeProps )
 {
     uno::Reference< text::XTextContent > xGraphicObject;
     try
@@ -1160,10 +1165,21 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
                 if( m_pImpl->eGraphicImportType == IMPORT_AS_GRAPHIC || !nBorder )
                 {
                     GraphicBorderLine& rBorderLine = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder)];
-                    aBorderLine.Color = rBorderLine.nLineColor;
-                    aBorderLine.InnerLineWidth = 0;
-                    aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
-                    aBorderLine.LineDistance = 0;
+                    if (rBorderLine.isEmpty() && xShapeProps.is())
+                    {
+                        // In case we got no border tokens and we have the
+                        // original shape, then use its line properties as the
+                        // border.
+                        aBorderLine.Color = xShapeProps->getPropertyValue("LineColor").get<sal_Int32>();
+                        aBorderLine.LineWidth = xShapeProps->getPropertyValue("LineWidth").get<sal_Int32>();
+                    }
+                    else
+                    {
+                        aBorderLine.Color = rBorderLine.nLineColor;
+                        aBorderLine.InnerLineWidth = 0;
+                        aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
+                        aBorderLine.LineDistance = 0;
+                    }
                 }
                 PropertyIds aBorderProps[4] =
                 {
@@ -1371,7 +1387,8 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen
         uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, m_pImpl->bIsBitmap );
         aMediaProperties[0].Value <<= xIStream;
 
-        m_xGraphicObject = createGraphicObject( aMediaProperties );
+        uno::Reference<beans::XPropertySet> xPropertySet;
+        m_xGraphicObject = createGraphicObject( aMediaProperties, xPropertySet );
 }
 
 
diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx
index 160e417..5b8e101 100644
--- a/writerfilter/source/dmapper/GraphicImport.hxx
+++ b/writerfilter/source/dmapper/GraphicImport.hxx
@@ -76,7 +76,7 @@ class GraphicImport : public LoggedProperties, public LoggedTable
     css::uno::Reference<css::drawing::XShape> m_xShape;
     void ProcessShapeOptions(Value & val);
 
-    css::uno::Reference<css::text::XTextContent > createGraphicObject(const css::beans::PropertyValues& aMediaProperties );
+    css::uno::Reference<css::text::XTextContent > createGraphicObject(const css::beans::PropertyValues& aMediaProperties, const css::uno::Reference<css::beans::XPropertySet>& xShapeProps);
 
     void putPropertyToFrameGrabBag( const OUString& sPropertyName, const css::uno::Any& aPropertyValue );
 
commit a2b5ead0dc86516edd5008d5aaca862eaf611667
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 23 16:43:30 2014 +0200

    writerfilter: avoid copy&paste
    
    Change-Id: I72057875cf2803008f63a85fee2be477598d8aff

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index bbedad3..995a7a4 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1159,9 +1159,10 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
             {
                 if( m_pImpl->eGraphicImportType == IMPORT_AS_GRAPHIC || !nBorder )
                 {
-                    aBorderLine.Color = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineColor;
+                    GraphicBorderLine& rBorderLine = m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder)];
+                    aBorderLine.Color = rBorderLine.nLineColor;
                     aBorderLine.InnerLineWidth = 0;
-                    aBorderLine.OuterLineWidth = (sal_Int16)m_pImpl->aBorders[m_pImpl->eGraphicImportType == IMPORT_AS_SHAPE ? BORDER_TOP : static_cast<BorderPosition>(nBorder) ].nLineWidth;
+                    aBorderLine.OuterLineWidth = (sal_Int16)rBorderLine.nLineWidth;
                     aBorderLine.LineDistance = 0;
                 }
                 PropertyIds aBorderProps[4] =


More information about the Libreoffice-commits mailing list