[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 11 commits - android/Bootstrap android/experimental sc/source

Michael Meeks michael.meeks at collabora.com
Tue Sep 30 12:46:49 PDT 2014


 android/Bootstrap/Makefile.shared                                                     |    6 
 android/experimental/LOAndroid3/res/layout/activity_main.xml                          |   12 +
 android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java                 |   30 ----
 android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java          |   37 ++++++
 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java              |    3 
 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java             |    9 -
 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java       |   61 +++++-----
 android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java |    8 -
 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java  |    5 
 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ViewTransform.java     |   19 ---
 sc/source/ui/view/gridwin3.cxx                                                        |   10 -
 sc/source/ui/view/viewdata.cxx                                                        |    2 
 12 files changed, 114 insertions(+), 88 deletions(-)

New commits:
commit cf38e0daf4a21305e970fb07b6bbe12f0d198fe4
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Sep 30 20:38:55 2014 +0100

    android: package C* fonts as well for interop.
    
    Change-Id: I49c6c4bf0b2ddfb403612ccad90a41e8ae525427

diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index 7bc9615..5dd9f4a 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -196,7 +196,11 @@ copy-stuff:
 # vcl/generic/fontmanager/helper.cxx: psp::getFontPath(). UserInstallation is
 # set to the app's data dir above.
 	mkdir -p assets/gz.unpack/user/fonts
-	for F in $(INSTDIR)/share/fonts/truetype/Liberation*.ttf $(INSTDIR)/share/fonts/truetype/Gen*.ttf $(INSTDIR)/share/fonts/truetype/opens___.ttf; do \
+	for F in $(INSTDIR)/share/fonts/truetype/Liberation*.ttf \
+	         $(INSTDIR)/share/fonts/truetype/Caladea-*.ttf \
+	         $(INSTDIR)/share/fonts/truetype/Carlito-*.ttf \
+	         $(INSTDIR)/share/fonts/truetype/Gen*.ttf \
+		 $(INSTDIR)/share/fonts/truetype/opens___.ttf; do \
 		gzip -9 <$$F >assets/gz.unpack/user/fonts/`basename $$F`; \
 	done
 #
commit 1b70f8fbcc835f5cb7c57d991fc22797ece78f98
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 21:16:29 2014 +0200

    android: don't return to open document if viewing license / notice
    
    Change-Id: I12994aa60fa2476ef94153b5ba13000ece71d28b

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 2f69cf3..64d70d0 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -176,7 +176,7 @@ public class LibreOfficeMainActivity extends Activity {
             @Override
             public void onClick(View view) {
                 Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class);
-                //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                 intent.setData(Uri.parse("file:///assets/license.txt"));
                 startActivity(intent);
             }
@@ -187,7 +187,7 @@ public class LibreOfficeMainActivity extends Activity {
             @Override
             public void onClick(View view) {
                 Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class);
-                //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                 intent.setData(Uri.parse("file:///assets/notice.txt"));
                 startActivity(intent);
             }
commit 20bd21718039e29e4acd4dac1b4a36a01cc5c651
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 21:09:40 2014 +0200

    android: clear all tiles in "refresh"
    
    Change-Id: I6a7e9070160e8d4bbd6ad5cd1bfa2dc18e66a45d

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index 3bfa03a..ef75ae5 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -46,6 +46,8 @@ public class LOKitThread extends Thread {
             mApplication.getLayerController().getView().changeCheckerboardBitmap(bitmap, mTileProvider.getPageWidth(), mTileProvider.getPageHeight());
         }
 
+        mLayerClient.clearAllTiles();
+
         RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight());
         mController.setPageRect(rect, rect);
         mController.setForceRedraw();
