[Libreoffice-commits] core.git: Branch 'feature/calctiledrendering' - 26 commits - avmedia/Library_avmedia.mk avmedia/Library_avmediaogl.mk avmedia/source configure.ac connectivity/source desktop/Library_sofficeapp.mk desktop/source download.lst external/libgltf forms/source include/connectivity include/svx include/xmloff libreofficekit/source readlicense_oo/license RepositoryExternal.mk sc/source sfx2/source svx/source sw/inc sw/source toolkit/source

Andrzej Hunt andrzej.hunt at collabora.com
Wed Jun 25 06:50:52 PDT 2014


Rebased ref, commits from common ancestor:
commit 8fe04195fc5d98efa18b2a2c2f809a98eb2dd535
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Tue Jun 24 22:06:59 2014 +0100

    Use output device mapping for draw layer too.
    
    Otherwise draw layer items don't get scaled at all for tiled
    rendering.
    
    Change-Id: If65d460a83fb29b8eda692cb7c1f2bd9f7283e62

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index cad96f3..a34b95e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -602,7 +602,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
     }
 
     // define drawing layer map mode and paint rectangle
-    const MapMode aDrawMode = GetDrawMapMode();
+    MapMode aDrawMode = pOutDev->GetMapMode();
+    aDrawMode.SetMapUnit( MAP_100TH_MM );
     Rectangle aDrawingRectLogic;
 
     {
commit af1bf5b5bd620a0bed915ec32c61bea8dff88a09
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Tue Jun 24 21:16:15 2014 +0100

    Turns out document coordinates are already in TWIPs.
    
    This now means that fonts are also correctly scaled,
    whereas the 100th mm mapping caused fonts to be scaled
    differently to the grid (i.e. looked ugly).
    
    Change-Id: Ib8b913490823a7ba406e52291e52d50053ae32b8

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 8f47511..cad96f3 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -413,7 +413,7 @@ Size ScGridWindow::GetDataAreaSize()
     // the data area.
 
     // This doesn't include the final (bottom & right) borders...
-    return Size( nX * 1440L / 2540L, nY * 1440L / 2540L );
+    return Size( nX, nY );
 }
 
 //  Draw  ----------------------------------------------------------------
@@ -923,25 +923,14 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
                               int nTilePosX, int nTilePosY,
                               long nTileWidth, long nTileHeight )
 {
-    // Scaling. Must convert from pixels to TWIPs. We know
-    // that VirtualDevices use a DPI of 96. We might as well do this
-    // calculation now, rather than after another dimension conversion,
-    // to minimise errors.
     Fraction scaleX = Fraction( nOutputWidth, 96 ) * Fraction(1440L) /
                                 Fraction( nTileWidth);
     Fraction scaleY =  Fraction( nOutputHeight, 96 ) * Fraction(1440L) /
                                  Fraction( nTileHeight);
 
-    // Now scale back to 100th mm dimensions.
-    nTilePosX = nTilePosX * 2540L / 1440L;
-    nTilePosY = nTilePosY * 2540L / 1440L;
-
-    nTileWidth = nTileWidth * 2540L / 1440L;
-    nTileHeight = nTileHeight * 2540L / 1440L;
-
     rDevice.SetOutputSizePixel( Size( nOutputWidth, nOutputHeight ) );
     MapMode aMapMode( rDevice.GetMapMode() );
-    aMapMode.SetMapUnit( MAP_100TH_MM );
+    aMapMode.SetMapUnit( MAP_TWIP );
     aMapMode.SetOrigin( Point( -nTilePosX, -nTilePosY ) ); // size
 
     aMapMode.SetScaleX( scaleX );
commit c17eb554f4dddcee6a7bf639d332b3b3bf863ceb
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 20 11:07:33 2014 +0100

    Set correct scaling for normal painting.
    
    As we no longer read the scaling from the viewdata, we should
    instead set it on the output device when doing normal rendering.
    
    However the grid still doesn't exactly match the external axes yet,
    there are probably more rounding errors wherever they are painted.
    
    Change-Id: I25b1bd9b344115578fe892aa94fbf753a3c10c81

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index d322885..8f47511 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -301,6 +301,11 @@ void ScGridWindow::PrePaint()
 
 void ScGridWindow::Paint( const Rectangle& rRect )
 {
+    MapMode aMapMode( GetMapMode() );
+    aMapMode.SetMapUnit( MAP_TWIP );
+    aMapMode.SetScaleX( pViewData->GetZoomX() * Fraction(0.96) );
+    aMapMode.SetScaleY( pViewData->GetZoomY() * Fraction(0.96) );
+    SetMapMode( aMapMode );
     Paint( rRect, this );
 }
 
commit 8cb3b4228ad7fa7f28d8c045cbfa62cdaffd93f0
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 20 10:35:45 2014 +0100

    Use output device scaling to determine cells in draw-area.
    
    Change-Id: Idf4e6ccb72090a55b6a9234cafae21821e3df0b0

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 8cab7fe..d322885 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -342,9 +342,6 @@ void ScGridWindow::Paint( const Rectangle& rRect, OutputDevice* pOutDev )
 
     SCTAB nTab = pViewData->GetTabNo();
 
-    double nPPTX = pViewData->GetPPTX();
-    double nPPTY = pViewData->GetPPTY();
-
     Rectangle aMirroredPixel = aPixRect;
     if ( pDoc->IsLayoutRTL( nTab ) )
     {
@@ -354,26 +351,30 @@ void ScGridWindow::Paint( const Rectangle& rRect, OutputDevice* pOutDev )
         aMirroredPixel.Right() = nWidth - 1 - aPixRect.Left();
     }
 
-    long nScrX = ScViewData::ToPixel( pDoc->GetColWidth( nX1, nTab ), nPPTX );
+    long nScrX = pOutDev->LogicToPixel( Point( pDoc->GetColWidth( nX1, nTab ), 0 ) ).getX();/*ScViewData::ToPixel( pDoc->GetColWidth( nX1, nTab ), nPPTX );*/
     while ( nScrX <= aMirroredPixel.Left() && nX1 < MAXCOL )
     {
         ++nX1;
-        nScrX += ScViewData::ToPixel( pDoc->GetColWidth( nX1, nTab ), nPPTX );
+        nScrX += pOutDev->LogicToPixel( Point( pDoc->GetColWidth( nX1, nTab ), 0 ) ).getX();
     }
     SCCOL nX2 = nX1;
     while ( nScrX <= aMirroredPixel.Right() && nX2 < MAXCOL )
     {
         ++nX2;
-        nScrX += ScViewData::ToPixel( pDoc->GetColWidth( nX2, nTab ), nPPTX );
+        nScrX += pOutDev->LogicToPixel( Point( pDoc->GetColWidth( nX2, nTab ), 0 ) ).getX();
     }
 
     long nScrY = 0;
-    ScViewData::AddPixelsWhile( nScrY, aPixRect.Top(), nY1, MAXROW, nPPTY, pDoc, nTab);
+    while ( nScrY < aPixRect.Top() && nY1 < MAXROW )
+    {
+        ++nY1;
+        nScrY += pOutDev->LogicToPixel( Point( 0, pDoc->GetRowHeight( nY1, nTab ) ) ).getY();
+    }
     SCROW nY2 = nY1;
-    if (nScrY <= aPixRect.Bottom() && nY2 < MAXROW)
+    while ( nScrY <= aPixRect.Bottom() && nY2 < MAXROW )
     {
         ++nY2;
-        ScViewData::AddPixelsWhile( nScrY, aPixRect.Bottom(), nY2, MAXROW, nPPTY, pDoc, nTab);
+        nScrY += pOutDev->LogicToPixel( Point( 0, pDoc->GetRowHeight( nY2, nTab ) ) ).getY();
     }
 
     Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS, pOutDev );           // nicht weiterzeichnen
