[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 133 commits - accessibility/source android/Bootstrap android/experimental avmedia/source basctl/source basctl/uiconfig basic/source bean/qa bridges/test chart2/source chart2/uiconfig comphelper/source compilerplugins/clang configure.ac connectivity/com connectivity/JunitTest_complex.mk connectivity/org connectivity/qa connectivity/source cppu/source cui/source cui/uiconfig dbaccess/qa dbaccess/source desktop/source desktop/uiconfig desktop/win32 download.lst drawinglayer/source editeng/source extensions/qa extensions/source external/harfbuzz external/icu external/libmwaw external/libxml2 external/openssl external/python3 filter/source forms/qa forms/source formula/uiconfig fpicker/source framework/inc framework/JunitTest_framework_complex.mk framework/qa framework/source helpcompiler/source helpcontent2 i18nlangtag/source include/com include/comphelper include/LibreOfficeKit include/o3tl include/rsc include/svx include/tools include /vcl include/xmloff javaunohelper/test jurt/source jurt/test libreofficekit/source linguistic/source nlpsolver/Jar_EvolutionarySolver.mk nlpsolver/Jar_nlpsolver.mk nlpsolver/src nlpsolver/ThirdParty offapi/com officecfg/registry qadevOOo/runner qadevOOo/testdocs qadevOOo/tests registry/source reportbuilder/Jar_reportbuilder.mk reportbuilder/java reportdesign/qa reportdesign/source reportdesign/uiconfig rsc/inc rsc/source sal/rtl scaddins/source sc/inc sc/qa sc/source sc/uiconfig sd/Library_sd.mk sd/source sd/uiconfig sfx2/source shell/source slideshow/source starmath/source svl/qa svtools/source svx/Library_svxcore.mk svx/qa svx/source svx/uiconfig swext/mediawiki sw/inc sw/Library_sw.mk sw/qa sw/source sw/uiconfig toolkit/Library_tk.mk toolkit/qa toolkit/source toolkit/test tools/qa tools/source unotest/source unotools/qa vcl/Executable_vcldemo.mk vcl/generic vcl/inc vcl/Library_vcl.mk vcl/osx vcl/qa vcl/source vcl/unx vcl/win vcl/workben wizards/com wizards/Jar_commonwizards.mk wi zards/source writerfilter/source writerperfect/qa writerperfect/source xmloff/inc xmloff/qa xmloff/source xmlsecurity/test_docs

Miklos Vajna vmiklos at collabora.co.uk
Tue Jan 6 11:57:37 PST 2015


Rebased ref, commits from common ancestor:
commit a989d6f5bd6ad9c301259f93ab1fc62a4fcebb93
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 17:31:42 2015 +0100

    LOK: add LibreOfficeKitCallbackType enumeration
    
    Change-Id: I0147b1985f87f25e70f4d8672beba18fdd9ba6c2

diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 1b20738..a4addb8 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -51,6 +51,19 @@ typedef enum
 }
 LibreOfficeKitPartMode;
 
+typedef enum
+{
+    /**
+     * Any tiles which are over the rectangle described in the payload are no
+     * longer valid.
+     *
+     * Rectangle format: "width,height,x,y", where all numbers are document
+     * coordinates, in twips.
+     */
+    LOK_CALLBACK_INVALIDATE_TILES
+}
+LibreOfficeKitCallbackType;
+
 typedef void (*LibreOfficeKitCallback)(int nType, const char* pPayload, void* pData);
 #endif // LOK_USE_UNSTABLE_API
 
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 8eafb53..4e13f03 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -153,10 +153,16 @@ static void lok_docview_callback(int nType, const char* pPayload, void* pData)
 {
     LOKDocView* pDocView = pData;
 
-    // TODO for now just always render the document.
-    (void)nType;
-    (void)pPayload;
-    renderDocument( pDocView );
+    switch (nType)
+    {
+    case LOK_CALLBACK_INVALIDATE_TILES:
+        // TODO for now just always render the document.
+        (void)pPayload;
+        renderDocument( pDocView );
+        break;
+    default:
+        break;
+    }
 }
 
 SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, char* pPath )
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index b51d56b3..d5e1902 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6247,7 +6247,7 @@ void SwEditWin::LogicInvalidate(const vcl::Region* pRegion)
         ss << aRectangle.getWidth() << ", " << aRectangle.getHeight() << ", " << aRectangle.getX() << ", " << aRectangle.getY();
         sRectangle = ss.str().c_str();
     }
-    m_rView.GetWrtShell().libreOfficeKitCallback(0, sRectangle.getStr());
+    m_rView.GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3547424b9fa9c335e4e0c80fae8c5ac928403045
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 16:05:45 2015 +0100

    sw: notify LOK clients about invalidations
    
    So that when the document changes, they can know what tiles to throw
    away.
    
    Change-Id: I1f00585e7691a40af8fe5de71ac1a4225bc4e67f

diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 16a8a14..5102fa0 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -442,6 +442,14 @@ public:
                             long nTileHeight ) SAL_OVERRIDE;
     virtual Size getDocumentSize() SAL_OVERRIDE;
     virtual void initializeForTiledRendering() SAL_OVERRIDE;
+    /**
+     * Registers a callback that will be invoked whenever the tiled renderer
+     * wants to notify the client about an event.
+     *
+     * @param pCallBack is the callback function
+     * @param pData is private data of the client that will be sent back when the callback is invoked
+     */
+    virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) SAL_OVERRIDE;
 
     void                        Invalidate();
     void                        Reactivate(SwDocShell* pNewDocShell);
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 1c5eddb..574933c 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -30,6 +30,7 @@
 #include <stack>
 #include <vcl/mapmod.hxx>
 #include <vcl/print.hxx>
+#include <vcl/ITiledRenderable.hxx>
 
 namespace com { namespace sun { namespace star { namespace accessibility {
            class XAccessible; } } } }
@@ -194,6 +195,9 @@ protected:
     sal_uInt16 mnLockPaint;   ///< != 0 if Paint is locked.
     bool      mbSelectAll; ///< Special select all mode: whole document selected, even if doc starts with table.
 
+    LibreOfficeKitCallback mpLibreOfficeKitCallback;
+    void* mpLibreOfficeKitData;
+
 public:
     TYPEINFO();
 
@@ -572,6 +576,12 @@ public:
     bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
     virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) mbShowHeaderSeparator = bShow; else mbShowFooterSeparator = bShow; }
     bool IsSelectAll() { return mbSelectAll; }
+
+    /// The actual implementation of the vcl::ITiledRenderable::registerCallback() API for Writer.
+    void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
+    /// Invokes the registered callback, if there are any.
+    void libreOfficeKitCallback(int nType, const char* pPayload);
+
     SwViewShell* GetNext()
         { return GetNextInRing(); }
     const SwViewShell* GetNext() const
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 14a4ade..27ec8a3 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -117,6 +117,18 @@ void SwViewShell::ToggleHeaderFooterEdit()
     GetWin()->Invalidate();
 }
 
+void SwViewShell::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
+{
+    mpLibreOfficeKitCallback = pCallback;
+    mpLibreOfficeKitData = pData;
+}
+
+void SwViewShell::libreOfficeKitCallback(int nType, const char* pPayload)
+{
+    if (mpLibreOfficeKitCallback)
+        mpLibreOfficeKitCallback(nType, pPayload, mpLibreOfficeKitData);
+}
+
 static void
 lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect)
 {
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 3cfe679..6fef158 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -169,6 +169,8 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
     mnStartAction( 0 ),
     mnLockPaint( 0 ),
     mbSelectAll(false),
+    mpLibreOfficeKitCallback(0),
+    mpLibreOfficeKitData(0),
     mpPrePostOutDev(0), // #i72754#
     maPrePostMapMode()
 {
@@ -245,6 +247,8 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
     mnStartAction( 0 ),
     mnLockPaint( 0 ),
     mbSelectAll(false),
+    mpLibreOfficeKitCallback(0),
+    mpLibreOfficeKitData(0),
     mpPrePostOutDev(0), // #i72754#
     maPrePostMapMode()
 {
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index dfa4306..b51d56b3 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6235,4 +6235,19 @@ void SwEditWin::SwitchView()
 #endif
 }
 
+void SwEditWin::LogicInvalidate(const vcl::Region* pRegion)
+{
+    OString sRectangle;
+    if (!pRegion)
+        sRectangle = "EMPTY";
+    else
+    {
+        std::stringstream ss;
+        Rectangle aRectangle = pRegion->GetBoundRect();
+        ss << aRectangle.getWidth() << ", " << aRectangle.getHeight() << ", " << aRectangle.getX() << ", " << aRectangle.getY();
+        sRectangle = ss.str().c_str();
+    }
+    m_rView.GetWrtShell().libreOfficeKitCallback(0, sRectangle.getStr());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index e08e237..ff04909 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -296,6 +296,12 @@ public:
     SwEditWin(vcl::Window *pParent, SwView &);
     virtual ~SwEditWin();
     virtual void SwitchView();
+    /**
+     * Notification about some region of the output device got invalidated.
+     *
+     * @param pRegion If 0, that means the whole area, otherwise the area in logic coordinates.
+     */
+    void LogicInvalidate(const vcl::Region* pRegion) SAL_OVERRIDE;
 };
 
 #endif
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index a3493bf..4bba535 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3157,6 +3157,13 @@ void SwXTextDocument::initializeForTiledRendering()
     pView->SetViewLayout(nColumns, bBookMode, true);
 }
 
+void SwXTextDocument::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
+{
+    SwDoc* pDoc = pDocShell->GetDoc();
+    SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+    pViewShell->registerLibreOfficeKitCallback(pCallback, pData);
+}
+
 void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
 {
     return SwXTextDocumentBaseClass::operator new(t);
commit d9997df11fb353aa0d6856554e4f845abc315d4f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 15:56:23 2015 +0100

    gtktiledviewer: register a LOK callback and re-render the document ...
    
    ... when the callback is invoked
    
    Change-Id: I979a75bc7c7ad1e0d0b9c5413c238ed7260d2093

diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 5884e66..8eafb53 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -149,6 +149,16 @@ void renderDocument( LOKDocView* pDocView )
     gtk_image_set_from_pixbuf( GTK_IMAGE( pDocView->pCanvas ), pDocView->pPixBuf );
 }
 
+static void lok_docview_callback(int nType, const char* pPayload, void* pData)
+{
+    LOKDocView* pDocView = pData;
+
+    // TODO for now just always render the document.
+    (void)nType;
+    (void)pPayload;
+    renderDocument( pDocView );
+}
+
 SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, char* pPath )
 {
     if ( pDocView->pDocument )
@@ -167,7 +177,10 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
         return FALSE;
     }
     else