@@ -53,7 +55,6 @@ public class LOKitThread extends Thread {
 
     private void changePart(int partIndex) {
         mTileProvider.changePart(partIndex);
-        mLayerClient.clearAllTiles();
         refresh();
     }
 
commit 099521f48351cbf51c52e07048b6b324988cff77
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 21:07:30 2014 +0200

    android: no need for "throws InterruptedException"
    
    Change-Id: I93be9af0849a2515c27bc22892a201ec207d6775

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index c6ee612..3bfa03a 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -25,7 +25,7 @@ public class LOKitThread extends Thread {
         TileProviderFactory.initialize();
     }
 
-    private boolean draw() throws InterruptedException {
+    private boolean draw() {
         RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight());
         DisplayMetrics displayMetrics = LibreOfficeMainActivity.mAppContext.getResources().getDisplayMetrics();
         mViewportMetrics = new ImmutableViewportMetrics(displayMetrics);
@@ -51,7 +51,7 @@ public class LOKitThread extends Thread {
         mController.setForceRedraw();
     }
 
-    private void changePart(int partIndex) throws InterruptedException {
+    private void changePart(int partIndex) {
         mTileProvider.changePart(partIndex);
         mLayerClient.clearAllTiles();
         refresh();
@@ -88,7 +88,7 @@ public class LOKitThread extends Thread {
         }
     }
 
-    private void processEvent(LOEvent event) throws InterruptedException {
+    private void processEvent(LOEvent event) {
         switch (event.mType) {
             case LOEvent.LOAD:
                 load(event.getFilename());
commit 0be0147bd5512a83da4d25e492469fc67d5d0030
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 20:58:43 2014 +0200

    android: redraw LOEvent
    
    Change-Id: I6171f7a36c07f53eeec0cc83caa168ec97459d53

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
index 4b22d1f..3f39257 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
@@ -13,6 +13,7 @@ public class LOEvent {
     public static final int DRAW = 4;
     public static final int CHANGE_PART = 5;
     public static final int LOAD = 6;
+    public static final int REDRAW = 7;
 
     public int mType;
     private ImmutableViewportMetrics mViewportMetrics;
@@ -20,6 +21,10 @@ public class LOEvent {
     private int mPartIndex;
     private String mFilename;
 
+    public LOEvent(int type) {
+        mType = type;
+    }
+
     public LOEvent(int type, int widthPixels, int heightPixels) {
         mType = type;
         mTypeString = "Size Changed: " + widthPixels + " " + heightPixels;
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
index d0b024a..90a3582 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
@@ -30,4 +30,8 @@ public class LOEventFactory {
     public static LOEvent load(String inputFile) {
         return new LOEvent(LOEvent.LOAD, inputFile);
     }
+
+    public static LOEvent redraw() {
+        return new LOEvent(LOEvent.REDRAW);
+    }
 }
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index b6f0b99..859a3d8 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -29,4 +29,7 @@ public class LOKitShell {
         return LibreOfficeMainActivity.mAppContext.mMainHandler;
     }
 
+    public static void queueRedraw() {
+        LOKitShell.sendEvent(LOEventFactory.redraw());
+    }
 }
commit 651a6780554215107bfb29abf50481db48a2e973
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 20:56:02 2014 +0200

    android: create events with LOEventFactory (moved out of LOEvent)
    
    Change-Id: Ia2e6bd040160e9d09377fe1f27d94d22c46fb778

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
index 80210a7..4b22d1f 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
@@ -52,30 +52,6 @@ public class LOEvent {
         mTypeString = "Change part";
     }
 
-    public static LOEvent draw(Rect rect) {
-        return new LOEvent(DRAW, rect);
-    }
-
-    public static LOEvent sizeChanged(int widthPixels, int heightPixels) {
-        return new LOEvent(SIZE_CHANGED, widthPixels, heightPixels);
-    }
-
-    public static LOEvent tileSize(IntSize tileSize) {
-        return new LOEvent(TILE_SIZE, tileSize);
-    }
-
-    public static LOEvent viewport(ImmutableViewportMetrics viewportMetrics) {
-        return new LOEvent(VIEWPORT, viewportMetrics);
-    }
-
-    public static LOEvent changePart(int part) {
-        return new LOEvent(CHANGE_PART, part);
-    }
-
-    public static LOEvent load(String inputFile) {
-        return new LOEvent(LOAD, inputFile);
-    }
-
     public String getTypeString() {
         return mTypeString;
     }
@@ -91,5 +67,4 @@ public class LOEvent {
     public String getFilename() {
         return mFilename;
     }
-
 }
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
new file mode 100644
index 0000000..d0b024a
--- /dev/null
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
@@ -0,0 +1,33 @@
+package org.libreoffice;
+
+import android.graphics.Rect;
+
+import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
+import org.mozilla.gecko.gfx.IntSize;
+
+
+public class LOEventFactory {
+    public static LOEvent draw(Rect rect) {
+        return new LOEvent(LOEvent.DRAW, rect);
+    }
+
+    public static LOEvent sizeChanged(int widthPixels, int heightPixels) {
+        return new LOEvent(LOEvent.SIZE_CHANGED, widthPixels, heightPixels);
+    }
+
+    public static LOEvent tileSize(IntSize tileSize) {
+        return new LOEvent(LOEvent.TILE_SIZE, tileSize);
+    }
+
+    public static LOEvent viewport(ImmutableViewportMetrics viewportMetrics) {
+        return new LOEvent(LOEvent.VIEWPORT, viewportMetrics);
+    }
+
+    public static LOEvent changePart(int part) {
+        return new LOEvent(LOEvent.CHANGE_PART, part);
+    }
+
+    public static LOEvent load(String inputFile) {
+        return new LOEvent(LOEvent.LOAD, inputFile);
+    }
+}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
index cc86e0b..2f69cf3 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -127,7 +127,7 @@ public class LibreOfficeMainActivity extends Activity {
         mLayerController.setLayerClient(mLayerClient);
         mGeckoLayout.addView(mLayerController.getView(), 0);
 
-        LOKitShell.sendEvent(LOEvent.load(mInputFile));
+        LOKitShell.sendEvent(LOEventFactory.load(mInputFile));
     }
 
     @Override
@@ -199,7 +199,7 @@ public class LibreOfficeMainActivity extends Activity {
         @Override
         public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
             DocumentPartView partView = mDocumentPartViewListAdpater.getItem(position);
-            LOKitShell.sendEvent(LOEvent.changePart(partView.getPartIndex()));
+            LOKitShell.sendEvent(LOEventFactory.changePart(partView.getPartIndex()));
             mDrawerLayout.closeDrawer(mDrawerList);
         }
     }
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
index 28c2bbb..f2b2793 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -46,6 +46,7 @@ import android.util.Log;
 import android.view.View;
 
 import org.libreoffice.LOEvent;
+import org.libreoffice.LOEventFactory;
 import org.libreoffice.LOKitShell;
 import org.libreoffice.LibreOfficeMainActivity;
 import org.libreoffice.TileProvider;
@@ -180,7 +181,7 @@ public class GeckoLayerClient implements LayerView.Listener {
             Log.d(LOGTAG, "Window-size changed to " + mWindowSize);
         }
 
-        LOEvent event = LOEvent.sizeChanged(metrics.widthPixels, metrics.heightPixels);
+        LOEvent event = LOEventFactory.sizeChanged(metrics.widthPixels, metrics.heightPixels);
         LOKitShell.sendEvent(event);
     }
 
@@ -206,7 +207,7 @@ public class GeckoLayerClient implements LayerView.Listener {
             mDrawTimingQueue.add(displayPort);
         }
 
-        LOKitShell.sendEvent(LOEvent.viewport(clampedMetrics));
+        LOKitShell.sendEvent(LOEventFactory.viewport(clampedMetrics));
         if (mViewportSizeChanged) {
             mViewportSizeChanged = false;
             LOKitShell.viewSizeChanged();
commit 9d2faf235055ea89c93552f7d1a7ef6b114fa844
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 20:22:31 2014 +0200

    android: remove unused ViewTransform
    
    Change-Id: I80cc876b542d2b215f8615972717bce998d532e9

diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ViewTransform.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ViewTransform.java
deleted file mode 100644
index edb45f5..0000000
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ViewTransform.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
- * 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/. */
-
-package org.mozilla.gecko.gfx;
-
-public class ViewTransform {
-    public float x;
-    public float y;
-    public float scale;
-
-    public ViewTransform(float inX, float inY, float inScale) {
-        x = inX;
-        y = inY;
-        scale = inScale;
-    }
-}
-
commit 5a0437ed819f23ae7fbeda3ad355bfe9413846fa
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 20:21:02 2014 +0200

    android: don't show any parts in sidebar if only one part exists
    
    Change-Id: Id40fa499bca8e4ef4f8b26877905fd74a66667af

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
index 579ce30..8050863 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
@@ -43,37 +43,26 @@ public class LOKitTileProvider implements TileProvider {
         if (checkDocument()) {
             int parts = mDocument.getParts();
             Log.i(LOGTAG, "Document parts: " + parts);
-            if (parts >= 1) {
-                mDocument.setPart(0);
-            }
-            for (int i = 0; i < parts; i++) {
-                String partName = mDocument.getPartName(i);
-                if (partName.isEmpty()) {
-                    switch (mDocument.getDocumentType()) {
-                        case Document.DOCTYPE_DRAWING:
-                        case Document.DOCTYPE_TEXT:
-                            partName = "Page " + (i + 1);
-                            break;
-                        case Document.DOCTYPE_SPREADSHEET:
-                            partName = "Sheet " + (i + 1);
-                            break;
-                        case Document.DOCTYPE_PRESENTATION:
-                            partName = "Slide " + (i + 1);
-                            break;
-                        case Document.DOCTYPE_OTHER:
-                        default:
-                            partName = "Part " + (i + 1);
-                            break;
+
+            LibreOfficeMainActivity.mAppContext.getDocumentPartView().clear();
+
+            if (parts > 1) {
+                for (int i = 0; i < parts; i++) {
+                    String partName = mDocument.getPartName(i);
+                    if (partName.isEmpty()) {
+                        partName = getGenericPartName(i);
                     }
-                }
-                Log.i(LOGTAG, "Document part " + i + " name:'" + partName + "'");
+                    Log.i(LOGTAG, "Document part " + i + " name:'" + partName + "'");
 
-                mDocument.setPart(i);
-                final DocumentPartView partView = new DocumentPartView(i, partName, thumbnail(128));
-                LibreOfficeMainActivity.mAppContext.getDocumentPartView().add(partView);
+                    mDocument.setPart(i);
+                    final DocumentPartView partView = new DocumentPartView(i, partName, thumbnail(128));
+                    LibreOfficeMainActivity.mAppContext.getDocumentPartView().add(partView);
+                }
             }
 
-            LibreOfficeMainActivity.mAppContext.mMainHandler.post(new Runnable() {
+            mDocument.setPart(0);
+
+            LOKitShell.getMainHandler().post(new Runnable() {
                 @Override
                 public void run() {
                     LibreOfficeMainActivity.mAppContext.getDocumentPartViewListAdpater().notifyDataSetChanged();
@@ -82,6 +71,24 @@ public class LOKitTileProvider implements TileProvider {
         }
     }
 
+    private String getGenericPartName(int i) {
+        if (mDocument == null) {
+            return "";
+        }
+        switch (mDocument.getDocumentType()) {
+            case Document.DOCTYPE_DRAWING:
+            case Document.DOCTYPE_TEXT:
+                return "Page " + (i + 1);
+            case Document.DOCTYPE_SPREADSHEET:
+                return "Sheet " + (i + 1);
+            case Document.DOCTYPE_PRESENTATION:
+                return "Slide " + (i + 1);
+            case Document.DOCTYPE_OTHER:
+            default:
+                return "Part " + (i + 1);
+        }
+    }
+
     private float twipToPixel(float input, float dpi) {
         return input / 1440.0f * dpi;
     }
commit 8365f913e25da602c078bddc25531cc4b9325c0f
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Tue Sep 30 20:15:59 2014 +0200

    android: fix part sidebar not executing an "part change" event..
    
    Change-Id: I8f984ad050d8124164617f67f5ea7fa511e50f55

diff --git a/android/experimental/LOAndroid3/res/layout/activity_main.xml b/android/experimental/LOAndroid3/res/layout/activity_main.xml
index 1d09af9..9ada4d3 100644
--- a/android/experimental/LOAndroid3/res/layout/activity_main.xml
+++ b/android/experimental/LOAndroid3/res/layout/activity_main.xml
@@ -18,6 +18,18 @@
             android:layout_height="fill_parent"
             android:layout_weight="1"/>
 
+        <RelativeLayout
+            android:id="@+id/loadingPanel"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:gravity="center" >
+
+            <ProgressBar
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:indeterminate="true" />
+        </RelativeLayout>
+
         <View
             android:layout_width="match_parent"
             android:layout_height="match_parent"/>
commit 453b7579b861f2bb7ad02f3c5fc263d9157e665b
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Tue Sep 30 20:43:43 2014 +0100

    Fix wrong conditional for zoom-saneness-check.
    
    Change-Id: I54cb8ffc71c162e75675d306b903ef40ad05092f

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 683bb6c..d46c7f4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -629,7 +629,7 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY,
 
     // We probably don't want these limits for tiled rendering, hence
     // we make them optional.
-    if ( !bIgnoreLimits )
+    if ( bIgnoreLimits )
     {
         const Fraction aFrac20( 1, 5 );
         const Fraction aFrac400( 4, 1 );
commit d31e791b4d118cd9669a3eb4ada6623f7611703d
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Tue Sep 30 20:03:26 2014 +0100

    Temp: the DrView scaling will be completely wrong for tiled rendering.
    
    (No idea why yet)
    
    Change-Id: I9fcbd9055d82feb59b1c957234c9d7747f95ced9

diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index e9ac6ca..d9343d1 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -249,10 +249,10 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
     {
         Fraction aScaleX;
         Fraction aScaleY;
-        if (pDrView)
-            pDrView->GetScale( aScaleX, aScaleY );
-        else
-        {
+        // if (pDrView)
+        //     pDrView->GetScale( aScaleX, aScaleY );
+        // else
+        // {
             SCCOL nEndCol = 0;
             SCROW nEndRow = 0;
             pDoc->GetTableArea( nTab, nEndCol, nEndRow );
@@ -262,7 +262,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
                                     pViewData->GetZoomX(),pViewData->GetZoomY(),
                                     pViewData->GetPPTX(),pViewData->GetPPTY(),
                                     aScaleX,aScaleY );
-        }
+        // }
         aDrawMode.SetScaleX(aScaleX);
         aDrawMode.SetScaleY(aScaleY);
     }


More information about the Libreoffice-commits mailing list