[Libreoffice-commits] .: 2 commits - android/experimental sw/source

2012-11-28 Thread Libreoffice Gerrit user
 android/experimental/LibreOffice4Android/native-code.cxx |4 
 sw/source/filter/ww8/ww8par.hxx  |6 -
 sw/source/filter/ww8/ww8par5.cxx |   72 +++
 sw/source/ui/vba/vbafield.cxx|   28 ++---
 4 files changed, 57 insertions(+), 53 deletions(-)

New commits:
commit b4dd218f9eca2c4edf887761241843e70c6b5e8f
Author: Tor Lillqvist 
Date:   Wed Nov 28 10:50:24 2012 +0200

Add vbaswobj and writerfilter components

Change-Id: I63c88bcb41a48142f8b3c20ff4d66ae28811411b

diff --git a/android/experimental/LibreOffice4Android/native-code.cxx 
b/android/experimental/LibreOffice4Android/native-code.cxx
index 616bb86..ba14852 100644
--- a/android/experimental/LibreOffice4Android/native-code.cxx
+++ b/android/experimental/LibreOffice4Android/native-code.cxx
@@ -36,8 +36,10 @@ extern "C"
 extern void * ucppkg1_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
 extern void * unoxml_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
 extern void * unordf_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+extern void * vbaswobj_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 );
@@ -74,8 +76,10 @@ lo_get_libmap(void)
 { "libucppkg1.a", ucppkg1_component_getFactory },
 { "libunordflo.a", unordf_component_getFactory },
 { "libunoxmllo.a", unoxml_component_getFactory },
+{ "libvbaswobj.uno.a", vbaswobj_component_getFactory },
 { "libwpftdrawlo.a", wpftdraw_component_getFactory },
 { "libwpftwriterlo.a", wpftwriter_component_getFactory },
+{ "libwriterfilterlo.a", writerfilter_component_getFactory },
 { "libxmlfdlo.a", xmlfd_component_getFactory },
 { "libxmlsecurity.a", xmlsecurity_component_getFactory },
 { "libxoflo.a", xof_component_getFactory },
commit 759aed9b78b77b40ab244e1c3e3f156f2b32369d
Author: Tor Lillqvist 
Date:   Wed Nov 28 10:33:45 2012 +0200

De-duplicate _ReadFieldParams

Change-Id: Ib08f5ab8e6155f1b9be100377657678b8c480060

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 44f6511..92357ac 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -108,7 +108,7 @@ class SwAttrSet;
 class GDIMetaFile;
 struct ESelection;
 class SfxItemSet;
-class _ReadFieldParams;
+class WW8ReadFieldParams;
 class wwZOrderer;
 class OutlinerParaObject;
 
@@ -1691,8 +1691,8 @@ public: // eigentlich private, geht aber leider nur 
public
 eF_ResT Read_F_DBNext( WW8FieldDesc*, String& );
 eF_ResT Read_F_DBNum( WW8FieldDesc*, String& );
 eF_ResT Read_F_Equation( WW8FieldDesc*, String& );
-void Read_SubF_Ruby( _ReadFieldParams& rReadParam);
-void Read_SubF_Combined( _ReadFieldParams& rReadParam);
+void Read_SubF_Ruby( WW8ReadFieldParams& rReadParam);
+void Read_SubF_Combined( WW8ReadFieldParams& rReadParam);
 eF_ResT Read_F_IncludePicture( WW8FieldDesc*, String& rStr );
 eF_ResT Read_F_IncludeText(WW8FieldDesc*, String& rStr );
 eF_ResT Read_F_Seq( WW8FieldDesc*, String& rStr );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 1075590..4ddccfc 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -104,14 +104,14 @@ using namespace std; // #i24377#
 using namespace nsSwDocInfoSubType;
 
 
-class _ReadFieldParams
+class WW8ReadFieldParams
 {
 private:
 String aData;
 xub_StrLen nLen, nFnd, nNext, nSavPtr;
 public:
-_ReadFieldParams( const String& rData );
-~_ReadFieldParams();
+WW8ReadFieldParams( const String& rData );
+~WW8ReadFieldParams();
 
 xub_StrLen GoToTokenParam();
 long SkipToNextToken();
@@ -125,7 +125,7 @@ public:
 };
 
 
