[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 andr

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

2012-08-09 Thread Iain Billett
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 |  205 +++---
 1 file changed, 69 insertions(+), 136 deletions(-)

New commits:
commit 9031cd89e35be17fb4e6150f5100defca36dfafc
Author: Iain Billett 
Date:   Fri Aug 10 01:17:23 2012 +0100

Some minor bug fixes and code clean-up.

Change-Id: I857407ac46ce51be5ee3eab26e9af75afc612a41

diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index b7a41ad..edfb13b 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -160,7 +160,6 @@ public class DocumentLoader
 flipper.setOutAnimation(outToLeft);
 
 documentViewer.nextPage();
-//((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) {
 if (((PageViewer)flipper.getCurrentView()).currentPageNumber 
== 0)
@@ -177,9 +176,6 @@ public class DocumentLoader
 flipper.setOutAnimation(outToRight);
 
 documentViewer.prevPage();
-
-//((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() 
+ PAGECACHE_SIZE - PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 - PAGECACHE_PLUSMINUS);
-
 return true;
 }
 return false;
@@ -670,7 +666,6 @@ public class DocumentLoader
 progressView = new ProgressBar( DocumentLoader.this, null, 
android.R.attr.progressBarStyleHorizontal);
 progressView.setProgress( 10 );
 
-//flipper = new ViewFlipper(DocumentLoader.this);
 ViewFlipper flipper = (ViewFlipper)findViewById( R.id.page_flipper 
);
 flipper.addView( waitView , 0 , matchParent);
 flipper.showNext();
@@ -752,30 +747,10 @@ public class DocumentLoader
 Log.i(TAG, "onPostExecute: " + result);
 if (result == -1)
 return;
-//flipper = new ViewFlipper(this);
-//flipper = (ViewFlipper)findViewById( R.id.page_flipper );
-//matchParent = new 
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 
ViewGroup.LayoutParams.MATCH_PARENT);
-//flipper.removeViewAt( 0 );
 documentViewer = new DocumentViewer( (ViewFlipper)findViewById( 
R.id.page_flipper ) );
-//documentViewer.open(0);
-
-//currentPage = 0;
-//openPageWithPrefetching( currentPage );
-
-/*
-//open method? set current page = 0?
-flipper.addView(new PageViewer(0), 0, matchParent);
-for (int i = 0; i < PAGECACHE_PLUSMINUS; i++)
-flipper.addView(new PageViewer(i+1), i+1, matchParent);
-for (int i = 0; i < PAGECACHE_PLUSMINUS; i++)
-flipper.addView(new PageViewer(-1), PAGECACHE_PLUSMINUS + i+1, 
matchParent);
-  */  
 ll = (LinearLayout)findViewById( R.id.navigator);
 inflater = (LayoutInflater) 
getApplicationContext().getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
-
-   
-   
for( int i = 0; i < result.intValue() ; i++ ){
ThumbnailView thumb = new ThumbnailView( i , 
(int)(120.0f / Math.sqrt(2) ) , 120 );
final int pos = i;
@@ -783,9 +758,6 @@ public class DocumentLoader

@Override
public void onClick(View v) {
-   // TODO Auto-generated method 
stub
-   Log.d("nav" , Integer.toString( 
pos ) );
-//openPageWithPrefetching( pos );
 documentViewer.open( pos );
}
});
@@ -799,11 +771,9 @@ public class DocumentLoader
 private String TAG = "DocumentViewer";
 private int currentPage;
 private ViewFlipper viewFlipper;
-//int pageCount;
 private int lastPage;
 private final int firstPage = 0;
-private final int CACHE_PLUSMINUS = 2;
-private final int CACHE_SIZE = 2*CACHE_PLUSMINUS + 1;
+private final int CACHE_SIZE = 5;
 private ViewGroup.LayoutParams matchParent = new 
ViewGroup.LayoutParams(
  

[Libreoffice-commits] Changes to 'feature/android'

2012-08-07 Thread Iain Billett
New branch 'feature/android' available with the following commits:
commit ecb2e0f1672e754633510517227530794384bd57
Author: Iain Billett 
Date:   Mon Aug 6 14:38:44 2012 +0100

Fixed problems after rebse.

Change-Id: I7fa1dedd33e3ef59a99112e4ddc73e9ac38e7752

commit eb248b4b89b3c4e3838cd4e93559dbb169e8c1ec
Author: Iain Billett 
Date:   Thu Aug 2 17:47:48 2012 +0100

Quick fix for upside down thumbnails.

Change-Id: I089c78f050fbea068b394de9205322dc62e28764

commit 7ff8f47c838eddec805e7c0627c93c1bf3dec944
Author: Iain Billett 
Date:   Tue Jul 31 18:01:47 2012 +0100

Async loading of thumbnails.

Change-Id: I385f5fce8b332b2b9eaa5e6c4dc58516f4cfa9b8

commit 408425b8609f1d06a50f8da99374d79a41496bd2
Author: Iain Billett 
Date:   Mon Jul 30 17:11:43 2012 +0100

Changed folder icon to show thumbnails of docs within folder.

Change-Id: I8ec061a3daafef733b8786c34269165697c2b443

commit 25b27e4d9ce3e78dd36d54bb6760880a08067fff
Author: Iain Billett 
Date:   Wed Jul 25 17:43:54 2012 +0100

Added methods to check if a file has a thumbnail.

Change-Id: I362ff20d8768be1dffbf857e442fbc30822079a7

commit 638bdabb9166924aeeff3242d2d05f742ee28ba2
Author: Iain Billett 
Date:   Sat Jul 21 16:42:38 2012 +0100

Added Actionbar-sherlock lib & added dark striped actionbar with Holo.light

commit cee0dd856b692c4c25845c250b22df0dbd5bceea
Author: Iain Billett 
Date:   Fri Jul 13 16:38:25 2012 +0100

Some work on styling. Fix filter exception.

Change-Id: Ibf03680a29a0e7d5a484fedfa25863e88e063581

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Today

2012-08-07 Thread Iain Billett
On Tue, Aug 7, 2012 at 12:44 PM, Michael Meeks wrote:

> Hi Iain,
>
> On Tue, 2012-08-07 at 12:36 +0100, Iain Billett wrote:
> > When you run update it opens that tool and just automatically selects
> > certain packages you neeed. When I ran it those tool packages were
> > installed. The only thing I don't have is the Jelly Bean SDKs... I
> > doubt that's the problem but I'll need them in the future anyway.
>
> I ran ./android - selected the sdk at the top in the tree in the
> Tools
> section - AFAIR this thing is not selected or updated automatically. You
> have to select it manually, do the update, and then re-start (with some
> cd `pwd` in between).
>

Just so we're clear you're talking about the tree
Tools
Android SDK Tools R 20.0.1
Android SDK PlatformTools R 14
?
Because I have both installed...


>
> > Also, I gave up on Eclipse completely about 4/5 weeks ago as it has a
> > bug such that you can't replace tabs with spaces automatically so
> > isn't even good for writing code...
>
> Oh - that's annoying; presumably a little sed script could help
> with
> that after editing and before committing :-)
>