commit 7efb1fa27ef52785d6a9291d5e599a9775711ced
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 20 09:38:50 2014 +0100

    Don't scale grid and cell dimensions multiple times.
    
    Previously we had multiple layers of scaling, with rounding
    errors propagating, leading to up to 5% differences in expected
    and rendered sheet widths -- for tiled rendering dimensions have
    to scale accurately as we may paint the same tile at multiple zoom
    levels, by eliminating multiple scaling and letting the output
    device instead deal with the scaling once we can eliminate these
    errors. (However currently rendering of text/images isn't quite right.)
    
    Change-Id: I0a725fd5c030f3c089c2bbd25947088c321eb2d4

diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index a6b7b90..4313856 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -278,7 +278,7 @@ void ScDocument::FillInfo(
             RowInfo* pThisRowInfo = &pRowInfo[nArrRow];
             pThisRowInfo->pCellInfo = NULL;                 // wird unten belegt
 
-            sal_uInt16 nHeight = (sal_uInt16) ( nDocHeight * fRowScale );
+            sal_uInt16 nHeight = nDocHeight;
             if (!nHeight)
                 nHeight = 1;
 
@@ -393,11 +393,7 @@ void ScDocument::FillInfo(
         {
             if (!ColHidden(nX, nTab))
             {
-                sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * fColScale);
-                if (!nThisWidth)
-                    nThisWidth = 1;
-
-                pRowInfo[0].pCellInfo[nArrCol].nWidth = nThisWidth;
+                pRowInfo[0].pCellInfo[nArrCol].nWidth = GetColWidth( nX, nTab );
             }
         }
     }
@@ -418,9 +414,7 @@ void ScDocument::FillInfo(
             // TODO: Optimize this loop.
             if (!ColHidden(nX, nTab))
             {
-                sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * fColScale);
-                if (!nThisWidth)
-                    nThisWidth = 1;
+                int nThisWidth = GetColWidth( nX, nTab );
 
                 pRowInfo[0].pCellInfo[nArrCol].nWidth = nThisWidth;           //! dies sollte reichen
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index ee86806..8cab7fe 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -711,7 +711,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
     else
         aOutputData.SetSolidBackground(true);
 
-    pContentDev->SetMapMode(MAP_PIXEL);
     aOutputData.DrawDocumentBackground();
 
     if ( bGridFirst && ( bGrid || bPage ) )
@@ -918,18 +917,27 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
                               int nTilePosX, int nTilePosY,
                               long nTileWidth, long nTileHeight )
 {
+    // Scaling. Must convert from pixels to TWIPs. We know
+    // that VirtualDevices use a DPI of 96. We might as well do this
+    // calculation now, rather than after another dimension conversion,
+    // to minimise errors.
+    Fraction scaleX = Fraction( nOutputWidth, 96 ) * Fraction(1440L) /
+                                Fraction( nTileWidth);
+    Fraction scaleY =  Fraction( nOutputHeight, 96 ) * Fraction(1440L) /
+                                 Fraction( nTileHeight);
+
+    // Now scale back to 100th mm dimensions.
+    nTilePosX = nTilePosX * 2540L / 1440L;
+    nTilePosY = nTilePosY * 2540L / 1440L;
+
+    nTileWidth = nTileWidth * 2540L / 1440L;
+    nTileHeight = nTileHeight * 2540L / 1440L;
+
     rDevice.SetOutputSizePixel( Size( nOutputWidth, nOutputHeight ) );
-    // setup the output device to draw the tile
     MapMode aMapMode( rDevice.GetMapMode() );
-    aMapMode.SetMapUnit( MAP_TWIP );
-    aMapMode.SetOrigin( Point( -nTilePosX, -nTilePosY ) );
+    aMapMode.SetMapUnit( MAP_100TH_MM );
+    aMapMode.SetOrigin( Point( -nTilePosX, -nTilePosY ) ); // size
 
-    // Scaling. Must convert from pixels to twips. We know
-    // that VirtualDevises use a DPI of 96.
-    Fraction scaleX = Fraction( nOutputWidth, 96 ) * Fraction(1440L) /
-                                Fraction( nTileWidth);
-    Fraction scaleY = Fraction( nOutputHeight, 96 ) * Fraction(1440L) /
-                                Fraction( nTileHeight);
     aMapMode.SetScaleX( scaleX );
     aMapMode.SetScaleY( scaleY );
     rDevice.SetMapMode( aMapMode );
commit d84a15cf0032bfbc8cacb9b8948635f191c238e7
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 20 09:35:16 2014 +0100

    Return TWIPS for calc document size.
    
    We already use TWIPS for other uses of tiled rendering, so might
    as well stay consistent.
    
    Change-Id: I5897480f152c1ee9734443296d152436a049e32d

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index eccb895..614d219 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -322,10 +322,18 @@ public:
     virtual bool    PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     virtual void    Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE;
 
+    // Paint a tile -- all tile dimensions are in TWIPS.
+    // It is possible to request an infinitely large area, i.e. you are not
+    // restricted to the area in GetDataAreaSize.
     void            PaintTile( VirtualDevice& rDevice,
                                int nOutputWidth, int nOutputHeight,
                                int nTilePosX, int nTilePosY,
                                long nTileWidth, long nTileHeight );
+    // Get the area in the document that contains renderable content. This
+    // is primarily a guide as to the area that should be rendered for read
+    // only documents, however for writeable documents you probably want to
+    // dynamically grab more cells in case the user wants to write to them etc.
+    // This returns a size in TWIPS, suitable for use in PaintTile.
     Size            GetDataAreaSize();
 
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index cbd2ad8..ee86806 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -403,11 +403,11 @@ Size ScGridWindow::GetDataAreaSize()
         nY += pDoc->GetRowHeight( i, nTab );
     }
 
-    // TODO: the scaling is wrong.
-    // TODO: this also ignores any images / etc., which could be outside
+    // TODO: this ignores any images / etc., which could be outside
     // the data area.
 
-    return Size( nX, nY );
+    // This doesn't include the final (bottom & right) borders...
+    return Size( nX * 1440L / 2540L, nY * 1440L / 2540L );
 }
 
 //  Draw  ----------------------------------------------------------------
commit db4a462c4ba2c6fa48e6ef0c18470a1d2ff71ac6
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Wed Jun 18 09:33:16 2014 +0100

    Implement data area size retrieval.
    
    The scaling is wrong, but seems to work in principle
    (i.e. we get roughly 1.5x the correct size).
    
    Change-Id: I6db1986e6cb1e5f3889ec3a462d999a9eab57331

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 84fcf8a..eccb895 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -326,6 +326,7 @@ public:
                                int nOutputWidth, int nOutputHeight,
                                int nTilePosX, int nTilePosY,
                                long nTileWidth, long nTileHeight );
+    Size            GetDataAreaSize();
 
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 00993eb..ca18caa 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -463,10 +463,15 @@ void ScModelObj::paintTile( VirtualDevice& rDevice,
 
 Size ScModelObj::getDocumentSize()
 {
-    // TODO: not sure what we want to do here, maybe just return the size for a certain
-    // default minimum number of cells, e.g. 100x100 and more if more cells have
-    // content?
-    return Size( 3200, 3200 );
+    // There seems to be no clear way of getting the grid window for this
+    // particular document, hence we need to hope we get the right window.
+    ScViewData* pViewData = ScDocShell::GetViewData();
+    ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+
+    // We simply return the data area -- it is however possible to request
+    // tiles to be rendered outside this area, ie this is the minimum that
+    // the client should allow the user to see.
+    return pGridWindow->GetDataAreaSize();
 }
 
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 3db37cb..cbd2ad8 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -380,6 +380,36 @@ void ScGridWindow::Paint( const Rectangle& rRect, OutputDevice* pOutDev )
     bIsInPaint = false;
 }
 
+Size ScGridWindow::GetDataAreaSize()
+{
+    ScDocument* pDoc = pViewData->GetDocument();
+    SCCOL nStartCol = 0, nEndCol = MAXCOL;
+    SCROW nStartRow = 0, nEndRow = MAXROW;
+
+    SCTAB nTab = pViewData->GetTabNo();
+
+    pDoc->ShrinkToDataArea( nTab,
+                            nStartCol, nStartRow, nEndCol, nEndRow );
+
+    long nX = 0;
+    for ( SCCOL i = 0; i <= nEndCol; i++ )
+    {
+        nX += pDoc->GetColWidth( i, nTab );
+    }
+
+    long nY = 0;
+    for ( SCROW i = 0; i <= nEndRow; i++ )
+    {
+        nY += pDoc->GetRowHeight( i, nTab );
+    }
+
+    // TODO: the scaling is wrong.
+    // TODO: this also ignores any images / etc., which could be outside
+    // the data area.
+
+    return Size( nX, nY );
+}
+
 //  Draw  ----------------------------------------------------------------
 void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode,
                          OutputDevice* pOutDev )
@@ -480,6 +510,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
 
     Fraction aZoomX = pViewData->GetZoomX();
     Fraction aZoomY = pViewData->GetZoomY();
+
     ScOutputData aOutputData( pOutDev, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
                                 nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
                                 &aZoomX, &aZoomY );
commit fd5f5483d679c2d65f136014d24671e48eb01f4e
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Wed Jun 18 08:28:04 2014 +0100

    Allow overriding of device for Paint, and use that for Tiles.
    
    Paint handles figuring out which cells are within the visible area
    for us etc.
    
    Gridwin being a Window which paints to itself is a bit of a pain,
    since we now need to be able to reroute painting calls to alternative
    output devices, however these changes seem to be sufficient to at least
    get the cells in the desired tile rendered.
    
    Change-Id: I7bd1434c97acc6e9ef6e1e63cbcf039b987c88e4

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index dede149..84fcf8a 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -292,6 +292,7 @@ protected:
     virtual void    Resize( const Size& rSize );
     virtual void    PrePaint() SAL_OVERRIDE;
     virtual void    Paint( const Rectangle& rRect ) SAL_OVERRIDE;
+    virtual void    Paint( const Rectangle& rRect, OutputDevice* pOutDev);
     virtual void    KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
     virtual void    GetFocus() SAL_OVERRIDE;
     virtual void    LoseFocus() SAL_OVERRIDE;
@@ -361,7 +362,7 @@ public:
     using Window::Draw;
     void            Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
                           ScUpdateMode eMode = SC_UPDATE_ALL,
-                          OutputDevice* pOutDev = 0 );
+                          OutputDevice* pOutDev = 0);
 
     void            CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index eafcdf1..3db37cb 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -301,6 +301,11 @@ void ScGridWindow::PrePaint()
 
 void ScGridWindow::Paint( const Rectangle& rRect )
 {
+    Paint( rRect, this );
+}
+
+void ScGridWindow::Paint( const Rectangle& rRect, OutputDevice* pOutDev )
+{
     ScDocument* pDoc = pViewData->GetDocument();
     if ( pDoc->IsInInterpreter() )
     {
@@ -330,7 +335,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
 
     bIsInPaint = true;
 
-    Rectangle aPixRect = LogicToPixel( rRect );
+    Rectangle aPixRect = pOutDev->LogicToPixel( rRect );
 
     SCCOL nX1 = pViewData->GetPosX(eHWhich);
     SCROW nY1 = pViewData->GetPosY(eVWhich);
@@ -371,8 +376,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
         ScViewData::AddPixelsWhile( nScrY, aPixRect.Bottom(), nY2, MAXROW, nPPTY, pDoc, nTab);
     }
 
-    Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS );           // nicht weiterzeichnen
-
+    Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS, pOutDev );           // nicht weiterzeichnen
     bIsInPaint = false;
 }
 
@@ -588,7 +592,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
         }
 
         // get logic positions
-        aDrawingRectLogic = PixelToLogic(aDrawingRectPixel, aDrawMode);
+        aDrawingRectLogic = pOutDev->PixelToLogic(aDrawingRectPixel, aDrawMode);
     }
 
     // device for document content, used by overlay manager
@@ -846,7 +850,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
         DrawRect( Rectangle( aStart,aEnd ) );
 
         SetMapMode(pViewData->GetLogicMode());
-        pEditView->Paint( PixelToLogic( Rectangle( Point( nScrX, nScrY ),
+        pEditView->Paint( pOutDev->PixelToLogic( Rectangle( Point( nScrX, nScrY ),
                             Size( aOutputData.GetScrW(), aOutputData.GetScrH() ) ) ) );
         SetMapMode(MAP_PIXEL);
     }
@@ -906,7 +910,9 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
         pDrawView->AddWindowToPaintView( &rDevice );
     }
 
-    Draw( 0, 0, 3, 3, SC_UPDATE_ALL, &rDevice );
+    Paint( Rectangle( Point(nTilePosX, nTilePosY),
+                      rDevice.PixelToLogic(Size(nOutputWidth, nOutputHeight))),
+           &rDevice );
 
     if ( pDrawView )
     {
commit 4acc678c9c65ff52c3d128132cd746dc78ac3504
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Mon Jun 16 16:19:56 2014 +0100

    Calc: Add tiled rendering device to the paint view.
    
    This prevents the previous warnings of
    SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), \
    this should never be needed
    
    Change-Id: I76cb7c9ed4d45bfcbd297f697314309b4e036f80

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 020fb4e..eafcdf1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -34,6 +34,7 @@
 
 #include "gridwin.hxx"
 #include "viewdata.hxx"
+#include "drawview.hxx"
 #include "output.hxx"
 #include "document.hxx"
 #include "attrib.hxx"
@@ -898,7 +899,19 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
     aMapMode.SetScaleY( scaleY );
     rDevice.SetMapMode( aMapMode );
 
+    ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
+    SdrView* pDrawView = pTabViewSh->GetScDrawView();
+    if ( pDrawView )
+    {
+        pDrawView->AddWindowToPaintView( &rDevice );
+    }
+
     Draw( 0, 0, 3, 3, SC_UPDATE_ALL, &rDevice );
+
+    if ( pDrawView )
+    {
+        pDrawView->DeleteWindowFromPaintView( &rDevice );
+    }
 }
 
 void ScGridWindow::CheckNeedsRepaint()
commit d2f79f311ffc9672ea8592a7dc03e1f3575d6382
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Mon Jun 16 15:00:02 2014 +0100

    Render tiles from calc.
    
    Currently the document size and number of cells to be rendered
    is hardcoded, this will need some more work to select the correct
    cells for a given tile (i.e. cells from location). Also, there
    isn't really a "size" for a calc sheet, so presumably we'd need
    to instead return the area containing cells that aren't empty,
    whilst still being able to render larger tiles? (And in any case
    the client will need to be aware of this and provide an appropriate
    interface, i.e. the current LO UI simply extends the sheet ad-infinitum.)
    
    We also currently get some warnings most likely related to the way
    we push our OutputDevice into the rendering methods:
    SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), \
    this should never be needed
    
    Change-Id: Ia9d64d7de6c22d5b401350f88497a7ec106f1973

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 17b02f8..dede149 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -360,7 +360,8 @@ public:
 
     using Window::Draw;
     void            Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
-                          ScUpdateMode eMode = SC_UPDATE_ALL );
+                          ScUpdateMode eMode = SC_UPDATE_ALL,
+                          OutputDevice* pOutDev = 0 );
 
     void            CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 57a80b5..00993eb 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -466,7 +466,7 @@ Size ScModelObj::getDocumentSize()
     // TODO: not sure what we want to do here, maybe just return the size for a certain
     // default minimum number of cells, e.g. 100x100 and more if more cells have
     // content?
-    return Size();
+    return Size( 3200, 3200 );
 }
 
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index fa697ee5..020fb4e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -376,9 +376,14 @@ void ScGridWindow::Paint( const Rectangle& rRect )
 }
 
 //  Draw  ----------------------------------------------------------------
-
-void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode )
+void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode,
+                         OutputDevice* pOutDev )
 {
+    if ( !pOutDev )
+    {
+        pOutDev = this;
+    }
+
     ScModule* pScMod = SC_MOD();
     bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg();
 
@@ -470,7 +475,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
 
     Fraction aZoomX = pViewData->GetZoomX();
     Fraction aZoomY = pViewData->GetZoomY();
-    ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
+    ScOutputData aOutputData( pOutDev, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
                                 nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
                                 &aZoomX, &aZoomY );
 
@@ -585,7 +590,9 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
         aDrawingRectLogic = PixelToLogic(aDrawingRectPixel, aDrawMode);
     }
 
-    OutputDevice* pContentDev = this;       // device for document content, used by overlay manager
+    // device for document content, used by overlay manager
+    // We usually paint to ourselves, but allow other devices for tiled rendering.
+    OutputDevice* pContentDev = pOutDev;
     SdrPaintWindow* pTargetPaintWindow = 0; // #i74769# work with SdrPaintWindow directly
 
     {
@@ -602,7 +609,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
             {
                 // #i74769# Use new BeginDrawLayers() interface
                 Region aDrawingRegion(aDrawingRectLogic);
-                pTargetPaintWindow = pDrawView->BeginDrawLayers(this, aDrawingRegion);
+                pTargetPaintWindow = pDrawView->BeginDrawLayers(pOutDev, aDrawingRegion);
                 OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
 
                 // #i74769# get target device from SdrPaintWindow, this may be the prerender
@@ -875,13 +882,23 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
                               int nTilePosX, int nTilePosY,
                               long nTileWidth, long nTileHeight )
 {
-    (void) rDevice;
-    (void) nOutputWidth;
-    (void) nOutputHeight;
-    (void) nTilePosX;
-    (void) nTilePosY;
-    (void) nTileWidth;
-    (void) nTileHeight;
+    rDevice.SetOutputSizePixel( Size( nOutputWidth, nOutputHeight ) );
+    // setup the output device to draw the tile
+    MapMode aMapMode( rDevice.GetMapMode() );
+    aMapMode.SetMapUnit( MAP_TWIP );
+    aMapMode.SetOrigin( Point( -nTilePosX, -nTilePosY ) );
+
+    // Scaling. Must convert from pixels to twips. We know
+    // that VirtualDevises use a DPI of 96.
+    Fraction scaleX = Fraction( nOutputWidth, 96 ) * Fraction(1440L) /
+                                Fraction( nTileWidth);
+    Fraction scaleY = Fraction( nOutputHeight, 96 ) * Fraction(1440L) /
+                                Fraction( nTileHeight);
+    aMapMode.SetScaleX( scaleX );
+    aMapMode.SetScaleY( scaleY );
+    rDevice.SetMapMode( aMapMode );
+
+    Draw( 0, 0, 3, 3, SC_UPDATE_ALL, &rDevice );
 }
 
 void ScGridWindow::CheckNeedsRepaint()
commit af60018734751c589d7b76b6a755ac7c2dee3a40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 25 14:46:57 2014 +0100

    fix build
    
    Change-Id: I33f06887b4b2b7950c6e322ccf1c7ec65240f9b0

diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index bf86679..49aaf2e 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -93,6 +93,11 @@ SAL_DLLPUBLIC_EXPORT GtkWidget* lok_docview_new( LibreOfficeKit* pOffice )
 
 void renderDocument( LOKDocView* pDocView )
 {
+    long nWidth, nHeight;
+    int nRenderWidth, nRenderHeight;
+    unsigned char* pBuffer;
+    int nRowStride;
+
     g_assert( pDocView->pDocument );
 
     if ( pDocView->pPixBuf )
@@ -100,23 +105,21 @@ void renderDocument( LOKDocView* pDocView )
         g_object_unref( G_OBJECT( pDocView->pPixBuf ) );
     }
 
-    long nWidth, nHeight;
     pDocView->pDocument->pClass->getDocumentSize( pDocView->pDocument, &nWidth, &nHeight );
 
     // Draw the whole document at once (for now)
 
     // TODO: we really should scale by screen DPI here -- 10 seems to be a vaguely
     // correct factor for my screen at least.
-    int nRenderWidth = nWidth * pDocView->fZoom / 10;
-    int nRenderHeight = nHeight * pDocView->fZoom / 10;
+    nRenderWidth = nWidth * pDocView->fZoom / 10;
+    nRenderHeight = nHeight * pDocView->fZoom / 10;
 
     pDocView->pPixBuf = gdk_pixbuf_new( GDK_COLORSPACE_RGB,
                                         TRUE, 8,
                                         nRenderWidth, nRenderHeight);
 
 
-    unsigned char* pBuffer = gdk_pixbuf_get_pixels( pDocView->pPixBuf );
-    int nRowStride;
+    pBuffer = gdk_pixbuf_get_pixels( pDocView->pPixBuf );
     pDocView->pDocument->pClass->paintTile( pDocView->pDocument,
                                             pBuffer,
                                             nRenderWidth, nRenderHeight,
commit 0a5e6614bd4a11f5e19f5089bf7ff3b3f3d0f28e
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Wed Jun 25 14:41:45 2014 +0100

    LOK: tiled rendering / svp includes are Linux only too for now.
    
    Change-Id: Iacd8554698f309f79208fd8390800ae2c5fd8085

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index df54617..0f72bd6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -49,11 +49,14 @@
 
 #include <salinst.hxx>
 
+// Tiled Rendering is Linux only for now.
+#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS)
 // And let's also grab the SvpSalInstance and SvpSalVirtualDevice
 #include <headless/svpinst.hxx>
 #include <headless/svpvd.hxx>
 
 #include <basebmp/bitmapdevice.hxx>
+#endif
 
 using namespace css;
 using namespace utl;
@@ -448,7 +451,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
 
     Application::AcquireSolarMutex(1);
     {
-#if defined(UNX) && !defined(MACOSX)
+#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS)
         ImplSVData* pSVData = ImplGetSVData();
         SvpSalInstance* pSalInstance = static_cast< SvpSalInstance* >(pSVData->mpDefInst);
         pSalInstance->setBitCountFormatMapping( 32, ::basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA );
commit e5fb98294aed7c88873eb8aa50cb6aca994e024b
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Wed Jun 25 14:30:28 2014 +0100

    LOK: Tiled Rendering only useable on Linux.
    
    Change-Id: I90daddddb08c26c594109ecf926cb4ea64308770

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7e112f4..df54617 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -448,6 +448,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
 
     Application::AcquireSolarMutex(1);
     {
+#if defined(UNX) && !defined(MACOSX)
         ImplSVData* pSVData = ImplGetSVData();
         SvpSalInstance* pSalInstance = static_cast< SvpSalInstance* >(pSVData->mpDefInst);
         pSalInstance->setBitCountFormatMapping( 32, ::basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA );
@@ -465,6 +466,16 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
         basebmp::BitmapDeviceSharedPtr pBmpDev = pSalDev->getBitmapDevice();
 
         *pRowStride = pBmpDev->getScanlineStride();
+#else
+        (void) pBuffer;
+        (void) nCanvasWidth;
+        (void) nCanvasHeight;
+        (void) pRowStride;
+        (void) nTilePosX;
+        (void) nTilePosY;
+        (void) nTileWidth;
+        (void) nTileHeight;
+#endif
     }
     Application::ReleaseSolarMutex();
 }
commit 6403f2b59b4c83e0899012e5ca0ddd705784350c
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Wed Jun 25 15:19:41 2014 +0200

    Update libgltf: new build system and various fixes
    
    Building:
    - The new tarball has reasonable build system so
    build libgltf as external package instead of compiling
    source files directly.
    - Freetype dependancy is removed
    
    Improvements comes with the new libgltf
    - Can rotate the models too (orbit mode)
    - Two camera handling mode: walkthrough and orbit
    (press M to change).
    - gltf_animation_set_time() works
    - FPS can be displayed without freetype (press F)
    
    Additional notes:
    - There were some bugs/regressions which are fixed
    during the integration (see patches).
    - License files are uddated now.
    - libgltf building is enabled only on those platforms
    on which gltf support actually works (windows and linux)
    
    Change-Id: Ia6c9c4da53a9b4fedba0d73aa5791489f8ad424b
    Reviewed-on: https://gerrit.libreoffice.org/9895
    Reviewed-by: Zolnai Tamás <zolnaitamas2000 at gmail.com>
    Tested-by: Zolnai Tamás <zolnaitamas2000 at gmail.com>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index fc8c8f7..e69f625 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -142,6 +142,7 @@ endif # SYSTEM_MDDS
 ifneq ($(SYSTEM_GLM),)
 
 gb_LinkTarget__use_glm_headers :=
+gb_ExternalProject__use_glm_headers :=
 
 else
 
@@ -154,6 +155,11 @@ $(call gb_LinkTarget_set_include,$(1),\
 
 endef
 
+define gb_ExternalProject__use_glm_headers
+$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,glm)
+
+endef
+
 endif
 
 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
@@ -239,6 +245,8 @@ $(call gb_LinkTarget_add_libs,$(1),$(GLEW_LIBS))
 
 endef
 
+gb_ExternalProject__use_glew :=
+
 else # !SYSTEM_GLEW
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
@@ -264,6 +272,11 @@ endif
 
 endef
 
+define gb_ExternalProject__use_glew
+$(call gb_ExternalProject_use_external_project,$(1),glew)
+
+endef
+
 endif # SYSTEM_GLEW
 
 define gb_LinkTarget__use_iconv
@@ -1274,7 +1287,7 @@ endef
 
 gb_ExternalProject__use_freetype :=
 
-else ifneq (,$(or $(findstring ANDROID,$(OS)),$(ENABLE_GLTF)))
+else ifeq ($(OS),ANDROID)
 
 define gb_LinkTarget__use_freetype_headers
 $(call gb_LinkTarget_use_external_project,$(1),freetype)
@@ -3258,7 +3271,6 @@ endif # SYSTEM_NSS
 
 endif # DESKTOP
 
-
 ifeq ($(ENABLE_GLTF),TRUE)
 
 define gb_LinkTarget__use_libgltf
@@ -3267,9 +3279,23 @@ $(call gb_LinkTarget_set_include,$(1),\
     $$(INCLUDE) \
 )
 
-$(call gb_LinkTarget_use_static_libraries,$(1),\
-	libgltf \
+ifeq ($(COM),MSC)
+$(call gb_LinkTarget_add_libs,$(1),\
+	$(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \
 )
+else
+$(call gb_LinkTarget_add_libs,$(1),\
+	$(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+endif
+
+$(call gb_LinkTarget_use_external_project,$(1),libgltf)
+
+endef
+
+define gb_ExternalProject__use_libgltf
+$(call gb_ExternalProject_use_external_project,$(1),libgltf)
+
 endef
 
 define gb_LinkTarget__use_opencollada_parser
diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk
index 63e9067..184c66c 100644
--- a/avmedia/Library_avmedia.mk
+++ b/avmedia/Library_avmedia.mk
@@ -27,7 +27,6 @@ $(eval $(call gb_Library_use_externals,avmedia,\
 	boost_headers \
 	glew \
 	mesa_headers \
-	zlib \
 ))
 
 $(eval $(call gb_Library_use_libraries,avmedia,\
diff --git a/avmedia/Library_avmediaogl.mk b/avmedia/Library_avmediaogl.mk
index afa52ca..3bbebe8 100644
--- a/avmedia/Library_avmediaogl.mk
+++ b/avmedia/Library_avmediaogl.mk
@@ -16,11 +16,9 @@ $(eval $(call gb_Library_use_sdk_api,avmediaogl))
 $(eval $(call gb_Library_use_externals,avmediaogl, \
     boost_headers \
     libgltf \
+    glew \
     glm_headers \
     mesa_headers \
-    glew \
-    zlib \
-    freetype \
 ))
 
 $(eval $(call gb_Library_use_libraries,avmediaogl,\
@@ -50,8 +48,6 @@ $(eval $(call gb_Library_add_exception_objects,avmediaogl,\
 ifeq ($(strip $(OS)),WNT)
 $(eval $(call gb_Library_use_system_win32_libs,avmediaogl,\
     opengl32 \
-    gdi32 \
-    glu32 \
 ))
 else ifeq ($(OS),MACOSX)
 $(eval $(call gb_Library_use_system_darwin_frameworks,avmediaogl,\
@@ -59,10 +55,7 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,avmediaogl,\
 ))
 else ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,avmediaogl,\
-    -ldl \
     -lGL \
-    -lGLU \
-    -lX11 \
 ))
 endif
 
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 35ae140..30c2641 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -28,6 +28,7 @@ OGLPlayer::OGLPlayer()
     : Player_BASE(m_aMutex)
     , m_pHandle(NULL)
     , m_pOGLWindow(NULL)
+    , m_bIsRendering(false)
 {
 }
 
@@ -141,8 +142,14 @@ void SAL_CALL OGLPlayer::start() throw ( uno::RuntimeException, std::exception )
 {
     osl::MutexGuard aGuard(m_aMutex);
     assert(m_pHandle);
+
+    // gltf_animation_start play animation from the time 0.0,
+    // but OGLPlayer::start used as play from that time where it was stopped before
+    double fTime = gltf_animation_get_time(m_pHandle);
     gltf_animation_start(m_pHandle);
+    gltf_animation_set_time(m_pHandle, fTime);
     m_aTimer.Start();
+    m_bIsRendering = true;
 }
 
 void SAL_CALL OGLPlayer::stop() throw ( uno::RuntimeException, std::exception )
@@ -151,13 +158,19 @@ void SAL_CALL OGLPlayer::stop() throw ( uno::RuntimeException, std::exception )
     assert(m_pHandle);
     m_aTimer.Stop();
     gltf_animation_stop(m_pHandle);
+    m_bIsRendering = false;
 }
 
 sal_Bool SAL_CALL OGLPlayer::isPlaying() throw ( uno::RuntimeException, std::exception )
 {
     osl::MutexGuard aGuard(m_aMutex);
     assert(m_pHandle);
-    return (sal_Bool)gltf_animation_is_playing(m_pHandle);
+    // Here isPlaying means model is rendered in the window and
+    // able to interact with the user (e.g. moving camera)
+    if( getDuration() > 0.0 )
+        return gltf_animation_is_playing(m_pHandle);
+    else
+        return m_bIsRendering;
 }
 
 double SAL_CALL OGLPlayer::getDuration() throw ( uno::RuntimeException, std::exception )
@@ -169,18 +182,16 @@ double SAL_CALL OGLPlayer::getDuration() throw ( uno::RuntimeException, std::exc
 
 void SAL_CALL OGLPlayer::setMediaTime( double fTime ) throw ( uno::RuntimeException, std::exception )
 {
-    // TODO: doesn't work, but cause problem in playing
     osl::MutexGuard aGuard(m_aMutex);
     assert(m_pHandle);
-    (void) fTime;
-    //gltf_animation_set_time(m_pHandle, fTime);
+    gltf_animation_set_time(m_pHandle, fTime);
 }
 
 double SAL_CALL OGLPlayer::getMediaTime() throw ( ::com::sun::star::uno::RuntimeException, std::exception )
 {
     osl::MutexGuard aGuard(m_aMutex);
     assert(m_pHandle);
-    return 0.0; //gltf_animation_get_time(m_pHandle);
+    return gltf_animation_get_time(m_pHandle);
 }
 
 void SAL_CALL OGLPlayer::setPlaybackLoop( sal_Bool bSet ) throw ( uno::RuntimeException, std::exception )
@@ -264,6 +275,9 @@ uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( c
         SAL_WARN("avmedia.opengl", "Error occured while parsing *.json file! Error code: " << nRet);
         return uno::Reference< media::XPlayerWindow >();
     }
+    // The background color is white by default, but we need to separate the
+    // OpenGL window from the main window so set background color to grey
+    glClearColor(0.5f, 0.5f, 0.5f, 0.5f);
     m_pOGLWindow = new OGLWindow(*m_pHandle, m_aContext, *pChildWindow->GetParent());
     return uno::Reference< media::XPlayerWindow >( m_pOGLWindow );
 }
@@ -291,6 +305,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber()
         SAL_WARN("avmedia.opengl", "Error occured while parsing *.json file! Error code: " << nRet);
         return uno::Reference< media::XFrameGrabber >();
     }
+    glClearColor(0.5f, 0.5f, 0.5f, 0.5f);
     OGLFrameGrabber *pFrameGrabber = new OGLFrameGrabber( *m_pHandle );
     return uno::Reference< media::XFrameGrabber >( pFrameGrabber );
 }
diff --git a/avmedia/source/opengl/oglplayer.hxx b/avmedia/source/opengl/oglplayer.hxx
index 42476fc..e25dfd3 100644
--- a/avmedia/source/opengl/oglplayer.hxx
+++ b/avmedia/source/opengl/oglplayer.hxx
@@ -64,6 +64,7 @@ private:
     OpenGLContext m_aContext;
     AutoTimer m_aTimer;
     OGLWindow* m_pOGLWindow;
+    bool m_bIsRendering;
 };
 
 } // namespace ogl
diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx
index aa29f4b..5d85d62 100644
--- a/avmedia/source/opengl/oglwindow.cxx
+++ b/avmedia/source/opengl/oglwindow.cxx
@@ -20,6 +20,7 @@ OGLWindow::OGLWindow( glTFHandle& rHandle, OpenGLContext& rContext, Window& rEve
     , m_rEventHandler( rEventHandlerParent )
     , m_bVisible ( false )
     , m_aLastMousePos(Point())
+    , m_bIsOrbitMode( false )
 {
 }
 
@@ -249,33 +250,36 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent)
                     glm::vec3 vStrafe = glm::cross(vView-vEye, vUp);
                     vStrafe = glm::normalize(vStrafe);
                     vStrafe *= 25.0f;
-                    glm::vec3 vMup = glm::cross(vView-vEye,glm::vec3(1.f,0.f,0.f) );
+                    glm::vec3 vMup = glm::cross(vView-vEye,glm::vec3(1.0f,0.0f,0.0f) );
                     vMup = glm::normalize(vMup);
                     vMup *= 25.0f;
 
-                    if(nCode == KEY_Q)vMoveBy += vMove*(0.0005f*fModelSize);
-                    if(nCode == KEY_E)vMoveBy -= vMove*(0.0005f*fModelSize);
-                    if(nCode == KEY_A)vMoveBy -= vStrafe*(0.0005f*fModelSize);
-                    if(nCode == KEY_D)vMoveBy += vStrafe*(0.0005f*fModelSize);
-                    if(nCode == KEY_W)vMoveBy -= vMup*(0.0005f*fModelSize);
-                    if(nCode == KEY_S)vMoveBy += vMup*(0.0005f*fModelSize);
+                    if(nCode == KEY_W)vMoveBy += vMove*(0.005f*fModelSize);
+                    if(nCode == KEY_S)vMoveBy -= vMove*(0.005f*fModelSize);
+                    if( !m_bIsOrbitMode )
+                    {
+                        if(nCode == KEY_A)vMoveBy -= vStrafe*(0.005f*fModelSize);
+                        if(nCode == KEY_D)vMoveBy += vStrafe*(0.005f*fModelSize);
+                    }
                 }
                 gltf_renderer_move_camera(&m_rHandle, vMoveBy.x, vMoveBy.y, vMoveBy.z, 0.0);
             }
-        }
-    }
-    // TODO: Clean this mess up after libgltf gets a working camera handling
-     else if( pEvent->GetId() == VCLEVENT_WINDOW_KEYUP )
-    {
-        KeyEvent* pKeyEvt = (KeyEvent*)pEvent->GetData();
-        if(pKeyEvt)
-        {
-            const sal_uInt16 nCode = pKeyEvt->GetKeyCode().GetCode();
-            if (nCode == KEY_Q || nCode == KEY_E ||
-                nCode == KEY_A || nCode == KEY_D ||
-                nCode == KEY_W || nCode == KEY_S )
+            else if(nCode == KEY_M)
             {
-                gltf_renderer_move_camera(&m_rHandle, 0.0, 0.0, 0.0, 0.0);
+                if(m_bIsOrbitMode)
+                {
+                    gltf_orbit_view_stop(&m_rHandle);
+                    m_bIsOrbitMode = false;
+                }
+                else
+                {
+                    gltf_orbit_mode_start(&m_rHandle);
+                    m_bIsOrbitMode = true;
+                }
+            }
+            else if(nCode == KEY_F)
+            {
+                gltf_render_FPS_enable(&m_rHandle);
             }
         }
     }
@@ -303,14 +307,32 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent)
             else
                 fSensitivity = 540.0 / fSensitivity;
 
