← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/disable-file-locking into lp:ubuntu-docviewer-app/reboot

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/disable-file-locking into lp:ubuntu-docviewer-app/reboot.

Commit message:
Disable file locking in LibreOffice

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
Related bugs:
  Bug #1517074 in Ubuntu Document Viewer App: "LibreOffice creates .~lock files which prevent the access to the Document from loviewer"
  https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1517074

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/disable-file-locking/+merge/277698

Disable file locking in LibreOffice

*** HOW TO TEST ***
1) Using the old testing release of DocViewer (2.0 - beta), open a Document
2) Check with File Manager (unlock advanced features first, in order to enable 'show hidden files' option), that a '.~lock' file has been created.
3) Close DocViewer and remove that file.
4) Build DocViewer from this branch and install it on device.
5) Open the same document again.
6) Repeat step 2. Ensure there's no '.~lock' file this time.
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/disable-file-locking into lp:ubuntu-docviewer-app/reboot.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2015-10-03 12:37:24 +0000
+++ CMakeLists.txt	2015-11-17 14:49:23 +0000
@@ -127,7 +127,7 @@
     MESSAGE("Grabbing upstream libs to ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs")
     execute_process(
         COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
-        COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get-click-deps -d ${CMAKE_CURRENT_SOURCE_DIR}/docviewer-libs.json ${CLICK_ARCH} ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
+        COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get-click-deps -d ${CMAKE_CURRENT_SOURCE_DIR}/docviewer-libs.json -c ${CMAKE_CURRENT_SOURCE_DIR}/click/disable-file-locking.sh ${CLICK_ARCH} ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
     )
 
     MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")

=== added directory 'click'
=== added file 'click/disable-file-locking.sh'
--- click/disable-file-locking.sh	1970-01-01 00:00:00 +0000
+++ click/disable-file-locking.sh	2015-11-17 14:49:23 +0000
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# $1 is the temp folder where the packages have been extracted
+TEMP_PATH=$1
+LO_PATH=$TEMP_PATH/opt/libreoffice/lib/libreoffice
+LO_REGISTRY=$LO_PATH/share/registry
+
+THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+echo "Disable file locking in LibreOffice"
+cp $THIS_DIR/disable-file-locking.xcd $LO_REGISTRY

=== added file 'click/disable-file-locking.xcd'
--- click/disable-file-locking.xcd	1970-01-01 00:00:00 +0000
+++ click/disable-file-locking.xcd	2015-11-17 14:49:23 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:data xmlns:oor="http://openoffice.org/2001/registry";>
+  <dependency file="main"/>
+  <oor:component-data oor:package="org.openoffice.Office" oor:name="Common">
+    <node oor:name="Misc">
+        <prop oor:name="UseLocking">
+          <value>false</value>
+        </prop>
+    </node>
+  </oor:component-data>
+</oor:data>


Follow ups