Makefile.fetch                                                     |    1 
 RepositoryExternal.mk                                              |   64 +
 config_host.mk.in                                                  |    3 
 configure.ac                                                       |    6 
 download.lst                                                       |    2 
 external/Module_external.mk                                        |    1 
 external/librevenge/ExternalPackage_librevenge.mk                  |   22 
 external/librevenge/ExternalProject_librevenge.mk                  |   44 +
 external/librevenge/Library_revenge.mk                             |   48 +
 external/librevenge/Makefile                                       |    7 
 external/librevenge/Module_librevenge.mk                           |   31 
 external/librevenge/README                                         |    3 
 external/librevenge/UnpackedTarball_librevenge.mk                  |   16 
 sw/qa/extras/uiwriter/data/tdf113877_blank.odt                     |binary
 sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt            |binary
 sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt             |binary
 sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt         |binary
 sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt      |binary
 sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx                                 |  136 +++
 sw/source/core/txtnode/ndtxt.cxx                                   |   47 +
 sw/source/filter/xml/xmlimp.cxx                                    |  214 ++++
 sw/source/filter/xml/xmlimp.hxx                                    |    1 
 writerperfect/source/common/WPXSvStream.cxx                        |  436 
++++++++--
 writerperfect/source/common/WPXSvStream.hxx                        |   12 
 25 files changed, 1016 insertions(+), 78 deletions(-)

New commits:
commit 0dbc79be3a0de50700205eae501cf18254d88e40
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Thu Oct 8 09:01:33 2020 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Fri Jul 15 16:25:07 2022 +0200

    tdf#132289 missing styles when inserting file with list
    
    Warning: this does not work yet
    Follow the instructions in the bug, inserting does not change
    style for first line in document
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104085
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104319
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit 92c05bd1f8ef695a56718c4b54babbe757ab9b89)
    
    Change-Id: I444997a6cc55cfe287f4c610f538f2f54803646c

diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt
new file mode 100644
index 000000000000..f4d58da53b95
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt
new file mode 100644
index 000000000000..8de77fc6161c
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 12f74e1d9647..0881a66412ba 100755
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -25,6 +25,11 @@ public:
     void testFdo69893();
     void testFdo75110();
     void testFdo75898();
+
+    void testTdf113877_mergeDocs(const char* aDestDoc, const char* aInsertDoc);
+    void testTdf113877_blank_bold_on();
+    void testTdf113877_blank_bold_off();
+
     void testTdf113877();
     void testTdf113877NoMerge();
     void testTdf113877_default_style();
@@ -36,6 +41,8 @@ public:
     CPPUNIT_TEST(testFdo69893);
     CPPUNIT_TEST(testFdo75110);
     CPPUNIT_TEST(testFdo75898);
+    CPPUNIT_TEST(testTdf113877_blank_bold_on);
+    CPPUNIT_TEST(testTdf113877_blank_bold_off);
     CPPUNIT_TEST(testTdf113877);
     CPPUNIT_TEST(testTdf113877NoMerge);
     CPPUNIT_TEST(testTdf113877_default_style);
@@ -153,11 +160,9 @@ void SwUiWriterTest::testFdo69893()
     CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetTxt());
 }
 
-// During insert of the document with list inside into the main document 
inside the list
-// we should merge both lists into one, when they have the same list properties
-void SwUiWriterTest::testTdf113877()
+void SwUiWriterTest::testTdf113877_mergeDocs(const char* aDestDoc, const char* 
aInsertDoc)
 {
-    load(DATA_DIRECTORY, "tdf113877_insert_numbered_list.odt");
+    load(DATA_DIRECTORY, aDestDoc);
 
     // set a page cursor into the end of the document
     uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
@@ -167,10 +172,17 @@ void SwUiWriterTest::testTdf113877()
 
     // insert the same document at current cursor position
     {
-        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list.odt";
+        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
OUString::createFromAscii(aInsertDoc);
         uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
         lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
     }
+}
+
+// During insert of the document with list inside into the main document 
inside the list
+// we should merge both lists into one, when they have the same list properties
+void SwUiWriterTest::testTdf113877()
+{
+    testTdf113877_mergeDocs("tdf113877_insert_numbered_list.odt", 
"tdf113877_insert_numbered_list.odt");
 
     const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
     const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
@@ -190,20 +202,7 @@ void SwUiWriterTest::testTdf113877()
 // The same test as testTdf113877() but merging of two list should not be 
performed.
 void SwUiWriterTest::testTdf113877NoMerge()
 {
-    load(DATA_DIRECTORY, "tdf113877_insert_numbered_list.odt");
-
-    // set a page cursor into the end of the document
-    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
-    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
-    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
-    xCursor->jumpToEndOfPage();
-
-    // insert the same document at current cursor position
-    {
-        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
-        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
-        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
-    }
+    testTdf113877_mergeDocs("tdf113877_insert_numbered_list.odt", 
"tdf113877_insert_numbered_list_abcd.odt");
 
     const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
     const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
@@ -229,20 +228,7 @@ void SwUiWriterTest::testTdf113877NoMerge()
 //
 void SwUiWriterTest::testTdf113877_default_style()
 {
-    load(DATA_DIRECTORY, "tdf113877_blank.odt");
-
-    // set a page cursor into the end of the document
-    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
-    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
-    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
-    xCursor->jumpToEndOfPage();
-
-    // insert the same document at current cursor position
-    {
-        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
-        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
-        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
-    }
+    testTdf113877_mergeDocs("tdf113877_blank.odt", 
"tdf113877_insert_numbered_list_abcd.odt");
 
     const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
     const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
@@ -261,20 +247,31 @@ void SwUiWriterTest::testTdf113877_default_style()
 //
 void SwUiWriterTest::testTdf113877_Standard_style()
 {
-    load(DATA_DIRECTORY, "tdf113877_blank_ownStandard.odt");
+    testTdf113877_mergeDocs("tdf113877_blank_ownStandard.odt", 
"tdf113877_insert_numbered_list_abcd.odt");
 
-    // set a page cursor into the end of the document
-    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
-    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
-    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
-    xCursor->jumpToEndOfPage();
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+    const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
 
-    // insert the same document at current cursor position
-    {
-        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
-        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
-        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
-    }
+    CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+    CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+void SwUiWriterTest::testTdf113877_blank_bold_on()
+{
+    testTdf113877_mergeDocs("tdf113877_blank_bold_on.odt", 
"tdf113877_insert_numbered_list_abcd.odt");
+
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+    const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+    CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+    CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+void SwUiWriterTest::testTdf113877_blank_bold_off()
+{
+    testTdf113877_mergeDocs("tdf113877_blank_bold_off.odt", 
"tdf113877_insert_numbered_list_abcd.odt");
 
     const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
     const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index e70560abfa2d..c08564702a33 100755
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2144,11 +2144,13 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const 
SwIndex & rDestStart,
                     while( true )
                     {
                         // check current item
-                        sal_uInt16 nWhich = IsInvalidItem( pItem )
+                        const sal_uInt16 nWhich = IsInvalidItem( pItem )
                             ? pDest->GetpSwAttrSet()->GetWhichByPos( 
aIter.GetCurPos() )
                             : pItem->Which();
                         if( RES_FRMATR_STYLE_NAME != nWhich &&
                             RES_FRMATR_CONDITIONAL_STYLE_NAME != nWhich &&
+                            RES_PAGEDESC != nWhich &&
+                            RES_BREAK != nWhich &&
                             SFX_ITEM_SET == 
pDest->GetpSwAttrSet()->GetItemState( nWhich, false ) )
                         {
                             // check if parent value (original value in style) 
has the same value as in [pItem]
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index c05f76160f66..7299cee58d3c 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -805,7 +805,10 @@ void SwXMLImport::endDocument( void )
                 if (!pTxtNode->GetTxt().isEmpty())
                     pDelNd->FmtToTxtAttr( pTxtNode );
                 else
+                {
+                    pTxtNode->ResetAttr(RES_CHRATR_BEGIN, RES_CHRATR_END);
                     pTxtNode->ChgFmtColl( pDelNd->GetTxtColl() );
+                }
                 pTxtNode->JoinNext();
             }
         }
commit aab9c00b6d4e09532dd191a52c338042bad71abe
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Mon Jun 18 18:15:55 2018 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Fri Jul 15 14:46:20 2022 +0200

    tdf#113877 Insert doc: merge list into text with specifc style
    
    When inserting document, in the current position the text could have custom
    style but really it is the same Standard style. Therefore we should not
    merge first inserted node into the insert position and just overwrite
    style in the insert position with text style from the inserted node.
    
    Reviewed-on: https://gerrit.libreoffice.org/56052
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/56408
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit e78239c928de1c73a7dda5a37ff38a1407ced052)
    
    Change-Id: Ib67c56bed3d30f356f83dc0b4d4a1710def10853

diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_blank.odt
new file mode 100755
index 000000000000..741d7d5e6d0a
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf113877_blank.odt 
differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt
new file mode 100755
index 000000000000..3dbebda6f93c
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
old mode 100644
new mode 100755
index e38af46819d3..12f74e1d9647
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -27,6 +27,8 @@ public:
     void testFdo75898();
     void testTdf113877();
     void testTdf113877NoMerge();
+    void testTdf113877_default_style();
+    void testTdf113877_Standard_style();
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -36,6 +38,8 @@ public:
     CPPUNIT_TEST(testFdo75898);
     CPPUNIT_TEST(testTdf113877);
     CPPUNIT_TEST(testTdf113877NoMerge);
+    CPPUNIT_TEST(testTdf113877_default_style);
+    CPPUNIT_TEST(testTdf113877_Standard_style);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -216,6 +220,70 @@ void SwUiWriterTest::testTdf113877NoMerge()
     CPPUNIT_ASSERT(listId6 != listId7);
 }
 
+// Related test to testTdf113877(): Inserting into empty document a new 
document with list.
+// Insert position has NO its own paragraph style ("Standard" will be used).
+//
+// Resulting document should be the same for following tests:
+// - testTdf113877_default_style()
+// - testTdf113877_Standard_style()
+//
+void SwUiWriterTest::testTdf113877_default_style()
+{
+    load(DATA_DIRECTORY, "tdf113877_blank.odt");
+
+    // set a page cursor into the end of the document
+    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+    xCursor->jumpToEndOfPage();
+
+    // insert the same document at current cursor position
+    {
+        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
+        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
+        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+    }
+
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+    const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+    CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+    CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+// Related test to testTdf113877(): Inserting into empty document a new 
document with list.
+// Insert position has its own paragraph style derived from "Standard", but 
this style is the same as "Standard".
+//
+// Resulting document should be the same for following tests:
+// - testTdf113877_default_style()
+// - testTdf113877_Standard_style()
+//
+void SwUiWriterTest::testTdf113877_Standard_style()
+{
+    load(DATA_DIRECTORY, "tdf113877_blank_ownStandard.odt");
+
+    // set a page cursor into the end of the document
+    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+    xCursor->jumpToEndOfPage();
+
+    // insert the same document at current cursor position
+    {
+        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
+        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
+        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+    }
+
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+    const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+    CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+    CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
old mode 100644
new mode 100755
index f6bf93d6bf33..e70560abfa2d
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -29,6 +29,8 @@
 #include <editeng/tstpitem.hxx>
 #include <svl/urihelper.hxx>
 #include <svl/ctloptions.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/poolitem.hxx>
 #include <tools/multisel.hxx>
 #include <swmodule.hxx>
 #include <txtfld.hxx>
@@ -2124,8 +2126,49 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const 
SwIndex & rDestStart,
         assert(!pOtherDoc);
 
         // harte Absatz umspannende Attribute kopieren
-        if( HasSwAttrSet() )
+        if (HasSwAttrSet())
         {
+            bool hasSwAttrSet = pDest->HasSwAttrSet();
+            if (hasSwAttrSet)
+            {
+                // if we have our own property set it doesn't mean
+                // that this set defines any style different to Standard one.
+                hasSwAttrSet = false;
+
+                // so, let's check deeper if property set has defined any 
property
+                if (pDest->GetpSwAttrSet())
+                {
+                    // check all items in the property set
+                    SfxItemIter aIter( *pDest->GetpSwAttrSet() );
+                    const SfxPoolItem* pItem = aIter.GetCurItem();
+                    while( true )
+                    {
+                        // check current item
+                        sal_uInt16 nWhich = IsInvalidItem( pItem )
+                            ? pDest->GetpSwAttrSet()->GetWhichByPos( 
aIter.GetCurPos() )
+                            : pItem->Which();
+                        if( RES_FRMATR_STYLE_NAME != nWhich &&
+                            RES_FRMATR_CONDITIONAL_STYLE_NAME != nWhich &&
+                            SFX_ITEM_SET == 
pDest->GetpSwAttrSet()->GetItemState( nWhich, false ) )
+                        {
+                            // check if parent value (original value in style) 
has the same value as in [pItem]
+                            const SfxPoolItem&  rParentItem = 
pDest->GetpSwAttrSet()->GetParent()->Get( nWhich, true );
+
+                            hasSwAttrSet = (rParentItem != *pItem);
+
+                            // property set is not empty => no need to make 
anymore checks
+                            if (hasSwAttrSet)
+                                break;
+                        }
+
+                        // let's check next item
+                        if( aIter.IsAtEnd() )
+                            break;
+                        pItem = aIter.NextItem();
+                    }
+                }
+            }
+
             // alle, oder nur die CharAttribute ?
             if( nInitSize || pDest->HasSwAttrSet() ||
                 nLen != pDest->GetTxt().getLength())
commit 9308f9392c3003281ef06bb4de20b36fdf2f1738
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Fri Jan 12 13:55:59 2018 +0100
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Wed Jul 13 09:02:43 2022 +0200

    tdf#113877 Insert document: merge two lists into one
    
    When inserting a new document into current position we need to
    concat to lists into one only when they have the same list
    properties.
    
    (cherry picked from commit 311ea730cb225bca167af2e4111445608a14a263)
    
    Reviewed-on: https://gerrit.libreoffice.org/47913
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit 1b04fae2b10d258d71e9e29ea659495b6d949367)
    
    Change-Id: I2766d5856418338fd5920968ac136899eeac7d74

diff --git a/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt
new file mode 100755
index 000000000000..47fe7e0760fe
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7c8a4a6bd709..e38af46819d3 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -26,6 +26,7 @@ public:
     void testFdo75110();
     void testFdo75898();
     void testTdf113877();
+    void testTdf113877NoMerge();
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -34,6 +35,7 @@ public:
     CPPUNIT_TEST(testFdo75110);
     CPPUNIT_TEST(testFdo75898);
     CPPUNIT_TEST(testTdf113877);
+    CPPUNIT_TEST(testTdf113877NoMerge);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -147,6 +149,8 @@ void SwUiWriterTest::testFdo69893()
     CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetTxt());
 }
 
+// During insert of the document with list inside into the main document 
inside the list
+// we should merge both lists into one, when they have the same list properties
 void SwUiWriterTest::testTdf113877()
 {
     load(DATA_DIRECTORY, "tdf113877_insert_numbered_list.odt");
@@ -164,13 +168,52 @@ void SwUiWriterTest::testTdf113877()
         lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
     }
 
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
+    const OUString listId5 = getProperty<OUString>(getParagraph(5), "ListId");
+    const OUString listId6 = getProperty<OUString>(getParagraph(6), "ListId");
+    const OUString listId7 = getProperty<OUString>(getParagraph(7), "ListId");
+
+    // the initial list with 4 list items
+    CPPUNIT_ASSERT_EQUAL(listId1, listId4);
+
+    // the last of the first list, and the first of the inserted list
+    CPPUNIT_ASSERT_EQUAL(listId4, listId5);
+    CPPUNIT_ASSERT_EQUAL(listId5, listId6);
+    CPPUNIT_ASSERT_EQUAL(listId6, listId7);
+}
+
+// The same test as testTdf113877() but merging of two list should not be 
performed.
+void SwUiWriterTest::testTdf113877NoMerge()
+{
+    load(DATA_DIRECTORY, "tdf113877_insert_numbered_list.odt");
+
+    // set a page cursor into the end of the document
+    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+    xCursor->jumpToEndOfPage();
+
+    // insert the same document at current cursor position
+    {
+        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list_abcd.odt";
+        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
+        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+    }
+
+    const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+    const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
+    const OUString listId5 = getProperty<OUString>(getParagraph(5), "ListId");
+    const OUString listId6 = getProperty<OUString>(getParagraph(6), "ListId");
+    const OUString listId7 = getProperty<OUString>(getParagraph(7), "ListId");
+
     // the initial list with 4 list items
-    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(1), "ListId"), 
getProperty<OUString>(getParagraph(4), "ListId"));
+    CPPUNIT_ASSERT_EQUAL(listId1, listId4);
 
     // the last of the first list, and the first of the inserted list
-    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(4), "ListId"), 
getProperty<OUString>(getParagraph(5), "ListId"));
-    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(5), "ListId"), 
getProperty<OUString>(getParagraph(6), "ListId"));
-    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(6), "ListId"), 
getProperty<OUString>(getParagraph(7), "ListId"));
+    CPPUNIT_ASSERT(listId4 != listId5);
+    CPPUNIT_ASSERT_EQUAL(listId5, listId6);
+    CPPUNIT_ASSERT(listId6 != listId7);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index c3888f268902..c05f76160f66 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -35,6 +35,13 @@
 #include <xmloff/XMLFontStylesContext.hxx>
 #include <xmloff/ProgressBarHelper.hxx>
 #include <doc.hxx>