-            long nDeltaX = m_aLastMousePos.X()-aCurPos.X();
-            long nDeltaY = aCurPos.Y()-m_aLastMousePos.Y();
-            // TODO: It seems this method just moves the camera but not rotate it.
-            gltf_renderer_rotate_camera(&m_rHandle, (float)nDeltaX*fSensitivity, (float)nDeltaY*fSensitivity, 0.0, 0.0);
 
+            long nDeltaX = m_aLastMousePos.X()-aCurPos.X();
+            long nDeltaY = m_aLastMousePos.Y()-aCurPos.Y();
+            if( m_bIsOrbitMode )
+            {
+                fSensitivity *= 5;
+                gltf_renderer_rotate_model(&m_rHandle, (float)nDeltaX*fSensitivity, (float)nDeltaY*fSensitivity, 0.0);
+            }
+            else
+            {
+                // Filter out too small deltas to avoid rewrite rotation parameter with 0
+                // before rotation is done
+                if( nDeltaX != 0 || nDeltaY != 0 )
+                    gltf_renderer_rotate_camera(&m_rHandle, (float)nDeltaX*fSensitivity, (float)nDeltaY*fSensitivity, 0.0);
+            }
             m_aLastMousePos = aCurPos;
         }
     }
+    else if( pEvent->GetId() == VCLEVENT_WINDOW_MOUSEBUTTONUP )
+    {
+        MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData();
+        if(pMouseEvt && pMouseEvt->IsLeft() && pMouseEvt->GetClicks() == 1)
+        {
+            gltf_renderer_stop_rotate_model(&m_rHandle);
+        }
+    }
     return 0;
 }
 
diff --git a/avmedia/source/opengl/oglwindow.hxx b/avmedia/source/opengl/oglwindow.hxx
index 9ea0737..b4b1390 100644
--- a/avmedia/source/opengl/oglwindow.hxx
+++ b/avmedia/source/opengl/oglwindow.hxx
@@ -70,6 +70,7 @@ private:
     Window& m_rEventHandler;
     bool m_bVisible;
     Point m_aLastMousePos;
+    bool m_bIsOrbitMode;
 };
 
 } // namespace ogl
diff --git a/configure.ac b/configure.ac
index 6086b4c..434972b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10516,25 +10516,12 @@ dnl ===================================================================
 dnl Check whether to enable glTF support
 dnl ===================================================================
 AC_MSG_CHECKING([whether to enable glTF support])
-if test "$ENABLE_RELEASE_BUILD" = "TRUE"; then
-    if test $_os == iOS -o $_os == Android -o $_os = Darwin; then
-        enable_gltf=no
-    fi
-fi
-
 ENABLE_GLTF=
-if test "x$enable_gltf" != "xno"; then
+if test "x$enable_gltf" != "xno" -a $_os != Darwin -a $_os != iOS -a $_os != Android; then
     ENABLE_GLTF=TRUE
     AC_MSG_RESULT([yes])
     AC_DEFINE(HAVE_FEATURE_GLTF,1)
     BUILD_TYPE="$BUILD_TYPE LIBGLTF"
-    if test "$test_freetype" = "no"; then
-        BUILD_TYPE="$BUILD_TYPE FREETYPE"
-        if test "$COM" = "MSC"; then
-            test -n "${MSVC_USE_DEBUG_RUNTIME}" && FREETYPE_LIB_DEBUGLIB_SUFFIX="_D"
-            FREETYPE_LIBS="${WORKDIR}/UnpackedTarball/freetype/objs/win32/vc2010/freetype248$FREETYPE_LIB_DEBUGLIB_SUFFIX.lib"
-        fi
-    fi
     # otherwise build fails in collada2gltf external because of std::shared_ptr
     if test "$have_std_shared_ptr" = "yes"; then
         BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
diff --git a/download.lst b/download.lst
index 1ac844c..2f45c35 100644
--- a/download.lst
+++ b/download.lst
@@ -87,7 +87,7 @@ export LIBATOMIC_OPS_TARBALL := libatomic_ops-7_2d.zip
 export LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
-export LIBGLTF_TARBALL := 3c62598ccbecb65998bf7602bb09a791-libgltf.tar.bz2
+export LIBGLTF_TARBALL := 9c8d3455e0d8ef51269784e9a473feeb-libgltf.tar.bz2
 export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
diff --git a/external/libgltf/ExternalProject_libgltf.mk b/external/libgltf/ExternalProject_libgltf.mk
new file mode 100644
index 0000000..d20616b
--- /dev/null
+++ b/external/libgltf/ExternalProject_libgltf.mk
@@ -0,0 +1,71 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,libgltf))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libgltf,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libgltf,\
+	build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libgltf,\
+	boost_headers \
+	glew \
+	glm_headers \
+))
+
+
+ifeq ($(COM),MSC)
+
+AdditionalIncludes :=
+
+ifeq ($(SYSTEM_BOOST),)
+AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,boost)"
+AdditionalIncludes += "$(SRCDIR)/config_host"
+endif
+
+ifeq ($(SYSTEM_GLEW),)
+AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glew)/include"
+endif
+
+ifeq ($(SYSTEM_GLM),)
+AdditionalIncludes += "$(call gb_UnpackedTarball_get_dir,glm)"
+endif
+
+empty :=
+space := $(empty) $(empty)
+
+$(call gb_ExternalProject_get_state_target,libgltf,build) :
+	$(call gb_ExternalProject_run,build,\
+		msbuild.exe libgltf.vcxproj \
+			/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
+			$(if $(filter 110,$(VCVER)),/p:PlatformToolset=$(if $(filter 80,$(WINDOWS_SDK_VERSION)),v110,v110_xp) \
+			/p:VisualStudioVersion=11.0) \
+			'/p:AdditionalIncludeDirectories=$(subst $(space),;,$(subst /,\,$(strip $(AdditionalIncludes))))' \
+			/p:AdditionalLibraryDirectories=$(if $(SYSTEM_GLEW),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,glew))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \
+	,build/win32)
+
+else
+
+$(call gb_ExternalProject_get_state_target,libgltf,build) :
+	$(call gb_ExternalProject_run,build,\
+		export PKG_CONFIG="" \
+		&& ./configure \
+			--disable-debug \
+			--disable-werror \
+			BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost))" \
+			GLEW_CFLAGS="$(if $(SYSTEM_GLEW),$(GLEW_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glew)/include)" \
+			GLM_CFLAGS="$(if $(SYSTEM_GLM),$(GLM_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,glm))" \
+		&& $(MAKE) \
+	)
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/Module_libgltf.mk b/external/libgltf/Module_libgltf.mk
index b593f89..c6ebed6 100644
--- a/external/libgltf/Module_libgltf.mk
+++ b/external/libgltf/Module_libgltf.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Module_Module,libgltf))
 
 $(eval $(call gb_Module_add_targets,libgltf,\
-	StaticLibrary_libgltf \
+	ExternalProject_libgltf \
 	UnpackedTarball_libgltf \
 ))
 