-_ReadFieldParams::_ReadFieldParams( const String& _rData )
+WW8ReadFieldParams::WW8ReadFieldParams( const String& _rData )
 : aData( _rData ), nLen( _rData.Len() ), nNext( 0 )
 {
 /*
@@ -150,13 +150,13 @@ _ReadFieldParams::_ReadFieldParams( const String& _rData )
 }
 
 
-_ReadFieldParams::~_R

[Libreoffice-commits] .: 2 commits - android/experimental

2012-11-26 Thread Libreoffice Gerrit user
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |   24 +++---
 1 file changed, 19 insertions(+), 5 deletions(-)

New commits:
commit 33ab92fe567081c9f704262c2bc959f0498b06d5
Author: Miklos Vajna 
Date:   Mon Nov 26 09:30:38 2012 +0100

android: make this a bit more readable

Change-Id: I765458daa808245ec736a3d184ba64c2dcd3a10b

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 4817bac..96ae150 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -182,7 +182,9 @@ public class DocumentLoader
 
 flipper.showNext();
 
-getPageViewerAt((flipper.getDisplayedChild() + 
PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE).display(getCurrentPageViewer().currentPageNumber + 
PAGECACHE_PLUSMINUS);
+// The entry after the next, both child index and next is 
0..PAGECACHE_SIZE.
+int next = (flipper.getDisplayedChild() + PAGECACHE_PLUSMINUS) 
% PAGECACHE_SIZE;
+
getPageViewerAt(next).display(getCurrentPageViewer().currentPageNumber + 
PAGECACHE_PLUSMINUS);
 return true;
 } else if (event2.getX() - event1.getX() > 120) {
 if (getCurrentPageViewer().currentPageNumber == 0)
@@ -201,7 +203,9 @@ public class DocumentLoader
 
 flipper.showPrevious();
 
-getPageViewerAt((flipper.getDisplayedChild() + PAGECACHE_SIZE 
- PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE).display(getCurrentPageViewer().currentPageNumber - 
PAGECACHE_PLUSMINUS);
+// The entry before the previous, both child index and 
previous is 0..PAGECACHE_SIZE.
+int previous = (flipper.getDisplayedChild() + PAGECACHE_SIZE - 
PAGECACHE_PLUSMINUS) % PAGECACHE_SIZE;
+
getPageViewerAt(previous).display(getCurrentPageViewer().currentPageNumber - 
PAGECACHE_PLUSMINUS);
 
 return true;
 }
commit 593e4a11edb42cf7311ee341b0dbb1e7b1497c1c
Author: Miklos Vajna 
Date:   Mon Nov 26 09:30:08 2012 +0100

android: extract duplicated casts to helper methods

Change-Id: Ib77731839ad9e46626a7a07d4b2c6c7e32d4bba1

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index fcf9fae..4817bac 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -145,6 +145,16 @@ public class DocumentLoader
 
 Bundle extras;
 
+PageViewer getPageViewerAt(int index)
+{
+return (PageViewer)flipper.getChildAt(index);
+}
+
+PageViewer getCurrentPageViewer()
+{
+return (PageViewer)flipper.getCurrentView();
+}
+
 class GestureListener
 extends GestureDetector.SimpleOnGestureListener
 {
@@ -156,7 +166,7 @@ public class DocumentLoader
 {
 Log.i(TAG, "onFling: " + event1 + " " + event2);
 if (event1.getX() - event2.getX() > 120) {
-if (((PageViewer)flipper.getCurrentView()).currentPageNumber 
== documentContext.pageCount-1)
+if (getCurrentPageViewer().currentPageNumber == 
documentContext.pageCount-1)
 return false;
 
 Animation inFromRight = new 
TranslateAnimation(Animation.RELATIVE_TO_SELF, 1, Animation.RELATIVE_TO_SELF, 0,
@@ -172,10 +182,10 @@ public class DocumentLoader
 
 flipper.showNext();
 
-((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() + 
PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 + PAGECACHE_PLUSMINUS);
+getPageViewerAt((flipper.getDisplayedChild() + 
PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE).display(getCurrentPageViewer().currentPageNumber + 
PAGECACHE_PLUSMINUS);
 return true;
 } else if (event2.getX() - event1.getX() > 120) {
-if (((PageViewer)flipper.getCurrentView()).currentPageNumber 
== 0)
+if (getCurrentPageViewer().currentPageNumber == 0)
 return false;
 
 Animation inFromLeft = new 
TranslateAnimation(Animation.RELATIVE_TO_SELF, -1, Animation.RELATIVE_TO_SELF, 
0,
@@ -191,7 +201,7 @@ public class DocumentLoader
 
 flipper.showPrevious();
 
-((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() + 
PAGECACHE_SIZE - PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCu

[Libreoffice-commits] .: 2 commits - android/experimental sal/android sal/inc sal/rtl

2012-11-22 Thread Libreoffice Gerrit user
 android/experimental/LibreOffice4Android/Makefile |   19 +--
 sal/android/lo-bootstrap.c|7 +++
 sal/inc/osl/detail/android-bootstrap.h|2 ++
 sal/rtl/source/bootstrap.cxx  |   12 
 4 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit 129831703f0539bf06279f47f915098e5a7287f8
Author: Tor Lillqvist 
Date:   Thu Nov 22 14:01:42 2012 +0200

Add an $APP_DATA_DIR predefiend thingie in bootstrap ("rc") files for 
Android

It expands to what lo_get_app_data_dir() returns, i.e. the activity's
getApplicationInfo().dataDir.

Use it in the LibreOffice4Android app's rc files instead of a
hardcoded (possibly device- and/or OS version dependent) path.

Change-Id: I8145f2c86eeded39232fb251a79fa64f31f77f55

diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index 8a57055..ea5fbeb 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -45,9 +45,8 @@ copy-stuff:
gzip -9 <$(OUTDIR)/bin/types.rdb >assets/gz.unpack/program/types.rdb
gzip -9 <$(OUTDIR)/bin/ure/types.rdb 
>assets/gz.unpack/program/ure/types.rdb
 # For some reason the vnd.sun.star.expand:$LO_LIB_DIR doesn't seem to work, it 
expands to empty!?
-# So just hardcode the known APP_DATA_PATH for now...
for F in xml/services xml/ure/services; do \
-   sed -e 
's!uri="vnd.sun.star.expand:$$LO_LIB_DIR/!uri="file://$(APP_DATA_PATH)/lib/!g' 
<$(OUTDIR)/$$F.rdb >assets/$$F.rdb; \
+   sed -e 
's!uri="vnd.sun.star.expand:$$LO_LIB_DIR/!uri="file://$$APP_DATA_DIR/lib/!g' 
<$(OUTDIR)/$$F.rdb >assets/$$F.rdb; \
done
cp $(SRC_ROOT)/odk/examples/java/DocumentHandling/test/test1.odt \
   $(SRC_ROOT)/sc/qa/unit/data/xls/border.xls \
@@ -72,30 +71,30 @@ copy-stuff:
echo 'NativeProgress=1' >> assets/rc
echo 'URE_BOOTSTRAP=file:///assets/program/fundamentalrc' >> assets/rc
 #  echo 'RTL_LOGFILE=file:///dev/log/main' >> assets/rc
-   echo "HOME=$(APP_DATA_PATH)/cache" >> assets/rc
-   echo "OSL_SOCKET_PATH=$(APP_DATA_PATH)/cache" >> assets/rc
+   echo 'HOME=$$APP_DATA_DIR/cache' >> assets/rc
+   echo 'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' >> assets/rc
 #
 # Set up fundamentalrc
echo '[Bootstrap]' > assets/program/fundamentalrc
-   echo "LO_LIB_DIR=file:$(APP_DATA_PATH)/lib/" >> 
assets/program/fundamentalrc
-   echo "URE_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> 
assets/program/fundamentalrc # checkme - is this used to find configs ?
+   echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> 
assets/program/fundamentalrc
+   echo 'URE_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> 
assets/program/fundamentalrc # checkme - is this used to find configs ?
echo 'BRAND_BASE_DIR=file:///assets' >> assets/program/fundamentalrc
echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry 
module:$${BRAND_BASE_DIR}/share/registry/modules 
res:$${BRAND_BASE_DIR}/share/registry' >> assets/program/fundamentalrc
echo 
'URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway' >> 
assets/program/fundamentalrc
-   echo 'URE_MORE_TYPES=$(APP_DATA_PATH)/program/offapi.rdb 
$(APP_DATA_PATH)/program/oovbaapi.rdb' >> assets/program/fundamentalrc
+   echo 'URE_MORE_TYPES=$$APP_DATA_DIR/program/offapi.rdb 
$$APP_DATA_DIR/program/oovbaapi.rdb' >> assets/program/fundamentalrc
echo 'URE_MORE_SERVICES=file:///assets/xml/services.rdb 
<$$BRAND_BASE_DIR/program/services>*' >> assets/program/fundamentalrc
 #
 # Set up unorc
echo '[Bootstrap]' > assets/program/unorc
-   echo "URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> 
assets/program/unorc
-   echo 'UNO_TYPES=$(APP_DATA_PATH)/program/ure/types.rdb 
$(APP_DATA_PATH)/program/types.rdb $${URE_MORE_TYPES}' >> assets/program/unorc
+   echo 'URE_INTERNAL_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> 
assets/program/unorc
+   echo 'UNO_TYPES=$$APP_DATA_DIR/program/ure/types.rdb 
$$APP_DATA_DIR/program/types.rdb $${URE_MORE_TYPES}' >> assets/program/unorc
echo 'UNO_SERVICES=file:///assets/xml/ure/services.rdb 
$${URE_MORE_SERVICES}' >> assets/program/unorc
 #
 # Set up bootstraprc
echo '[Bootstrap]' > assets/program/bootstraprc
echo 'InstallMode=' >> assets/program/bootstraprc
echo 'ProductKey=LibreOffice 3.6' >> assets/program/bootstraprc
-   echo "UserInstallation=file://$(APP_DATA_PATH)" >> 
assets/program/bootstraprc
+   echo 'UserInstallation=file://$$APP_DATA_DIR' >> 
assets/program/bootstraprc
 #
 # Set up versionrc
echo '[Version]' > assets/program/versionrc
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 4d9f190..1f293b5 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -40,6 +40,10 @@

[Libreoffice-commits] .: 2 commits - android/experimental

2012-11-08 Thread Libreoffice Gerrit user
 android/experimental/DocumentLoader/Makefile  |2 +-
 android/experimental/LibreOffice4Android/Makefile |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 62b4827f238acabd970a98272967d7c2b0545ea2
Author: Tor Lillqvist 
Date:   Thu Nov 8 15:10:38 2012 +0200

Use --gc-sections

Change-Id: I6694f1820dc8c2cdae2522357932ab0065754a75

diff --git a/android/experimental/DocumentLoader/Makefile 
b/android/experimental/DocumentLoader/Makefile
index 4123a21..15c6a0a 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -49,7 +49,7 @@ properties:
 link-so:
 # Build the single .so for this app
mkdir -p $(OBJLOCAL)
-   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
+   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--gc-sections -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index 6798e40..c823ebf 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -24,7 +24,7 @@ APP_PACKAGE=org.libreoffice
 link-so:
 # Build the single .so for this app
mkdir -p $(OBJLOCAL)
-   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
+   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--gc-sections -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
commit 8d32dc82e6336ab71e35599d42f058e4c23a44f8
Author: Tor Lillqvist 
Date:   Thu Nov 8 15:09:40 2012 +0200

Produce a linker map

Change-Id: Iff4f7be61310884dea1c29f6fe931dd35cadc552

diff --git a/android/experimental/DocumentLoader/Makefile 
b/android/experimental/DocumentLoader/Makefile
index d9e7c88..4123a21 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -49,7 +49,7 @@ properties:
 link-so:
 # Build the single .so for this app
mkdir -p $(OBJLOCAL)
-   $(CXX) -Wl,--stats -Wl,--no-keep-files-mapped -Wl,--no-undefined 
-DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so 
-I$(OUTDIR)/inc native-code.cxx -L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) 
-lgnustl_static -landroid -llog -lz
+   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index f81e814..6798e40 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -24,7 +24,7 @@ APP_PACKAGE=org.libreoffice
 link-so:
 # Build the single .so for this app
mkdir -p $(OBJLOCAL)
-   $(CXX) -Wl,--stats -Wl,--no-keep-files-mapped -Wl,--no-undefined 
-DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so 
-I$(OUTDIR)/inc native-code.cxx -L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) 
-lgnustl_static -landroid -llog -lz
+   $(CXX) -Wl,-Map,liblo-native-code.map -Wl,--stats 
-Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING 
-shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx 
-L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://

[Libreoffice-commits] .: 2 commits - android/experimental

2012-10-22 Thread Libreoffice Gerrit user
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |4 +++-
 android/experimental/LibreOffice4Android/native-code.cxx   
  |2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d8feea6c28540797b4959e66bdc9f38209f7c512
Author: Tor Lillqvist 
Date:   Fri Oct 19 18:10:58 2012 +0300

Seems that on the emulator the y scale is -1, huh

Change-Id: I1ad30e278a5b04de3ee544c30c38f4765539157d

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index e1e7506..841b341 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -575,7 +575,9 @@ public class DocumentLoader
 int t = (int)(h/2 - values[Matrix.MTRANS_Y]/scale);
 Log.i(TAG, "Unzoomed rect: " + l + ", " + t + ", " + 
(int)(l+w/scale) + ", " + (int)(t+h/scale));
 
-Assert.assertTrue(values[Matrix.MSCALE_X] == 
values[Matrix.MSCALE_Y]);
+Log.i(TAG, "Scales: " + values[Matrix.MSCALE_X] + ", " + 
values[Matrix.MSCALE_Y]);
+
+// Assert.assertTrue(values[Matrix.MSCALE_X] == 
values[Matrix.MSCALE_Y]);
 
 super.draw(canvas);
 
commit a09a98ee45c024005b139a9c265d76a3bee8d89c
Author: Tor Lillqvist 
Date:   Fri Oct 19 18:09:26 2012 +0300

Add ucppkg1

Change-Id: I471440867895b2a8ef2f2de90ed37f5b3c9c0721

diff --git a/android/experimental/LibreOffice4Android/native-code.cxx 
b/android/experimental/LibreOffice4Android/native-code.cxx
index 22c9a7e..f304915 100644
--- a/android/experimental/LibreOffice4Android/native-code.cxx
+++ b/android/experimental/LibreOffice4Android/native-code.cxx
@@ -42,6 +42,7 @@ extern "C"
 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 * ucppkg1_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
 extern void * unoxml_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
 extern void * unordf_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
 extern void * wpftdraw_component_getFactory( const char * pImplName, void 
* pServiceManager, void * pRegistryKey );
@@ -88,6 +89,7 @@ lo_get_libmap(void)
 { "libswlo.a", sw_component_getFactory },
 { "libt602filterlo.a", t602filter_component_getFactory },
 { "libtextfdlo.a", textfd_component_getFactory },
+{ "libucppkg1.a", ucppkg1_component_getFactory },
 { "libunordflo.a", unordf_component_getFactory },
 { "libunoxmllo.a", unoxml_component_getFactory },
 { "libwpftdrawlo.a", wpftdraw_component_getFactory },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental sw/source

2012-09-06 Thread Libreoffice Gerrit user
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |   18 --
 sw/source/core/layout/paintfrm.cxx 
|9 +
 2 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit 6dc9552e22952f83d9ee16870eae9e1f2a2ca2fa
Author: Tor Lillqvist 
Date:   Thu Sep 6 17:31:44 2012 +0300

Move Bootstrap setup and lib pre-loading (for easier debugging) to 
onCreate()

Change-Id: I77c08dc1236c4c77cfb7711f3be659ebfe877dd1

diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index c2ce1d4..c0f4c4d 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -135,7 +135,15 @@ public class LibreOfficeUIActivity extends 
SherlockActivity implements ActionBar
 currentDirectory = homeDirectory;
 //Load default settings
 
+Bootstrap.setup(this);
 
+Bootstrap.putenv("SAL_LOG=yes");
+
+// Load a lot of shlibs here explicitly in advance because that
+// makes debugging work better, sigh
+Bootstrap.dlopen("libmergedlo.so");
+Bootstrap.dlopen("libswdlo.so");
+Bootstrap.dlopen("libswlo.so");
 }
 
 public void createUI(){
@@ -741,16 +749,6 @@ class ListItemAdapter implements ListAdapter{
 long t1 = System.currentTimeMillis();
 timingOverhead = t1 - t0;
 
-Bootstrap.setup(LibreOfficeUIActivity.this);
-
-Bootstrap.putenv("SAL_LOG=yes");
-
-// Load a lot of shlibs here explicitly in advance because 
that
-// makes debugging work better, sigh
-Bootstrap.dlopen("libmergedlo.so");
-Bootstrap.dlopen("libswdlo.so");
-Bootstrap.dlopen("libswlo.so");
-
 // Log.i(TAG, "Sleeping NOW");
 // Thread.sleep(2);
 
commit 31c1971f8e80a2bf03efef77ba5db32ac7871b12
Author: Tor Lillqvist 
Date:   Thu Sep 6 17:28:24 2012 +0300

Avoid assertion failure when rendering thumbnails of some pages

Change-Id: I5331ae27d8e492a8094e1904ba3af143c7c1a0e5

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 0af0b44..b3efb88 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4614,6 +4614,15 @@ lcl_MakeBorderLine(SwRect const& rRect,
 aEnd.setY(fStartY);
 }
 
+// WHen rendering to very small (virtual) devices, like when producing
+// page thumbnails in a mobile device app, the line geometry can end up
+// bogus (negative width or height), so just ignore such border lines.
+// Otherwise we will run into assertions later in lcl_TryMergeBorderLine()
+// at least.
+if (aEnd.getX() < aStart.getX() ||
+aEnd.getY() < aStart.getY())
+return;
+
 double const nExtentLeftStart = (isLeftOrTopBorder == isVertical)
 ?   lcl_GetExtent(pStartNeighbour, 0)
 :   lcl_GetExtent(0, pStartNeighbour);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental

2012-08-15 Thread Iain Billett
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
   |   85 ++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
   |   10 -
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |   43 +++--
 3 files changed, 93 insertions(+), 45 deletions(-)

New commits:
commit e40f2678ab4ec8116e562cda51281762a76bb166
Author: Iain Billett 
Date:   Wed Aug 15 11:34:00 2012 +0100

Added soft shadow around thumbnails.

Change-Id: I09926356c54e566a26b9fc944f61d3944dbd4ce0

diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index b7da4b9..bfa3eec 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -35,6 +35,10 @@ import android.app.Activity;
 import android.graphics.Bitmap;
 import android.graphics.Matrix;
 import android.graphics.Color;
+import android.graphics.BitmapFactory;
+import android.graphics.BlurMaskFilter;
+import android.graphics.Canvas;
+import android.graphics.Paint;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.util.Log;
@@ -91,6 +95,7 @@ import com.sun.star.view.XRenderable;
 
 import java.io.*;
 import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
 import java.nio.ByteOrder;
 import java.util.ArrayList;
 
@@ -1050,10 +1055,6 @@ public class DocumentLoader
 protected void onDestroy()
 {
 super.onDestroy();
-//Save the thumbnail of the first page as the grid image.
-// Could easily make a new (larger) thumb but recycling
-// should be faster & more efficient, better for the environment ;-)
-//ll = (LinearLayout)findViewById( R.id.navigator);
 
 Bitmap bmpAlpha = ( (ThumbnailView)ll.getChildAt( 0 ) ).getBitmap();
 //For now use these 3 lines to turn the bitmap right way up.
@@ -1061,13 +1062,34 @@ public class DocumentLoader
 m.preScale( 1.0f , -1.0f );
 Bitmap bmp = Bitmap.createBitmap( bmpAlpha, 0, 0, bmpAlpha.getWidth(), 
bmpAlpha.getHeight(), m, true);
 
+BlurMaskFilter blurFilter = new BlurMaskFilter( 3 , 
BlurMaskFilter.Blur.OUTER);
+Paint shadowPaint = new Paint();
+shadowPaint.setMaskFilter(blurFilter);
+
+int[] offsetXY = new int[2];
+Bitmap shadowImage = bmp.extractAlpha(shadowPaint, offsetXY);
+Bitmap shadowImage32 = shadowImage.copy(Bitmap.Config.ARGB_, true);
+
+ByteBuffer pxBuffer = ByteBuffer.allocate( 
shadowImage32.getByteCount() );
+IntBuffer intPxBuffer = IntBuffer.allocate( 
shadowImage32.getByteCount()/4 );
+shadowImage32.copyPixelsToBuffer( pxBuffer );
+for( int i = 0 ; i < shadowImage32.getByteCount()/4 ; i++ ){
+int pxA = (int)( pxBuffer.get( i*4 + 3) );//TODO make sure byte0 
is A
+intPxBuffer.put( i , Color.argb( (int)( pxA*0.25f) ,  0 ,  0 , 0 ) 
);
+}
+shadowImage32.copyPixelsFromBuffer( intPxBuffer );
+
+Canvas c = new Canvas(shadowImage32);
+c.drawBitmap(bmp, -offsetXY[0], -offsetXY[1], null);
+
 File file = new File(extras.getString("input"));
 Log.i(TAG ,"onDestroy " + extras.getString("input"));
 File dir = file.getParentFile();
 File thumbnailFile = new File( dir , "." + 
file.getName().split("[.]")[0] + ".png");
 try {
+Log.i( TAG , Integer.toString( shadowImage32.getWidth() - 
bmp.getWidth() ) );
 ByteArrayOutputStream bytes = new ByteArrayOutputStream();
-bmp.compress(Bitmap.CompressFormat.PNG, 40, bytes);
+shadowImage32.compress(Bitmap.CompressFormat.PNG, 40, bytes);
 thumbnailFile.createNewFile();
 FileOutputStream fo = new FileOutputStream( thumbnailFile );
 fo.write(bytes.toByteArray());
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
index 664a04e..1210e0e 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
@@ -12,6 +12,8 @@ import org.libreoffice.R;
 
 
 import java.io.File;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
 
 import android.content.Context;
 import android.util.Log;
@@ -23,18 +25,22 @@ import android.widget.ImageView;
 import android.widget.TextView;
 import android.graphics.BitmapFactory;
 import android.graphics.Bitmap;
+import android.graphics.BlurMaskFilter;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Color;
 
 public class Gr

[Libreoffice-commits] .: 2 commits - android/experimental i18npool/source

2012-08-09 Thread Tor Lillqvist
 android/experimental/LibreOffice4Android/Makefile |1 +
 i18npool/source/languagetag/simple-langtag.cxx|3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b57899ae39192f8f5edeba99808376612ffc48dd
Author: Tor Lillqvist 
Date:   Thu Aug 9 21:42:10 2012 +0300

Mkdir before copying

Change-Id: I8e1a3c62bee096252acb04d7be100caaac25a87c

diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index 18eba3e..1365407 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -225,6 +225,7 @@ build-ant: copy-stuff properties
echo sdk.dir=$(ANDROID_SDK_HOME) >../../abs-lib/local.properties
 # ActionBarSherlock uses the v4 support library, apparently one needs to copy
 # it like this for it to be found
+   mkdir -p ../../abs-lib/libs
cp $(ANDROID_SDK_HOME)/extras/android/support/v4/android-support-v4.jar 
../../abs-lib/libs
 #
 # Copy jar files we need
commit 705ba19317b8a80df521ba02789cf17efa4a2460
Author: Tor Lillqvist 
Date:   Thu Aug 9 18:13:24 2012 +0300

WaE: unused function

Change-Id: I292de75fbc5dd83bfeefc242e8ac699ab7b6fad8

diff --git a/i18npool/source/languagetag/simple-langtag.cxx 
b/i18npool/source/languagetag/simple-langtag.cxx
index 7131749..7fd735e 100644
--- a/i18npool/source/languagetag/simple-langtag.cxx
+++ b/i18npool/source/languagetag/simple-langtag.cxx
@@ -387,6 +387,7 @@ static const gchar *lt_region_get_tag(const lt_region_t 
*region)
 return region ? region->mpStr : NULL;
 }
 
+#ifdef erDEBUG
 static void lt_tag_dump(const lt_tag_t *tag)
 {
 fprintf( stderr, "\n");
@@ -395,7 +396,7 @@ static void lt_tag_dump(const lt_tag_t *tag)
 fprintf( stderr, "SimpleLangtag   script: %s\n", tag->maScript.mpStr);
 fprintf( stderr, "SimpleLangtag   region: %s\n", tag->maRegion.mpStr);
 }
-
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental

2012-08-09 Thread Tor Lillqvist
 android/experimental/DocumentLoader/build.xml  
  |1 -
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cc37b54230db4124212c053741a01acdea9f4c93
Author: Tor Lillqvist 
Date:   Thu Aug 9 10:52:22 2012 +0300

Silence the annoyingly verbose vcl OSL_TRACEs

Change-Id: Ibd7c6ac56e56cf0e3e706a905603ef1a17a4579c

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 993a87c..97797df 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -928,7 +928,8 @@ public class DocumentLoader
 
 Bootstrap.setup(this);
 
-Bootstrap.putenv("SAL_LOG=yes");
+// Avoid all the old style OSL_TRACE calls especially in vcl
+Bootstrap.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
 
 // Load a lot of shlibs here explicitly in advance because that
 // makes debugging work better, sigh
commit e8533bb02800b86f143adfa6b675c1d48df1e7e8
Author: Tor Lillqvist 
Date:   Thu Aug 9 10:22:09 2012 +0300

Fix edit mistake, the point is to not include the SDK build.xml here

Change-Id: I3cfd5819be8075869906dac3b963b4d0b2cf2890

diff --git a/android/experimental/DocumentLoader/build.xml 
b/android/experimental/DocumentLoader/build.xml
index e21b67b..a35fbcc 100644
--- a/android/experimental/DocumentLoader/build.xml
+++ b/android/experimental/DocumentLoader/build.xml
@@ -80,6 +80,5 @@
  in order to avoid having your file be overridden by tools such as 
"android update project"
 -->
 
-
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental

2012-08-03 Thread Tor Lillqvist
 android/experimental/DocumentLoader/Makefile  |   19 ---
 android/experimental/LibreOffice4Android/Makefile |6 +++---
 2 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit f1e95bd6d9a115845b38c523fd57e7ee1a0e282e
Author: Tor Lillqvist 
Date:   Fri Aug 3 08:51:59 2012 +0300

Adapt r8b bits from ../DocumentLoader/Makefile

Change-Id: Idd60d2dd5cb32012de6027c2c161e2dbc3b2f404

diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index da87ca7..bcf0d01 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -139,7 +139,7 @@ copy-stuff:
done
 #
 # Then the shared GNU C++ library
-   $(call 
COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/$(ABI_PATH)/libgnustl_shared.so)
+   $(call 
COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/libgnustl_shared.so)
 #
 # Then other "assets". Let the directory structure under assets mimic
 # that under solver for now.
@@ -238,7 +238,7 @@ copy-stuff:
 #
 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
 #
-   cp 
$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver 
$(SODEST)
+   cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup
 
 build-ant: copy-stuff properties
@@ -274,4 +274,4 @@ run:
 
 clean: properties
$(ANT) clean
-   rm -rf assets libs obj
+   rm -rf assets libs $(SODEST) $(OBJLOCAL)
commit 2d757306e220b78e7f1ef28d7256e51c7edc4e40
Author: Tor Lillqvist 
Date:   Fri Aug 3 08:51:22 2012 +0300

Adapt architecture-specific bits from ../LibreOffice4Android/Makefile

Change-Id: I06ecb06df4df61fccc53477b5789a171e62248ec

diff --git a/android/experimental/DocumentLoader/Makefile 
b/android/experimental/DocumentLoader/Makefile
index cdbf196..279f6a4 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -16,8 +16,13 @@ APP_PACKAGE=org.libreoffice.android.examples
 # code are very much self-contained pre-packaged thingies.
 APP_DATA_PATH=/data/data/$(APP_PACKAGE)
 
-SODEST=libs/armeabi-v7a
-OBJLOCAL=obj/local/armeabi-v7a
+ifeq ($(CPU),I)
+ABI_PATH=x86
+else
+ABI_PATH=armeabi-v7a
+endif
+SODEST=libs/$(ABI_PATH)
+OBJLOCAL=obj/local/$(ABI_PATH)
 
 define COPYSO
 cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if 
$(2),/$(2),/$(notdir $(1))) && \
@@ -34,10 +39,10 @@ all: build-ant
 
 properties:
echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
-   echo sdk.dir=$(ANDROID_SDK_HOME) >../../Bootstrap/local.properties 
+   echo sdk.dir=$(ANDROID_SDK_HOME) >../../Bootstrap/local.properties
 
-copy-stuff: 
-# First always clean 
+copy-stuff:
+# First always clean
rm -rf libs $(OBJLOCAL)
mkdir -p $(SODEST) $(OBJLOCAL)
 #
@@ -134,7 +139,7 @@ copy-stuff:
done
 #
 # Then the shared GNU C++ library
-   $(call 
COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/armeabi-v7a/libgnustl_shared.so)
+   $(call 
COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/libgnustl_shared.so)
 #
 # Then other "assets". Let the directory structure under assets mimic
 # that under solver for now.
@@ -234,7 +239,7 @@ copy-stuff:
 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
 #
cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
-   echo set solib-search-path ./obj/local/armeabi-v7a >$(SODEST)/gdb.setup
+   echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup
 
 build-ant: copy-stuff properties
 #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental

2012-06-30 Thread Tor Lillqvist
 android/experimental/DocumentLoader/build.xml  
  |   13 
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |  386 +-
 2 files changed, 387 insertions(+), 12 deletions(-)

New commits:
commit f7e4239ce420c09f3a60339edf10c3a96acb59e5
Author: Tor Lillqvist 
Date:   Sat Jun 30 10:13:04 2012 +0300

Update for SDK tools rev 20

Change-Id: I482d0a488e9de5b59ce74b9c4057b4103fb048dc

diff --git a/android/experimental/DocumentLoader/build.xml 
b/android/experimental/DocumentLoader/build.xml
index 5d96019..09f65a9 100644
--- a/android/experimental/DocumentLoader/build.xml
+++ b/android/experimental/DocumentLoader/build.xml
@@ -79,7 +79,7 @@
  In all cases you must update the value of version-tag below to read 
'custom' instead of an integer,
  in order to avoid having your file be overridden by tools such as 
"android update project"
 -->
-
+
 
 
 
@@ -92,17 +92,18 @@
 versioncode="${version.code}"
 versionname="${version.name}"
 debug="${build.is.packaging.debug}"
-manifest="AndroidManifest.xml"
+manifest="${out.manifest.abs.file}"
 assets="${asset.absolute.dir}"
-androidjar="${android.jar}"
+androidjar="${project.target.android.jar}"
 apkfolder="${out.absolute.dir}"
 nocrunch="${build.packaging.nocrunch}"
 resourcefilename="${resource.package.file.name}"
 resourcefilter="${aapt.resource.filter}"
-projectLibrariesResName="project.libraries.res"
-projectLibrariesPackageName="project.libraries.package"
+libraryResFolderPathRefid="project.library.res.folder.path"
+libraryPackagesRefid="project.library.packages"
 previousBuildType="${build.last.target}"
-buildType="${build.target}">
+buildType="${build.target}"
+ignoreAssets="${aapt.ignore.assets}">
 
 
  
commit 8841e75d5af26f96e3ac168474a03d956bd7bb40
Author: Tor Lillqvist 
Date:   Thu Jun 28 23:17:35 2012 +0300

Hacking on on-demand multiple-level-of-detail quad-tree ideas

Change-Id: Ie5efb45d401721e844e3137474c1a7473a1ac144

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 677c6d4..993a87c 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -58,7 +58,17 @@ package org.libreoffice.android.examples;
 
 import android.app.Activity;
 import android.graphics.Bitmap;
+import android.graphics.Canvas;
 import android.graphics.Color;
+import android.graphics.ColorFilter;
+import android.graphics.Matrix;
+import android.graphics.PixelFormat;
+import android.graphics.Paint;
+import android.graphics.Point;
+import android.graphics.Rect;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.util.Log;
@@ -74,6 +84,8 @@ import android.widget.TextView;
 import android.widget.ViewFlipper;
 import android.widget.ViewSwitcher;
 
+import junit.framework.Assert;
+
 import com.polites.android.GestureImageView;
 
 import com.sun.star.awt.Size;
@@ -252,10 +264,341 @@ public class DocumentLoader
 }
 }
 
+static int zoomLevel(float scale)
+{
+if (scale <= 1)
+return 0;
+
+int result = 1;
+int power = 2;
+
+while (scale > power) {
+result++;
+power *= 2;
+}
+return result;
+}
+
+static int scaleOfZoom(int zoom)
+{
+int result = 1;
+
+while (zoom > 0) {
+result *= 2;
+zoom--;
+}
+
+return result;
+}
+
+static int setColorAlpha(int color,
+ double alpha)
+{
+return Color.argb((int)(alpha*255), Color.red(color), 
Color.green(color), Color.blue(color));
+}
+
+// Each (Gesture)ImageView is showing an object of this subclass of
+// BitmapDrawable, the root of a quadtree of higher-resolution partial
+// page bitmaps. Obviously these should be rendered asynchronously on
+// demand but that code is not here yet. And anyway, rendering partial
+// pages won't work until I have figured out why offsetting VirtualDevice
+// has no effect.
+class QuadTree
+extends BitmapDrawable
+   

[Libreoffice-commits] .: 2 commits - android/experimental

2012-06-28 Thread Iain Billett
 android/experimental/LibreOffice4Android/AndroidManifest.xml   
|1 
 android/experimental/LibreOffice4Android/res/layout/document_viewer.xml
|   27 
 android/experimental/LibreOffice4Android/res/layout/navigation_grid_item.xml   
|   16 
 android/experimental/LibreOffice4Android/res/values/styles.xml 
|2 
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
   |  359 +-
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |3 
 6 files changed, 398 insertions(+), 10 deletions(-)

New commits:
commit 06b935baa5696f90caedf51e4d3a0302350a446b
Author: Iain Billett 
Date:   Thu Jun 28 19:36:29 2012 +0100

First draft of "navigator", a strip of "live" thumbnails which are 
clickable.
Open method to open random page, not first.
Put some UI set up in documentLoadTask as the UI requires the number of 
pages in the document which is only know on load.

diff --git 
a/android/experimental/LibreOffice4Android/res/layout/document_viewer.xml 
b/android/experimental/LibreOffice4Android/res/layout/document_viewer.xml
index 2f84be9..fbb25c8 100644
--- a/android/experimental/LibreOffice4Android/res/layout/document_viewer.xml
+++ b/android/experimental/LibreOffice4Android/res/layout/document_viewer.xml
@@ -13,11 +13,13 @@
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
android:layout_alignBottom="@id/page_flipper"
+   android:scrollbarAlwaysDrawHorizontalTrack="true"
android:background="#aa00">



diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index 2c839a5..bd40040 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -95,7 +95,7 @@ public class DocumentLoader
 extends Activity
 {
 private static final String TAG = "DocumentLoader";
-
+
 // Size of a small virtual (bitmap) device used to find out page count and
 // page sizes
 private static final int SMALLSIZE = 128;
@@ -152,7 +152,7 @@ public class DocumentLoader
 flipper.setOutAnimation(outToLeft);
 
 flipper.showNext();
-
+
 ((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() + 
PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 + PAGECACHE_PLUSMINUS);
 return true;
 } else if (event2.getX() - event1.getX() > 120) {
@@ -523,7 +523,13 @@ public class DocumentLoader
 View thumbnailView;
 //PageState state = PageState.NONEXISTENT;
 Bitmap bm;
-
+final float scale;
+final int widthInPx;
+final int heightInPx;
+final int defaultWidthPx = 120;
+final int defaultHeightPx = 120;
+final int thumbnailPaddingDp = 10;
+   
 class ThumbLoadTask
 extends AsyncTask
 {
@@ -535,8 +541,8 @@ public class DocumentLoader
 return -1;
 
 //state = PageState.LOADING;
-ByteBuffer bb = renderPage( number , 120 , 120);
-bm = Bitmap.createBitmap( 120 , 120 , Bitmap.Config.ARGB_);
+ByteBuffer bb = renderPage( number , widthInPx , heightInPx);
+bm = Bitmap.createBitmap( widthInPx , heightInPx , 
Bitmap.Config.ARGB_);
 bm.copyPixelsFromBuffer(bb);
 
 return number;
@@ -552,7 +558,8 @@ public class DocumentLoader
 
ImageView thumbImage = new 
ImageView(DocumentLoader.this);//(ImageView)findViewById( R.id.thumbnail );
 thumbImage.setImageBitmap(bm);
-
+int paddingPx = (int) (thumbnailPaddingDp* scale + 0.5f);
+thumbImage.setPadding( paddingPx , 0 , paddingPx , 0 );
 thumbImage.setScaleY(-1);
 
Log.i( TAG, Integer.toString( 
thumbImage.getWidth() ) );
@@ -570,15 +577,31 @@ public class DocumentLoader
 if (number >= 0)
 waitView.setText("Page " + (number+1) + ", wait...");
 //state = PageState.NONEXISTENT;
-
 if (number >= 0) {
 new 
ThumbLoadTask().executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, number);
 }
 }
 
+ThumbnailView(int number , int widthInDp , int heightInDp)
+{
+super(DocumentLoader.this);
+scale = getContext().getResources().getDisplayMetrics().density;
+widthInPx = (

[Libreoffice-commits] .: 2 commits - android/experimental

2012-06-19 Thread Iain Billett
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png
  |binary
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png
  |binary
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png
  |binary
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
|9 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
|3 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
 |   73 +++
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |  193 +++---
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/ListItemAdapter.java
   |5 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/WriterViewerActivity.java
  |   23 -
 9 files changed, 231 insertions(+), 75 deletions(-)

New commits:
commit 5e380fbdcdebf762a07b0ec502a4d3c40190838d
Author: Iain Billett 
Date:   Tue Jun 19 16:20:34 2012 +0100

Added file sorting - alphabetical, by size, by last modified.

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png
new file mode 100644
index 000..3b34aaf
Binary files /dev/null and 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png
 differ
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png
new file mode 100644
index 000..ae138ed
Binary files /dev/null and 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png
 differ
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png
new file mode 100644
index 000..c5f6c97
Binary files /dev/null and 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png
 differ
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
index 14eabb3..a780f55 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
@@ -5,4 +5,13 @@
   android:showAsAction="always" />
 
+
+
+
 
\ No newline at end of file
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
index 7306683..3ff73f7 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
@@ -6,6 +6,9 @@
 Search
 List
 Grid
+Sort By Size
+Sort A-Z
+Sort by Date
 
 EVERYTHING
 DOCUMENTS
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
index 3b6bbf3..2e21dbe 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
@@ -3,6 +3,8 @@ package org.libreoffice.ui;
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
+import java.util.Arrays;
+import java.util.Comparator;
 
 public class FileUtilities {

@@ -11,6 +13,17 @@ public class FileUtilities {
static final int CALC = 1;
static final int IMPRESS = 2;

+   static final int SORT_AZ = 0;
+   static final int SORT_ZA = 1;
+   /** Oldest Files First*/
+   static final int SORT_OLDEST = 2;
+   /** Newest Files First*/
+   static final int SORT_NEWEST = 3;
+   /** Largest Files First */
+   static final int SORT_LARGEST = 4;
+   /** Smallest Files First */
+   static final int SORT_SMALLEST = 5;
+   
private static String[] fileExtensions = {".odt",".ods",".odp"};

s

[Libreoffice-commits] .: 2 commits - android/experimental Library_merged.mk offapi/com sal/inc toolkit/inc toolkit/Library_tk.mk toolkit/source touch/Library_libotouch.mk touch/source vcl/inc vcl/sour

2012-06-18 Thread Tor Lillqvist
 Library_merged.mk  
  |6 
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |   90 +++---
 offapi/com/sun/star/awt/XToolkit2.idl  
  |6 
 sal/inc/sal/ByteBufferWrapper.hxx  
  |   23 --
 toolkit/Library_tk.mk  
  |6 
 toolkit/inc/toolkit/awt/vclxtoolkit.hxx
  |2 
 toolkit/source/awt/vclxtoolkit.cxx 
  |7 
 touch/Library_libotouch.mk 
  |4 
 touch/source/android/android.cxx   
  |   34 +++
 touch/source/uno/Document.cxx  
  |2 
 vcl/inc/vcl/virdev.hxx 
  |2 
 vcl/source/gdi/virdev.cxx  
  |   17 -
 12 files changed, 140 insertions(+), 59 deletions(-)

New commits:
commit daaa550121a97d80e1ab43cbd5c73da6915e4ac4
Author: Tor Lillqvist 
Date:   Mon Jun 18 22:32:35 2012 +0300

Pass also scale and offset to createScreenCompatibleDeviceUsingBuffer()

Pass on to VirtualDevice where used to set the MapMode of the device
appropriately. Adapt DocumentLoader, use to scale the page rendering
to exactly fit the virtual device.

Change-Id: I4b0bc67e12114d3d9d493ff1aca2ef5d2cc78912

diff --git a/Library_merged.mk b/Library_merged.mk
index d689e42..49c90cf 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -75,6 +75,12 @@ $(eval $(call gb_Library_use_libraries,merged,\
 ))
 endif
 
+ifeq ($(OS),ANDROID)
+$(eval $(call gb_Library_use_libraries,merged,\
+   libotouch \
+))
+endif
+
 ifeq ($(OS),MACOSX)
 $(eval $(call gb_Library_use_libraries,merged,\
 objc \
diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index a458d02..412c57d 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -44,6 +44,7 @@ import android.widget.ViewFlipper;
 
 import com.polites.android.GestureImageView;
 
+import com.sun.star.awt.Size;
 import com.sun.star.awt.XBitmap;
 import com.sun.star.awt.XControl;
 import com.sun.star.awt.XDevice;
@@ -202,40 +203,75 @@ public class DocumentLoader
 
 ByteBuffer renderPage(int number)
 {
-ByteBuffer bb;
-
-bb = ByteBuffer.allocateDirect(1024*1024*4);
-long wrapped_bb = Bootstrap.new_byte_buffer_wrapper(bb);
-Log.i(TAG, "bb is " + bb);
-XDevice device = toolkit.createScreenCompatibleDeviceUsingBuffer(1024, 
1024, wrapped_bb);
+try {
+// A small device with no scale of offset just to find out the 
paper size of this page
 
-dumpUNOObject("device", device);
+ByteBuffer smallbb = ByteBuffer.allocateDirect(128*128*4);
+long wrapped_smallbb = Bootstrap.new_byte_buffer_wrapper(smallbb);
+XDevice device = 
toolkit.createScreenCompatibleDeviceUsingBuffer(128, 128, 1, 1, 0, 0, 
wrapped_smallbb);
 
-PropertyValue renderProps[] = new PropertyValue[3];
-renderProps[0] = new PropertyValue();
-renderProps[0].Name = "IsPrinter";
-renderProps[0].Value = new Boolean(true);
-renderProps[1] = new PropertyValue();
-renderProps[1].Name = "RenderDevice";
-renderProps[1].Value = device;
-renderProps[2] = new PropertyValue();
-renderProps[2].Name = "View";
-renderProps[2].Value = new MyXController();
+PropertyValue renderProps[] = new PropertyValue[3];
+renderProps[0] = new PropertyValue();
+renderProps[0].Name = "IsPrinter";
+renderProps[0].Value = new Boolean(true);
+renderProps[1] = new PropertyValue();
+renderProps[1].Name = "RenderDevice";
+renderProps[1].Value = device;
+renderProps[2] = new PropertyValue();
+renderProps[2].Name = "View";
+renderProps[2].Value = new MyXController();
 
-try {
+// getRenderer returns a set of properties that include the 
PageSize
 long t0 = System.currentTimeMillis();
-renderable.render(number, doc, renderProps);
+PropertyValue rendererProps[] = renderable.getRenderer(number, 
doc, renderProps);
 long t1 = System.currentTimeMillis();
+ 

[Libreoffice-commits] .: 2 commits - android/experimental

2012-06-15 Thread Tor Lillqvist
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 28cdc43f2d1622ca6a6c725c2c7fa276a6197b25
Author: Tor Lillqvist 
Date:   Fri Jun 15 13:50:56 2012 +0300

Make sure homeDirectory exists

Change-Id: I3a89bcac3bf46405e8e474f7765d74c643b7ab43

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index 2846779..f6d3775 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -59,6 +59,7 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe

 
 homeDirectory  = new 
File(Environment.getExternalStorageDirectory(),"LibreOffice");
+homeDirectory.mkdirs();
 Intent i = this.getIntent();
 if( i.hasExtra( currentDirectoryKey ) ){
//This isn't what I think it is. It's not a full path
commit 00320c71c1974716f67cb7be734a324017b8db3c
Author: Tor Lillqvist 
Date:   Fri Jun 15 13:50:16 2012 +0300

Bin two unneeded (and not found!?) imports

Change-Id: I4b2f716f4a40fe4be91e204d8c78dc8c5e6a439e

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index 6664467..2846779 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -13,8 +13,6 @@ import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Environment;
-import android.support.v4.*;
-import android.support.v4.app.FragmentActivity;
 import android.util.Log;
 import android.view.Menu;
 import android.view.MenuInflater;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental

2012-05-24 Thread Tor Lillqvist
 android/experimental/DocumentLoader/Makefile   
  |2 
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |   32 +++---
 2 files changed, 25 insertions(+), 9 deletions(-)

New commits:
commit 05f786fd2eb8056be946f6aadb21cdd61be8e226
Author: Tor Lillqvist 
Date:   Thu May 24 17:41:09 2012 +0300

More clueless test hacking

Change-Id: I2623625380b11f3d6bf720387504b23ccce529e1

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 3fdc453..975cd05 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -105,14 +105,14 @@ public class DocumentLoader
 // Load the wanted document(s)
 String[] inputs = input.split(":");
 for (int i = 0; i < inputs.length; i++) {
-com.sun.star.beans.PropertyValue propertyValues[] =
+com.sun.star.beans.PropertyValue loadProps[] =
 new com.sun.star.beans.PropertyValue[2];
-propertyValues[0] = new com.sun.star.beans.PropertyValue();
-propertyValues[0].Name = "Hidden";
-propertyValues[0].Value = new Boolean(true);
-propertyValues[1] = new com.sun.star.beans.PropertyValue();
-propertyValues[1].Name = "ReadOnly";
-propertyValues[1].Value = new Boolean(true);
+loadProps[0] = new com.sun.star.beans.PropertyValue();
+loadProps[0].Name = "Hidden";
+loadProps[0].Value = new Boolean(true);
+loadProps[1] = new com.sun.star.beans.PropertyValue();
+loadProps[1].Name = "ReadOnly";
+loadProps[1].Value = new Boolean(true);
 
 String sUrl = "file://" + inputs[i];
 
@@ -120,7 +120,7 @@ public class DocumentLoader
 
 Object oDoc =
 xCompLoader.loadComponentFromURL
-(sUrl, "_blank", 0, propertyValues);
+(sUrl, "_blank", 0, loadProps);
 Log.i(TAG, "oDoc is " + (oDoc!=null ? oDoc.toString() : 
"null"));
 
 com.sun.star.lang.XTypeProvider typeProvider = 
(com.sun.star.lang.XTypeProvider) 
UnoRuntime.queryInterface(com.sun.star.lang.XTypeProvider.class, oDoc);
@@ -134,6 +134,22 @@ public class DocumentLoader
 }
 }
 }
+
+com.sun.star.view.XRenderable renderBabe = 
(com.sun.star.view.XRenderable) 
UnoRuntime.queryInterface(com.sun.star.view.XRenderable.class, oDoc);
+Log.i(TAG, "renderBabe is " + (renderBabe!=null ? 
renderBabe.toString() : "null"));
+
+com.sun.star.beans.PropertyValue renderProps[] =
+new com.sun.star.beans.PropertyValue[1];
+renderProps[0] = new com.sun.star.beans.PropertyValue();
+renderProps[0].Name = "IsPrinter";
+renderProps[0].Value = new Boolean(true);
+//renderProps[1] = new com.sun.star.beans.PropertyValue();
+//renderProps[1].Name = "View";
+//renderProps[1].Value = no idea where to get an XController...
+
+Log.i(TAG, "getRendererCount: " + 
renderBabe.getRendererCount(oDoc, renderProps));
+
+renderBabe.render(0, oDoc, renderProps);
 }
 }
 catch (Exception e) {
commit 4ff08c21cead20c03e2bd12568ab7dc7d8403371
Author: Tor Lillqvist 
Date:   Thu May 24 17:40:30 2012 +0300

Don't bother with so many test docs

Change-Id: I725255224ae7a38d7a7843516b7ac979f79e0207

diff --git a/android/experimental/DocumentLoader/Makefile 
b/android/experimental/DocumentLoader/Makefile
index 63fefa7..3774680 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -261,7 +261,7 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
 
 run:
-   adb shell am start -n org.libreoffice.android.examples/.DocumentLoader 
-e input 
/assets/test1.odt:/assets/border.xls:/assets/test.odt:/assets/testVba.doc
+   adb shell am start -n org.libreoffice.android.examples/.DocumentLoader 
-e input /assets/test1.odt
 
 clean: properties
$(ANT) clean
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - android/experimental android/qa

2012-05-22 Thread Tor Lillqvist
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |   12 ++
 android/qa/desktop/Makefile
  |4 +--
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 1543df470360d2e64428536a26a5996becc412d2
Author: Tor Lillqvist 
Date:   Tue May 22 11:57:40 2012 +0300

Don't mention the same rdb files in both UNO_SERVICES and URE_MORE_SERVICES

Change-Id: Ieb6aea7d3683411ffcefc6c5e1e7facdef8ed105

diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 7a15bf5..8e9edae 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -51,7 +51,7 @@ buildrcs:
echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry 
module:$${BRAND_BASE_DIR}/share/registry/modules 
res:$${BRAND_BASE_DIR}/share/registry 
user:$${$$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/registrymodifications.xcu'
 >> assets/program/fundamentalrc
echo 
'URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway' >> 
assets/program/fundamentalrc
echo 'URE_MORE_TYPES=file:///assets/ure/share/misc/types.rdb 
file:///assets/program/types/types.rdb' >> assets/program/fundamentalrc
-   echo 'URE_MORE_SERVICES=file:///assets/ure/share/misc/services.rdb 
file:///assets/program/services/services.rdb 
<$$BRAND_BASE_DIR/program/services>*' >> assets/program/fundamentalrc
+   echo 'URE_MORE_SERVICES=file:///assets/program/services/services.rdb 
<$$BRAND_BASE_DIR/program/services>*' >> assets/program/fundamentalrc
echo 'BUNDLED_EXTENSIONS=$$BRAND_BASE_DIR/share/extensions' >> 
assets/program/fundamentalrc
echo 'BUNDLED_EXTENSIONS_PREREG=$$BRAND_BASE_DIR/share/prereg/bundled' 
>> assets/program/fundamentalrc
echo 
'BUNDLED_EXTENSIONS_USER=$${$$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/extensions/bundled'
 >> assets/program/fundamentalrc
@@ -69,7 +69,7 @@ buildrcs:
echo "[Bootstrap]" > assets/program/unorc
echo "URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> 
assets/program/unorc
echo 'UNO_TYPES=file:///assets/ure/share/misc/types.rdb 
file:///assets/program/types/types.rdb $${URE_MORE_TYPES}' >> 
assets/program/unorc
-   echo 'UNO_SERVICES=file:///assets/ure/share/misc/services.rdb 
file:///assets/program/services/services.rdb $${URE_MORE_SERVICES}' >> 
assets/program/unorc
+   echo 'UNO_SERVICES=file:///assets/ure/share/misc/services.rdb 
$${URE_MORE_SERVICES}' >> assets/program/unorc
 # bootstraprc ini ...
echo "[Bootstrap]" > assets/program/bootstraprc
echo "InstallMode=" >> assets/program/bootstraprc
commit b93300d91eff77376aac26ae0437df338cf91d1e
Author: Tor Lillqvist 
Date:   Tue May 22 10:08:52 2012 +0300

A bit more introspective debugging output...

Change-Id: Ibfafe0d6420ad59e12b9eed4847c89e57a18d679

diff --git 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 63ee569..3fdc453 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -122,6 +122,18 @@ public class DocumentLoader
 xCompLoader.loadComponentFromURL
 (sUrl, "_blank", 0, propertyValues);
 Log.i(TAG, "oDoc is " + (oDoc!=null ? oDoc.toString() : 
"null"));
+
+com.sun.star.lang.XTypeProvider typeProvider = 
(com.sun.star.lang.XTypeProvider) 
UnoRuntime.queryInterface(com.sun.star.lang.XTypeProvider.class, oDoc);
+Log.i(TAG, "typeProvider is " + (typeProvider!=null ? 
typeProvider.toString() : "null"));
+
+if (typeProvider != null) {
+com.sun.star.uno.Type[] types = typeProvider.getTypes();
+if (types != null) {
+for (com.sun.star.uno.Type t : types) {
+Log.i(TAG, "  " + t.getTypeName());
+}
+}
+}
 }
 }
 catch (Exception e) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits