[Libreoffice-commits] core.git: 3 commits - include/touch ios/experimental sw/Executable_tiledrendering.mk sw/Module_sw.mk sw/qa sw/source sw/UIConfig_qa.mk

Tor Lillqvist tml at collabora.com
Tue Mar 24 02:14:38 PDT 2015


 include/touch/touch.h                                          |    6 
 ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m |   10 
 sw/Executable_tiledrendering.mk                                |   60 -
 sw/Module_sw.mk                                                |    3 
 sw/UIConfig_qa.mk                                              |   16 
 sw/qa/tiledrendering/tiledrendering.cxx                        |  202 ------
 sw/qa/tiledrendering/tiledrendering.ui                         |  304 ----------
 sw/source/core/view/viewsh.cxx                                 |   54 -
 8 files changed, 655 deletions(-)

New commits:
commit aa94466699a98730d9e8d112fd52cea63c2226b2
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Mar 24 11:01:14 2015 +0200

    Executable_tiledrendering is obsolete and can be killed
    
    Change-Id: I4159adb321a939126a0577a48e5917be5825557e

diff --git a/sw/Executable_tiledrendering.mk b/sw/Executable_tiledrendering.mk
deleted file mode 100644
index 0446a97..0000000
--- a/sw/Executable_tiledrendering.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,tiledrendering))
-
-$(eval $(call gb_Executable_use_external,tiledrendering,boost_headers))
-
-$(eval $(call gb_Executable_use_api,tiledrendering,\
-    offapi \
-    udkapi \
-))
-
-$(eval $(call gb_Executable_set_include,tiledrendering,\
-    -I$(SRCDIR)/sw/inc \
-    -I$(SRCDIR)/sw/source/uibase/inc \
-    $$(INCLUDE) \
-))
-
-$(eval $(call gb_Executable_use_static_libraries,tiledrendering,\
-    vclmain \
-))
-
-$(eval $(call gb_Executable_use_libraries,tiledrendering,\
-	comphelper \
-	cppu \
-	cppuhelper \
-	sal \
-    tl \
-    ucbhelper \
-    vcl \
-    sfx \
-	sw \
-))
-
-$(eval $(call gb_Executable_add_exception_objects,tiledrendering,\
-    sw/qa/tiledrendering/tiledrendering \
-))
-
-ifeq ($(OS),LINUX)
-
-$(eval $(call gb_Executable_add_libs,tiledrendering,\
-	-lm \
-	-ldl \
-	-lpthread \
-    -lGL \
-    -lX11 \
-))
-
-$(eval $(call gb_Executable_use_static_libraries,tiledrendering,\
-	glxtest \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 78a45e1..612adf3 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -20,8 +20,6 @@
 $(eval $(call gb_Module_Module,sw))
 
 $(eval $(call gb_Module_add_targets,sw,\
-        $(if $(ENABLE_HEADLESS),, \
-	        $(call gb_Helper_optional,DESKTOP,Executable_tiledrendering)) \
         CustomTarget_generated \
 	Library_msword \
 	Library_sw \
@@ -37,7 +35,6 @@ $(eval $(call gb_Module_add_l10n_targets,sw,\
 	UIConfig_swreport \
 	UIConfig_swriter \
 	UIConfig_swxform \
-	UIConfig_qa \
 ))
 
 ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
diff --git a/sw/UIConfig_qa.mk b/sw/UIConfig_qa.mk
deleted file mode 100644
index 13e19e3..0000000
--- a/sw/UIConfig_qa.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_UIConfig_UIConfig,qa/sw))
-
-$(eval $(call gb_UIConfig_add_uifiles,qa/sw,\
-	sw/qa/tiledrendering/tiledrendering \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
deleted file mode 100644
index afe8f3d..0000000
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/bootstrap.hxx>
-#include <osl/file.hxx>
-#include <vcl/builder.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/help.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/vclmain.hxx>
-#include <vcl/field.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/virdev.hxx>
-#include <sfx2/filedlghelper.hxx>
-#include <swmodule.hxx>
-#include <wrtsh.hxx>
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/ucb/UniversalContentBroker.hpp>
-#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ui::dialogs;
-using namespace ::sfx2;
-
-class TiledRenderingApp : public Application
-{
-private:
-    uno::Reference<uno::XComponentContext> xContext;
-    uno::Reference<lang::XMultiComponentFactory> xFactory;
-    uno::Reference<lang::XMultiServiceFactory> xSFactory;
-    uno::Reference<uno::XInterface> xDesktop;
-    uno::Reference<frame::XComponentLoader> xLoader;
-    uno::Reference<lang::XComponent> xComponent;
-public:
-    virtual void Init() SAL_OVERRIDE;
-    virtual int Main() SAL_OVERRIDE;
-    void Open(OUString & aFileUrl);
-};
-
-class TiledRenderingDialog: public ModalDialog
-{
-private:
-    TiledRenderingApp *mpApp;
-    NumericField *mpContextWidth;
-    NumericField *mpContextHeight;
-    NumericField *mpTilePosX;
-    NumericField *mpTilePosY;
-    NumericField *mpTileWidth;
-    NumericField *mpTileHeight;
-    FixedImage *mpImage;
-
-public:
-    TiledRenderingDialog(TiledRenderingApp * app) :
-        ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui"),
-        mpApp(app)
-    {
-        PushButton * renderButton;
-        get(renderButton, "buttonRenderTile");
-        renderButton->SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl));
-
-        PushButton * chooseDocumentButton;
-        get(chooseDocumentButton, "buttonChooseDocument");
-        chooseDocumentButton->SetClickHdl( LINK( this, TiledRenderingDialog, ChooseDocumentHdl));
-
-        SetStyle(GetStyle()|WB_CLOSEABLE);
-
-        get(mpContextWidth, "spinContextWidth");
-        get(mpContextHeight, "spinContextHeight");
-        get(mpTilePosX, "spinTilePosX");
-        get(mpTilePosY, "spinTilePosY");
-        get(mpTileWidth, "spinTileWidth");
-        get(mpTileHeight, "spinTileHeight");
-        get(mpImage, "imageTile");
-    }
-
-    virtual ~TiledRenderingDialog()
-    {
-    }
-
-    DECL_LINK ( RenderHdl, Button * );
-    DECL_LINK ( ChooseDocumentHdl, Button * );
-};
-
-IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
-{
-    int contextWidth = mpContextWidth->GetValue();
-    int contextHeight = mpContextHeight->GetValue();
-    int tilePosX = mpTilePosX->GetValue();
-    int tilePosY = mpTilePosY->GetValue();
-    long tileWidth = mpTileWidth->GetValue();
-    long tileHeight = mpTileHeight->GetValue();
-
-    // do the same thing we are doing in touch_lo_draw_tile()
-    SwWrtShell *pViewShell = GetActiveWrtShell();
-
-    if (pViewShell)
-    {
-        // TODO create a VirtualDevice based on SystemGraphicsData instead so
-        // that we get direct rendering; something like:
-        //
-        // SystemGraphicsData aData;
-        // [setup the aData]
-        // VirtualDevice aDevice(&aData, [color depth]);
-        VirtualDevice aDevice;
-
-        // paint to it
-        pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
-
-        // copy the aDevice content to mpImage
-        Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
-        mpImage->SetImage(Image(aBitmap));
-
-        // update the dialog size
-        setOptimalLayoutSize();
-    }
-
-    return 1;
-}
-
-IMPL_LINK ( TiledRenderingDialog,  ChooseDocumentHdl, Button *, EMPTYARG )
-{
-    FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
-    uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-    if( aDlgHelper.Execute() == ERRCODE_NONE )
-    {
-        OUString aFileUrl =xFP->getFiles().getConstArray()[0];
-        mpApp->Open(aFileUrl);
-    }
-    return 1;
-}
-
-void TiledRenderingApp::Open(OUString & aFileUrl)
-{
-    static const char TARGET[] = "_default";
-    static const Sequence<beans::PropertyValue> PROPS (0);
-    if(xComponent.get())
-    {
-        xComponent->dispose();
-        xComponent.clear();
-    }
-    xComponent.set(xLoader->loadComponentFromURL(aFileUrl, TARGET, 0, PROPS));
-}
-
-void TiledRenderingApp::Init()
-{
-    xContext.set(cppu::defaultBootstrap_InitialComponentContext());
-    xFactory.set(xContext->getServiceManager());
-    xSFactory.set(uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW));
-    comphelper::setProcessServiceFactory(xSFactory);
-
-    // Create UCB (for backwards compatibility, in case some code still uses
-    // plain createInstance w/o args directly to obtain an instance):
-    ::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext() );
-
-    xDesktop.set(xFactory->createInstanceWithContext(OUString("com.sun.star.frame.Desktop"), xContext));
-    xLoader.set(frame::Desktop::create(xContext));
-}
-
-int TiledRenderingApp::Main()
-{
-    if(GetCommandLineParamCount()>0)
-    {
-        OUString aFileUrl;
-        osl::File::getFileURLFromSystemPath(GetCommandLineParam(0), aFileUrl);
-        Open(aFileUrl);
-    }
-    Help::EnableQuickHelp();
-    try
-    {
-        TiledRenderingDialog pDialog(this);
-        pDialog.Execute();
-    }
-    catch (const uno::Exception &e)
-    {
-        fprintf(stderr, "fatal error: %s\n", OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
-    }
-    return EXIT_SUCCESS;
-}
-
-void vclmain::createApplication()
-{
-    static TiledRenderingApp aApp;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/tiledrendering/tiledrendering.ui b/sw/qa/tiledrendering/tiledrendering.ui
deleted file mode 100644
index 9b51ea8..0000000
--- a/sw/qa/tiledrendering/tiledrendering.ui
+++ /dev/null
@@ -1,304 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">1</property>
-    <property name="upper">1000</property>
-    <property name="value">256</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="upper">10000</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="lower">1</property>
-    <property name="upper">100000</property>
-    <property name="value">5000</property>
-    <property name="step_increment">100</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkWindow" id="TiledRendering">
-    <property name="can_focus">False</property>
-    <property name="border_width">12</property>
-    <child>
-      <object class="GtkBox" id="box1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkBox" id="box7">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="spacing">12</property>
-            <child>
-              <object class="GtkGrid" id="grid2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="row_spacing">12</property>
-                <property name="column_spacing">13</property>
-                <child>
-                  <object class="GtkLabel" id="labelContextWidth">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">contextWidth</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="labelContextHeight">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">contextHeight</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="labelTilePosX">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">tilePosX</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="labelTilePoxY">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">tilePosY</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="labelTileWidth">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">tileWidth</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">4</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="labelTileHeight">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <property name="label" translatable="no">tileHeight</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">5</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinContextWidth">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="input_purpose">number</property>
-                    <property name="adjustment">adjustment1</property>
-                    <property name="numeric">True</property>
-                    <property name="update_policy">if-valid</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinContextHeight">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="adjustment">adjustment1</property>
-                    <property name="numeric">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">1</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinTilePosX">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="adjustment">adjustment2</property>
-                    <property name="numeric">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">2</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinTilePosY">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="adjustment">adjustment2</property>
-                    <property name="numeric">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinTileWidth">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="adjustment">adjustment3</property>
-                    <property name="numeric">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">4</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinTileHeight">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="width_chars">1</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="progress_pulse_step">1</property>
-                    <property name="adjustment">adjustment3</property>
-                    <property name="numeric">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">5</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButtonBox" id="buttonbox1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="spacing">12</property>
-                <property name="layout_style">start</property>
-                <child>
-                  <object class="GtkButton" id="buttonChooseDocument">
-                    <property name="label" translatable="no">choose document</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="xalign">0.50999999046325684</property>
-                    <property name="yalign">0.47999998927116394</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="buttonRenderTile">
-                    <property name="label" translatable="no">render tile</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="pack_type">end</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkImage" id="imageTile">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="stock">gtk-missing-image</property>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-</interface>
commit a86416b51dee33abb19df4b0f82352324cdf20c0
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Mar 24 10:59:33 2015 +0200

    Bin obsolete comment
    
    Change-Id: Iffd6fcfa81e9ce02a01c74eadb6c881a12e7f7d4

diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
index 75a14e7..9809f08 100644
--- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
@@ -164,16 +164,6 @@ extern const char *ptyl_test_encryption_pathname;
 
     NSLog(@"bb:%.0fx%.0f@(%.0f,%.0f) zoomScale:%.0f tile:%.0fx%.0f at:(%.0f,%.0f) size:%.0fx%.0f", bb.size.width, bb.size.height, bb.origin.x, bb.origin.y, [((View *) [self superview]) zoomScale], tileSize.width, tileSize.height, bb.origin.x/self.scale, bb.origin.y/self.scale, bb.size.width/self.scale, bb.size.height/self.scale);
 
-    // I don't really claim to fully understand all this. It did at
-    // first seem a bit weird to be passing in a "context width x
-    // height" (in the terminology of touch_lo_draw_tile) of 64x64,
-    // for instance, even if that tile is actually going to be
-    // rendered to 128x128 on-screen pixels. But what I tend to forget
-    // is that this 64x64 is in the coordinate space of the initial
-    // view of the document; the CGContext keeps track of scaling it
-    // as needed at the current zoom levels. I keep thinking about
-    // "pixels" incorrectly.
-
     if (!getenv("DRAW_ONLY_TILE") || tileMatches(getenv("DRAW_ONLY_TILE"), bb)) {
         fprintf(stderr, "+++ rendering to context %p\n", ctx);
         loDocument->pClass->paintTile(loDocument, (unsigned char *)ctx,
commit 3a2e4cd2016ccf5cd1faea239b8059e0ba36ea9e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Mar 24 10:57:33 2015 +0200

    touch_lo_draw_tile() is dead code
    
    Tiled rendering is now only supported through the LibreOfficeKit API.
    
    Change-Id: Ib7e6b166251265e91783c89fbe9ea987b105f3a2

diff --git a/include/touch/touch.h b/include/touch/touch.h
index e141bf7..7771699 100644
--- a/include/touch/touch.h
+++ b/include/touch/touch.h
@@ -230,12 +230,6 @@ void touch_lo_pan(int deltaX, int deltaY);
 void touch_lo_zoom(int x, int y, float scale);
 void touch_lo_keyboard_input(int c);
 
-/** Draw part of the document.
-
-tilePosX, tilePosY, tileWidth, tileHeight address the part of the document to be drawn.
-context, contextHeight, contextWidth specify where to draw.
-*/
-void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tilePosition, MLODpxSize tileSize);
 void touch_lo_copy_buffer(const void * source, size_t sourceWidth, size_t sourceHeight, size_t sourceBytesPerRow, void * target, size_t targetWidth, size_t targetHeight);
 MLODpxSize touch_lo_get_content_size();
 void touch_lo_mouse_drag(int x, int y, MLOMouseButtonState state);
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 1aa3879..b5920a1 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1835,60 +1835,6 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
 
 #if !HAVE_FEATURE_DESKTOP
 extern "C"
-void touch_lo_draw_tile(void *context, int contextWidth, int contextHeight, MLODpxPoint tileDpxPosition, MLODpxSize tileDpxSize)
-{
-#ifdef IOS
-    SAL_INFO("sw.tiled", "touch_lo_draw_tile(" << contextWidth << "x" << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ")");
-    MLORipPoint tileRipPosition = MLORipPointByDpxPoint(tileDpxPosition);
-    MLORipSize rileRipSize = MLORipSizeByDpxSize(tileDpxSize);
-    MLORip tileRipPosX = tileRipPosition.x;
-    MLORip tileRipPosY = tileRipPosition.y;
-    MLORip tileRipWidth = rileRipSize.width;
-    MLORip tileRipHeight = rileRipSize.height;
-    // tilePosX/Y and tileWidth/Height tell the part of the document,
-    // in twip units, to render
-    int tilePosX = tileRipPosX;
-    int tilePosY = tileRipPosY;
-    long tileWidth  = tileRipWidth;
-    long tileHeight = tileRipHeight;
-    // Currently we expect that only one document is open, so we are using the
-    // current shell.  Should it turn out that we need to have more documents
-    // open, we need to add a documentHandle that would hold the right
-    // document shell in the iOS / Android impl, and we would get it as a
-    // parameter.
-
-    SwWrtShell *pViewShell;
-
-    // FIXME: make sure this is not called before we have a document...
-    while (!(pViewShell = GetActiveWrtShell()))
-    {
-        sleep(1);
-    }
-
-    if (pViewShell)
-    {
-        // Creation, use and destruction of a VirtualDevice needs to be
-        // protected by the SolarMutex, it seems:
-        SolarMutexGuard g;
-
-        SystemGraphicsData aData;
-        aData.rCGContext = (CGContextRef) context;
-        // the Size argument is irrelevant, I hope
-        VirtualDevice aDevice(&aData, Size(1, 1), (sal_uInt16)0);
-        // paint to it
-        pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
-    }
-
-    SAL_INFO("sw.tiled", "touch_lo_draw_tile(" << contextWidth << "x" << contextHeight << ", (" << tileDpxPosition.x << "," << tileDpxPosition.y << "), " << tileDpxSize.width << "x" << tileDpxSize.height << ") return");
-#else
-    (void) context;
-    (void) contextWidth;
-    (void) contextHeight;
-    (void) tileDpxPosition;
-    (void) tileDpxSize;
-#endif
-}
-extern "C"
 MLODpxSize touch_lo_get_content_size()
 {
 #ifdef IOS


More information about the Libreoffice-commits mailing list