diff --git a/external/libgltf/StaticLibrary_libgltf.mk b/external/libgltf/StaticLibrary_libgltf.mk
deleted file mode 100644
index 3575d15..0000000
--- a/external/libgltf/StaticLibrary_libgltf.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_StaticLibrary_StaticLibrary,libgltf))
-
-$(eval $(call gb_StaticLibrary_set_warnings_not_errors,libgltf))
-
-$(eval $(call gb_StaticLibrary_use_unpacked,libgltf,libgltf))
-
-$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,libgltf,cpp))
-
-# Avoid warnings
-$(eval $(call gb_StaticLibrary_add_cxxflags,libgltf,-w))
-
-$(eval $(call gb_StaticLibrary_use_externals,libgltf,\
-    boost_headers \
-    glm_headers \
-    mesa_headers \
-    glew \
-    zlib \
-))
-
-$(eval $(call gb_StaticLibrary_set_include,libgltf,\
-    -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \
-	$$(INCLUDE) \
-))
-
-$(eval $(call gb_StaticLibrary_add_generated_exception_objects,libgltf,\
-	UnpackedTarball/libgltf/src/Camera \
-	UnpackedTarball/libgltf/src/Common \
-	UnpackedTarball/libgltf/src/libgltf \
-	UnpackedTarball/libgltf/src/LoadScene \
-	UnpackedTarball/libgltf/src/RenderScene \
-	UnpackedTarball/libgltf/src/Shaders \
-	UnpackedTarball/libgltf/src/Texture \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk
index a1314bb..da5e018 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -16,12 +16,16 @@ $(eval $(call gb_UnpackedTarball_set_patchflags,libgltf,--binary))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libgltf,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
-	external/libgltf/patches/include_path_glew.patch \
-	external/libgltf/patches/include_path_freetype.patch \
-	external/libgltf/patches/openmp-disable.patch \
-	external/libgltf/patches/rgba_textures.patch \
-	external/libgltf/patches/deallocation_fix.patch \
 	external/libgltf/patches/init_scene_set_handle.patch \
+	external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch \
+	external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch \
+	external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch \
+	external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch \
+	external/libgltf/patches/no_effect_of_set_looping.patch \
+	external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch \
+	external/libgltf/patches/no_animation_in_orbit_mode.patch \
+	external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch \
+	external/libgltf/patches/move_fps_closer_to_the_corner.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/deallocation_fix.patch b/external/libgltf/patches/deallocation_fix.patch
deleted file mode 100644
index 4049e2f..0000000
--- a/external/libgltf/patches/deallocation_fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp
---- libgltf.org/src/LoadScene.cpp	2014-05-28 15:35:48.232375923 +0200
-+++ libgltf/src/LoadScene.cpp	2014-05-28 15:36:02.600375314 +0200
-@@ -144,7 +144,7 @@
-         free(gHandle->files);
-         gHandle->files = NULL;
-     }
--    delete gHandle;
-+    free(gHandle);
-     return true;
- }
- 
diff --git a/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch b/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch
new file mode 100644
index 0000000..8b9f3db
--- /dev/null
+++ b/external/libgltf/patches/extend_get_bitmap_for_rgba_ones.patch
@@ -0,0 +1,76 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp	2014-06-23 18:49:46.603119797 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-23 19:00:17.583092627 +0200
+@@ -1735,28 +1735,29 @@
+ 
+ void RenderScene::setBitZoom(unsigned char* Dstbuffer,
+                              unsigned char* Srcbuffer,
+-                             glTFViewport* pViewport)
++                             glTFViewport* pViewport,
++                             int bufferDepth )
+ {
+     const int width = pViewport->width;
+     const int height = pViewport->height;
+-    const int newLineByte = (width * 3 + 3) / 4 * 4;
+-    const int lineByte = (width * SSAA * 3 + 3) / 4 * 4;
++    const int newLineByte = width * bufferDepth;
++    const int lineByte = width * SSAA * bufferDepth;
+     for (int i = 0; i < height; i++)
+     {
+         for (int j = 0; j < width; j++)
+-            for (int k = 0; k < 3; k++)
++            for (int k = 0; k < bufferDepth; k++)
+             {
+                 long xData = (long)(i * SSAA + 0.5);
+                 long yData = (long)(j * SSAA + 0.5);
+                 if((yData >= 0) && (yData < width * SSAA) &&
+                    (xData >= 0) && (xData < height * SSAA))
+                 {
+-                    *(Dstbuffer + i * newLineByte + j * 3 + k) =
+-                        *(Srcbuffer + xData * lineByte + yData * 3 + k);
++                    *(Dstbuffer + i * newLineByte + j * bufferDepth + k) =
++                        *(Srcbuffer + xData * lineByte + yData * bufferDepth + k);
+                 }
+                 else
+                 {
+-                    *(Dstbuffer + i * newLineByte + j * 3 + k) = 255;
++                    *(Dstbuffer + i * newLineByte + j * bufferDepth + k) = 255;
+                 }
+             }
+     }
+@@ -1782,12 +1783,20 @@
+     {
+         return;
+     }
+-    int imageSize = ((width + ((4 - (width % 4)) % 4)) *
+-                     height * 3) + 2;
++
++    int bufferDepth;
++    if( format == GL_RGB || format == GL_BGR )
++        bufferDepth = 3;
++    else if( format == GL_RGBA || format == GL_BGRA )
++        bufferDepth = 4;
++    else
++        return;
++
++    int imageSize = width * height * bufferDepth;
+     unsigned char *pbuffer = new unsigned char[imageSize];
+     glReadPixels(0, 0, width, height, format,
+                  GL_UNSIGNED_BYTE, pbuffer);
+-    setBitZoom(buffer, pbuffer, pViewport);
++    setBitZoom(buffer, pbuffer, pViewport, bufferDepth);
+     if (pbuffer)
+     {
+         delete [] pbuffer;
+diff -ur libgltf.org/src/RenderScene.h libgltf/src/RenderScene.h
+--- libgltf.org/src/RenderScene.h	2014-06-23 18:49:46.587119798 +0200
++++ libgltf/src/RenderScene.h	2014-06-23 18:59:46.991093944 +0200
+@@ -234,7 +234,7 @@
+     void completeRenderBitmap(glTFViewport* pViewport,
+                               unsigned char* buffer, GLenum format);
+     void setBitZoom(unsigned char* Dstbuffer,
+-                    unsigned char* Srcbuffer, glTFViewport* pViewport);
++                    unsigned char* Srcbuffer, glTFViewport* pViewport, int bufferDepth );
+ 
+     // For animation
+     void startAnimation();
diff --git a/external/libgltf/patches/include_path_freetype.patch b/external/libgltf/patches/include_path_freetype.patch
deleted file mode 100644
index 917b52c..0000000
--- a/external/libgltf/patches/include_path_freetype.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/Font.h libgltf/src/Font.h
---- libgltf.org/src/Font.h	2014-05-05 14:35:24.155370405 +0200
-+++ libgltf/src/Font.h	2014-05-05 14:35:39.715371069 +0200
-@@ -8,7 +8,7 @@
- #ifndef FONT_H
- #define FONT_H
- 
--#include "freetype/ft2build.h"
-+#include "ft2build.h"
- #include FT_FREETYPE_H
- #include "Texture.h"
- 
diff --git a/external/libgltf/patches/include_path_glew.patch b/external/libgltf/patches/include_path_glew.patch
deleted file mode 100644
index 51d222f..0000000
--- a/external/libgltf/patches/include_path_glew.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -ur libgltf/inc/libgltf.h libgltf/inc/libgltf.h
---- libgltf/inc/libgltf.h	2014-05-05 14:26:11.911346850 +0200
-+++ libgltf/inc/libgltf.h	2014-05-05 14:27:07.295349212 +0200
-@@ -9,7 +9,7 @@
- #define LIBGLTF_H
- #include <stddef.h>
- #include "types.h"
--#include <glew/glew.h>
-+#include <GL/glew.h>
- #include <glm/glm.hpp>
- using namespace glTF;
- 
-diff -ur libgltf.org/src/Camera.h libgltf/src/Camera.h
---- libgltf.org/src/Camera.h	2014-05-05 14:26:11.911346850 +0200
-+++ libgltf/src/Camera.h	2014-05-05 14:27:07.295349212 +0200
-@@ -8,7 +8,7 @@
- #ifndef CAMERA_H
- #define CAMERA_H
- 
--#include <glew/glew.h>
-+#include <GL/glew.h>
- #include <glm/glm.hpp>
- 
- class CPhysicalCamera
-diff -ur libgltf.org/src/Common.h libgltf/src/Common.h
---- libgltf.org/src/Common.h	2014-05-05 14:26:11.911346850 +0200
-+++ libgltf/src/Common.h	2014-05-05 14:27:18.927349708 +0200
-@@ -7,7 +7,7 @@
-  */
- #ifndef COMMON_H
- #define COMMON_H
--#include <glew/glew.h>
-+#include <GL/glew.h>
- #include <glm/glm.hpp>
- #include <string>
- #include <vector>
-diff -ur libgltf.org/src/Shaders.h libgltf/src/Shaders.h
---- libgltf.org/src/Shaders.h	2014-05-05 14:26:11.923346850 +0200
-+++ libgltf/src/Shaders.h	2014-05-05 14:27:45.483350841 +0200
-@@ -8,7 +8,7 @@
- #ifndef SHADERS_H
- #define SHADERS_H
- 
--#include <glew/glew.h>
-+#include <GL/glew.h>
- #include <glm/glm.hpp>
- 
- #include <string>
-diff -ur libgltf.org/src/Texture.h libgltf/src/Texture.h
---- libgltf.org/src/Texture.h	2014-05-05 14:26:11.911346850 +0200
-+++ libgltf/src/Texture.h	2014-05-05 14:27:52.927351158 +0200
-@@ -11,7 +11,7 @@
- #include <string>
- #include <vector>
- #include <map>
--#include <glew/glew.h>
-+#include <GL/glew.h>
- #include <glm/glm.hpp>
- 
- using namespace std;
diff --git a/external/libgltf/patches/init_scene_set_handle.patch b/external/libgltf/patches/init_scene_set_handle.patch
index ef34fe3..88ad053 100644
--- a/external/libgltf/patches/init_scene_set_handle.patch
+++ b/external/libgltf/patches/init_scene_set_handle.patch
@@ -1,7 +1,7 @@
 diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp
---- libgltf.org/src/LoadScene.cpp	2014-06-13 01:13:40.654653289 +0200
-+++ libgltf/src/LoadScene.cpp	2014-06-13 01:15:45.034648018 +0200
-@@ -148,10 +148,14 @@
+--- libgltf.org/src/LoadScene.cpp	2014-06-23 14:55:58.099723870 +0200
++++ libgltf/src/LoadScene.cpp	2014-06-23 14:56:04.399723599 +0200
+@@ -149,10 +149,14 @@
      return true;
  }
  