I though about doing something like that but it wasn't really worth it. I
switched to TextWrangler which is working out OK. I still use Eclipse when
I need to do any filtering of Logcat output, though.



> It was quite odd to see my work nicely indenting & mostly
> re-writing
> FileUtilities.java appear again re-(not)indented ;-)


*ahem* Sorry about that.

Iain
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Today

2012-08-07 Thread Iain Billett
When you run update it opens that tool and just automatically selects
certain packages you neeed. When I ran it those tool packages were
installed. The only thing I don't have is the Jelly Bean SDKs... I doubt
that's the problem but I'll need them in the future anyway.

Also, I gave up on Eclipse completely about 4/5 weeks ago as it has a bug
such that you can't replace tabs with spaces automatically so isn't even
good for writing code...

On Tue, Aug 7, 2012 at 5:54 AM, Tor Lillqvist  wrote:

> > I ran an "android update sdk" but it made no difference but there must be
> > something I'm missing
>
> Try running it just interactively "android" and see if it offers an
> update then.  (I have "Android SDK Tools" Rev 20, "Android SDK
> Platform-tools" Rev 12. I guess the xml files are part of either of
> those?
>
> (Are these build.xml etc files used by Ant, and Eclipse runs Ant then
> to do the actual build? Or are the same files used by both? Or do you
> don't use Eclipse for building, just coding and debugging? I
> definitely could do with some hands-on tutoring on how to use Eclipse,
> I find it quite confusing and hard to use...)
>
> --tml
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Today

2012-08-06 Thread Iain Billett
I ran an "android update sdk" but it made no difference but there must be
something I'm missing

On Mon, Aug 6, 2012 at 4:27 PM, Michael Meeks wrote:

>
> On Mon, 2012-08-06 at 16:21 +0100, Iain Billett wrote:
> > Trying to work this out:
>
> >
> /LibreOfficeDev/gsoc/android/experimental/LibreOffice4Android/build.xml:89:
> The following error occurred while executing this line:
> >
> /LibreOfficeDev/gsoc/android/experimental/LibreOffice4Android/build.xml:105:
> aapt doesn't support the "projectLibrariesPackageName" attribute
>
> That means you need to update your Android SDK to the latest
> version.
> At least, if you have pulled up to master as of ~today. We clobber the
> built-in rules (which have changed) in a different way.
>
> Looking forward to seeing your updates ! :-)
>
> ATB,
>
> Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Today

2012-08-06 Thread Iain Billett
Trying to work this out:

/LibreOfficeDev/gsoc/android/experimental/LibreOffice4Android/build.xml:89:
The following error occurred while executing this line:
/LibreOfficeDev/gsoc/android/experimental/LibreOffice4Android/build.xml:105:
aapt doesn't support the "projectLibrariesPackageName" attribute

I'm going to take a break from it.

On Mon, Aug 6, 2012 at 2:09 PM, Tor Lillqvist  wrote:

> > I'll be in a
> > position to push soon, albeit with the document viewer activity
> navigation
> > code broken (Should I still proceed?).
>
> Go ahead, I think...
>
> --tml
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Today

2012-08-06 Thread Iain Billett
Hi,

I did a successful rebase of my new code onto my old code ( Not sure if
that's the right way of phrasing it) on test branches so I'll be in a
position to push soon, albeit with the document viewer activity navigation
code broken (Should I still proceed?).

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Styling.

2012-07-30 Thread Iain Billett
Hi,

After a bit of struggling I now have the styling somewhere close to the
designers' spec. I've attached a screenshot for convenience.

I'm working on several things. Firstly, the thumbnails should be the right
way up. I'm going to investigate optimising the layouts for different
screen sizes. It'd be nice to have some drop shadow around the thumbnails,
too. Finally, we need a way of loading the thumbnails without going into
the document. I think that updating the thumbnails on closing the documents
makes sense but we need a way to generate thumbnails for new docs. I tried
for several days to do this but it frustrated me. I think I'm close now, if
the fix I have in mind works it should be done/ mostly done tomorrow.

All the best,

Iain.
<>___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: android/experimental

2012-07-11 Thread Iain Billett
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 |  234 +++---
 1 file changed, 183 insertions(+), 51 deletions(-)

New commits:
commit df82184b2a247a8e6a670522ff70af5af038e8a8
Author: Iain Billett 
Date:   Wed Jul 11 19:56:54 2012 +0100

Added DocumentViewer class to hide page navigation/caching details.

Change-Id: Ic201bea9c22bc567d6769201df260aa2a38c6c16

diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index 6ca7c9d..487fc7e 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -127,6 +127,8 @@ public class DocumentLoader
 
 ViewFlipper flipper;
 
+DocumentViewer documentViewer;
+
 Bundle extras;
 
 LinearLayout ll ;
@@ -156,8 +158,8 @@ public class DocumentLoader
 outToLeft.setDuration(500);
 flipper.setOutAnimation(outToLeft);
 
-flipper.showNext();
-((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() + 
PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 + PAGECACHE_PLUSMINUS);
+documentViewer.nextPage();
+//((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) {
 if (((PageViewer)flipper.getCurrentView()).currentPageNumber 
== 0)
@@ -173,9 +175,9 @@ public class DocumentLoader
 outToRight.setDuration(500);
 flipper.setOutAnimation(outToRight);
 
-flipper.showPrevious();
+documentViewer.prevPage();
 
-((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() + 
PAGECACHE_SIZE - PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 - PAGECACHE_PLUSMINUS);
+//((PageViewer)flipper.getChildAt((flipper.getDisplayedChild() 
+ PAGECACHE_SIZE - PAGECACHE_PLUSMINUS) % 
PAGECACHE_SIZE)).display(((PageViewer)flipper.getCurrentView()).currentPageNumber
 - PAGECACHE_PLUSMINUS);
 
 return true;
 }
