[Libreoffice-commits] .: 67 commits - android/Bootstrap android/qa configure.in desktop/source jvmfwk/plugins Library_merged.mk README.Android README.cross sal/android sal/inc sal/Library_lo-bootstrap.mk sal/osl sal/Package_inc.mk sc/qa solenv/inc vcl/android vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/source
Tor Lillqvist
tml at kemper.freedesktop.org
Wed Feb 15 02:24:43 PST 2012
Library_merged.mk | 7
README.Android | 1
README.cross | 2
android/Bootstrap/local.properties.in | 2
android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 8
android/qa/desktop/Makefile | 53
android/qa/desktop/fonts.conf | 21
android/qa/sc/Makefile | 27
configure.in | 5
desktop/source/app/app.cxx | 37
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2
sal/Library_lo-bootstrap.mk | 5
sal/Package_inc.mk | 1
sal/android/android_native_app_glue.c | 26
sal/android/lo-bootstrap.c | 62 -
sal/inc/osl/detail/android-bootstrap.h | 82 +
sal/osl/unx/file.cxx | 2
sal/osl/unx/file_misc.cxx | 12
sal/osl/unx/module.c | 6
sal/osl/unx/process_impl.cxx | 2
sal/osl/unx/security.c | 20
sal/osl/unx/thread.c | 18
sal/osl/unx/uunxapi.cxx | 2
sc/qa/unit/filters-test.cxx | 4
solenv/inc/unxandr/lo-bootstrap.h | 77 -
vcl/Library_vcl.mk | 1
vcl/Module_vcl.mk | 6
vcl/android/androidinst.cxx | 658 ++++++++++-
vcl/headless/svpframe.cxx | 3
vcl/headless/svpinst.cxx | 2
vcl/inc/android/androidinst.hxx | 29
vcl/inc/generic/geninst.h | 6
vcl/inc/headless/svpframe.hxx | 12
vcl/source/app/svmain.cxx | 5
34 files changed, 1022 insertions(+), 184 deletions(-)
New commits:
commit c301199804f5beb7ef803abfa84e04d9351efb3f
Merge: bc7110a... 71fb61b...
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Feb 15 12:00:46 2012 +0200
Merge branch 'feature/android'
diff --cc configure.in
index 0f5ba8a,a0e46a9..b96b081
--- a/configure.in
+++ b/configure.in
@@@ -10889,13 -10483,13 +10892,13 @@@ autoconf post_download.in > post_downlo
chmod +x post_download
# Generate a configuration timestamp we can use for deps
-if test -f set_soenv; then
- mv -f set_soenv set_soenv.last
+if test -f config_host.mk; then
+ mv -f config_host.mk config_host.mk.last
else
- echo > set_soenv.last
+ echo > config_host.mk.last
fi
- AC_CONFIG_FILES([config_host.mk ooo.lst bin/repo-list build_env android/qa/sc/local.properties android/qa/desktop/local.properties])
-AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env android/Bootstrap/local.properties android/qa/sc/local.properties android/qa/desktop/local.properties])
++AC_CONFIG_FILES([config_host.mk ooo.lst bin/repo-list build_env android/Bootstrap/local.properties android/qa/sc/local.properties android/qa/desktop/local.properties])
AC_OUTPUT
# touch the config timestamp file set_soenv.stamp
diff --cc sc/qa/unit/filters-test.cxx
index 4e40f57,8314c8c..bf1cb72
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@@ -283,33 -278,33 +283,35 @@@ void testRangeNameImpl(ScDocument* pDoc
}
-void ScFiltersTest::testRangeName()
+ScDocShellRef ScFiltersTest::loadDoc(const rtl::OUString& rName, sal_Int32 nFormat)
+{
+ rtl::OUString aFileExtension(aFileFormats[nFormat].pName, strlen(aFileFormats[nFormat].pName), RTL_TEXTENCODING_UTF8 );
+ rtl::OUString aFilterName(aFileFormats[nFormat].pFilterName, strlen(aFileFormats[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ;
+ rtl::OUString aFileName;
+ createFileURL( rName, aFileExtension, aFileName );
+ rtl::OUString aFilterType(aFileFormats[nFormat].pTypeName, strlen(aFileFormats[nFormat].pTypeName), RTL_TEXTENCODING_UTF8);
+ ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[nFormat].nFormatType);
+ CPPUNIT_ASSERT(xDocSh.Is());
+ return xDocSh;
+}
+
+void ScFiltersTest::testRangeNameODS()
{
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("named-ranges-global."));
- //XLSX does not work yet
- for (sal_uInt32 i = 0; i < 1; ++i)
- {
- rtl::OUString aFileExtension(aFileFormats[i].pName, strlen(aFileFormats[i].pName), RTL_TEXTENCODING_UTF8 );
- rtl::OUString aFilterName(aFileFormats[i].pFilterName, strlen(aFileFormats[i].pFilterName), RTL_TEXTENCODING_UTF8) ;
- rtl::OUString aFileName;
- createFileURL( aFileNameBase, aFileExtension, aFileName );
- rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8);
- std::cout << aFileFormats[i].pName << " Test" << std::endl;
- ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType);
-
- CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is());
-
- xDocSh->DoHardRecalc(true);
-
- ScDocument* pDoc = xDocSh->GetDocument();
- testRangeNameImpl(pDoc);
-
- rtl::OUString aSheet2CSV(RTL_CONSTASCII_USTRINGPARAM("rangeExp_Sheet2."));
- rtl::OUString aCSVPath;
- createCSVPath( aSheet2CSV, aCSVPath );
- testFile( aCSVPath, pDoc, 1);
- xDocSh->DoClose();
- }
+ ScDocShellRef xDocSh = loadDoc(aFileNameBase, 1);
- xDocSh->DoHardRecalc(true);
+
+ CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is());
++
++ xDocSh->DoHardRecalc(true);
++
+ ScDocument* pDoc = xDocSh->GetDocument();
+ testRangeNameImpl(pDoc);
+
+ rtl::OUString aSheet2CSV(RTL_CONSTASCII_USTRINGPARAM("rangeExp_Sheet2."));
+ rtl::OUString aCSVPath;
+ createCSVPath( aSheet2CSV, aCSVPath );
+ testFile( aCSVPath, pDoc, 1);
+ xDocSh->DoClose();
}
namespace {
commit 71fb61b77a548ac8b0b499f7c6039e197c994842
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Feb 13 15:55:46 2012 +0200
Need libfastsax.uno
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index a55083c..a57ecab 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -61,6 +61,7 @@ copy-stuff:
configmgr.uno \
datelo \
expwrap.uno \
+ fastsax.uno \
fileacc \
fontconfig \
forlo \
commit 49675b89cc08cb065fe4dc7bd53dd9422ae4e8d4
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Feb 13 13:57:42 2012 +0200
Need libdatelo
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index aa8f59f..a55083c 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -59,6 +59,7 @@ copy-stuff:
bootstrap.uno \
comphelpgcc3 \
configmgr.uno \
+ datelo \
expwrap.uno \
fileacc \
fontconfig \
commit 2b455134b0bc9b2632f095503b87ec90158b24b5
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Thu Feb 9 15:22:30 2012 +0200
Need also libintrospection.uno
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 997bcf7..aa8f59f 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -77,6 +77,7 @@ copy-stuff:
icui18nlo \
iculelo \
icuuclo \
+ introspection.uno \
jvmaccessgcc3 \
jvmfwk \
localedata_en \
commit 7edb4c739332432b11b5d31df9dc7bba3761f4f1
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Feb 9 22:31:30 2012 +0200
Add fw* and sfx to libmerged
diff --git a/Library_merged.mk b/Library_merged.mk
index b2e49b0..ac55cdc 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -28,14 +28,12 @@ $(eval $(call gb_Library_add_linked_libs,merged,\
comphelper \
cppu \
cppuhelper \
- fwe \
i18nisolang1 \
i18npaper \
sal \
salhelper \
sax \
sb \
- sfx \
sot \
svl \
svt \
@@ -50,6 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,merged,\
$(eval $(call gb_Library_use_externals,merged,\
icuuc \
+ libxml2 \
zlib \
))
@@ -76,4 +75,11 @@ $(eval $(call gb_Library_add_linked_libs,merged,\
))
endif
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_linked_libs,merged,\
+ objc \
+ Cocoa \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 1f28ec8..8516a90 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -86,10 +86,27 @@
#include <svl/srchitem.hxx>
#include <osl/socket.hxx>
+#ifdef LIBO_MERGELIBS
+/* Avoid clash with the ones from svx/source/form/typemap.cxx */
+#define aSfxBoolItem_Impl sfx2_source_appl_appbas_aSfxBoolItem_Impl
+#define aSfxStringItem_Impl sfx2_source_appl_appbas_aSfxStringItem_Impl
+#define aSfxUInt16Item_Impl sfx2_source_appl_appbas_aSfxUInt16Item_Impl
+#define aSfxUInt32Item_Impl sfx2_source_appl_appbas_aSfxUInt32Item_Impl
+#define aSfxVoidItem_Impl sfx2_source_appl_appbas_aSfxVoidtem_Impl
+#endif
+
#define SFX_TYPEMAP
#define Selection
#include "sfxslots.hxx"
+#ifdef LIBO_MERGELIBS
+#undef aSfxBoolItem_Impl
+#undef aSfxStringItem_Impl
+#undef aSfxUInt16Item_Impl
+#undef aSfxUInt32Item_Impl
+#undef aSfxVoidItem_Impl
+#endif
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index e39e6f4..ebd70a3 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -36,8 +36,14 @@ gb_MERGEDLIBS := \
drawinglayer \
editeng \
filterconfig \
+ fwe \
+ fwi \
+ fwk \
+ fwl \
+ fwm \
lng \
package2 \
+ sfx \
sofficeapp \
spl \
svx \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index f2bf866..80ed26c 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -107,6 +107,11 @@ gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
endif
+ifeq ($(MERGELIBS),TRUE)
+gb_CFLAGS_COMMON += -DLIBO_MERGELIBS
+gb_CXXFLAGS_COMMON += -DLIBO_MERGELIBS
+endif
+
ifeq ($(ENABLE_LTO),TRUE)
gb_Library_LTOFLAGS := -flto
endif
commit 0caced5cd1cf537c6576ec6c147f40373b2eac6a
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Feb 6 15:52:00 2012 +0200
libpackage2 is also in libmergedlo
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index a657fe1..efe0040 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -144,7 +144,6 @@ copy-stuff: buildrcs
mergedlo \
msfilterlo \
ooxlo \
- package2 \
reflection.uno \
reg \
saxlo \
commit 5cd1d6740cc9e85b5ed3730800dff4717cb7e1ae
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Feb 3 22:02:01 2012 +0100
android: implement theming to get default font set, 1st cut at GetWorkArea
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index ec38cec..16a5125 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -347,6 +347,18 @@ static const char *app_cmd_name(int cmd)
}
}
+void AndroidSalInstance::GetWorkArea( Rectangle& rRect )
+{
+ ANativeWindow *pWindow = mpApp->window;
+ if (!pWindow)
+ rRect = Rectangle( Point( 0, 0 ),
+ Size( 800, 600 ) );
+ else
+ rRect = Rectangle( Point( 0, 0 ),
+ Size( ANativeWindow_getWidth( pWindow ),
+ ANativeWindow_getHeight( pWindow ) ) );
+}
+
void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
{
fprintf (stderr, "app cmd for app %p: %s\n", app, app_cmd_name(cmd));
@@ -603,6 +615,66 @@ SalSystem *AndroidSalInstance::CreateSalSystem()
return new AndroidSalSystem();
}
+class AndroidSalFrame : public SvpSalFrame
+{
+public:
+ AndroidSalFrame( AndroidSalInstance *pInstance,
+ SalFrame *pParent,
+ sal_uLong nSalFrameStyle,
+ SystemParentData *pSysParent )
+ : SvpSalFrame( pInstance, pParent, nSalFrameStyle, pSysParent )
+ {
+ }
+
+ virtual void GetWorkArea( Rectangle& rRect )
+ {
+ AndroidSalInstance::getInstance()->GetWorkArea( rRect );
+ }
+
+ virtual void UpdateSettings( AllSettings &rSettings )
+ {
+ // Clobber the UI fonts
+#if 0
+ psp::FastPrintFontInfo aInfo;
+ aInfo.m_aFamilyName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Roboto" ) );
+ aInfo.m_eItalic = ITALIC_NORMAL;
+ aInfo.m_eWeight = WEIGHT_NORMAL;
+ aInfo.m_eWidth = WIDTH_NORMAL;
+ psp::PrintFontManager::get().matchFont( aInfo, rSettings.GetUILocale() );
+#endif
+
+ // FIXME: is 12 point enough ?
+ Font aFont( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Roboto" ) ),
+ Size( 0, 14 ) );
+
+ StyleSettings aStyleSet = rSettings.GetStyleSettings();
+ aStyleSet.SetAppFont( aFont );
+ aStyleSet.SetHelpFont( aFont );
+ aStyleSet.SetMenuFont( aFont );
+ aStyleSet.SetToolFont( aFont );
+ aStyleSet.SetLabelFont( aFont );
+ aStyleSet.SetInfoFont( aFont );
+ aStyleSet.SetRadioCheckFont( aFont );
+ aStyleSet.SetPushButtonFont( aFont );
+ aStyleSet.SetFieldFont( aFont );
+ aStyleSet.SetIconFont( aFont );
+ aStyleSet.SetGroupFont( aFont );
+
+ rSettings.SetStyleSettings( aStyleSet );
+ }
+};
+
+SalFrame *AndroidSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
+{
+ return new AndroidSalFrame( this, NULL, nStyle, pParent );
+}
+
+SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
+{
+ return new AndroidSalFrame( this, pParent, nStyle, NULL );
+}
+
+
// All the interesting stuff is slaved from the AndroidSalInstance
void InitSalData() {}
void DeInitSalData() {}
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index e947737..10d17c5 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -49,6 +49,11 @@ public:
virtual SalSystem* CreateSalSystem();
+ // frame management
+ void GetWorkArea( Rectangle& rRect );
+ SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+ SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+
// mainloop pieces
virtual void Wakeup();
virtual bool AnyInput( sal_uInt16 nType );
@@ -58,6 +63,7 @@ public:
int32_t onInputEvent (struct android_app* app, AInputEvent* event);
void RedrawWindows(ANativeWindow *pWindow);
SalFrame *getFocusFrame() const;
+
protected:
virtual void DoReleaseYield( int nTimeoutMS );
struct android_app *mpApp;
commit 5d933f259d7cdc9d600d921d51ef9d4187dbd701
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Feb 3 21:14:13 2012 +0100
Revert "services.rdb is in $(OUTDIR)/xml/ure as far as I can see"
There are two services.rdbs - one has UNO services, the other program ones
This reverts commit 1b48979a27f280a87087ee99e012285050522b95.
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 4b8a832..a657fe1 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -202,7 +202,7 @@ copy-stuff: buildrcs
# uno types & services
cp $(OUTDIR)/bin/types.rdb assets/program/types/
cp $(OUTDIR)/bin/ure/types.rdb assets/ure/share/misc/
- cp $(OUTDIR)/xml/ure/services.rdb assets/program/services
+ cp $(OUTDIR)/xml/services.rdb assets/program/services
cp $(OUTDIR)/xml/ure/services.rdb assets/ure/share/misc/
# config
cp -R $(OUTDIR)/xml/*.xcd assets/share/registry/
commit 898e88edc1a55e4825399d8d962f7f77cc3831ac
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Feb 3 20:39:39 2012 +0100
android: An attempt to handle mouse events.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 50a3040..ec38cec 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -399,7 +399,7 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent* event)
{
- bool bHandled;
+ bool bHandled = false;
fprintf (stderr, "input event for app %p, event %p type %d source %d device id %d\n",
app, event,
AInputEvent_getType(event),
@@ -437,6 +437,8 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
else
fprintf (stderr, "no focused frame to emit event on\n");
+ fprintf( stderr, "bHandled == %s\n", bHandled? "true": "false" );
+
// FIXME: queueing full re-draw on key events ...
mbQueueReDraw = true;
break;
@@ -456,6 +458,27 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
AMotionEvent_getX(event, i),
AMotionEvent_getY(event, i),
AMotionEvent_getPressure(event, i));
+
+ SalMouseEvent aMouseEvent;
+ sal_uInt16 nEvent = 0;
+
+ // FIXME: all this filing the nEvent and aMouseEvent has to be cleaned up
+ nEvent = AMotionEvent_getAction(event)? SALEVENT_MOUSEBUTTONUP: SALEVENT_MOUSEBUTTONDOWN;
+
+ aMouseEvent.mnX = AMotionEvent_getXOffset(event);
+ aMouseEvent.mnY = AMotionEvent_getYOffset(event);
+ aMouseEvent.mnTime = 0; // FIXME
+ aMouseEvent.mnCode = 0; // FIXME
+ aMouseEvent.mnButton = MOUSE_LEFT; // FIXME
+
+ SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
+ if (pFocus)
+ bHandled = pFocus->CallCallback( nEvent, &aMouseEvent );
+ else
+ fprintf (stderr, "no focused frame to emit event on\n");
+
+ fprintf( stderr, "bHandled == %s\n", bHandled? "true": "false" );
+
break;
}
default:
commit f076254c6db77a999d4ad0aecc6b7df7b43b4c32
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Feb 3 20:37:37 2012 +0100
android: Source env. before trying to run it.
diff --git a/README.Android b/README.Android
index b5e32c7..e96597e 100644
--- a/README.Android
+++ b/README.Android
@@ -15,6 +15,7 @@ Then it is necessary to get stdout/err to go to somewhere we can find it:
Then:
+ . Env.Host.sh
cd android/qa/sc
make clean all install
make run ; adb shell logcat
commit 29aa585b2ee2af0680eb39749d1797f52e190a3a
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Feb 3 18:49:59 2012 +0100
android: get the focus window from SvpSalFrame
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 6d70471..50a3040 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -321,11 +321,6 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
mbQueueReDraw = false;
}
-SalFrame *AndroidSalInstance::getFocusFrame() const
-{
- return !getFrames().empty() ? *getFrames().begin() : NULL;
-}
-
static const char *app_cmd_name(int cmd)
{
switch (cmd) {
@@ -436,7 +431,7 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
aEvent.mnCharCode = 'a'; // the unicode of it all ...
aEvent.mnRepeat = AKeyEvent_getRepeatCount(event);
- SalFrame *pFocus = getFocusFrame();
+ SalFrame *pFocus = SvpSalFrame::GetFocusFrame();
if (pFocus)
bHandled = pFocus->CallCallback( nEvent, &aEvent );
else
diff --git a/vcl/inc/generic/geninst.h b/vcl/inc/generic/geninst.h
index 471b630..240ebe6 100644
--- a/vcl/inc/generic/geninst.h
+++ b/vcl/inc/generic/geninst.h
@@ -103,7 +103,7 @@ public:
virtual void GetPrinterQueueInfo ( ImplPrnQueueList* pList );
virtual void GetPrinterQueueState ( SalPrinterQueueInfo* pInfo );
virtual void DeletePrinterQueueInfo ( SalPrinterQueueInfo* pInfo );
- virtual rtl::OUString GetDefaultPrinter();
+ virtual rtl::OUString GetDefaultPrinter();
virtual void PostPrintersChanged() = 0;
virtual void updatePrinterUpdate();
virtual void jobStartedPrinterUpdate();
@@ -117,8 +117,8 @@ public:
protected:
void configurePspInfoPrinter( PspSalInfoPrinter* pInfoPrinter,
- SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pSetupData );
+ SalPrinterQueueInfo* pQueueInfo,
+ ImplJobSetup* pSetupData );
};
inline SalGenericInstance *GetGenericInstance()
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index fc923af..8c30e23 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -127,6 +127,9 @@ public:
virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
virtual void SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; }
bool IsVisible() { return m_bVisible; }
+
+ static SvpSalFrame* GetFocusFrame() { return s_pFocusFrame; }
+
};
#endif // _SVP_SVPFRAME_HXX
commit 1b48979a27f280a87087ee99e012285050522b95
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 17:04:40 2012 +0200
services.rdb is in $(OUTDIR)/xml/ure as far as I can see
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index a657fe1..4b8a832 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -202,7 +202,7 @@ copy-stuff: buildrcs
# uno types & services
cp $(OUTDIR)/bin/types.rdb assets/program/types/
cp $(OUTDIR)/bin/ure/types.rdb assets/ure/share/misc/
- cp $(OUTDIR)/xml/services.rdb assets/program/services
+ cp $(OUTDIR)/xml/ure/services.rdb assets/program/services
cp $(OUTDIR)/xml/ure/services.rdb assets/ure/share/misc/
# config
cp -R $(OUTDIR)/xml/*.xcd assets/share/registry/
commit 83f2bc57c480dcb6190bef040b721e6f1f8df1cc
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 16:28:26 2012 +0200
Drop libs that are in libmerged
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 8e1811d..a657fe1 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -114,7 +114,6 @@ copy-stuff: buildrcs
configmgr.uno \
cppcanvaslo \
drawinglayerlo \
- editenglo \
expwrap.uno \
fileacc \
fontconfig \
@@ -158,8 +157,6 @@ copy-stuff: buildrcs
store \
svllo \
svtlo \
- svxlo \
- svxcorelo \
test \
tklo \
tllo \
@@ -180,7 +177,6 @@ copy-stuff: buildrcs
xcrlo \
xml2 \
xmlreader \
- xolo \
xstor \
\
swlo \
commit d87b6165b4f020fc223c2e771967698a7cb69c02
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 15:15:58 2012 +0200
Add remark about ccache
diff --git a/configure.in b/configure.in
index 3e6ba1c..a0e46a9 100644
--- a/configure.in
+++ b/configure.in
@@ -109,6 +109,8 @@ if test -n "$with_android_ndk"; then
test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-strip
ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mthumb -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
+
+ # Note that letting this set CC and CXX means ccache won't be used
test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-gcc $ANDROIDCFLAGS"
test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-g++ $ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -fexceptions -frtti"
fi
commit 8f248885d39d0f06f8f0da7fcc798bc91bfca59a
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 13:50:33 2012 +0200
Use $(ANDROID_SDK_HOME) for adb instead of assuming it is in $PATH
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 3d11362..8e1811d 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -238,26 +238,26 @@ build-ant: copy-stuff
unset JAVA_HOME && $(ANT) debug
install: copy-stuff
- adb shell rm -r $(APP_DATA_PATH)
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell rm -r $(APP_DATA_PATH)
unset JAVA_HOME && $(ANT) debug install
@echo
@echo 'Run it with "make run"'
@echo
uninstall:
- adb uninstall $(APP_PACKAGE)
+ $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
run:
echo "FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf -env:INIFILENAME=file:///assets/program/sofficerc" > cmdline
- adb push cmdline $(APP_DATA_PATH)/cmdline
- adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+ $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
# add -e lo-strace yes # if you want that
# If you reinstall an app several times, even if you uninstall it
# between, disk space seems to leak that won't get recycled until you
# stop and start...
stop-start-cycle:
- adb shell stop && adb shell start && sleep 10
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
clean:
$(ANT) clean
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 59ad5fb..997bcf7 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -174,17 +174,17 @@ install: copy-stuff
@echo
uninstall:
- adb uninstall $(APP_PACKAGE)
+ $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
run_ucalc:
echo "STAR_RESOURCEPATH=/assets/bin FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf $(APP_DATA_PATH)/lib/libtest_sc_ucalc.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/ComponentTarget/ucb/source/core/ucb1.component file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
- adb push cmdline $(APP_DATA_PATH)/cmdline
- adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+ $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
run_filters_test:
echo "STAR_RESOURCEPATH=/assets/bin FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf $(APP_DATA_PATH)/lib/libtest_sc_filters_test.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry module:file:///assets/xml/registry/spool' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/basic/util/sb.component file:///assets/ComponentTarget/chart2/source/controller/chartcontroller.component file:///assets/ComponentTarget/chart2/source/tools/charttools.component file:///assets/ComponentTarget/chart2/source/model/chartmodel.component file:///assets/ComponentTarget/comphelper/util/comphelp.component file:///assets/ComponentTarget/dbaccess/util/dba.component file:///assets/ComponentTarget/eventattacher/source/evtatt.component file:///assets/ComponentTarget/fileaccess/source/fileacc.component
file:///assets/ComponentTarget/filter/source/config/cache/filterconfig1.component file:///assets/ComponentTarget/forms/util/frm.component file:///assets/ComponentTarget/oox/util/oox.component file:///assets/ComponentTarget/package/source/xstor/xstor.component file:///assets/ComponentTarget/package/util/package2.component file:///assets/ComponentTarget/sax/source/expatwrap/expwrap.component file:///assets/ComponentTarget/sax/source/fastparser/fastsax.component file:///assets/ComponentTarget/sc/util/sc.component file:///assets/ComponentTarget/sc/util/scfilt.component file:///assets/ComponentTarget/scaddins/source/analysis/analysis.component file:///assets/ComponentTarget/scaddins/source/datefunc/date.component file:///assets/ComponentTarget/sot/util/sot.component file:///assets/ComponentTarget/svl/util/svl.component file:///assets/ComponentTarget/toolkit/util/tk.component file:///assets/ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component file:///assets/ComponentTarget/unoto
ols/util/utl.component file:///assets/ComponentTarget/unoxml/source/rdf/unordf.component file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/ComponentTarget/ucb/source/core/ucb1.component file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
- adb push cmdline $(APP_DATA_PATH)/cmdline
- adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+ $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
run: run_ucalc run_filters_test
@@ -192,11 +192,11 @@ run: run_ucalc run_filters_test
# between, disk space seems to leak that won't get recycled until you
# stop and start...
stop-start-cycle:
- adb shell stop && adb shell start && sleep 10
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
# Too hard to remember this stuff;)
redirect-stdio:
- adb shell stop && adb shell setprop log.redirect-stdio true && adb shell start
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell setprop log.redirect-stdio true && $(ANDROID_SDK_HOME)/platform-tools/adb shell start
clean:
$(ANT) clean
commit db1ade41bf6c878753801ed241d6bd1d94466e12
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 13:11:03 2012 +0200
Fix braino
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index ec568b6..3d11362 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -235,11 +235,11 @@ copy-stuff: buildrcs
build-ant: copy-stuff
- unset JAVA_HOME && $ANT debug
+ unset JAVA_HOME && $(ANT) debug
install: copy-stuff
adb shell rm -r $(APP_DATA_PATH)
- unset JAVA_HOME && $ANT debug install
+ unset JAVA_HOME && $(ANT) debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -260,6 +260,6 @@ stop-start-cycle:
adb shell stop && adb shell start && sleep 10
clean:
- $ANT clean
+ $(ANT) clean
rm -rf assets $(SODEST) $(OBJLOCAL)
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index ad07d28..59ad5fb 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -165,10 +165,10 @@ copy-stuff:
build-ant: copy-stuff
- unset JAVA_HOME && $ANT debug
+ unset JAVA_HOME && $(ANT) debug
install: copy-stuff
- unset JAVA_HOME && $ANT debug install
+ unset JAVA_HOME && $(ANT) debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -199,6 +199,6 @@ redirect-stdio:
adb shell stop && adb shell setprop log.redirect-stdio true && adb shell start
clean:
- $ANT clean
+ $(ANT) clean
rm -rf assets $(SODEST) $(OBJLOCAL)
commit 10d74d9afe286aeb9a19a9943dbeaa17a499e202
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 12:47:05 2012 +0200
Need also android/Bootstrap/local.properties
diff --git a/android/Bootstrap/local.properties.in b/android/Bootstrap/local.properties.in
new file mode 100644
index 0000000..27c8eb5
--- /dev/null
+++ b/android/Bootstrap/local.properties.in
@@ -0,0 +1,2 @@
+# Location of the SDK. This is only used by Ant.
+sdk.dir=@ANDROID_SDK_HOME@
diff --git a/configure.in b/configure.in
index 9a348e3..3e6ba1c 100644
--- a/configure.in
+++ b/configure.in
@@ -2960,6 +2960,7 @@ if test "$cross_compiling" = "yes"; then
tar cf - \
bin/repo-list.in \
build_env.in \
+ android/Bootstrap/local.properties.in \
android/qa/sc/local.properties.in \
android/qa/desktop/local.properties.in \
config.guess \
@@ -10486,7 +10487,7 @@ else
echo > set_soenv.last
fi
-AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env android/qa/sc/local.properties android/qa/desktop/local.properties])
+AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env android/Bootstrap/local.properties android/qa/sc/local.properties android/qa/desktop/local.properties])
AC_OUTPUT
# touch the config timestamp file set_soenv.stamp
commit b2aafed24427b8a803892020b5a260404ade0074
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 12:46:19 2012 +0200
Use $ANT
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index d5e93be..ec568b6 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -235,11 +235,11 @@ copy-stuff: buildrcs
build-ant: copy-stuff
- unset JAVA_HOME && ant debug
+ unset JAVA_HOME && $ANT debug
install: copy-stuff
adb shell rm -r $(APP_DATA_PATH)
- unset JAVA_HOME && ant debug install
+ unset JAVA_HOME && $ANT debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -260,6 +260,6 @@ stop-start-cycle:
adb shell stop && adb shell start && sleep 10
clean:
- ant clean
+ $ANT clean
rm -rf assets $(SODEST) $(OBJLOCAL)
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 84341ab..ad07d28 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -165,10 +165,10 @@ copy-stuff:
build-ant: copy-stuff
- unset JAVA_HOME && ant debug
+ unset JAVA_HOME && $ANT debug
install: copy-stuff
- unset JAVA_HOME && ant debug install
+ unset JAVA_HOME && $ANT debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -199,6 +199,6 @@ redirect-stdio:
adb shell stop && adb shell setprop log.redirect-stdio true && adb shell start
clean:
- ant clean
+ $ANT clean
rm -rf assets $(SODEST) $(OBJLOCAL)
commit 0bed666e281467c4ddd956e95ae1dbe65a60c238
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 12:44:46 2012 +0200
Need liblnglo too
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 553aefe..d5e93be 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -136,6 +136,7 @@ copy-stuff: buildrcs
icuuclo \
jvmaccessgcc3 \
jvmfwk \
+ lnglo \
localebe1.uno \
localedata_en \
localedata_es \
commit e8555dce94c12307f2aeff9fb1543749b97cf41c
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Feb 3 12:22:43 2012 +0200
Add --with-android-sdk and --with-ant-home to the Android from Linux sample
diff --git a/README.cross b/README.cross
index f3c62b2..3c9b4f7 100644
--- a/README.cross
+++ b/README.cross
@@ -339,6 +339,8 @@ And here is an autogen.lastrun for Android when cross-compiling from Linux:
CC_FOR_BUILD=ccache gcc
CXX_FOR_BUILD=ccache g++
--with-android-ndk=/home/tml/android-ndk-r7
+--with-android-sdk=/home/tml/android-sdk-linux_x86
+--with-ant-home=/opt/apache-ant-1.8.2
--build=x86_64-unknown-linux-gnu
--disable-zenity
--with-distro=LibreOfficeAndroid
commit d663871cc701926a42fd3465e44fd4fc894fc30e
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Feb 1 12:16:30 2012 +0000
android: queue redraw on keypress (for now), and get the ALooper loop right
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index dfb8855..6d70471 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -271,7 +271,9 @@ void AndroidSalInstance::BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer,
void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
{
- (void)pWindow;
+ if (!pWindow)
+ return;
+
ANativeWindow_Buffer aOutBuffer;
memset ((void *)&aOutBuffer, 0, sizeof (aOutBuffer));
@@ -439,6 +441,9 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
bHandled = pFocus->CallCallback( nEvent, &aEvent );
else
fprintf (stderr, "no focused frame to emit event on\n");
+
+ // FIXME: queueing full re-draw on key events ...
+ mbQueueReDraw = true;
break;
}
case AINPUT_EVENT_TYPE_MOTION:
@@ -529,9 +534,8 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
// release yield mutex
sal_uLong nAcquireCount = ReleaseYieldMutex();
- fprintf (stderr, "DoReleaseYield #2 %d thread: %d ms\n",
+ fprintf (stderr, "DoReleaseYield #3 %d thread: %d ms\n",
nTimeoutMS, (int)pthread_self());
-#ifndef PLASMA
struct android_poll_source *pSource = NULL;
int outFd = 0, outEvents = 0;
@@ -540,34 +544,21 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
nTimeoutMS = 0;
int nRet;
- while ((nRet = ALooper_pollAll (nTimeoutMS, &outFd, &outEvents, (void**)&pSource)) >= 0)
- {
- fprintf (stderr, "ret #5 %d %d %d %p\n", nRet, outFd, outEvents, pSource);
- // acquire yield mutex again
- AcquireYieldMutex(nAcquireCount);
+ nRet = ALooper_pollAll (nTimeoutMS, &outFd, &outEvents, (void**)&pSource);
+ fprintf (stderr, "ret #6 %d %d %d %p\n", nRet, outFd, outEvents, pSource);
+ // acquire yield mutex again
+ AcquireYieldMutex(nAcquireCount);
+
+ if (nRet >= 0)
+ {
// Process this event.
if (pSource != NULL)
pSource->process(mpApp, pSource);
-
- nAcquireCount = ReleaseYieldMutex();
}
- // acquire yield mutex again
- AcquireYieldMutex(nAcquireCount);
-
- if (mbQueueReDraw)
+ if (mbQueueReDraw && mpApp->window)
AndroidSalInstance::getInstance()->RedrawWindows (mpApp->window);
-
-#else
- static int nPlasma = 0;
- char buffer[128];
- sprintf (buffer, "yield %d", nPlasma++);
- plasma_now(buffer);
-
- // acquire yield mutex again
- AcquireYieldMutex(nAcquireCount);
-#endif
}
bool AndroidSalInstance::AnyInput( sal_uInt16 nType )
commit c94c9dbdcfc8435f0df61fd326dc25d39d3c44cb
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 22:24:08 2012 +0000
android: package missing libraries, and shell branding - we get a shell.
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 3475248..553aefe 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -113,10 +113,9 @@ copy-stuff: buildrcs
comphelpgcc3 \
configmgr.uno \
cppcanvaslo \
- deployment \
- deploymentmisclo \
drawinglayerlo \
editenglo \
+ expwrap.uno \
fileacc \
fontconfig \
forlo \
@@ -125,6 +124,7 @@ copy-stuff: buildrcs
fwelo \
fwilo \
fwklo \
+ fsstorage.uno \
gcc3_uno \
i18nisolang1gcc3 \
i18npaperlo \
@@ -187,6 +187,9 @@ copy-stuff: buildrcs
); do \
$(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
done
+# deployment \
+# deploymentmisclo \
+
#
# Then the shared GNU C++ library
$(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so)
@@ -218,6 +221,8 @@ copy-stuff: buildrcs
mkdir -p assets/presets/$$D ; \
echo "content" > assets/presets/$$D/stamp; \
done
+# shell / splash images
+ cp -r $(SRC_ROOT)/icon-themes/galaxy/brand/* assets/program
# Then assets that are unpacked at run-time into the app's data directory.
mkdir -p assets/unpack/etc/fonts
cp fonts.conf assets/unpack/etc/fonts
commit 436e2f870144342aa6bcc28a3a5cea32680eaacf
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 19:53:49 2012 +0000
android: undo broken AnyInput method causing app startup to fail.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index b20d7c4..dfb8855 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -572,11 +572,11 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
bool AndroidSalInstance::AnyInput( sal_uInt16 nType )
{
- (void) nType;
- // FIXME: ideally we should check the input queue to avoid being busy ...
- fprintf (stderr, "FIXME: AnyInput returns true\n");
- // mpApp->inputQueue ? ...
- return true;
+ if( (nType & VCL_INPUT_TIMER) != 0 )
+ return CheckTimeout( false );
+ // FIXME: ideally we should check our input queue here ...
+ fprintf (stderr, "FIXME: AnyInput returns false\n");
+ return false;
}
class AndroidSalSystem : public SvpSalSystem {
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 8de4054..fc923af 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -74,7 +74,7 @@ public:
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual sal_Bool PostEvent( void* pData );
+ virtual sal_Bool PostEvent( void* pData );
virtual void SetTitle( const rtl::OUString& rTitle );
virtual void SetIcon( sal_uInt16 nIcon );
commit c2aab432b172e0d1974139e62f64e36aa3dbfb85
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 17:39:05 2012 +0000
android: get BGR to RGB swap right in conversion
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 02219c8..b20d7c4 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -231,9 +231,9 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
nDestX * 4 /* dest pixel size */ );
for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
{
- dp[x*4 + 0] = sp[x*3 + 0]; // B
+ dp[x*4 + 0] = sp[x*3 + 2]; // R
dp[x*4 + 1] = sp[x*3 + 1]; // G
- dp[x*4 + 2] = sp[x*3 + 2]; // R
+ dp[x*4 + 2] = sp[x*3 + 0]; // B
dp[x*4 + 3] = 255; // A
}
break;
commit 9634eec8e123c0860f2716039570dd91a9839943
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 17:33:40 2012 +0000
android: debug / dump multi-touch events
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 081f11b..02219c8 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -443,11 +443,19 @@ int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent*
}
case AINPUT_EVENT_TYPE_MOTION:
{
- fprintf (stderr, "motion event %d %g %g %s\n",
+ size_t nPoints = AMotionEvent_getPointerCount(event);
+ fprintf (stderr, "motion event %d %g,%g %d points: %s\n",
AMotionEvent_getAction(event),
AMotionEvent_getXOffset(event),
AMotionEvent_getYOffset(event),
+ (int)nPoints,
MotionEdgeFlagsToString(AMotionEvent_getEdgeFlags(event)).getStr());
+ for (size_t i = 0; i < nPoints; i++)
+ fprintf(stderr, "\t%d: %g,%g - pressure %g\n",
+ (int)i,
+ AMotionEvent_getX(event, i),
+ AMotionEvent_getY(event, i),
+ AMotionEvent_getPressure(event, i));
break;
}
default:
commit 755227bf6dd5d8061869e68f5c970780a5e3b53b
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 17:32:09 2012 +0000
android: get non-modal message dialog up, and continue to main app execute
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 6101827..966bebb 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1863,9 +1863,9 @@ int Desktop::Main()
::plasma_now("pre hit execute!");
// For some reason we're not getting a desktop frame or component [odd]
- ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("Title!") );
- aKickStartVCL.SetText( rtl::OUString::createFromAscii("Foo") );
- aKickStartVCL.Execute();
+ ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("My very own title!") );
+ aKickStartVCL.SetText( rtl::OUString::createFromAscii("Delphic Utterance") );
+ aKickStartVCL.Show(); // don't execute - just leave it lying around ....
::plasma_now("hit execute!");
commit 96445c9520a252fdb41c934cc77764c200c086af
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 17:30:27 2012 +0000
android: try to get skeletal fonts into fontconfig setup
diff --git a/android/qa/desktop/fonts.conf b/android/qa/desktop/fonts.conf
index 0e92c5d..64d714c 100644
--- a/android/qa/desktop/fonts.conf
+++ b/android/qa/desktop/fonts.conf
@@ -7,6 +7,27 @@
<dir>/system/fonts</dir>
+ <alias>
+ <family>serif</family>
+ <prefer>
+ <family>DroidSerif</family>
+ <family>Roboto</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>Roboto</family>
+ <family>DroidSerif</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>DroidSansMono</family>
+ </prefer>
+ </alias>
+
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
commit 498fc0b198f81e4f2aa2e69f60b7877f6db3dd0c
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Jan 31 17:22:20 2012 +0000
android: package more components needed for writer
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 876c432..3475248 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -104,13 +104,19 @@ copy-stuff: buildrcs
# Libs and UNO components that we need.
#
for F in $(strip \
+ analysislo \
+ avmedialo \
basebmplo \
basegfxlo \
bootstrap.uno \
+ canvastoolslo \
comphelpgcc3 \
configmgr.uno \
+ cppcanvaslo \
deployment \
deploymentmisclo \
+ drawinglayerlo \
+ editenglo \
fileacc \
fontconfig \
forlo \
@@ -139,6 +145,7 @@ copy-stuff: buildrcs
msfilterlo \
ooxlo \
package2 \
+ reflection.uno \
reg \
saxlo \
sblo \
@@ -150,6 +157,8 @@ copy-stuff: buildrcs
store \
svllo \
svtlo \
+ svxlo \
+ svxcorelo \
test \
tklo \
tllo \
@@ -170,6 +179,11 @@ copy-stuff: buildrcs
xcrlo \
xml2 \
xmlreader \
+ xolo \
+ xstor \
+ \
+ swlo \
+ swdlo \
); do \
$(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
done
commit a322022d9a73c31eb26f0752b528e9e866ce6140
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 17:28:52 2012 +0200
Move assertions before use
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 2a0b3e2..8314c8c 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -291,9 +291,11 @@ void ScFiltersTest::testRangeName()
rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8);
std::cout << aFileFormats[i].pName << " Test" << std::endl;
ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType);
- xDocSh->DoHardRecalc(true);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is());
+
+ xDocSh->DoHardRecalc(true);
+
ScDocument* pDoc = xDocSh->GetDocument();
testRangeNameImpl(pDoc);
@@ -357,9 +359,11 @@ void ScFiltersTest::testContent()
rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8);
std::cout << aFileFormats[i].pName << " Test" << std::endl;
ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType);
- xDocSh->DoHardRecalc(true);
CPPUNIT_ASSERT_MESSAGE("Failed to load universal-content.*", xDocSh.Is());
+
+ xDocSh->DoHardRecalc(true);
+
ScDocument* pDoc = xDocSh->GetDocument();
testContentImpl(pDoc);
xDocSh->DoClose();
commit 2b4ceff9384198352df8540df4835379ed8cc23c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:21:32 2012 +0200
filters_test needs more libraries now when it proceeds further
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 0412f33..84341ab 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -53,11 +53,13 @@ copy-stuff:
# Libs and UNO components that the tests need.
#
for F in $(strip \
+ analysislo \
basebmplo \
basegfxlo \
bootstrap.uno \
comphelpgcc3 \
configmgr.uno \
+ expwrap.uno \
fileacc \
fontconfig \
forlo \
@@ -84,6 +86,7 @@ copy-stuff:
mergedlo \
msfilterlo \
ooxlo \
+ reflection.uno \
reg \
saxlo \
sblo \
@@ -115,6 +118,7 @@ copy-stuff:
xcrlo \
xml2 \
xmlreader \
+ xstor \
); do \
$(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
done
commit b8ea7cff48e4d10e51bec8f2d595323982d8f51b
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:20:14 2012 +0200
Call lo_dlclose() on Android
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 792f0cd..d600bb8 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -236,7 +236,11 @@ void SAL_CALL osl_unloadModule(oslModule hModule)
if (hModule)
{
#ifndef NO_DL_FUNCTIONS
+#ifdef ANDROID
+ int nRet = lo_dlclose(hModule);
+#else
int nRet = dlclose(hModule);
+#endif
#if OSL_DEBUG_LEVEL > 1
if (nRet != 0)
commit 2c11a8fed62ed6b3aefc2a00cc0ae9c40e9b4a94
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:19:17 2012 +0200
Add lo_dlclose()
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index b9ed8dc..1140515 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -960,6 +960,19 @@ lo_dladdr(void *addr,
}
__attribute__ ((visibility("default")))
+int
+lo_dlclose(void *handle)
+{
+ /* As we don't know when the reference count for a dlopened shared
+ * object drops to zero, we wouldn't know when to remove it from
+ * our list, so we can't call dlclose().
+ */
+ LOGI("lo_dlclose(%p)", handle);
+
+ return 0;
+}
+
+__attribute__ ((visibility("default")))
void *
lo_apkentry(const char *filename,
size_t *size)
diff --git a/sal/inc/osl/detail/android-bootstrap.h b/sal/inc/osl/detail/android-bootstrap.h
index 6539687..bd453b3 100644
--- a/sal/inc/osl/detail/android-bootstrap.h
+++ b/sal/inc/osl/detail/android-bootstrap.h
@@ -51,6 +51,8 @@ void *lo_dlsym(void *handle,
int lo_dladdr(void *addr,
Dl_info *info);
+int lo_dlclose(void *handle);
+
void *lo_apkentry(const char *filename,
size_t *size);
commit 6e2e4c4c674ad2b6d1b3aa3759c7c838a0b16728
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 15:24:06 2012 +0200
Log time taken by dlopen()
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index b5a0a05..b9ed8dc 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <unistd.h>
#include <fcntl.h>
@@ -815,6 +816,8 @@ lo_dlopen(const char *library)
int i;
int found;
+ struct timeval tv0, tv1, tvdiff;
+
rover = loaded_libraries;
while (rover != NULL &&
strcmp(rover->name, library) != 0)
@@ -869,8 +872,13 @@ lo_dlopen(const char *library)
}
free_ptrarray((void **) needed);
+ gettimeofday(&tv0, NULL);
p = dlopen(full_name, RTLD_LOCAL);
- LOGI("dlopen(%s) = %p", full_name, p);
+ gettimeofday(&tv1, NULL);
+ timersub(&tv1, &tv0, &tvdiff);
+ LOGI("dlopen(%s) = %p, %ld.%03lds",
+ full_name, p,
+ (long) tvdiff.tv_sec, (long) tvdiff.tv_usec / 1000);
free(full_name);
if (p == NULL)
LOGE("lo_dlopen: Error from dlopen(%s): %s", library, dlerror());
commit 73a47ed3750bde3de1f8abcf0005ee068b1ed96e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 14:06:37 2012 +0200
Set TMPDIR for osl_getTempDirURL()
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index a51315b..ac5d027 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -143,6 +143,9 @@ public class Bootstrap extends NativeActivity
argv = Arrays.copyOfRange(argv, 1, argv.length-1);
}
+ // TMPDIR is used by osl_getTempDirURL()
+ putenv("TMPDIR=" + getCacheDir().getAbsolutePath());
+
// argv[0] will be replaced by android_main() in lo-bootstrap.c by the
// pathname of the mainLibrary.
String[] newargv = new String[argv.length + 1];
commit 427edef2c780b40513af0491d5cbe865233d0650
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 13:57:11 2012 +0200
putenv() does seem to be process-wide
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 9e21056..a51315b 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -136,10 +136,7 @@ public class Bootstrap extends NativeActivity
String[] argv = CommandLine.split(cmdLine);
- // Handle env var assignments in the command line. Actually
- // not sure if this works, are environments per-thread in
- // Android? This code runs in a different thread than that in
- // which lo_main etc will run.
+ // Handle env var assignments in the command line.
while (argv.length > 0 &&
argv[0].matches("[A-Z_]+=.*")) {
putenv(argv[0]);
commit 299fa646833c1e00448a039f57510a76c6cbb250
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 13:53:12 2012 +0200
No need to wait for debugger here on Android, this code does seem to work
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 962d7bf..edd4eec 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -1055,14 +1055,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
int DestFileFD=0;
int nRet=0;
-#ifdef ANDROID
- volatile int beenhere = 0;
- if (!beenhere) {
- beenhere++;
- fprintf(stderr, "Sleeping NOW, start ndk-gdb!\n");
- ::sleep(20);
- }
-#endif
if (osl_openFilePath(pszSourceFileName,
&SourceFileFH,
osl_File_OpenFlag_Read|osl_File_OpenFlag_NoLock|osl_File_OpenFlag_NoExcl) != osl_File_E_None)
commit 7c6cc25249f708805c4073399b09a17ec7ac32f7
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Jan 30 16:21:04 2012 +0000
android: add start of keycode mapping
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 31b1560..081f11b 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -81,6 +81,123 @@ static rtl::OString KeyMetaStateToString(int32_t nFlags)
return aStr.makeStringAndClear();
}
+static sal_uInt16 KeyMetaStateToCode(AInputEvent *event)
+{
+ sal_uInt16 nCode = 0;
+ int32_t nFlags = AKeyEvent_getMetaState(event);
+ if (nFlags & AMETA_SHIFT_ON)
+ nCode |= KEY_SHIFT;
+ if (nFlags & AMETA_SYM_ON)
+ nCode |= KEY_MOD1;
+ if (nFlags & AMETA_ALT_ON)
+ nCode |= KEY_MOD2;
+ return nCode;
+}
+
+static sal_uInt16 KeyToCode(AInputEvent *event)
+{
+ sal_uInt16 nCode = 0;
+ switch (AKeyEvent_getKeyCode(event)) {
+#define MAP(a,b) \
+ case AKEYCODE_##a: nCode = KEY_##b; break
+#define MAP_SAME(a) MAP(a,a)
+
+ MAP_SAME(HOME);
+ MAP_SAME(0); MAP_SAME(1); MAP_SAME(2); MAP_SAME(3); MAP_SAME(4);
+ MAP_SAME(5); MAP_SAME(6); MAP_SAME(7); MAP_SAME(8); MAP_SAME(9);
+
+ MAP_SAME(A); MAP_SAME(B); MAP_SAME(C); MAP_SAME(D);
+ MAP_SAME(E); MAP_SAME(F); MAP_SAME(G); MAP_SAME(H);
+ MAP_SAME(I); MAP_SAME(J); MAP_SAME(K); MAP_SAME(L);
+ MAP_SAME(M); MAP_SAME(N); MAP_SAME(O); MAP_SAME(P);
+ MAP_SAME(Q); MAP_SAME(R); MAP_SAME(S); MAP_SAME(T);
+ MAP_SAME(U); MAP_SAME(V); MAP_SAME(W); MAP_SAME(X);
+ MAP_SAME(Y); MAP_SAME(Z);
+
+ MAP_SAME(TAB); MAP_SAME(SPACE); MAP_SAME(COMMA);
+
+ MAP(ENTER,RETURN);
+ MAP(PAGE_UP, PAGEUP);
+ MAP(PAGE_DOWN, PAGEDOWN);
+ MAP(DEL, DELETE);
+ MAP(PERIOD, POINT);
+
+ case AKEYCODE_BACK: // escape ?
+ case AKEYCODE_UNKNOWN:
+ case AKEYCODE_SOFT_LEFT:
+ case AKEYCODE_SOFT_RIGHT:
+ case AKEYCODE_CALL:
+ case AKEYCODE_ENDCALL:
+ case AKEYCODE_STAR:
+ case AKEYCODE_POUND:
+ case AKEYCODE_DPAD_UP:
+ case AKEYCODE_DPAD_DOWN:
+ case AKEYCODE_DPAD_LEFT:
+ case AKEYCODE_DPAD_RIGHT:
+ case AKEYCODE_DPAD_CENTER:
+ case AKEYCODE_VOLUME_UP:
+ case AKEYCODE_VOLUME_DOWN:
+ case AKEYCODE_POWER:
+ case AKEYCODE_CAMERA:
+ case AKEYCODE_CLEAR:
+ case AKEYCODE_ALT_LEFT:
+ case AKEYCODE_ALT_RIGHT:
+ case AKEYCODE_SHIFT_LEFT:
+ case AKEYCODE_SHIFT_RIGHT:
+ case AKEYCODE_SYM:
+ case AKEYCODE_EXPLORER:
+ case AKEYCODE_ENVELOPE:
+ case AKEYCODE_GRAVE:
+ case AKEYCODE_MINUS:
+ case AKEYCODE_EQUALS:
+ case AKEYCODE_LEFT_BRACKET:
+ case AKEYCODE_RIGHT_BRACKET:
+ case AKEYCODE_BACKSLASH:
+ case AKEYCODE_SEMICOLON:
+ case AKEYCODE_APOSTROPHE:
+ case AKEYCODE_SLASH:
+ case AKEYCODE_AT:
+ case AKEYCODE_NUM:
+ case AKEYCODE_HEADSETHOOK:
+ case AKEYCODE_FOCUS: // not widget, but camera focus
+ case AKEYCODE_PLUS:
+ case AKEYCODE_MENU:
+ case AKEYCODE_NOTIFICATION:
+ case AKEYCODE_SEARCH:
+ case AKEYCODE_MEDIA_PLAY_PAUSE:
+ case AKEYCODE_MEDIA_STOP:
+ case AKEYCODE_MEDIA_NEXT:
+ case AKEYCODE_MEDIA_PREVIOUS:
+ case AKEYCODE_MEDIA_REWIND:
+ case AKEYCODE_MEDIA_FAST_FORWARD:
+ case AKEYCODE_MUTE:
+ case AKEYCODE_PICTSYMBOLS:
+ case AKEYCODE_SWITCH_CHARSET:
+ case AKEYCODE_BUTTON_A:
+ case AKEYCODE_BUTTON_B:
+ case AKEYCODE_BUTTON_C:
+ case AKEYCODE_BUTTON_X:
+ case AKEYCODE_BUTTON_Y:
+ case AKEYCODE_BUTTON_Z:
+ case AKEYCODE_BUTTON_L1:
+ case AKEYCODE_BUTTON_R1:
+ case AKEYCODE_BUTTON_L2:
+ case AKEYCODE_BUTTON_R2:
+ case AKEYCODE_BUTTON_THUMBL:
+ case AKEYCODE_BUTTON_THUMBR:
+ case AKEYCODE_BUTTON_START:
+ case AKEYCODE_BUTTON_SELECT:
+ case AKEYCODE_BUTTON_MODE:
+ fprintf (stderr, "un-mapped keycode %d\n", nCode);
+ nCode = 0;
+ break;
+#undef MAP_SAME
+#undef MAP
+ }
+ fprintf (stderr, "mapped %d -> %d\n", AKeyEvent_getKeyCode(event), nCode);
+ return nCode;
+}
+
static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
const basebmp::BitmapDeviceSharedPtr& aDev,
const ARect &rSrcRect,
@@ -174,8 +291,8 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
int32_t *p = (int32_t *)aOutBuffer.bits;
for (int32_t y = 0; y < aOutBuffer.height; y++)
{
- for (int32_t x = 0; x < aOutBuffer.stride / 2; x++)
- *p++ = (y << 24) + x;
+ for (int32_t x = 0; x < aOutBuffer.stride; x++)
+ *p++ = (y << 24) + (x << 10) + 0xff ;
}
#endif
@@ -199,7 +316,12 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
ANativeWindow_unlockAndPost(pWindow);
fprintf (stderr, "done render!\n");
- mbQueueReDraw = true; // keep at it ! false;
+ mbQueueReDraw = false;
+}
+
+SalFrame *AndroidSalInstance::getFocusFrame() const
+{
+ return !getFrames().empty() ? *getFrames().begin() : NULL;
}
static const char *app_cmd_name(int cmd)
@@ -280,38 +402,60 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
int32_t AndroidSalInstance::onInputEvent (struct android_app* app, AInputEvent* event)
{
- fprintf (stderr, "input event for app %p, event %p type %d source %d device id %d\n",
- app, event,
- AInputEvent_getType(event),
- AInputEvent_getSource(event),
- AInputEvent_getDeviceId(event));
-
- switch (AInputEvent_getType(event))
- {
- case AINPUT_EVENT_TYPE_KEY:
- {
- int32_t nAction = AKeyEvent_getAction(event);
- fprintf (stderr, "key event keycode %d '%s' %s\n",
- AKeyEvent_getKeyCode(event),
- nAction == AKEY_EVENT_ACTION_DOWN ? "down" :
- nAction == AKEY_EVENT_ACTION_UP ? "up" : "multiple",
- KeyMetaStateToString(AKeyEvent_getMetaState(event)).getStr());
- break;
- }
- case AINPUT_EVENT_TYPE_MOTION:
- {
- fprintf (stderr, "motion event %d %g %g %s\n",
- AMotionEvent_getAction(event),
- AMotionEvent_getXOffset(event),
- AMotionEvent_getYOffset(event),
- MotionEdgeFlagsToString(AMotionEvent_getEdgeFlags(event)).getStr());
- break;
- }
- default:
- fprintf (stderr, "unknown event type %p %d\n",
- event, AInputEvent_getType(event));
- }
- return 1; // handled 0 for not ...
+ bool bHandled;
+ fprintf (stderr, "input event for app %p, event %p type %d source %d device id %d\n",
+ app, event,
+ AInputEvent_getType(event),
+ AInputEvent_getSource(event),
+ AInputEvent_getDeviceId(event));
+
+ switch (AInputEvent_getType(event))
+ {
+ case AINPUT_EVENT_TYPE_KEY:
+ {
+ int32_t nAction = AKeyEvent_getAction(event);
+ fprintf (stderr, "key event keycode %d '%s' %s\n",
+ AKeyEvent_getKeyCode(event),
+ nAction == AKEY_EVENT_ACTION_DOWN ? "down" :
+ nAction == AKEY_EVENT_ACTION_UP ? "up" : "multiple",
+ KeyMetaStateToString(AKeyEvent_getMetaState(event)).getStr());
+
+ // FIXME: the whole SALEVENT_KEYMODCHANGE stuff is going to be interesting
+ // can we really emit that ? no input method madness required though.
+ sal_uInt16 nEvent;
+ SalKeyEvent aEvent;
+ int64_t nNsTime = AKeyEvent_getEventTime(event);
+
+ nEvent = (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_UP ?
+ SALEVENT_KEYUP : SALEVENT_KEYINPUT);
+ aEvent.mnTime = nNsTime / (1000 * 1000);
+ aEvent.mnCode = KeyToCode(event);
+ aEvent.mnCode |= KeyMetaStateToCode(event);
+ aEvent.mnCharCode = 'a'; // the unicode of it all ...
+ aEvent.mnRepeat = AKeyEvent_getRepeatCount(event);
+
+ SalFrame *pFocus = getFocusFrame();
+ if (pFocus)
+ bHandled = pFocus->CallCallback( nEvent, &aEvent );
+ else
+ fprintf (stderr, "no focused frame to emit event on\n");
+ break;
+ }
+ case AINPUT_EVENT_TYPE_MOTION:
+ {
+ fprintf (stderr, "motion event %d %g %g %s\n",
+ AMotionEvent_getAction(event),
+ AMotionEvent_getXOffset(event),
+ AMotionEvent_getYOffset(event),
+ MotionEdgeFlagsToString(AMotionEvent_getEdgeFlags(event)).getStr());
+ break;
+ }
+ default:
+ fprintf (stderr, "unknown input event type %p %d\n",
+ event, AInputEvent_getType(event));
+ break;
+ }
+ return bHandled ? 1 : 0;
}
AndroidSalInstance *AndroidSalInstance::getInstance()
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 7372f75..e947737 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -54,9 +54,10 @@ public:
virtual bool AnyInput( sal_uInt16 nType );
// incoming android event handlers:
- void onAppCmd (struct android_app* app, int32_t cmd);
- int32_t onInputEvent (struct android_app* app, AInputEvent* event);
- void RedrawWindows(ANativeWindow *pWindow);
+ void onAppCmd (struct android_app* app, int32_t cmd);
+ int32_t onInputEvent (struct android_app* app, AInputEvent* event);
+ void RedrawWindows(ANativeWindow *pWindow);
+ SalFrame *getFocusFrame() const;
protected:
virtual void DoReleaseYield( int nTimeoutMS );
struct android_app *mpApp;
commit 4f989ddb0dc644c46dee97f4656a03fd24813d00
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Jan 30 13:52:50 2012 +0000
android: ask for RGBA visual, and flip images the right way up.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index a12d7ac..31b1560 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -102,7 +102,7 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
for (unsigned int y = 0; y < (unsigned int)(aSrcRect.bottom - aSrcRect.top); y++)
{
- unsigned char *sp = ( pSrc + nStride * (y + aSrcRect.top) +
+ unsigned char *sp = ( pSrc + nStride * (aSrcRect.bottom - aSrcRect.top - y - 1) +
aSrcRect.left * 3 /* src pixel size */ );
switch (pOutBuffer->format) {
@@ -238,10 +238,13 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
ARect aRect = { 0, 0, 0, 0 };
aRect.right = ANativeWindow_getWidth(pWindow);
aRect.bottom = ANativeWindow_getHeight(pWindow);
- fprintf (stderr, "we have an app window ! %p %dx%x (%d)\n",
+ int nRet = ANativeWindow_setBuffersGeometry(
+ pWindow, ANativeWindow_getWidth(pWindow),
+ ANativeWindow_getHeight(pWindow),
+ WINDOW_FORMAT_RGBA_8888);
+ fprintf (stderr, "we have an app window ! %p %dx%x (%d) set %d\n",
pWindow, aRect.right, aRect.bottom,
- ANativeWindow_getFormat(pWindow));
-
+ ANativeWindow_getFormat(pWindow), nRet);
break;
}
case APP_CMD_WINDOW_RESIZED:
commit a6e06bdbd3d22ce995c2bc8e4d2dd82a3854f1c4
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat Jan 28 00:03:11 2012 +0000
android: add debug hooks through app.cxx, comment chunks and add a dialog
without the dialog, the main window never appears to get shown.
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 91c7531..6101827 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -102,6 +102,8 @@
#include <sys/wait.h>
#endif
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
@@ -1503,12 +1505,16 @@ int Desktop::Main()
ResMgr::SetReadStringHook( ReplaceStringHookProc );
+// ::plasma_now("after desktoppy bits"); - fine to here ...
+
// Startup screen
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
OpenSplashScreen();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
SetSplashScreenProgress(10);
+
+// ::plasma_now("after splash open");
{
UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
if ( instErr_fin != UserInstall::E_None)
@@ -1536,6 +1542,8 @@ int Desktop::Main()
{
RegisterServices( xSMgr );
+// ::plasma_now("registered services");
+
SetSplashScreenProgress(25);
#ifndef UNX
@@ -1580,6 +1588,8 @@ int Desktop::Main()
if ( !InitializeConfiguration() )
return EXIT_FAILURE;
+// ::plasma_now("init configuration");
+
SetSplashScreenProgress(30);
// set static variable to enabled/disable crash reporter
@@ -1597,6 +1607,8 @@ int Desktop::Main()
String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
delete pLabelResMgr;
+// ::plasma_now("after title string");
+
#ifdef DBG_UTIL
//include version ID in non product builds
::rtl::OUString aDefault(RTL_CONSTASCII_USTRINGPARAM("development"));
@@ -1613,6 +1625,8 @@ int Desktop::Main()
SetSplashScreenProgress(40);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
+// ::plasma_now("unrestricted folders"); -- got this.
+
// Check special env variable
std::vector< String > aUnrestrictedFolders;
svt::getUnrestrictedFolders( aUnrestrictedFolders );
@@ -1633,6 +1647,8 @@ int Desktop::Main()
( xSMgr->createInstance(
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
+ ::plasma_now("done global event broadcaster");
+
/* ensure existance of a default window that messages can be dispatched to
This is for the benefit of testtool which uses PostUserEvent extensively
and else can deadlock while creating this window from another tread while
@@ -1640,6 +1656,7 @@ int Desktop::Main()
*/
Application::GetDefaultDevice();
+#ifndef ANDROID
// Check if bundled or shared extensions were added /removed
// and process those extensions (has to be done before checking
// the extension dependencies!
@@ -1657,6 +1674,7 @@ int Desktop::Main()
pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
Migration::migrateSettingsIfNecessary();
+#endif
// keep a language options instance...
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
@@ -1668,6 +1686,8 @@ int Desktop::Main()
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
+ ::plasma_now("invoked OnStartupApp");
+
SetSplashScreenProgress(50);
// Backing Component
@@ -1697,6 +1717,8 @@ int Desktop::Main()
aMiscOptions.SetUseSystemFileDialog( sal_False );
}
+ ::plasma_now("nearly there !");
+
if ( !pExecGlobals->bRestartRequested )
{
if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsQuickstart()) &&
@@ -1766,6 +1788,8 @@ int Desktop::Main()
aOptions.SetVCLSettings();
SetSplashScreenProgress(60);
+ ::plasma_now("setup appearance !");
+
if ( !pExecGlobals->bRestartRequested )
{
Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
@@ -1799,6 +1823,8 @@ int Desktop::Main()
// Release solar mutex just before we wait for our client to connect
int nAcquireCount = Application::ReleaseSolarMutex();
+ ::plasma_now("wait client connect !");
+
// Post user event to startup first application component window
// We have to send this OpenClients message short before execute() to
// minimize the risk that this message overtakes type detection contruction!!
@@ -1817,6 +1843,8 @@ int Desktop::Main()
// call Application::Execute to process messages in vcl message loop
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
+ ::plasma_now("before java foo !");
+
try
{
// The JavaContext contains an interaction handler which is used when
@@ -1832,6 +1860,15 @@ int Desktop::Main()
// if this run of the office is triggered by restart, some additional actions should be done
DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() );
+ ::plasma_now("pre hit execute!");
+
+ // For some reason we're not getting a desktop frame or component [odd]
+ ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("Title!") );
+ aKickStartVCL.SetText( rtl::OUString::createFromAscii("Foo") );
+ aKickStartVCL.Execute();
+
+ ::plasma_now("hit execute!");
+
Execute();
}
}
commit f231418c5ba9bed32a4058ba0a9cdcfb16bb2ee4
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat Jan 28 00:02:35 2012 +0000
android: unwind horrific event dispatching bug causing all the grief.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index cf93145..a12d7ac 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -32,15 +32,16 @@
#include <jni.h>
#include <android/log.h>
#include <android/looper.h>
-#define EGL_EGLEXT_PROTOTYPES
-#include <EGL/eglext.h>
#include <osl/detail/android-bootstrap.h>
#include <osl/detail/android_native_app_glue.h>
#include <rtl/strbuf.hxx>
-#define ANDROID_EGL
-#undef ANDROID_EGL_LOCK
-#undef ANDROID_PIXELS
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
+void plasma_now(const char *msg)
+{
+ fprintf (stderr, "Skipped plasma '%s' !\n", msg);
+}
class AndroidSalData : public SalGenericData
{
@@ -94,60 +95,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
sal_Int32 nStride = aDev->getScanlineStride();
unsigned char *pSrc = aSrcData.get();
-#ifdef ANDROID_EGL
- (void)pOutBuffer;
- GLuint nTexture;
- glGenTextures (1, &nTexture);
- glBindTexture(GL_TEXTURE_2D,nTexture);
- // Pixels to texture:
- fprintf (stderr, "before create texure '%d'\n", glGetError());
- glTexImage2D(GL_TEXTURE_2D, 0 /* level */, GL_RGB,
- nStride / 3, aDevSize.getY(),
- 0 /* border */, GL_RGB, GL_UNSIGNED_BYTE,
- pSrc);
- fprintf (stderr, "created texure '%d'\n", glGetError());
-
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
-
- glEnable(GL_TEXTURE_2D);
-
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ZERO, GL_SRC_COLOR);
- glDisable(GL_LIGHTING);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-
- glViewport(0, 0, aDevSize.getX(), aDevSize.getY());
-
- glBindTexture(GL_TEXTURE_2D,nTexture);
-
- GLfloat aVertices[] = { 0, 0,
- 0, aDevSize.getY(),
- aDevSize.getX(), aDevSize.getY(),
- aDevSize.getX(), 0 };
- glVertexPointer(2, GL_FLOAT, 0, aVertices);
- fprintf (stderr, "after set vertex '%d'\n", glGetError());
- glEnableClientState(GL_VERTEX_ARRAY);
- glColor4f(0.5f, 0.5f, 1.0f, 1.0f);
- glDrawArrays (GL_TRIANGLE_STRIP, 0, 4);
-// glTexCoordPointer(2, GL_FLOAT, 0, aVertices);
- fprintf (stderr, "after draw arrays '%d'\n", glGetError());
-
-// glDisable(GL_TEXTURE_2D);
-
- // free the texture
-// glDeleteTextures(1,&nTexture);
-#endif
-
-#ifdef ANDROID_PIXELS
// FIXME: do some cropping goodness on aSrcRect to ensure no overflows etc.
ARect aSrcRect = rSrcRect;
@@ -165,7 +112,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
pOutBuffer->stride * 4 * (y + nDestY) +
nDestX * 4 /* dest pixel size */ );
- fprintf (stderr, "y %d, sp %p dp %p\n", y, sp, dp);
for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
{
dp[x*4 + 0] = sp[x*3 + 0]; // B
@@ -180,7 +126,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
pOutBuffer->stride * 2 * (y + nDestY) +
nDestX * 2 /* dest pixel size */ );
- fprintf (stderr, "y %d, sp %p dp %p\n", y, sp, dp);
for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
{
unsigned char b = sp[x*3 + 0]; // B
@@ -196,7 +141,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
break;
}
}
-#endif // ANDROID_PIXELS
fprintf (stderr, "done blit!\n");
}
@@ -214,63 +158,16 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
ANativeWindow_Buffer aOutBuffer;
memset ((void *)&aOutBuffer, 0, sizeof (aOutBuffer));
-#ifdef ANDROID_EGL
- if (mxDisplay == EGL_NO_DISPLAY)
- {
- fprintf (stderr, "wait for the setup\n");
- return;
- }
-
- EGLBoolean nRet = eglMakeCurrent(mxDisplay, mxSurface, mxSurface, mxContext);
- fprintf (stderr, "make current context %d\n", nRet);
-
- // Just fill the screen with a color.
- static int a = 0;
- a++;
- // glClearColor((a & 0x1) ? 1.0 : 0.0, (a & 0x2) ? 1.0 : 0.0, 0.0, 1);
- // glClear(GL_COLOR_BUFFER_BIT);
-
-#ifdef ANDROID_EGL_LOCK // failed to do anything !
- const EGLint aAttribs[] = {
- EGL_MAP_PRESERVE_PIXELS_KHR, EGL_FALSE,
- EGL_LOCK_USAGE_HINT_KHR, EGL_WRITE_SURFACE_BIT_KHR,
- EGL_NONE
- };
- fprintf (stderr, "pre-egl-lock\n");
- nRet = eglLockSurfaceKHR(mxDisplay, mxSurface, aAttribs);
- fprintf (stderr, "eglLockSurface %d\n", nRet);
- nRet = eglQuerySurface(mxDisplay, mxSurface,
- EGL_BITMAP_POINTER_KHR, (EGLint *)&aOutBuffer.bits);
- fprintf (stderr, "get bytes %p : %d\n", aOutBuffer.bits, nRet);
- EGLint nStride = 0;
- nRet = eglQuerySurface(mxDisplay, mxSurface,
- EGL_BITMAP_PITCH_KHR, &nStride);
- fprintf (stderr, "get stride %ld : %d\n", (long)nStride, nRet);
-
- EGLint nWidth = 0, nHeight = 0;
- eglQuerySurface(mxDisplay, mxSurface, EGL_WIDTH, &nWidth);
- eglQuerySurface(mxDisplay, mxSurface, EGL_HEIGHT, &nHeight);
- fprintf (stderr, "get width height %ld,%ld\n", (long)nWidth, (long)nHeight);
-
- aOutBuffer.stride = nStride / 2; // FIXME - assuming 565
- aOutBuffer.width = nWidth;
- aOutBuffer.height = nHeight;
-#endif
-
-#endif // ANDROID_EGL
-
-#ifdef ANDROID_PIXELS
- ARect aRect;
+// ARect aRect;
fprintf (stderr, "pre lock #3\n");
- int32_t nRet = ANativeWindow_lock(pWindow, &aOutBuffer, &aRect);
- fprintf (stderr, "locked window %d returned rect: %d,%d->%d,%d "
+ int32_t nRet = ANativeWindow_lock(pWindow, &aOutBuffer, NULL);
+ fprintf (stderr, "locked window %d returned " // rect: %d,%d->%d,%d "
"buffer: %dx%d stride %d, format %d, bits %p\n",
- nRet, aRect.left, aRect.top, aRect.right, aRect.bottom,
+ nRet, // aRect.left, aRect.top, aRect.right, aRect.bottom,
aOutBuffer.width, aOutBuffer.height, aOutBuffer.stride,
aOutBuffer.format, aOutBuffer.bits);
if (aOutBuffer.bits != NULL)
{
-#endif // ANDROID_PIXELS
#if 1 // pre-'clean' the buffer with cruft:
// hard-code / guess at a format ...
@@ -286,26 +183,23 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
for ( it = getFrames().begin(); it != getFrames().end(); it++ )
{
SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it);
- BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
- }
-#ifdef ANDROID_PIXELS
+ if (pFrame->IsVisible())
+ {
+ // FIXME: force a re-draw - this appears not to happen much otherwis
+ pFrame->PostPaint(true);
+ BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
+ }
+ else // Sucky the frame is invisible - why !?
+ fprintf (stderr, "invisible frame\n");
+ }
}
else
fprintf (stderr, "no buffer for locked window\n");
ANativeWindow_unlockAndPost(pWindow);
-#endif
-
-#ifdef ANDROID_EGL
-#ifdef ANDROID_EGL_LOCK
- nRet = eglUnlockSurfaceKHR(mxDisplay, mxSurface);
- fprintf (stderr, "eGL unlock %d\n", nRet);
-#endif
- eglSwapBuffers(mxDisplay, mxSurface);
-#endif
fprintf (stderr, "done render!\n");
- mbQueueReDraw = false;
+ mbQueueReDraw = true; // keep at it ! false;
}
static const char *app_cmd_name(int cmd)
@@ -348,60 +242,6 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
pWindow, aRect.right, aRect.bottom,
ANativeWindow_getFormat(pWindow));
-#ifdef ANDROID_EGL
- const EGLint attribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_BLUE_SIZE, 8,
- EGL_GREEN_SIZE, 8,
- EGL_RED_SIZE, 8,
- EGL_NONE
- };
- EGLint w, h, format;
- EGLint numConfigs;
- EGLConfig config;
- EGLSurface surface;
- EGLContext context;
-
- EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-
- eglInitialize(display, 0, 0);
-
- /* Here, the application chooses the configuration it desires. In this
- * sample, we have a very simplified selection process, where we pick
- * the first EGLConfig that matches our criteria */
- eglChooseConfig(display, attribs, &config, 1, &numConfigs);
-
- /* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is
- * guaranteed to be accepted by ANativeWindow_setBuffersGeometry().
- * As soon as we picked a EGLConfig, we can safely reconfigure the
- * ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */
- eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);
-
- ANativeWindow_setBuffersGeometry(mpApp->window, 0, 0, format);
-
- surface = eglCreateWindowSurface(display, config, mpApp->window, NULL);
- context = eglCreateContext(display, config, NULL, NULL);
-
- if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
- fprintf(stderr, "Unable to eglMakeCurrent");
- break;
- }
-
- eglQuerySurface(display, surface, EGL_WIDTH, &w);
- eglQuerySurface(display, surface, EGL_HEIGHT, &h);
-
- mxDisplay = display;
- mxContext = context;
- mxSurface = surface;
-
- // Initialize GL state:
- // FIXME: surely all this glContext - **per-thread** - !
-
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
- glEnable(GL_CULL_FACE);
- glShadeModel(GL_SMOOTH);
- glDisable(GL_DEPTH_TEST);
-#endif
break;
}
case APP_CMD_WINDOW_RESIZED:
@@ -418,7 +258,7 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
case APP_CMD_WINDOW_REDRAW_NEEDED:
{
fprintf (stderr, "redraw needed\n");
- AndroidSalInstance::getInstance()->RedrawWindows (pWindow);
+ mbQueueReDraw = true;
break;
}
@@ -536,24 +376,43 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
fprintf (stderr, "DoReleaseYield #2 %d thread: %d ms\n",
nTimeoutMS, (int)pthread_self());
- void *outData = NULL;
+#ifndef PLASMA
+
+ struct android_poll_source *pSource = NULL;
int outFd = 0, outEvents = 0;
if (mbQueueReDraw)
nTimeoutMS = 0;
- int nRet = ALooper_pollAll(nTimeoutMS, &outFd, &outEvents, &outData);
- fprintf (stderr, "ret #3 %d %d %d %p\n", nRet, outFd, outEvents, outData);
+ int nRet;
+ while ((nRet = ALooper_pollAll (nTimeoutMS, &outFd, &outEvents, (void**)&pSource)) >= 0)
+ {
+ fprintf (stderr, "ret #5 %d %d %d %p\n", nRet, outFd, outEvents, pSource);
+ // acquire yield mutex again
+ AcquireYieldMutex(nAcquireCount);
+
+ // Process this event.
+ if (pSource != NULL)
+ pSource->process(mpApp, pSource);
+
+ nAcquireCount = ReleaseYieldMutex();
+ }
// acquire yield mutex again
AcquireYieldMutex(nAcquireCount);
- // FIXME: this is more or less deranged: why can we not
- // set a callback in the native app glue's ALooper_addFd ?
- if (nRet == LOOPER_ID_MAIN)
- mpApp->cmdPollSource.process(mpApp, &mpApp->cmdPollSource);
- else if (nRet == LOOPER_ID_INPUT)
- mpApp->inputPollSource.process(mpApp, &mpApp->inputPollSource);
+ if (mbQueueReDraw)
+ AndroidSalInstance::getInstance()->RedrawWindows (mpApp->window);
+
+#else
+ static int nPlasma = 0;
+ char buffer[128];
+ sprintf (buffer, "yield %d", nPlasma++);
+ plasma_now(buffer);
+
+ // acquire yield mutex again
+ AcquireYieldMutex(nAcquireCount);
+#endif
}
bool AndroidSalInstance::AnyInput( sal_uInt16 nType )
@@ -667,4 +526,5 @@ int AndroidSalSystem::ShowNativeDialog( const rtl::OUString& rTitle,
return 0;
}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 56869c2..89744ae 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -150,11 +150,12 @@ sal_Bool SvpSalFrame::PostEvent( void* pData )
return sal_True;
}
-void SvpSalFrame::PostPaint() const
+void SvpSalFrame::PostPaint(bool bImmediate) const
{
if( m_bVisible )
{
SalPaintEvent aPEvt(0, 0, maGeometry.nWidth, maGeometry.nHeight);
+ aPEvt.mbImmediateUpdate = bImmediate;
CallCallback( SALEVENT_PAINT, &aPEvt );
}
}
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 56ea818..e330dcb 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -301,7 +301,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// this would be a good time to post a paint
const SvpSalFrame* pSvpFrame = static_cast<const SvpSalFrame*>(it->m_pFrame);
- pSvpFrame->PostPaint();
+ pSvpFrame->PostPaint(false);
}
}
}
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 37e0ae9..8de4054 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -65,7 +65,7 @@ public:
void GetFocus();
void LoseFocus();
- void PostPaint() const;
+ void PostPaint(bool bImmediate) const;
// SvpElement
virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
@@ -126,6 +126,7 @@ public:
/*TODO: functional implementation */
virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
virtual void SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; }
+ bool IsVisible() { return m_bVisible; }
};
#endif // _SVP_SVPFRAME_HXX
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index cf98fb8..4db7b12 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -155,12 +155,16 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
}
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
// =======================================================================
int ImplSVMain()
{
// The 'real' SVMain()
RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::SVMain" );
+// plasma_now("top"); - works here
+
ImplSVData* pSVData = ImplGetSVData();
DBG_ASSERT( pSVData->mpApp, "no instance of class Application" );
@@ -175,6 +179,7 @@ int ImplSVMain()
{
// Application-Main rufen
pSVData->maAppData.mbInAppMain = sal_True;
+// plasma_now("after vcl init"); - works here
nReturn = pSVData->mpApp->Main();
pSVData->maAppData.mbInAppMain = sal_False;
}
commit 513e187c431ef1b7e0e2504263c12cc9083252d3
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Jan 27 18:35:21 2012 +0200
Drop accidental #include
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 5813138..b5a0a05 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -47,7 +47,7 @@
#include <android/log.h>
#include "uthash.h"
-#include <osl/thread.h>
+
#include "osl/detail/android-bootstrap.h"
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
commit f0e5ca4d0be13e8494ad2de4c97a192537388ec5
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Jan 27 12:15:14 2012 +0200
We don't use Library_vclplug_svp on Android any more
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 47da575..0a91f87 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -79,10 +79,4 @@ $(eval $(call gb_Module_add_targets,vcl,\
))
endif
-ifeq ($(GUIBASE),android)
-$(eval $(call gb_Module_add_targets,vcl,\
- Library_vclplug_svp \
-))
-endif
-
# vim: set noet sw=4 ts=4:
commit 0a1fb4b618ad56fe11071a60105dbf70cc38892e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Jan 27 11:32:22 2012 +0200
Tweak the st_mode returned by lo_apk_lstat() to match reality better
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index eee5f1f..5813138 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1081,7 +1081,7 @@ new_stat(const char *path,
struct tm tm;
memset(statp, 0, sizeof(*statp));
- statp->st_mode = mode | S_IRUSR | S_IRGRP | S_IROTH;
+ statp->st_mode = mode | S_IRUSR;
statp->st_nlink = 1;
statp->st_uid = getuid();
@@ -1133,7 +1133,7 @@ lo_apk_lstat(const char *path,
if (*pn == '/') {
pn++;
if (!pn[0])
- return new_stat(path, statp, NULL, S_IFDIR, 1);
+ return new_stat(path, statp, NULL, S_IFDIR | S_IXUSR, 1);
}
name_size = strlen(pn);
@@ -1149,7 +1149,7 @@ lo_apk_lstat(const char *path,
if (letoh16(entry->filename_size) == name_size)
return new_stat(path, statp, entry, S_IFREG, cdir_entries - count + 1);
else
- return new_stat(path, statp, entry, S_IFDIR, cdir_entries - count + 1);
+ return new_stat(path, statp, entry, S_IFDIR | S_IXUSR, cdir_entries - count + 1);
}
errno = ENOENT;
commit 9220f05f73d428a0d5415a45f786040c9ef9f74e
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Jan 27 18:07:15 2012 +0000
android: try blitting a big texture to the screen instead; fails.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index e970783..cf93145 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -39,6 +39,7 @@
#include <rtl/strbuf.hxx>
#define ANDROID_EGL
+#undef ANDROID_EGL_LOCK
#undef ANDROID_PIXELS
class AndroidSalData : public SalGenericData
@@ -88,12 +89,68 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
rSrcRect.left, rSrcRect.top, rSrcRect.right, rSrcRect.bottom,
nDestX, nDestY);
- // FIXME: do some cropping goodness on aSrcRect to ensure no overflows etc.
- ARect aSrcRect = rSrcRect;
- sal_Int32 nStride = aDev->getScanlineStride();
basebmp::RawMemorySharedArray aSrcData = aDev->getBuffer();
+ basegfx::B2IVector aDevSize = aDev->getSize();
+ sal_Int32 nStride = aDev->getScanlineStride();
unsigned char *pSrc = aSrcData.get();
+#ifdef ANDROID_EGL
+ (void)pOutBuffer;
+ GLuint nTexture;
+ glGenTextures (1, &nTexture);
+ glBindTexture(GL_TEXTURE_2D,nTexture);
+ // Pixels to texture:
+ fprintf (stderr, "before create texure '%d'\n", glGetError());
+ glTexImage2D(GL_TEXTURE_2D, 0 /* level */, GL_RGB,
+ nStride / 3, aDevSize.getY(),
+ 0 /* border */, GL_RGB, GL_UNSIGNED_BYTE,
+ pSrc);
+ fprintf (stderr, "created texure '%d'\n", glGetError());
+
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
+
+ glEnable(GL_TEXTURE_2D);
+
+ glDisable(GL_DEPTH_TEST);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+ glDisable(GL_LIGHTING);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+
+ glViewport(0, 0, aDevSize.getX(), aDevSize.getY());
+
+ glBindTexture(GL_TEXTURE_2D,nTexture);
+
+ GLfloat aVertices[] = { 0, 0,
+ 0, aDevSize.getY(),
+ aDevSize.getX(), aDevSize.getY(),
+ aDevSize.getX(), 0 };
+ glVertexPointer(2, GL_FLOAT, 0, aVertices);
+ fprintf (stderr, "after set vertex '%d'\n", glGetError());
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glColor4f(0.5f, 0.5f, 1.0f, 1.0f);
+ glDrawArrays (GL_TRIANGLE_STRIP, 0, 4);
+// glTexCoordPointer(2, GL_FLOAT, 0, aVertices);
+ fprintf (stderr, "after draw arrays '%d'\n", glGetError());
+
+// glDisable(GL_TEXTURE_2D);
+
+ // free the texture
+// glDeleteTextures(1,&nTexture);
+#endif
+
+#ifdef ANDROID_PIXELS
+ // FIXME: do some cropping goodness on aSrcRect to ensure no overflows etc.
+ ARect aSrcRect = rSrcRect;
+
// FIXME: we have WINDOW_FORMAT_RGB_565 = 4 ...
for (unsigned int y = 0; y < (unsigned int)(aSrcRect.bottom - aSrcRect.top); y++)
@@ -139,6 +196,7 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
break;
}
}
+#endif // ANDROID_PIXELS
fprintf (stderr, "done blit!\n");
}
@@ -172,6 +230,7 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
// glClearColor((a & 0x1) ? 1.0 : 0.0, (a & 0x2) ? 1.0 : 0.0, 0.0, 1);
// glClear(GL_COLOR_BUFFER_BIT);
+#ifdef ANDROID_EGL_LOCK // failed to do anything !
const EGLint aAttribs[] = {
EGL_MAP_PRESERVE_PIXELS_KHR, EGL_FALSE,
EGL_LOCK_USAGE_HINT_KHR, EGL_WRITE_SURFACE_BIT_KHR,
@@ -196,6 +255,7 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
aOutBuffer.stride = nStride / 2; // FIXME - assuming 565
aOutBuffer.width = nWidth;
aOutBuffer.height = nHeight;
+#endif
#endif // ANDROID_EGL
@@ -208,10 +268,10 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
nRet, aRect.left, aRect.top, aRect.right, aRect.bottom,
aOutBuffer.width, aOutBuffer.height, aOutBuffer.stride,
aOutBuffer.format, aOutBuffer.bits);
-#endif // ANDROID_PIXELS
-
if (aOutBuffer.bits != NULL)
{
+#endif // ANDROID_PIXELS
+
#if 1 // pre-'clean' the buffer with cruft:
// hard-code / guess at a format ...
int32_t *p = (int32_t *)aOutBuffer.bits;
@@ -228,17 +288,19 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it);
BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
}
+
+#ifdef ANDROID_PIXELS
}
else
fprintf (stderr, "no buffer for locked window\n");
-
-#ifdef ANDROID_PIXELS
ANativeWindow_unlockAndPost(pWindow);
#endif
#ifdef ANDROID_EGL
+#ifdef ANDROID_EGL_LOCK
nRet = eglUnlockSurfaceKHR(mxDisplay, mxSurface);
fprintf (stderr, "eGL unlock %d\n", nRet);
+#endif
eglSwapBuffers(mxDisplay, mxSurface);
#endif
commit ab95c0753cc3693571e125742593d54185d39699
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Jan 27 16:34:46 2012 +0000
android: un-successful attempt to use eglLockSurfaceKHR
is this method even implemented for android, seems to be a no-op.
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index f011858..e970783 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -32,12 +32,14 @@
#include <jni.h>
#include <android/log.h>
#include <android/looper.h>
+#define EGL_EGLEXT_PROTOTYPES
+#include <EGL/eglext.h>
#include <osl/detail/android-bootstrap.h>
#include <osl/detail/android_native_app_glue.h>
#include <rtl/strbuf.hxx>
-#undef ANDROID_EGL
-#define ANDROID_PIXELS
+#define ANDROID_EGL
+#undef ANDROID_PIXELS
class AndroidSalData : public SalGenericData
{
@@ -151,12 +153,8 @@ void AndroidSalInstance::BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer,
void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
{
(void)pWindow;
-#ifdef ANDROID_PIXELS
- ARect aRect;
ANativeWindow_Buffer aOutBuffer;
memset ((void *)&aOutBuffer, 0, sizeof (aOutBuffer));
- fprintf (stderr, "pre lock #3\n");
-#endif
#ifdef ANDROID_EGL
if (mxDisplay == EGL_NO_DISPLAY)
@@ -171,32 +169,59 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
// Just fill the screen with a color.
static int a = 0;
a++;
- glClearColor((a & 0x1) ? 1.0 : 0.0, (a & 0x2) ? 1.0 : 0.0, 0.0, 1);
- glClear(GL_COLOR_BUFFER_BIT);
+ // glClearColor((a & 0x1) ? 1.0 : 0.0, (a & 0x2) ? 1.0 : 0.0, 0.0, 1);
+ // glClear(GL_COLOR_BUFFER_BIT);
+
+ const EGLint aAttribs[] = {
+ EGL_MAP_PRESERVE_PIXELS_KHR, EGL_FALSE,
+ EGL_LOCK_USAGE_HINT_KHR, EGL_WRITE_SURFACE_BIT_KHR,
+ EGL_NONE
+ };
+ fprintf (stderr, "pre-egl-lock\n");
+ nRet = eglLockSurfaceKHR(mxDisplay, mxSurface, aAttribs);
+ fprintf (stderr, "eglLockSurface %d\n", nRet);
+ nRet = eglQuerySurface(mxDisplay, mxSurface,
+ EGL_BITMAP_POINTER_KHR, (EGLint *)&aOutBuffer.bits);
+ fprintf (stderr, "get bytes %p : %d\n", aOutBuffer.bits, nRet);
+ EGLint nStride = 0;
+ nRet = eglQuerySurface(mxDisplay, mxSurface,
+ EGL_BITMAP_PITCH_KHR, &nStride);
+ fprintf (stderr, "get stride %ld : %d\n", (long)nStride, nRet);
+
+ EGLint nWidth = 0, nHeight = 0;
+ eglQuerySurface(mxDisplay, mxSurface, EGL_WIDTH, &nWidth);
+ eglQuerySurface(mxDisplay, mxSurface, EGL_HEIGHT, &nHeight);
+ fprintf (stderr, "get width height %ld,%ld\n", (long)nWidth, (long)nHeight);
+
+ aOutBuffer.stride = nStride / 2; // FIXME - assuming 565
+ aOutBuffer.width = nWidth;
+ aOutBuffer.height = nHeight;
- eglSwapBuffers(mxDisplay, mxSurface);
#endif // ANDROID_EGL
#ifdef ANDROID_PIXELS
+ ARect aRect;
+ fprintf (stderr, "pre lock #3\n");
int32_t nRet = ANativeWindow_lock(pWindow, &aOutBuffer, &aRect);
fprintf (stderr, "locked window %d returned rect: %d,%d->%d,%d "
"buffer: %dx%d stride %d, format %d, bits %p\n",
nRet, aRect.left, aRect.top, aRect.right, aRect.bottom,
aOutBuffer.width, aOutBuffer.height, aOutBuffer.stride,
aOutBuffer.format, aOutBuffer.bits);
+#endif // ANDROID_PIXELS
-#if 1 // pre-'clean' the buffer with cruft:
- // hard-code / guess at a format ...
- int32_t *p = (int32_t *)aOutBuffer.bits;
- for (int32_t y = 0; y < aOutBuffer.height; y++)
+ if (aOutBuffer.bits != NULL)
{
- for (int32_t x = 0; x < aOutBuffer.stride / 2; x++)
- *p++ = (y << 24) + x;
- }
+#if 1 // pre-'clean' the buffer with cruft:
+ // hard-code / guess at a format ...
+ int32_t *p = (int32_t *)aOutBuffer.bits;
+ for (int32_t y = 0; y < aOutBuffer.height; y++)
+ {
+ for (int32_t x = 0; x < aOutBuffer.stride / 2; x++)
+ *p++ = (y << 24) + x;
+ }
#endif
- if (aOutBuffer.bits != NULL)
- {
std::list< SalFrame* >::const_iterator it;
for ( it = getFrames().begin(); it != getFrames().end(); it++ )
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list