+    {
         renderDocument( pDocView );
+        pDocView->pDocument->pClass->registerCallback(pDocView->pDocument, &lok_docview_callback, pDocView);
+    }
 
     return TRUE;
 }
commit aa827f5fde5a95343bb5fa819eda7a10f57e9d36
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 15:49:12 2015 +0100

    lok::Document: add registerCallback()
    
    So that LOK clients can invoke the new
    vcl::ITiledRenderable::registerCallback().
    
    Change-Id: I6d9974acbd7fb5eea217c88f963e6ebb10343078

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8a8538e..08a353f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -199,6 +199,9 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
                                 long* pHeight);
 static void doc_initializeForRendering(LibreOfficeKitDocument* pThis);
 
+static void doc_registerCallback(LibreOfficeKitDocument* pThis,
+                                LibreOfficeKitCallback pCallback,
+                                void* pData);
 
 struct LibLODocument_Impl : public _LibreOfficeKitDocument
 {
@@ -225,6 +228,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument
             m_pDocumentClass->paintTile = doc_paintTile;
             m_pDocumentClass->getDocumentSize = doc_getDocumentSize;
             m_pDocumentClass->initializeForRendering = doc_initializeForRendering;
+            m_pDocumentClass->registerCallback = doc_registerCallback;
 
             gDocumentClass = m_pDocumentClass;
         }
@@ -620,6 +624,20 @@ static void doc_initializeForRendering(LibreOfficeKitDocument* pThis)
     }
 }
 
+static void doc_registerCallback(LibreOfficeKitDocument* pThis,
+                                LibreOfficeKitCallback pCallback,
+                                void* pData)
+{
+    ITiledRenderable* pDoc = getTiledRenderable(pThis);
+    if (!pDoc)
+    {
+        gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+        return;
+    }
+
+    pDoc->registerCallback(pCallback, pData);
+}
+
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index de5df7f..1b20738 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -50,6 +50,8 @@ typedef enum
     LOK_PARTMODE_EMBEDDEDOBJ
 }
 LibreOfficeKitPartMode;
+
+typedef void (*LibreOfficeKitCallback)(int nType, const char* pPayload, void* pData);
 #endif // LOK_USE_UNSTABLE_API
 
 struct _LibreOfficeKit
@@ -117,6 +119,9 @@ struct _LibreOfficeKitDocumentClass
   // Initialize document for rendering.
   void (*initializeForRendering) (LibreOfficeKitDocument* pThis);
 
+  void (*registerCallback)   (LibreOfficeKitDocument* pThis,
+                              LibreOfficeKitCallback pCallback,
+                              void* pData);
 #endif // LOK_USE_UNSTABLE_API
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 274509c..2a57232 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -93,6 +93,17 @@ public:
         mpDoc->pClass->initializeForRendering(mpDoc);
     }
 
+    /**
+     * Registers a callback. LOK will invoke this function when it wants to
+     * inform the client about events.
+     *
+     * @param pCallback the callback to invoke
+     * @param pData the user data, will be passed to the callback on invocation
+     */
+    inline void registerCallback(LibreOfficeKitCallback pCallback, void* pData)
+    {
+        mpDoc->pClass->registerCallback(mpDoc, pCallback, pData);
+    }
 #endif // LOK_USE_UNSTABLE_API
 };
 
commit 0137974abd70d80589ae1a4853523ec2039be1ff
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 15:07:45 2015 +0100

    vcl: add OutputDevice::LogicInvalidate()
    
    This way subclasses may know when and what is invalidated.
    
    Change-Id: Ie4aa843fcf45b2643b24ca49534627fbf43afd94

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0d36309..5ce1a27 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1712,6 +1712,14 @@ public:
     SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const;
     SAL_DLLPRIVATE DeviceCoordinate LogicHeightToDeviceCoordinate( long nHeight ) const;
 
+protected:
+    /**
+     * Notification about some region of the output device got invalidated.
+     *
+     * @param pRegion If 0, that means the whole area, otherwise the area in logic coordinates.
+     */
+    virtual void LogicInvalidate(const vcl::Region* /*pRegion*/) { }
+
 private:
 
     /** Convert a logical X coordinate to a device pixel's X coordinate.
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index c22c5b1..ff8c980 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -860,6 +860,7 @@ void Window::Invalidate( sal_uInt16 nFlags )
         return;
 
     ImplInvalidate( NULL, nFlags );
+    LogicInvalidate(0);
 }
 
 void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
@@ -874,6 +875,8 @@ void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
     {
         vcl::Region aRegion( aRect );
         ImplInvalidate( &aRegion, nFlags );
+        vcl::Region aLogicRegion(rRect);
+        LogicInvalidate(&aLogicRegion);
     }
 }
 
@@ -884,12 +887,19 @@ void Window::Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags )
         return;
 
     if ( rRegion.IsNull() )
+    {
         ImplInvalidate( NULL, nFlags );
+        LogicInvalidate(0);
+    }
     else
     {
         vcl::Region aRegion = ImplPixelToDevicePixel( LogicToPixel( rRegion ) );
         if ( !aRegion.IsEmpty() )
+        {
             ImplInvalidate( &aRegion, nFlags );
+            vcl::Region aLogicRegion(rRegion);
+            LogicInvalidate(&aLogicRegion);
+        }
     }
 }
 
@@ -900,6 +910,7 @@ void Window::Validate( sal_uInt16 nFlags )
         return;
 
     ImplValidate( NULL, nFlags );
+    LogicInvalidate(0);
 }
 
 bool Window::HasPaintEvent() const
commit bea2ade9151e44bb15eb1dd465ca53ee479693c8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 6 15:06:51 2015 +0100

    vcl::ITiledRenderable: add registerCallback()
    
    This can be overriden in applications, if they need a callback.
    
    Change-Id: I0441e48afbbfd63a96d47c5cf837e6635ce72aff

diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index d54bbef..15630c1 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -87,6 +87,15 @@ public:
     virtual void initializeForTiledRendering()
     {
     }
+
+    /**
+     * Registers a callback that will be invoked whenever the tiled renderer
+     * wants to notify the client about an event.
+     *
+     * @param pCallBack is the callback function
+     * @param pData is private data of the client that will be sent back when the callback is invoked
+     */
+    virtual void registerCallback(LibreOfficeKitCallback /*pCallback*/, void* /*pData*/) { }
 };
 
 } // namespace vcl
commit 21eb155e3eac7badd987adc041000378c67911ae
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Jan 6 20:33:47 2015 +0100

    Typo: Rerturns -> Returns
    
    Change-Id: Ic331f71eb0f248528a340c4390af65951b46b22f

diff --git a/connectivity/source/drivers/mork/MorkParser.hxx b/connectivity/source/drivers/mork/MorkParser.hxx
index d0ecba7..1effb8f 100644
--- a/connectivity/source/drivers/mork/MorkParser.hxx
+++ b/connectivity/source/drivers/mork/MorkParser.hxx
@@ -96,7 +96,7 @@ public:
 
     MorkTableMap *getTables( int tableScope );
 
-    /// Rerturns all rows under specified scope
+    /// Returns all rows under specified scope
 
     MorkRowMap *getRows( int rowScope, RowScopeMap *table );
 
commit d389216038d874c0d99a8168649a7f5f4db970d3
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Jan 6 20:18:48 2015 +0100

    grml.. nScanLineBufferComponents still needs to be on jmp stack
    
    A follow-up on 09a5910c96a822c6e7fc4b82d89c00c22e905eba
    move nScanLineBufferComponents to where it is used [-Werror=clobbered]
    
    If pScanLineBuffer is used, nScanLineBufferComponents is the
    corresponding counter so it needs to be preserved as well in case of a
    longjmp.
    
    Change-Id: If9c6f148cd47b98dee2418fb61eebe2c829869f1

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 411b17b..b4cd995 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -69,6 +69,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
     long                            nAlignedWidth;
     JSAMPLE*                        aRangeLimit;
     boost::scoped_array<unsigned char> pScanLineBuffer;
+    long                            nScanLineBufferComponents;
 
     if ( setjmp( jerr.setjmp_buffer ) )
     {
@@ -149,7 +150,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
     nAlignedWidth = aCreateBitmapParam.nAlignedWidth;
     aRangeLimit = cinfo.sample_range_limit;
 
-    long nScanLineBufferComponents = 0;
+    nScanLineBufferComponents = 0;
     if ( cinfo.out_color_space == JCS_CMYK )
     {
         nScanLineBufferComponents = cinfo.output_width * 4;
commit 9dbac35b1e55c49b2f1e595f4dfe3437c3fedb58
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 18:05:49 2015 +0100

    external/harfbuzz: Work around -fsanitize=null
    
    Change-Id: I81dc29f5ba2ef442ffb7e2823f02b9bfead24a46

diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 0bda2a1..1f9f15f 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,harfbuzz))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,harfbuzz,$(HARFBUZZ_TARBALL),,harfbuzz))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
+    external/harfbuzz/ubsan.patch \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch
new file mode 100644
index 0000000..3bdb589
--- /dev/null
+++ b/external/harfbuzz/ubsan.patch
@@ -0,0 +1,44 @@
+--- src/hb-object-private.hh
++++ src/hb-object-private.hh
+@@ -131,7 +131,7 @@
+   }
+ 
+   inline bool destroy (void) {
+-    if (unlikely (!this || this->is_inert ()))
++    if (unlikely (is_inert ()))
+       return false;
+     if (ref_count.dec () != 1)
+       return false;
+@@ -160,13 +160,12 @@
+   }
+ 
+   inline void trace (const char *function) const {
+-    if (unlikely (!this)) return;
+     /* TODO We cannot use DEBUG_MSG_FUNC here since that one currently only
+      * prints the class name and throws away the template info. */
+     DEBUG_MSG (OBJECT, (void *) this,
+ 	       "%s refcount=%d",
+ 	       function,
+-	       this ? ref_count.ref_count : 0);
++	       ref_count.ref_count);
+   }
+ 
+   private:
+@@ -179,7 +179,7 @@
+ template <typename Type>
+ static inline void hb_object_trace (const Type *obj, const char *function)
+ {
+-  obj->header.trace (function);
++  if (likely (obj)) obj->header.trace (function);
+ }
+ template <typename Type>
+ static inline Type *hb_object_create (void)
+@@ -204,7 +204,7 @@
+ static inline bool hb_object_destroy (Type *obj)
+ {
+   hb_object_trace (obj, HB_FUNC);
+-  return obj->header.destroy ();
++  return likely (obj) && obj->header.destroy ();
+ }
+ template <typename Type>
+ static inline bool hb_object_set_user_data (Type               *obj,
commit e2883ca86f747eb62d1fe9e9b8d115c689e3abd7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 15:05:36 2015 +0000

    Resolves: fdo#82219 color graphics as black and white
    
    i.e. revert
    
    commit bb5c7d6a79309236d4f19bb2498f2e850f735a2f
    Date:   Sun Apr 13 01:42:27 2014 +1000
    
        fdo#38844 Reduce XOR clipping for gradients
    
        Removed XOR clipping version of ClipAndDrawGradientMetafile. Because it
        has been removed, the other version isn't really needed in it's own
        function so I've moved it back into DrawGradient.
    
        Change-Id: Ib1519a019061c8c71183db63e5c11681bcad4cc4
    
    Change-Id: Iff1cb48cb8fa6d29937cf228a57aea9e8072110c

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 23abb00..0d36309 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1511,6 +1511,8 @@ protected:
     virtual void                EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
     void                        DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
 
+    virtual void                ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
+
 private:
 
     SAL_DLLPRIVATE bool         DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 3a9ad1d..242873c 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -259,6 +259,7 @@ protected:
 
     virtual long                GetGradientStepCount( long nMinRect ) SAL_OVERRIDE;
     virtual bool                UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
+    virtual void                ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) SAL_OVERRIDE;
 
     void                        ScaleBitmap ( Bitmap&, SalTwoRect& ) SAL_OVERRIDE { };
 
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 3fec08f..fd23d19 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1813,6 +1813,16 @@ bool Printer::UsePolyPolygonForComplexGradient()
     return true;
 }
 
+void Printer::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly )
+{
+    const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+
+    Push( PushFlags::CLIPREGION );
+    IntersectClipRegion(vcl::Region(rPolyPoly));
+    DrawGradient( aBoundRect, rGradient );
+    Pop();
+}
+
 void Printer::InitFont() const
 {
     DBG_TESTSOLARMUTEX();
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 8916e76..7031103 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -146,6 +146,24 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
         mpAlphaVDev->DrawPolyPolygon( rPolyPoly );
 }
 
+void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly )
+{
+    const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+    const bool  bOldOutput = IsOutputEnabled();
+
+    EnableOutput( false );
+    Push( PushFlags::RASTEROP );
+    SetRasterOp( ROP_XOR );
+    DrawGradient( aBoundRect, rGradient );
+    SetFillColor( COL_BLACK );
+    SetRasterOp( ROP_0 );
+    DrawPolyPolygon( rPolyPoly );
+    SetRasterOp( ROP_XOR );
+    DrawGradient( aBoundRect, rGradient );
+    Pop();
+    EnableOutput( bOldOutput );
+}
+
 void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
                                             const Gradient& rGradient )
 {
@@ -172,10 +190,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
             mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
             mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
 
-            Push( PushFlags::CLIPREGION );
-            IntersectClipRegion(vcl::Region(rPolyPoly));
-            DrawGradient( aBoundRect, rGradient );
-            Pop();
+            ClipAndDrawGradientMetafile ( rGradient, rPolyPoly );
 
             mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_END" ) );
         }
commit 7c2250cbd2fc392e11cb1fe70ff139457968e23a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 17:57:41 2015 +0100

    loplugin:saloverride
    
    Change-Id: I4509ee714622ad1fcccfed9255a474727e0f8e16

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 608007d..0d81a74 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1215,7 +1215,7 @@ class DemoWin : public WorkWindow
         {
             join();
         }
-        virtual void execute()
+        virtual void execute() SAL_OVERRIDE
         {
             osl_waitThread(&maDelay);
 
commit d81dbb6dee272bd18c7a1d3e0dbe429b04187f8b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 17:45:00 2015 +0100

    external/libxml2: Work around -fsanitize=bounds
    
    Change-Id: I57d30410640fa1b7e1768136b1802546b2b7253f

diff --git a/external/libxml2/UnpackedTarball_xml2.mk b/external/libxml2/UnpackedTarball_xml2.mk
index 9c53b1f..beed009 100644
--- a/external/libxml2/UnpackedTarball_xml2.mk
+++ b/external/libxml2/UnpackedTarball_xml2.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,xml2,\
 	external/libxml2/libxml2-vc10.patch \
 	$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
 	external/libxml2/libxml2-icu.patch.0 \
+	external/libxml2/ubsan.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/ubsan.patch.0 b/external/libxml2/ubsan.patch.0
new file mode 100644
index 0000000..cebacc4
--- /dev/null
+++ b/external/libxml2/ubsan.patch.0
@@ -0,0 +1,84 @@
+--- parser.c
++++ parser.c
+@@ -1052,7 +1052,7 @@
+ struct _xmlDefAttrs {
+     int nbAttrs;	/* number of defaulted attributes on that element */
+     int maxAttrs;       /* the size of the array */
+-    const xmlChar *values[5]; /* array of localname/prefix/values/external */
++    const xmlChar *values[1][5]; /* array of localname/prefix/values/external */
+ };
+ 
+ /**
+@@ -1244,17 +1244,17 @@
+ 	prefix = xmlDictLookup(ctxt->dict, fullattr, len);
+     }
+ 
+-    defaults->values[5 * defaults->nbAttrs] = name;
+-    defaults->values[5 * defaults->nbAttrs + 1] = prefix;
++    defaults->values[defaults->nbAttrs][0] = name;
++    defaults->values[defaults->nbAttrs][1] = prefix;
+     /* intern the string and precompute the end */
+     len = xmlStrlen(value);
+     value = xmlDictLookup(ctxt->dict, value, len);
+-    defaults->values[5 * defaults->nbAttrs + 2] = value;
+-    defaults->values[5 * defaults->nbAttrs + 3] = value + len;
++    defaults->values[defaults->nbAttrs][2] = value;
++    defaults->values[defaults->nbAttrs][3] = value + len;
+     if (ctxt->external)
+-        defaults->values[5 * defaults->nbAttrs + 4] = BAD_CAST "external";
++        defaults->values[defaults->nbAttrs][4] = BAD_CAST "external";
+     else
+-        defaults->values[5 * defaults->nbAttrs + 4] = NULL;
++        defaults->values[defaults->nbAttrs][4] = NULL;
+     defaults->nbAttrs++;
+ 
+     return;
+@@ -9474,8 +9474,8 @@
+ 	defaults = xmlHashLookup2(ctxt->attsDefault, localname, prefix);
+ 	if (defaults != NULL) {
+ 	    for (i = 0;i < defaults->nbAttrs;i++) {
+-	        attname = defaults->values[5 * i];
+-		aprefix = defaults->values[5 * i + 1];
++	        attname = defaults->values[i][0];
++		aprefix = defaults->values[i][1];
+ 
+                 /*
+ 		 * special work for namespaces defaulted defs
+@@ -9490,9 +9490,9 @@
+ 	            if (j <= nbNs) continue;
+ 
+ 		    nsname = xmlGetNamespace(ctxt, NULL);
+-		    if (nsname != defaults->values[5 * i + 2]) {
++		    if (nsname != defaults->values[i][2]) {
+ 			if (nsPush(ctxt, NULL,
+-			           defaults->values[5 * i + 2]) > 0)
++			           defaults->values[i][2]) > 0)
+ 			    nbNs++;
+ 		    }
+ 		} else if (aprefix == ctxt->str_xmlns) {
+@@ -9505,9 +9505,9 @@
+ 	            if (j <= nbNs) continue;
+ 
+ 		    nsname = xmlGetNamespace(ctxt, attname);
+-		    if (nsname != defaults->values[2]) {
++		    if (nsname != defaults->values[0][2]) {
+ 			if (nsPush(ctxt, attname,
+-			           defaults->values[5 * i + 2]) > 0)
++			           defaults->values[i][2]) > 0)
+ 			    nbNs++;
+ 		    }
+ 		} else {
+@@ -9533,10 +9533,10 @@
+ 			atts[nbatts++] = NULL;
+ 		    else
+ 		        atts[nbatts++] = xmlGetNamespace(ctxt, aprefix);
+-		    atts[nbatts++] = defaults->values[5 * i + 2];
+-		    atts[nbatts++] = defaults->values[5 * i + 3];
++		    atts[nbatts++] = defaults->values[i][2];
++		    atts[nbatts++] = defaults->values[i][3];
+ 		    if ((ctxt->standalone == 1) &&
+-		        (defaults->values[5 * i + 4] != NULL)) {
++		        (defaults->values[i][4] != NULL)) {
+ 			xmlValidityError(ctxt, XML_DTD_STANDALONE_DEFAULTED,
+ 	  "standalone: attribute %s on %s defaulted from external subset\n",
+ 	                                 attname, localname);
commit 901091f47a661571a7fb935bd5ccec34e37ad688
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 17:44:19 2015 +0100

    external/icu: Work around -fsanitize=signed-integer-overflow
    
    Change-Id: Iec76486aa8a0eef7e1a5c74b416d466f16ff979a

diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index c6baaed..c1d229c 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -127,6 +127,17 @@
                    length(len), next(subNode) {}
          virtual UBool operator==(const Node &other) const;
          virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
+--- source/common/unifiedcache.h
++++ source/common/unifiedcache.h
+@@ -139,7 +139,7 @@
+            : CacheKey<T>(other), fLoc(other.fLoc) { }
+    virtual ~LocaleCacheKey() { }
+    virtual int32_t hashCode() const {
+-       return 37 *CacheKey<T>::hashCode() + fLoc.hashCode();
++       return 37U *CacheKey<T>::hashCode() + fLoc.hashCode();
+    }
+    virtual UBool operator == (const CacheKeyBase &other) const {
+        // reflexive
 --- source/common/uresbund.cpp
 +++ source/common/uresbund.cpp
 @@ -53,7 +53,7 @@
commit 0bea1d80d10a1e3e9bebf958d622ff2fb480e886
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Jan 6 16:09:09 2015 +0000

    vcl: reset OpenGLContext(s) when yielding the last SolarMutex.
    
    This should make OpenGL thread-safe to allow multiple threads to
    render using VCL's OpenGL backend, and fix misc. associated driver
    horrors, will give some performance cost for tight Yield loops.
    
    Change-Id: Ib23702262fd9f0925a5ed8c642d0a26e92136b37

diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index b93c12c..67570c1 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -199,8 +199,14 @@ public:
     OpenGLProgram*      UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader );
 
     bool isCurrent();
-    void clearCurrent();
+    static void clearCurrent();
+    /// reset all contexts dis-associating them with their underlying
+    /// resources before a potential thread switch.
+    static void resetAllContexts();
+
+    /// make this GL context current - so it is implicit in subsequent GL calls
     void makeCurrent();
+    /// reset the GL context so this context is not implicit in subsequent GL calls.
     void resetCurrent();
     void swapBuffers();
     void sync();
diff --git a/vcl/generic/app/geninst.cxx b/vcl/generic/app/geninst.cxx
index cf2f301..5ac4936 100644
--- a/vcl/generic/app/geninst.cxx
+++ b/vcl/generic/app/geninst.cxx
@@ -21,8 +21,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "osl/module.hxx"
-#include "tools/solarmutex.hxx"
+#include <osl/module.hxx>
+#include <tools/solarmutex.hxx>
+#include <vcl/opengl/OpenGLContext.hxx>
 
 #include "generic/geninst.h"
 
@@ -53,7 +54,10 @@ void SalYieldMutex::release()
     if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
     {
         if ( mnCount == 1 )
+        {
+            OpenGLContext::resetAllContexts();
             mnThreadId = 0;
+        }
         mnCount--;
     }
     m_mutex.release();
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 9979842..411cfba 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -31,6 +31,7 @@
 #include "vcl/window.hxx"
 #include "vcl/timer.hxx"
 #include "vcl/svmain.hxx"
+#include "vcl/opengl/OpenGLContext.hxx"
 
 #include "osx/saldata.hxx"
 #include "osx/salinst.h"
@@ -269,7 +270,10 @@ void SalYieldMutex::release()
     if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
     {
         if ( mnCount == 1 )
+        {
+            OpenGLContext::resetAllContexts();
             mnThreadId = 0;
+        }
         mnCount--;
     }
     m_mutex.release();
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 138a79e..9d681ff 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -82,6 +82,9 @@ OpenGLContext::OpenGLContext():
     else
         pSVData->maGDIData.mpFirstContext = this;
     pSVData->maGDIData.mpLastContext = this;
+
+    // FIXME: better hope we call 'makeCurrent' soon to preserve
+    // the invariant that the last item is the current context.
 }
 
 OpenGLContext::~OpenGLContext()
@@ -1289,6 +1292,22 @@ void OpenGLContext::clearCurrent()
         pCurrentCtx->ReleaseFramebuffers();
 }
 
+void OpenGLContext::resetAllContexts()
+{
+    ImplSVData* pSVData = ImplGetSVData();
+
+    // release all framebuffers from the old context so we can re-attach the
+    // texture in the new context
+    for (OpenGLContext* l = pSVData->maGDIData.mpLastContext; l;
+         l = l->mpPrevContext)
+    {
+        l->ReleaseFramebuffers();
+        if (l->isCurrent())
+            l->resetCurrent();
+        assert (!l->mpNextContext || l->mpNextContext->mpPrevContext == l);
+    }
+}
+
 void OpenGLContext::makeCurrent()
 {
     ImplSVData* pSVData = ImplGetSVData();
@@ -1318,7 +1337,7 @@ void OpenGLContext::makeCurrent()
     }
 #endif
 
-    // move the context at the end of the contexts list
+    // move the context to the end of the contexts list
     static int nSwitch = 0;
     SAL_INFO("vcl.opengl", "******* CONTEXT SWITCH " << ++nSwitch << " *********");
     if( mpNextContext )
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 9e284eb..1091856 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -28,6 +28,7 @@
 
 #include <vcl/apptypes.hxx>
 #include <vcl/opengl/OpenGLHelper.hxx>
+#include <vcl/opengl/OpenGLContext.hxx>
 #include <vcl/timer.hxx>
 
 #include <opengl/salbmp.hxx>
@@ -148,6 +149,8 @@ void SalYieldMutex::release()
         {
             if ( mnCount == 1 )
             {
+                OpenGLContext::resetAllContexts();
+
                 // If we don't call these message, the Output from the
                 // Java clients doesn't come in the right order
                 GdiFlush();
commit 3b52c4492c468ee5dfbb97382f53a28bdf8c0f4c
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Jan 6 16:08:37 2015 +0000

    vcl: cleanup shared SalYieldMutex from GtkYieldMutex.
    
    Change-Id: I6ace72606ba666322c045d28bea713443c0fc45f

diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index ceda303..3cabea3 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -41,10 +41,7 @@ class GtkYieldMutex : public SalYieldMutex
     std::list<sal_uLong> aYieldStack;
 
 public:
-                        GtkYieldMutex();
-    virtual void        acquire() SAL_OVERRIDE;
-    virtual void        release() SAL_OVERRIDE;
-
+         GtkYieldMutex() {}
     void ThreadsEnter();
     void ThreadsLeave();
 };
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 2165a1e..c80f146 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -276,20 +276,6 @@ SalPrinter* GtkInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
 #endif
 }
 
-GtkYieldMutex::GtkYieldMutex()
-{
-}
-
-void GtkYieldMutex::acquire()
-{
-    SalYieldMutex::acquire();
-}
-
-void GtkYieldMutex::release()
-{
-    SalYieldMutex::release();
-}
-
 /*
  * These methods always occur in pairs
  * A ThreadsEnter is followed by a ThreadsLeave
commit bc6f2ee84dcb66be6a0867d34ce212a2df65efdf
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Jan 6 16:07:07 2015 +0000

    vcldemo: extend threaded rendering test.
    
    Change-Id: I81e31e1e7442fd0c6d8d720dbd0e9d5cb82bf52b

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index b4e5ed6..608007d 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -15,6 +15,7 @@
 #include <com/sun/star/registry/XSimpleRegistry.hpp>
 #include <com/sun/star/ucb/UniversalContentBroker.hpp>
 
+#include <osl/time.h>
 #include <vcl/vclmain.hxx>
 #include <vcl/layout.hxx>
 #include <salhelper/thread.hxx>
@@ -1200,12 +1201,14 @@ class DemoWin : public WorkWindow
     bool testThreads;
 
     class RenderThread : public salhelper::Thread {
-        DemoWin &mrWin;
+        DemoWin  &mrWin;
+        TimeValue maDelay;
     public:
-        RenderThread(DemoWin &rWin)
+        RenderThread(DemoWin &rWin, sal_uInt32 nDelaySecs)
             : Thread("vcldemo render thread")
             , mrWin(rWin)
         {
+            maDelay.Seconds = nDelaySecs;
             launch();
         }
         virtual ~RenderThread()
@@ -1214,6 +1217,8 @@ class DemoWin : public WorkWindow
         }
         virtual void execute()
         {
+            osl_waitThread(&maDelay);
+
             SolarMutexGuard aGuard;
             fprintf (stderr, "render from a different thread\n");
             mrWin.Paint(Rectangle());
@@ -1242,7 +1247,10 @@ public:
         {
             if (testThreads)
             { // render this window asynchronously in a new thread
-                mxThread = new RenderThread(*this);
+                sal_uInt32 nDelaySecs = 0;
+                if (rMEvt.GetButtons() & MOUSE_RIGHT)
+                    nDelaySecs = 5;
+                mxThread = new RenderThread(*this, nDelaySecs);
             }
             else
             { // spawn another window
@@ -1388,6 +1396,12 @@ public:
                     bWidgets = true;
                 else if (aArg == "--threads")
                     bThreads = true;
+                else if (aArg.startsWith("--"))
+                {
+                    fprintf(stderr,"Unknown argument '%s'\n",
+                            rtl::OUStringToOString(aArg, RTL_TEXTENCODING_UTF8).getStr());
+                    return showHelp(aRenderer);
+                }
             }
 
             DemoWin aMainWin(aRenderer, bThreads);
commit c075fc1b39c7d8389cd960ccde7295d011105ae6
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 17:02:01 2015 +0100

    build requires libmwaw 0.3.4 now
    
    Change-Id: Ia129961bc429514b70e4bb508a76424e4df83289

diff --git a/configure.ac b/configure.ac
index 5dbe640..df3b179 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7535,7 +7535,7 @@ libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 dnl ===================================================================
 dnl Check for system libmwaw
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.3])
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.4])
 
 dnl ===================================================================
 dnl Check for system libpagemaker
commit 2a8f6a8a81c568d9ad73838072d287ac4927649f
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 17:01:30 2015 +0100

    fdo#88098 ClarisWorks: import empty starting lines/columns
    
    Change-Id: Ibe4d5be4df874336de7ae387d210deff0a927b38

diff --git a/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch b/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch
new file mode 100644
index 0000000..0d79446
--- /dev/null
+++ b/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch
@@ -0,0 +1,99 @@
+From c092ac823e50083c04464565365ddd4af71f8c89 Mon Sep 17 00:00:00 2001
+From: osnola <alonso at loria.fr>
+Date: Tue, 6 Jan 2015 15:39:54 +0100
+Subject: [PATCH 1/2] ClarisWorks/AppleWorks[spreadsheet]: do not remove first
+ empty rows and/or columns in the main spreadsheet   + if we remove some first
+ rows/columns in a embedded spreadsheet, update the cells present in
+ formula...
+
+---
+ src/lib/ClarisWksDbaseContent.cxx | 29 +++++++++++++++++++++++++++++
+ src/lib/ClarisWksDbaseContent.hxx |  3 ++-
+ src/lib/ClarisWksSpreadsheet.cxx  |  5 +++++
+ 3 files changed, 36 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/ClarisWksDbaseContent.cxx b/src/lib/ClarisWksDbaseContent.cxx
+index 7226af1..ea15544 100644
+--- a/src/lib/ClarisWksDbaseContent.cxx
++++ b/src/lib/ClarisWksDbaseContent.cxx
+@@ -1393,4 +1393,33 @@ bool ClarisWksDbaseContent::readFormula(Vec2i const &cPos, long endPos, std::vec
+ 
+   return true;
+ }
++
++////////////////////////////////////////////////////////////
++//
++////////////////////////////////////////////////////////////
++void ClarisWksDbaseContent::Record::updateFormulaCells(Vec2i const &removeDelta)
++{
++  if (m_content.m_contentType!=MWAWCellContent::C_FORMULA)
++    return;
++  std::vector<MWAWCellContent::FormulaInstruction> &formula=m_content.m_formula;
++  for (size_t i=0; i<formula.size(); ++i) {
++    MWAWCellContent::FormulaInstruction &instr=formula[i];
++    int numCell=instr.m_type==MWAWCellContent::FormulaInstruction::F_Cell ? 1 :
++                instr.m_type==MWAWCellContent::FormulaInstruction::F_CellList ? 2 : 0;
++    for (int c=0; c<numCell; ++c) {
++      instr.m_position[c]-=removeDelta;
++      if (instr.m_position[c][0]<0 || instr.m_position[c][1]<0) {
++        static bool first=true;
++        if (first) {
++          MWAW_DEBUG_MSG(("ClarisWksDbaseContent::Record::updateFormulaCells: some cell's positions are bad, remove formula\n"));
++          first=false;
++          // revert to the basic cell type
++          m_content.m_contentType=m_valueType;
++          return;
++        }
++      }
++    }
++  }
++}
++
+ // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
+diff --git a/src/lib/ClarisWksDbaseContent.hxx b/src/lib/ClarisWksDbaseContent.hxx
+index 4894d31..8a40b31 100644
+--- a/src/lib/ClarisWksDbaseContent.hxx
++++ b/src/lib/ClarisWksDbaseContent.hxx
+@@ -83,7 +83,8 @@ public:
+       m_content(), m_valueType(MWAWCellContent::C_UNKNOWN), m_hasNaNValue(false), m_backgroundColor(MWAWColor::white()), m_font(3,9), m_borders(0)
+     {
+     }
+-
++    //! update the formula cell (removing delta to each position)
++    void updateFormulaCells(Vec2i const &removeDelta);
+     //! the style if known
+     int m_style;
+     //! the format
+diff --git a/src/lib/ClarisWksSpreadsheet.cxx b/src/lib/ClarisWksSpreadsheet.cxx
+index c6b9f3d..60eb293 100644
+--- a/src/lib/ClarisWksSpreadsheet.cxx
++++ b/src/lib/ClarisWksSpreadsheet.cxx
+@@ -455,6 +455,8 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener)
+     MWAW_DEBUG_MSG(("ClarisWksSpreadsheet::sendSpreadsheet: can not find content\n"));
+     return false;
+   }
++  if (m_parserState->m_kind==MWAWDocument::MWAW_K_SPREADSHEET && zId==1)
++    minData=Vec2i(0,0);
+   std::vector<float> colSize((size_t)(maxData[0]-minData[0]+1),72);
+   for (int c=minData[0], fC=0; c <= maxData[0]; ++c, ++fC) {
+     if (c>=0 && c < int(sheet.m_colWidths.size()))
+@@ -462,6 +464,7 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener)
+   }
+   sheetListener->openSheet(colSize, librevenge::RVNG_POINT);
+   MWAWInputStreamPtr &input= m_parserState->m_input;
++  bool recomputeCellPosition=(minData!=Vec2i(0,0));
+   for (int r=minData[1], fR=0; r <= maxData[1]; ++r, ++fR) {
+     if (sheet.m_rowHeightMap.find(r)!=sheet.m_rowHeightMap.end())
+       sheetListener->openSheetRow((float)sheet.m_rowHeightMap.find(r)->second, librevenge::RVNG_POINT);
+@@ -478,6 +481,8 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener)
+       // change the reference date from 1/1/1904 to 1/1/1900
+       if (rec.m_format.m_format==MWAWCell::F_DATE && rec.m_content.isValueSet())
+         rec.m_content.setValue(rec.m_content.m_value+1460);
++      if (recomputeCellPosition)
++        rec.updateFormulaCells(minData);
+       if (rec.m_borders) {
+         int wh=0;
+         for (int i=0, bit=1; i < 4; ++i, bit*=2) {
+-- 
+2.1.0
+
diff --git a/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch b/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch
new file mode 100644
index 0000000..98f07bc
--- /dev/null
+++ b/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch
@@ -0,0 +1,31 @@
+From bc03e5d29fbf3eb3f58b9f91c7e8c748239721ac Mon Sep 17 00:00:00 2001
+From: osnola <alonso at loria.fr>
+Date: Tue, 6 Jan 2015 15:48:18 +0100
+Subject: [PATCH 2/2] ClarisWors/AppleWorks[spreadsheet]: Oops, correct of a
+ mistake...
+
+---
+ src/lib/ClarisWksDbaseContent.cxx | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/ClarisWksDbaseContent.cxx b/src/lib/ClarisWksDbaseContent.cxx
+index ea15544..e175c2e 100644
+--- a/src/lib/ClarisWksDbaseContent.cxx
++++ b/src/lib/ClarisWksDbaseContent.cxx
+@@ -1413,10 +1413,10 @@ void ClarisWksDbaseContent::Record::updateFormulaCells(Vec2i const &removeDelta)
+         if (first) {
+           MWAW_DEBUG_MSG(("ClarisWksDbaseContent::Record::updateFormulaCells: some cell's positions are bad, remove formula\n"));
+           first=false;
+-          // revert to the basic cell type
+-          m_content.m_contentType=m_valueType;
+-          return;
+         }
++        // revert to the basic cell type
++        m_content.m_contentType=m_valueType;
++        return;
+       }
+     }
+   }
+-- 
+2.1.0
+
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk
index 61c43a7..e37d82d 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -13,4 +13,9 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libmwaw,$(MWAW_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,1))
 
+$(eval $(call gb_UnpackedTarball_add_patches,libmwaw,\
+	external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch \
+	external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch \
+))
+
 # vim: set noet sw=4 ts=4:
commit 15067728f2cf437f0ecd78ddaeacef91858dcb29
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 15:52:49 2015 +0000

    add cmath for std::nextafter
    
    Change-Id: Ic5580d5efb9d5a891a62630dc457624ba89c15a2

diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 28ccc2d..d124a79 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <tools/resmgr.hxx>
 #include <tools/rcid.h>
+#include <cmath>
 
 #define ADDIN_SERVICE               "com.sun.star.sheet.AddIn"
 #define MY_SERVICE                  "com.sun.star.sheet.addin.Analysis"
commit dc5ae421c31ab5bd5641259eb95b3365f78b3495
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 15:33:18 2015 +0000

    include time.h for time
    
    Change-Id: Id2fbc93fb99cd97473298e127dd5a3d82f22e438

diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index 4a96b59..ea6c6a1 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -13,6 +13,7 @@
 #include <comphelper/random.hxx>
 #include <rtl/instance.hxx>
 #include <assert.h>
+#include <time.h>
 #include <random>
 
 // this is nothing but a simple wrapper around
commit 18ad91eec1a1c23d676355d1270fe4b7b503d262
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 11:19:31 2015 +0000

    boost::random->std::random
    
    Change-Id: I1b823b6c17b731e427bff88c6fff7897f66ddb5c

diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index 4da4acb..4a96b59 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -10,12 +10,13 @@
  *   Copyright (C) 2012 Tino Kluge <tino.kluge at hrz.tu-chemnitz.de>
  */
 
-#include <boost/random.hpp>
 #include <comphelper/random.hxx>
 #include <rtl/instance.hxx>
+#include <assert.h>
+#include <random>
 
 // this is nothing but a simple wrapper around
-// the boost random generators
+// the std::random generators
 
 namespace comphelper
 {
@@ -23,21 +24,21 @@ namespace rng
 {
 
 // underlying random number generator
-// boost::mt19937 implements the Mersenne twister algorithm which
+// std::mt19937 implements the Mersenne twister algorithm which
 // is fast and has good statistical properties, it produces integers
 // in the range of [0, 2^32-1] internally
 // memory requirement: 625*sizeof(uint32_t)
 // http://en.wikipedia.org/wiki/Mersenne_twister
-#define BOOST_RNG_ALGO  boost::mt19937
+#define STD_RNG_ALGO  std::mt19937
 
 struct RandomNumberGenerator
 {
-    BOOST_RNG_ALGO global_rng;
+    STD_RNG_ALGO global_rng;
     RandomNumberGenerator()
     {
         // initialises the state of the global random number generator
         // should only be called once.
-        // (note, a few boost::variate_generator<> (like normal) have their
+        // (note, a few std::variate_generator<> (like normal) have their
         // own state which would need a reset as well to guarantee identical
         // sequence of numbers, e.g. via myrand.distribution().reset())
         global_rng.seed(time(NULL));
@@ -55,21 +56,21 @@ void reseed(int i)
 // uniform ints [a,b] distribution
 int uniform_int_distribution(int a, int b)
 {
-    boost::random::uniform_int_distribution<int> dist(a, b);
+    std::uniform_int_distribution<int> dist(a, b);
     return dist(theRandomNumberGenerator::get().global_rng);
 }
 
 // uniform ints [a,b] distribution
 unsigned int uniform_uint_distribution(unsigned int a, unsigned int b)
 {
-    boost::random::uniform_int_distribution<unsigned int> dist(a, b);
+    std::uniform_int_distribution<unsigned int> dist(a, b);
     return dist(theRandomNumberGenerator::get().global_rng);
 }
 
 // uniform size_t [a,b] distribution
 size_t uniform_size_distribution(size_t a, size_t b)
 {
-    boost::random::uniform_int_distribution<size_t> dist(a, b);
+    std::uniform_int_distribution<size_t> dist(a, b);
     return dist(theRandomNumberGenerator::get().global_rng);
 }
 
@@ -77,7 +78,7 @@ size_t uniform_size_distribution(size_t a, size_t b)
 double uniform_real_distribution(double a, double b)
 {
     assert(a < b);
-    boost::random::uniform_real_distribution<double> dist(a, b);
+    std::uniform_real_distribution<double> dist(a, b);
     return dist(theRandomNumberGenerator::get().global_rng);
 }
 
commit f86a1dbf2a6761b23f9430b6bc61e789190290c9
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jan 6 16:09:35 2015 +0100

    fdo#78921 save embedded fonts in Flat ODF
    
    Change-Id: I9d8614a5c20bab8e3b3d7c40e2504348c4386b64

diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 813f010..0441001 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -31,7 +31,9 @@
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
 
+#include "XMLBase64Export.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -217,6 +219,25 @@ OUString XMLFontAutoStylePool::Find(
     return sName;
 }
 
+namespace
+{
+
+OUString lcl_checkFontFile( const OUString &fileUrl )
+{
+    osl::DirectoryItem aDirItem;
+    if( osl::DirectoryItem::get( fileUrl, aDirItem ) == osl::File::E_None )
+    {
+        osl::FileStatus aStatus( osl_FileStatus_Mask_Type );
+        if( aDirItem.getFileStatus( aStatus ) == osl::File::E_None )
+        {
+            if( !aStatus.isDirectory() )
+                return fileUrl;
+        }
+    }
+    return OUString();
+}
+
+}
 
 void XMLFontAutoStylePool::exportXML()
 {
@@ -272,6 +293,7 @@ void XMLFontAutoStylePool::exportXML()
 
         if( tryToEmbedFonts )
         {
+            const bool bExportFlat( GetExport().getExportFlags() & SvXMLExportFlags::EMBEDDED );
             std::vector< OUString > fileUrls;
             static const FontWeight weight[] = { WEIGHT_NORMAL, WEIGHT_BOLD, WEIGHT_NORMAL, WEIGHT_BOLD };
             static const FontItalic italic[] = { ITALIC_NONE, ITALIC_NONE, ITALIC_NORMAL, ITALIC_NORMAL };
@@ -289,7 +311,7 @@ void XMLFontAutoStylePool::exportXML()
                     continue;
                 if( !fontFilesMap.count( fileUrl ))
                 {
-                    OUString docUrl = embedFontFile( fileUrl );
+                    const OUString docUrl = bExportFlat ? lcl_checkFontFile( fileUrl ) : embedFontFile( fileUrl );
                     if( !docUrl.isEmpty())
                         fontFilesMap[ fileUrl ] = docUrl;
                     else
@@ -307,11 +329,29 @@ void XMLFontAutoStylePool::exportXML()
                 {
                     if( fontFilesMap.count( *it ))
                     {
-                        GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, fontFilesMap[ *it ] );
-                        GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, "simple" );
+                        if( !bExportFlat )
+                        {
+                            GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, fontFilesMap[ *it ] );
+                            GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, "simple" );
+                        }
                         SvXMLElementExport fontFaceUri( GetExport(), XML_NAMESPACE_SVG,
                             XML_FONT_FACE_URI, true, true );
 
+                        if( bExportFlat )
+                        {
+                            const uno::Reference< ucb::XSimpleFileAccess > xFileAccess( ucb::SimpleFileAccess::create( GetExport().getComponentContext() ) );
+                            try
+                            {
+                                const uno::Reference< io::XInputStream > xInput( xFileAccess->openFileRead( fontFilesMap[ *it ] ) );
+                                XMLBase64Export aBase64Exp( GetExport() );
+                                aBase64Exp.exportOfficeBinaryDataElement( xInput );
+                            }
+                            catch( const uno::Exception & )
+                            {
+                                // opening the file failed, ignore
+                            }
+                        }
+
                         GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_STRING, "truetype" );
                         SvXMLElementExport fontFaceFormat( GetExport(), XML_NAMESPACE_SVG,
                             XML_FONT_FACE_FORMAT, true, true );
commit ca1fb20a47d68caeb8ff5a658c5f365c10e56b59
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Jan 6 15:09:53 2015 +0000

    vcldemo: add threading mode.
    
    Change-Id: I6ad5524c518a79cac7ec343398242515ef0bbb5f

diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index 44f13b2..9d2e55e 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -25,12 +25,13 @@ $(eval $(call gb_Executable_set_include,vcldemo,\
 
 $(eval $(call gb_Executable_use_libraries,vcldemo,\
 	basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
     tl \
     sal \
+	salhelper \
     vcl \
-    cppu \
-    cppuhelper \
-    comphelper \
 ))
 
 $(eval $(call gb_Executable_add_exception_objects,vcldemo,\
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index b42ef14..b4e5ed6 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -17,6 +17,7 @@
 
 #include <vcl/vclmain.hxx>
 #include <vcl/layout.hxx>
+#include <salhelper/thread.hxx>
 
 #include <tools/urlobj.hxx>
 #include <tools/stream.hxx>
@@ -1196,16 +1197,42 @@ class DemoWin : public WorkWindow
 {
     DemoRenderer &mrRenderer;
     bool underTesting;
+    bool testThreads;
+
+    class RenderThread : public salhelper::Thread {
+        DemoWin &mrWin;
+    public:
+        RenderThread(DemoWin &rWin)
+            : Thread("vcldemo render thread")
+            , mrWin(rWin)
+        {
+            launch();
+        }
+        virtual ~RenderThread()
+        {
+            join();
+        }
+        virtual void execute()
+        {
+            SolarMutexGuard aGuard;
+            fprintf (stderr, "render from a different thread\n");
+            mrWin.Paint(Rectangle());
+        }
+    };
+    rtl::Reference<RenderThread> mxThread;
+
 public:
-    DemoWin(DemoRenderer &rRenderer) :
+    DemoWin(DemoRenderer &rRenderer, bool bThreads) :
         WorkWindow(NULL, WB_APP | WB_STDWORK),
-        mrRenderer(rRenderer)
+        mrRenderer(rRenderer),
+        testThreads(bThreads)
     {
         mrRenderer.addInvalidate(this);
         underTesting = false;
     }
     virtual ~DemoWin()
     {
+        mxThread.clear();
         mrRenderer.removeInvalidate(this);
     }
     virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE
@@ -1213,9 +1240,16 @@ public:
         mrRenderer.SetSizePixel(GetSizePixel());
         if (!mrRenderer.MouseButtonDown(rMEvt))
         {
-            DemoWin *pNewWin = new DemoWin(mrRenderer);
-            pNewWin->SetText("Another interactive VCL demo window");
-            pNewWin->Show();
+            if (testThreads)
+            { // render this window asynchronously in a new thread
+                mxThread = new RenderThread(*this);
+            }
+            else
+            { // spawn another window
+                DemoWin *pNewWin = new DemoWin(mrRenderer, testThreads);
+                pNewWin->SetText("Another interactive VCL demo window");
+                pNewWin->Show();
+            }
         }
     }
     virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE
@@ -1314,7 +1348,8 @@ class DemoApp : public Application
         fprintf(stderr,"         %s\n",
                 rtl::OUStringToOString(aRenderers, RTL_TEXTENCODING_UTF8).getStr());
         fprintf(stderr,"  --test <iterCount> - create benchmark data\n");
-        fprintf(stderr, "  --widgets         - launch the widget test.\n");
+        fprintf(stderr,"  --widgets          - launch the widget test.\n");
+        fprintf(stderr,"  --threads          - render from multiple threads.\n");
         fprintf(stderr, "\n");
         return 0;
     }
@@ -1326,7 +1361,7 @@ public:
     {
         try
         {
-            bool bWidgets = false;
+            bool bWidgets = false, bThreads = false;
             DemoRenderer aRenderer;
 
             for (sal_Int32 i = 0; i < GetCommandLineParamCount(); i++)
@@ -1351,9 +1386,11 @@ public:
                 }
                 else if (aArg == "--widgets")
                     bWidgets = true;
+                else if (aArg == "--threads")
+                    bThreads = true;
             }
 
-            DemoWin aMainWin(aRenderer);
+            DemoWin aMainWin(aRenderer, bThreads);
             boost::scoped_ptr<DemoWidgets> aWidgets;
 
             aMainWin.SetText("Interactive VCL demo #1");
commit 2005e34177503cc160348c4d63d70bfeab10d531
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Tue Jan 6 23:53:39 2015 +0900

    android: set single page mode in writer when init for tiled render
    
    Change-Id: Id01b373fe7ec6620ca036b1ee7bc5debf64a92b4

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
index 513d13d..e1aeba3 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
@@ -66,6 +66,8 @@ public class LOKitTileProvider implements TileProvider {
     }
 
     public void postLoad() {
+        mDocument.initializeForRendering();
+
         int parts = mDocument.getParts();
         Log.i(LOGTAG, "Document parts: " + parts);
 
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index de1507b..16a8a14 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -441,6 +441,7 @@ public:
                             long nTileWidth,
                             long nTileHeight ) SAL_OVERRIDE;
     virtual Size getDocumentSize() SAL_OVERRIDE;
+    virtual void initializeForTiledRendering() SAL_OVERRIDE;
 
     void                        Invalidate();
     void                        Reactivate(SwDocShell* pNewDocShell);
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index d504fc0..a3493bf 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3146,6 +3146,17 @@ Size SwXTextDocument::getDocumentSize()
                 aDocSize.Height() + 2L * DOCUMENTBORDER);
 }
 
+void SwXTextDocument::initializeForTiledRendering()
+{
+    bool      bBookMode = false;
+    sal_Int16 nColumns = 1;
+
+    SwView* pView = pDocShell->GetView();
+    if (!pView)
+        return;
+    pView->SetViewLayout(nColumns, bBookMode, true);
+}
+
 void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
 {
     return SwXTextDocumentBaseClass::operator new(t);
commit 83e84b9a22f959d2feae7ac89ec5a0b0ef678770
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Tue Jan 6 23:07:42 2015 +0900

    android: take document borders into account for document size
    
    Change-Id: I62b0afd635b439653850a3d830de032006505bac

diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index ea3683f..d504fc0 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3140,7 +3140,10 @@ Size SwXTextDocument::getDocumentSize()
 {
     SwDoc* pDoc = pDocShell->GetDoc();
     SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
-    return pViewShell->GetDocSize();
+    Size aDocSize = pViewShell->GetDocSize();
+
+    return Size(aDocSize.Width()  + 2L * DOCUMENTBORDER,
+                aDocSize.Height() + 2L * DOCUMENTBORDER);
 }
 
 void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
commit 6123d6a9fbb268f823224d054cb0fe215aa3015a
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Dec 29 16:10:48 2014 +0900

    android: Add initializeForRendering to LOK
    
    Change-Id: Ibf4721bf4358ef215efde09ef688b2551604bfa2

diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java b/android/Bootstrap/src/org/libreoffice/kit/Document.java
index aad4d5a..e415d8f 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Document.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java
@@ -59,4 +59,7 @@ public class Document {
     public void paintTile(ByteBuffer buffer, int canvasWidth, int canvasHeight, int tilePositionX, int tilePositionY, int tileWidth, int tileHeight) {
         paintTileNative(buffer, canvasWidth, canvasHeight, tilePositionX, tilePositionY, tileWidth, tileHeight);
     }
+
+    public native void initializeForRendering();
+
 }
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b3593d0..8a8538e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -197,6 +197,8 @@ void        doc_paintTile(LibreOfficeKitDocument* pThis,
 static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
                                 long* pWidth,
                                 long* pHeight);
+static void doc_initializeForRendering(LibreOfficeKitDocument* pThis);
+
 
 struct LibLODocument_Impl : public _LibreOfficeKitDocument
 {
@@ -222,6 +224,7 @@ struct LibLODocument_Impl : public _LibreOfficeKitDocument
             m_pDocumentClass->setPartMode = doc_setPartMode;
             m_pDocumentClass->paintTile = doc_paintTile;
             m_pDocumentClass->getDocumentSize = doc_getDocumentSize;
+            m_pDocumentClass->initializeForRendering = doc_initializeForRendering;
 
             gDocumentClass = m_pDocumentClass;
         }
@@ -608,6 +611,15 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
     }
 }
 
+static void doc_initializeForRendering(LibreOfficeKitDocument* pThis)
+{
+    ITiledRenderable* pDoc = getTiledRenderable(pThis);
+    if (pDoc)
+    {
+        pDoc->initializeForTiledRendering();
+    }
+}
+
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index 0f408ea..2b18071 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -165,6 +165,13 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDoc
     return nWidth;
 }
 
+extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_initializeForRendering
+    (JNIEnv* pEnv, jobject aObject)
+{
+    LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
+    pDocument->pClass->initializeForRendering(pDocument);
+}
+
 extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Office_saveAs
     (JNIEnv* pEnv, jobject aObject, jstring sUrl, jstring sFormat, jstring sOptions)
 {
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index d7b8e41..de5df7f 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -113,6 +113,10 @@ struct _LibreOfficeKitDocumentClass
   void (*getDocumentSize) (LibreOfficeKitDocument* pThis,
                            long* pWidth,
                            long* pHeight);
+
+  // Initialize document for rendering.
+  void (*initializeForRendering) (LibreOfficeKitDocument* pThis);
+
 #endif // LOK_USE_UNSTABLE_API
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index f1255f4..274509c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -87,6 +87,12 @@ public:
     {
         mpDoc->pClass->getDocumentSize(mpDoc, pWidth, pHeight);
     }
+
+    inline void initializeForRendering()
+    {
+        mpDoc->pClass->initializeForRendering(mpDoc);
+    }
+
 #endif // LOK_USE_UNSTABLE_API
 };
 
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index f07ccd5..d54bbef 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -83,6 +83,10 @@ public:
     {
         (void) ePartMode;
     }
+
+    virtual void initializeForTiledRendering()
+    {
+    }
 };
 
 } // namespace vcl
commit 766c1243e6f8904e6fab70d56d143dd153e2dff1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 14:44:03 2015 +0000

    reorient name dialog and make a little narrower
    
    Change-Id: I59769d286dc3e5a7fee77d4f72711e6b48b8b7ed

diff --git a/cui/uiconfig/ui/namedialog.ui b/cui/uiconfig/ui/namedialog.ui
index c21d411..4d7bef0 100644
--- a/cui/uiconfig/ui/namedialog.ui
+++ b/cui/uiconfig/ui/namedialog.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="NameDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -9,12 +10,12 @@
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="layout_style">end</property>
+            <property name="layout_style">start</property>
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
@@ -95,7 +96,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="invisible_char">•</property>
-                <property name="width_chars">55</property>
+                <property name="width_chars">40</property>
               </object>
               <packing>
                 <property name="expand">False</property>
commit d4206deb884a7dcce40104e566b6885131ee0d5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 14:41:02 2015 +0000

    add a border
    
    Change-Id: I44f696cd09f39c425a77ae202854a77c7c2d7d20

diff --git a/cui/uiconfig/ui/movemenu.ui b/cui/uiconfig/ui/movemenu.ui
index 891ebb5..d6533a4 100644
--- a/cui/uiconfig/ui/movemenu.ui
+++ b/cui/uiconfig/ui/movemenu.ui
@@ -211,7 +211,7 @@
                     <property name="vexpand">True</property>
                     <property name="spacing">12</property>
                     <child>
-                      <object class="svtlo-SvTreeListBox" id="menulist">
+                      <object class="svtlo-SvTreeListBox" id="menulist:border">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
commit c762831e46558a90b3ddca9dfb72c5d114230331
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 14:37:56 2015 +0000

    set default button
    
    Change-Id: I3662ef26c96525480812f25706e6324ceca3e153

diff --git a/cui/uiconfig/ui/movemenu.ui b/cui/uiconfig/ui/movemenu.ui
index 8dc7e2a..891ebb5 100644
--- a/cui/uiconfig/ui/movemenu.ui
+++ b/cui/uiconfig/ui/movemenu.ui
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
-  <requires lib="LibreOffice" version="1.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -32,6 +32,8 @@
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
commit 3fda8cb3ed7c790d1b591f4f833054b777e5b490
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 14:36:05 2015 +0000

    Resolves: fdo#87823 Move Menu->New Menu
    
    Change-Id: I677b519a1bcae3266baff4577b63971b6f8add75

diff --git a/cui/uiconfig/ui/movemenu.ui b/cui/uiconfig/ui/movemenu.ui
index 952955c..8dc7e2a 100644
--- a/cui/uiconfig/ui/movemenu.ui
+++ b/cui/uiconfig/ui/movemenu.ui
@@ -16,7 +16,7 @@
   <object class="GtkDialog" id="MoveMenuDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
-    <property name="title" translatable="yes">Move Menu</property>
+    <property name="title" translatable="yes">New Menu</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
commit ba9c2376f14c2c07f4449bcf6d1345e9d82c343d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 6 13:42:51 2015 +0000

    OSL_ENSURE->assert when followed by unconditional deref
    
    Change-Id: If2130dbbb7b4afd3d88553da449163f60cdc0c1e

diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index e0a75d2..77355c3 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -346,8 +346,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
     std::list<SwAnchoredObject*> aAnchoredObjs;
     {
         const SwContact* pContact = ::GetUserCall( _rMovedAnchoredObj.GetDrawObj() );
-        OSL_ENSURE( pContact,
-                "SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
+        assert(pContact && "SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash.");
         pContact->GetAnchoredObjs( aAnchoredObjs );
     }
 
@@ -389,8 +388,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
             SdrObject* pChildObj = (*aObjIter);
             {
                 const SwContact* pContact = ::GetUserCall( pChildObj );
-                OSL_ENSURE( pContact,
-                        "SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
+                assert(pContact && "SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash.");
                 pContact->GetAnchoredObjs( aAnchoredObjs );
             }
             // move 'repeated' ones to the same order number as the already moved one.
commit 2d66de44ea456e5525ee5515c4bef1421a26c0b9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 15:22:17 2015 +0100

    external/python3: Work around -fsanitize=bounds
    
    Change-Id: I608ec429696e6a02aa528b10057d93da63544eb4

diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 72d856f..8c5b1b7 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 	external/python3/python-3.3.5-vs2013.patch.1 \
 	external/python3/python-msvc-disable-sse2.patch.1 \
 	external/python3/python-lsan.patch.0 \
+	external/python3/ubsan.patch.0 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
new file mode 100644
index 0000000..acfd189
--- /dev/null
+++ b/external/python3/ubsan.patch.0
@@ -0,0 +1,22 @@
+--- Objects/listobject.c
++++ Objects/listobject.c
+@@ -2036,7 +2036,7 @@
+     if (keys != NULL) {
+         for (i = 0; i < saved_ob_size; i++)
+             Py_DECREF(keys[i]);
+-        if (keys != &ms.temparray[saved_ob_size+1])
++        if (keys != ((char *) ms.temparray) + (saved_ob_size+1) * sizeof (PyObject *))
+             PyMem_FREE(keys);
+     }
+ 
+--- Objects/longobject.c
++++ Objects/longobject.c
+@@ -36,7 +36,7 @@
+ static PyObject *
+ get_small_int(sdigit ival)
+ {
+-    PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS);
++    PyObject *v = (PyObject*)(small_ints + (ival + NSMALLNEGINTS));
+     Py_INCREF(v);
+ #ifdef COUNT_ALLOCS
+     if (ival >= 0)
commit 86b436d797081f63036a0db91802bc74aa0501aa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 15:21:42 2015 +0100

    external/openssl: Work around -fsanitize=null
    
    Change-Id: Ic47a1b43323f84971aed9b3cdb2ec83f9e931d6a

diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index 98844b9..cf5f5dd 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
 	$(if $(filter SOLARIS,$(OS)),external/openssl/opensslsol.patch) \
 	$(if $(filter IOS,$(OS)),external/openssl/opensslios.patch) \
 	$(if $(filter MACOSXPOWERPC,$(OS)$(CPUNAME)),external/openssl/opensslosxppc.patch) \
+    external/openssl/ubsan.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/openssl/ubsan.patch.0 b/external/openssl/ubsan.patch.0
new file mode 100644
index 0000000..c3fffb3
--- /dev/null
+++ b/external/openssl/ubsan.patch.0
@@ -0,0 +1,10 @@
+--- crypto/engine/eng_table.c
++++ crypto/engine/eng_table.c
+@@ -346,6 +346,6 @@
+ 	ENGINE_PILE_DOALL dall;
+ 	dall.cb = cb;
+ 	dall.arg = arg;
+-	lh_ENGINE_PILE_doall_arg(&table->piles, LHASH_DOALL_ARG_FN(int_cb),
++	lh_ENGINE_PILE_doall_arg(table ? &table->piles : NULL, LHASH_DOALL_ARG_FN(int_cb),
+ 				 ENGINE_PILE_DOALL, &dall);
+ 	}
commit 8672eca430213c28936a526df6266226ecb7ab2d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 14:35:18 2015 +0100

    -Werror,-Wmacro-redefined (under Clang -fsanitize=*)
    
    Change-Id: Ifd23373b1ac4919793d1b4251ed90cf2dd6f2bda

diff --git a/jurt/source/pipe/staticsalhack.cxx b/jurt/source/pipe/staticsalhack.cxx
index b2c10d4..23afde1 100644
--- a/jurt/source/pipe/staticsalhack.cxx
+++ b/jurt/source/pipe/staticsalhack.cxx
@@ -14,13 +14,6 @@
 #undef SAL_LOG_WARN
 
 #include <sal/rtl/string.cxx>
-#undef IMPL_RTL_EMPTYSTRING
-#undef IMPL_RTL_STRCODE
-#undef IMPL_RTL_STRINGDATA
-#undef IMPL_RTL_STRINGNAME
-#undef IMPL_RTL_STRNAME
-#undef IMPL_RTL_USTRCODE
-#undef RTL_LOG_STRING_BITS
 #include <sal/rtl/ustring.cxx>
 
 #include <sal/osl/unx/conditn.cxx>
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 07842ec..a71ba16 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -76,6 +76,15 @@ static rtl_String const aImplEmpty_rtl_String =
 
 #include "strtmpl.cxx"
 
+#undef IMPL_RTL_EMPTYSTRING
+#undef IMPL_RTL_IS_USTRING
+#undef IMPL_RTL_STRCODE
+#undef IMPL_RTL_STRINGDATA
+#undef IMPL_RTL_STRINGNAME
+#undef IMPL_RTL_STRNAME
+#undef IMPL_RTL_USTRCODE
+#undef RTL_LOG_STRING_BITS
+
 sal_Int32 SAL_CALL rtl_str_valueOfFloat(sal_Char * pStr, float f)
     SAL_THROW_EXTERN_C()
 {
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index a9406d8..0828425 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -84,6 +84,15 @@ static void internRelease (rtl_uString *pThis);
 
 #include "strtmpl.cxx"
 
+#undef IMPL_RTL_EMPTYSTRING
+#undef IMPL_RTL_IS_USTRING
+#undef IMPL_RTL_STRCODE
+#undef IMPL_RTL_STRINGDATA
+#undef IMPL_RTL_STRINGNAME
+#undef IMPL_RTL_STRNAME
+#undef IMPL_RTL_USTRCODE
+#undef RTL_LOG_STRING_BITS
+
 sal_Int32 rtl_ustr_indexOfAscii_WithLength(
     sal_Unicode const * str, sal_Int32 len,
     char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
commit 1b9d9680d9c444a126413ebb996b3bf6b2085de5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 14:34:34 2015 +0100

    Work around loplugin:cstylecast under -fsanitize=*
    
    Change-Id: I467d032296607d22e850c95e56c452fe7e62cebe

diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx
index bce3e0f..7c41073 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -103,7 +103,13 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
         }
     } else {
         if (filename.startswith(SRCDIR "/include/tools/solar.h")
-           || filename.startswith(SRCDIR "/include/cppuhelper/")) {
+           || filename.startswith(SRCDIR "/include/cppuhelper/")
+           || ((StringRef(
+                    compiler.getSourceManager().getFileEntryForID(
+                        compiler.getSourceManager().getMainFileID())
+                    ->getName())
+                == SRCDIR "/jurt/source/pipe/staticsalhack.cxx")
+               && filename.startswith(SRCDIR "/sal/"))) {
             return true;
         }
     }
commit 8d2501feb2a43e11bd144581bb7ffc7684d1afec
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 6 13:22:33 2015 +0100

    Remove unnecessary include files declaring JNI functions
    
    Change-Id: Ie9e083a9dcdaebf9f481bae920eddef69e47c3bc

diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 4c38968..9ec7230 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/io/XStream.hpp>
 #include "hsqldb/HStorageMap.hxx"
-#include "hsqldb/StorageNativeInputStream.h"
 #include "accesslog.hxx"
 #include "diagnose_ex.h"
 #include <osl/diagnose.h>
@@ -45,7 +44,7 @@ using namespace ::connectivity::hsqldb;
  * Method:    openStream
  * Signature: (Ljava/lang/String;Ljava/lang/String;I)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key, jint mode)
 {
 #ifdef HSQLDB_DBG
@@ -63,7 +62,7 @@ void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream
  * Method:    close
  * Signature: (Ljava/lang/String;Ljava/lang/String;)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key)
 {
 #ifdef HSQLDB_DBG
@@ -102,7 +101,7 @@ void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close
  * Method:    getFilePointer
  * Signature: (Ljava/lang/String;Ljava/lang/String;)J
  */
-jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePointer
+extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePointer
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key)
 {
 #ifdef HSQLDB_DBG
@@ -126,7 +125,7 @@ jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePoi
  * Method:    length
  * Signature: (Ljava/lang/String;Ljava/lang/String;)J
  */
-jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_length
+extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_length
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key)
 {
 #ifdef HSQLDB_DBG
@@ -193,7 +192,7 @@ jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name,
  * Method:    read
  * Signature: (Ljava/lang/String;Ljava/lang/String;)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2
   (JNIEnv* env, jobject obj_this, jstring name, jstring key)
 {
 #ifdef HSQLDB_DBG
@@ -266,7 +265,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js
  * Method:    read
  * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2_3BII
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2_3BII
   (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len)
 {
 #ifdef HSQLDB_DBG
@@ -287,7 +286,7 @@ jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava
  * Method:    readInt
  * Signature: (Ljava/lang/String;Ljava/lang/String;)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key)
 {
 #ifdef HSQLDB_DBG
@@ -355,7 +354,7 @@ jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt
  * Method:    seek
  * Signature: (Ljava/lang/String;Ljava/lang/String;J)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek
   (JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key, jlong position)
 {
 #ifdef HSQLDB_DBG
@@ -467,7 +466,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
  * Method:    write
  * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write
   (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len)
 {
 #ifdef HSQLDB_DBG
@@ -526,7 +525,7 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j
  * Method:    writeInt
  * Signature: (Ljava/lang/String;Ljava/lang/String;I)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt
   (JNIEnv * env, jobject obj_this,jstring name, jstring key, jint v)
 {
 #ifdef HSQLDB_DBG
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 04c7d80..740fe73 100644
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -23,7 +23,6 @@
 #endif
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
-#include "hsqldb/StorageFileAccess.h"
 #include "hsqldb/HStorageMap.hxx"
 #include <osl/diagnose.h>
 
@@ -40,7 +39,7 @@ using namespace ::connectivity::hsqldb;
  * Method:    isStreamElement
  * Signature: (Ljava/lang/String;Ljava/lang/String;)Z
  */
-jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement
+extern "C" SAL_JNI_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name)
 {
     TStorages::mapped_type aStoragePair = StorageContainer::getRegisteredStorage(StorageContainer::jstring2ustring(env,key));
@@ -92,7 +91,7 @@ jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamE
  * Method:    removeElement
  * Signature: (Ljava/lang/String;Ljava/lang/String;)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name)
 {
 #ifdef HSQLDB_DBG
@@ -127,7 +126,7 @@ void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement
  * Method:    renameElement
  * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring oldname, jstring newname)
 {
 #ifdef HSQLDB_DBG
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index 435218e..fea9a9c 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -29,7 +29,6 @@
 #include <comphelper/types.hxx>
 #include "hsqldb/HStorageAccess.hxx"
 #include "hsqldb/HStorageMap.hxx"
-#include "hsqldb/StorageNativeInputStream.h"
 
 #include <jvmaccess/virtualmachine.hxx>
 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -57,7 +56,7 @@ using namespace ::connectivity::hsqldb;
  * Method:    openStream
  * Signature: (Ljava/lang/String;Ljava/lang/String;I)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_openStream
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_openStream
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name, jint mode)
 {
 #ifdef HSQLDB_DBG
@@ -75,7 +74,7 @@ void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_openSt
  * Method:    read
  * Signature: (Ljava/lang/String;Ljava/lang/String;)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2
   (JNIEnv * env, jobject obj_this,jstring key, jstring name)
 {
 #ifdef HSQLDB_DBG
@@ -94,7 +93,7 @@ jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__
  * Method:    read
  * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3BII
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3BII
   (JNIEnv * env, jobject obj_this,jstring key, jstring name, jbyteArray buffer, jint off, jint len)
 {
 #ifdef HSQLDB_DBG
@@ -113,7 +112,7 @@ jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__
  * Method:    close
  * Signature: (Ljava/lang/String;Ljava/lang/String;)V
  */
-void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_close
+extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_close
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name)
 {
 #ifdef HSQLDB_DBG
@@ -133,7 +132,7 @@ void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_close
  * Method:    skip
  * Signature: (Ljava/lang/String;Ljava/lang/String;J)J
  */
-jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_skip
+extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_skip
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name, jlong n)
 {
 #ifdef HSQLDB_DBG
@@ -199,7 +198,7 @@ jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_skip
  * Method:    available
  * Signature: (Ljava/lang/String;Ljava/lang/String;)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_available
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_available
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name)
 {
 #ifdef HSQLDB_DBG
@@ -241,7 +240,7 @@ jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_availa
  * Method:    read
  * Signature: (Ljava/lang/String;Ljava/lang/String;[B)I
  */
-jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3B
+extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3B
   (JNIEnv * env, jobject /*obj_this*/,jstring key, jstring name, jbyteArray buffer)
 {
 #ifdef HSQLDB_DBG
diff --git a/connectivity/source/inc/hsqldb/HStorageAccess.h b/connectivity/source/inc/hsqldb/HStorageAccess.h
deleted file mode 100644
index 9d26fda..0000000
--- a/connectivity/source/inc/hsqldb/HStorageAccess.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess */
-
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_H
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_H
-
-#include <sal/config.h>
-
-#include <sal/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* Inaccessible static: class_00024com_00024sun_00024star_00024sdbcx_00024comp_00024hsqldb_00024StorageNativeOutputStream */
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    openStream
- * Signature: (Ljava/lang/String;Ljava/lang/String;I)V
- */
-SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream
-  (JNIEnv *, jobject, jstring, jstring, jint);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    close
- * Signature: (Ljava/lang/String;Ljava/lang/String;)V
- */
-SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    getFilePointer
- * Signature: (Ljava/lang/String;Ljava/lang/String;)J
- */
-SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePointer
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    length
- * Signature: (Ljava/lang/String;Ljava/lang/String;)J
- */
-SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_length
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    read
- * Signature: (Ljava/lang/String;Ljava/lang/String;)I
- */
-SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    read
- * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)I
- */
-SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2_3BII
-  (JNIEnv *, jobject, jstring, jstring, jbyteArray, jint, jint);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    readInt
- * Signature: (Ljava/lang/String;Ljava/lang/String;)I
- */
-SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt
-  (JNIEnv *, jobject, jstring, jstring);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    seek
- * Signature: (Ljava/lang/String;Ljava/lang/String;J)V
- */
-SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek
-  (JNIEnv *, jobject, jstring, jstring, jlong);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    write
- * Signature: (Ljava/lang/String;Ljava/lang/String;[BII)V
- */
-SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write
-  (JNIEnv *, jobject, jstring, jstring, jbyteArray, jint, jint);
-
-/*
- * Class:     com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess
- * Method:    writeInt
- * Signature: (Ljava/lang/String;Ljava/lang/String;I)V
- */
-SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt
-  (JNIEnv *, jobject, jstring, jstring, jint);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/hsqldb/HStorageAccess.hxx b/connectivity/source/inc/hsqldb/HStorageAccess.hxx
index b1e6b85..0133691 100644
--- a/connectivity/source/inc/hsqldb/HStorageAccess.hxx
+++ b/connectivity/source/inc/hsqldb/HStorageAccess.hxx
@@ -20,7 +20,9 @@
 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_HXX
 #define INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_HXX
 
-#include "hsqldb/HStorageAccess.h"
+#include <sal/config.h>
+
+#include <jni.h>
 
 namespace connectivity { namespace hsqldb
 {
diff --git a/connectivity/source/inc/hsqldb/StorageFileAccess.h b/connectivity/source/inc/hsqldb/StorageFileAccess.h
deleted file mode 100644
index dbbe073..0000000
--- a/connectivity/source/inc/hsqldb/StorageFileAccess.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list