@@ -276,7 +278,7 @@ public class DocumentLoader
 try {
 // Use dummySmallDevice with no scale of offset just to find out
 // the paper size of this page.
-
+Log.i( TAG , "Render( " + Integer.toString( number ) + " )");
 PropertyValue renderProps[] = new PropertyValue[3];
 renderProps[0] = new PropertyValue();
 renderProps[0].Name = "IsPrinter";
@@ -448,12 +450,16 @@ public class DocumentLoader
 TextView waitView;
 PageState state = PageState.NONEXISTENT;
 Bitmap bm;
+static final String TAG = "PAGE_VIEWER";
+int width ;
+int height;
 
 class PageLoadTask
 extends AsyncTask
 {
 protected Integer doInBackground(Integer... params)
 {
+Log.i( PageViewer.TAG, "doInBackground: page " + 
params[0].toString() );
 int number = params[0];
 
 if (number >= pageCount)
@@ -461,8 +467,8 @@ public class DocumentLoader
 
 state = PageState.LOADING;
 currentPageNumber = number;
-ByteBuffer bb = renderPage(currentPageNumber);
-bm = Bitmap.createBitmap(flipper.getWidth(), 
flipper.getHeight(), Bitmap.Config.ARGB_);
+ByteBuffer bb = renderPage(currentPageNumber , params[1] , 
params[2]);//
+bm = Bitmap.createBitmap( width, height, 
Bitmap.Config.ARGB_);
 bm.copyPixelsFromBuffer(bb);
 
 return currentPageNumber;
@@ -470,7 +476,7 @@ public class DocumentLoader
 
 protected void onPostExecute(Integer result)
 {
-Log.i(TAG, "onPostExecute: " + result);
+Log.i(PageViewer.TAG, "onPostExecute: " + result);
 if (result == -1)
 return;
 
@@ -489,22 +495,27 @@ public class DocumentLoader
 
 void display(int number)
 {
-Log.i(TAG, "PageViewer display(" + number + ")");
+Log.i(this.TAG, "PageViewer display(" + number + ")");
+Log.i(this.TAG, "IF");
 if (number >= 0){
 waitView = new TextView(DocumentLoader.this);
 waitView.setText(&q

[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(DocumentLo

[Libreoffice-commits] .: android/experimental

2012-06-25 Thread Iain Billett
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
  |   15 
 android/experimental/LibreOffice4Android/AndroidManifest.xml   
   |4 
 android/experimental/LibreOffice4Android/Makefile  
   |2 
 android/experimental/LibreOffice4Android/fonts.conf
   |2 
 android/experimental/LibreOffice4Android/res/values/styles.xml 
   |   12 
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
  |  596 ++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/examples/DocumentLoader.java
 |  596 --
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
|2 
 8 files changed, 613 insertions(+), 616 deletions(-)

New commits:
commit 478465f21696230133bbf6c986f236d210504c5a
Author: Iain Billett 
Date:   Mon Jun 25 14:25:00 2012 +0100

Fixed some erroneous package references.

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 ec3855f..daf42d9 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -622,21 +622,6 @@ public class DocumentLoader
 {
 return gestureDetector.onTouchEvent(event);
 }
-
-@Override
-   public boolean onOptionsItemSelected(MenuItem item) {
-   switch (item.getItemId()) {
-   case android.R.id.home:
-   // app icon in action bar clicked; go home
-   Intent intent = new Intent(this, 
LibreOfficeUIActivity.class);
-   intent.putExtras( extras );
-   //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-   startActivity(intent);
-   return true;
-   default:
-   return super.onOptionsItemSelected(item);
-   }
-   }
 }
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/android/experimental/LibreOffice4Android/AndroidManifest.xml 
b/android/experimental/LibreOffice4Android/AndroidManifest.xml
index f521536..fcf6210 100644
--- a/android/experimental/LibreOffice4Android/AndroidManifest.xml
+++ b/android/experimental/LibreOffice4Android/AndroidManifest.xml
@@ -14,8 +14,8 @@
 android:theme="@android:style/Theme.Holo.Light">
 
  
-
 
-   
/data/data/org.libreoffice.android.examples/fontconfig
+   /data/data/org.libreoffice/fontconfig
 

 

[Libreoffice-commits] .: android/experimental

2012-06-22 Thread Iain Billett
 
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
 |   19 ++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
   |4 +-
 2 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit a84eb85c3575d5b6f79717904b6d55848bc2e84c
Author: Iain Billett 
Date:   Fri Jun 22 21:27:36 2012 +0100

Fixed file opening.

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 cf042a4..50e8a06 100644
--- 
a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ 
b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -102,6 +102,8 @@ public class DocumentLoader
 ViewGroup.LayoutParams matchParent;
 
 ViewFlipper flipper;
+
+Bundle extras;
 
 class GestureListener
 extends GestureDetector.SimpleOnGestureListener
@@ -510,6 +512,8 @@ public class DocumentLoader
 {
 super.onCreate(savedInstanceState);
 
+   extras = getIntent().getExtras();
+
 gestureDetector = new GestureDetector(this, new GestureListener());
 
 try {
@@ -591,6 +595,21 @@ public class DocumentLoader
 {
 return gestureDetector.onTouchEvent(event);
 }
+
+@Override
+   public boolean onOptionsItemSelected(MenuItem item) {
+   switch (item.getItemId()) {
+   case android.R.id.home:
+   // app icon in action bar clicked; go home
+   Intent intent = new Intent(this, 
LibreOfficeUIActivity.class);
+   intent.putExtras( extras );
+   //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+   startActivity(intent);
+   return true;
+   default:
+   return super.onOptionsItemSelected(item);
+   }
+   }
 }
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index bdf2c53..0f31f19 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -167,7 +167,9 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
i.putExtra( EXPLORER_VIEW_TYPE_KEY  , viewMode );
startActivity( i );
*/
-   startActivity( new Intent( this , DocumentLoader.class ) );
+   Intent i = new Intent( this , DocumentLoader.class );
+   i.putExtra("input",new File( currentDirectory , file).getAbsolutePath() 
);
+   startActivity( i );
 }
 
 @Override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: android/experimental

2012-06-22 Thread Iain Billett
 android/experimental/LibreOffice4Android/proguard-project.txt  
|   20 ++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/FileUtilities.java
 |2 +
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
   |2 +
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |6 +++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/ListItemAdapter.java
   |2 +
 android/experimental/LibreOffice4Android/src/org/libreoffice/ui/PageView.java  
|2 +
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/PreferenceEditor.java
  |2 +
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/WriterViewerActivity.java
  |2 +
 8 files changed, 38 insertions(+)

New commits:
commit 3e0c6d83d5b089c853154b5d03fcf33e5403520c
Author: Iain Billett 
Date:   Fri Jun 22 18:15:21 2012 +0100

LibreOffice4Android now builds.

diff --git a/android/experimental/LibreOffice4Android/proguard-project.txt 
b/android/experimental/LibreOffice4Android/proguard-project.txt
new file mode 100644
index 000..f2fe155
--- /dev/null
+++ b/android/experimental/LibreOffice4Android/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/FileUtilities.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/FileUtilities.java
index 2e21dbe..2195caf 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/FileUtilities.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/FileUtilities.java
@@ -1,5 +1,7 @@
 package org.libreoffice.ui;
 
+import org.libreoffice.R;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
index 9585705..46e 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/GridItemAdapter.java
@@ -1,5 +1,7 @@
 package org.libreoffice.ui;
 
+import org.libreoffice.R;
+
 import java.io.File;
 
 import android.content.Context;
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index d1e46a9..abcdac7 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -1,5 +1,8 @@
 package org.libreoffice.ui;
 
+import org.libreoffice.R;
+//import org.libreoffice.android.examples.DocumentLoader;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
@@ -157,11 +160,14 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
 }
 
 public void open(String file){
+   
Intent i = new Intent( this , WriterViewerActivity.class );
i.putExtra( CURRENT_DIRECTORY_KEY , currentDirectory.getAbsolutePath() 
);
i.putExtra( FILTER_MODE_KEY  , filterMode );
i.putExtra( EXPLORER_VIEW_TYPE_KEY  , viewMode );
startActivity( i );
+   
+   //startActivity( new Intent( this , 
org.libreoffice.android.examples.DocumentLoader ) );
 }
 
 @Override
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/ListItemAdapter.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/ListItemAdapter.java
index 1e66e3a..edfdbd2 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/ListItemAdapter.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/ListItemAdapter.java
@@ -1,5 +1,7 @@
 package org.libreoffice.ui;
 
+import org.libreoffice.R;
+
 import java.io.File;
 import java.text.SimpleDateFormat;
 import java.util.Date;
diff

[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 = {"

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

2012-06-15 Thread Iain Billett
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml
|4 -
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
 |   19 ++---
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |   33 ++
 3 files changed, 33 insertions(+), 23 deletions(-)

New commits:
commit 907ad314fb05a06cfeb233bd4265a461e7a5e0e5
Author: Iain Billett 
Date:   Fri Jun 15 23:18:39 2012 +0100

Some UI tweeks - trying to get long filenames to display nicely.

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml
index a53bc1b..ce42e57 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml
@@ -21,7 +21,9 @@
 android:paddingLeft="10dp"
 android:paddingRight="10dp"
 android:layout_gravity="center"
-android:textSize="15dp" >
+android:textSize="15dp" 
+android:textStyle="bold"
+android:maxLines="2">
 
 
 
\ No newline at end of file
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
index 1a424ee..0bff445 100644
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
@@ -12,31 +12,30 @@
 
+   android:orientation="horizontal">




 
\ No newline at end of file
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 7b178f1..330ffc5 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
@@ -74,11 +74,17 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
 
 homeDirectory  = new 
File(Environment.getExternalStorageDirectory(),"LibreOffice");
 homeDirectory.mkdirs();
+currentDirectory = homeDirectory;
 Intent i = this.getIntent();
 if( i.hasExtra( currentDirectoryKey ) ){
currentDirectory = new File( i.getStringExtra( 
currentDirectoryKey ) );
 }else{
-   currentDirectory = homeDirectory;
+   if( savedInstanceState != null){
+   if( savedInstanceState.getString( currentDirectoryKey ) 
!= null ){
+   currentDirectory = new File( 
+   savedInstanceState.getString( 
currentDirectoryKey ) );
+   }
+   }
 }
 
 if( i.hasExtra( filterModeKey ) ){
@@ -88,7 +94,7 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
 actionBar.setDisplayHomeAsUpEnabled(true);
 }
 
-   
+//createDummyFileSystem();
 createUI();

 }
@@ -251,6 +257,7 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
File regularDirectory = new File( 
currentDirectory , "Folder" );
regularDirectory.mkdir();
new File( regularDirectory , 
"yetAnotherDoc.odt" ).createNewFile();
+   new File( regularDirectory , "some really long 
file name.ods" ).createNewFile();
File anotherRegularDirectory = new File( 
regularDirectory , "AnotherFolder" );
anotherRegularDirectory.mkdir();
new File( anotherRegularDirectory , 
"yetAnotherDoc2.odt" ).createNewFile();
@@ -293,7 +300,8 @@ public class LibreOfficeUIActivity extends Activity 
implements OnNavigationListe
openDirectory( currentDirectory );// Uses filter mode 
return true;
}
-   class ListItemAdapter implements ListAdapter{
+   
+class ListItemAdapter implements ListAdapter{
private Context mContext;
    private Fil

Re: Status Update

2012-06-15 Thread Iain Billett
Quick update, pushed a list view for the file explorer. Next, I plan to
work on styling the UI to bring it in line with the designer's suggestions
and also a bit of cleaning / commenting of the code.

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: android/experimental

2012-06-15 Thread Iain Billett
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml
  |   13 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
 |   42 +
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml
|5 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
|2 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |  279 --
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/ListItemAdapter.java
   |  156 +
 6 files changed, 450 insertions(+), 47 deletions(-)

New commits:
commit 43103840303f9e18ff013ac6cbb5cfa4eb9cdf9a
Author: Iain Billett 
Date:   Fri Jun 15 16:10:37 2012 +0100

Added a list view to the Android UI.

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml
new file mode 100644
index 000..6ef0255
--- /dev/null
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml
@@ -0,0 +1,13 @@
+
+http://schemas.android.com/apk/res/android";
+android:layout_width="match_parent"
+android:layout_height="match_parent"
+android:orientation="vertical" >
+
+
+
+
\ No newline at end of file
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
new file mode 100644
index 000..1a424ee
--- /dev/null
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml
@@ -0,0 +1,42 @@
+
+http://schemas.android.com/apk/res/android";
+android:layout_width="match_parent"
+android:layout_height="48dp"
+android:orientation="horizontal" >
+
+
+   
+   
+   
+   
+
\ No newline at end of file
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 71d04d6..14eabb3 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
@@ -2,6 +2,7 @@
 http://schemas.android.com/apk/res/android";>
 
+  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 71466de..7306683 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
@@ -4,6 +4,8 @@
 Hello World, LibreOfficeUIActivity!
 LibreOfficeUI
 Search
+List
+Grid
 
 EVERYTHING
 DOCUMENTS
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 f6d3775..633044e 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
@@ -4,30 +4,35 @@ import java.io.File;
 import java.io.FileFilter;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 
 import android.app.ActionBar;
 import android.app.ActionBar.OnNavigationListener;
 import android.app.Activity;
-import android.app.ListActivity;
 import android.content.Context;
 import android.content.Intent;
+import android.content.SharedPreferences;
+import android.database.DataSetObserver;
 import android.os.Bundle;
 import android.os.Environment;
 import android.util.Log;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.View.OnClickListener;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.ArrayAdapter;
-import android.widget.BaseAdapter;
 import android.widget.GridView;
+import android.widget.ImageView;
+import android.widget.ListAdapter;
 impor

Re: Status Update

2012-06-14 Thread Iain Billett
Hi, quick update,

pushed some more work on the file explorer. Next items on my agenda are a.)
a list view, the ability to switch between them (temporary) & set default
(persistent). b.)  Bring doc viewer action bar in line with what the
designers suggest (hidden by default then transparent overlay - the API
convers these options) & add hooks for touch events, etc.

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: android/experimental

2012-06-14 Thread Iain Billett
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer.xml
  |   20 --
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml
  |   20 ++
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml
|6 
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
 |   88 +
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/GridItemAdapter.java
   |   12 -
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |   92 +++---
 
android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/WriterViewerActivity.java
  |   16 +
 7 files changed, 203 insertions(+), 51 deletions(-)

New commits:
commit 06a5ea83858607e8ca4e628b2ac5ef0267335983
Author: Iain Billett 
Date:   Thu Jun 14 17:33:16 2012 +0100

More work on the file explorer. Added file type filtering. Maintains state 
if user switches to viewer and back.

diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer.xml
deleted file mode 100644
index 1e241c0..000
--- 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-http://schemas.android.com/apk/res/android";
-android:layout_width="match_parent"
-android:layout_height="match_parent"
-android:orientation="vertical" >
-
-
-
-   
-   
-
\ No newline at end of file
diff --git 
a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml
 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml
new file mode 100644
index 000..1e241c0
--- /dev/null
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml
@@ -0,0 +1,20 @@
+
+http://schemas.android.com/apk/res/android";
+android:layout_width="match_parent"
+android:layout_height="match_parent"
+android:orientation="vertical" >
+
+
+
+   
+   
+
\ 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 1dfa489..71466de 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
@@ -4,5 +4,11 @@
 Hello World, LibreOfficeUIActivity!
 LibreOfficeUI
 Search
+
+EVERYTHING
+DOCUMENTS
+SPREADSHEETS
+PRESENTATIONS
+
 
 
\ No newline at end of file
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
new file mode 100644
index 000..3b6bbf3
--- /dev/null
+++ 
b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java
@@ -0,0 +1,88 @@
+package org.libreoffice.ui;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FilenameFilter;
+
+public class FileUtilities {
+   
+   static final int ALL = -1;
+   static final int DOC = 0;
+   static final int CALC = 1;
+   static final int IMPRESS = 2;
+   
+   private static String[] fileExtensions = {".odt",".ods",".odp"};
+   
+   static boolean isDoc(String filename){
+   if( filename.endsWith( fileExtensions[ DOC ] ) ){
+   return true;
+   }
+   return false;
+   }
+   
+   static boolean isCalc(String filename){
+   if( filename.endsWith( fileExtensions[ CALC ] ) ){
+   return true;
+   }
+   return false;
+   }
+   
+   static boolean isImpress(String filename){
+   if( filename.endsWith( fileExtensions[ IMPRESS ] ) ){
+   return true;
+   }
+   return false;
+   }
+   
+   static FileFilter getFileFilter(int mode){
+   if( mode != ALL){
+   final String ext = fileExtensions[ mode ];
+   return new FileFilter() {
+   
+   public boolean accept(File pathname) {
+   

Pushing Updates

2012-06-13 Thread Iain Billett
Hi,

I want to commit some code I've written. Is it ok if I make a subdirectory
in android/experimental/ and push to master or should I make a branch? I'm
not quite sure what the protocol is.

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: DocumentLoader Error

2012-06-13 Thread Iain Billett
This was solved with a make uninstall. Seems like it was simply not
updating on re-install, or something.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Status Update

2012-06-13 Thread Iain Billett
Hi,

Today, I've fixed a bug on my android file explorer where items not
initially shown in the grid ( out of view ) where not initialised properly.
I also intend to make navigation more robust by allowing the file explorer
remember it's state after the application switches to a document viewer
activity and then back (Should be simple). Also, I intend to hook up the
OpenGL based document viewer rather than the custom component I had
written. Also, I need to sort out a strange runtime exception
DocumentLoader so I can start to integrate that code.

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


DocumentLoader Error

2012-06-13 Thread Iain Billett
Hi,

I'm having a problem with DocumentLoader. It builds and installs fine but
it can't open the rc asset files saying they are compressed. Here are the
errors:

E/lo-bootstrap(32001): lo_apkentry: File assets/program/unorc is compressed
E/lo-bootstrap(32001): lo_apkentry: File assets/rc is compressed
W/System.err(32001): com.sun.star.uno.RuntimeException: Cannot obtain
UNO_TYPES from uno ini
W/System.err(32001): at
com.sun.star.comp.helper.Bootstrap.cppuhelper_bootstrap(Native Method)
W/System.err(32001): at
com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext(Bootstrap.java:206)
W/System.err(32001): at
com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext(Bootstrap.java:171)
W/System.err(32001): at
org.libreoffice.android.examples.DocumentLoader.onCreate(DocumentLoader.java:176)
W/System.err(32001): at
android.app.Activity.performCreate(Activity.java:4465)
W/System.err(32001): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
W/System.err(32001): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
W/System.err(32001): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
W/System.err(32001): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
W/System.err(32001): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
W/System.err(32001): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(32001): at android.os.Looper.loop(Looper.java:137)
W/System.err(32001): at
android.app.ActivityThread.main(ActivityThread.java:4424)
W/System.err(32001): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(32001): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(32001): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/System.err(32001): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/System.err(32001): at dalvik.system.NativeStart.main(Native Method)

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Draft document-rendering tiling API to be called from viewer apps

2012-06-06 Thread Iain Billett
>
> >IMHO the decision to render just squares prolly complicates the
> > situation un-necessarily.
>
> Sure, but on the other hand it makes it simpler in that we don't need
> to figure out the aspect ratio of each page (they can be different)
> beforehand.
>
> BTW, I didn't mention in the IDL, but I did think that the not only
> would it be a square, but also the side of the square would be a
> power-of-two. Presumably you also want power-of-two for each side?
>

I haven't experimented but I've heard that not using power-of-two lengths
is seriously detrimental to performance. Considering we'll be using lots of
resources to begin I think we should make every reasonable optimisation .
Also, in this arrangement, It would be nice to have the dimensions of the
"document" area of the texture. Then if the rest of the bitmap is fully
transparent and the plane is too we can render a "page" alone and keep
track of dimensions.

My main concern with all this is in fact dealing with user interaction i.e.
mapping measurements in pixels to OpenGL coordinates. This is more of a
problem for editing, though.

Also, are we intending to have continuous scroll documents ( with all the
pages available via scroll - like most desktop applications ) or would we
be happy to have users flick (or otherwise) through pages. I think the
latter would make it easier to manage resources for large documents.

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Wasted a day on an Android bug...

2012-06-05 Thread Iain Billett
Just a quick update of where I'm at. I've implemented an OpenGL graphics
surface and can render a resource bitmap onto a plane. I've also got
pinch-to-zoom and scrolling the "document" working but that still needs
some work. What I'm doing now is to combine this code with DocumentLoader
to render actual LibreOffice documents. I'll also work on incorporating
this with the general app UI stuff I wrote at the beginning.

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-28 Thread Iain Billett
>
> Please, post the actual error messages (the earliest one(s).
>

There are 15 errors, here are the first few as they are all similar:

/LibreOfficeDev/lo-android/solver/unxmacxi.pro/inc/rtl/string.hxx:257:13:
error: cannot use 'throw' with exceptions disabled
throw std::bad_alloc();
^
/LibreOfficeDev/lo-android/solver/unxmacxi.pro/inc/rtl/ustring.hxx:292:13:
error: cannot use 'throw' with exceptions disabled
throw std::bad_alloc();
^
/LibreOfficeDev/lo-android/solver/unxmacxi.pro/inc/rtl/ustring.hxx:322:13:
error: cannot use 'throw' with exceptions disabled
throw std::bad_alloc();
^
/LibreOfficeDev/lo-android/solver/unxmacxi.pro/inc/rtl/ustring.hxx:1742:13:
error: cannot use 'throw' with exceptions disabled
throw std::bad_alloc();
^
/LibreOfficeDev/lo-android/solver/unxmacxi.pro/inc/rtl/ustring.hxx:1785:13:
error: cannot use 'throw' with exceptions disabled
throw std::bad_alloc();
^
/LibreOfficeDev/lo-android/solver/
unxmacxi.pro/inc/com/sun/star/uno/Any.hxx:561:9: error: cannot use 'throw'
with exceptions disabled
throw RuntimeException(
^
/LibreOfficeDev/lo-android/solver/
unxmacxi.pro/inc/com/sun/star/uno/genfunc.hxx:63:9: error: cannot use 'try'
with exceptions disabled
try
^

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-28 Thread Iain Billett
Hi,

I'm still stuck here (Trying to cross compile for android). I've spent days
on it. The errors occur in shell because there are 'throws' statements in
some header files in solver and exceptions aren't enabled. Seems to me that
I need to use different compiler settings or simply not compile this module
but nothing I've tried has made any progress.

Thanks,
Iain.

On Fri, May 25, 2012 at 5:19 PM, Iain Billett  wrote:

> Hi,
>
> Just a quick report on where I'm at. Basically, I'm making good progress
> with the Android UI part of the project but I'm still not able to
> cross-compile LO for android (I know, I'm really sorry). The build error
> log is here <http://pastebin.com/462qEJ72> the problem is with the shell
> module. My autogen.lastrun is :
>
> CC_FOR_BUILD=ccache clang -arch i386 -mmacosx-version-min=10.6
> CXX_FOR_BUILD=ccache clang++ -arch i386 -mmacosx-version-min=10.6
>
> --with-build-platform-configure-options=--with-macosx-version-min-required=10.6
> --with-macosx-sdk=10.6
> --disable-mozilla
> --without-doxygen
> --with-android-ndk=/Users/Iain/android-ndk-r7b
> --with-android-sdk=/Users/Iain/android-sdks
> --build=x86_64-apple-darwin11.3.0
> --disable-zenity
> --with-distro=LibreOfficeAndroid
> --disable-python
> --without-helppack-integration
> --without-myspell-dicts
>
--with-java # this was also set.

>
> Thanks,
>
>  Iain.
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-25 Thread Iain Billett
Hi,

Just a quick report on where I'm at. Basically, I'm making good progress
with the Android UI part of the project but I'm still not able to
cross-compile LO for android (I know, I'm really sorry). The build error
log is here  the problem is with the shell
module. My autogen.lastrun is :

CC_FOR_BUILD=ccache clang -arch i386 -mmacosx-version-min=10.6
CXX_FOR_BUILD=ccache clang++ -arch i386 -mmacosx-version-min=10.6
--with-build-platform-configure-options=--with-macosx-version-min-required=10.6
--with-macosx-sdk=10.6
--disable-mozilla
--without-doxygen
--with-android-ndk=/Users/Iain/android-ndk-r7b
--with-android-sdk=/Users/Iain/android-sdks
--build=x86_64-apple-darwin11.3.0
--disable-zenity
--with-distro=LibreOfficeAndroid
--disable-python
--without-helppack-integration
--without-myspell-dicts

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-22 Thread Iain Billett
On Tue, May 22, 2012 at 12:58 PM, Tor Lillqvist  wrote:

> > However, I can't seem to resolve
> > a problem building the nss module.
>
> Hmm, in cross-compilation the nss module isn't built for the build
> platform (and for Android, not for the host platform either), so is
> this in a native Mac build tree I assume.
>

It is, I thought I'd "do a quick build for mac first".


>
> So not directly related to the Android work, but yeah, it is good to
> have a native build, too. I guess you did your Easy Hack etc work on
> some other platform than the Mac then?


I did the easy hack on Ubuntu for simplicity. I wanted to switch to the mac
as it's a much more powerful machine, but I can retreat if need be.


> Build problems were really
> supposed to be sorted out before GSoC coding start.


I'm really sorry about that. The reason as you know was my final exams
stretched on for pretty much the whole community bonding period. However,
since that's my problem, I had always intended to sprint to catch up as
I've no other commitments for the next 12 weeks.


>
> Anyway, I think your problem is that you are (accidentally) building
> 64-bit code, you need to include either the "-arch i386" or "-m32"
> option in your CC and CXX. Also -mmacosx-version-min=10.6 . And you
> probably didn't pass the --with-macosx-version-min-required=10.6
> --with-macosx-sdk=10.6 options to autogen.sh.
>

I thought I had, autogen.lastrun:

CC_FOR_BUILD=ccache clang -arch i386 -mmacosx-version-min=10.6
CXX_FOR_BUILD=ccache clang++ -arch i386 -mmacosx-version-min=10.6
--with-build-platform-configure-options=--with-macosx-version-min-required=10.6
--with-macosx-sdk=10.6
--disable-mozilla
--disable-nss-module #I've tried with / without this
--without-doxygen
--without-myspell-dicts


>
> (Yeah, all that should ideally be automated in configure.in, but then
> support for a current tool-chain in the Mac build is a work in
> progress.)
>
> --tml
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-22 Thread Iain Billett
>
> Ah, yes. With a current Xcode 4.3, the automake and autoconf tools are
> no longer included, sigh, not even when you add the "command-line
> tools" (or whatever they are called, don't recall exactly). (aclocal
> is part of the automake package.)
>
> You need to download tarballs for some recent version of automake and
> autoconf, configure and install them somewhere, like /usr/local. A bit
> of bother, yes. I wonder if we should start including a pre-autogened
> configure script somewhere in the git tree.
>
>
I've done this and that problem is solved. However, I can't seem to resolve
a problem building the nss module. There are also errors in jurt, ucbhelper
and pango. I've tried cleaning and building each of these but they won't
build. There's  a paste bin for the error log.
I've tried disabling nss but the option is unrecognised.

In other news, I've been more productive on the android UI front.

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSoC Week 1

2012-05-21 Thread Iain Billett
>
> You just need to pass in some options to autogen.sh; this should word:
>
> CC_FOR_BUILD=ccache clang -arch i386 -mmacosx-version-min=10.6
> CXX_FOR_BUILD=ccache clang++ -arch i386 -mmacosx-version-min=10.6
>
> --with-build-platform-configure-options=--with-macosx-version-min-required=10.6
> --with-macosx-sdk=10.6
>
> (put that in your autogen.lastrun, i.e. treat autogen.lastrun as an
> input file. or if you pass as command-line parameters, add quotes
> around the "--with-macosx-version-min-required=10.6
> --with-macosx-sdk=10.6".)
>
>
My problem with mac os x (lion) is that I haven't been able to get
autogen.sh to run at all (Even --help gives no output). Every time it gives
aclocal failed to run line 155 (It's also not recognised as a command).
Looks like I need to install aclocal or something which contains it. I
haven't been able to find any instructions for lion, any Ideas?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice][GSoC2012] Introduction

2012-04-24 Thread Iain Billett
Hi everyone,

My GSoC proposal has been accepted and I'm excited to be working on
LibreOffice this summer. I'll be working with Tor Lillqvist, and others I'm
sure, on LibreOffice for Android.

To introduce myself, I'm a final year computer engineering student at
Trinity College Dublin. Next year I plan to do a master's degree in
networking and distributed systems after which I'd like to get a job as a
software engineer. I'm really interested in mobile development and Android
in particular so I'm really excited to be on this project!

I look forward to working with you all,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Bug 38276 - EasyHack: Make the toolbar menu easier

2012-04-11 Thread iain billett
On Wed, Apr 11, 2012 at 4:45 PM, Tor Lillqvist  wrote:

> Yep, this looks fine, I will push it (with you as the author) as soon
> as you confirm, for the record, that you submit it to us under the
> licenses we want, MPL and LGPL3+.
>

All my contributions to LibreOffice until further notice are licensed under
LGPL3+/MPL1.1+


>
> Do you really want your name spelled (in the commit log) in lower
> case, as in your email From: header? Just confirming...
>

I think " Iain Billett " would be best. I'll change that header.


>
> --tml
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Bug 38276 - EasyHack: Make the toolbar menu easier

2012-04-11 Thread iain billett
My previous fix was incorrect. The fixed diff is now :

diff --git a/framework/source/uielement/toolbarmanager.cxx
b/framework/source/uielement/toolbarmanager.cxx
index 80adbd7..90ab2a8 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1880,7 +1880,25 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*,
pToolBar )
 if ( m_bDisposed )
 return 1;
 //modify for i33668 by shizhoubo:2008:04
-GetToolBarCustomMenu(pToolBar);
+PopupMenu * pMenu = GetToolBarCustomMenu(pToolBar);
+if (pMenu)
+{
+sal_uInt16 nObsoleteItems = 6;
+sal_uInt16 positionInMenu;
+sal_uInt32 obsoleteItems[]  = {  MENUITEM_TOOLBAR_CLOSE ,
+ MENUITEM_TOOLBAR_VISIBLEBUTTON ,
+ MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR,
+ MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION
,
+ MENUITEM_TOOLBAR_DOCKTOOLouBAR ,
+ MENUITEM_TOOLBAR_DOCKALLTOOLBAR
+   };
+for( int i = 0 ; i < nObsoleteItems ; i++ )
+{
+positionInMenu = pMenu->GetItemPos( obsoleteItems[i] );
+if ( positionInMenu != MENU_ITEM_NOTFOUND )
+pMenu->RemoveItem( positionInMenu );
+}
+}
 //end
  return 0;
  }

If you're happy with this I could foward it to the list.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Fwd: Bug 38276 - EasyHack: Make the toolbar menu easier

2012-04-11 Thread iain billett
-- Forwarded message --
From: iain billett 
Date: Wed, Apr 11, 2012 at 2:10 PM
Subject: Re: Bug 38276 - EasyHack: Make the toolbar menu easier
To: Tor Lillqvist 


On Wed, Apr 11, 2012 at 1:18 PM, Tor Lillqvist  wrote:

> Iain, this is a bit different approach from the one you first sent me
> privately, but I guess this is simpler and works as well?
>

Yeah, sorry, I realised that by disabling the obsolete items then removing
all disabled items I was removing any other disabled items which were
clipped out too. That wasn't appropriate so I went for another approach,
removing them directly. I probably should have ran that by you before
posting.


> One question, though: Are you sure that the menu from which you are
> removing those items isn't used somewhere else, too, where the removed
> items are supposed to still be present?
>

I was pretty sure until I realised that I miss-read what I was supposed to
do. I thought I was supposed to remove the items from the right-click menu
too but that isn't the case. It's kind of hard to see how I miss read that.
I was a little too eager, I guess.


>
> --tml
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Bug 38276 - EasyHack: Make the toolbar menu easier

2012-04-10 Thread iain billett
Hi everyone,

I'm new to this list. I've made a simple fix for Bug
38276 .
The diff is below if anyone wants to have a look (I wasn't sure if I should
add it as an attachment or not?). Bear in mind that I'm completely new to
LibreOffice development and open source development in general.

diff --git a/framework/source/uielement/toolbarmanager.cxx
b/framework/source/uielement/toolbarmanager.cxx
index 80adbd7..ecce13f 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1817,6 +1817,22 @@ PopupMenu *
ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar)
 aPopupMenu.RemoveItem( nPos );
 }

+sal_uInt16 nObsoleteItems = 6;
+sal_uInt16 positionInMenu;
+sal_uInt32 obsoleteItems[]  = {  MENUITEM_TOOLBAR_CLOSE ,
+
MENUITEM_TOOLBAR_VISIBLEBUTTON ,
+
  MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR,
+
  MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION ,
+
  MENUITEM_TOOLBAR_DOCKTOOLBAR ,
+
  MENUITEM_TOOLBAR_DOCKALLTOOLBAR
+};
+for( int i = 0 ; i < nObsoleteItems ; i++ )
+{
+positionInMenu = aPopupMenu.GetItemPos( obsoleteItems[i] );
+if ( positionInMenu != MENU_ITEM_NOTFOUND )
+aPopupMenu.RemoveItem( positionInMenu );
+}
+
 // copy all menu items to the toolbar menu
 if( pMenu->GetItemCount() )
 pMenu->InsertSeparator();

Thanks,

Iain.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice