[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 29 commits - comphelper/source configure.ac connectivity/source cui/source dbaccess/inc dbaccess/Library_dbahsql.mk dbaccess/Library_dba.mk dbaccess/Module_dbaccess.mk dbaccess/README.vars dbaccess/source desktop/source download.lst external/Module_external.mk external/twain external/twain_dsm fpicker/source framework/source include/comphelper include/oox include/toolkit include/vcl lingucomponent/source Makefile.fetch offapi/com oox/source RepositoryExternal.mk Repository.mk sc/source sd/qa sd/source svtools/source sw/inc sw/qa sw/source toolkit/source vcl/source writerfilter/source

Henry Castro hcastro at collabora.com
Sun Mar 25 15:55:36 UTC 2018


 Makefile.fetch                                            |    1 
 Repository.mk                                             |    4 
 RepositoryExternal.mk                                     |   10 
 comphelper/source/misc/lok.cxx                            |   48 
 configure.ac                                              |   15 
 connectivity/source/drivers/firebird/Connection.cxx       |    8 
 cui/source/tabpages/backgrnd.cxx                          |   22 
 dbaccess/Library_dba.mk                                   |    2 
 dbaccess/Library_dbahsql.mk                               |   40 
 dbaccess/Module_dbaccess.mk                               |    1 
 dbaccess/README.vars                                      |    1 
 dbaccess/inc/pch/precompiled_dbahsql.cxx                  |   12 
 dbaccess/inc/pch/precompiled_dbahsql.hxx                  |   38 
 dbaccess/source/core/dataaccess/datasource.cxx            |   26 
 dbaccess/source/filter/hsqldb/columndef.cxx               |   41 
 dbaccess/source/filter/hsqldb/columndef.hxx               |   59 
 dbaccess/source/filter/hsqldb/createparser.cxx            |  223 +
 dbaccess/source/filter/hsqldb/createparser.hxx            |   51 
 dbaccess/source/filter/hsqldb/fbcreateparser.cxx          |  163 
 dbaccess/source/filter/hsqldb/fbcreateparser.hxx          |   38 
 dbaccess/source/filter/hsqldb/hsqlimport.cxx              |   56 
 dbaccess/source/filter/hsqldb/hsqlimport.hxx              |   47 
 dbaccess/source/filter/hsqldb/parseschema.cxx             |   82 
 dbaccess/source/filter/hsqldb/parseschema.hxx             |   44 
 desktop/source/app/officeipcthread.cxx                    |    4 
 desktop/source/lib/init.cxx                               |    2 
 download.lst                                              |    2 
 external/Module_external.mk                               |    1 
 external/twain/README                                     |    1 
 external/twain/inc/twain/twain.h                          | 2289 --------------
 external/twain_dsm/ExternalPackage_twain_dsm.mk           |   20 
 external/twain_dsm/ExternalProject_twain_dsm.mk           |   33 
 external/twain_dsm/Module_twain_dsm.mk                    |   24 
 external/twain_dsm/README                                 |    1 
 external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.filters.patch |   54 
 external/twain_dsm/TWAIN_DSM_VS2015.vcxproj.patch         |  263 +
 external/twain_dsm/UnpackedTarball_twain_dsm.mk           |   21 
 fpicker/source/office/iodlg.cxx                           |    3 
 framework/source/classes/taskcreator.cxx                  |    4 
 framework/source/services/taskcreatorsrv.cxx              |    2 
 include/comphelper/lok.hxx                                |    2 
 include/oox/drawingml/shapepropertymap.hxx                |    3 
 include/oox/ppt/slidetransition.hxx                       |    4 
 include/toolkit/awt/vclxwindow.hxx                        |   17 
 include/vcl/window.hxx                                    |    2 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx      |    4 
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx       |    4 
 offapi/com/sun/star/presentation/DrawPage.idl             |    9 
 oox/source/drawingml/fillproperties.cxx                   |    9 
 oox/source/drawingml/shapepropertymap.cxx                 |    3 
 oox/source/export/drawingml.cxx                           |   30 
 oox/source/ppt/slidetransition.cxx                        |   22 
 oox/source/ppt/slidetransitioncontext.cxx                 |    6 
 oox/source/token/properties.txt                           |    2 
 sc/source/ui/app/transobj.cxx                             |   22 
 sc/source/ui/inc/tabview.hxx                              |    2 
 sc/source/ui/vba/vbaglobals.cxx                           |   10 
 sc/source/ui/view/cellsh1.cxx                             |    2 
 sc/source/ui/view/tabview2.cxx                            |    2 
 sd/qa/unit/data/ppt/tdf115394.ppt                         |binary
 sd/qa/unit/data/pptx/tdf107608.pptx                       |binary
 sd/qa/unit/data/pptx/tdf111786.pptx                       |binary
 sd/qa/unit/data/pptx/tdf115394.pptx                       |binary
 sd/qa/unit/data/xml/n820786_0.xml                         |  102 
 sd/qa/unit/export-tests-ooxml2.cxx                        |   85 
 sd/qa/unit/export-tests.cxx                               |   39 
 sd/qa/unit/import-tests.cxx                               |   59 
 sd/source/filter/eppt/eppt.cxx                            |   26 
 sd/source/filter/eppt/pptx-epptooxml.cxx                  |  150 
 sd/source/filter/ppt/pptin.cxx                            |    6 
 sd/source/ui/inc/unoprnms.hxx                             |    1 
 sd/source/ui/unoidl/unopage.cxx                           |    2 
 svtools/source/control/toolbarmenu.cxx                    |    2 
 svtools/source/uno/popupwindowcontroller.cxx              |    3 
 sw/inc/unotxdoc.hxx                                       |    5 
 sw/qa/extras/tiledrendering/tiledrendering.cxx            |   27 
 sw/qa/extras/uiwriter/uiwriter.cxx                        |   79 
 sw/source/core/doc/docredln.cxx                           |   12 
 sw/source/uibase/uno/unotxdoc.cxx                         |   64 
 sw/source/uibase/wrtsh/delete.cxx                         |  126 
 toolkit/source/controls/unocontrol.cxx                    |   55 
 vcl/source/outdev/text.cxx                                |    2 
 vcl/source/window/paint.cxx                               |    1 
 vcl/source/window/winproc.cxx                             |    4 
 writerfilter/source/dmapper/NumberingManager.cxx          |    9 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx           |    3 
 86 files changed, 2244 insertions(+), 2529 deletions(-)

New commits:
commit 42b2a03e2c1648210003dd9b412bbc52d64244aa
Author: Henry Castro <hcastro at collabora.com>
Date:   Tue Feb 6 17:16:03 2018 -0400

    tdf#115020: Cutting a large dataset is very slow since 6.1.0.0.alpha0+
    
    Reviewed-on: https://gerrit.libreoffice.org/49320
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    (cherry picked from commit 1fcf76b8f33ddca3f00256e3c41104314988a9f4)
    
    Change-Id: Icc26224055c00bd826019bd728c3f74d2ebba535

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index b3b17e420cca..333a255e19a5 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -23,6 +23,7 @@
 
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
 
 #include <unotools/tempfile.hxx>
 #include <unotools/ucbstreamhelper.hxx>
@@ -200,13 +201,22 @@ ScTransferObj::~ScTransferObj()
 ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin )
 {
     ScTransferObj* pObj = nullptr;
-    TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pUIWin ) );
-    uno::Reference<XUnoTunnel> xTunnel( aDataHelper.GetTransferable(), uno::UNO_QUERY );
-    if ( xTunnel.is() )
+    uno::Reference<XTransferable> xTransferable;
+    uno::Reference<datatransfer::clipboard::XClipboard> xClipboard;
+
+    if( pUIWin )
+        xClipboard = pUIWin->GetClipboard();
+
+    if( xClipboard.is() )
     {
-        sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
-        if ( nHandle )
-            pObj = dynamic_cast<ScTransferObj*>(reinterpret_cast<TransferableHelper*>( (sal_IntPtr) nHandle ));
+        xTransferable = xClipboard->getContents();
+        uno::Reference<XUnoTunnel> xTunnel( xTransferable, uno::UNO_QUERY );
+        if ( xTunnel.is() )
+        {
+            sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
+            if ( nHandle )
+                pObj = dynamic_cast<ScTransferObj*>(reinterpret_cast<TransferableHelper*>( static_cast<sal_IntPtr>(nHandle) ));
+        }
     }
 
     return pObj;
commit dbb224d7e3fb10ffaa1bd2d3e55066b687947db4
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Wed Feb 7 12:22:52 2018 +0100

    tdf#115394 export correct slide transition time in PPT
    
    Reviewed-on: https://gerrit.libreoffice.org/49345
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit ba9a42009a6e712aea8646956bd711afb058db24)
    
    Change-Id: Ie293dd4cc128c256e39d54fdcd83bb5e13484662

diff --git a/sd/qa/unit/data/ppt/tdf115394.ppt b/sd/qa/unit/data/ppt/tdf115394.ppt
new file mode 100644
index 000000000000..1fd299a5e4be
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf115394.ppt differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 8fccd93e127a..679394c5f941 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -94,6 +94,7 @@ public:
     void testTdf100926();
     void testPageWithTransparentBackground();
     void testTextRotation();
+    void testTdf115394PPT();
 
     CPPUNIT_TEST_SUITE(SdExportTest);
 
@@ -115,6 +116,7 @@ public:
     CPPUNIT_TEST(testTdf100926);
     CPPUNIT_TEST(testPageWithTransparentBackground);
     CPPUNIT_TEST(testTextRotation);
+    CPPUNIT_TEST(testTdf115394PPT);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -790,6 +792,43 @@ void SdExportTest::testTextRotation()
     xDocShRef->DoClose();
 }
 
+void SdExportTest::testTdf115394PPT()
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
+
+    // Export the document and import again for a check
+    uno::Reference< lang::XComponent > xComponent(xDocShRef->GetModel(), uno::UNO_QUERY);
+    uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);
+    utl::MediaDescriptor aMediaDescriptor;
+    aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[PPT].pFilterName), RTL_TEXTENCODING_UTF8);
+
+    utl::TempFile aTempFile;
+    aTempFile.EnableKillingFile();
+    xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+    xComponent.set(xStorable, uno::UNO_QUERY);
+    xComponent->dispose();
+    xDocShRef = loadURL(aTempFile.GetURL(), PPT);
+
+    double fTransitionDuration;
+
+    // Fast
+    SdPage* pPage1 = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard);
+    fTransitionDuration = pPage1->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.5, fTransitionDuration);
+
+    // Medium
+    SdPage* pPage2 = xDocShRef->GetDoc()->GetSdPage(1, PageKind::Standard);
+    fTransitionDuration = pPage2->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.75, fTransitionDuration);
+
+    // Slow
+    SdPage* pPage3 = xDocShRef->GetDoc()->GetSdPage(2, PageKind::Standard);
+    fTransitionDuration = pPage3->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(1.0, fTransitionDuration);
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 43810226e016..2c32a71a6d69 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -171,6 +171,7 @@ public:
     void testTdf114821();
     void testTdf51340();
     void testTdf115394();
+    void testTdf115394PPT();
 
     bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
     void testPatternImport();
@@ -247,6 +248,7 @@ public:
     CPPUNIT_TEST(testTdf114821);
     CPPUNIT_TEST(testTdf51340);
     CPPUNIT_TEST(testTdf115394);
+    CPPUNIT_TEST(testTdf115394PPT);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -2410,6 +2412,29 @@ void SdImportTest::testTdf115394()
     xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf115394PPT()
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf115394.ppt"), PPT);
+    double fTransitionDuration;
+
+    // Fast
+    SdPage* pPage1 = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard);
+    fTransitionDuration = pPage1->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.5, fTransitionDuration);
+
+    // Medium
+    SdPage* pPage2 = xDocShRef->GetDoc()->GetSdPage(1, PageKind::Standard);
+    fTransitionDuration = pPage2->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.75, fTransitionDuration);
+
+    // Slow
+    SdPage* pPage3 = xDocShRef->GetDoc()->GetSdPage(2, PageKind::Standard);
+    fTransitionDuration = pPage3->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(1.0, fTransitionDuration);
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 2b3f76a41ebf..a506a376c20f 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -241,11 +241,31 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
         sal_Int32   nSlideTime = 0;         // still has to !!!
         sal_uInt8   nSpeed = 1;
 
-        if ( GetPropertyValue( aAny, mXPagePropSet, "Speed" ) )
+        if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionDuration" ) )
         {
             css::presentation::AnimationSpeed aAs;
-            aAny >>= aAs;
-            nSpeed = (sal_uInt8)aAs;
+            double fTransitionDuration = -1.0;
+            aAny >>= fTransitionDuration;
+
+            if (fTransitionDuration >= 0)
+            {
+                if (fTransitionDuration <= 0.5)
+                {
+                    aAs = css::presentation::AnimationSpeed::AnimationSpeed_FAST;
+                }
+                else if (fTransitionDuration >= 1.0)
+                {
+                    aAs = css::presentation::AnimationSpeed::AnimationSpeed_SLOW;
+                }
+                else
+                {
+                    aAs = css::presentation::AnimationSpeed::AnimationSpeed_MEDIUM;
+                }
+            }
+            else
+                aAs = css::presentation::AnimationSpeed::AnimationSpeed_MEDIUM;
+
+            nSpeed = static_cast<sal_uInt8>(aAs);
         }
         sal_Int16 nTT = 0;
         if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionType" )
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 4215cd7b60a8..91a541135204 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1786,11 +1786,11 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
                                 }
 
                                 if ( nSpeed == 0 )
-                                    pPage->setTransitionDuration( 3.0 );    // slow
+                                    pPage->setTransitionDuration( 1.0 );    // slow
                                 else if ( nSpeed == 1 )
-                                    pPage->setTransitionDuration( 2.0 );    // medium
+                                    pPage->setTransitionDuration( 0.75 );    // medium
                                 else if ( nSpeed == 2 )
-                                    pPage->setTransitionDuration( 1.0 );    // fast
+                                    pPage->setTransitionDuration( 0.5 );    // fast
 
                                 if ( nBuildFlags & 0x400 )                      // slidechange by time
                                 {   // time to show (in Ticks)
commit 00e19acfe71df863f02032a778ad357a029adc7d
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Tue Jan 9 22:54:21 2018 +0300

    Implement XDrawPagesSupplier in SwXTextDocument
    
    Text documents only exposed deprecated XDrawPageSupplier interface
    (see https://api.libreoffice.org/docs/idl/ref/deprecated.html).
    Other documents (spreadsheets, Draw and Impress documents) only
    expose XDrawPagesSupplier interface. Implementing the latter for text
    documents (which would only provide a single page) allows for uniform
    handling of draw pages across all modules.
    
    Change-Id: Ib9e719c6130bc3c968d92c6864fa413ad2c0e3b9
    Reviewed-on: https://gerrit.libreoffice.org/47681
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit da0815e8a2e89c02c530fe6fcf7233f241e529c6)

diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 3f202c88ae54..256376d2c963 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -45,6 +45,7 @@
 #include <com/sun/star/text/XReferenceMarksSupplier.hpp>
 #include <com/sun/star/text/XTextFramesSupplier.hpp>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 #include <com/sun/star/util/XReplaceable.hpp>
 #include <com/sun/star/util/XReplaceDescriptor.hpp>
 #include <com/sun/star/util/XRefreshable.hpp>
@@ -112,6 +113,7 @@ typedef cppu::WeakImplHelper
     css::style::XAutoStylesSupplier,
     css::lang::XServiceInfo,
     css::drawing::XDrawPageSupplier,
+    css::drawing::XDrawPagesSupplier,
     css::text::XDocumentIndexesSupplier,
     css::beans::XPropertySet,
     css::beans::XPropertyState,
@@ -325,6 +327,9 @@ public:
     // css::drawing::XDrawPageSupplier
     virtual css::uno::Reference< css::drawing::XDrawPage >  SAL_CALL getDrawPage() override;
 
+    // css::drawing::XDrawPagesSupplier
+    virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override;
+
     // css::text::XDocumentIndexesSupplier
     virtual css::uno::Reference< css::container::XIndexAccess >  SAL_CALL getDocumentIndexes() override;
 
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a9f232d03a6f..926a064bf194 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -296,6 +296,7 @@ public:
     void testTdf115013();
     void testTdf108048();
     void testTdf115132();
+    void testXDrawPagesSupplier();
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -472,6 +473,7 @@ public:
     CPPUNIT_TEST(testTdf115013);
     CPPUNIT_TEST(testTdf108048);
     CPPUNIT_TEST(testTdf115132);
+    CPPUNIT_TEST(testXDrawPagesSupplier);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -5815,6 +5817,25 @@ void SwUiWriterTest::testTdf115132()
     }
 }
 
+void SwUiWriterTest::testXDrawPagesSupplier()
+{
+    createDoc();
+    uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+    CPPUNIT_ASSERT_MESSAGE("XDrawPagesSupplier interface is unavailable", xDrawPagesSupplier.is());
+    uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages();
+    CPPUNIT_ASSERT(xDrawPages.is());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be only a single DrawPage in Writer documents",
+        sal_Int32(1), xDrawPages->getCount());
+    uno::Any aDrawPage = xDrawPages->getByIndex(0);
+    uno::Reference<drawing::XDrawPage> xDrawPageFromXDrawPages(aDrawPage, uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xDrawPageFromXDrawPages.is());
+
+    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("The DrawPage accessed using XDrawPages must be the same as using XDrawPageSupplier",
+        xDrawPage.get(), xDrawPageFromXDrawPages.get());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index a6431a67975f..948a469cadc4 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -91,6 +91,8 @@
 #include <unotools/printwarningoptions.hxx>
 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/NoSupportException.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/XFastPropertySet.hpp>
@@ -1376,6 +1378,68 @@ Reference< drawing::XDrawPage >  SwXTextDocument::getDrawPage()
     return mxXDrawPage;
 }
 
+class SwDrawPagesObj : public cppu::WeakImplHelper<
+    css::drawing::XDrawPages,
+    css::lang::XServiceInfo>
+{
+private:
+    css::uno::Reference< css::drawing::XDrawPageSupplier > m_xDoc;
+public:
+    SwDrawPagesObj(const css::uno::Reference< css::drawing::XDrawPageSupplier >& rxDoc) : m_xDoc(rxDoc) {}
+
+    // XDrawPages
+    virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL
+        insertNewByIndex(sal_Int32 /*nIndex*/) override { throw css::lang::NoSupportException(); }
+
+    virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XDrawPage >& /*xPage*/) override
+    {
+        throw css::lang::NoSupportException();
+    }
+
+    // XIndexAccess
+    virtual sal_Int32 SAL_CALL getCount() override { return 1; }
+
+    virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
+    {
+        if (Index != 0)
+            throw css::lang::IndexOutOfBoundsException("Writer documents have only one DrawPage!");
+        return css::uno::Any(m_xDoc->getDrawPage());
+    }
+
+    // XElementAccess
+    virtual css::uno::Type SAL_CALL getElementType() override
+    {
+        SolarMutexGuard aGuard;
+        return cppu::UnoType<drawing::XDrawPage>::get();
+    }
+
+    virtual sal_Bool SAL_CALL hasElements() override { return true; }
+
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName() override
+    {
+        return OUString("SwDrawPagesObj");
+    }
+
+    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override
+    {
+        return cppu::supportsService(this, ServiceName);
+    }
+
+    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
+    {
+        return { "com.sun.star.drawing.DrawPages" };
+    }
+};
+
+// XDrawPagesSupplier
+
+uno::Reference<drawing::XDrawPages> SAL_CALL SwXTextDocument::getDrawPages()
+{
+    SolarMutexGuard aGuard;
+    return new SwDrawPagesObj(this);
+}
+
 void SwXTextDocument::Invalidate()
 {
     bObjectValid = false;
commit d09882d14eb3a36c8ba598a1920cca5af2a3ee55
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Sun Feb 4 17:26:54 2018 +0100

    lok: calc: grouping - workaround no more needed
    
    Now the dialog for selecting row/column group works fine
    
    Change-Id: I88660e8f49cf41ae45926a1d7299b1370bf54b93
    Reviewed-on: https://gerrit.libreoffice.org/49206
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
    (cherry picked from commit 915ed57850aae12aed96bc66164bb15a6131f0f8)

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ed65630bd85b..b94d79208a24 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1170,7 +1170,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         bColumns = true;
                     else if ( !GetViewData()->SimpleColMarked() && GetViewData()->SimpleRowMarked() )
                         bColumns = false;
-                    else if ( !comphelper::LibreOfficeKit::isActive() ) // TODO: handle this case in LOK too
+                    else
                     {
                         ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                         OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
commit 07a51dac6038a2debfb0b606bbe5b03ad849d5a0
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Feb 7 00:58:08 2018 +0200

    Don't crash if aArgs is empty
    
    Change-Id: I6a6495ab5729bc45a0049fcbab884752267570be
    Reviewed-on: https://gerrit.libreoffice.org/49336
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit 403d52a66085db8109024bfe07f2bfc2c4ccdc03)

diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 2898cbbd9d4d..abe9f196e525 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -40,12 +40,14 @@ using namespace ::ooo::vba;
 
 ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "ExcelDocumentContext" )
 {
-    uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
+    uno::Sequence< beans::PropertyValue > aInitArgs( aArgs.getLength() + 1 );
     aInitArgs[ 0 ].Name = "Application";
     aInitArgs[ 0 ].Value <<= getApplication();
-    aInitArgs[ 1 ].Name = "ExcelDocumentContext";
-    aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 );
-
+    if ( aArgs.getLength() > 0 )
+    {
+        aInitArgs[ 1 ].Name = "ExcelDocumentContext";
+        aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 );
+    }
     init( aInitArgs );
 }
 
commit a8a8a101eb579e46d3405cdc5bec291c69a3a24c
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Mon Feb 5 12:41:58 2018 +0100

    tdf#115394 export custom transition time in PPTX
    
    Change-Id: Ib8f4cef713895029dc18f68a07baa4b65e4260c0
    Reviewed-on: https://gerrit.libreoffice.org/49245
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit fa85592c0efba65f4a1b09fea950ec1c311bdd4c)

diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 0024254dd317..1386966717f5 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -126,6 +126,7 @@ public:
     void testTdf114848();
     void testTdf107608();
     void testTdf111786();
+    void testTdf115394();
 
     CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
@@ -177,6 +178,7 @@ public:
     CPPUNIT_TEST(testTdf114848);
     CPPUNIT_TEST(testTdf107608);
     CPPUNIT_TEST(testTdf111786);
+    CPPUNIT_TEST(testTdf115394);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -1364,6 +1366,40 @@ void SdOOXMLExportTest2::testTdf111786()
     xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest2::testTdf115394()
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
+    utl::TempFile tempFile;
+    xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+    double fTransitionDuration;
+
+    // Slow in MS formats
+    SdPage* pPage1 = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard);
+    fTransitionDuration = pPage1->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(1.0, fTransitionDuration);
+
+    // Medium in MS formats
+    SdPage* pPage2 = xDocShRef->GetDoc()->GetSdPage(1, PageKind::Standard);
+    fTransitionDuration = pPage2->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.75, fTransitionDuration);
+
+    // Fast in MS formats
+    SdPage* pPage3 = xDocShRef->GetDoc()->GetSdPage(2, PageKind::Standard);
+    fTransitionDuration = pPage3->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.5, fTransitionDuration);
+
+    // Custom values
+    SdPage* pPage4 = xDocShRef->GetDoc()->GetSdPage(3, PageKind::Standard);
+    fTransitionDuration = pPage4->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.25, fTransitionDuration);
+
+    SdPage* pPage5 = xDocShRef->GetDoc()->GetSdPage(4, PageKind::Standard);
+    fTransitionDuration = pPage5->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(4.25, fTransitionDuration);
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index c5c3ca580101..9ba23b0ac016 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -650,7 +650,42 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
     sal_Int32 advanceTiming = -1;
     sal_Int32 changeType = 0;
 
-    if (GETA(Speed))
+    sal_Int32 nTransitionDuration = -1;
+    bool isTransitionDurationSet = false;
+
+    // try to use TransitionDuration instead of old Speed property
+    if (GETA(TransitionDuration))
+    {
+        double fTransitionDuration = -1.0;
+        mAny >>= fTransitionDuration;
+        if (fTransitionDuration >= 0)
+        {
+            nTransitionDuration = fTransitionDuration * 1000.0;
+
+            // override values because in MS formats meaning of fast/medium/slow is different
+            if (nTransitionDuration <= 500)
+            {
+                // fast is default
+                speed = nullptr;
+            }
+            else if (nTransitionDuration >= 1000)
+            {
+                speed = "slow";
+            }
+            else
+            {
+                speed = "med";
+            }
+
+            bool isStandardValue = nTransitionDuration == 500
+                || nTransitionDuration == 750
+                || nTransitionDuration == 1000;
+
+            if(!isStandardValue)
+                isTransitionDurationSet = true;
+        }
+    }
+    else if (GETA(Speed))
     {
         mAny >>= animationSpeed;
 
@@ -670,50 +705,12 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
 
     if (GETA(Change))
         mAny >>= changeType;
+    bool isAdvanceTimingSet = advanceTiming != -1;
 
     // 1 means automatic, 2 half automatic - not sure what it means - at least I don't see it in UI
     if (changeType == 1 && GETA(Duration))
         mAny >>= advanceTiming;
 
-    if (nTransition14 || pPresetTransition)
-    {
-        const char* pRequiresNS = nTransition14 ? "p14" : "p15";
-
-        pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
-        pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
-
-
-        pFS->startElementNS(XML_p, XML_transition,
-                            XML_spd, speed,
-                            XML_advTm, advanceTiming != -1 ? I32S(advanceTiming*1000) : nullptr,
-                            FSEND);
-
-        if (nTransition14)
-        {
-            pFS->singleElementNS(XML_p14, nTransition14,
-                                 XML_isInverted, pInverted,
-                                 XML_dir, pDirection14,
-                                 XML_pattern, pPattern,
-                                 FSEND);
-        }
-        else if (pPresetTransition)
-        {
-            pFS->singleElementNS(XML_p15, XML_prstTrans,
-                                 XML_prst, pPresetTransition,
-                                 FSEND);
-        }
-
-        pFS->endElement(FSNS(XML_p, XML_transition));
-
-        pFS->endElement(FSNS(XML_mc, XML_Choice));
-        pFS->startElement(FSNS(XML_mc, XML_Fallback), FSEND);
-    }
-
-    pFS->startElementNS(XML_p, XML_transition,
-                        XML_spd, speed,
-                        XML_advTm, advanceTiming != -1 ? I32S(advanceTiming*1000) : nullptr,
-                        FSEND);
-
     if (!bOOXmlSpecificTransition)
     {
         switch (nPPTTransitionType)
@@ -807,6 +804,77 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
         }
     }
 
+    if (nTransition14 || pPresetTransition || isTransitionDurationSet)
+    {
+        const char* pRequiresNS = (nTransition14 || isTransitionDurationSet) ? "p14" : "p15";
+
+        pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
+        pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
+
+        if(isTransitionDurationSet && isAdvanceTimingSet)
+        {
+            pFS->startElementNS(XML_p, XML_transition,
+                XML_spd, speed,
+                XML_advTm, I32S(advanceTiming * 1000),
+                FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
+                FSEND);
+        }
+        else if(isTransitionDurationSet)
+        {
+            pFS->startElementNS(XML_p, XML_transition,
+                XML_spd, speed,
+                FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
+                FSEND);
+        }
+        else if(isAdvanceTimingSet)
+        {
+            pFS->startElementNS(XML_p, XML_transition,
+                XML_spd, speed,
+                XML_advTm, I32S(advanceTiming * 1000),
+                FSEND);
+        }
+        else
+        {
+            pFS->startElementNS(XML_p, XML_transition,
+                XML_spd, speed,
+                FSEND);
+        }
+
+        if (nTransition14)
+        {
+            pFS->singleElementNS(XML_p14, nTransition14,
+                XML_isInverted, pInverted,
+                XML_dir, pDirection14,
+                XML_pattern, pPattern,
+                FSEND);
+        }
+        else if (pPresetTransition)
+        {
+            pFS->singleElementNS(XML_p15, XML_prstTrans,
+                XML_prst, pPresetTransition,
+                FSEND);
+        }
+        else if (isTransitionDurationSet && nTransition)
+        {
+            pFS->singleElementNS(XML_p, nTransition,
+                XML_dir, pDirection,
+                XML_orient, pOrientation,
+                XML_spokes, pSpokes,
+                XML_thruBlk, pThruBlk,
+                FSEND);
+        }
+
+        pFS->endElement(FSNS(XML_p, XML_transition));
+
+        pFS->endElement(FSNS(XML_mc, XML_Choice));
+        pFS->startElement(FSNS(XML_mc, XML_Fallback), FSEND);
+    }
+
+    pFS->startElementNS(XML_p, XML_transition,
+        XML_spd, speed,
+        XML_advTm, isAdvanceTimingSet ? I32S(advanceTiming * 1000) : nullptr,
+        FSEND);
+
     if (nTransition)
     {
         pFS->singleElementNS(XML_p, nTransition,
@@ -819,7 +887,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
 
     pFS->endElementNS(XML_p, XML_transition);
 
-    if (nTransition14 || pPresetTransition)
+    if (nTransition14 || pPresetTransition || isTransitionDurationSet)
     {
         pFS->endElement(FSNS(XML_mc, XML_Fallback));
         pFS->endElement(FSNS(XML_mc, XML_AlternateContent));
commit 19473fab6061b9d433e413d20390b3cf2ab5200b
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Fri Feb 2 10:21:50 2018 +0100

    tdf#115394 import custom slide transition time in PPTX
    
    * custom values are imported correctly
    * standard (fast, slow, medium) values are changed
      to match values in the MSO
    
    Reviewed-on: https://gerrit.libreoffice.org/49139
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit a8a3e6a7fee5ac23bc2155b9391ead9402211147)
    
    Change-Id: I004242afbbf641fe414abc8df248a2844c104502

diff --git a/include/oox/ppt/slidetransition.hxx b/include/oox/ppt/slidetransition.hxx
index 8986016f30aa..5a31b158334b 100644
--- a/include/oox/ppt/slidetransition.hxx
+++ b/include/oox/ppt/slidetransition.hxx
@@ -43,7 +43,10 @@ namespace oox { namespace ppt {
         void setSlideProperties( PropertyMap& props );
         void setTransitionFilterProperties( const css::uno::Reference< css::animations::XTransitionFilter > & xFilter );
 
+        /// Set one of standard values for slide transition duration
         void setOoxTransitionSpeed( sal_Int32 nToken );
+        /// Set slide transition time directly
+        void setOoxTransitionSpeed( double fDuration );
         void setMode( bool bMode )
             { mbMode = bMode; }
         void setOoxAdvanceTime( sal_Int32 nAdvanceTime )
@@ -66,6 +69,7 @@ namespace oox { namespace ppt {
         ::sal_Int16 mnTransitionSubType;
         bool  mbTransitionDirectionNormal;
         css::presentation::AnimationSpeed mnAnimationSpeed;
+        double mfTransitionDurationInSeconds;
         bool  mbMode; /**< http://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
         ::sal_Int32 mnAdvanceTime;
     };
diff --git a/offapi/com/sun/star/presentation/DrawPage.idl b/offapi/com/sun/star/presentation/DrawPage.idl
index 18e499e81420..0e070470ad25 100644
--- a/offapi/com/sun/star/presentation/DrawPage.idl
+++ b/offapi/com/sun/star/presentation/DrawPage.idl
@@ -79,11 +79,11 @@ published service DrawPage
     [property] short Layout;
 
 
-    /** defines the speed of the fade-in effect of this page.
+    /** Defines the speed of the fade-in effect of this page.
+        @see TransitionSpeed
      */
     [property] com::sun::star::presentation::AnimationSpeed Speed;
 
-
     /** defines if a header presentation shape from the master page is visible
         on this page.
     */
@@ -142,6 +142,11 @@ published service DrawPage
     */
     [optional, property] long DateTimeFormat;
 
+    /** Specifies slide transition time in seconds.
+        @since LibreOffice 6.1
+        @see Speed
+     */
+    [property, optional] double TransitionDuration;
 };
 
 
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index e609e6709c2f..7c1555b7dc80 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -45,6 +45,7 @@ namespace oox { namespace ppt {
         , mnTransitionSubType( 0 )
         , mbTransitionDirectionNormal( true )
         , mnAnimationSpeed( AnimationSpeed_FAST )
+        , mfTransitionDurationInSeconds( -1.0 )
         , mbMode( true )
         , mnAdvanceTime( -1 )
     {
@@ -56,6 +57,7 @@ namespace oox { namespace ppt {
         , mnTransitionSubType( 0 )
         , mbTransitionDirectionNormal( true )
         , mnAnimationSpeed( AnimationSpeed_FAST )
+        , mfTransitionDurationInSeconds( -1.0 )
         , mbMode( true )
         , mnAdvanceTime( -1 )
     {
@@ -76,6 +78,8 @@ namespace oox { namespace ppt {
             aProps.setProperty( PROP_TransitionSubtype, mnTransitionSubType);
             aProps.setProperty( PROP_TransitionDirection, mbTransitionDirectionNormal);
             aProps.setProperty( PROP_Speed, mnAnimationSpeed);
+            if( mfTransitionDurationInSeconds >= 0.0 )
+                aProps.setProperty( PROP_TransitionDuration, mfTransitionDurationInSeconds);
             aProps.setProperty( PROP_TransitionFadeColor, sal_Int32(0));
             if( mnAdvanceTime != -1 ) {
                 aProps.setProperty( PROP_Duration, mnAdvanceTime/1000);
@@ -110,19 +114,21 @@ namespace oox { namespace ppt {
     {
         switch( nToken  )
         {
-            /* In case you want to use time values in second,
-             * the speed values are located in the PPT97 importer
-             * sd/source/filter/ppt/ppt97animations.cxx:664
-             * (void Ppt97Animation::UpdateCacheData() const)
+            /* the speed values are located in the PPT97 importer
+             * sd/source/filter/ppt/pptin.cxx:1783
+             * (void ImplSdPPTImport::ImportPageEffect)
              */
         case XML_fast:
             mnAnimationSpeed = AnimationSpeed_FAST;
+            mfTransitionDurationInSeconds = 0.5;
             break;
         case XML_med:
             mnAnimationSpeed = AnimationSpeed_MEDIUM;
+            mfTransitionDurationInSeconds = 0.75;
             break;
         case XML_slow:
             mnAnimationSpeed = AnimationSpeed_SLOW;
+            mfTransitionDurationInSeconds = 1.0;
             break;
         default:
             // should not happen. just ignore
@@ -130,6 +136,14 @@ namespace oox { namespace ppt {
         }
     }
 
+    void SlideTransition::setOoxTransitionSpeed( double fDurationInSeconds )
+    {
+        // for compatibility
+        mnAnimationSpeed = ( fDurationInSeconds <= 0.5 ) ? AnimationSpeed_FAST
+                                : ( fDurationInSeconds >= 1.0 ) ? AnimationSpeed_SLOW : AnimationSpeed_MEDIUM;
+        mfTransitionDurationInSeconds = fDurationInSeconds;
+    }
+
     sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType )
     {
     sal_Int16 nOdpDirection;
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
index 64d6d5942ba3..7639df7c023b 100644
--- a/oox/source/ppt/slidetransitioncontext.cxx
+++ b/oox/source/ppt/slidetransitioncontext.cxx
@@ -32,6 +32,7 @@
 #include <oox/helper/attributelist.hxx>
 #include <oox/token/namespaces.hxx>
 #include <oox/token/tokens.hxx>
+#include <oox/token/properties.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::oox::core;
@@ -50,6 +51,11 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent
     // ST_TransitionSpeed
     maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) );
 
+    // p14:dur
+    sal_Int32 nDurationInMs = rAttribs.getInteger( P14_TOKEN( dur ), -1 );
+    if( nDurationInMs > -1 )
+        maTransition.setOoxTransitionSpeed( nDurationInMs / 1000.0 );
+
     // TODO
     rAttribs.getBool( XML_advClick, true );
 
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index caab75eae4d4..e22e54acaf08 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -528,6 +528,7 @@ TopMargin
 TotalsRow
 Transformation
 TransitionDirection
+TransitionDuration
 TransitionFadeColor
 TransitionSubtype
 TransitionType
diff --git a/sd/qa/unit/data/pptx/tdf115394.pptx b/sd/qa/unit/data/pptx/tdf115394.pptx
new file mode 100644
index 000000000000..d01c90270f34
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf115394.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 7e02a30e7167..43810226e016 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -170,6 +170,7 @@ public:
     void testTdf100065();
     void testTdf114821();
     void testTdf51340();
+    void testTdf115394();
 
     bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
     void testPatternImport();
@@ -245,6 +246,7 @@ public:
     CPPUNIT_TEST(testTdf100065);
     CPPUNIT_TEST(testTdf114821);
     CPPUNIT_TEST(testTdf51340);
+    CPPUNIT_TEST(testTdf115394);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -2376,6 +2378,38 @@ void SdImportTest::testTdf51340()
     xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf115394()
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf115394.pptx"), PPTX);
+    double fTransitionDuration;
+
+    // Slow in MS formats
+    SdPage* pPage1 = xDocShRef->GetDoc()->GetSdPage(0, PageKind::Standard);
+    fTransitionDuration = pPage1->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(1.0, fTransitionDuration);
+
+    // Medium in MS formats
+    SdPage* pPage2 = xDocShRef->GetDoc()->GetSdPage(1, PageKind::Standard);
+    fTransitionDuration = pPage2->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.75, fTransitionDuration);
+
+    // Fast in MS formats
+    SdPage* pPage3 = xDocShRef->GetDoc()->GetSdPage(2, PageKind::Standard);
+    fTransitionDuration = pPage3->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.5, fTransitionDuration);
+
+    // Custom values
+    SdPage* pPage4 = xDocShRef->GetDoc()->GetSdPage(3, PageKind::Standard);
+    fTransitionDuration = pPage4->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(0.25, fTransitionDuration);
+
+    SdPage* pPage5 = xDocShRef->GetDoc()->GetSdPage(4, PageKind::Standard);
+    fTransitionDuration = pPage5->getTransitionDuration();
+    CPPUNIT_ASSERT_EQUAL(4.25, fTransitionDuration);
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/ui/inc/unoprnms.hxx b/sd/source/ui/inc/unoprnms.hxx
index 3dd438f0ec28..1e5e3b910f3e 100644
--- a/sd/source/ui/inc/unoprnms.hxx
+++ b/sd/source/ui/inc/unoprnms.hxx
@@ -33,6 +33,7 @@
 #define UNO_NAME_PAGE_NUMBER            "Number"
 #define UNO_NAME_PAGE_ORIENTATION       "Orientation"
 #define UNO_NAME_PAGE_SPEED             "Speed"
+#define UNO_NAME_PAGE_TRANSITION_DURATION  "TransitionDuration"
 #define UNO_NAME_PAGE_WIDTH             "Width"
 #define UNO_NAME_PAGE_PREVIEW           "Preview"
 #define UNO_NAME_PAGE_PREVIEWBITMAP     "PreviewBitmap"
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 10f25204c810..532d10dbb569 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -142,7 +142,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
         { OUString("TransitionSubtype"),            WID_TRANSITION_SUBTYPE, ::cppu::UnoType<sal_Int16>::get(),            0,  0},
         { OUString("TransitionDirection"),          WID_TRANSITION_DIRECTION, ::cppu::UnoType<sal_Bool>::get(),           0,  0},
         { OUString("TransitionFadeColor"),          WID_TRANSITION_FADE_COLOR, ::cppu::UnoType<sal_Int32>::get(),         0,  0},
-        { OUString("TransitionDuration"),           WID_TRANSITION_DURATION, ::cppu::UnoType<double>::get(),          0,  0},
+        { OUString(UNO_NAME_PAGE_TRANSITION_DURATION), WID_TRANSITION_DURATION, ::cppu::UnoType<double>::get(),          0,  0},
         { OUString("LoopSound"),                    WID_LOOP_SOUND, cppu::UnoType<bool>::get(),                    0, 0},
         { OUString("NavigationOrder"),              WID_NAVORDER, cppu::UnoType<css::container::XIndexAccess>::get(),0,  0},
         { OUString(), 0, css::uno::Type(), 0, 0 }
commit 39e72abedfabf476f7cd342b953feadbfecb6b02
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Feb 6 11:36:35 2018 +0100

    tdf#115218 framework: decouple HiddenForConversion from Hidden
    
    Commit 4a0f506f0d8c2a017f0cf880481d3c0c32a48909 (framework: disable
    layout manager in hidden frames, 2018-01-17) added support for bypassing
    the framework layout manager for doc conversion purposes, but the Hidden
    flag has the meaning that the doc is only initially hidden, it may be
    visible later, so reusing Hidden broke mail merge.
    
    Introduce a dedicated HiddenForConversion flag, clients interested in
    improved performance can opt in for that, and this way behavior for
    Hidden is not changing.
    
    Change-Id: If7537197900f8819f714b164c9e056b4ae69286d
    Reviewed-on: https://gerrit.libreoffice.org/49302
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 42c58f1c0ca4d310834f561f9145df340a893af1)

diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 0bf720b510ac..f9b6cac2842f 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -110,8 +110,8 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
     lArgs[4]   <<= aArg;
 
     bool bHidden
-        = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false);
-    aArg.Name = "Hidden";
+        = rDescriptor.getUnpackedValueOrDefault("HiddenForConversion", false);
+    aArg.Name = "HiddenForConversion";
     aArg.Value <<= bHidden;
     lArgs[5] <<= aArg;
 
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index e526481c709f..a00d4e56032d 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -130,7 +130,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
     bool                                  bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , false );
     bool                                  bEnableTitleBarUpdate         = lArgs.getUnpackedValueOrDefault(ARGUMENT_ENABLE_TITLEBARUPDATE        , true );
     // If the frame is explicitly requested to be hidden.
-    bool bHidden = lArgs.getUnpackedValueOrDefault("Hidden", false);
+    bool bHidden = lArgs.getUnpackedValueOrDefault("HiddenForConversion", false);
 
     // We use FrameName property to set it as API name of the new created frame later.
     // But those frame names must be different from the set of special target names as e.g. _blank, _self etcpp !
commit 09b7e860d3da756f97b8c078bb6538b0b2018683
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Feb 5 22:27:14 2018 +0300

    tdf#115132: don't move out from current cell on Backspace/Delete
    
    The behavior that cursor jumps out of current table box on Del/Backspace
    introduced in commit 80a4b3b589a516392bcf1ad932619701eb95e250 is
    not intuitive, and differs from what other word processors do.
    
    Unit test included.
    
    Reviewed-on: https://gerrit.libreoffice.org/49257
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 1692bda118f234608ccec0697f9d7b6f6bd86b6d)
    
    Change-Id: Icb53b6733f0d7394abe011fa067089e6693cf648

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 81214c0f8d02..a9f232d03a6f 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -295,6 +295,7 @@ public:
     void testTdf115065();
     void testTdf115013();
     void testTdf108048();
+    void testTdf115132();
 
     CPPUNIT_TEST_SUITE(SwUiWriterTest);
     CPPUNIT_TEST(testReplaceForward);
@@ -470,6 +471,7 @@ public:
     CPPUNIT_TEST(testTdf115065);
     CPPUNIT_TEST(testTdf115013);
     CPPUNIT_TEST(testTdf108048);
+    CPPUNIT_TEST(testTdf115132);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -5757,6 +5759,62 @@ void SwUiWriterTest::testTdf108048()
     CPPUNIT_ASSERT_EQUAL(sal_uInt16(6), nPageNumber);
 }
 
+void SwUiWriterTest::testTdf115132()
+{
+    SwDoc* pDoc = createDoc();
+    CPPUNIT_ASSERT(pDoc);
+    SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+    CPPUNIT_ASSERT(pWrtShell);
+
+    std::vector<OUString> vTestTableNames;
+
+    // Create an empty paragraph that will separate first table from the rest
+    pWrtShell->SplitNode();
+    pWrtShell->SttDoc();
+    // Create a table at the start of document body
+    SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0);
+    const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+    const SwTableFormat* pFormat = pTable->GetFrameFormat();
+    CPPUNIT_ASSERT(pFormat);
+    vTestTableNames.push_back(pFormat->GetName());
+    pWrtShell->EndDoc();
+    // Create a table after a paragraph
+    pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+    pFormat = pTable->GetFrameFormat();
+    CPPUNIT_ASSERT(pFormat);
+    vTestTableNames.push_back(pFormat->GetName());
+    // Create a table immediately after the previous
+    pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+    pFormat = pTable->GetFrameFormat();
+    CPPUNIT_ASSERT(pFormat);
+    vTestTableNames.push_back(pFormat->GetName());
+    // Create a nested table in the middle of last row
+    pWrtShell->GotoTable(vTestTableNames.back());
+    for (int i = 0; i < 4; ++i)
+        pWrtShell->GoNextCell(false);
+    pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+    pFormat = pTable->GetFrameFormat();
+    CPPUNIT_ASSERT(pFormat);
+    vTestTableNames.push_back(pFormat->GetName());
+
+    // Now check that in any cell in all tables we don't go out of a cell
+    // using Delete or Backspace. We test cases when a table is the first node;
+    // when we are in a first/middle/last cell in a row; when there's a paragraph
+    // before/after this cell; when there's another table before/after this cell;
+    // in nested table.
+    for (const auto& rTableName : vTestTableNames)
+    {
+        pWrtShell->GotoTable(rTableName);
+        do {
+            const SwStartNode* pNd = pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode();
+            pWrtShell->DelRight();
+            CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+            pWrtShell->DelLeft();
+            CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+        } while (pWrtShell->GoNextCell(false));
+    }
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 2b2c90f5ac2e..f18af272eaf3 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -22,6 +22,7 @@
 #include <editeng/lrspitem.hxx>
 #include <view.hxx>
 #include <drawbase.hxx>
+#include <unobaseclass.hxx>
 
 inline void SwWrtShell::OpenMark()
 {
@@ -176,6 +177,10 @@ long SwWrtShell::DelLeft()
 
     if( SwCursorShell::IsSttPara())
     {
+        // Start/EndAllAction to avoid cursor flickering
+        UnoActionContext c(GetDoc());
+        SwCursorShell::Push();
+
         // #i4032# Don't actually call a 'delete' if we
         // changed the table cell, compare DelRight().
         const SwStartNode * pSNdOld = pWasInTableNd ?
@@ -184,23 +189,34 @@ long SwWrtShell::DelLeft()
 
         // If the cursor is at the beginning of a paragraph, try to step
         // backwards. On failure we are done.
-        if( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) )
-            return 0;
+        bool bDoSomething = SwCursorShell::Left(1,CRSR_SKIP_CHARS);
 
-        // If the cursor entered or left a table (or both) we are done. No step
-        // back.
-        const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable();
-        if( pIsInTableNd != pWasInTableNd )
-            return 0;
+        if (bDoSomething)
+        {
+            // If the cursor entered or left a table (or both) we are done.
+            const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable();
+            bDoSomething = pIsInTableNd == pWasInTableNd;
 
-        const SwStartNode* pSNdNew = pIsInTableNd ?
-                                     GetSwCursor()->GetNode().FindTableBoxStartNode() :
-                                     nullptr;
+            if (bDoSomething)
+            {
+                const SwStartNode* pSNdNew = pIsInTableNd ?
+                    GetSwCursor()->GetNode().FindTableBoxStartNode() :
+                    nullptr;
 
-        // #i4032# Don't actually call a 'delete' if we
-        // changed the table cell, compare DelRight().
-        if ( pSNdOld != pSNdNew )
+                // #i4032# Don't actually call a 'delete' if we
+                // changed the table cell, compare DelRight().
+                bDoSomething = pSNdOld == pSNdNew;
+            }
+        }
+
+        if (!bDoSomething)
+        {
+            // tdf#115132 Restore previous position and we are done
+            SwCursorShell::Pop(SwCursorShell::PopMode::DeleteCurrent);
             return 0;
+        }
+
+        SwCursorShell::Pop(SwCursorShell::PopMode::DeleteStack);
 
         OpenMark();
         SwCursorShell::Right(1,CRSR_SKIP_CHARS);
@@ -241,8 +257,6 @@ long SwWrtShell::DelRight()
     if(nSelection & SelectionType::Text)
         nSelection = SelectionType::Text;
 
-    const SwTableNode * pWasInTableNd = nullptr;
-
     switch( nSelection & ~SelectionType::Ornament )
     {
     case SelectionType::PostIt:
@@ -277,70 +291,56 @@ long SwWrtShell::DelRight()
                 EnterStdMode();
         }
 
-        pWasInTableNd = IsCursorInTable();
-
-        if( SelectionType::Text & nSelection && SwCursorShell::IsSttPara() &&
-            SwCursorShell::IsEndPara() )
+        if (SwCursorShell::IsEndPara())
         {
-            // save cursor
-            SwCursorShell::Push();
+            // Start/EndAllAction to avoid cursor flickering
+            UnoActionContext c(GetDoc());
 
+            const SwTableNode* pWasInTableNd = IsCursorInTable();
+            // #108049# Save the startnode of the current cell
+            const SwStartNode* pSNdOld = pWasInTableNd ?
+                GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr;
+            bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara();
             bool bDelFull = false;
-            if ( SwCursorShell::Right(1,CRSR_SKIP_CHARS) )
+            bool bDoNothing = false;
+
+            // #i41424# Introduced a couple of
+            // Push()-Pop() pairs here. The reason for this is that a
+            // Right()-Left() combination does not make sure, that
+            // the cursor will be in its initial state, because there
+            // may be a numbering in front of the next paragraph.
+            SwCursorShell::Push();
+
+            if (SwCursorShell::Right(1, CRSR_SKIP_CHARS))
             {
-                const SwTableNode * pCurrTableNd = IsCursorInTable();
-                bDelFull = pCurrTableNd && pCurrTableNd != pWasInTableNd;
+                const SwTableNode* pCurrTableNd = IsCursorInTable();
+                bDelFull = bCheckDelFull && pCurrTableNd && pCurrTableNd != pWasInTableNd;
+                if (!bDelFull && (IsCursorInTable() || (pCurrTableNd != pWasInTableNd)))
+                {
+                    // #108049# Save the startnode of the current cell.
+                    // May be different to pSNdOld as we have moved.
+                    const SwStartNode* pSNdNew = pCurrTableNd ?
+                        GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr;
+
+                    // tdf#115132 Only keep cursor position instead of deleting
+                    // if we have moved to a different cell
+                    bDoNothing = pSNdOld != pSNdNew;
+                }
             }
 
             // restore cursor
             SwCursorShell::Pop(SwCursorShell::PopMode::DeleteCurrent);
 
-            if( bDelFull )
+            if (bDelFull)
             {
                 DelFullPara();
                 UpdateAttr();
-                break;
             }
+            if (bDelFull || bDoNothing)
+                break;
         }
 
         {
-            // #108049# Save the startnode of the current cell
-            const SwStartNode * pSNdOld;
-            pSNdOld = GetSwCursor()->GetNode().FindTableBoxStartNode();
-
-            if ( SwCursorShell::IsEndPara() )
-            {
-                // #i41424# Introduced a couple of
-                // Push()-Pop() pairs here. The reason for this is that a
-                // Right()-Left() combination does not make sure, that
-                // the cursor will be in its initial state, because there
-                // may be a numbering in front of the next paragraph.
-                SwCursorShell::Push();
-
-                if ( SwCursorShell::Right(1, CRSR_SKIP_CHARS) )
-                {
-                    if (IsCursorInTable() || (pWasInTableNd != IsCursorInTable()))
-                    {
-                        /** #108049# Save the startnode of the current
-                            cell. May be different to pSNdOld as we have
-                            moved. */
-                        const SwStartNode * pSNdNew = GetSwCursor()
-                            ->GetNode().FindTableBoxStartNode();
-
-                        /** #108049# Only move instead of deleting if we
-                            have moved to a different cell */
-                        if (pSNdOld != pSNdNew)
-                        {
-                            SwCursorShell::Pop();
-                            break;
-                        }
-                    }
-                }
-
-                // restore cursor
-                SwCursorShell::Pop(SwCursorShell::PopMode::DeleteCurrent);
-            }
-
             // If we are just ahead of a fieldmark, then remove it completely
             sw::mark::IFieldmark* pFm = GetCurrentFieldmark();
             if (pFm && pFm->GetMarkStart() == *GetCursor()->GetPoint())
commit b7072853d9bbcdb6aea73db0b7ac5c5a15e56ac1
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Dec 22 20:46:12 2017 +0300

    tdf#114635: Add TWAINDSM.DLL to 64-bit Windows package
    
    This patch allows us to use our own bundled TWAINDSM.dll (from
    twain-dsm project, http://www.twain.org, https://github.com/twain/twain-dsm)
    on 64-bit Windows systems that don't have their own TWAIN DLL,
    and without requiring users to install it from some other source.
    The DLL is put into INSTALLOCATION/program along soffice.bin.
    Of course, TWAIN sources still need to be 64-bit themselves (i.e.,
    true 64-bit TWAIN drivers required) to be usable by 64-bit program.
    
    Also this drops external/twain/inc/twain/twain.h, which is an old
    version copied from twain-dsm, and instead uses the tarball to get
    the header (required by Library_scn on both 32- and 64-bit Windows).
    
    Change-Id: I191027f3221ce46db17f50db91c9cb9315900810
    Reviewed-on: https://gerrit.libreoffice.org/46992
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 585d9806961342e95f7318fb947bd31e9f86dee0)

diff --git a/Makefile.fetch b/Makefile.fetch
index bf77e83b7fe8..d0f9acb71b03 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -211,6 +211,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
 		$(call fetch_Optional,RHINO,SWING_TARBALL) \
 		$(call fetch_Optional,SERF,SERF_TARBALL) \
 		$(call fetch_Optional,STAROFFICE,STAROFFICE_TARBALL) \
+		$(if $(filter WNT,$(OS)),TWAIN_DSM_TARBALL) \
 		$(call fetch_Optional,UCPP,UCPP_TARBALL) \
 		$(call fetch_Optional,VISIO,VISIO_TARBALL) \
 		$(call fetch_Optional,WPD,WPD_TARBALL) \
diff --git a/Repository.mk b/Repository.mk
index 4a6f1349bf65..ead5c18c86aa 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -939,6 +939,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
 	)) \
 	sfx2_classification \
     $(if $(filter OPENCL,$(BUILD_TYPE)),sc_opencl_runtimetest) \
+    $(if $(and $(filter WNT,$(OS)), $(filter X86_64,$(CPUNAME))),twain_dsm) \
 ))
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 9105397ae2a8..c672632af80b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -115,10 +115,16 @@ ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
 
 define gb_LinkTarget__use_sane_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(SRCDIR)/external/$(if $(filter WNT,$(OS)),twain,sane)/inc \
-	$$(INCLUDE) \
+    $(if $(filter WNT,$(OS)), \
+        -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
+        -I$(SRCDIR)/external/sane/inc) \
+    $$(INCLUDE) \
 )
 
+ifeq ($(OS),WNT)
+$(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
+endif
+
 endef
 
 else
diff --git a/download.lst b/download.lst
index 73bbfee355c5..fc9c7456b0ca 100644
--- a/download.lst
+++ b/download.lst
@@ -230,6 +230,8 @@ export STAROFFICE_VERSION_MICRO := 5
 export STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz
 export SWING_SHA256SUM := 64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
 export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+export TWAIN_DSM_SHA256SUM := 82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6
+export TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
 export UCPP_SHA256SUM := 983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
 export VISIO_SHA256SUM := fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 59c709838e0f..41b895751d82 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,RHINO,rhino) \
 	$(call gb_Helper_optional,SERF,serf) \
 	$(call gb_Helper_optional,STAROFFICE,libstaroffice) \
+	$(if $(filter WNT,$(OS)),twain_dsm) \
 	$(call gb_Helper_optional,UCPP,ucpp) \
 	$(call gb_Helper_optional,VISIO,libvisio) \
 	$(call gb_Helper_optional,WPD,libwpd) \
diff --git a/external/twain/README b/external/twain/README
deleted file mode 100644
index 5d45a5009e98..000000000000
--- a/external/twain/README
+++ /dev/null
@@ -1 +0,0 @@
-Windows scanner support.
diff --git a/external/twain/inc/twain/twain.h b/external/twain/inc/twain/twain.h
deleted file mode 100644
index e78fcdb4c6db..000000000000
--- a/external/twain/inc/twain/twain.h
+++ /dev/null
@@ -1,2289 +0,0 @@
-/* This comment added at LibrOffice:
-
-   This file is covered by the "TWAIN License", at the time of this
-   writing in http://www.twain.org/devfiles/readme.txt, which says:
-
-   The TWAIN Working Group grants customer ("Customer") the worldwide,
-   royalty-free, non-exclusive license to reproduce and distribute the
-   software and documentation of the TWAIN toolkit ("TWAIN
-   Toolkit"). The TWAIN Toolkit was designed to be used by third
-   parties to assist them in becoming compliant with the TWAIN
-   standard, but it has not been developed to the standards of a
-   commercial product. Consequently, the TWAIN toolkit is provided AS
-   IS without any warranty. THE TWAIN Working Group disclaims all
-   warranties in the TWAIN toolkit whether implied, express or
-   statutory, including, without limitation, the implied warranties of
-   merchantability, noninfringement of third party rights and fitness
-   for a particular purpose. The TWAIN Working Group disclaims all
-   liability for damages, whether direct, indirect, special,
-   incidental, or consequential, arising from the reproduction,
-   distribution, modification, or other use of the TWAIN Toolkit.
-
-   As a condition of this license, Customer agrees to include in
-   software programs based in whole or in part on the TWAIN Toolkit
-   the following provisions in (i) the header or similar file in such
-   software and (ii) prominently in its documentation and to require
-   its sublicensees to include these provisions in similar locations:
-   The TWAIN Toolkit is distributed as is. The developer and
-   distributors of the TWAIN Toolkit expressly disclaim all implied,
-   express or statutory warranties including, without limitation, the
-   implied warranties of merchantability, noninfringement of third
-   party rights and fitness for a particular purpose. Neither the
-   developers nor the distributors will be liable for damages, whether
-   direct, indirect, special, incidental, or consequential, as a
-   result of the reproduction, modification, distribution or other use
-   of the TWAIN Toolkit.
-*/
-
-/* ======================================================================== *\
-
-  Copyright (C) 2007 TWAIN Working Group: Adobe Systems Incorporated,
-  AnyDoc Software Inc., Eastman Kodak Company, Fujitsu Computer Products
-  of America, JFL Peripheral Solutions Inc., Ricoh Corporation, and
-  Xerox Corporation.  All rights reserved.
-
-  Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak,
-  Hewlett-Packard and Logitech Corporations.  All rights reserved.
-
-  Copyright (C) 1997 TWAIN Working Group: Bell+Howell, Canon, DocuMagix,
-  Fujitsu, Genoa Technology, Hewlett-Packard, Kofax Imaging Products, and
-  Ricoh Corporation.  All rights reserved.
-
-  Copyright (C) 1998 TWAIN Working Group: Adobe Systems Incorporated,
-  Canon Information Systems, Eastman Kodak Company,
-  Fujitsu Computer Products of America, Genoa Technology,
-  Hewlett-Packard Company, Intel Corporation, Kofax Image Products,
-  JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.
-  All rights reserved.
-
-  Copyright (C) 2000 TWAIN Working Group: Adobe Systems Incorporated,
-  Canon Information Systems, Digimarc Corporation, Eastman Kodak Company,
-  Fujitsu Computer Products of America, Hewlett-Packard Company,
-  JFL Peripheral Solutions Inc., Ricoh Corporation, and Xerox Corporation.
-  All rights reserved.
-
-
-  TWAIN.h -  This is the definitive include file for applications and
-          data sources written to the TWAIN specification.
-          It defines constants, data structures, messages etc.
-          for the public interface to TWAIN.
-
-  Revision History:
-    version 1.0, March 6, 1992.  TWAIN 1.0.
-    version 1.1, January 1993.   Tech Notes 1.1
-    version 1.5, June 1993.      Specification Update 1.5
-                                 Change DC to TW
-                                 Change filename from DC.H to TWAIN.H
-    version 1.5, July 1993.      Remove spaces from country identifiers
-
-    version 1.7, July 1997       Added Capabilities and data structure for
-                                 document imaging and digital cameras.
-                                 KHL.
-    version 1.7, July 1997       Inserted Borland compatibile structure packing
-                                 directives provided by Mentor.  JMH
-    version 1.7, Aug 1997        Expanded file tabs to spaces.
-                                 NOTE: future authors should be sure to have
-                                 their editors set to automatically expand tabs
-                                 to spaces (original tab setting was 4 spaces).
-    version 1.7, Sept 1997       Added job control values
-                                 Added return codes
-    version 1.7, Sept 1997       changed definition of pRGBRESPONSE to
-                                 pTW_RGBRESPONSE
-    version 1.7  Aug 1998        Added missing TWEI_BARCODEROTATION values
-                                 TWBCOR_ types JMH
-    version 1.8  August 1998     Added new types and definitions required
-                                 for 1.8 Specification JMH
-    version 1.8  January 1999    Changed search mode from SRCH_ to TWBD_ as
-                                 in 1.8 Specification, added TWBT_MAXICODE JMH
-    version 1.8  January 1999    Removed undocumented duplicate AUTO<cap> JMH
-    version 1.8  March 1999      Removed undocumented 1.8 caps:
-                                 CAP_FILESYSTEM
-                                 CAP_PAPERBINDING
-                                 CAP_PASSTHRU
-                                 CAP_POWERDOWNTIME
-                                 ICAP_AUTODISCARDBLANKPAGES
-                               * CAP_PAGEMULTIPLEACQUIRE - is CAP_REACQUIREALLOWED,
-                               requires spec change.  JMH
-                                 Added Mac structure packing modifications JMH
-    version 1.9  March 2000  Added new types and definations required
-                             for 1.9 Specification MLM
-    version 1.9  March 2000  Added ICAP_JPEGQUALITY, TWJQ_ values,
-                                 updated TWON_PROTOCOLMINOR for Release v1.9 MN
-    version 1.91 August 2007     Added new types and definitions required
-                                 for 1.91 Specification MLM
-    version 2.0  Sept 2007       Added new types and definitions required
-                                 for 2.0 Specification FHH
-    version 2.0  Mar 2008        Depreciated ICAP_PIXELTYPEs TWPT_SRGB64, TWPT_BGR,
-                                 TWPT_CIELAB, TWPT_CIELUV, and TWPT_YCBCR  JMW
-    version 2.0  Mar 2008        Added missing new 2.0 CAP_ definitions JMW
-    version 2.0  Dec 2008        Updated TW_INFO structure for 64bit JMW
-    version 2.1  Mar 2009        Added new types and definitions required
-                                 for 2.1 Specification JMW
-    version 2.2  Nov 2010        Added new types and definitions required
-                                 for 2.2 Specification MSM
-    version 2.3  Feb 2013        Added new types and definitions required
-                                 for 2.3 Specification MLM
-\* ======================================================================== */
-
-#ifndef TWAIN
-#define TWAIN
-
-/****************************************************************************
- * TWAIN Version                                                            *
- ****************************************************************************/
-#define TWON_PROTOCOLMINOR   3        /* Changed for Version 2.3            */
-#define TWON_PROTOCOLMAJOR   2
-
-/****************************************************************************
- * Platform Dependent Definitions and Typedefs                              *
- ****************************************************************************/
-
-/*
- * Mingw32 may be detected as both GNUC or WIN32/64 so try
- * to detect it early and override both GNU and MS.
- */
-#if defined(__MINGW32__)
-    #define TWH_CMP_MING32
-#endif
-
-/* Microsoft C/C++ Compiler */
-#if defined(WIN32) || defined(WIN64) || defined (_WINDOWS)
-    #define TWH_CMP_MSC
-    #if  defined(_WIN64) || defined(WIN64)
-      #define TWH_64BIT
-    #elif defined(WIN32) || defined(_WIN32)
-      #define TWH_32BIT
-    #endif
-
-/* GNU C/C++ Compiler */
-#elif defined(__GNUC__)
-    #define TWH_CMP_GNU
-    #if defined(__alpha__)\
-        ||defined(__ia64__)\
-        ||defined(__ppc64__)\
-        ||defined(__s390x__)\
-        ||(defined(__sparc_v9__) && defined(__arch64__))\
-        ||defined(__sparcv9)\
-        ||defined(__x86_64__)
-      #define TWH_64BIT
-    #else
-      #define TWH_32BIT
-    #endif
-
-
-/* Borland C/C++ Compiler */
-#elif defined(__BORLAND__)
-    #define TWH_CMP_BORLAND
-    #define TWH_32BIT
-/* Unrecognized */
-#else
-    #error Unrecognized compiler
-#endif
-
-/* Apple Compiler (which is GNU now) */
-#if defined(__APPLE__)
-  #define TWH_CMP_XCODE
-  #ifdef __MWERKS__
-    #include <Carbon.h>
-  #else
-    #include <Carbon/Carbon.h>
-  #endif
-#endif
-
-/* Win32 and Win64 systems */
-#if defined(TWH_CMP_MSC) | defined(TWH_CMP_BORLAND)
-    typedef HANDLE  TW_HANDLE;
-    typedef LPVOID  TW_MEMREF;
-    typedef UINT_PTR TW_UINTPTR;
-
-/* MacOS/X... */
-#elif defined(TWH_CMP_XCODE)
-    #define PASCAL   pascal
-    #define FAR
-    typedef Handle   TW_HANDLE;
-    typedef char    *TW_MEMREF;
-    typedef unsigned char BYTE;
-
-    #ifdef TWH_32BIT
-      //32 bit GNU
-      typedef unsigned long      TW_UINTPTR;
-    #else
-      //64 bit GNU
-      typedef unsigned long long TW_UINTPTR;
-    #endif
-
-/* Everything else... */
-#else
-    #define PASCAL
-    #define FAR
-    typedef void* TW_HANDLE;
-    typedef void* TW_MEMREF;
-    typedef unsigned char BYTE;
-
-    #ifdef TWH_32BIT
-      //32 bit GNU
-      typedef unsigned long      TW_UINTPTR;
-    #else
-      //64 bit GNU
-      typedef unsigned long long TW_UINTPTR;
-    #endif
-#endif
-
-
-/* Set the packing: this occurs before any structures are defined */
-#if defined(TWH_CMP_MING32)
-    #pragma pack (push, 2)
-#elif defined(TWH_CMP_MSC)
-    #pragma pack (push, before_twain)
-    #pragma pack (2)
-#elif defined(TWH_CMP_GNU)
-    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-        #pragma options align = power
-    #else
-        #pragma pack (push, before_twain)
-        #pragma pack (2)
-    #endif
-#elif defined(TWH_CMP_BORLAND)
-    #pragma option -a2
-#endif
-
-
-/****************************************************************************
- * Type Definitions                                                         *
- ****************************************************************************/
-
-/* String types. These include room for the strings and a NULL char,     *
- * or, on the Mac, a length byte followed by the string.                 *
- * TW_STR255 must hold less than 256 chars so length fits in first byte. */
-#if defined(__APPLE__)/* cf: Mac version of TWAIN.h */
-    typedef unsigned char TW_STR32[34],     FAR *pTW_STR32;
-    typedef unsigned char TW_STR64[66],     FAR *pTW_STR64;
-    typedef unsigned char TW_STR128[130],   FAR *pTW_STR128;
-    typedef unsigned char TW_STR255[256],   FAR *pTW_STR255;
-#else
-    typedef char          TW_STR32[34],     FAR *pTW_STR32;
-    typedef char          TW_STR64[66],     FAR *pTW_STR64;
-    typedef char          TW_STR128[130],   FAR *pTW_STR128;
-    typedef char          TW_STR255[256],   FAR *pTW_STR255;
-#endif
-
-/* Numeric types. */
-typedef char           	  TW_INT8,          FAR *pTW_INT8;
-typedef short          	  TW_INT16,         FAR *pTW_INT16;
-#if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-    typedef int           TW_INT32,         FAR *pTW_INT32;
-#else
-    typedef long          TW_INT32,         FAR *pTW_INT32;
-#endif
-typedef unsigned char     TW_UINT8,         FAR *pTW_UINT8;
-typedef unsigned short    TW_UINT16,        FAR *pTW_UINT16;
-#if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-    typedef unsigned int  TW_UINT32,        FAR *pTW_UINT32;
-#else
-    typedef unsigned long TW_UINT32,        FAR *pTW_UINT32;
-#endif
-typedef unsigned short    TW_BOOL,          FAR *pTW_BOOL;
-
-
-/****************************************************************************
- * Structure Definitions                                                    *
- ****************************************************************************/
-
-/* Fixed point structure type. */
-typedef struct {
-    TW_INT16     Whole;
-    TW_UINT16    Frac;
-} TW_FIX32,  FAR *pTW_FIX32;
-
-/* Defines a frame rectangle in ICAP_UNITS coordinates. */
-typedef struct {
-   TW_FIX32   Left;
-   TW_FIX32   Top;
-   TW_FIX32   Right;
-   TW_FIX32   Bottom;
-} TW_FRAME, FAR * pTW_FRAME;
-
-/* Defines the parameters used for channel-specific transformation. */
-typedef struct {
-   TW_FIX32   StartIn;
-   TW_FIX32   BreakIn;
-   TW_FIX32   EndIn;
-   TW_FIX32   StartOut;
-   TW_FIX32   BreakOut;
-   TW_FIX32   EndOut;
-   TW_FIX32   Gamma;
-   TW_FIX32   SampleCount;
-} TW_DECODEFUNCTION, FAR * pTW_DECODEFUNCTION;
-
-/* Stores a Fixed point number in two parts, a whole and a fractional part. */
-typedef struct {
-   TW_DECODEFUNCTION   Decode[3];
-   TW_FIX32            Mix[3][3];
-} TW_TRANSFORMSTAGE, FAR * pTW_TRANSFORMSTAGE;
-
-/* Container for array of values */
-typedef struct {
-   TW_UINT16  ItemType;
-   TW_UINT32  NumItems;
-   TW_UINT8   ItemList[1];
-} TW_ARRAY, FAR * pTW_ARRAY;
-
-/* Information about audio data */
-typedef struct {
-   TW_STR255  Name;
-   TW_UINT32  Reserved;
-} TW_AUDIOINFO, FAR * pTW_AUDIOINFO;
-
-/* Used to register callbacks. */
-typedef struct  {
-    TW_MEMREF      CallBackProc;
-    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-        TW_MEMREF  RefCon;
-    #else
-        TW_UINT32  RefCon;
-    #endif
-    TW_INT16       Message;
-} TW_CALLBACK, FAR * pTW_CALLBACK;
-
-/* Used to register callbacks. */
-typedef struct  {
-    TW_MEMREF   CallBackProc;
-    TW_UINTPTR  RefCon;
-    TW_INT16    Message;
-} TW_CALLBACK2, FAR * pTW_CALLBACK2;
-
-/* Used by application to get/set capability from/in a data source. */
-typedef struct {
-   TW_UINT16  Cap;
-   TW_UINT16  ConType;
-   TW_HANDLE  hContainer;
-} TW_CAPABILITY, FAR * pTW_CAPABILITY;
-
-/* Defines a CIE XYZ space tri-stimulus value. */
-typedef struct {
-   TW_FIX32   X;
-   TW_FIX32   Y;
-   TW_FIX32   Z;
-} TW_CIEPOINT, FAR * pTW_CIEPOINT;
-
-/* Defines the mapping from an RGB color space device into CIE 1931 (XYZ) color space. */
-typedef struct {
-   TW_UINT16           ColorSpace;
-   TW_INT16            LowEndian;
-   TW_INT16            DeviceDependent;
-   TW_INT32            VersionNumber;
-   TW_TRANSFORMSTAGE   StageABC;
-   TW_TRANSFORMSTAGE   StageLMN;
-   TW_CIEPOINT         WhitePoint;
-   TW_CIEPOINT         BlackPoint;
-   TW_CIEPOINT         WhitePaper;
-   TW_CIEPOINT         BlackInk;
-   TW_FIX32            Samples[1];
-} TW_CIECOLOR, FAR * pTW_CIECOLOR;
-
-/* Allows for a data source and application to pass custom data to each other. */
-typedef struct {
-    TW_UINT32  InfoLength;
-    TW_HANDLE  hData;
-}TW_CUSTOMDSDATA, FAR *pTW_CUSTOMDSDATA;
-
-/* Provides information about the Event that was raised by the Source */
-typedef struct {
-   TW_UINT32  Event;
-   TW_STR255  DeviceName;
-   TW_UINT32  BatteryMinutes;
-   TW_INT16   BatteryPercentage;
-   TW_INT32   PowerSupply;
-   TW_FIX32   XResolution;
-   TW_FIX32   YResolution;
-   TW_UINT32  FlashUsed2;
-   TW_UINT32  AutomaticCapture;
-   TW_UINT32  TimeBeforeFirstCapture;
-   TW_UINT32  TimeBetweenCaptures;
-} TW_DEVICEEVENT, FAR * pTW_DEVICEEVENT;
-
-/* This structure holds the tri-stimulus color palette information for TW_PALETTE8 structures.*/
-typedef struct {
-   TW_UINT8    Index;
-   TW_UINT8    Channel1;
-   TW_UINT8    Channel2;
-   TW_UINT8    Channel3;
-} TW_ELEMENT8, FAR * pTW_ELEMENT8;
-
-/* Stores a group of individual values describing a capability. */
-typedef struct {
-   TW_UINT16  ItemType;
-   TW_UINT32  NumItems;
-   TW_UINT32  CurrentIndex;
-   TW_UINT32  DefaultIndex;
-   TW_UINT8   ItemList[1];
-} TW_ENUMERATION, FAR * pTW_ENUMERATION;
-
-/* Used to pass application events/messages from the application to the Source. */
-typedef struct {
-   TW_MEMREF  pEvent;
-   TW_UINT16  TWMessage;
-} TW_EVENT, FAR * pTW_EVENT;
-
-/* This structure is used to pass specific information between the data source and the application. */
-typedef struct {
-    TW_UINT16   InfoID;
-    TW_UINT16   ItemType;
-    TW_UINT16   NumItems;
-    union {
-        TW_UINT16   ReturnCode;
-        TW_UINT16   CondCode; // Deprecated, do not use
-    };
-    TW_UINTPTR  Item;
-}TW_INFO, FAR* pTW_INFO;
-
-typedef struct {
-    TW_UINT32   NumInfos;
-    TW_INFO     Info[1];
-}TW_EXTIMAGEINFO, FAR* pTW_EXTIMAGEINFO;
-
-/* Provides information about the currently selected device */
-typedef struct {
-   TW_STR255  InputName;
-   TW_STR255  OutputName;
-   TW_MEMREF  Context;
-   union {
-	 int 	    Recursive;
-	 TW_BOOL	Subdirectories;
-   };
-   union {
-	 TW_INT32 	FileType;
-	 TW_UINT32	FileSystemType;
-   };
-   TW_UINT32  Size;
-   TW_STR32   CreateTimeDate;
-   TW_STR32   ModifiedTimeDate;
-   TW_UINT32  FreeSpace;
-   TW_INT32   NewImageSize;
-   TW_UINT32  NumberOfFiles;
-   TW_UINT32  NumberOfSnippets;
-   TW_UINT32  DeviceGroupMask;
-   TW_INT8    Reserved[508];
-} TW_FILESYSTEM, FAR * pTW_FILESYSTEM;
-
-/* This structure is used by the application to specify a set of mapping values to be applied to grayscale data. */
-typedef struct {
-   TW_ELEMENT8         Response[1];
-} TW_GRAYRESPONSE, FAR * pTW_GRAYRESPONSE;
-
-/* A general way to describe the version of software that is running. */
-typedef struct {
-   TW_UINT16  MajorNum;
-   TW_UINT16  MinorNum;
-   TW_UINT16  Language;
-   TW_UINT16  Country;
-   TW_STR32   Info;
-} TW_VERSION, FAR * pTW_VERSION;
-
-/* Provides identification information about a TWAIN entity.*/
-typedef struct {
-    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-        TW_MEMREF  Id;
-    #else
-        TW_UINT32  Id;
-    #endif
-    TW_VERSION 	   Version;
-    TW_UINT16  	   ProtocolMajor;
-    TW_UINT16  	   ProtocolMinor;
-    TW_UINT32  	   SupportedGroups;
-    TW_STR32   	   Manufacturer;
-    TW_STR32   	   ProductFamily;
-    TW_STR32   	   ProductName;
-} TW_IDENTITY, FAR * pTW_IDENTITY;
-
-/* Describes the "real" image data, that is, the complete image being transferred between the Source and application. */
-typedef struct {
-   TW_FIX32   XResolution;
-   TW_FIX32   YResolution;
-   TW_INT32   ImageWidth;
-   TW_INT32   ImageLength;
-   TW_INT16   SamplesPerPixel;
-   TW_INT16   BitsPerSample[8];
-   TW_INT16   BitsPerPixel;
-   TW_BOOL    Planar;
-   TW_INT16   PixelType;
-   TW_UINT16  Compression;
-} TW_IMAGEINFO, FAR * pTW_IMAGEINFO;
-
-/* Involves information about the original size of the acquired image. */
-typedef struct {
-   TW_FRAME   Frame;
-   TW_UINT32  DocumentNumber;
-   TW_UINT32  PageNumber;
-   TW_UINT32  FrameNumber;
-} TW_IMAGELAYOUT, FAR * pTW_IMAGELAYOUT;
-
-/* Provides information for managing memory buffers. */
-typedef struct {
-   TW_UINT32  Flags;
-   TW_UINT32  Length;
-   TW_MEMREF  TheMem;
-} TW_MEMORY, FAR * pTW_MEMORY;
-
-/* Describes the form of the acquired data being passed from the Source to the application.*/
-typedef struct {
-   TW_UINT16  Compression;
-   TW_UINT32  BytesPerRow;
-   TW_UINT32  Columns;
-   TW_UINT32  Rows;
-   TW_UINT32  XOffset;
-   TW_UINT32  YOffset;
-   TW_UINT32  BytesWritten;
-   TW_MEMORY  Memory;
-} TW_IMAGEMEMXFER, FAR * pTW_IMAGEMEMXFER;
-
-/* Describes the information necessary to transfer a JPEG-compressed image. */
-typedef struct {
-   TW_UINT16   ColorSpace;
-   TW_UINT32   SubSampling;
-   TW_UINT16   NumComponents;
-   TW_UINT16   RestartFrequency;
-   TW_UINT16   QuantMap[4];
-   TW_MEMORY   QuantTable[4];
-   TW_UINT16   HuffmanMap[4];
-   TW_MEMORY   HuffmanDC[2];
-   TW_MEMORY   HuffmanAC[2];
-} TW_JPEGCOMPRESSION, FAR * pTW_JPEGCOMPRESSION;
-
-/* Stores a single value (item) which describes a capability. */
-typedef struct {
-   TW_UINT16  ItemType;
-   TW_UINT32  Item;
-} TW_ONEVALUE, FAR * pTW_ONEVALUE;
-
-/* This structure holds the color palette information. */
-typedef struct {
-   TW_UINT16    NumColors;
-   TW_UINT16    PaletteType;
-   TW_ELEMENT8  Colors[256];
-} TW_PALETTE8, FAR * pTW_PALETTE8;
-
-/* Used to bypass the TWAIN protocol when communicating with a device */
-typedef struct {
-   TW_MEMREF  pCommand;
-   TW_UINT32  CommandBytes;
-   TW_INT32   Direction;
-   TW_MEMREF  pData;
-   TW_UINT32  DataBytes;
-   TW_UINT32  DataBytesXfered;
-} TW_PASSTHRU, FAR * pTW_PASSTHRU;
-
-/* This structure tells the application how many more complete transfers the Source currently has available. */
-typedef struct {
-   TW_UINT16 Count;
-   union {
-       TW_UINT32 EOJ;
-       TW_UINT32 Reserved;
-       #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
-           union {
-               TW_UINT32 EOJ;
-               TW_UINT32 Reserved;
-           } TW_JOBCONTROL;
-       #endif
-   };
-} TW_PENDINGXFERS, FAR *pTW_PENDINGXFERS;
-
-/* Stores a range of individual values describing a capability. */
-typedef struct {
-   TW_UINT16  ItemType;
-   TW_UINT32  MinValue;
-   TW_UINT32  MaxValue;
-   TW_UINT32  StepSize;
-   TW_UINT32  DefaultValue;
-   TW_UINT32  CurrentValue;
-} TW_RANGE, FAR * pTW_RANGE;
-
-/* This structure is used by the application to specify a set of mapping values to be applied to RGB color data. */
-typedef struct {
-   TW_ELEMENT8         Response[1];
-} TW_RGBRESPONSE, FAR * pTW_RGBRESPONSE;
-
-/* Describes the file format and file specification information for a transfer through a disk file. */
-typedef struct {
-   TW_STR255 FileName;
-   TW_UINT16 Format;
-   TW_INT16  VRefNum;
-} TW_SETUPFILEXFER, FAR * pTW_SETUPFILEXFER;
-
-/* Provides the application information about the Source's requirements and preferences regarding allocation of transfer buffer(s). */
-typedef struct {
-   TW_UINT32 MinBufSize;
-   TW_UINT32 MaxBufSize;
-   TW_UINT32 Preferred;
-} TW_SETUPMEMXFER, FAR * pTW_SETUPMEMXFER;
-
-/* Describes the status of a source. */
-typedef struct {
-   TW_UINT16  ConditionCode;
-   union {
-     TW_UINT16  Data;
-     TW_UINT16  Reserved;
-   };
-} TW_STATUS, FAR * pTW_STATUS;
-
-/* Translates the contents of Status into a localized UTF8string. */
-typedef struct {
-   TW_STATUS    Status;
-   TW_UINT32    Size;
-   TW_HANDLE    UTF8string;
-} TW_STATUSUTF8, FAR * pTW_STATUSUTF8;
-
-/* This structure is used to handle the user interface coordination between an application and a Source. */
-typedef struct {
-   TW_BOOL    ShowUI;
-   TW_BOOL    ModalUI;
-   TW_HANDLE  hParent;
-} TW_USERINTERFACE, FAR * pTW_USERINTERFACE;
-
-
-/****************************************************************************
- * Generic Constants                                                        *
- ****************************************************************************/
-
-#define TWON_ARRAY           3
-#define TWON_ENUMERATION     4
-#define TWON_ONEVALUE        5
-#define TWON_RANGE           6
-
-#define TWON_ICONID          962
-#define TWON_DSMID           461
-#define TWON_DSMCODEID       63
-
-#define TWON_DONTCARE8       0xff
-#define TWON_DONTCARE16      0xffff
-#define TWON_DONTCARE32      0xffffffff
-
-/* Flags used in TW_MEMORY structure. */
-#define TWMF_APPOWNS     0x0001
-#define TWMF_DSMOWNS     0x0002
-#define TWMF_DSOWNS      0x0004
-#define TWMF_POINTER     0x0008
-#define TWMF_HANDLE      0x0010
-
-#define TWTY_INT8        0x0000
-#define TWTY_INT16       0x0001
-#define TWTY_INT32       0x0002
-
-#define TWTY_UINT8       0x0003
-#define TWTY_UINT16      0x0004
-#define TWTY_UINT32      0x0005
-
-#define TWTY_BOOL        0x0006
-
-#define TWTY_FIX32       0x0007
-
-#define TWTY_FRAME       0x0008
-
-#define TWTY_STR32       0x0009
-#define TWTY_STR64       0x000a
-#define TWTY_STR128      0x000b
-#define TWTY_STR255      0x000c
-#define TWTY_HANDLE      0x000f
-
-
-/****************************************************************************
- * Capability Constants                                                     *
- ****************************************************************************/
-
-/* CAP_ALARMS values */
-#define TWAL_ALARM               0
-#define TWAL_FEEDERERROR         1
-#define TWAL_FEEDERWARNING       2
-#define TWAL_BARCODE             3
-#define TWAL_DOUBLEFEED          4
-#define TWAL_JAM                 5
-#define TWAL_PATCHCODE           6
-#define TWAL_POWER               7
-#define TWAL_SKEW                8
-
-/* ICAP_AUTOSIZE values */
-#define TWAS_NONE                0
-#define TWAS_AUTO                1
-#define TWAS_CURRENT             2
-
-/* TWEI_BARCODEROTATION values */
-#define TWBCOR_ROT0              0
-#define TWBCOR_ROT90             1
-#define TWBCOR_ROT180            2
-#define TWBCOR_ROT270            3
-#define TWBCOR_ROTX              4
-
-/* ICAP_BARCODESEARCHMODE values */
-#define TWBD_HORZ                0
-#define TWBD_VERT                1
-#define TWBD_HORZVERT            2
-#define TWBD_VERTHORZ            3
-
-/* ICAP_BITORDER values */
-#define TWBO_LSBFIRST            0
-#define TWBO_MSBFIRST            1
-
-/* ICAP_AUTODISCARDBLANKPAGES values */
-#define TWBP_DISABLE            -2
-#define TWBP_AUTO               -1
-
-/* ICAP_BITDEPTHREDUCTION values */
-#define TWBR_THRESHOLD           0
-#define TWBR_HALFTONE            1
-#define TWBR_CUSTHALFTONE        2
-#define TWBR_DIFFUSION           3
-#define TWBR_DYNAMICTHRESHOLD    4
-
-/* ICAP_SUPPORTEDBARCODETYPES and TWEI_BARCODETYPE values*/
-#define TWBT_3OF9                 0
-#define TWBT_2OF5INTERLEAVED      1
-#define TWBT_2OF5NONINTERLEAVED   2
-#define TWBT_CODE93               3
-#define TWBT_CODE128              4
-#define TWBT_UCC128               5
-#define TWBT_CODABAR              6
-#define TWBT_UPCA                 7
-#define TWBT_UPCE                 8
-#define TWBT_EAN8                 9
-#define TWBT_EAN13                10
-#define TWBT_POSTNET              11
-#define TWBT_PDF417               12
-#define TWBT_2OF5INDUSTRIAL       13
-#define TWBT_2OF5MATRIX           14
-#define TWBT_2OF5DATALOGIC        15
-#define TWBT_2OF5IATA             16
-#define TWBT_3OF9FULLASCII        17
-#define TWBT_CODABARWITHSTARTSTOP 18
-#define TWBT_MAXICODE             19
-#define TWBT_QRCODE               20
-
-/* ICAP_COMPRESSION values*/
-#define TWCP_NONE                0
-#define TWCP_PACKBITS            1
-#define TWCP_GROUP31D            2
-#define TWCP_GROUP31DEOL         3
-#define TWCP_GROUP32D            4
-#define TWCP_GROUP4              5
-#define TWCP_JPEG                6
-#define TWCP_LZW                 7
-#define TWCP_JBIG                8
-#define TWCP_PNG                 9
-#define TWCP_RLE4               10
-#define TWCP_RLE8               11
-#define TWCP_BITFIELDS          12
-#define TWCP_ZIP                13
-#define TWCP_JPEG2000           14
-
-/* CAP_CAMERASIDE and TWEI_PAGESIDE values */
-#define TWCS_BOTH                0
-#define TWCS_TOP                 1
-#define TWCS_BOTTOM              2
-
-/* CAP_CLEARBUFFERS values */
-#define TWCB_AUTO                0
-#define TWCB_CLEAR               1
-#define TWCB_NOCLEAR             2
-
-/* CAP_DEVICEEVENT values */
-#define TWDE_CUSTOMEVENTS           0x8000
-#define TWDE_CHECKAUTOMATICCAPTURE  0
-#define TWDE_CHECKBATTERY           1
-#define TWDE_CHECKDEVICEONLINE      2
-#define TWDE_CHECKFLASH             3
-#define TWDE_CHECKPOWERSUPPLY       4
-#define TWDE_CHECKRESOLUTION        5
-#define TWDE_DEVICEADDED            6
-#define TWDE_DEVICEOFFLINE          7
-#define TWDE_DEVICEREADY            8
-#define TWDE_DEVICEREMOVED          9
-#define TWDE_IMAGECAPTURED          10
-#define TWDE_IMAGEDELETED           11
-#define TWDE_PAPERDOUBLEFEED        12
-#define TWDE_PAPERJAM               13
-#define TWDE_LAMPFAILURE            14
-#define TWDE_POWERSAVE              15
-#define TWDE_POWERSAVENOTIFY        16
-
-/* TW_PASSTHRU.Direction values. */
-#define TWDR_GET                 1
-#define TWDR_SET                 2
-
-/* TWEI_DESKEWSTATUS values. */
-#define TWDSK_SUCCESS            0
-#define TWDSK_REPORTONLY         1
-#define TWDSK_FAIL               2
-#define TWDSK_DISABLED           3
-
-/* CAP_DUPLEX values */
-#define TWDX_NONE                0
-#define TWDX_1PASSDUPLEX         1
-#define TWDX_2PASSDUPLEX         2
-
-/* CAP_FEEDERALIGNMENT values */
-#define TWFA_NONE                0
-#define TWFA_LEFT                1
-#define TWFA_CENTER              2
-#define TWFA_RIGHT               3
-
-/* ICAP_FEEDERTYPE values*/
-#define TWFE_GENERAL             0
-#define TWFE_PHOTO               1
-
-/* ICAP_IMAGEFILEFORMAT values */
-#define TWFF_TIFF                0
-#define TWFF_PICT                1
-#define TWFF_BMP                 2
-#define TWFF_XBM                 3
-#define TWFF_JFIF                4
-#define TWFF_FPX                 5
-#define TWFF_TIFFMULTI           6
-#define TWFF_PNG                 7
-#define TWFF_SPIFF               8
-#define TWFF_EXIF                9
-#define TWFF_PDF                10
-#define TWFF_JP2                11
-#define TWFF_JPX                13
-#define TWFF_DEJAVU             14
-#define TWFF_PDFA               15
-#define TWFF_PDFA2              16
-
-/* ICAP_FLASHUSED2 values */
-#define TWFL_NONE                0
-#define TWFL_OFF                 1
-#define TWFL_ON                  2
-#define TWFL_AUTO                3
-#define TWFL_REDEYE              4
-
-/* CAP_FEEDERORDER values */
-#define TWFO_FIRSTPAGEFIRST      0
-#define TWFO_LASTPAGEFIRST       1
-
-/* CAP_FEEDERPOCKET values*/
-#define TWFP_POCKETERROR         0
-#define TWFP_POCKET1             1
-#define TWFP_POCKET2             2
-#define TWFP_POCKET3             3
-#define TWFP_POCKET4             4
-#define TWFP_POCKET5             5
-#define TWFP_POCKET6             6
-#define TWFP_POCKET7             7
-#define TWFP_POCKET8             8
-#define TWFP_POCKET9             9
-#define TWFP_POCKET10           10
-#define TWFP_POCKET11           11
-#define TWFP_POCKET12           12
-#define TWFP_POCKET13           13
-#define TWFP_POCKET14           14
-#define TWFP_POCKET15           15
-#define TWFP_POCKET16           16
-
-/* ICAP_FLIPROTATION values */
-#define TWFR_BOOK                0
-#define TWFR_FANFOLD             1
-
-/* ICAP_FILTER values */
-#define TWFT_RED                 0
-#define TWFT_GREEN               1
-#define TWFT_BLUE                2
-#define TWFT_NONE                3
-#define TWFT_WHITE               4
-#define TWFT_CYAN                5
-#define TWFT_MAGENTA             6
-#define TWFT_YELLOW              7
-#define TWFT_BLACK               8
-
-/* TW_FILESYSTEM.FileType values */
-#define TWFY_CAMERA              0
-#define TWFY_CAMERATOP           1
-#define TWFY_CAMERABOTTOM        2
-#define TWFY_CAMERAPREVIEW       3
-#define TWFY_DOMAIN              4
-#define TWFY_HOST                5
-#define TWFY_DIRECTORY           6
-#define TWFY_IMAGE               7
-#define TWFY_UNKNOWN             8
-
-/* ICAP_ICCPROFILE values */
-#define TWIC_NONE                0
-#define TWIC_LINK                1
-#define TWIC_EMBED               2
-
-/* ICAP_IMAGEFILTER values */
-#define TWIF_NONE                0
-#define TWIF_AUTO                1
-#define TWIF_LOWPASS             2
-#define TWIF_BANDPASS            3
-#define TWIF_HIGHPASS            4
-#define TWIF_TEXT                TWIF_BANDPASS
-#define TWIF_FINELINE            TWIF_HIGHPASS
-
-/* ICAP_IMAGEMERGE values */
-#define TWIM_NONE                0
-#define TWIM_FRONTONTOP          1
-#define TWIM_FRONTONBOTTOM       2
-#define TWIM_FRONTONLEFT         3
-#define TWIM_FRONTONRIGHT        4
-
-/* CAP_JOBCONTROL values  */
-#define TWJC_NONE                0
-#define TWJC_JSIC                1
-#define TWJC_JSIS                2
-#define TWJC_JSXC                3
-#define TWJC_JSXS                4
-
-/* ICAP_JPEGQUALITY values */
-#define TWJQ_UNKNOWN            -4
-#define TWJQ_LOW                -3
-#define TWJQ_MEDIUM             -2
-#define TWJQ_HIGH               -1
-
-/* ICAP_LIGHTPATH values */
-#define TWLP_REFLECTIVE          0
-#define TWLP_TRANSMISSIVE        1
-
-/* ICAP_LIGHTSOURCE values */
-#define TWLS_RED                 0
-#define TWLS_GREEN               1
-#define TWLS_BLUE                2
-#define TWLS_NONE                3
-#define TWLS_WHITE               4
-#define TWLS_UV                  5
-#define TWLS_IR                  6
-
-/* TWEI_MAGTYPE values */
-#define TWMD_MICR                0
-#define TWMD_RAW                 1
-#define TWMD_INVALID             2
-
-/* ICAP_NOISEFILTER values */
-#define TWNF_NONE                0
-#define TWNF_AUTO                1
-#define TWNF_LONEPIXEL           2
-#define TWNF_MAJORITYRULE        3
-
-/* ICAP_ORIENTATION values */
-#define TWOR_ROT0                0
-#define TWOR_ROT90               1
-#define TWOR_ROT180              2
-#define TWOR_ROT270              3
-#define TWOR_PORTRAIT            TWOR_ROT0
-#define TWOR_LANDSCAPE           TWOR_ROT270
-#define TWOR_AUTO                4
-#define TWOR_AUTOTEXT            5
-#define TWOR_AUTOPICTURE         6
-
-/* ICAP_OVERSCAN values */
-#define TWOV_NONE                0
-#define TWOV_AUTO                1
-#define TWOV_TOPBOTTOM           2
-#define TWOV_LEFTRIGHT           3
-#define TWOV_ALL                 4
-
-/* Palette types for TW_PALETTE8 */
-#define TWPA_RGB         0
-#define TWPA_GRAY        1
-#define TWPA_CMY         2
-
-/* ICAP_PLANARCHUNKY values */
-#define TWPC_CHUNKY              0
-#define TWPC_PLANAR              1
-
-/* TWEI_PATCHCODE values*/
-#define TWPCH_PATCH1             0
-#define TWPCH_PATCH2             1
-#define TWPCH_PATCH3             2
-#define TWPCH_PATCH4             3
-#define TWPCH_PATCH6             4
-#define TWPCH_PATCHT             5
-
-/* ICAP_PIXELFLAVOR values */
-#define TWPF_CHOCOLATE           0
-#define TWPF_VANILLA             1
-
-/* CAP_PRINTERMODE values */
-#define TWPM_SINGLESTRING        0
-#define TWPM_MULTISTRING         1
-#define TWPM_COMPOUNDSTRING      2
-
-/* CAP_PRINTER values */
-#define TWPR_IMPRINTERTOPBEFORE     0
-#define TWPR_IMPRINTERTOPAFTER      1
-#define TWPR_IMPRINTERBOTTOMBEFORE  2
-#define TWPR_IMPRINTERBOTTOMAFTER   3
-#define TWPR_ENDORSERTOPBEFORE      4
-#define TWPR_ENDORSERTOPAFTER       5
-#define TWPR_ENDORSERBOTTOMBEFORE   6
-#define TWPR_ENDORSERBOTTOMAFTER    7
-
-/* CAP_PRINTERFONTSTYLE Added 2.3 */
-#define TWPF_NORMAL              0
-#define TWPF_BOLD                1
-#define TWPF_ITALIC              2
-#define TWPF_LARGESIZE           3
-#define TWPF_SMALLSIZE           4
-
-/* CAP_PRINTERINDEXTRIGGER Added 2.3 */
-#define TWCT_PAGE                0
-#define TWCT_PATCH1              1
-#define TWCT_PATCH2              2
-#define TWCT_PATCH3              3
-#define TWCT_PATCH4              4
-#define TWCT_PATCHT              5
-#define TWCT_PATCH6              6
-
-/* CAP_POWERSUPPLY values */
-#define TWPS_EXTERNAL            0
-#define TWPS_BATTERY             1
-
-/* ICAP_PIXELTYPE values (PT_ means Pixel Type) */
-#define TWPT_BW                  0
-#define TWPT_GRAY                1
-#define TWPT_RGB                 2
-#define TWPT_PALETTE             3
-#define TWPT_CMY                 4
-#define TWPT_CMYK                5
-#define TWPT_YUV                 6
-#define TWPT_YUVK                7
-#define TWPT_CIEXYZ              8
-#define TWPT_LAB                 9
-#define TWPT_SRGB               10
-#define TWPT_SCRGB              11
-#define TWPT_INFRARED           16
-
-/* CAP_SEGMENTED values */
-#define TWSG_NONE                0
-#define TWSG_AUTO                1
-#define TWSG_MANUAL              2
-
-/* ICAP_FILMTYPE values */
-#define TWFM_POSITIVE            0
-#define TWFM_NEGATIVE            1
-
-/* CAP_DOUBLEFEEDDETECTION */
-#define TWDF_ULTRASONIC          0
-#define TWDF_BYLENGTH            1
-#define TWDF_INFRARED            2
-
-/* CAP_DOUBLEFEEDDETECTIONSENSITIVITY */
-#define TWUS_LOW                 0
-#define TWUS_MEDIUM              1
-#define TWUS_HIGH                2
-
-/* CAP_DOUBLEFEEDDETECTIONRESPONSE */
-#define TWDP_STOP                 0
-#define TWDP_STOPANDWAIT          1
-#define TWDP_SOUND                2
-#define TWDP_DONOTIMPRINT         3
-
-/* ICAP_MIRROR values */
-#define TWMR_NONE                 0
-#define TWMR_VERTICAL             1
-#define TWMR_HORIZONTAL           2
-
-/* ICAP_JPEGSUBSAMPLING values */
-#define TWJS_444YCBCR            0
-#define TWJS_444RGB              1
-#define TWJS_422                 2
-#define TWJS_421                 3
-#define TWJS_411                 4
-#define TWJS_420                 5
-#define TWJS_410                 6
-#define TWJS_311                 7
-
-/* CAP_PAPERHANDLING values */
-#define TWPH_NORMAL              0
-#define TWPH_FRAGILE             1
-#define TWPH_THICK               2
-#define TWPH_TRIFOLD             3
-#define TWPH_PHOTOGRAPH          4
-
-/* CAP_INDICATORSMODE values */
-#define TWCI_INFO                0
-#define TWCI_WARNING             1
-#define TWCI_ERROR               2
-#define TWCI_WARMUP              3
-
-/* ICAP_SUPPORTEDSIZES values (SS_ means Supported Sizes) */
-#define TWSS_NONE                0
-#define TWSS_A4                  1
-#define TWSS_JISB5               2
-#define TWSS_USLETTER            3
-#define TWSS_USLEGAL             4
-#define TWSS_A5                  5
-#define TWSS_ISOB4               6
-#define TWSS_ISOB6               7
-#define TWSS_USLEDGER            9
-#define TWSS_USEXECUTIVE        10
-#define TWSS_A3                 11
-#define TWSS_ISOB3              12
-#define TWSS_A6                 13
-#define TWSS_C4                 14
-#define TWSS_C5                 15
-#define TWSS_C6                 16
-#define TWSS_4A0                17
-#define TWSS_2A0                18
-#define TWSS_A0                 19
-#define TWSS_A1                 20
-#define TWSS_A2                 21
-#define TWSS_A7                 22
-#define TWSS_A8                 23
-#define TWSS_A9                 24
-#define TWSS_A10                25
-#define TWSS_ISOB0              26
-#define TWSS_ISOB1              27
-#define TWSS_ISOB2              28
-#define TWSS_ISOB5              29
-#define TWSS_ISOB7              30
-#define TWSS_ISOB8              31
-#define TWSS_ISOB9              32
-#define TWSS_ISOB10             33
-#define TWSS_JISB0              34
-#define TWSS_JISB1              35
-#define TWSS_JISB2              36
-#define TWSS_JISB3              37
-#define TWSS_JISB4              38
-#define TWSS_JISB6              39
-#define TWSS_JISB7              40
-#define TWSS_JISB8              41
-#define TWSS_JISB9              42
-#define TWSS_JISB10             43
-#define TWSS_C0                 44
-#define TWSS_C1                 45
-#define TWSS_C2                 46
-#define TWSS_C3                 47
-#define TWSS_C7                 48
-#define TWSS_C8                 49
-#define TWSS_C9                 50
-#define TWSS_C10                51
-#define TWSS_USSTATEMENT        52
-#define TWSS_BUSINESSCARD       53
-#define TWSS_MAXSIZE            54
-
-/* ICAP_XFERMECH values (SX_ means Setup XFer) */
-#define TWSX_NATIVE              0
-#define TWSX_FILE                1
-#define TWSX_MEMORY              2
-#define TWSX_MEMFILE             4
-
-/* ICAP_UNITS values (UN_ means UNits) */
-#define TWUN_INCHES              0
-#define TWUN_CENTIMETERS         1
-#define TWUN_PICAS               2
-#define TWUN_POINTS              3
-#define TWUN_TWIPS               4
-#define TWUN_PIXELS              5
-#define TWUN_MILLIMETERS         6
-
-
-/****************************************************************************
- * Country Constants                                                        *
- ****************************************************************************/
-
-#define TWCY_AFGHANISTAN   1001
-#define TWCY_ALGERIA        213
-#define TWCY_AMERICANSAMOA  684
-#define TWCY_ANDORRA        033
-#define TWCY_ANGOLA        1002
-#define TWCY_ANGUILLA      8090
-#define TWCY_ANTIGUA       8091
-#define TWCY_ARGENTINA       54
-#define TWCY_ARUBA          297
-#define TWCY_ASCENSIONI     247
-#define TWCY_AUSTRALIA       61
-#define TWCY_AUSTRIA         43
-#define TWCY_BAHAMAS       8092
-#define TWCY_BAHRAIN        973
-#define TWCY_BANGLADESH     880
-#define TWCY_BARBADOS      8093
-#define TWCY_BELGIUM         32
-#define TWCY_BELIZE         501
-#define TWCY_BENIN          229
-#define TWCY_BERMUDA       8094
-#define TWCY_BHUTAN        1003
-#define TWCY_BOLIVIA        591
-#define TWCY_BOTSWANA       267
-#define TWCY_BRITAIN          6
-#define TWCY_BRITVIRGINIS  8095
-#define TWCY_BRAZIL          55
-#define TWCY_BRUNEI         673

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list