+#include <drawdoc.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentListsAccess.hxx>
+#include <IDocumentStylePoolAccess.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <numrule.hxx>
 #include <TextCursorHelper.hxx>
 #include <unotext.hxx>
 #include <unotextrange.hxx>
@@ -42,8 +49,12 @@
 #include <poolfmt.hxx>
 #include <ndtxt.hxx>
 #include <editsh.hxx>
+#include <poolfmt.hrc>
+#include <svl/stritem.hxx>
 #include "xmlimp.hxx"
 #include "xmltexti.hxx"
+#include <list.hxx>
+#include <swdll.hxx>
 #include <xmloff/DocumentSettingsContext.hxx>
 #include <docsh.hxx>
 #include <editeng/unolingu.hxx>
@@ -857,7 +868,7 @@ void SwXMLImport::endDocument( void )
 
             // tdf#113877
             // when we insert one document with list inside into another one 
with list at the insert position,
-            // the resulting numbering in these lists are not consequent.
+            // the resulting numbering in these lists is not consequent.
             //
             // Main document:
             //  1. One
@@ -880,65 +891,7 @@ void SwXMLImport::endDocument( void )
             //  6. Three
             //  7.
             //
-            if (IsInsertMode() && pSttNdIdx->GetIndex())
-            {
-                sal_uLong index = 1;
-
-                // the last node of the main document where we have inserted a 
document
-                SwNode * p1 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + 0];
-
-                // the first node of the inserted document
-                SwNode * p2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
-
-                // the first node of the inserted document,
-                // which will be used to detect if inside inserted document a 
new list was started
-                const SfxPoolItem* listId2Initial = nullptr;
-
-                while (
-                    p1 && p2
-                    && (p1->GetNodeType() == p2->GetNodeType())
-                    && (p1->IsTxtNode() == p2->IsTxtNode())
-                    )
-                {
-                    SwCntntNode * c1 = static_cast<SwCntntNode *>(p1);
-                    SwCntntNode * c2 = static_cast<SwCntntNode *>(p2);
-
-                    const SfxPoolItem* listId1 = 
c1->GetNoCondAttr(RES_PARATR_LIST_ID, false);
-                    const SfxPoolItem* listId2 = 
c2->GetNoCondAttr(RES_PARATR_LIST_ID, false);
-
-                    if (!listId2Initial)
-                    {
-                        listId2Initial = listId2;
-                    }
-
-                    if (! (listId2Initial && listId2 && (*listId2Initial == 
*listId2)) )
-                    {
-                        // no more list items of the first list inside 
inserted document
-                        break;
-                    }
-
-                    if (listId1 && listId2)
-                    {
-                        c2->SetAttr(*listId1);
-                    }
-                    else
-                    {
-                        // no more appropriate list items
-                        break;
-                    }
-
-                    // get next item
-                    index++;
-                    if (index >= pDoc->GetNodes().Count())
-                    {
-                        // no more items
-                        break;
-                    }
-
-                    p2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
-                }
-            }
-
+            MergeListsAtDocumentInsertPosition(pDoc);
         }
     }
 
@@ -1010,6 +963,179 @@ void SwXMLImport::endDocument( void )
     ClearTextImport();
 }
 
+// tdf#113877
+// when we insert one document with list inside into another one with list at 
the insert position,
+// the resulting numbering in these lists is not consequent.
+//
+// CASE-1: Main document:
+//  1. One
+//  2. Two
+//  3. Three
+//  4.                      <-- insert position
+//
+// Inserted document:
+//  1. One
+//  2. Two
+//  3. Three
+//  4.
+//
+// Expected result
+//  1. One
+//  2. Two
+//  3. Three
+//  4. One
+//  5. Two
+//  6. Three
+//  7.
+//
+// CASE-2: Main document:
+//  1. One
+//  2. Two
+//  3. Three
+//  4.                      <-- insert position
+//
+// Inserted document:
+//  A) One
+//  B) Two
+//  C) Three
+//  D)
+//
+// Expected result
+//  1. One
+//  2. Two
+//  3. Three
+//  4. One
+//  A) Two
+//  B) Three
+//  5.
+//
+void SwXMLImport::MergeListsAtDocumentInsertPosition(SwDoc *pDoc)
+{
+    // 1. check enviroment
+    if (! pDoc)
+        return;
+
+    if (! IsInsertMode() || ! pSttNdIdx->GetIndex())
+        return;
+
+    sal_uLong index = 1;
+
+    // the last node of the main document where we have inserted a document
+    const SwNodePtr node1 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + 0];
+
+    // the first node of the inserted document
+    SwNodePtr node2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
+
+    if (! (node1 && node2
+        && (node1->GetNodeType() == node2->GetNodeType())
+        && (node1->IsTxtNode() == node2->IsTxtNode())
+        ))
+    {
+        // not a text node at insert position
+        return;
+    }
+
+    // 2. get the first node of the inserted document,
+    // which will be used to detect if inside inserted document a new list was 
started after the first list
+    const SfxPoolItem* pListId2Initial = nullptr;
+    {
+        SwCntntNode* contentNode1 = static_cast<SwCntntNode *>(node1);
+        SwCntntNode* contentNode2 = static_cast<SwCntntNode *>(node2);
+
+        // check if both lists have the same list properties
+        const SfxPoolItem* pListId1 = contentNode1->GetNoCondAttr( 
RES_PARATR_LIST_ID, false );
+        const SfxPoolItem* pListId2 = contentNode2->GetNoCondAttr( 
RES_PARATR_LIST_ID, false );
+
+        if (! pListId1)
+            return;
+        if (! pListId2)
+            return;
+
+        const OUString& sListId1 = dynamic_cast<const 
SfxStringItem*>(pListId1)->GetValue();
+        const OUString& sListId2 = dynamic_cast<const 
SfxStringItem*>(pListId2)->GetValue();
+
+        const SwList* pList1 = pDoc->getListByName( sListId1 );
+        const SwList* pList2 = pDoc->getListByName( sListId2 );
+
+        if (! pList1)
+            return;
+        if (! pList2)
+            return;
+
+        const OUString& sDefaultListStyleName1 = 
pList1->GetDefaultListStyleName();
+        const OUString& sDefaultListStyleName2 = 
pList2->GetDefaultListStyleName();
+
+        if (sDefaultListStyleName1 != sDefaultListStyleName2)
+        {
+            const SwNumRule* pNumRule1 = pDoc->FindNumRulePtr( 
sDefaultListStyleName1 );
+            const SwNumRule* pNumRule2 = pDoc->FindNumRulePtr( 
sDefaultListStyleName2 );
+
+            if (pNumRule1 && pNumRule2)
+            {
+                // check style of the each list level
+                for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
+                {
+                    if( !( pNumRule1->Get( n ) == pNumRule2->Get( n ) ))
+                    {
+                        return;
+                    }
+                }
+
+                // our list should be merged
+                pListId2Initial = pListId2;
+            }
+        }
+        else
+        {
+            // our list should be merged
+            pListId2Initial = pListId2;
+        }
+    }
+
+    if (! pListId2Initial)
+    {
+        // two lists have different styles => they should not be merged
+        return;
+    }
+
+    // 3. merge two lists
+    while (
+        node1 && node2
+        && (node1->GetNodeType() == node2->GetNodeType())
+        && (node1->IsTxtNode() == node2->IsTxtNode())
+        )
+    {
+        SwCntntNode* contentNode1 = static_cast<SwCntntNode *>( node1 );
+        SwCntntNode* contentNode2 = static_cast<SwCntntNode *>( node2 );
+
+        const SfxPoolItem* pListId1 = contentNode1->GetNoCondAttr( 
RES_PARATR_LIST_ID, false );
+        const SfxPoolItem* pListId2 = contentNode2->GetNoCondAttr( 
RES_PARATR_LIST_ID, false );
+
+        if (! pListId1)
+            return;
+        if (! pListId2)
+            return;
+
+        if (*pListId2Initial != *pListId2)
+        {
+            // no more list items of the first list inside inserted document
+            return;
+        }
+
+        // set list style to this list element
+        contentNode2->SetAttr(*pListId1);
+
+        // get next item
+        index++;
+        if (index >= pDoc->GetNodes().Count())
+        {
+            // no more items
+            return;
+        }
+
+        node2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
+    }
+}
 
 // Locally derive XMLTextShapeImportHelper, so we can take care of the
 // form import This is Writer, but not text specific, so it should go
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 91f2fe5f10a9..39ee1ec05819 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -177,6 +177,7 @@ public:
                              const OUString& rName,
                              const SfxItemSet **ppItemSet=0,
                              OUString *pParent=0 ) const;
+    void MergeListsAtDocumentInsertPosition(SwDoc *pDoc);
 
     virtual void SetStatistics(
         const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::NamedValue> & i_rStats);
commit b809899432146beb1ef7534af5efc6e7f86f84f6
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Fri Dec 22 12:56:40 2017 +0100
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Wed Jul 13 08:37:07 2022 +0200

    tdf#113877 Insert document: merge two list into one
    
    When inserting a new document into current position we need to
    concat to lists into one.
    
    Added unit tests.
    
    Reviewed-on: https://gerrit.libreoffice.org/46991
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit c59e028e5337d1511dbcc678a90ffdbe92a44521)
    
    Change-Id: I10689256e0ffc5cf93722b1d45f09f610211b14a

diff --git a/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt 
b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt
new file mode 100755
index 000000000000..db480edbebaf
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index e30db243494c..7c8a4a6bd709 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -25,6 +25,7 @@ public:
     void testFdo69893();
     void testFdo75110();
     void testFdo75898();
+    void testTdf113877();
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -32,6 +33,7 @@ public:
     CPPUNIT_TEST(testFdo69893);
     CPPUNIT_TEST(testFdo75110);
     CPPUNIT_TEST(testFdo75898);
+    CPPUNIT_TEST(testTdf113877);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -145,6 +147,32 @@ void SwUiWriterTest::testFdo69893()
     CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetTxt());
 }
 
+void SwUiWriterTest::testTdf113877()
+{
+    load(DATA_DIRECTORY, "tdf113877_insert_numbered_list.odt");
+
+    // set a page cursor into the end of the document
+    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+    uno::Reference<text::XTextViewCursorSupplier> 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+    uno::Reference<text::XPageCursor> 
xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+    xCursor->jumpToEndOfPage();
+
+    // insert the same document at current cursor position
+    {
+        const OUString insertFileid = 
m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf113877_insert_numbered_list.odt";
+        uno::Sequence<beans::PropertyValue> 
aPropertyValues(comphelper::InitPropertySequence({ { "Name", 
uno::makeAny(insertFileid) } }));
+        lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+    }
+
+    // the initial list with 4 list items
+    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(1), "ListId"), 
getProperty<OUString>(getParagraph(4), "ListId"));
+
+    // the last of the first list, and the first of the inserted list
+    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(4), "ListId"), 
getProperty<OUString>(getParagraph(5), "ListId"));
+    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(5), "ListId"), 
getProperty<OUString>(getParagraph(6), "ListId"));
+    CPPUNIT_ASSERT_EQUAL(getProperty<OUString>(getParagraph(6), "ListId"), 
getProperty<OUString>(getParagraph(7), "ListId"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index af7f5fa62852..c3888f268902 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -854,6 +854,91 @@ void SwXMLImport::endDocument( void )
                     pPaM->Move( fnMoveBackward );
                 }
             }
+
+            // tdf#113877
+            // when we insert one document with list inside into another one 
with list at the insert position,
+            // the resulting numbering in these lists are not consequent.
+            //
+            // Main document:
+            //  1. One
+            //  2. Two
+            //  3. Three
+            //  4.                      <-- insert position
+            //
+            // Inserted document:
+            //  1. One
+            //  2. Two
+            //  3. Three
+            //  4.
+            //
+            // Expected result
+            //  1. One
+            //  2. Two
+            //  3. Three
+            //  4. One
+            //  5. Two
+            //  6. Three
+            //  7.
+            //
+            if (IsInsertMode() && pSttNdIdx->GetIndex())
+            {
+                sal_uLong index = 1;
+
+                // the last node of the main document where we have inserted a 
document
+                SwNode * p1 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + 0];
+
+                // the first node of the inserted document
+                SwNode * p2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
+
+                // the first node of the inserted document,
+                // which will be used to detect if inside inserted document a 
new list was started
+                const SfxPoolItem* listId2Initial = nullptr;
+
+                while (
+                    p1 && p2
+                    && (p1->GetNodeType() == p2->GetNodeType())
+                    && (p1->IsTxtNode() == p2->IsTxtNode())
+                    )
+                {
+                    SwCntntNode * c1 = static_cast<SwCntntNode *>(p1);
+                    SwCntntNode * c2 = static_cast<SwCntntNode *>(p2);
+
+                    const SfxPoolItem* listId1 = 
c1->GetNoCondAttr(RES_PARATR_LIST_ID, false);
+                    const SfxPoolItem* listId2 = 
c2->GetNoCondAttr(RES_PARATR_LIST_ID, false);
+
+                    if (!listId2Initial)
+                    {
+                        listId2Initial = listId2;
+                    }
+
+                    if (! (listId2Initial && listId2 && (*listId2Initial == 
*listId2)) )
+                    {
+                        // no more list items of the first list inside 
inserted document
+                        break;
+                    }
+
+                    if (listId1 && listId2)
+                    {
+                        c2->SetAttr(*listId1);
+                    }
+                    else
+                    {
+                        // no more appropriate list items
+                        break;
+                    }
+
+                    // get next item
+                    index++;
+                    if (index >= pDoc->GetNodes().Count())
+                    {
+                        // no more items
+                        break;
+                    }
+
+                    p2 = pDoc->GetNodes()[pSttNdIdx->GetIndex() + index];
+                }
+            }
+
         }
     }
 
commit f18cb44329f20f6950bd8438195f9135c94c6a67
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Wed Dec 24 14:41:49 2014 +0100
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 22:50:59 2022 +0200

    upload librevenge 0.0.2
    
    Change-Id: Ie12b7ec9630d45e23fb11f12d2d4955855ae34cc

diff --git a/download.lst b/download.lst
index 8357d35348bf..36a0a64bf7cc 100644
--- a/download.lst
+++ b/download.lst
@@ -113,8 +113,8 @@ export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
 export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
 export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
 export REDLAND_TARBALL := 
32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
-export REVENGE_MD5SUM := 69c367c6b0a360411965a1c409a0b6c1
-export REVENGE_TARBALL := librevenge-0.0.1.tar.bz2
+export REVENGE_MD5SUM := 2d4183bf17aea1a71842468a71a68c47
+export REVENGE_TARBALL := librevenge-0.0.2.tar.bz2
 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
 export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
diff --git a/external/librevenge/ExternalPackage_librevenge.mk 
b/external/librevenge/ExternalPackage_librevenge.mk
index 9b868ca438e4..002a6cf81f9a 100644
--- a/external/librevenge/ExternalPackage_librevenge.mk
+++ b/external/librevenge/ExternalPackage_librevenge.mk
@@ -16,7 +16,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/libreven
 else ifeq ($(OS),WNT)
 $(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.dll,src/lib/.libs/librevenge-0.0.dll))
 else ifeq ($(filter IOS ANDROID,$(OS)),)
-$(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.so.0,src/lib/.libs/librevenge-0.0.so.0.0.1))
+$(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.so.0,src/lib/.libs/librevenge-0.0.so.0.0.2))
 endif
 
 # vim: set noet sw=4 ts=4:
commit 915ce97519a91c2daa3dbefae8330eae5f7dd4aa
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Tue Jun 3 08:14:57 2014 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 22:50:12 2022 +0200

    upload librevenge 0.0.1
    
    Change-Id: I10d457fe34a4e015d9a5e0fe92c27bdd1c7231be

diff --git a/download.lst b/download.lst
index 4d53be3f3f51..8357d35348bf 100644
--- a/download.lst
+++ b/download.lst
@@ -113,8 +113,8 @@ export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
 export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
 export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
 export REDLAND_TARBALL := 
32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
-export REVENGE_MD5SUM := b483b99af21c92c763a1c6a28ebee958
-export REVENGE_TARBALL := librevenge-0.0.0.tar.bz2
+export REVENGE_MD5SUM := 69c367c6b0a360411965a1c409a0b6c1
+export REVENGE_TARBALL := librevenge-0.0.1.tar.bz2
 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
 export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
diff --git a/external/librevenge/0001-properly-export-API-symbols.patch 
b/external/librevenge/0001-properly-export-API-symbols.patch
deleted file mode 100644
index 64513a0a5c36..000000000000
--- a/external/librevenge/0001-properly-export-API-symbols.patch
+++ /dev/null
@@ -1,752 +0,0 @@
-From d0df6db52ae8db3b3e9549837e698a091474e727 Mon Sep 17 00:00:00 2001
-From: David Tardon <dtar...@redhat.com>
-Date: Sun, 25 May 2014 08:52:57 +0200
-Subject: [PATCH] properly export API symbols
-
----
- inc/librevenge-generators/Makefile.am              |  1 +
- .../RVNGCSVSpreadsheetGenerator.h                  |  4 ++-
- inc/librevenge-generators/RVNGHTMLTextGenerator.h  |  4 ++-
- .../RVNGRawDrawingGenerator.h                      |  4 ++-
- .../RVNGRawPresentationGenerator.h                 |  4 ++-
- .../RVNGRawSpreadsheetGenerator.h                  |  4 ++-
- inc/librevenge-generators/RVNGRawTextGenerator.h   |  4 ++-
- .../RVNGSVGPresentationGenerator.h                 |  4 ++-
- .../RVNGTextDrawingGenerator.h                     |  4 ++-
- .../RVNGTextPresentationGenerator.h                |  9 +++++-
- .../RVNGTextSpreadsheetGenerator.h                 |  4 ++-
- inc/librevenge-generators/RVNGTextTextGenerator.h  |  4 ++-
- .../librevenge-generators-api.h                    | 36 ++++++++++++++++++++++
- inc/librevenge-stream/Makefile.am                  |  1 +
- inc/librevenge-stream/RVNGDirectoryStream.h        |  4 ++-
- inc/librevenge-stream/RVNGStream.h                 |  4 ++-
- inc/librevenge-stream/RVNGStreamImplementation.h   |  6 ++--
- inc/librevenge-stream/librevenge-stream-api.h      | 36 ++++++++++++++++++++++
- inc/librevenge/Makefile.am                         |  1 +
- inc/librevenge/RVNGBinaryData.h                    |  5 ++-
- inc/librevenge/RVNGDrawingInterface.h              |  4 ++-
- inc/librevenge/RVNGPresentationInterface.h         |  4 ++-
- inc/librevenge/RVNGProperty.h                      |  7 +++--
- inc/librevenge/RVNGPropertyList.h                  |  5 ++-
- inc/librevenge/RVNGPropertyListVector.h            |  4 ++-
- inc/librevenge/RVNGSVGDrawingGenerator.h           |  4 ++-
- inc/librevenge/RVNGSpreadsheetInterface.h          |  4 ++-
- inc/librevenge/RVNGString.h                        |  4 ++-
- inc/librevenge/RVNGStringVector.h                  |  4 ++-
- inc/librevenge/RVNGTextInterface.h                 |  4 ++-
- inc/librevenge/librevenge-api.h                    | 36 ++++++++++++++++++++++
- src/lib/Makefile.am                                |  6 ++++
- 32 files changed, 202 insertions(+), 27 deletions(-)
- create mode 100644 inc/librevenge-generators/librevenge-generators-api.h
- create mode 100644 inc/librevenge-stream/librevenge-stream-api.h
- create mode 100644 inc/librevenge/librevenge-api.h
-
-diff --git a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
-index 40cce77..084b55c 100644
---- a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
-+++ b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGCSVSPREADSHEETGENERATOR_H
- #define RVNGCSVSPREADSHEETGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -32,7 +34,7 @@ struct RVNGCSVSpreadsheetGeneratorImpl;
-   *
-   * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the 
basic interface.
-   */
--class RVNGCSVSpreadsheetGenerator : public RVNGSpreadsheetInterface
-+class REVENGE_GENERATORS_API RVNGCSVSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
- {
-       //! unimplemented copy constructor to prevent copy
-       RVNGCSVSpreadsheetGenerator(const RVNGCSVSpreadsheetGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGHTMLTextGenerator.h 
b/inc/librevenge-generators/RVNGHTMLTextGenerator.h
-index 9bb9b77..6dacfb8 100644
---- a/inc/librevenge-generators/RVNGHTMLTextGenerator.h
-+++ b/inc/librevenge-generators/RVNGHTMLTextGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGHTMLTEXTGENERATOR_H
- #define RVNGHTMLTEXTGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGHTMLTextGeneratorImpl;
- 
--class RVNGHTMLTextGenerator : public RVNGTextInterface
-+class REVENGE_GENERATORS_API RVNGHTMLTextGenerator : public RVNGTextInterface
- {
- public:
-       explicit RVNGHTMLTextGenerator(RVNGString &document);
-diff --git a/inc/librevenge-generators/RVNGRawDrawingGenerator.h 
b/inc/librevenge-generators/RVNGRawDrawingGenerator.h
-index 2b60cc3..a0a6475 100644
---- a/inc/librevenge-generators/RVNGRawDrawingGenerator.h
-+++ b/inc/librevenge-generators/RVNGRawDrawingGenerator.h
-@@ -22,6 +22,8 @@
- #ifndef RVNGRAWDRAWINGGENERATOR_H
- #define RVNGRAWDRAWINGGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge-stream/librevenge-stream.h>
- #include <librevenge/librevenge.h>
- 
-@@ -30,7 +32,7 @@ namespace librevenge
- 
- struct RVNGRawDrawingGeneratorImpl;
- 
--class RVNGRawDrawingGenerator : public RVNGDrawingInterface
-+class REVENGE_GENERATORS_API RVNGRawDrawingGenerator : public 
RVNGDrawingInterface
- {
-       // disable copying
-       RVNGRawDrawingGenerator(const RVNGRawDrawingGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGRawPresentationGenerator.h 
b/inc/librevenge-generators/RVNGRawPresentationGenerator.h
-index 8a3f1c9..9438541 100644
---- a/inc/librevenge-generators/RVNGRawPresentationGenerator.h
-+++ b/inc/librevenge-generators/RVNGRawPresentationGenerator.h
-@@ -15,6 +15,8 @@
- #ifndef RVNGRAWPRESENTATIONGENERATOR_H
- #define RVNGRAWPRESENTATIONGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -23,7 +25,7 @@ namespace librevenge
- 
- struct RVNGRawPresentationGeneratorImpl;
- 
--class RVNGRawPresentationGenerator : public RVNGPresentationInterface
-+class REVENGE_GENERATORS_API RVNGRawPresentationGenerator : public 
RVNGPresentationInterface
- {
-       // disable copying
-       RVNGRawPresentationGenerator(const RVNGRawPresentationGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
-index ff584c7..84be1c1 100644
---- a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
-+++ b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGRAWSPREADSHEETGENERATOR_H
- #define RVNGRAWSPREADSHEETGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGRawSpreadsheetGeneratorImpl;
- 
--class RVNGRawSpreadsheetGenerator : public RVNGSpreadsheetInterface
-+class REVENGE_GENERATORS_API RVNGRawSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
- {
-       // disable copying
-       RVNGRawSpreadsheetGenerator(const RVNGRawSpreadsheetGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGRawTextGenerator.h 
b/inc/librevenge-generators/RVNGRawTextGenerator.h
-index 2df33d4..7781b07 100644
---- a/inc/librevenge-generators/RVNGRawTextGenerator.h
-+++ b/inc/librevenge-generators/RVNGRawTextGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGRAWTEXTGENERATOR_H
- #define RVNGRAWTEXTGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGRawTextGeneratorImpl;
- 
--class RVNGRawTextGenerator : public RVNGTextInterface
-+class REVENGE_GENERATORS_API RVNGRawTextGenerator : public RVNGTextInterface
- {
-       // disable copying
-       RVNGRawTextGenerator(const RVNGRawTextGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h 
b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
-index 996ee35..2e18da1 100644
---- a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
-+++ b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
-@@ -15,6 +15,8 @@
- #ifndef RVNGSVGPRESENTATIONGENERATOR_H
- #define RVNGSVGPRESENTATIONGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -23,7 +25,7 @@ namespace librevenge
- 
- struct RVNGSVGPresentationGeneratorImpl;
- 
--class RVNGSVGPresentationGenerator : public RVNGPresentationInterface
-+class REVENGE_GENERATORS_API RVNGSVGPresentationGenerator : public 
RVNGPresentationInterface
- {
-       // disable copying
-       RVNGSVGPresentationGenerator(const RVNGSVGPresentationGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGTextDrawingGenerator.h 
b/inc/librevenge-generators/RVNGTextDrawingGenerator.h
-index ba9a9cc..2b3160e 100644
---- a/inc/librevenge-generators/RVNGTextDrawingGenerator.h
-+++ b/inc/librevenge-generators/RVNGTextDrawingGenerator.h
-@@ -15,6 +15,8 @@
- #ifndef RVNGTEXTDRAWINGGENERATOR_H
- #define RVNGTEXTDRAWINGGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge-stream/librevenge-stream.h>
- #include <librevenge/librevenge.h>
- 
-@@ -23,7 +25,7 @@ namespace librevenge
- 
- struct RVNGTextDrawingGeneratorImpl;
- 
--class RVNGTextDrawingGenerator : public RVNGDrawingInterface
-+class REVENGE_GENERATORS_API RVNGTextDrawingGenerator : public 
RVNGDrawingInterface
- {
-       // disable copying
-       RVNGTextDrawingGenerator(const RVNGTextDrawingGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGTextPresentationGenerator.h 
b/inc/librevenge-generators/RVNGTextPresentationGenerator.h
-index f89691e..9bef369 100644
---- a/inc/librevenge-generators/RVNGTextPresentationGenerator.h
-+++ b/inc/librevenge-generators/RVNGTextPresentationGenerator.h
-@@ -12,6 +12,11 @@
-  * applicable instead of those above.
-  */
- 
-+#ifndef RVNGTEXTPRESENTATIONGENERATOR_H
-+#define RVNGTEXTPRESENTATIONGENERATOR_H
-+
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -20,7 +25,7 @@ namespace librevenge
- 
- struct RVNGTextPresentationGeneratorImpl;
- 
--class RVNGTextPresentationGenerator : public RVNGPresentationInterface
-+class REVENGE_GENERATORS_API RVNGTextPresentationGenerator : public 
RVNGPresentationInterface
- {
-       // disable copying
-       RVNGTextPresentationGenerator(const RVNGTextPresentationGenerator 
&other);
-@@ -124,4 +129,6 @@ private:
- 
- }
- 
-+#endif
-+
- /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
-diff --git a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
-index e140153..9ac9dc8 100644
---- a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
-+++ b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGTEXTSPREADSHEETGENERATOR_H
- #define RVNGTEXTSPREADSHEETGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -32,7 +34,7 @@ struct RVNGTextSpreadsheetGeneratorImpl;
-   *
-   * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the 
basic interface.
-   */
--class RVNGTextSpreadsheetGenerator : public RVNGSpreadsheetInterface
-+class REVENGE_GENERATORS_API RVNGTextSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
- {
-       //! unimplemented copy constructor to prevent copy
-       RVNGTextSpreadsheetGenerator(const RVNGTextSpreadsheetGenerator &other);
-diff --git a/inc/librevenge-generators/RVNGTextTextGenerator.h 
b/inc/librevenge-generators/RVNGTextTextGenerator.h
-index 87828fd..ec657d5 100644
---- a/inc/librevenge-generators/RVNGTextTextGenerator.h
-+++ b/inc/librevenge-generators/RVNGTextTextGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGTEXTTEXTGENERATOR_H
- #define RVNGTEXTTEXTGENERATOR_H
- 
-+#include "librevenge-generators-api.h"
-+
- #include <librevenge/librevenge.h>
- #include <librevenge-stream/librevenge-stream.h>
- 
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGTextTextGeneratorImpl;
- 
--class RVNGTextTextGenerator : public RVNGTextInterface
-+class REVENGE_GENERATORS_API RVNGTextTextGenerator : public RVNGTextInterface
- {
-       // disable copying
-       RVNGTextTextGenerator(const RVNGTextTextGenerator &other);
-diff --git a/inc/librevenge-generators/librevenge-generators-api.h 
b/inc/librevenge-generators/librevenge-generators-api.h
-new file mode 100644
-index 0000000..8d4a5ea
---- /dev/null
-+++ b/inc/librevenge-generators/librevenge-generators-api.h
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/* librevenge
-+ * Version: MPL 2.0 / LGPLv2.1+
-+ *
-+ * This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
-+ *
-+ * Major Contributor(s):
-+ * Copyright (C) 2002 William Lachance (wrl...@gmail.com)
-+ * Copyright (C) 2002 Marc Maurer (u...@uwog.net)
-+ *
-+ * For minor contributions see the git repository.
-+ *
-+ * Alternatively, the contents of this file may be used under the terms
-+ * of the GNU Lesser General Public License Version 2.1 or later
-+ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
-+ * applicable instead of those above.
-+ */
-+
-+#ifndef INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H
-+#define INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H
-+
-+#ifdef DLL_EXPORT
-+#ifdef LIBREVENGE_GENERATORS_BUILD
-+#define REVENGE_GENERATORS_API __declspec(dllexport)
-+#else
-+#define REVENGE_GENERATORS_API __declspec(dllimport)
-+#endif
-+#else
-+#define REVENGE_GENERATORS_API
-+#endif
-+
-+#endif /* INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H */
-+
-+/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
-diff --git a/inc/librevenge-stream/RVNGDirectoryStream.h 
b/inc/librevenge-stream/RVNGDirectoryStream.h
-index dee185e..46d2101 100644
---- a/inc/librevenge-stream/RVNGDirectoryStream.h
-+++ b/inc/librevenge-stream/RVNGDirectoryStream.h
-@@ -22,6 +22,8 @@
- #ifndef RVNGDIRECTORYSTREAM_H_INCLUDED
- #define RVNGDIRECTORYSTREAM_H_INCLUDED
- 
-+#include "librevenge-stream-api.h"
-+
- #include "RVNGStream.h"
- 
- namespace librevenge
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGDirectoryStreamImpl;
- 
--class RVNGDirectoryStream : public RVNGInputStream
-+class REVENGE_STREAM_API RVNGDirectoryStream : public RVNGInputStream
- {
-       // disable copying
-       RVNGDirectoryStream(const RVNGDirectoryStream &);
-diff --git a/inc/librevenge-stream/RVNGStream.h 
b/inc/librevenge-stream/RVNGStream.h
-index 6b1b38e..1b40bef 100644
---- a/inc/librevenge-stream/RVNGStream.h
-+++ b/inc/librevenge-stream/RVNGStream.h
-@@ -20,6 +20,8 @@
- #ifndef RVNGSTREAM_H
- #define RVNGSTREAM_H
- 
-+#include "librevenge-stream-api.h"
-+
- namespace librevenge
- {
- 
-@@ -30,7 +32,7 @@ enum RVNG_SEEK_TYPE
-       RVNG_SEEK_END
- };
- 
--class RVNGInputStream
-+class REVENGE_STREAM_API RVNGInputStream
- {
- public:
-       RVNGInputStream() {}
-diff --git a/inc/librevenge-stream/RVNGStreamImplementation.h 
b/inc/librevenge-stream/RVNGStreamImplementation.h
-index 06ff938..f4c1a74 100644
---- a/inc/librevenge-stream/RVNGStreamImplementation.h
-+++ b/inc/librevenge-stream/RVNGStreamImplementation.h
-@@ -20,6 +20,8 @@
- #ifndef RVNGSTREAMIMPLEMENTATION_H
- #define RVNGSTREAMIMPLEMENTATION_H
- 
-+#include "librevenge-stream-api.h"
-+
- #include "RVNGStream.h"
- 
- namespace librevenge
-@@ -27,7 +29,7 @@ namespace librevenge
- 
- class RVNGFileStreamPrivate;
- 
--class RVNGFileStream: public RVNGInputStream
-+class REVENGE_STREAM_API RVNGFileStream: public RVNGInputStream
- {
- public:
-       explicit RVNGFileStream(const char *filename);
-@@ -53,7 +55,7 @@ private:
- 
- class RVNGStringStreamPrivate;
- 
--class RVNGStringStream: public RVNGInputStream
-+class REVENGE_STREAM_API RVNGStringStream: public RVNGInputStream
- {
- public:
-       RVNGStringStream(const unsigned char *data, const unsigned int 
dataSize);
-diff --git a/inc/librevenge-stream/librevenge-stream-api.h 
b/inc/librevenge-stream/librevenge-stream-api.h
-new file mode 100644
-index 0000000..5b544fc
---- /dev/null
-+++ b/inc/librevenge-stream/librevenge-stream-api.h
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/* librevenge
-+ * Version: MPL 2.0 / LGPLv2.1+
-+ *
-+ * This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
-+ *
-+ * Major Contributor(s):
-+ * Copyright (C) 2002 William Lachance (wrl...@gmail.com)
-+ * Copyright (C) 2002 Marc Maurer (u...@uwog.net)
-+ *
-+ * For minor contributions see the git repository.
-+ *
-+ * Alternatively, the contents of this file may be used under the terms
-+ * of the GNU Lesser General Public License Version 2.1 or later
-+ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
-+ * applicable instead of those above.
-+ */
-+
-+#ifndef INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H
-+#define INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H
-+
-+#ifdef DLL_EXPORT
-+#ifdef LIBREVENGE_STREAM_BUILD
-+#define REVENGE_STREAM_API __declspec(dllexport)
-+#else
-+#define REVENGE_STREAM_API __declspec(dllimport)
-+#endif
-+#else
-+#define REVENGE_STREAM_API
-+#endif
-+
-+#endif /* INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H */
-+
-+/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
-diff --git a/inc/librevenge/RVNGBinaryData.h b/inc/librevenge/RVNGBinaryData.h
-index c09b26a..825f4dc 100644
---- a/inc/librevenge/RVNGBinaryData.h
-+++ b/inc/librevenge/RVNGBinaryData.h
-@@ -20,7 +20,10 @@
- #ifndef RVNGBINARYDATA_H
- #define RVNGBINARYDATA_H
- 
-+#include "librevenge-api.h"
-+
- #include <librevenge-stream/librevenge-stream.h>
-+
- #include "RVNGString.h"
- 
- namespace librevenge
-@@ -28,7 +31,7 @@ namespace librevenge
- 
- struct RVNGBinaryDataImpl;
- 
--class RVNGBinaryData
-+class REVENGE_API RVNGBinaryData
- {
- public:
-       RVNGBinaryData();
-diff --git a/inc/librevenge/RVNGDrawingInterface.h 
b/inc/librevenge/RVNGDrawingInterface.h
-index 0030e49..3b87cda 100644
---- a/inc/librevenge/RVNGDrawingInterface.h
-+++ b/inc/librevenge/RVNGDrawingInterface.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGDRAWINGINTERFACE_H
- #define RVNGDRAWINGINTERFACE_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGPropertyList.h"
- #include "RVNGPropertyListVector.h"
- #include "RVNGBinaryData.h"
-@@ -28,7 +30,7 @@
- namespace librevenge
- {
- 
--class RVNGDrawingInterface
-+class REVENGE_API RVNGDrawingInterface
- {
- public:
-       virtual ~RVNGDrawingInterface() {}
-diff --git a/inc/librevenge/RVNGPresentationInterface.h 
b/inc/librevenge/RVNGPresentationInterface.h
-index 2142082..32fec64 100644
---- a/inc/librevenge/RVNGPresentationInterface.h
-+++ b/inc/librevenge/RVNGPresentationInterface.h
-@@ -15,6 +15,8 @@
- #ifndef RVNGPRESENTATIONINTERFACE_H
- #define RVNGPRESENTATIONINTERFACE_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGPropertyList.h"
- #include "RVNGPropertyListVector.h"
- 
-@@ -23,7 +25,7 @@ namespace librevenge
- 
- /** Interface for import of presentations.
-   */
--class RVNGPresentationInterface
-+class REVENGE_API RVNGPresentationInterface
- {
- public:
-       virtual ~RVNGPresentationInterface() {}
-diff --git a/inc/librevenge/RVNGProperty.h b/inc/librevenge/RVNGProperty.h
-index 46c94fa..df56c2c 100644
---- a/inc/librevenge/RVNGProperty.h
-+++ b/inc/librevenge/RVNGProperty.h
-@@ -19,6 +19,9 @@
- 
- #ifndef RVNGPROPERTY_H
- #define RVNGPROPERTY_H
-+
-+#include "librevenge-api.h"
-+
- #include "RVNGString.h"
- 
- namespace librevenge
-@@ -26,7 +29,7 @@ namespace librevenge
- 
- enum RVNGUnit { RVNG_INCH, RVNG_PERCENT, RVNG_POINT, RVNG_TWIP, RVNG_GENERIC, 
RVNG_UNIT_ERROR };
- 
--class RVNGProperty
-+class REVENGE_API RVNGProperty
- {
- public:
-       virtual ~RVNGProperty();
-@@ -38,7 +41,7 @@ public:
-       virtual RVNGProperty *clone() const = 0;
- };
- 
--class RVNGPropertyFactory
-+class REVENGE_API RVNGPropertyFactory
- {
- public:
-       static RVNGProperty *newStringProp(const RVNGString &str);
-diff --git a/inc/librevenge/RVNGPropertyList.h 
b/inc/librevenge/RVNGPropertyList.h
-index 8d08bc9..c00af07 100644
---- a/inc/librevenge/RVNGPropertyList.h
-+++ b/inc/librevenge/RVNGPropertyList.h
-@@ -20,6 +20,9 @@
- 
- #ifndef RVNGPROPERTYLIST_H
- #define RVNGPROPERTYLIST_H
-+
-+#include "librevenge-api.h"
-+
- #include "RVNGProperty.h"
- 
- namespace librevenge
-@@ -32,7 +35,7 @@ class RVNGPropertyListImpl;
- class RVNGPropertyListIterImpl;
- class RVNGPropertyListVector;
- 
--class RVNGPropertyList
-+class REVENGE_API RVNGPropertyList
- {
- public:
-       RVNGPropertyList();
-diff --git a/inc/librevenge/RVNGPropertyListVector.h 
b/inc/librevenge/RVNGPropertyListVector.h
-index 33c4f22..850326e 100644
---- a/inc/librevenge/RVNGPropertyListVector.h
-+++ b/inc/librevenge/RVNGPropertyListVector.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGPROPERTYLISTVECTOR_H
- #define RVNGPROPERTYLISTVECTOR_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGPropertyList.h"
- 
- namespace librevenge
-@@ -29,7 +31,7 @@ namespace librevenge
- class RVNGPropertyListVectorImpl;
- class RVNGPropertyListVectorIterImpl;
- 
--class RVNGPropertyListVector : public RVNGProperty
-+class REVENGE_API RVNGPropertyListVector : public RVNGProperty
- {
- public:
-       RVNGPropertyListVector(const RVNGPropertyListVector &);
-diff --git a/inc/librevenge/RVNGSVGDrawingGenerator.h 
b/inc/librevenge/RVNGSVGDrawingGenerator.h
-index 4a90a99..9bfce26 100644
---- a/inc/librevenge/RVNGSVGDrawingGenerator.h
-+++ b/inc/librevenge/RVNGSVGDrawingGenerator.h
-@@ -21,6 +21,8 @@
- #ifndef RVNGSVGDRAWINGGENERATOR_H
- #define RVNGSVGDRAWINGGENERATOR_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGDrawingInterface.h"
- #include "RVNGStringVector.h"
- 
-@@ -29,7 +31,7 @@ namespace librevenge
- 
- struct RVNGSVGDrawingGeneratorPrivate;
- 
--class RVNGSVGDrawingGenerator : public RVNGDrawingInterface
-+class REVENGE_API RVNGSVGDrawingGenerator : public RVNGDrawingInterface
- {
- public:
-       RVNGSVGDrawingGenerator(RVNGStringVector &vec, const RVNGString 
&nmspace);
-diff --git a/inc/librevenge/RVNGSpreadsheetInterface.h 
b/inc/librevenge/RVNGSpreadsheetInterface.h
-index 28093b1..c839eec 100644
---- a/inc/librevenge/RVNGSpreadsheetInterface.h
-+++ b/inc/librevenge/RVNGSpreadsheetInterface.h
-@@ -22,6 +22,8 @@
- #ifndef RVNGSPREADSHEETINTERFACE_H
- #define RVNGSPREADSHEETINTERFACE_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGString.h"
- #include "RVNGPropertyList.h"
- #include "RVNGPropertyListVector.h"
-@@ -46,7 +48,7 @@ definitions listed here.
-                       if neededlibrevenge:name the numbering style name
- */
- 
--class RVNGSpreadsheetInterface
-+class REVENGE_API RVNGSpreadsheetInterface
- {
- public:
- 
-diff --git a/inc/librevenge/RVNGString.h b/inc/librevenge/RVNGString.h
-index 79f7494..cbea3bc 100644
---- a/inc/librevenge/RVNGString.h
-+++ b/inc/librevenge/RVNGString.h
-@@ -21,12 +21,14 @@
- #ifndef RVNGSTRING_H
- #define RVNGSTRING_H
- 
-+#include "librevenge-api.h"
-+
- namespace librevenge
- {
- 
- class RVNGStringImpl;
- 
--class RVNGString
-+class REVENGE_API RVNGString
- {
- public:
-       RVNGString();
-diff --git a/inc/librevenge/RVNGStringVector.h 
b/inc/librevenge/RVNGStringVector.h
-index 4a83609..912159a 100644
---- a/inc/librevenge/RVNGStringVector.h
-+++ b/inc/librevenge/RVNGStringVector.h
-@@ -20,6 +20,8 @@
- #ifndef RVNGSTRINGVECTOR_H
- #define RVNGSTRINGVECTOR_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGString.h"
- 
- namespace librevenge
-@@ -27,7 +29,7 @@ namespace librevenge
- 
- class RVNGStringVectorImpl;
- 
--class RVNGStringVector
-+class REVENGE_API RVNGStringVector
- {
- public:
-       RVNGStringVector();
-diff --git a/inc/librevenge/RVNGTextInterface.h 
b/inc/librevenge/RVNGTextInterface.h
-index 8c1c6d4..843b13e 100644
---- a/inc/librevenge/RVNGTextInterface.h
-+++ b/inc/librevenge/RVNGTextInterface.h
-@@ -22,6 +22,8 @@
- #ifndef RVNGTEXTINTERFACE_H
- #define RVNGTEXTINTERFACE_H
- 
-+#include "librevenge-api.h"
-+
- #include "RVNGPropertyList.h"
- #include "RVNGPropertyListVector.h"
- 
-@@ -36,7 +38,7 @@ definitions listed here.
- 
- class RVNGInputStream;
- 
--class RVNGTextInterface
-+class REVENGE_API RVNGTextInterface
- {
- public:
-       virtual ~RVNGTextInterface() {}
-diff --git a/inc/librevenge/librevenge-api.h b/inc/librevenge/librevenge-api.h
-new file mode 100644
-index 0000000..708c8a1
---- /dev/null
-+++ b/inc/librevenge/librevenge-api.h
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/* librevenge
-+ * Version: MPL 2.0 / LGPLv2.1+
-+ *
-+ * This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
-+ *
-+ * Major Contributor(s):
-+ * Copyright (C) 2002 William Lachance (wrl...@gmail.com)
-+ * Copyright (C) 2002 Marc Maurer (u...@uwog.net)
-+ *
-+ * For minor contributions see the git repository.
-+ *
-+ * Alternatively, the contents of this file may be used under the terms
-+ * of the GNU Lesser General Public License Version 2.1 or later
-+ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
-+ * applicable instead of those above.
-+ */
-+
-+#ifndef INCLUDED_LIBREVENGE_LIBREVENGE_API_H
-+#define INCLUDED_LIBREVENGE_LIBREVENGE_API_H
-+
-+#ifdef DLL_EXPORT
-+#ifdef LIBREVENGE_BUILD
-+#define REVENGE_API __declspec(dllexport)
-+#else
-+#define REVENGE_API __declspec(dllimport)
-+#endif
-+#else
-+#define REVENGE_API
-+#endif
-+
-+#endif /* INCLUDED_LIBREVENGE_LIBREVENGE_API_H */
-+
-+/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
--- 
-1.9.0
-
diff --git a/external/librevenge/ExternalPackage_librevenge.mk 
b/external/librevenge/ExternalPackage_librevenge.mk
index d65fdca765ba..9b868ca438e4 100644
--- a/external/librevenge/ExternalPackage_librevenge.mk
+++ b/external/librevenge/ExternalPackage_librevenge.mk
@@ -16,7 +16,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/libreven
 else ifeq ($(OS),WNT)
 $(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.dll,src/lib/.libs/librevenge-0.0.dll))
 else ifeq ($(filter IOS ANDROID,$(OS)),)
-$(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.so.0,src/lib/.libs/librevenge-0.0.so.0.0.0))
+$(eval $(call 
gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.so.0,src/lib/.libs/librevenge-0.0.so.0.0.1))
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/librevenge/UnpackedTarball_librevenge.mk 
b/external/librevenge/UnpackedTarball_librevenge.mk
index 8311eabc7584..470f58f9d001 100644
--- a/external/librevenge/UnpackedTarball_librevenge.mk
+++ b/external/librevenge/UnpackedTarball_librevenge.mk
@@ -13,8 +13,4 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,librevenge,$(REVENGE_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,1))
 
-$(eval $(call gb_UnpackedTarball_add_patches,librevenge,\
-       external/librevenge/0001-properly-export-API-symbols.patch \
-))
-
 # vim: set noet sw=4 ts=4:
commit ddd80bedd6891f9af197e0949acafc0976fea371
Author:     Gabor Kelemen <kelem...@ubuntu.com>
AuthorDate: Mon Jul 11 22:31:49 2022 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 22:31:49 2022 +0200

    Fix build error
    
    Inspired by commits:
    - d5d307d647c67c2d620eae5651c54c02178b5f52
    externals using boost now need config_host to find config_global.h
    - adddbbc4c6cfdcb120eb2f51ee3b88409a2d09b4
    normalize values of SYSTEM_BOOST
    
    Change-Id: I0807f318dea1d5eb68375ba6abb842987ceab62e

diff --git a/configure.ac b/configure.ac
index de492ad94293..0148128df536 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8723,6 +8723,7 @@ else
     AC_MSG_RESULT([internal])
     BUILD_TYPE="$BUILD_TYPE BOOST"
     SYSTEM_BOOST=NO
+    BOOST_CPPFLAGS="-I${WORKDIR}/UnpackedTarball/boost"
 fi
 AC_SUBST(SYSTEM_BOOST)
 
diff --git a/external/librevenge/ExternalProject_librevenge.mk 
b/external/librevenge/ExternalProject_librevenge.mk
index e9a826c180ea..85e6b0d5e056 100644
--- a/external/librevenge/ExternalProject_librevenge.mk
+++ b/external/librevenge/ExternalProject_librevenge.mk
@@ -35,7 +35,7 @@ $(call gb_ExternalProject_get_state_target,librevenge,build) :
                        --disable-generators \
                        --without-docs \
                        $(if $(VERBOSE)$(verbose),--enable-silent-rules) \
-                       CXXFLAGS="$(if 
$(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) 
-I$(BUILDDIR)/config_$(gb_Side))" \
+                       CXXFLAGS="$(CXXFLAGS) $(BOOST_CPPFLAGS) 
-I$(BUILDDIR)/config_$(gb_Side)" \
                        $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
                        $(if $(filter 
MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO)
 \
                && $(MAKE) \
commit bf53f3eb6376fba66d13c05503534c8837643a68
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Mon May 26 20:46:21 2014 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 11:48:03 2022 +0200

    export SYSTEM_REVENGE
    
    Change-Id: I2aeb928dbd27df0f77ea0fe136dd38305ad3a004

diff --git a/config_host.mk.in b/config_host.mk.in
index 35c8d5f24637..c27cb9310dde 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -545,6 +545,7 @@ export SYSTEM_POPPLER=@SYSTEM_POPPLER@
 export SYSTEM_POSTGRESQL=@SYSTEM_POSTGRESQL@
 export SYSTEM_PYTHON=@SYSTEM_PYTHON@
 export SYSTEM_REDLAND=@SYSTEM_REDLAND@
+export SYSTEM_REVENGE=@SYSTEM_REVENGE@
 export SYSTEM_RHINO=@SYSTEM_RHINO@
 export SYSTEM_UCPP=@SYSTEM_UCPP@
 export SYSTEM_VIGRA=@SYSTEM_VIGRA@
commit 31128e5fb85538d78956c88f75e6f90adbd6bfce
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Sun May 25 13:06:57 2014 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 11:25:38 2022 +0200

    fix deps for projects using librevenge
    
    Change-Id: Icc6e2465d96cc95b229a1f7abc6d51362ae3d016

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 9419465cab2a..2036f74edd32 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1546,6 +1546,8 @@ $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
 
 endef
 
+gb_ExternalProject__use_revenge :=
+
 else # !SYSTEM_REVENGE
 
 ifeq ($(COM),MSC)
@@ -1565,6 +1567,11 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 
 endef
 
+define gb_ExternalProject__use_revenge
+$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call 
gb_Library_get_target,revenge)
+
+endef
+
 else # !MSC
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
@@ -1583,6 +1590,11 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 endef
 
+define gb_ExternalProject__use_revenge
+$(call gb_ExternalProject_use_package,$(1),librevenge)
+
+endef
+
 endif # MSC
 
 endif # SYSTEM_REVENGE
commit f50aa62ea93b00228daa63d9830ee9712ab7839e
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Sat May 24 08:39:54 2014 +0200
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Mon Jul 11 11:25:24 2022 +0200

    bundle librevenge
    
    Change-Id: Ic36c1670866545db2cf2f29867de7e5b0ad2d57d

diff --git a/Makefile.fetch b/Makefile.fetch
index e00e118c7c85..34691e2dadc4 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -94,6 +94,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
                $(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
                $(call fetch_Optional,LIBPNG,PNG_TARBALL) \
                $(call fetch_Optional,PYTHON,PYTHON_TARBALL) \
+               $(call fetch_Optional,REVENGE,REVENGE_TARBALL) \
                $(call fetch_Optional,VISIO,VISIO_TARBALL) \
                $(call fetch_Optional,ZLIB,ZLIB_TARBALL) \
                $(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 965c2e964be4..9419465cab2a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1535,6 +1535,58 @@ endef
 endif # SYSTEM_ODFGEN
 
 
+ifneq ($(SYSTEM_REVENGE),)
+
+define gb_LinkTarget__use_revenge
+$(call gb_LinkTarget_set_include,$(1),\
+       $$(INCLUDE) \
+    $(REVENGE_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
+
+endef
+
+else # !SYSTEM_REVENGE
+
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
+       revenge \
+))
+
+define gb_LinkTarget__use_revenge
+$(call gb_LinkTarget_set_include,$(1),\
+       -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \
+       $$(INCLUDE) \
+)
+$(call gb_LinkTarget_use_libraries,$(1),\
+       revenge \
+)
+
+endef
+
+else # !MSC
+
+$(eval $(call gb_Helper_register_packages_for_install,ooo, \
+       librevenge \
+))
+
+define gb_LinkTarget__use_revenge
+$(call gb_LinkTarget_use_package,$(1),librevenge)
+
+$(call gb_LinkTarget_set_include,$(1),\
+       -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \
+       $$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+       -L$(call gb_UnpackedTarball_get_dir,librevenge)/src/lib/.libs 
-lrevenge-0.0 \
+)
+endef
+
+endif # MSC
+
+endif # SYSTEM_REVENGE
+
 ifeq ($(SYSTEM_ABW),YES)
 
 define gb_LinkTarget__use_abw
diff --git a/config_host.mk.in b/config_host.mk.in
index f1df8e336af4..35c8d5f24637 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -460,6 +460,8 @@ export RASQAL_MAJOR=@RASQAL_MAJOR@
 export REDLAND_CFLAGS=$(gb_SPACE)@REDLAND_CFLAGS@
 export REDLAND_LIBS=$(gb_SPACE)@REDLAND_LIBS@
 export REDLAND_MAJOR=@REDLAND_MAJOR@
+export REVENGE_CFLAGS=$(gb_SPACE)@REVENGE_CFLAGS@
+export REVENGE_LIBS=$(gb_SPACE)@REVENGE_LIBS@
 export RHINO_JAR=@RHINO_JAR@
 export RPM=@RPM@
 export RTL_ARCH=@RTL_ARCH@
diff --git a/configure.ac b/configure.ac
index f8567fbbf7a3..de492ad94293 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7732,6 +7732,11 @@ else
 fi
 AC_SUBST([ENABLE_EOT])
 
+dnl ===================================================================
+dnl Check for system librevenge
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0])
+
 dnl ===================================================================
 dnl Check for system libe-book
 dnl ===================================================================
diff --git a/download.lst b/download.lst
index 1969ee2c92d1..4d53be3f3f51 100644
--- a/download.lst
+++ b/download.lst
@@ -113,6 +113,8 @@ export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
 export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
 export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
 export REDLAND_TARBALL := 
32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
+export REVENGE_MD5SUM := b483b99af21c92c763a1c6a28ebee958
+export REVENGE_TARBALL := librevenge-0.0.0.tar.bz2
 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
 export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 2d64d5297bda..a2e99d1044a2 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -78,6 +78,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
        $(call gb_Helper_optional,POSTGRESQL,postgresql) \
        $(call gb_Helper_optional,PYTHON,python3) \
        $(call gb_Helper_optional,REDLAND,redland) \
+       $(call gb_Helper_optional,REVENGE,librevenge) \
        $(call gb_Helper_optional,RHINO,rhino) \
        $(call gb_Helper_optional,UCPP,ucpp) \
        $(call gb_Helper_optional,VIGRA,vigra) \
diff --git a/external/librevenge/0001-properly-export-API-symbols.patch 
b/external/librevenge/0001-properly-export-API-symbols.patch
new file mode 100644
index 000000000000..64513a0a5c36
--- /dev/null
+++ b/external/librevenge/0001-properly-export-API-symbols.patch
@@ -0,0 +1,752 @@
+From d0df6db52ae8db3b3e9549837e698a091474e727 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtar...@redhat.com>
+Date: Sun, 25 May 2014 08:52:57 +0200
+Subject: [PATCH] properly export API symbols
+
+---
+ inc/librevenge-generators/Makefile.am              |  1 +
+ .../RVNGCSVSpreadsheetGenerator.h                  |  4 ++-
+ inc/librevenge-generators/RVNGHTMLTextGenerator.h  |  4 ++-
+ .../RVNGRawDrawingGenerator.h                      |  4 ++-
+ .../RVNGRawPresentationGenerator.h                 |  4 ++-
+ .../RVNGRawSpreadsheetGenerator.h                  |  4 ++-
+ inc/librevenge-generators/RVNGRawTextGenerator.h   |  4 ++-
+ .../RVNGSVGPresentationGenerator.h                 |  4 ++-
+ .../RVNGTextDrawingGenerator.h                     |  4 ++-
+ .../RVNGTextPresentationGenerator.h                |  9 +++++-
+ .../RVNGTextSpreadsheetGenerator.h                 |  4 ++-
+ inc/librevenge-generators/RVNGTextTextGenerator.h  |  4 ++-
+ .../librevenge-generators-api.h                    | 36 ++++++++++++++++++++++
+ inc/librevenge-stream/Makefile.am                  |  1 +
+ inc/librevenge-stream/RVNGDirectoryStream.h        |  4 ++-
+ inc/librevenge-stream/RVNGStream.h                 |  4 ++-
+ inc/librevenge-stream/RVNGStreamImplementation.h   |  6 ++--
+ inc/librevenge-stream/librevenge-stream-api.h      | 36 ++++++++++++++++++++++
+ inc/librevenge/Makefile.am                         |  1 +
+ inc/librevenge/RVNGBinaryData.h                    |  5 ++-
+ inc/librevenge/RVNGDrawingInterface.h              |  4 ++-
+ inc/librevenge/RVNGPresentationInterface.h         |  4 ++-
+ inc/librevenge/RVNGProperty.h                      |  7 +++--
+ inc/librevenge/RVNGPropertyList.h                  |  5 ++-
+ inc/librevenge/RVNGPropertyListVector.h            |  4 ++-
+ inc/librevenge/RVNGSVGDrawingGenerator.h           |  4 ++-
+ inc/librevenge/RVNGSpreadsheetInterface.h          |  4 ++-
+ inc/librevenge/RVNGString.h                        |  4 ++-
+ inc/librevenge/RVNGStringVector.h                  |  4 ++-
+ inc/librevenge/RVNGTextInterface.h                 |  4 ++-
+ inc/librevenge/librevenge-api.h                    | 36 ++++++++++++++++++++++
+ src/lib/Makefile.am                                |  6 ++++
+ 32 files changed, 202 insertions(+), 27 deletions(-)
+ create mode 100644 inc/librevenge-generators/librevenge-generators-api.h
+ create mode 100644 inc/librevenge-stream/librevenge-stream-api.h
+ create mode 100644 inc/librevenge/librevenge-api.h
+
+diff --git a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
+index 40cce77..084b55c 100644
+--- a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
++++ b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGCSVSPREADSHEETGENERATOR_H
+ #define RVNGCSVSPREADSHEETGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -32,7 +34,7 @@ struct RVNGCSVSpreadsheetGeneratorImpl;
+   *
+   * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the 
basic interface.
+   */
+-class RVNGCSVSpreadsheetGenerator : public RVNGSpreadsheetInterface
++class REVENGE_GENERATORS_API RVNGCSVSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
+ {
+       //! unimplemented copy constructor to prevent copy
+       RVNGCSVSpreadsheetGenerator(const RVNGCSVSpreadsheetGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGHTMLTextGenerator.h 
b/inc/librevenge-generators/RVNGHTMLTextGenerator.h
+index 9bb9b77..6dacfb8 100644
+--- a/inc/librevenge-generators/RVNGHTMLTextGenerator.h
++++ b/inc/librevenge-generators/RVNGHTMLTextGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGHTMLTEXTGENERATOR_H
+ #define RVNGHTMLTEXTGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -29,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGHTMLTextGeneratorImpl;
+ 
+-class RVNGHTMLTextGenerator : public RVNGTextInterface
++class REVENGE_GENERATORS_API RVNGHTMLTextGenerator : public RVNGTextInterface
+ {
+ public:
+       explicit RVNGHTMLTextGenerator(RVNGString &document);
+diff --git a/inc/librevenge-generators/RVNGRawDrawingGenerator.h 
b/inc/librevenge-generators/RVNGRawDrawingGenerator.h
+index 2b60cc3..a0a6475 100644
+--- a/inc/librevenge-generators/RVNGRawDrawingGenerator.h
++++ b/inc/librevenge-generators/RVNGRawDrawingGenerator.h
+@@ -22,6 +22,8 @@
+ #ifndef RVNGRAWDRAWINGGENERATOR_H
+ #define RVNGRAWDRAWINGGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge-stream/librevenge-stream.h>
+ #include <librevenge/librevenge.h>
+ 
+@@ -30,7 +32,7 @@ namespace librevenge
+ 
+ struct RVNGRawDrawingGeneratorImpl;
+ 
+-class RVNGRawDrawingGenerator : public RVNGDrawingInterface
++class REVENGE_GENERATORS_API RVNGRawDrawingGenerator : public 
RVNGDrawingInterface
+ {
+       // disable copying
+       RVNGRawDrawingGenerator(const RVNGRawDrawingGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGRawPresentationGenerator.h 
b/inc/librevenge-generators/RVNGRawPresentationGenerator.h
+index 8a3f1c9..9438541 100644
+--- a/inc/librevenge-generators/RVNGRawPresentationGenerator.h
++++ b/inc/librevenge-generators/RVNGRawPresentationGenerator.h
+@@ -15,6 +15,8 @@
+ #ifndef RVNGRAWPRESENTATIONGENERATOR_H
+ #define RVNGRAWPRESENTATIONGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -23,7 +25,7 @@ namespace librevenge
+ 
+ struct RVNGRawPresentationGeneratorImpl;
+ 
+-class RVNGRawPresentationGenerator : public RVNGPresentationInterface
++class REVENGE_GENERATORS_API RVNGRawPresentationGenerator : public 
RVNGPresentationInterface
+ {
+       // disable copying
+       RVNGRawPresentationGenerator(const RVNGRawPresentationGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
+index ff584c7..84be1c1 100644
+--- a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
++++ b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGRAWSPREADSHEETGENERATOR_H
+ #define RVNGRAWSPREADSHEETGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -29,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGRawSpreadsheetGeneratorImpl;
+ 
+-class RVNGRawSpreadsheetGenerator : public RVNGSpreadsheetInterface
++class REVENGE_GENERATORS_API RVNGRawSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
+ {
+       // disable copying
+       RVNGRawSpreadsheetGenerator(const RVNGRawSpreadsheetGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGRawTextGenerator.h 
b/inc/librevenge-generators/RVNGRawTextGenerator.h
+index 2df33d4..7781b07 100644
+--- a/inc/librevenge-generators/RVNGRawTextGenerator.h
++++ b/inc/librevenge-generators/RVNGRawTextGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGRAWTEXTGENERATOR_H
+ #define RVNGRAWTEXTGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -29,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGRawTextGeneratorImpl;
+ 
+-class RVNGRawTextGenerator : public RVNGTextInterface
++class REVENGE_GENERATORS_API RVNGRawTextGenerator : public RVNGTextInterface
+ {
+       // disable copying
+       RVNGRawTextGenerator(const RVNGRawTextGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h 
b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
+index 996ee35..2e18da1 100644
+--- a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
++++ b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h
+@@ -15,6 +15,8 @@
+ #ifndef RVNGSVGPRESENTATIONGENERATOR_H
+ #define RVNGSVGPRESENTATIONGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -23,7 +25,7 @@ namespace librevenge
+ 
+ struct RVNGSVGPresentationGeneratorImpl;
+ 
+-class RVNGSVGPresentationGenerator : public RVNGPresentationInterface
++class REVENGE_GENERATORS_API RVNGSVGPresentationGenerator : public 
RVNGPresentationInterface
+ {
+       // disable copying
+       RVNGSVGPresentationGenerator(const RVNGSVGPresentationGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGTextDrawingGenerator.h 
b/inc/librevenge-generators/RVNGTextDrawingGenerator.h
+index ba9a9cc..2b3160e 100644
+--- a/inc/librevenge-generators/RVNGTextDrawingGenerator.h
++++ b/inc/librevenge-generators/RVNGTextDrawingGenerator.h
+@@ -15,6 +15,8 @@
+ #ifndef RVNGTEXTDRAWINGGENERATOR_H
+ #define RVNGTEXTDRAWINGGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge-stream/librevenge-stream.h>
+ #include <librevenge/librevenge.h>
+ 
+@@ -23,7 +25,7 @@ namespace librevenge
+ 
+ struct RVNGTextDrawingGeneratorImpl;
+ 
+-class RVNGTextDrawingGenerator : public RVNGDrawingInterface
++class REVENGE_GENERATORS_API RVNGTextDrawingGenerator : public 
RVNGDrawingInterface
+ {
+       // disable copying
+       RVNGTextDrawingGenerator(const RVNGTextDrawingGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGTextPresentationGenerator.h 
b/inc/librevenge-generators/RVNGTextPresentationGenerator.h
+index f89691e..9bef369 100644
+--- a/inc/librevenge-generators/RVNGTextPresentationGenerator.h
++++ b/inc/librevenge-generators/RVNGTextPresentationGenerator.h
+@@ -12,6 +12,11 @@
+  * applicable instead of those above.
+  */
+ 
++#ifndef RVNGTEXTPRESENTATIONGENERATOR_H
++#define RVNGTEXTPRESENTATIONGENERATOR_H
++
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -20,7 +25,7 @@ namespace librevenge
+ 
+ struct RVNGTextPresentationGeneratorImpl;
+ 
+-class RVNGTextPresentationGenerator : public RVNGPresentationInterface
++class REVENGE_GENERATORS_API RVNGTextPresentationGenerator : public 
RVNGPresentationInterface
+ {
+       // disable copying
+       RVNGTextPresentationGenerator(const RVNGTextPresentationGenerator 
&other);
+@@ -124,4 +129,6 @@ private:
+ 
+ }
+ 
++#endif
++
+ /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
+diff --git a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h 
b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
+index e140153..9ac9dc8 100644
+--- a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
++++ b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGTEXTSPREADSHEETGENERATOR_H
+ #define RVNGTEXTSPREADSHEETGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -32,7 +34,7 @@ struct RVNGTextSpreadsheetGeneratorImpl;
+   *
+   * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the 
basic interface.
+   */
+-class RVNGTextSpreadsheetGenerator : public RVNGSpreadsheetInterface
++class REVENGE_GENERATORS_API RVNGTextSpreadsheetGenerator : public 
RVNGSpreadsheetInterface
+ {
+       //! unimplemented copy constructor to prevent copy
+       RVNGTextSpreadsheetGenerator(const RVNGTextSpreadsheetGenerator &other);
+diff --git a/inc/librevenge-generators/RVNGTextTextGenerator.h 
b/inc/librevenge-generators/RVNGTextTextGenerator.h
+index 87828fd..ec657d5 100644
+--- a/inc/librevenge-generators/RVNGTextTextGenerator.h
++++ b/inc/librevenge-generators/RVNGTextTextGenerator.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGTEXTTEXTGENERATOR_H
+ #define RVNGTEXTTEXTGENERATOR_H
+ 
++#include "librevenge-generators-api.h"
++
+ #include <librevenge/librevenge.h>
+ #include <librevenge-stream/librevenge-stream.h>
+ 
+@@ -29,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGTextTextGeneratorImpl;
+ 
+-class RVNGTextTextGenerator : public RVNGTextInterface
++class REVENGE_GENERATORS_API RVNGTextTextGenerator : public RVNGTextInterface
+ {
+       // disable copying
+       RVNGTextTextGenerator(const RVNGTextTextGenerator &other);
+diff --git a/inc/librevenge-generators/librevenge-generators-api.h 
b/inc/librevenge-generators/librevenge-generators-api.h
+new file mode 100644
+index 0000000..8d4a5ea
+--- /dev/null
++++ b/inc/librevenge-generators/librevenge-generators-api.h
+@@ -0,0 +1,36 @@
++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* librevenge
++ * Version: MPL 2.0 / LGPLv2.1+
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
++ *
++ * Major Contributor(s):
++ * Copyright (C) 2002 William Lachance (wrl...@gmail.com)
++ * Copyright (C) 2002 Marc Maurer (u...@uwog.net)
++ *
++ * For minor contributions see the git repository.
++ *
++ * Alternatively, the contents of this file may be used under the terms
++ * of the GNU Lesser General Public License Version 2.1 or later
++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
++ * applicable instead of those above.
++ */
++
++#ifndef INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H
++#define INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H
++
++#ifdef DLL_EXPORT
++#ifdef LIBREVENGE_GENERATORS_BUILD
++#define REVENGE_GENERATORS_API __declspec(dllexport)
++#else
++#define REVENGE_GENERATORS_API __declspec(dllimport)
++#endif
++#else
++#define REVENGE_GENERATORS_API
++#endif
++
++#endif /* INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H */
++
++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
+diff --git a/inc/librevenge-stream/RVNGDirectoryStream.h 
b/inc/librevenge-stream/RVNGDirectoryStream.h
+index dee185e..46d2101 100644
+--- a/inc/librevenge-stream/RVNGDirectoryStream.h
++++ b/inc/librevenge-stream/RVNGDirectoryStream.h
+@@ -22,6 +22,8 @@
+ #ifndef RVNGDIRECTORYSTREAM_H_INCLUDED
+ #define RVNGDIRECTORYSTREAM_H_INCLUDED
+ 
++#include "librevenge-stream-api.h"
++
+ #include "RVNGStream.h"
+ 
+ namespace librevenge
+@@ -29,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGDirectoryStreamImpl;
+ 
+-class RVNGDirectoryStream : public RVNGInputStream
++class REVENGE_STREAM_API RVNGDirectoryStream : public RVNGInputStream
+ {
+       // disable copying
+       RVNGDirectoryStream(const RVNGDirectoryStream &);
+diff --git a/inc/librevenge-stream/RVNGStream.h 
b/inc/librevenge-stream/RVNGStream.h
+index 6b1b38e..1b40bef 100644
+--- a/inc/librevenge-stream/RVNGStream.h
++++ b/inc/librevenge-stream/RVNGStream.h
+@@ -20,6 +20,8 @@
+ #ifndef RVNGSTREAM_H
+ #define RVNGSTREAM_H
+ 
++#include "librevenge-stream-api.h"
++
+ namespace librevenge
+ {
+ 
+@@ -30,7 +32,7 @@ enum RVNG_SEEK_TYPE
+       RVNG_SEEK_END
+ };
+ 
+-class RVNGInputStream
++class REVENGE_STREAM_API RVNGInputStream
+ {
+ public:
+       RVNGInputStream() {}
+diff --git a/inc/librevenge-stream/RVNGStreamImplementation.h 
b/inc/librevenge-stream/RVNGStreamImplementation.h
+index 06ff938..f4c1a74 100644
+--- a/inc/librevenge-stream/RVNGStreamImplementation.h
++++ b/inc/librevenge-stream/RVNGStreamImplementation.h
+@@ -20,6 +20,8 @@
+ #ifndef RVNGSTREAMIMPLEMENTATION_H
+ #define RVNGSTREAMIMPLEMENTATION_H
+ 
++#include "librevenge-stream-api.h"
++
+ #include "RVNGStream.h"
+ 
+ namespace librevenge
+@@ -27,7 +29,7 @@ namespace librevenge
+ 
+ class RVNGFileStreamPrivate;
+ 
+-class RVNGFileStream: public RVNGInputStream
++class REVENGE_STREAM_API RVNGFileStream: public RVNGInputStream
+ {
+ public:
+       explicit RVNGFileStream(const char *filename);
+@@ -53,7 +55,7 @@ private:
+ 
+ class RVNGStringStreamPrivate;
+ 
+-class RVNGStringStream: public RVNGInputStream
++class REVENGE_STREAM_API RVNGStringStream: public RVNGInputStream
+ {
+ public:
+       RVNGStringStream(const unsigned char *data, const unsigned int 
dataSize);
+diff --git a/inc/librevenge-stream/librevenge-stream-api.h 
b/inc/librevenge-stream/librevenge-stream-api.h
+new file mode 100644
+index 0000000..5b544fc
+--- /dev/null
++++ b/inc/librevenge-stream/librevenge-stream-api.h
+@@ -0,0 +1,36 @@
++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* librevenge
++ * Version: MPL 2.0 / LGPLv2.1+
++ *
++ * This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
++ *
++ * Major Contributor(s):
++ * Copyright (C) 2002 William Lachance (wrl...@gmail.com)
++ * Copyright (C) 2002 Marc Maurer (u...@uwog.net)
++ *
++ * For minor contributions see the git repository.
++ *
++ * Alternatively, the contents of this file may be used under the terms
++ * of the GNU Lesser General Public License Version 2.1 or later
++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
++ * applicable instead of those above.
++ */
++
++#ifndef INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H
++#define INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H
++
++#ifdef DLL_EXPORT
++#ifdef LIBREVENGE_STREAM_BUILD
++#define REVENGE_STREAM_API __declspec(dllexport)
++#else
++#define REVENGE_STREAM_API __declspec(dllimport)
++#endif
++#else
++#define REVENGE_STREAM_API
++#endif
++
++#endif /* INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H */
++
++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
+diff --git a/inc/librevenge/RVNGBinaryData.h b/inc/librevenge/RVNGBinaryData.h
+index c09b26a..825f4dc 100644
+--- a/inc/librevenge/RVNGBinaryData.h
++++ b/inc/librevenge/RVNGBinaryData.h
+@@ -20,7 +20,10 @@
+ #ifndef RVNGBINARYDATA_H
+ #define RVNGBINARYDATA_H
+ 
++#include "librevenge-api.h"
++
+ #include <librevenge-stream/librevenge-stream.h>
++
+ #include "RVNGString.h"
+ 
+ namespace librevenge
+@@ -28,7 +31,7 @@ namespace librevenge
+ 
+ struct RVNGBinaryDataImpl;
+ 
+-class RVNGBinaryData
++class REVENGE_API RVNGBinaryData
+ {
+ public:
+       RVNGBinaryData();
+diff --git a/inc/librevenge/RVNGDrawingInterface.h 
b/inc/librevenge/RVNGDrawingInterface.h
+index 0030e49..3b87cda 100644
+--- a/inc/librevenge/RVNGDrawingInterface.h
++++ b/inc/librevenge/RVNGDrawingInterface.h
+@@ -21,6 +21,8 @@
+ #ifndef RVNGDRAWINGINTERFACE_H
+ #define RVNGDRAWINGINTERFACE_H
+ 
++#include "librevenge-api.h"
++
+ #include "RVNGPropertyList.h"
+ #include "RVNGPropertyListVector.h"
+ #include "RVNGBinaryData.h"
+@@ -28,7 +30,7 @@
+ namespace librevenge
+ {
+ 
+-class RVNGDrawingInterface
++class REVENGE_API RVNGDrawingInterface
+ {
+ public:
+       virtual ~RVNGDrawingInterface() {}
+diff --git a/inc/librevenge/RVNGPresentationInterface.h 
b/inc/librevenge/RVNGPresentationInterface.h
+index 2142082..32fec64 100644
+--- a/inc/librevenge/RVNGPresentationInterface.h
++++ b/inc/librevenge/RVNGPresentationInterface.h
+@@ -15,6 +15,8 @@
+ #ifndef RVNGPRESENTATIONINTERFACE_H
+ #define RVNGPRESENTATIONINTERFACE_H
+ 
++#include "librevenge-api.h"
++
+ #include "RVNGPropertyList.h"
+ #include "RVNGPropertyListVector.h"
+ 
+@@ -23,7 +25,7 @@ namespace librevenge
+ 
+ /** Interface for import of presentations.
+   */
+-class RVNGPresentationInterface
++class REVENGE_API RVNGPresentationInterface
+ {
+ public:
+       virtual ~RVNGPresentationInterface() {}
+diff --git a/inc/librevenge/RVNGProperty.h b/inc/librevenge/RVNGProperty.h
+index 46c94fa..df56c2c 100644
+--- a/inc/librevenge/RVNGProperty.h
++++ b/inc/librevenge/RVNGProperty.h
+@@ -19,6 +19,9 @@
+ 
+ #ifndef RVNGPROPERTY_H

... etc. - the rest is truncated

Reply via email to