[Libreoffice-commits] core.git: Branch 'private/kohei/calc-data-stream' - 24 commits - android/Bootstrap bin/distro-install-sdk config_host.mk.in cui/source desktop/source external/hyphen external/mythes external/vigra i18nlangtag/source include/i18nlangtag ios/CustomTarget_MobileLibreOffice_app.mk ios/CustomTarget_TiledLibreOffice_app.mk ios/experimental ios/MobileLibreOffice ios/Module_ios.mk odk/config odk/settings sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk sdext/source svtools/source sw/CppunitTest_sw_filters_test.mk sw/qa sw/source unotools/source vcl/inc vcl/osx vcl/quartz xmloff/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Dec 18 16:50:43 PST 2013


Rebased ref, commits from common ancestor:
commit 75474834e3479462db1937dc94f105d214448f16
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 19:51:17 2013 -0500

    Disable this option too.
    
    Change-Id: Iec4925afb03b81d0b4d9fe912c8f20b135ef74d3

diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index fa21dd9..214d176 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -40,6 +40,7 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, Window* pParent)
     m_pCbUrl->SetSelectHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
     m_pRBAddressValue->SetClickHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
     m_pRBAddressValue->Enable(false);
+    m_pRBNoMove->Enable(false);
     m_pRBValuesInLine->SetClickHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
     m_pEdRange->SetModifyHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
     m_pBtnBrowse->SetClickHdl( LINK( this, DataStreamDlg, BrowseHdl ) );
commit 12a0bf110bca1f4365a254a09ebf8761ce222865
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 17:48:59 2013 -0500

    We don't need these yet.
    
    Change-Id: Iff875a690f319eb92ccfb8010853714ac60dcc9a

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 61dd1bd..74d9cd1 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1818,9 +1818,6 @@ public:
                          */
     void                Broadcast( const ScHint& rHint );
 
-    void BroadcastCells( const ScRange& rRange, sal_uLong nHint );
-    void BroadcastCells( const ScRangeList& rRanges, sal_uLong nHint );
-
                         /// only area, no cell broadcast
     void                AreaBroadcast( const ScHint& rHint );
                         /// only areas in range, no cell broadcasts
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index ec2e1cf..b8f691b 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -104,34 +104,6 @@ void ScDocument::Broadcast( const ScHint& rHint )
     }
 }
 
-void ScDocument::BroadcastCells( const ScRange& rRange, sal_uLong nHint )
-{
-    // TODO : For now, this simply makes multiple Broadcast() calls one cell
-    // at a time.  In the future, we should add a more efficient way to
-    // make a range of cell broadcasts.
-
-    ScHint aHint(nHint, rRange.aStart);
-
-    for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol)
-    {
-        for (SCROW nRow = rRange.aStart.Row(); nRow <= rRange.aEnd.Row(); ++nRow)
-        {
-            aHint.GetAddress().SetCol(nCol);
-            aHint.GetAddress().SetRow(nRow);
-            Broadcast(aHint);
-        }
-    }
-}
-
-void ScDocument::BroadcastCells( const ScRangeList& rRanges, sal_uLong nHint )
-{
-    for (size_t i = 0, n = rRanges.size(); i < n; ++i)
-    {
-        const ScRange* p = rRanges[i];
-        BroadcastCells(*p, nHint);
-    }
-}
-
 void ScDocument::AreaBroadcast( const ScHint& rHint )
 {
     if ( !pBASM )
commit d5452cef5f8c40fbb9da9e91c6606d525c98bfd3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 16:40:36 2013 -0500

    Don't forget to set document modified afterward.
    
    Change-Id: I5b2b9a3dad2aeee6bc5a4a4767b239c92865b2f4

diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index e9b49d8..c506ee4 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -392,6 +392,7 @@ void DataStream::Refresh()
 {
     // Hard recalc will repaint the grid area.
     mpDocShell->DoHardRecalc(true);
+    mpDocShell->SetDocumentModified(true);
 
     mfLastRefreshTime = getNow();
     mnLinesSinceRefresh = 0;
commit df57f73ff7cfa8a23537d9aa9f50aca1ca7664de
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 16:19:05 2013 -0500

    Handle "refresh on empty line" setting from the UI.
    
    With this set, when we detect an empty line, we'll trigger refresh and
    discard the line.  If not set, we'll import an empty line.
    
    Change-Id: Ic3ccb1adbd0c7273c3affff82a2d111c378f2af3

diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index f9686ae..e9b49d8 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -251,6 +251,8 @@ DataStream::DataStream(ScDocShell *pShell, const OUString& rURL, const ScRange&
     maDocAccess(*mpDoc),
     meMove(NO_MOVE),
     mbRunning(false),
+    mbValuesInLine(false),
+    mbRefreshOnEmptyLine(false),
     mpLines(0),
     mnLinesCount(0),
     mnLinesSinceRefresh(0),
@@ -381,6 +383,11 @@ void DataStream::StopImport()
     Refresh();
 }
 
+void DataStream::SetRefreshOnEmptyLine( bool bVal )
+{
+    mbRefreshOnEmptyLine = bVal;
+}
+
 void DataStream::Refresh()
 {
     // Hard recalc will repaint the grid area.
@@ -437,18 +444,38 @@ IMPL_LINK_NOARG(DataStream, RefreshHdl)
 
 namespace {
 
+struct StrVal
+{
+    ScAddress maPos;
+    OUString maStr;
+
+    StrVal( const ScAddress& rPos, const OUString& rStr ) : maPos(rPos), maStr(rStr) {}
+};
+
+struct NumVal
+{
+    ScAddress maPos;
+    double mfVal;
+
+    NumVal( const ScAddress& rPos, double fVal ) : maPos(rPos), mfVal(fVal) {}
+};
+
+typedef std::vector<StrVal> StrValArray;
+typedef std::vector<NumVal> NumValArray;
+
 /**
  * This handler handles a single line CSV input.
  */
 class CSVHandler
 {
-    DocumentStreamAccess& mrDoc;
     ScAddress maPos;
     SCCOL mnEndCol;
 
+    StrValArray maStrs;
+    NumValArray maNums;
+
 public:
-    CSVHandler( DocumentStreamAccess& rDoc, const ScAddress& rPos, SCCOL nEndCol ) :
-        mrDoc(rDoc), maPos(rPos), mnEndCol(nEndCol) {}
+    CSVHandler( const ScAddress& rPos, SCCOL nEndCol ) : maPos(rPos), mnEndCol(nEndCol) {}
 
     void begin_parse() {}
     void end_parse() {}
@@ -462,12 +489,15 @@ public:
             OUString aStr(p, n, RTL_TEXTENCODING_UTF8);
             double fVal;
             if (ScStringUtil::parseSimpleNumber(aStr, '.', ',', fVal))
-                mrDoc.setNumericCell(maPos, fVal);
+                maNums.push_back(NumVal(maPos, fVal));
             else
-                mrDoc.setStringCell(maPos, aStr);
+                maStrs.push_back(StrVal(maPos, aStr));
         }
         maPos.IncCol();
     }
+
+    const StrValArray& getStrs() const { return maStrs; }
+    const NumValArray& getNums() const { return maNums; }
 };
 
 }
@@ -478,61 +508,34 @@ void DataStream::Text2Doc()
     orcus::csv_parser_config aConfig;
     aConfig.delimiters.push_back(',');
     aConfig.text_qualifier = '"';
-    CSVHandler aHdl(maDocAccess, ScAddress(maStartRange.aStart.Col(), mnCurRow, maStartRange.aStart.Tab()), maStartRange.aEnd.Col());
+    CSVHandler aHdl(ScAddress(maStartRange.aStart.Col(), mnCurRow, maStartRange.aStart.Tab()), maStartRange.aEnd.Col());
     orcus::csv_parser<CSVHandler> parser(aLine.getStr(), aLine.getLength(), aHdl, aConfig);
     parser.parse();
 
-    ++mnLinesSinceRefresh;
-}
-
-#else
-
-void DataStream::Text2Doc() {}
-
-#endif
-
-bool DataStream::ImportData()
-{
-    SolarMutexGuard aGuard;
-    if (ScDocShell::GetViewData()->GetViewShell()->NeedsRepaint())
-        return mbRunning;
+    const StrValArray& rStrs = aHdl.getStrs();
+    const NumValArray& rNums = aHdl.getNums();
+    if (rStrs.empty() && rNums.empty() && mbRefreshOnEmptyLine)
+    {
+        // Empty line detected.  Trigger refresh and discard it.
+        Refresh();
+        return;
+    }
 
     MoveData();
-    if (mbValuesInLine)
     {
-        // do CSV import
-        Text2Doc();
+        StrValArray::const_iterator it = rStrs.begin(), itEnd = rStrs.end();
+        for (; it != itEnd; ++it)
+            maDocAccess.setStringCell(it->maPos, it->maStr);
     }
-    else
-    {
-#if 0 // TODO : temporarily disable this code.
-        ScDocumentImport aDocImport(*mpDoc);
-        // read more lines at once but not too much
-        for (int i = 0; i < 10; ++i)
-        {
-            OUString sLine( OStringToOUString(ConsumeLine(), RTL_TEXTENCODING_UTF8) );
-            if (sLine.indexOf(',') <= 0)
-                continue;
-
-            OUString sAddress( sLine.copy(0, sLine.indexOf(',')) );
-            OUString sValue( sLine.copy(sLine.indexOf(',') + 1) );
-            ScAddress aAddress;
-            aAddress.Parse(sAddress, mpDoc);
-            if (!aAddress.IsValid())
-                continue;
 
-            if (sValue == "0" || ( sValue.indexOf(':') == -1 && sValue.toDouble() ))
-                aDocImport.setNumericCell(aAddress, sValue.toDouble());
-            else
-                aDocImport.setStringCell(aAddress, sValue);
-            maBroadcastRanges.Join(aAddress);
-        }
-        aDocImport.finalize();
-#endif
+    {
+        NumValArray::const_iterator it = rNums.begin(), itEnd = rNums.end();
+        for (; it != itEnd; ++it)
+            maDocAccess.setNumericCell(it->maPos, it->mfVal);
     }
 
     if (meMove == NO_MOVE)
-        return mbRunning;
+        return;
 
     if (meMove == RANGE_DOWN)
     {
@@ -546,6 +549,26 @@ bool DataStream::ImportData()
         // least we have processed 200 lines.
         Refresh();
 
+    ++mnLinesSinceRefresh;
+}
+
+#else
+
+void DataStream::Text2Doc() {}
+
+#endif
+
+bool DataStream::ImportData()
+{
+    SolarMutexGuard aGuard;
+    if (!mbValuesInLine)
+        // We no longer support this mode. To be deleted later.
+        return false;
+
+    if (ScDocShell::GetViewData()->GetViewShell()->NeedsRepaint())
+        return mbRunning;
+
+    Text2Doc();
     return mbRunning;
 }
 
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index a593aad..1cde20e 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -78,6 +78,8 @@ public:
     void StartImport();
     void StopImport();
 
+    void SetRefreshOnEmptyLine( bool bVal );
+
 private:
     void Refresh();
 
@@ -91,6 +93,7 @@ private:
     MoveType meMove;
     bool mbRunning;
     bool mbValuesInLine;
+    bool mbRefreshOnEmptyLine;
     LinesList* mpLines;
     size_t mnLinesCount;
     size_t mnLinesSinceRefresh;
diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx
index d817743..0a7f167 100644
--- a/sc/source/ui/inc/datastreamdlg.hxx
+++ b/sc/source/ui/inc/datastreamdlg.hxx
@@ -30,6 +30,7 @@ class DataStreamDlg : public ModalDialog
     RadioButton*    m_pRBScriptData;
     RadioButton*    m_pRBValuesInLine;
     RadioButton*    m_pRBAddressValue;
+    CheckBox*       m_pCBRefreshOnEmpty;
     RadioButton*    m_pRBDataDown;
     RadioButton*    m_pRBRangeDown;
     RadioButton*    m_pRBNoMove;
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index c004fbc..fa21dd9 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -26,6 +26,7 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, Window* pParent)
     get(m_pRBScriptData, "scriptdata");
     get(m_pRBValuesInLine, "valuesinline");
     get(m_pRBAddressValue, "addressvalue");
+    get(m_pCBRefreshOnEmpty, "refresh_ui");
     get(m_pRBDataDown, "datadown");
     get(m_pRBRangeDown, "rangedown");
     get(m_pRBNoMove, "nomove");
@@ -166,10 +167,12 @@ void DataStreamDlg::StartStream(DataStream *pStream)
     if (pStream)
     {
         pStream->Decode(rURL, aStartRange, nLimit, eMove, nSettings);
+        pStream->SetRefreshOnEmptyLine(m_pCBRefreshOnEmpty->IsChecked());
         return;
     }
 
     pStream = DataStream::Set(mpDocShell, rURL, aStartRange, nLimit, eMove, nSettings);
+    pStream->SetRefreshOnEmptyLine(m_pCBRefreshOnEmpty->IsChecked());
     DataStream::MakeToolbarVisible();
     pStream->StartImport();
 }