@@ -16,12 +16,12 @@ diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp
      int status;
 -    this->pScene = pscene;
  
-     {
-         TRACE_TIME ("parseScene->readBuffers", CPU);
+     status = this->readBuffers();
+     if (status < 0)
 diff -ur libgltf.org/src/LoadScene.h libgltf/src/LoadScene.h
---- libgltf.org/src/LoadScene.h	2014-06-13 01:13:40.654653289 +0200
-+++ libgltf/src/LoadScene.h	2014-06-13 01:16:03.886647220 +0200
-@@ -27,7 +27,8 @@
+--- libgltf.org/src/LoadScene.h	2014-06-23 14:55:58.079723871 +0200
++++ libgltf/src/LoadScene.h	2014-06-23 14:56:37.303722182 +0200
+@@ -21,7 +21,8 @@
  public:
      glTFHandle* getFileNameInJson(const std::string& jsonFile);
      bool releaseFileName();
@@ -31,41 +31,30 @@ diff -ur libgltf.org/src/LoadScene.h libgltf/src/LoadScene.h
      bool parseJsonFile();
      void setJsonInfo(const std::string& sbuffer);
      void setJsonInfo(const std::string& direct, const std::string& fileName);
-@@ -81,4 +82,4 @@
-     bool is_json_in_buffer;
- };
- 
--#endif
-\ No newline at end of file
-+#endif
 diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
---- libgltf.org/src/RenderScene.cpp	2014-06-13 01:13:40.654653289 +0200
-+++ libgltf/src/RenderScene.cpp	2014-06-13 01:15:11.222649451 +0200
-@@ -561,7 +561,7 @@
+--- libgltf.org/src/RenderScene.cpp	2014-06-23 14:55:58.099723870 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-23 14:56:07.239723477 +0200
+@@ -657,16 +657,15 @@
      {
          return LIBGLTF_PARSE_JSON_ERROR;
      }
 -    int iStatus = mLoadJson.parseScene(&scene);
 +    int iStatus = mLoadJson.parseScene();
-     if (iStatus != LIBGLTF_SUCESS)
-     {
-         return iStatus;
-@@ -571,12 +571,11 @@
+     return iStatus;
+ }
  
  int RenderScene::loadScene(Scene& scene, glTFHandle* handle)
  {
 -    scene.setGltfHandle(handle);
      try
      {
-         {
-             TRACE_TIME ("loadScene->parseScene", CPU);
--            int iStatus = mLoadJson.parseScene(&scene);
-+            int iStatus = mLoadJson.parseScene();
-             if (iStatus != LIBGLTF_SUCESS)
-             {
-                 return iStatus;
-@@ -612,7 +611,11 @@
-         }
+-        int iStatus = mLoadJson.parseScene(&scene);
++        int iStatus = mLoadJson.parseScene();
+         return iStatus;
+     }
+     catch (boost::property_tree::ptree_error& e)
+@@ -694,7 +693,11 @@
+         return 0;
      }
      string tmpFileName(jsonfile->filename);
 -    return mLoadJson.getFileNameInJson(tmpFileName);
@@ -77,22 +66,15 @@ diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
  }
  
  unsigned int RenderScene::bindAttribute(const Attribute* pAttr)