commit b8e85af1eddb58ff60d93f64e157b31a904683b2
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 14:55:17 2013 -0500

    Fine-tune our refresh policy during streaming.
    
    Change-Id: I9eff0bc0e4087261e2283a55211c8a9daf2a8b24

diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index cbf8957..f9686ae 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -13,12 +13,12 @@
 #include <com/sun/star/ui/XUIElement.hpp>
 #include <officecfg/Office/Common.hxx>
 #include <osl/conditn.hxx>
+#include <osl/time.h>
 #include <rtl/strbuf.hxx>
 #include <salhelper/thread.hxx>
 #include <sfx2/linkmgr.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <arealink.hxx>
-#include <asciiopt.hxx>
 #include <datastreamdlg.hxx>
 #include <dbfunc.hxx>
 #include <docsh.hxx>
@@ -42,6 +42,13 @@
 
 namespace sc {
 
+inline double getNow()
+{
+    TimeValue now;
+    osl_getSystemTime(&now);
+    return static_cast<double>(now.Seconds) + static_cast<double>(now.Nanosec) / 1000000000.0;
+}
+
 namespace datastreams {
 
 class CallerThread : public salhelper::Thread
@@ -246,7 +253,8 @@ DataStream::DataStream(ScDocShell *pShell, const OUString& rURL, const ScRange&
     mbRunning(false),
     mpLines(0),
     mnLinesCount(0),
-    mnRepaintCounter(0),
+    mnLinesSinceRefresh(0),
+    mfLastRefreshTime(0.0),
     mnCurRow(0)
 {
     mxThread = new datastreams::CallerThread( this );
@@ -375,14 +383,11 @@ void DataStream::StopImport()
 
 void DataStream::Refresh()
 {
-    SCROW nEndRow = mpEndRange ? mpEndRange->aEnd.Row() : MAXROW;
-    ScRange aRange(maStartRange.aStart);
-    aRange.aEnd = ScAddress(maStartRange.aEnd.Col(), nEndRow, maStartRange.aStart.Tab());
-
-    mnRepaintCounter = 0;
-
     // Hard recalc will repaint the grid area.
     mpDocShell->DoHardRecalc(true);
+
+    mfLastRefreshTime = getNow();
+    mnLinesSinceRefresh = 0;
 }
 
 void DataStream::MoveData()
@@ -477,7 +482,7 @@ void DataStream::Text2Doc()
     orcus::csv_parser<CSVHandler> parser(aLine.getStr(), aLine.getLength(), aHdl, aConfig);
     parser.parse();
 
-    ++mnRepaintCounter;
+    ++mnLinesSinceRefresh;
 }
 
 #else
@@ -536,7 +541,9 @@ bool DataStream::ImportData()
 //              maStartRange.aStart.Col(), mnCurRow, SC_FOLLOW_JUMP);
     }
 
-    if (mnRepaintCounter > 200)
+    if (getNow() - mfLastRefreshTime > 0.1 && mnLinesSinceRefresh > 200)
+        // Refresh no more frequently than every 0.1 second, and wait until at
+        // least we have processed 200 lines.
         Refresh();
 
     return mbRunning;
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index 86be03b..a593aad 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -93,7 +93,8 @@ private:
     bool mbValuesInLine;
     LinesList* mpLines;
     size_t mnLinesCount;
-    size_t mnRepaintCounter;
+    size_t mnLinesSinceRefresh;
+    double mfLastRefreshTime;
     SCROW mnCurRow;
     ScRange maStartRange;
     boost::scoped_ptr<ScRange> mpEndRange;
commit b9524c17b56e4bdecb76880582853fdeb3380013
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Dec 18 14:15:29 2013 -0500

    Just do hard-recalc on stream refresh. That takes care of all our needs.
    
    Change-Id: I9a454089843d1373153988a29843b95db22ee284

diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 9121d48..cbf8957 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -370,23 +370,19 @@ void DataStream::StopImport()
         return;
 
     mbRunning = false;
-    Repaint();
+    Refresh();
 }
 
-void DataStream::Repaint()
+void DataStream::Refresh()
 {
     SCROW nEndRow = mpEndRange ? mpEndRange->aEnd.Row() : MAXROW;
     ScRange aRange(maStartRange.aStart);
     aRange.aEnd = ScAddress(maStartRange.aEnd.Col(), nEndRow, maStartRange.aStart.Tab());
 
-    mpDocShell->PostPaint(aRange, PAINT_GRID);
     mnRepaintCounter = 0;
-}
 
-void DataStream::Broadcast()
-{
-    mpDoc->BroadcastCells(maBroadcastRanges, SC_HINT_DATACHANGED);
-    maBroadcastRanges.RemoveAll();
+    // Hard recalc will repaint the grid area.
+    mpDocShell->DoHardRecalc(true);
 }
 
 void DataStream::MoveData()
@@ -541,7 +537,7 @@ bool DataStream::ImportData()
     }
 
     if (mnRepaintCounter > 200)
-        Repaint();
+        Refresh();
 
     return mbRunning;
 }
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index 494a73e..86be03b 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -79,8 +79,7 @@ public:
     void StopImport();
 
 private:
-    void Repaint();
-    void Broadcast();
+    void Refresh();
 
 private:
     ScDocShell* mpDocShell;
@@ -97,7 +96,6 @@ private:
     size_t mnRepaintCounter;
     SCROW mnCurRow;
     ScRange maStartRange;
-    ScRangeList maBroadcastRanges;
     boost::scoped_ptr<ScRange> mpEndRange;
     rtl::Reference<datastreams::CallerThread> mxThread;
     rtl::Reference<datastreams::ReaderThread> mxReaderThread;
commit 8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Dec 18 23:34:54 2013 +0100

    fdo#72850: ODF export: don't export spurious style:display="false"
    
    ... on style:header-left, style:header-first, style:footer-left,
    style:footer-first.
    
    (regression from d92345561c998f7382cf9ef0fdcd29096f978435)
    
    Change-Id: I48c51fcd2b07ae8b0e3ec2c1087a388c6900b366

diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index b1ef767..2a711b0 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -54,6 +54,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa
     bLeft( bLft ),
     bFirst( bFrst )
 {
+    // NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 !
     if( bLeft || bFirst )
     {
         Any aAny;
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index fa473ec..b82cace 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -128,18 +128,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bHeader = sal_False;
         aAny >>= bHeader;
 
-        sal_Bool bHeaderFirst = sal_False;
+        sal_Bool bHeaderFirstShared = sal_False;
         if( bHeader )
         {
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
-            aAny >>= bHeaderFirst;
+            aAny >>= bHeaderFirstShared;
         }
 
-        sal_Bool bHeaderLeft = sal_False;
+        sal_Bool bHeaderLeftShared = sal_False;
         if( bHeader )
         {
             aAny = rPropSet->getPropertyValue( sHeaderShareContent );
-            aAny >>= bHeaderLeft;
+            aAny >>= bHeaderLeftShared;
         }
 
         if( xHeaderText.is() )
@@ -154,7 +154,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xHeaderTextFirst.is() && xHeaderTextFirst != xHeaderText )
         {
-            if( !bHeaderFirst )
+            if (bHeaderFirstShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -164,7 +164,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xHeaderTextLeft.is() && xHeaderTextLeft != xHeaderText )
         {
-            if( !bHeaderLeft )
+            if (bHeaderLeftShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -176,18 +176,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bFooter = sal_False;
         aAny >>= bFooter;
 
-        sal_Bool bFooterFirst = sal_False;
+        sal_Bool bFooterFirstShared = sal_False;
         if( bFooter )
         {
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
-            aAny >>= bFooterFirst;
+            aAny >>= bFooterFirstShared;
         }
 
-        sal_Bool bFooterLeft = sal_False;
+        sal_Bool bFooterLeftShared = sal_False;
         if( bFooter )
         {
             aAny = rPropSet->getPropertyValue( sFooterShareContent );
-            aAny >>= bFooterLeft;
+            aAny >>= bFooterLeftShared;
         }
 
         if( xFooterText.is() )
@@ -202,7 +202,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xFooterTextFirst.is() && xFooterTextFirst != xFooterText )
         {
-            if( !bFooterFirst )
+            if (bFooterFirstShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -212,7 +212,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xFooterTextLeft.is() && xFooterTextLeft != xFooterText )
         {
-            if( !bFooterLeft )
+            if (bFooterLeftShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
commit 0d9c4baf86c502e7cc2b6072a530c6fad2179abe
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 19 00:04:55 2013 +0200

    The "fake DPI scale" was always 1
    
    Thanks to kendy for noticing.
    
    Change-Id: I6b62d5a0c1dc5df374629a8f7c6e7d2f7cd7ffbd

diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 1135c7d..c3ffc65 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -74,10 +74,6 @@ class SvpSalGraphics : public SalGraphics
     int                                     mnWidth;
     int                                     mnHeight;
     int                                  mnBitmapDepth;  // zero unless bitmap
-    /// some graphics implementations (e.g. AquaSalInfoPrinter) scale
-    /// everything down by a factor (see SetupPrinterGraphics for details)
-    /// so we have to compensate for it with the inverse factor
-    double                               mfFakeDPIScale;
 
     /// path representing current clip region
     CGMutablePathRef                        mxClipPath;
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 49140fa..e0b86c3 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -92,7 +92,7 @@ public:
 
     SalLayout* GetTextLayout( void ) const;
 
-    void       GetFontMetric( float fPDIY, ImplFontMetricData& ) const;
+    void       GetFontMetric( ImplFontMetricData& ) const;
     bool       GetGlyphBoundRect( sal_GlyphId, Rectangle& ) const;
     bool       GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) const;
 
@@ -156,10 +156,6 @@ protected:
     /// device resolution of this graphics
     long                                    mnRealDPIX;
     long                                    mnRealDPIY;
-    /// some graphics implementations (e.g. AquaSalInfoPrinter) scale
-    /// everything down by a factor (see SetupPrinterGraphics for details)
-    /// so we have to compensate for it with the inverse factor
-    double                                  mfFakeDPIScale;
 
     /// path representing current clip region
     CGMutablePathRef                        mxClipPath;
@@ -194,7 +190,7 @@ public:
     bool                IsBrushVisible() const  { return maFillColor.IsVisible(); }
 
     void                SetWindowGraphics( AquaSalFrame* pFrame );
-    void                SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY, double fFakeScale );
+    void                SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY );
     void                SetVirDevGraphics( CGLayerRef, CGContextRef, int nBitDepth = 0 );
 
     void                initResolution( NSWindow* );
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 082fa1c..37fa0ec 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -139,7 +139,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
                 // scale to be top/down and reflect our "virtual" DPI
                 CGContextScaleCTM( i_rContext, -(72.0/double(nDPIY)), (72.0/double(nDPIX)) );
             }
-            mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 );
+            mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY );
         }
         else
             OSL_FAIL( "no print info in SetupPrinterGraphics" );
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index d93d4b5..8211b9f 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -112,20 +112,20 @@ CoreTextStyle::~CoreTextStyle( void )
 
 // -----------------------------------------------------------------------
 
-void CoreTextStyle::GetFontMetric( float fPixelSize, ImplFontMetricData& rMetric ) const
+void CoreTextStyle::GetFontMetric( ImplFontMetricData& rMetric ) const
 {
     // get the matching CoreText font handle
     // TODO: is it worth it to cache the CTFontRef in SetFont() and reuse it here?
     CTFontRef aCTFontRef = (CTFontRef)CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName );
 
-    rMetric.mnAscent       = lrint( CTFontGetAscent( aCTFontRef ) * fPixelSize);
-    rMetric.mnDescent      = lrint( CTFontGetDescent( aCTFontRef ) * fPixelSize);
-    rMetric.mnExtLeading   = lrint( CTFontGetLeading( aCTFontRef ) * fPixelSize);
+    rMetric.mnAscent       = CTFontGetAscent( aCTFontRef );
+    rMetric.mnDescent      = CTFontGetDescent( aCTFontRef );
+    rMetric.mnExtLeading   = CTFontGetLeading( aCTFontRef );
     rMetric.mnIntLeading   = 0;
     // since ImplFontMetricData::mnWidth is only used for stretching/squeezing fonts
     // setting this width to the pixel height of the fontsize is good enough
     // it also makes the calculation of the stretch factor simple
-    rMetric.mnWidth        = lrint( CTFontGetSize( aCTFontRef ) * fPixelSize * mfFontStretch);
+    rMetric.mnWidth        = lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch);
 
     // all CoreText fonts are scalable
     rMetric.mbScalableFont = true;
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 25a219f..ceef023 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -254,7 +254,6 @@ AquaSalGraphics::AquaSalGraphics()
     , mnBitmapDepth( 0 )
     , mnRealDPIX( 0 )
     , mnRealDPIY( 0 )
-    , mfFakeDPIScale( 1.0 )
     , mxClipPath( NULL )
     , maLineColor( COL_WHITE )
     , maFillColor( COL_BLACK )
@@ -274,7 +273,6 @@ AquaSalGraphics::AquaSalGraphics()
     , mnWidth( 0 )
     , mnHeight( 0 )
     , mnBitmapDepth( 0 )
-    , mfFakeDPIScale( 1.0 )
     , mxClipPath( NULL )
     , maLineColor( COL_WHITE )
     , maFillColor( COL_BLACK )
@@ -325,7 +323,7 @@ void AquaSalGraphics::SetTextColor( SalColor nSalColor )
 
 void AquaSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int /*nFallbackLevel*/ )
 {
-    mpTextStyle->GetFontMetric( mfFakeDPIScale, *pMetric );
+    mpTextStyle->GetFontMetric( *pMetric );
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 6f96a6c..59edb05 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -519,7 +519,6 @@ void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics )
     }
     mnRealDPIX = rGraphics.mnRealDPIX;
     mnRealDPIY = rGraphics.mnRealDPIY;
-    mfFakeDPIScale = rGraphics.mfFakeDPIScale;
 }
 
 #endif
@@ -1241,8 +1240,8 @@ void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
         initResolution( (mbWindow && mpFrame) ? mpFrame->getNSWindow() : nil );
     }
 
-    rDPIX = lrint( mfFakeDPIScale * mnRealDPIX);
-    rDPIY = lrint( mfFakeDPIScale * mnRealDPIY);
+    rDPIX = mnRealDPIX;
+    rDPIY = mnRealDPIY;
 }
 
 #endif
@@ -1353,8 +1352,6 @@ void AquaSalGraphics::initResolution( NSWindow* )
         mnRealDPIX = pSalData->mnDPIX;
         mnRealDPIY = pSalData->mnDPIY;
     }
-
-    mfFakeDPIScale = 1.0;
 }
 
 #endif
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index f31b09a..c48089f 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -44,14 +44,13 @@ void AquaSalGraphics::SetWindowGraphics( AquaSalFrame* pFrame )
     mbVirDev    = false;
 }
 
-void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, long nDPIX, long nDPIY, double fScale )
+void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, long nDPIX, long nDPIY )
 {
     mbWindow    = false;
     mbPrinter   = true;
     mbVirDev    = false;
 
     mrContext   = xContext;
-    mfFakeDPIScale = fScale;
     mnRealDPIX  = nDPIX;
     mnRealDPIY  = nDPIY;
 
commit 2753bc1eff1bc595131a59518c1f7e131824b10d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 19 00:16:31 2013 +0200

    Adapt TiledLibreOffice to the new library name to component mapping API
    
    Change-Id: I96e2931763c277d72ff1bb7ebdf5b71c0d6e091b

diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm b/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
index d9f724c..074e472 100644
--- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/lo.mm
@@ -16,69 +16,12 @@
 #include <osl/process.h>
 #include <touch/touch.h>
 
-extern "C" {
-    extern void * analysis_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * animcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * chartcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * cui_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * date_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * dba_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * embobj_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * emboleobj_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * expwrap_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * filterconfig1_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * fwm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * hwp_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * hyphen_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * lng_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * lnth_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * oox_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * pricing_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * scd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * scfilt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sot_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * spell_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * spl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * svt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * svx_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * svxcore_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * tk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * ucppkg1_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * uui_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * wpftdraw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * wpftwriter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * writerfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-    extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
-
-}
-
 extern "C"
 const lib_to_component_mapping *
-lo_get_libmap(void)
+lo_get_library_map(void)
 {
     static lib_to_component_mapping map[] = {
+        NON_APP_SPECIFIC_COMPONENT_MAP
         { "libanalysislo.a", analysis_component_getFactory },
         { "libanimcorelo.a", animcore_component_getFactory },
         { "libavmedialo.a", avmedia_component_getFactory },
@@ -90,7 +33,6 @@ lo_get_libmap(void)
         { "libembobj.a", embobj_component_getFactory },
         { "libemboleobj.a", emboleobj_component_getFactory },
         { "libevtattlo.a", evtatt_component_getFactory },
-        { "libexpwraplo.a", expwrap_component_getFactory },
         { "libfilterconfiglo.a", filterconfig1_component_getFactory },
         { "libfrmlo.a", frm_component_getFactory },
         { "libfsstoragelo.a", fsstorage_component_getFactory },
@@ -139,6 +81,18 @@ lo_get_libmap(void)
     return map;
 }
 
+extern "C"
+const lib_to_component_mapping *
+lo_get_implementation_map(void)
+{
+    static lib_to_component_mapping map[] = {
+        NON_APP_SPECIFIC_DIRECT_COMPONENT_MAP
+        { NULL, NULL }
+    };
+
+    return map;
+}
+
 static NSString *createPaths(NSString *base, NSString *appRootEscaped, NSArray *fileNames)
 {
     NSString *result;
commit 48f625b899b2c7774548af078f25dfccd7602d27
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Dec 18 00:03:02 2013 +0200

    Add a view-only iOS test app using tiled rendering
    
    I had to add some horrible hacks to make sure the test doc has been
    loaded into a Writer shell before retrieving its size and being able
    to render it. Obviously some better solution is needed. But this is
    just a testbed to get some profiling data.
    
    The app is built using an Xcode project, and in gbuild through a
    custom target based on the MobileLibreOffice one. Setting up the
    various files used (or not used...) at run-time should really be
    factored out from the CustomTarget files.
    
    Change-Id: I1711b0cae9d28a09b73476b2d37d98b1820c9943

diff --git a/config_host.mk.in b/config_host.mk.in
index 09442b5..c50c6e0 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -605,6 +605,7 @@ export WPG_CFLAGS=$(gb_SPACE)@WPG_CFLAGS@
 export WPG_LIBS=$(gb_SPACE)@WPG_LIBS@
 export WPS_CFLAGS=$(gb_SPACE)@WPS_CFLAGS@
 export WPS_LIBS=$(gb_SPACE)@WPS_LIBS@
+export XCODE_ARCHS=@XCODE_ARCHS@
 export XINERAMA_LINK=@XINERAMA_LINK@
 export XMLLINT=@XMLLINT@
 export XRANDR_CFLAGS=$(gb_SPACE)@XRANDR_CFLAGS@
diff --git a/ios/CustomTarget_MobileLibreOffice_app.mk b/ios/CustomTarget_MobileLibreOffice_app.mk
index 262cf9d..dcf20d9 100644
--- a/ios/CustomTarget_MobileLibreOffice_app.mk
+++ b/ios/CustomTarget_MobileLibreOffice_app.mk
@@ -8,14 +8,14 @@
 
 #- Env ------------------------------------------------------------------------
 
-DEST_RESOURCE 	:= MobileLibreOffice/resource_link
+MobileLibreOffice_resource 	:= MobileLibreOffice/resource_link
 BUILDID			:=$(shell cd $(SRCDIR) && git log -1 --format=%H)
 
 #- Macros ---------------------------------------------------------------------
 
 define MobileLibreOfficeXcodeBuild 
-	CC=;xcodebuild -project shared/ios_sharedlo.xcodeproj -target ios_sharedlo -arch armv7 -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
-	CC=;xcodebuild -project MobileLibreOffice/MobileLibreOffice.xcodeproj -target MobileLibreOffice -arch armv7 -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
+	CC=;xcodebuild -project shared/ios_sharedlo.xcodeproj -target ios_sharedlo -arch $(XCODE_ARCHS) -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
+	CC=;xcodebuild -project MobileLibreOffice/MobileLibreOffice.xcodeproj -target MobileLibreOffice -arch $(XCODE_ARCHS) -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
 endef
 
 #- Targets --------------------------------------------------------------------
@@ -42,56 +42,56 @@ MobileLibreOffice_setup:
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
 
 	# Resources #
-	rm -rf $(DEST_RESOURCE) 2>/dev/null
-	mkdir -p $(DEST_RESOURCE)
-	mkdir -p $(DEST_RESOURCE)/ure
+	rm -rf $(MobileLibreOffice_resource) 2>/dev/null
+	mkdir -p $(MobileLibreOffice_resource)
+	mkdir -p $(MobileLibreOffice_resource)/ure
 
 	# copy rdb files
-	cp $(INSTDIR)/ure/share/misc/types.rdb 	    $(DEST_RESOURCE)
-	cp $(INSTDIR)/program/types/offapi.rdb      $(DEST_RESOURCE)
-	cp $(INSTDIR)/program/types/oovbaapi.rdb  	$(DEST_RESOURCE)
-	cp $(INSTDIR)/program/services/services.rdb $(DEST_RESOURCE)
-	cp $(INSTDIR)/ure/share/misc/services.rdb   $(DEST_RESOURCE)/ure
+	cp $(INSTDIR)/ure/share/misc/types.rdb 	    $(MobileLibreOffice_resource)
+	cp $(INSTDIR)/program/types/offapi.rdb      $(MobileLibreOffice_resource)
+	cp $(INSTDIR)/program/types/oovbaapi.rdb  	$(MobileLibreOffice_resource)
+	cp $(INSTDIR)/program/services/services.rdb $(MobileLibreOffice_resource)
+	cp $(INSTDIR)/ure/share/misc/services.rdb   $(MobileLibreOffice_resource)/ure
 
 	# copy .res files
 	# program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
 	# we could set STAR_RESOURCE_PATH instead. sigh...
-	mkdir -p $(DEST_RESOURCE)/program/resource
-	cp $(INSTDIR)/program/resource/*en-US.res $(DEST_RESOURCE)/program/resource
+	mkdir -p $(MobileLibreOffice_resource)/program/resource
+	cp $(INSTDIR)/program/resource/*en-US.res $(MobileLibreOffice_resource)/program/resource
 
 	# soffice.cfg
-	mkdir -p $(DEST_RESOURCE)/share/config
-	cp -R $(INSTDIR)/share/config/soffice.cfg $(DEST_RESOURCE)/share/config
+	mkdir -p $(MobileLibreOffice_resource)/share/config
+	cp -R $(INSTDIR)/share/config/soffice.cfg $(MobileLibreOffice_resource)/share/config
 
 	# "registry"
-	cp -R $(INSTDIR)/share/registry $(DEST_RESOURCE)/share
+	cp -R $(INSTDIR)/share/registry $(MobileLibreOffice_resource)/share
 
 	# Set up rc, the "inifile". See getIniFileName_Impl().
-	file=$(DEST_RESOURCE)/rc; \
+	file=$(MobileLibreOffice_resource)/rc; \
 	echo '[Bootstrap]'                                       >  $$file; \
 	echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' >> $$file; \
 	echo 'HOME=$$APP_DATA_DIR/tmp'                           >> $$file;
 
 	# Set up fundamentalrc, unorc, bootstraprc and versionrc.
 	# Do we really need all these?
-	file=$(DEST_RESOURCE)/fundamentalrc; \
+	file=$(MobileLibreOffice_resource)/fundamentalrc; \
 	echo '[Bootstrap]'                                      >  $$file; \
 	echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR'             >> $$file; \
 	echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry res:$${BRAND_BASE_DIR}/registry' >> $$file;
 
-	file=$(DEST_RESOURCE)/unorc; \
+	file=$(MobileLibreOffice_resource)/unorc; \
 	echo '[Bootstrap]' > $$file;
 
 	# bootstraprc must be in $BRAND_BASE_DIR/program
-	mkdir -p $(DEST_RESOURCE)/program
-	file=$(DEST_RESOURCE)/program/bootstraprc; \
+	mkdir -p $(MobileLibreOffice_resource)/program
+	file=$(MobileLibreOffice_resource)/program/bootstraprc; \
 	echo '[Bootstrap]'                                                              >  $$file; \
 	echo 'InstallMode=<installmode>'                                                >> $$file; \
 	echo "ProductKey=LibreOffice $(PRODUCTVERSION)"                                 >> $$file; \
 	echo 'UserInstallation=file://$$APP_DATA_DIR/../Library/Application%20Support'  >> $$file;
 
 	# Is this really needed?
-	file=$(DEST_RESOURCE)/program/versionrc; \
+	file=$(MobileLibreOffice_resource)/program/versionrc; \
 	echo '[Version]'            >  $$file; \
 	echo 'AllLanguages=en-US'   >> $$file; \
 	echo 'BuildVersion='        >> $$file; \
diff --git a/ios/CustomTarget_TiledLibreOffice_app.mk b/ios/CustomTarget_TiledLibreOffice_app.mk
new file mode 100644
index 0000000..44cacf5
--- /dev/null
+++ b/ios/CustomTarget_TiledLibreOffice_app.mk
@@ -0,0 +1,100 @@
+# -*- 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/.
+
+#- Env ------------------------------------------------------------------------
+
+TiledLibreOffice_resource := experimental/TiledLibreOffice/Resources
+BUILDID			:=$(shell cd $(SRCDIR) && git log -1 --format=%H)
+
+#- Macros ---------------------------------------------------------------------
+
+define TiledLibreOfficeXcodeBuild
+	CC=;xcodebuild -project experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj -target TiledLibreOffice -arch $(XCODE_ARCHS) -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) $(if $(verbose)$(VERBOSE),,>/dev/null)
+endef
+
+#- Targets --------------------------------------------------------------------
+
+.PHONY: TiledLibreOffice_setup
+
+# Register target
+$(eval $(call gb_CustomTarget_CustomTarget,ios/TiledLibreOffice))
+
+# Build
+# Depend on the custom target that sets up lo.xcconfig
+$(call gb_CustomTarget_get_target,ios/TiledLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) TiledLibreOffice_setup
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
+	$(call TiledLibreOfficeXcodeBuild, clean build)
+
+# Setup
+TiledLibreOffice_setup:
+	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
+	# Resources #
+	rm -rf $(TiledLibreOffice_resource) 2>/dev/null
+	mkdir -p $(TiledLibreOffice_resource)
+	mkdir -p $(TiledLibreOffice_resource)/ure
+
+	# copy rdb files
+	cp $(INSTDIR)/ure/share/misc/types.rdb 	    $(TiledLibreOffice_resource)
+	cp $(INSTDIR)/program/types/offapi.rdb      $(TiledLibreOffice_resource)
+	cp $(INSTDIR)/program/types/oovbaapi.rdb  	$(TiledLibreOffice_resource)
+	cp $(INSTDIR)/program/services/services.rdb $(TiledLibreOffice_resource)
+	cp $(INSTDIR)/ure/share/misc/services.rdb   $(TiledLibreOffice_resource)/ure
+
+	# copy .res files
+	# program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
+	# we could set STAR_RESOURCE_PATH instead. sigh...
+	mkdir -p $(TiledLibreOffice_resource)/program/resource
+	cp $(INSTDIR)/program/resource/*en-US.res $(TiledLibreOffice_resource)/program/resource
+
+	# soffice.cfg
+	mkdir -p $(TiledLibreOffice_resource)/share/config
+	cp -R $(INSTDIR)/share/config/soffice.cfg $(TiledLibreOffice_resource)/share/config
+
+	# "registry"
+	cp -R $(INSTDIR)/share/registry $(TiledLibreOffice_resource)/share
+
+	# Set up rc, the "inifile". See getIniFileName_Impl().
+	file=$(TiledLibreOffice_resource)/rc; \
+	echo '[Bootstrap]'                                       >  $$file; \
+	echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' >> $$file; \
+	echo 'HOME=$$APP_DATA_DIR/tmp'                           >> $$file;
+
+	# Set up fundamentalrc, unorc, bootstraprc and versionrc.
+	# Do we really need all these?
+	file=$(TiledLibreOffice_resource)/fundamentalrc; \
+	echo '[Bootstrap]'                                      >  $$file; \
+	echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR'             >> $$file; \
+	echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry res:$${BRAND_BASE_DIR}/registry' >> $$file;
+
+	file=$(TiledLibreOffice_resource)/unorc; \
+	echo '[Bootstrap]' > $$file;
+
+	# bootstraprc must be in $BRAND_BASE_DIR/program
+	mkdir -p $(TiledLibreOffice_resource)/program
+	file=$(TiledLibreOffice_resource)/program/bootstraprc; \
+	echo '[Bootstrap]'                                                              >  $$file; \
+	echo 'InstallMode=<installmode>'                                                >> $$file; \
+	echo "ProductKey=LibreOffice $(PRODUCTVERSION)"                                 >> $$file; \
+	echo 'UserInstallation=file://$$APP_DATA_DIR/../Library/Application%20Support'  >> $$file;
+
+	# Is this really needed?
+	file=$(TiledLibreOffice_resource)/program/versionrc; \
+	echo '[Version]'            >  $$file; \
+	echo 'AllLanguages=en-US'   >> $$file; \
+	echo 'BuildVersion='        >> $$file; \
+	echo "buildid=$(BUILDID)"   >> $$file; \
+	echo 'ProductMajor=360'     >> $$file; \
+	echo 'ProductMinor=1'       >> $$file;
+
+# Clean
+$(call gb_CustomTarget_get_clean_target,ios/TiledLibreOffice):
+	$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
+	$(call TiledLibreOfficeXcodeBuild, clean)
+
+# vim: set noet sw=4 ts=4:
diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index ce34006..e0dcfc9 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -129,6 +129,26 @@
 		691D78B0180C12D300D52D5E /* types.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = types.rdb; path = resource_link/types.rdb; sourceTree = SOURCE_ROOT; };
 		88E94769180DB9B600771808 /* NSObject+MLOFileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+MLOFileUtils.h"; sourceTree = "<group>"; };
 		88E9476A180DB9B600771808 /* NSObject+MLOFileUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+MLOFileUtils.m"; sourceTree = "<group>"; };
+		BE0898FE1860D5580021A679 /* brand.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = brand.cxx; path = ../../vcl/source/app/brand.cxx; sourceTree = "<group>"; };
+		BE0898FF1860D5580021A679 /* dbggui.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dbggui.cxx; path = ../../vcl/source/app/dbggui.cxx; sourceTree = "<group>"; };
+		BE0899001860D5580021A679 /* dndhelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dndhelp.cxx; path = ../../vcl/source/app/dndhelp.cxx; sourceTree = "<group>"; };
+		BE0899011860D5580021A679 /* help.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = help.cxx; path = ../../vcl/source/app/help.cxx; sourceTree = "<group>"; };
+		BE0899021860D5580021A679 /* i18nhelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = i18nhelp.cxx; path = ../../vcl/source/app/i18nhelp.cxx; sourceTree = "<group>"; };
+		BE0899031860D5580021A679 /* idlemgr.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = idlemgr.cxx; path = ../../vcl/source/app/idlemgr.cxx; sourceTree = "<group>"; };
+		BE0899041860D5580021A679 /* salvtables.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salvtables.cxx; path = ../../vcl/source/app/salvtables.cxx; sourceTree = "<group>"; };
+		BE0899051860D5580021A679 /* session.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = session.cxx; path = ../../vcl/source/app/session.cxx; sourceTree = "<group>"; };
+		BE0899061860D5580021A679 /* settings.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = settings.cxx; path = ../../vcl/source/app/settings.cxx; sourceTree = "<group>"; };
+		BE0899071860D5580021A679 /* solarmutex.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = solarmutex.cxx; path = ../../vcl/source/app/solarmutex.cxx; sourceTree = "<group>"; };
+		BE0899081860D5580021A679 /* sound.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = sound.cxx; path = ../../vcl/source/app/sound.cxx; sourceTree = "<group>"; };
+		BE0899091860D5580021A679 /* stdtext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = stdtext.cxx; path = ../../vcl/source/app/stdtext.cxx; sourceTree = "<group>"; };
+		BE08990A1860D5580021A679 /* svapp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svapp.cxx; path = ../../vcl/source/app/svapp.cxx; sourceTree = "<group>"; };
+		BE08990B1860D5580021A679 /* svdata.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svdata.cxx; path = ../../vcl/source/app/svdata.cxx; sourceTree = "<group>"; };
+		BE08990C1860D5580021A679 /* svmain.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svmain.cxx; path = ../../vcl/source/app/svmain.cxx; sourceTree = "<group>"; };
+		BE08990D1860D5580021A679 /* svmainhook.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svmainhook.cxx; path = ../../vcl/source/app/svmainhook.cxx; sourceTree = "<group>"; };
+		BE08990E1860D5580021A679 /* timer.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = timer.cxx; path = ../../vcl/source/app/timer.cxx; sourceTree = "<group>"; };
+		BE08990F1860D5580021A679 /* unohelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = unohelp.cxx; path = ../../vcl/source/app/unohelp.cxx; sourceTree = "<group>"; };
+		BE0899101860D5580021A679 /* unohelp2.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = unohelp2.cxx; path = ../../vcl/source/app/unohelp2.cxx; sourceTree = "<group>"; };
+		BE0899111860D5580021A679 /* vclevent.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = vclevent.cxx; path = ../../vcl/source/app/vclevent.cxx; sourceTree = "<group>"; };
 		BE82BDB8182261AD00A447B5 /* pagechg.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pagechg.cxx; path = ../../sw/source/core/layout/pagechg.cxx; sourceTree = "<group>"; };
 		BE82BDBA182261E900A447B5 /* pagepreviewlayout.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = pagepreviewlayout.cxx; path = ../../sw/source/core/view/pagepreviewlayout.cxx; sourceTree = "<group>"; };
 		BE82BDBB182261E900A447B5 /* printdata.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = printdata.cxx; path = ../../sw/source/core/view/printdata.cxx; sourceTree = "<group>"; };
@@ -482,6 +502,33 @@
 			name = Images;
 			sourceTree = "<group>";
 		};
+		BE0898FC1860D5380021A679 /* app */ = {
+			isa = PBXGroup;
+			children = (
+				BE0898FE1860D5580021A679 /* brand.cxx */,
+				BE0898FF1860D5580021A679 /* dbggui.cxx */,
+				BE0899001860D5580021A679 /* dndhelp.cxx */,
+				BE0899011860D5580021A679 /* help.cxx */,
+				BE0899021860D5580021A679 /* i18nhelp.cxx */,
+				BE0899031860D5580021A679 /* idlemgr.cxx */,
+				BE0899041860D5580021A679 /* salvtables.cxx */,
+				BE0899051860D5580021A679 /* session.cxx */,
+				BE0899061860D5580021A679 /* settings.cxx */,
+				BE0899071860D5580021A679 /* solarmutex.cxx */,
+				BE0899081860D5580021A679 /* sound.cxx */,
+				BE0899091860D5580021A679 /* stdtext.cxx */,
+				BE08990A1860D5580021A679 /* svapp.cxx */,
+				BE08990B1860D5580021A679 /* svdata.cxx */,
+				BE08990C1860D5580021A679 /* svmain.cxx */,
+				BE08990D1860D5580021A679 /* svmainhook.cxx */,
+				BE08990E1860D5580021A679 /* timer.cxx */,
+				BE08990F1860D5580021A679 /* unohelp.cxx */,
+				BE0899101860D5580021A679 /* unohelp2.cxx */,
+				BE0899111860D5580021A679 /* vclevent.cxx */,
+			);
+			name = app;
+			sourceTree = "<group>";
+		};
 		BE82BDB41822616200A447B5 /* LibreOffice source files */ = {
 			isa = PBXGroup;
 			children = (
@@ -496,6 +543,7 @@
 		BE82BDB51822617500A447B5 /* vcl */ = {
 			isa = PBXGroup;
 			children = (
+				BE0898FC1860D5380021A679 /* app */,
 				BE82BE4A1822D0E900A447B5 /* quartz */,
 				BE82BDF11822626C00A447B5 /* gdi */,
 				BE82BDF01822625C00A447B5 /* headless */,
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
index caf3220..f112b53 100644
--- a/ios/Module_ios.mk
+++ b/ios/Module_ios.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_Module_add_targets,ios,\
 	CustomTarget_Lo_Xcconfig \
 	Executable_LibreOffice \
 	CustomTarget_LibreOffice_app \
+	CustomTarget_TiledLibreOffice_app \
 	CustomTarget_MobileLibreOffice_app \
 ))
 
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..0f7ad53
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj/project.pbxproj
@@ -0,0 +1,497 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		BE82BD7618218E2E00A447B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE82BD7518218E2E00A447B5 /* Foundation.framework */; };
+		BE82BD7818218E2E00A447B5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE82BD7718218E2E00A447B5 /* CoreGraphics.framework */; };
+		BE82BD7A18218E2E00A447B5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE82BD7918218E2E00A447B5 /* UIKit.framework */; };
+		BE82BD8018218E2E00A447B5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BE82BD7E18218E2E00A447B5 /* InfoPlist.strings */; };
+		BE82BD8218218E2E00A447B5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BD8118218E2E00A447B5 /* main.m */; };
+		BE82BD8618218E2E00A447B5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BD8518218E2E00A447B5 /* AppDelegate.m */; };
+		BE82BD8C18218E2E00A447B5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BD8B18218E2E00A447B5 /* ViewController.m */; };
+		BE82BD8E18218E2E00A447B5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE82BD8D18218E2E00A447B5 /* Images.xcassets */; };
+		BE82BDAC182190E400A447B5 /* TiledView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BDAB182190E400A447B5 /* TiledView.m */; };
+		BE82BDAF1821A1D000A447B5 /* View.m in Sources */ = {isa = PBXBuildFile; fileRef = BE82BDAE1821A1D000A447B5 /* View.m */; };
+		BECAB372186054DE00F814F9 /* lo.mm in Sources */ = {isa = PBXBuildFile; fileRef = BECAB371186054DE00F814F9 /* lo.mm */; };
+		BEEE02D11860ABDB00FBDE67 /* program in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02CE1860ABB700FBDE67 /* program */; };
+		BEEE02D21860ABDB00FBDE67 /* share in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02CF1860ABB700FBDE67 /* share */; };
+		BEEE02D31860ABDB00FBDE67 /* ure in Resources */ = {isa = PBXBuildFile; fileRef = BEEE02D01860ABB700FBDE67 /* ure */; };
+		BEEEF9641860740400FBDE67 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BEEEF9631860740400FBDE67 /* libiconv.dylib */; };
+		BEEEF9661860741400FBDE67 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BEEEF9651860741400FBDE67 /* libz.dylib */; };
+		BEEEF96A1860A25400FBDE67 /* test1.odt in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF9691860A25400FBDE67 /* test1.odt */; };
+		BEEEFE011860A89100FBDE67 /* fundamentalrc in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF96D1860A82900FBDE67 /* fundamentalrc */; };
+		BEEEFE021860A89100FBDE67 /* offapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF96E1860A82900FBDE67 /* offapi.rdb */; };
+		BEEEFE031860A89100FBDE67 /* oovbaapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF96F1860A82900FBDE67 /* oovbaapi.rdb */; };
+		BEEEFE041860A89100FBDE67 /* rc in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF9AA1860A82900FBDE67 /* rc */; };
+		BEEEFE051860A89100FBDE67 /* services.rdb in Resources */ = {isa = PBXBuildFile; fileRef = BEEEF9AB1860A82900FBDE67 /* services.rdb */; };
+		BEEEFE061860A89100FBDE67 /* types.rdb in Resources */ = {isa = PBXBuildFile; fileRef = BEEEFDFD1860A82C00FBDE67 /* types.rdb */; };
+		BEEEFE071860A89100FBDE67 /* unorc in Resources */ = {isa = PBXBuildFile; fileRef = BEEEFDFE1860A82C00FBDE67 /* unorc */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		BE0898E81860D42B0021A679 /* brand.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = brand.cxx; path = ../../../vcl/source/app/brand.cxx; sourceTree = "<group>"; };
+		BE0898E91860D42B0021A679 /* dbggui.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dbggui.cxx; path = ../../../vcl/source/app/dbggui.cxx; sourceTree = "<group>"; };
+		BE0898EA1860D42B0021A679 /* dndhelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dndhelp.cxx; path = ../../../vcl/source/app/dndhelp.cxx; sourceTree = "<group>"; };
+		BE0898EB1860D42B0021A679 /* help.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = help.cxx; path = ../../../vcl/source/app/help.cxx; sourceTree = "<group>"; };
+		BE0898EC1860D42B0021A679 /* i18nhelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = i18nhelp.cxx; path = ../../../vcl/source/app/i18nhelp.cxx; sourceTree = "<group>"; };
+		BE0898ED1860D42B0021A679 /* idlemgr.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = idlemgr.cxx; path = ../../../vcl/source/app/idlemgr.cxx; sourceTree = "<group>"; };
+		BE0898EE1860D42B0021A679 /* salvtables.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salvtables.cxx; path = ../../../vcl/source/app/salvtables.cxx; sourceTree = "<group>"; };
+		BE0898EF1860D42B0021A679 /* session.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = session.cxx; path = ../../../vcl/source/app/session.cxx; sourceTree = "<group>"; };
+		BE0898F01860D42B0021A679 /* settings.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = settings.cxx; path = ../../../vcl/source/app/settings.cxx; sourceTree = "<group>"; };
+		BE0898F11860D42B0021A679 /* solarmutex.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = solarmutex.cxx; path = ../../../vcl/source/app/solarmutex.cxx; sourceTree = "<group>"; };
+		BE0898F21860D42B0021A679 /* sound.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = sound.cxx; path = ../../../vcl/source/app/sound.cxx; sourceTree = "<group>"; };
+		BE0898F31860D42B0021A679 /* stdtext.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = stdtext.cxx; path = ../../../vcl/source/app/stdtext.cxx; sourceTree = "<group>"; };
+		BE0898F41860D42B0021A679 /* svapp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svapp.cxx; path = ../../../vcl/source/app/svapp.cxx; sourceTree = "<group>"; };
+		BE0898F51860D42B0021A679 /* svdata.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svdata.cxx; path = ../../../vcl/source/app/svdata.cxx; sourceTree = "<group>"; };
+		BE0898F61860D42B0021A679 /* svmain.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svmain.cxx; path = ../../../vcl/source/app/svmain.cxx; sourceTree = "<group>"; };
+		BE0898F71860D42B0021A679 /* svmainhook.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svmainhook.cxx; path = ../../../vcl/source/app/svmainhook.cxx; sourceTree = "<group>"; };
+		BE0898F81860D42B0021A679 /* timer.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = timer.cxx; path = ../../../vcl/source/app/timer.cxx; sourceTree = "<group>"; };
+		BE0898F91860D42B0021A679 /* unohelp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = unohelp.cxx; path = ../../../vcl/source/app/unohelp.cxx; sourceTree = "<group>"; };
+		BE0898FA1860D42B0021A679 /* unohelp2.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = unohelp2.cxx; path = ../../../vcl/source/app/unohelp2.cxx; sourceTree = "<group>"; };
+		BE0898FB1860D42B0021A679 /* vclevent.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = vclevent.cxx; path = ../../../vcl/source/app/vclevent.cxx; sourceTree = "<group>"; };
+		BE0899141860F6450021A679 /* ctfonts.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctfonts.cxx; path = ../../../vcl/quartz/ctfonts.cxx; sourceTree = "<group>"; };
+		BE0899151860F6450021A679 /* ctlayout.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctlayout.cxx; path = ../../../vcl/quartz/ctlayout.cxx; sourceTree = "<group>"; };
+		BE0899161860F6450021A679 /* salbmp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salbmp.cxx; path = ../../../vcl/quartz/salbmp.cxx; sourceTree = "<group>"; };
+		BE0899171860F6450021A679 /* salgdi.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salgdi.cxx; path = ../../../vcl/quartz/salgdi.cxx; sourceTree = "<group>"; };
+		BE0899181860F6450021A679 /* salgdicommon.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salgdicommon.cxx; path = ../../../vcl/quartz/salgdicommon.cxx; sourceTree = "<group>"; };
+		BE0899191860F6450021A679 /* salgdiutils.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salgdiutils.cxx; path = ../../../vcl/quartz/salgdiutils.cxx; sourceTree = "<group>"; };
+		BE08991A1860F6450021A679 /* salmathutils.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salmathutils.cxx; path = ../../../vcl/quartz/salmathutils.cxx; sourceTree = "<group>"; };
+		BE08991B1860F6450021A679 /* salvd.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salvd.cxx; path = ../../../vcl/quartz/salvd.cxx; sourceTree = "<group>"; };
+		BE08991C1860F6450021A679 /* utils.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cxx; path = ../../../vcl/quartz/utils.cxx; sourceTree = "<group>"; };
+		BE82BD7218218E2E00A447B5 /* TiledLibreOffice.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TiledLibreOffice.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		BE82BD7518218E2E00A447B5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		BE82BD7718218E2E00A447B5 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		BE82BD7918218E2E00A447B5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		BE82BD7D18218E2E00A447B5 /* TiledLibreOffice-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TiledLibreOffice-Info.plist"; sourceTree = "<group>"; };
+		BE82BD7F18218E2E00A447B5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		BE82BD8118218E2E00A447B5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		BE82BD8318218E2E00A447B5 /* TiledLibreOffice-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TiledLibreOffice-Prefix.pch"; sourceTree = "<group>"; };
+		BE82BD8418218E2E00A447B5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		BE82BD8518218E2E00A447B5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		BE82BD8A18218E2E00A447B5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+		BE82BD8B18218E2E00A447B5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+		BE82BD8D18218E2E00A447B5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+		BE82BD9418218E2E00A447B5 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+		BE82BDAA182190E400A447B5 /* TiledView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TiledView.h; sourceTree = "<group>"; };
+		BE82BDAB182190E400A447B5 /* TiledView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TiledView.m; sourceTree = "<group>"; };
+		BE82BDAD1821A1D000A447B5 /* View.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = View.h; sourceTree = "<group>"; };
+		BE82BDAE1821A1D000A447B5 /* View.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = View.m; sourceTree = "<group>"; };
+		BECAB371186054DE00F814F9 /* lo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = lo.mm; sourceTree = "<group>"; };
+		BEDB0F08185B7537009A6F26 /* lo.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = lo.xcconfig; path = ../../../lo.xcconfig; sourceTree = "<group>"; };
+		BEEE02CE1860ABB700FBDE67 /* program */ = {isa = PBXFileReference; lastKnownFileType = folder; name = program; path = Resources/program; sourceTree = SOURCE_ROOT; };
+		BEEE02CF1860ABB700FBDE67 /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = Resources/share; sourceTree = SOURCE_ROOT; };
+		BEEE02D01860ABB700FBDE67 /* ure */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ure; path = Resources/ure; sourceTree = SOURCE_ROOT; };
+		BEEEF9631860740400FBDE67 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; };
+		BEEEF9651860741400FBDE67 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		BEEEF9691860A25400FBDE67 /* test1.odt */ = {isa = PBXFileReference; lastKnownFileType = file; name = test1.odt; path = ../../../../odk/examples/java/DocumentHandling/test/test1.odt; sourceTree = "<group>"; };
+		BEEEF96D1860A82900FBDE67 /* fundamentalrc */ = {isa = PBXFileReference; lastKnownFileType = text; name = fundamentalrc; path = Resources/fundamentalrc; sourceTree = SOURCE_ROOT; };
+		BEEEF96E1860A82900FBDE67 /* offapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = offapi.rdb; path = Resources/offapi.rdb; sourceTree = SOURCE_ROOT; };
+		BEEEF96F1860A82900FBDE67 /* oovbaapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = oovbaapi.rdb; path = Resources/oovbaapi.rdb; sourceTree = SOURCE_ROOT; };
+		BEEEF9AA1860A82900FBDE67 /* rc */ = {isa = PBXFileReference; lastKnownFileType = text; name = rc; path = Resources/rc; sourceTree = SOURCE_ROOT; };
+		BEEEF9AB1860A82900FBDE67 /* services.rdb */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = services.rdb; path = Resources/services.rdb; sourceTree = SOURCE_ROOT; };
+		BEEEFDFD1860A82C00FBDE67 /* types.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = types.rdb; path = Resources/types.rdb; sourceTree = SOURCE_ROOT; };
+		BEEEFDFE1860A82C00FBDE67 /* unorc */ = {isa = PBXFileReference; lastKnownFileType = text; name = unorc; path = Resources/unorc; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		BE82BD6F18218E2E00A447B5 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BEEEF9661860741400FBDE67 /* libz.dylib in Frameworks */,
+				BEEEF9641860740400FBDE67 /* libiconv.dylib in Frameworks */,
+				BE82BD7818218E2E00A447B5 /* CoreGraphics.framework in Frameworks */,
+				BE82BD7A18218E2E00A447B5 /* UIKit.framework in Frameworks */,
+				BE82BD7618218E2E00A447B5 /* Foundation.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		BE0898E61860D3CD0021A679 /* LibreOffice source files */ = {
+			isa = PBXGroup;
+			children = (
+				BE0898E71860D3DA0021A679 /* vcl */,
+			);
+			name = "LibreOffice source files";
+			sourceTree = "<group>";
+		};
+		BE0898E71860D3DA0021A679 /* vcl */ = {
+			isa = PBXGroup;
+			children = (
+				BE0899121860D78B0021A679 /* app */,
+				BE0899131860F6100021A679 /* quartz */,
+			);
+			name = vcl;
+			sourceTree = "<group>";
+		};
+		BE0899121860D78B0021A679 /* app */ = {
+			isa = PBXGroup;
+			children = (
+				BE0898E81860D42B0021A679 /* brand.cxx */,
+				BE0898E91860D42B0021A679 /* dbggui.cxx */,
+				BE0898EA1860D42B0021A679 /* dndhelp.cxx */,
+				BE0898EB1860D42B0021A679 /* help.cxx */,
+				BE0898EC1860D42B0021A679 /* i18nhelp.cxx */,
+				BE0898ED1860D42B0021A679 /* idlemgr.cxx */,
+				BE0898EE1860D42B0021A679 /* salvtables.cxx */,
+				BE0898EF1860D42B0021A679 /* session.cxx */,
+				BE0898F01860D42B0021A679 /* settings.cxx */,
+				BE0898F11860D42B0021A679 /* solarmutex.cxx */,
+				BE0898F21860D42B0021A679 /* sound.cxx */,
+				BE0898F31860D42B0021A679 /* stdtext.cxx */,
+				BE0898F41860D42B0021A679 /* svapp.cxx */,
+				BE0898F51860D42B0021A679 /* svdata.cxx */,
+				BE0898F61860D42B0021A679 /* svmain.cxx */,
+				BE0898F71860D42B0021A679 /* svmainhook.cxx */,
+				BE0898F81860D42B0021A679 /* timer.cxx */,
+				BE0898F91860D42B0021A679 /* unohelp.cxx */,
+				BE0898FA1860D42B0021A679 /* unohelp2.cxx */,
+				BE0898FB1860D42B0021A679 /* vclevent.cxx */,
+			);
+			name = app;
+			sourceTree = "<group>";
+		};
+		BE0899131860F6100021A679 /* quartz */ = {
+			isa = PBXGroup;
+			children = (
+				BE0899141860F6450021A679 /* ctfonts.cxx */,
+				BE0899151860F6450021A679 /* ctlayout.cxx */,
+				BE0899161860F6450021A679 /* salbmp.cxx */,
+				BE0899171860F6450021A679 /* salgdi.cxx */,
+				BE0899181860F6450021A679 /* salgdicommon.cxx */,
+				BE0899191860F6450021A679 /* salgdiutils.cxx */,
+				BE08991A1860F6450021A679 /* salmathutils.cxx */,
+				BE08991B1860F6450021A679 /* salvd.cxx */,
+				BE08991C1860F6450021A679 /* utils.cxx */,
+			);
+			name = quartz;
+			sourceTree = "<group>";
+		};
+		BE82BD6918218E2E00A447B5 = {
+			isa = PBXGroup;
+			children = (
+				BE0898E61860D3CD0021A679 /* LibreOffice source files */,
+				BE82BD7B18218E2E00A447B5 /* TiledLibreOffice */,
+				BEEEF9681860A21F00FBDE67 /* Resources */,
+				BE82BD7418218E2E00A447B5 /* Frameworks */,
+				BE82BD7318218E2E00A447B5 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		BE82BD7318218E2E00A447B5 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				BE82BD7218218E2E00A447B5 /* TiledLibreOffice.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BE82BD7418218E2E00A447B5 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				BEEEF9651860741400FBDE67 /* libz.dylib */,
+				BEEEF9631860740400FBDE67 /* libiconv.dylib */,
+				BE82BD7518218E2E00A447B5 /* Foundation.framework */,
+				BE82BD7718218E2E00A447B5 /* CoreGraphics.framework */,
+				BE82BD7918218E2E00A447B5 /* UIKit.framework */,
+				BE82BD9418218E2E00A447B5 /* XCTest.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		BE82BD7B18218E2E00A447B5 /* TiledLibreOffice */ = {
+			isa = PBXGroup;
+			children = (
+				BECAB371186054DE00F814F9 /* lo.mm */,
+				BE82BD8418218E2E00A447B5 /* AppDelegate.h */,
+				BE82BD8518218E2E00A447B5 /* AppDelegate.m */,
+				BE82BDAA182190E400A447B5 /* TiledView.h */,
+				BE82BDAB182190E400A447B5 /* TiledView.m */,
+				BE82BDAD1821A1D000A447B5 /* View.h */,
+				BE82BDAE1821A1D000A447B5 /* View.m */,
+				BE82BD8A18218E2E00A447B5 /* ViewController.h */,
+				BE82BD8B18218E2E00A447B5 /* ViewController.m */,
+				BE82BD8D18218E2E00A447B5 /* Images.xcassets */,
+				BE82BD7C18218E2E00A447B5 /* Supporting Files */,
+			);
+			path = TiledLibreOffice;
+			sourceTree = "<group>";
+		};
+		BE82BD7C18218E2E00A447B5 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				BEDB0F08185B7537009A6F26 /* lo.xcconfig */,
+				BE82BD7D18218E2E00A447B5 /* TiledLibreOffice-Info.plist */,
+				BE82BD7E18218E2E00A447B5 /* InfoPlist.strings */,
+				BE82BD8118218E2E00A447B5 /* main.m */,
+				BE82BD8318218E2E00A447B5 /* TiledLibreOffice-Prefix.pch */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		BEEEF9681860A21F00FBDE67 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				BEEEF96D1860A82900FBDE67 /* fundamentalrc */,
+				BEEEF96E1860A82900FBDE67 /* offapi.rdb */,
+				BEEEF96F1860A82900FBDE67 /* oovbaapi.rdb */,
+				BEEE02CE1860ABB700FBDE67 /* program */,
+				BEEEF9AA1860A82900FBDE67 /* rc */,
+				BEEEF9AB1860A82900FBDE67 /* services.rdb */,
+				BEEE02CF1860ABB700FBDE67 /* share */,
+				BEEEFDFD1860A82C00FBDE67 /* types.rdb */,
+				BEEEFDFE1860A82C00FBDE67 /* unorc */,
+				BEEE02D01860ABB700FBDE67 /* ure */,
+				BEEEF9691860A25400FBDE67 /* test1.odt */,
+			);
+			name = Resources;
+			path = TiledLibreOffice;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		BE82BD7118218E2E00A447B5 /* TiledLibreOffice */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = BE82BDA418218E2E00A447B5 /* Build configuration list for PBXNativeTarget "TiledLibreOffice" */;
+			buildPhases = (
+				BE82BD6E18218E2E00A447B5 /* Sources */,
+				BE82BD6F18218E2E00A447B5 /* Frameworks */,
+				BE82BD7018218E2E00A447B5 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TiledLibreOffice;
+			productName = TiledLibreOffice;
+			productReference = BE82BD7218218E2E00A447B5 /* TiledLibreOffice.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		BE82BD6A18218E2E00A447B5 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0500;
+			};
+			buildConfigurationList = BE82BD6D18218E2E00A447B5 /* Build configuration list for PBXProject "TiledLibreOffice" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = BE82BD6918218E2E00A447B5;
+			productRefGroup = BE82BD7318218E2E00A447B5 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				BE82BD7118218E2E00A447B5 /* TiledLibreOffice */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		BE82BD7018218E2E00A447B5 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BE82BD8E18218E2E00A447B5 /* Images.xcassets in Resources */,
+				BE82BD8018218E2E00A447B5 /* InfoPlist.strings in Resources */,
+				BEEEFE011860A89100FBDE67 /* fundamentalrc in Resources */,
+				BEEEFE021860A89100FBDE67 /* offapi.rdb in Resources */,
+				BEEEFE031860A89100FBDE67 /* oovbaapi.rdb in Resources */,
+				BEEE02D11860ABDB00FBDE67 /* program in Resources */,
+				BEEEFE041860A89100FBDE67 /* rc in Resources */,
+				BEEEFE051860A89100FBDE67 /* services.rdb in Resources */,
+				BEEE02D21860ABDB00FBDE67 /* share in Resources */,
+				BEEEFE061860A89100FBDE67 /* types.rdb in Resources */,
+				BEEEFE071860A89100FBDE67 /* unorc in Resources */,
+				BEEE02D31860ABDB00FBDE67 /* ure in Resources */,
+				BEEEF96A1860A25400FBDE67 /* test1.odt in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		BE82BD6E18218E2E00A447B5 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BECAB372186054DE00F814F9 /* lo.mm in Sources */,
+				BE82BDAF1821A1D000A447B5 /* View.m in Sources */,
+				BE82BDAC182190E400A447B5 /* TiledView.m in Sources */,
+				BE82BD8C18218E2E00A447B5 /* ViewController.m in Sources */,
+				BE82BD8618218E2E00A447B5 /* AppDelegate.m in Sources */,
+				BE82BD8218218E2E00A447B5 /* main.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		BE82BD7E18218E2E00A447B5 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				BE82BD7F18218E2E00A447B5 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		BE82BDA218218E2E00A447B5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = BEDB0F08185B7537009A6F26 /* lo.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(LO_BUILDDIR)/config_host",
+					"$(LO_SRCDIR)/include",
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/udkapi/comprehensive",
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/offapi/comprehensive",
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "$(LINK_LDFLAGS)";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = 2;
+			};
+			name = Debug;
+		};
+		BE82BDA318218E2E00A447B5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = BEDB0F08185B7537009A6F26 /* lo.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"$(LO_BUILDDIR)/config_host",
+					$LO_SRCDIR/include,
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/udkapi/comprehensive",
+					"$(LO_WORKDIR)/UnoApiHeadersTarget/offapi/comprehensive",
+				);
+				IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "$(LINK_LDFLAGS)";
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = 2;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		BE82BDA518218E2E00A447B5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "TiledLibreOffice/TiledLibreOffice-Prefix.pch";
+				INFOPLIST_FILE = "TiledLibreOffice/TiledLibreOffice-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		BE82BDA618218E2E00A447B5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "TiledLibreOffice/TiledLibreOffice-Prefix.pch";
+				INFOPLIST_FILE = "TiledLibreOffice/TiledLibreOffice-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		BE82BD6D18218E2E00A447B5 /* Build configuration list for PBXProject "TiledLibreOffice" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BE82BDA218218E2E00A447B5 /* Debug */,
+				BE82BDA318218E2E00A447B5 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		BE82BDA418218E2E00A447B5 /* Build configuration list for PBXNativeTarget "TiledLibreOffice" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BE82BDA518218E2E00A447B5 /* Debug */,
+				BE82BDA618218E2E00A447B5 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = BE82BD6A18218E2E00A447B5 /* Project object */;
+}
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.h b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.h
new file mode 100644
index 0000000..e128714
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.h
@@ -0,0 +1,19 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <UIKit/UIKit.h>
+
+ at interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+ at property (strong, nonatomic) UIWindow *window;
+
+- (void)threadMainMethod: (id) argument;
+
+ at end
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m
new file mode 100644
index 0000000..9b9e525
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/AppDelegate.m
@@ -0,0 +1,118 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#include <touch/touch.h>
+
+#import "AppDelegate.h"
+#import "View.h"
+#import "ViewController.h"
+#import "lo.h"
+
+ at implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+    self.window.backgroundColor = [UIColor whiteColor];
+    [self.window makeKeyAndVisible];
+
+    ViewController *vc = [[ViewController alloc] init];
+    self.window.rootViewController = vc;
+
+    [[[NSThread alloc] initWithTarget:self selector:@selector(threadMainMethod:) object:nil] start];
+
+    vc.view = [[View alloc] initWithFrame:[self.window frame]];
+
+    return YES;
+}
+
+- (void)threadMainMethod:(id)argument
+{
+    (void) argument;
+
+    @autoreleasepool {
+        lo_initialize();
+        touch_lo_runMain();
+    }
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+    // Sent when the application is about to move from active to
+    // inactive state. This can occur for certain types of temporary
+    // interruptions (such as an incoming phone call or SMS message)
+    // or when the user quits the application and it begins the
+    // transition to the background state. Use this method to pause
+    // ongoing tasks, disable timers, and throttle down OpenGL ES
+    // frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+    // Use this method to release shared resources, save user data,
+    // invalidate timers, and store enough application state
+    // information to restore your application to its current state in
+    // case it is terminated later. If your application supports
+    // background execution, this method is called instead of
+    // applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+    // Called as part of the transition from the background to the
+    // inactive state; here you can undo many of the changes made on
+    // entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+    // Restart any tasks that were paused (or not yet started) while
+    // the application was inactive. If the application was previously
+    // in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+    // Called when the application is about to terminate. Save data if
+    // appropriate. See also applicationDidEnterBackground:.
+}
+
+ at end
+
+// dummies
+
+void touch_ui_selection_start(MLOSelectionKind kind,
+                              const void *documentHandle,
+                              MLORect *rectangles,
+                              int rectangleCount,
+                              void *preview)
+{
+}
+
+void touch_ui_selection_none()
+{
+}
+
+MLODialogResult touch_ui_dialog_modal(MLODialogKind kind, const char *message)
+{
+    return MLODialogCancel;
+}
+
+void touch_ui_show_keyboard()
+{
+}
+
+void touch_ui_hide_keyboard()
+{
+}
+
+void touch_ui_damaged(int minX, int minY, int width, int height)
+{
+}
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..a4645e6
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,38 @@
+{
+  "images" : [
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/LaunchImage.launchimage/Contents.json b/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/LaunchImage.launchimage/Contents.json
new file mode 100644
index 0000000..a0ad363
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,36 @@
+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Info.plist b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Info.plist
new file mode 100644
index 0000000..c20aa82
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Info.plist
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.libreoffice.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Prefix.pch b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Prefix.pch
new file mode 100644
index 0000000..638bf30
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledLibreOffice-Prefix.pch
@@ -0,0 +1,22 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+    #include <premac.h>
+    #import <UIKit/UIKit.h>
+    #import <Foundation/Foundation.h>
+    #include <postmac.h>
+#endif
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.h b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.h
new file mode 100644
index 0000000..fb42358
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.h
@@ -0,0 +1,17 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <UIKit/UIKit.h>
+
+ at interface TiledView : UIView
+
+- (id)initWithFrame:(CGRect)frame andScale:(CGFloat)scale;
+
+ at end
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
new file mode 100644
index 0000000..0fe9c94
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
@@ -0,0 +1,62 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#include <touch/touch.h>
+
+#import "View.h"
+#import "TiledView.h"
+
+ at interface TiledView ()
+
+ at property CGFloat scale;
+
+ at end
+
+ at implementation TiledView
+
+- (id)initWithFrame:(CGRect)frame andScale:(CGFloat)scale
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.scale = scale;
+        CATiledLayer *catl = (CATiledLayer*) [self layer];
+        catl.tileSize = CGSizeMake(512, 512);
+        catl.levelsOfDetail = 4;
+        catl.levelsOfDetailBias = 4;
+    }
+    return self;
+}
+
++ (Class)layerClass
+{
+    return [CATiledLayer class];
+}
+
+- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
+{
+    CGContextSaveGState(ctx);
+
+    CGRect bb = CGContextGetClipBoundingBox(ctx);
+
+    // NSLog(@"%.0fx%.0f@(%.0f,%.0f) %f", bb.size.width, bb.size.height, bb.origin.x, bb.origin.y, 1/[(View *) [self superview] zoomScale]);
+
+    CGContextTranslateCTM(ctx, bb.origin.x, bb.origin.y);
+
+    NSLog(@"tile:%.0fx%.0f at:(%.0f,%.0f) size:%.0fx%.0f", bb.size.width, bb.size.height, bb.origin.x/self.scale, bb.origin.y/self.scale, bb.size.width/self.scale, bb.size.height/self.scale);
+
+    touch_lo_draw_tile(ctx,
+                       bb.size.width, bb.size.height,
+                       CGPointMake(bb.origin.x/self.scale, bb.origin.y/self.scale),
+                       CGSizeMake(bb.size.width/self.scale, bb.size.height/self.scale));
+
+    CGContextRestoreGState(ctx);
+}
+
+ at end
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.h b/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.h
new file mode 100644
index 0000000..3043632
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.h
@@ -0,0 +1,15 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#import <UIKit/UIKit.h>
+
+ at interface View : UIScrollView <UIScrollViewDelegate>
+
+ at end
+
+// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.m
new file mode 100644
index 0000000..be27c09
--- /dev/null
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/View.m
@@ -0,0 +1,57 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// This file is part of the LibreOffice project.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list