-@@ -844,11 +847,6 @@
- 
- int RenderScene::initRender(glTFHandle* handle)
+@@ -969,11 +972,6 @@
  {
+     initOpengl();
+ 
 -    pScene = new Scene();
--    if(0 == pScene)
+-    if (0 == pScene)
 -    {
 -        return LIBGLTF_MEMORY_ERROR;
 -    }
      int iResult = loadScene(*pScene, handle);
-     if( iResult != LIBGLTF_SUCESS)
+     if (iResult != LIBGLTF_SUCCESS)
      {
-@@ -1543,4 +1541,4 @@
- int  RenderScene::isAnimPlay()
- {
-     return this->mAnimationPlay ? 1 : 0;
--}
-\ No newline at end of file
-+}
diff --git a/external/libgltf/patches/move_fps_closer_to_the_corner.patch b/external/libgltf/patches/move_fps_closer_to_the_corner.patch
new file mode 100644
index 0000000..10ef74c
--- /dev/null
+++ b/external/libgltf/patches/move_fps_closer_to_the_corner.patch
@@ -0,0 +1,12 @@
+diff -ur libgltf.org/src/FPSCounter.cpp libgltf/src/FPSCounter.cpp
+--- libgltf.org/src/FPSCounter.cpp	2014-06-24 18:10:46.317967903 +0200
++++ libgltf/src/FPSCounter.cpp	2014-06-24 18:10:58.629967382 +0200
+@@ -104,7 +104,7 @@
+         ++mFrames;
+     }
+ 
+-    pFont->printFormattedString(pViewport->width - 100, 30, 15, "%d", mFPS);
++    pFont->printFormattedString(pViewport->width - 40, 10, 15, "%d", mFPS);
+ 
+     glEnable(GL_DEPTH_TEST);
+ }
diff --git a/external/libgltf/patches/no_animation_in_orbit_mode.patch b/external/libgltf/patches/no_animation_in_orbit_mode.patch
new file mode 100644
index 0000000..dab0244
--- /dev/null
+++ b/external/libgltf/patches/no_animation_in_orbit_mode.patch
@@ -0,0 +1,43 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp	2014-06-24 16:53:41.030163890 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-24 16:53:44.406163746 +0200
+@@ -1848,8 +1848,6 @@
+ 
+ void RenderScene::startAnimation()
+ {
+-    if (bAerialView)
+-        return;
+     this->mAnimationPlay = true;
+     mCurrentTime = 0;
+     mUpdateTimeOut = 0;
+@@ -1858,8 +1856,6 @@
+ 
+ void RenderScene::stopAnimation()
+ {
+-    if (bAerialView)
+-        return;
+     if (pScene->getSkinSize() != 0)
+     {
+         this->mAnimationPlay = false;
+@@ -1874,10 +1870,6 @@
+     roCameraY = glm::mat4(1.0);
+     pCamera->AerialViewY = 0.0;
+     bAerialView = false;
+-    if (bAnimation)
+-    {
+-        startAnimation();
+-    }
+     if (IsAerialMode)
+     {
+         pScene->setUseCameraInJson(true);
+@@ -1897,10 +1889,6 @@
+     roCameraX = glm::mat4(1.0);
+     roCameraY = glm::mat4(1.0);
+     //Stop animation.
+-    if (pScene->getSkinSize() != 0)
+-    {
+-        this->mAnimationPlay = false;
+-    }
+     bAerialView = true;
+     if (pScene->getUseCameraInJson())
+     {
diff --git a/external/libgltf/patches/no_effect_of_set_looping.patch b/external/libgltf/patches/no_effect_of_set_looping.patch
new file mode 100644
index 0000000..1bfa4c9
--- /dev/null
+++ b/external/libgltf/patches/no_effect_of_set_looping.patch
@@ -0,0 +1,14 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp	2014-06-23 21:16:55.134739637 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-23 21:16:58.834739477 +0200
+@@ -1976,5 +1976,10 @@
+     {
+         bIsTimeAvailable = false;
+     }
++    if( !mAnimationLoop && mCurrentTime > mDuration )
++    {
++        stopAnimation();
++	setAnimTime(0.0);
++    }
+ }
+ 
diff --git a/external/libgltf/patches/openmp-disable.patch b/external/libgltf/patches/openmp-disable.patch
deleted file mode 100644
index ef8bc2e..0000000
--- a/external/libgltf/patches/openmp-disable.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- libgltf/src/RenderScene.h
-+++ libgltf/src/RenderScene.h
-@@ -16,7 +16,8 @@
- #define TRACE_TIME 
- #endif
- 
--#define OPENMPENABLE   1
-+// Needs a configure / etc. detection to see if omp.h is on the system ...
-+#define OPENMPENABLE   0
- #if OPENMPENABLE
- #include <omp.h>
- #define WAVESIZE 4
diff --git a/external/libgltf/patches/rgba_textures.patch b/external/libgltf/patches/rgba_textures.patch
deleted file mode 100644
index b220894..0000000
--- a/external/libgltf/patches/rgba_textures.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libgltf.org/src/Texture.cpp libgltf/src/Texture.cpp
---- libgltf.org/src/Texture.cpp	2014-05-27 16:40:18.625920865 +0200
-+++ libgltf/src/Texture.cpp	2014-05-27 16:41:45.601917179 +0200
-@@ -60,7 +60,7 @@
- bool Texture::loadTexture2DFromBuffer(unsigned char* buffer, int width,
-                                       int height)
- {
--    GLenum format = GL_BGRA;
-+    GLenum format = GL_RGBA;
- 
-     createFromData(buffer, width, height, format, false);
- 
diff --git a/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch b/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch
new file mode 100644
index 0000000..ef7217b
--- /dev/null
+++ b/external/libgltf/patches/walkthrough_mode_affects_orbit_mode_unexpectedly.patch
@@ -0,0 +1,12 @@
+diff -ur libgltf.org/src/Camera.cpp libgltf/src/Camera.cpp
+--- libgltf.org/src/Camera.cpp	2014-06-24 17:36:27.870055125 +0200
++++ libgltf/src/Camera.cpp	2014-06-24 17:36:43.514054463 +0200
+@@ -243,6 +243,8 @@
+     if (abs(horizontal) > planar || abs(vertical) > 0.0001)
+     {
+         bRotateCameraModel = true;
++        fRotateCameraXSpeed = 0;
++        fRotateCameraYSpeed = 0;
+         float deltaX = (float)(horizontal * fSensitivity * 0.01f);
+         float deltaY = (float)(-vertical * fSensitivity * 0.01f);
+         AerialViewY += -vertical;
diff --git a/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch b/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch
new file mode 100644
index 0000000..56548e24
--- /dev/null
+++ b/external/libgltf/patches/wrong_animation_state_when_set_time_to_null.patch
@@ -0,0 +1,12 @@
+diff -ur libgltf.org/src/libgltf.cpp libgltf/src/libgltf.cpp
+--- libgltf.org/src/libgltf.cpp	2014-06-23 20:38:35.470838661 +0200
++++ libgltf/src/libgltf.cpp	2014-06-23 20:44:37.042823092 +0200
+@@ -235,7 +235,7 @@
+     RenderScene* renderScene = (RenderScene*)handle->renderer;
+     if (time <= 0)
+     {
+-        renderScene->startAnimation();
++        renderScene->setAnimTime(0.0);
+     } 
+     else
+     {
diff --git a/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch b/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch
new file mode 100644
index 0000000..7e5554e
--- /dev/null
+++ b/external/libgltf/patches/wrong_duration_caused_by_uninitialized_member.patch
@@ -0,0 +1,13 @@
+diff -ur libgltf.org/src/Common.cpp libgltf/src/Common.cpp
+--- libgltf.org/src/Common.cpp	2014-06-23 20:16:17.746896264 +0200
++++ libgltf/src/Common.cpp	2014-06-23 20:17:50.610892265 +0200
+@@ -1037,7 +1037,8 @@
+ 
+ /* -- Scene -- */
+ Scene::Scene()
+-    : pRootNode(0)
++    : mDuration(0.0)
++    , pRootNode(0)
+     , pBuffer(0)
+     , pGltfHandle(0)
+     , bUseCameraInJson(false)
diff --git a/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch b/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch
new file mode 100644
index 0000000..aa30dc2
--- /dev/null
+++ b/external/libgltf/patches/wrong_media_time_at_first_run_caused_by_uninitilized_member.patch
@@ -0,0 +1,11 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp	2014-06-23 21:17:51.466737211 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-23 21:23:23.718722904 +0200
+@@ -602,6 +602,7 @@
+     , roCameraX(1.0f), roCameraY(1.0f)
+     , initCameraLocalMatrix(1.0f),initCameraGlobalMatrix(1.0f)
+     , bAnimation(true), pTempMatrix(0)
++    , bIsTimeAvailable(false)
+ {
+     mLastModelView = glm::mat4(0.0);
+ #if ENABLE_FPS
diff --git a/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch b/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch
new file mode 100644
index 0000000..07f7f6f
--- /dev/null
+++ b/external/libgltf/patches/wrong_media_time_caused_by_missing_fmod.patch
@@ -0,0 +1,14 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp	2014-06-23 20:35:06.246847670 +0200
++++ libgltf/src/RenderScene.cpp	2014-06-23 20:35:24.366846890 +0200
+@@ -1919,7 +1919,9 @@
+ 
+ double RenderScene::getAnimTime()
+ {
+-    return mCurrentTime;
++    errno = 0;
++    double time = fmod(this->mCurrentTime, this->mDuration);
++    return errno == EDOM ? 0.0 : time;
+ }
+ 
+ void RenderScene::setAnimLoop(int loop)
diff --git a/readlicense_oo/license/LICENSE b/readlicense_oo/license/LICENSE
index 33c9a13..c010c8f 100644
--- a/readlicense_oo/license/LICENSE
+++ b/readlicense_oo/license/LICENSE
@@ -1074,6 +1074,54 @@ libfreehand
 
    See MPL Version 2 below
 
+libgltf
+
+   The following software may be included in this product: libgltf. Use
+   of any of this software is governed by the terms of the license below:
+
+   License for libgltf except trackbal.h and trackball.cpp source files:
+
+   MPL 2
+
+   See MPL Version 2 below
+
+   License for trackbal.h and trackball.cpp source files:
+
+   (c) Copyright 1993, 1994, Silicon Graphics, Inc.
+   ALL RIGHTS RESERVED
+   Permission to use, copy, modify, and distribute this software for
+   any purpose and without fee is hereby granted, provided that the above
+   copyright notice appear in all copies and that both the copyright notice
+   and this permission notice appear in supporting documentation, and that
+   the name of Silicon Graphics, Inc. not be used in advertising
+   or publicity pertaining to distribution of the software without specific,
+   written prior permission.
+
+   THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
+   AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
+   INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+   FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
+   GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+   SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+   KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+   LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+   THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
+   ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
+   ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
+   POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
+
+   US Government Users Restricted Rights
+   Use, duplication, or disclosure by the Government is subject to
+   restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+   (c)(1)(ii) of the Rights in Technical Data and Computer Software
+   clause at DFARS 252.227-7013 and/or in similar or successor
+   clauses in the FAR or the DOD or NASA FAR Supplement.
+   Unpublished-- rights reserved under the copyright laws of the
+   United States.  Contractor/manufacturer is Silicon Graphics,
+   Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
+
+   OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+
 liblangtag
 
    The following software may be included in this product: liblangtag. Use
diff --git a/readlicense_oo/license/LICENSE.fodt b/readlicense_oo/license/LICENSE.fodt
index 8b7d54b..6ca14cf 100644
--- a/readlicense_oo/license/LICENSE.fodt
+++ b/readlicense_oo/license/LICENSE.fodt
@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/cs
 s3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
- <office:meta><meta:creation-date>2011-05-11T11:39:17.79</meta:creation-date><dc:date>2014-01-02T23:55:17.220097223</dc:date><meta:editing-duration>P6DT2H11M41S</meta:editing-duration><meta:editing-cycles>248</meta:editing-cycles><meta:generator>LibreOffice/4.1.3.2$Linux_X86_64 LibreOffice_project/410m0$Build-2</meta:generator><meta:keyword>License</meta:keyword><meta:keyword>GPL</meta:keyword><meta:keyword>LGPL</meta:keyword><meta:keyword>MPL</meta:keyword><meta:keyword>Apache</meta:keyword><meta:keyword>CC</meta:keyword><dc:subject>LibreOffice Licensing and Legal information</dc:subject><dc:title>Licensing and Legal information</dc:title><dc:creator>Andras Timar</dc:creator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="193" meta:paragraph-count="2876" meta:word-count="66437" meta:character-count="411655" meta:non-whitespace-character-count="346745"/></office:meta>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2011-05-11T11:39:17.79</meta:creation-date><dc:date>2014-06-25T00:24:51.923545982</dc:date><meta:editing-duration>P6DT2H11M41S</meta:editing-duration><meta:editing-cycles>250</meta:editing-cycles><meta:generator>LibreOffice/4.1.6.2$Linux_x86 LibreOffice_project/40ff705089295be5be0aae9b15123f687c05b0a</meta:generator><meta:keyword>License</meta:keyword><meta:keyword>GPL</meta:keyword><meta:keyword>LGPL</meta:keyword><meta:keyword>MPL</meta:keyword><meta:keyword>Apache</meta:keyword><meta:keyword>CC</meta:keyword><dc:subject>LibreOffice Licensing and Legal information</dc:subject><dc:title>Licensing and Legal information</dc:title><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="191" meta:paragraph-count="2865" meta:word-count="65855" meta:character-count="407891" meta:non-whitespace-character-count="343548"/></office:meta>
  <office:settings>
   <config:config-item-set config:name="ooo:view-settings">
-   <config:config-item config:name="ViewAreaTop" config:type="long">2981113</config:config-item>
-   <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
-   <config:config-item config:name="ViewAreaWidth" config:type="long">25428</config:config-item>
-   <config:config-item config:name="ViewAreaHeight" config:type="long">20004</config:config-item>
+   <config:config-item config:name="ViewAreaTop" config:type="int">667173</config:config-item>
+   <config:config-item config:name="ViewAreaLeft" config:type="int">0</config:config-item>
+   <config:config-item config:name="ViewAreaWidth" config:type="int">31963</config:config-item>
+   <config:config-item config:name="ViewAreaHeight" config:type="int">14104</config:config-item>
    <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
    <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
    <config:config-item-map-indexed config:name="Views">
     <config:config-item-map-entry>
      <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
-     <config:config-item config:name="ViewLeft" config:type="long">4214</config:config-item>
-     <config:config-item config:name="ViewTop" config:type="long">2983424</config:config-item>
-     <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
-     <config:config-item config:name="VisibleTop" config:type="long">2981113</config:config-item>
-     <config:config-item config:name="VisibleRight" config:type="long">25426</config:config-item>
-     <config:config-item config:name="VisibleBottom" config:type="long">3001116</config:config-item>
+     <config:config-item config:name="ViewLeft" config:type="int">8885</config:config-item>
+     <config:config-item config:name="ViewTop" config:type="int">670489</config:config-item>
+     <config:config-item config:name="VisibleLeft" config:type="int">0</config:config-item>
+     <config:config-item config:name="VisibleTop" config:type="int">667173</config:config-item>
+     <config:config-item config:name="VisibleRight" config:type="int">31962</config:config-item>
+     <config:config-item config:name="VisibleBottom" config:type="int">681276</config:config-item>
      <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
      <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
      <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
@@ -28,82 +28,82 @@
    </config:config-item-map-indexed>
   </config:config-item-set>
   <config:config-item-set config:name="ooo:configuration-settings">
-   <config:config-item config:name="PrintFaxName" config:type="string"/>
-   <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+   <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="Rsid" config:type="int">4217529</config:config-item>
+   <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+   <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
    <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+   <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
    <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
    <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
    <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="RsidRoot" config:type="int">886442</config:config-item>
-   <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
    <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
    <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
    <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
    <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
-   <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
-   <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
-   <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+   <config:config-item config:name="RsidRoot" config:type="int">886442</config:config-item>
+   <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+   <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+   <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
    <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
    <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
-   <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="Rsid" config:type="int">4092520</config:config-item>
-   <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrinterName" config:type="string"/>
+   <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
    <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+   <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
    <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintFaxName" config:type="string"/>
+   <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
    <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
    <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
-   <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
-   <config:config-item config:name="PrinterName" config:type="string"/>
-   <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
-   <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
    <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+   <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+   <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
   </config:config-item-set>
  </office:settings>
  <office:scripts>
@@ -456,282 +456,290 @@
   <style:style style:name="P47" style:family="paragraph" style:parent-style-name="Standard">
    <style:text-properties officeooo:rsid="003d4bab" officeooo:paragraph-rsid="003d4bab"/>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list