basic/source/runtime/basrdll.cxx | 3 basic/source/sbx/sbxdate.cxx | 7 + basic/source/sbx/sbxscan.cxx | 6 + bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx | 4 configure.ac | 7 - cppuhelper/source/exc_thrower.cxx | 8 + desktop/Library_sofficeapp.mk | 11 + desktop/source/app/userinstall.cxx | 9 + desktop/source/lib/init.cxx | 132 +++++++++++++++++++---- distro-configs/LibreOfficeiOS.conf | 5 external/libqxp/UnpackedTarball_libqxp.mk | 2 include/LibreOfficeKit/LibreOfficeKitInit.h | 19 +-- include/ios/ios.hxx | 19 +++ ios/CustomTarget_iOS_setup.mk | 23 ++-- ios/Module_ios.mk | 3 ios/StaticLibrary_ios.mk | 20 +++ ios/source/ios.cxx | 36 ++++++ sal/osl/unx/file_misc.cxx | 10 + solenv/gbuild/gbuild.mk | 14 ++ svx/source/svdraw/svdedtv2.cxx | 5 svx/source/svdraw/svdpdf.cxx | 3 sw/source/uibase/app/docsh.cxx | 3 sw/source/uibase/dialog/swabstdlg.cxx | 2 vcl/headless/svpinst.cxx | 13 +- vcl/quartz/salbmp.cxx | 42 ------- vcl/quartz/salgdi.cxx | 8 + vcl/quartz/salgdicommon.cxx | 159 ---------------------------- vcl/quartz/salvd.cxx | 8 - vcl/source/app/svmain.cxx | 83 ++++++++++++++ vcl/source/filter/ipdf/pdfread.cxx | 2 30 files changed, 400 insertions(+), 266 deletions(-)
New commits: commit 1e9f2450aa839520290311bc3c4b156f0624adfc Author: jan Iversen <[email protected]> AuthorDate: Sat Jan 6 09:20:54 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:51 2018 +0000 iOS, correct DPIX calculation Patch is thanks to Jon N. Change-Id: Idba9ec9b32b144523f0e7da5f7273f6af9fdfd31 (cherry picked from commit 1dd5f10c3c6e0189ada4ecd6d08beb4c5fd1d42d) Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 6fca10b47553..d1beb08c1a66 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -1385,7 +1385,7 @@ void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) rDPIX = mnRealDPIX; rDPIY = mnRealDPIY; #else - rDPIX = rDPIY = 200; // FIXME + rDPIX = rDPIY = 96; #endif } commit fe9414f9c5f29dd4a32d3910b76b057400a846ba Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Oct 11 18:25:22 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:51 2018 +0000 Don't use GetDBManager() without checking it for nullness Change-Id: Idb7b16a6976df62a1beea8a01c812206a0b8b85a Signed-off-by: Michael Meeks <[email protected]> diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 7a5f3354f661..d1cb32053699 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -422,7 +422,8 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) CalcLayoutForOLEObjects(); // format for OLE objects bool bURLChanged = !GetMedium() || GetMedium()->GetURLObject() != rMedium.GetURLObject(); - if (!m_xDoc->GetDBManager()->getEmbeddedName().isEmpty() && bURLChanged) + auto pMgr = m_xDoc->GetDBManager(); + if (pMgr && !pMgr->getEmbeddedName().isEmpty() && bURLChanged) { // We have an embedded data source definition, need to re-store it, // otherwise relative references will break when the new file is in a commit d66a37fdf770d5150f2ad76271891b7724520507 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 23:03:51 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:51 2018 +0000 Add BRAND_SHARE_SUBDIR Change-Id: If50391d2f20e5540f355b5498d7845b0fae6e774 Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index 855828a679f3..90baa9e05003 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -57,6 +57,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i echo '[Bootstrap]' > $(IOSRES)/fundamentalrc echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> $(IOSRES)/fundamentalrc echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' >> $(IOSRES)/fundamentalrc + echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' >> $(IOSRES)/fundamentalrc echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/registry ' \ 'res:$${BRAND_BASE_DIR}/registry' >> $(IOSRES)/fundamentalrc echo 'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \ commit d7c2639e53a302f7e4f2a096331ae8bce3c444d6 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 2 18:26:41 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:50 2018 +0000 We shouldn't call DrawTextLayout() without a context on iOS Change-Id: I3e72909ca1aa9f97721d982f16624f496152ae2d Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 7db6c7b00927..e78bb16e3f4b 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -404,6 +404,14 @@ bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangl void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { +#ifdef IOS + if (!CheckContext()) + { + SAL_WARN("vcl.cg", "AquaSalGraphics::DrawTextLayout() without context"); + return; + } +#endif + const CoreTextStyle& rStyle = rLayout.getFontData(); const FontSelectPattern& rFontSelect = rStyle.maFontSelData; if (rFontSelect.mnHeight == 0) commit 88079a01c225c22c1187dd20efaaafa965f119ad Author: jan Iversen <[email protected]> AuthorDate: Wed Feb 28 13:06:02 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:50 2018 +0000 iOS, removed read to pipes needed to run iOS Change-Id: I1176ce24023cde21846c71ffadb1bf01cb2c8399 (cherry picked from commit 9c8cc8e46c917042ca85d392f175b320205c0f7e) Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 8c968d8404a6..a175075df2d7 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -329,7 +329,11 @@ void SvpSalYieldMutex::doAcquire(sal_uInt32 const nLockCount) m_bNoYieldLock = true; bool const bEvents = pInst->DoYield(false, request == SvpRequest::MainThreadDispatchAllEvents); m_bNoYieldLock = false; +#ifdef IOS + (void)bEvents; +#else write(m_FeedbackFDs[1], &bEvents, sizeof(bool)); +#endif } } while (true); @@ -462,10 +466,11 @@ bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) : SvpRequest::MainThreadDispatchOneEvent); bool bDidWork(false); +#ifndef IOS // blocking read (for synchronisation) auto const nRet = read(pMutex->m_FeedbackFDs[0], &bDidWork, sizeof(bool)); assert(nRet == 1); (void) nRet; - +#endif if (!bDidWork && bWait) { // block & release YieldMutex until the main thread does something commit 86edf1e3d1f5b98997b6a764da24923f1d74746b Author: jan Iversen <[email protected]> AuthorDate: Sun Jan 21 12:57:59 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:50 2018 +0000 iOS, removed iOS special handling in init() Removed the need for the (limited) init() used earlier by iOS. Due to problems solved below init() it is now posible to use the standard init !! init.cxx still have some special handling of paintTile, which we should try to eliminate Change-Id: I42234aea8ac6b8dfcf8c3c88b386b4d4a97bba74 Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 70f415b58498..63893a4ee976 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3756,7 +3756,6 @@ static bool initialize_uno(const OUString& aAppProgramURL) return true; } -#ifndef IOS static void lo_startmain(void*) { osl_setThreadName("lo_startmain"); @@ -3770,7 +3769,6 @@ static void lo_startmain(void*) Application::ReleaseSolarMutex(); } -#endif static bool bInitialized = false; @@ -4022,14 +4020,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char // CommandLineArgs): desktop::Desktop::GetCommandLineArgs().setHeadless(); -#ifdef IOS - // mpDefInst need to be initialized, which only happens in InitVCL(), - // there might be more elegant ways to get InitVCL() called, but - // this one works :-) - InitVCL(); - SfxApplication::GetOrCreate(); -#endif - if (eStage == PRE_INIT) { std::cerr << "Init vcl\n"; @@ -4095,16 +4085,12 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char desktop::Desktop::CreateTemporaryDirectory(); SAL_INFO("lok", "Enabling RequestHandler"); -#ifdef IOS - RequestHandler::Enable(true); -#else RequestHandler::Enable(false); SAL_INFO("lok", "Starting soffice_main"); RequestHandler::SetReady(false); pLib->maThread = osl_createThread(lo_startmain, nullptr); SAL_INFO("lok", "Waiting for RequestHandler"); RequestHandler::WaitForReady(); -#endif SAL_INFO("lok", "RequestHandler ready -- continuing"); } commit 1bea09c744bc1c58b05147b52e29ca80dc46688f Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Aug 28 15:08:45 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:50 2018 +0000 We do want to initialise m_MainThread on iOS, too (Original commit message below, but note that the talk about LibreOfficeLight is irrelevant here in this branch.) This doesn't make the LibreOfficeLight app work much better, though. But at least it doesn't hang its event loop completely, some 10 s timer keeps firing. (But nothing sane shows up in the app UI, even if some welcome.odt document apparently does get loaded. Clearly something is waiting for something else that never happens...) (cherry picked from commit 31703196388b455edda1c40fd2b3b536b315848f) Change-Id: Ieba22a5e1418d48a7dd6cacda526aca69cced4c3 Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 439adf04fa88..8c968d8404a6 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -69,8 +69,8 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) m_aTimeout.tv_usec = 0; m_nTimeoutMS = 0; -#ifndef IOS m_MainThread = osl::Thread::getCurrentIdentifier(); +#ifndef IOS CreateWakeupPipe(true); #endif if( s_pDefaultInstance == nullptr ) commit 59681c0a71361b0aac1b347dfa44d1324bdf1395 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 2 17:41:26 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:49 2018 +0000 LibreOfficeKit wants the tile pixmap bytes to be in BGRA order in memory To get that with CoreGraphics on iOS we need to use also kCGImageByteOrder32Little in the CGBitmapContextCreate() call, otherwise the bytes will be in ARGB order in memory. (Not touching the macOS code here.) Change-Id: I3c2dd94feb1c6bf46c5b335f5901b29e5fe1e7fb Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 897061d93874..336313fc3daf 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -297,7 +297,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) } #endif mxBitmapContext = CGBitmapContextCreate( pRawData, nDX, nDY, - 8, nBytesPerRow, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst ); + 8, nBytesPerRow, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little ); SAL_INFO( "vcl.cg", "CGBitmapContextCreate(" << nDX << "x" << nDY << "x32) = " << mxBitmapContext ); xCGContext = mxBitmapContext; #endif commit 7774d428b1a65d5f6decc523c0d909b9a4e8bf70 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 9 14:11:14 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:49 2018 +0000 Bin some no longer needed dbgutil code It was used to initialize a virtual device pixel buffer to an "interesting" pattern, in case actual rendering to it failed. Change-Id: Iacdd86382dfa8c9ed1ea9d213fa489515b2b217d Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 3d9d700cb4d9..897061d93874 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -236,12 +236,6 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) const int nBytesPerRow = (mnBitmapDepth * nDX + 7) / 8; void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY ); -#ifdef DBG_UTIL - for (ssize_t i = 0; i < nBytesPerRow * nDY; i++) - { - static_cast<sal_uInt8*>(pRawData)[i] = (i & 0xFF); - } -#endif mxBitmapContext = CGBitmapContextCreate( pRawData, nDX, nDY, mnBitmapDepth, nBytesPerRow, GetSalData()->mxGraySpace, kCGImageAlphaNone ); commit 610c0be9d8cbe1ea0c227f2ae4af94fdc1de26c5 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 9 14:08:11 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:49 2018 +0000 Bin horribly verbose image saving on iOS for debug purposes Not really that useful any longer. Change-Id: Idf29b9c3eeafd1b1cc7a2baa87205f7064681a23 (cherry picked from commit 1ab835e0fae20118971a349811ae28712c41fbc0) Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index 60a16503f3d2..ffe830348ba7 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -46,45 +46,6 @@ static const unsigned long k32BitRedColorMask = 0x00ff0000; static const unsigned long k32BitGreenColorMask = 0x0000ff00; static const unsigned long k32BitBlueColorMask = 0x000000ff; -#if defined IOS && defined DBG_UTIL - -#include <MobileCoreServices/UTCoreTypes.h> -#include <ImageIO/ImageIO.h> - -static void writeImageToFile(CGImageRef image, const char *baseName) -{ - static bool bDoIt = getenv("DBG_WRITE_CGIMAGES"); - if (!bDoIt) - return; - - static int counter = 0; - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsDirectory = [paths objectAtIndex:0]; - NSString *path = [NSString stringWithFormat:@"%@/%s.%d.png", documentsDirectory, baseName, counter++]; - CFURLRef url = (CFURLRef)[NSURL fileURLWithPath:path]; - CGImageDestinationRef destination = CGImageDestinationCreateWithURL(url, kUTTypePNG, 1, NULL); - CGImageDestinationAddImage(destination, image, nil); - - if (!CGImageDestinationFinalize(destination)) - { - NSLog(@"Failed to write image to %@", path); - } - else - { - SAL_DEBUG("--- saved image " << baseName << " to " << [path UTF8String]); - } - - CFRelease(destination); -} - -#define DBG_WRITE_IMAGE(image, name) writeImageToFile(image, name) - -#else - -#define DBG_WRITE_IMAGE(image, name) /* empty */ - -#endif - static bool isValidBitCount( sal_uInt16 nBitCount ) { return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || @@ -906,7 +867,6 @@ CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask, // CGImageCreateWithMask() only likes masks or greyscale images => convert if needed // TODO: isolate in an extra method? - DBG_WRITE_IMAGE(xMask, "xMask"); if( !CGImageIsMask(xMask) || rMask.GetBitCount() != 8)//(CGImageGetColorSpace(xMask) != GetSalData()->mxGraySpace) ) { const CGRect xImageRect=CGRectMake( 0, 0, nWidth, nHeight );//the rect has no offset @@ -939,8 +899,6 @@ CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask, // combine image and alpha mask CGImageRef xMaskedImage = CGImageCreateWithMask( xImage, xMask ); SAL_INFO("vcl.cg", "CGImageCreateWithMask(" << xImage << "," << xMask << ") = " << xMaskedImage ); - DBG_WRITE_IMAGE(xImage, "xImage"); - DBG_WRITE_IMAGE(xMaskedImage, "xMaskedImage"); SAL_INFO("vcl.cg", "CFRelease(" << xMask << ")" ); CFRelease( xMask ); SAL_INFO("vcl.cg", "CFRelease(" << xImage << ")" ); commit 4ed5ebfe973660adeac37c91233636951dc65ae8 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 9 21:25:28 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:48 2018 +0000 We want the function pointer here, not call it (yet) Change-Id: I20c7c1e82b12a2d20baa673e8b7aeb3d0e1fa58c (cherry picked from commit 496f3a23db14e042b8e77e7e46a6e0d3e9605b3d) Signed-off-by: Michael Meeks <[email protected]> diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx index 6343d27cf54e..4546834b1c26 100644 --- a/sw/source/uibase/dialog/swabstdlg.cxx +++ b/sw/source/uibase/dialog/swabstdlg.cxx @@ -47,7 +47,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() fp = reinterpret_cast<SwAbstractDialogFactory* (SAL_CALL*)()>( aDialogLibrary.getFunctionSymbol( "SwCreateDialogFactory" )); #else - fp = SwCreateDialogFactory(); + fp = SwCreateDialogFactory; #endif #endif if ( fp ) commit dbff19b65a852b3ed73c2dff9d790d23abe2c621 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Oct 11 15:32:26 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:48 2018 +0000 Tweak check for nonexistent file on iOS Calling stat() on a non-existent file outside the sandbox fails with EPERM on iOS, not ENOENT. (Presumably calling stat() even on an existing file, but one you don't have been granted access to, also fails, because that is after all a point of sandboxing, you shouldn't even be allowed to figure out whether arbitrary files exist outside the sandbox.) Not sure why this change hasn't been necessary also for a sandboxed LibreOffice on macOS. Change-Id: I67c768e9c34fd17fa35f08232284210ff4a71b98 Signed-off-by: Michael Meeks <[email protected]> diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 5f7bdc5b010b..da2b108ecce5 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * @@ -758,6 +758,14 @@ static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* p { nRet=errno; +#ifdef IOS + // Checking for nonexistent files at least in the iCloud cache directory (like + // "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/helloodt0.odt" fails + // with EPERM, not ENOENT. + if (nRet == EPERM) + DestFileExists=0; +#endif + if ( nRet == ENOENT ) { DestFileExists=0; commit afb2a51dad3b30844dccde2b647c2927499bc104 Author: Tor Lillqvist <[email protected]> AuthorDate: Fri Oct 12 03:36:32 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:48 2018 +0000 Make sure the UserInstallation/user directory exists on iOS (and Android) If it doesn't exist lots of things go very badly. Took a while for me to understand the mechanism, sigh. Change-Id: I40300587a5f422876cbda68c5aa98a23ed707135 (cherry picked from commit a68bf798532c93c1fef8def82fe049ca55b5cb33) Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx index bec53d861d59..d748a948c585 100644 --- a/desktop/source/app/userinstall.cxx +++ b/desktop/source/app/userinstall.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * @@ -27,6 +27,7 @@ #include <officecfg/Setup.hxx> #include <osl/file.h> #include <osl/file.hxx> +#include <rtl/bootstrap.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> #include <unotools/bootstrap.hxx> @@ -128,6 +129,12 @@ Status create(OUString const & uri) { default: return ERROR_OTHER; } +#else + // On (Android and) iOS, just create the user directory. Later code fails mysteriously if it + // doesn't exist. + OUString userDir("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user"); + rtl::Bootstrap::expandMacros(userDir); + osl::Directory::createPath(userDir); #endif std::shared_ptr<comphelper::ConfigurationChanges> batch( comphelper::ConfigurationChanges::create()); commit 87201719c61e48aac5ae70d58cc51b994792dfec Author: jan Iversen <[email protected]> AuthorDate: Fri Jan 12 13:08:59 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:47 2018 +0000 iOS, stop trying to do dynamic load in lok_init_2() (Misleading original commit message; it is not "dynamic load" (dlopen()) that the code tried to do, but dlsym(). But indeed, simply call the function in question directly instead. --tml) LibreOfficeKit, tries traditionally to load a dylib, and locate the symbols, for iOS this is already linked to a single Kit.o. Code is changed to a simple call Change-Id: Ie94a447260cb3007e7e2b56c1b67896ad40d79d3 Signed-off-by: Michael Meeks <[email protected]> diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index 5617a4eaa522..cce3e8f0343c 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -74,7 +74,6 @@ extern "C" { (void)pPath; } -#endif // IOS static void *lok_dlsym(void *Hnd, const char *pName) { @@ -85,6 +84,7 @@ extern "C" { return dlclose(Hnd); } +#endif // IOS #else @@ -171,12 +171,12 @@ extern "C" } #endif +#if !defined(IOS) static void *lok_dlopen( const char *install_path, char ** _imp_lib ) { char *imp_lib; void *dlhandle; -#if !defined(IOS) size_t partial_length, imp_lib_size; struct stat dir_st; @@ -239,14 +239,10 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) return NULL; } } -#else - (void)install_path; - imp_lib = strdup("the app executable"); - dlhandle = RTLD_MAIN_ONLY; -#endif *_imp_lib = imp_lib; return dlhandle; } +#endif typedef LibreOfficeKit *(LokHookFunction)( const char *install_path); @@ -254,10 +250,14 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char typedef int (LokHookPreInit) ( const char *install_path, const char *user_profile_url ); +extern __attribute__ ((visibility("default"))) + LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path); + static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_profile_url ) { - char *imp_lib; +#if !defined(IOS) void *dlhandle; + char *imp_lib; LokHookFunction *pSym; LokHookFunction2 *pSym2; @@ -294,6 +294,9 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p // dlhandle is "leaked" // coverity[leaked_storage] return pSym2( install_path, user_profile_url ); +#else + return libreofficekit_hook_2( install_path, user_profile_url ); +#endif } static LOK_TOLERATE_UNUSED commit 06c1fc413db0470ff8661b675796aeef891a00a5 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Oct 10 16:17:18 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:47 2018 +0000 Move the iOS CGBitmapContextCreate() call to doc_paintTile() Thus it now actually takes a buffer pointer also on iOS, like on Linux and Android. Less confusing, more uniform. Change-Id: I81084806d37b9aac9f2b2bc03d0c262e991eec81 Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 4a93cf37eb1c..70f415b58498 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -20,6 +20,7 @@ #include <unicode/ucnv.h> #include <premac.h> #import <Foundation/Foundation.h> +#import <CoreGraphics/CoreGraphics.h> #include <postmac.h> #endif @@ -580,6 +581,13 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); +#ifdef IOS +static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, + void* rCGContext, + const int nCanvasWidth, const int nCanvasHeight, + const int nTilePosX, const int nTilePosY, + const int nTileWidth, const int nTileHeight); +#endif static void doc_paintPartTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, const int nPart, @@ -2099,17 +2107,14 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, #if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS) #if defined(IOS) - SystemGraphicsData aData; - aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer); - // the Size argument is irrelevant, I hope - ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), DeviceFormat::DEFAULT); + CGContextRef cgc = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, nCanvasWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little); - pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); + CGContextTranslateCTM(cgc, 0, nCanvasHeight); + CGContextScaleCTM(cgc, 1, -1); - pDevice->SetOutputSizePixel(Size(nCanvasWidth, nCanvasHeight)); + doc_paintTileToCGContext(pThis, (void*) cgc, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); - pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, - nTilePosX, nTilePosY, nTileWidth, nTileHeight); + CGContextRelease(cgc); #else ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT) ; @@ -2131,6 +2136,44 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, #endif } +#ifdef IOS + +static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, + void* rCGContext, + const int nCanvasWidth, const int nCanvasHeight, + const int nTilePosX, const int nTilePosY, + const int nTileWidth, const int nTileHeight) +{ + SolarMutexGuard aGuard; + if (gImpl) + gImpl->maLastExceptionMsg.clear(); + + SAL_INFO( "lok.tiledrendering", "paintTileToCGContext: painting [" << nTileWidth << "x" << nTileHeight << + "]@(" << nTilePosX << ", " << nTilePosY << ") to [" << + nCanvasWidth << "x" << nCanvasHeight << "]px" ); + + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return; + } + + SystemGraphicsData aData; + aData.rCGContext = reinterpret_cast<CGContextRef>(rCGContext); + // the Size argument is irrelevant, I hope + ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), DeviceFormat::DEFAULT); + + pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); + + pDevice->SetOutputSizePixel(Size(nCanvasWidth, nCanvasHeight)); + + pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, + nTilePosX, nTilePosY, nTileWidth, nTileHeight); + +} + +#endif static void doc_paintPartTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, commit ffe690740d9da9dfabdea37d3fdb1a6050b4818b Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 19:39:21 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:47 2018 +0000 Make this more like in master and as the "Mobile" app in online.git expects Change-Id: I4116d8b35f5219c3cec12c1905bb1c21f23c22a5 Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index ce45e456df8b..855828a679f3 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -23,8 +23,8 @@ $(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2) mkdir -p $(IOSGEN) $(IOSRES) $(IOSRES)/services \ - $(IOSRES)/share/config $(IOSRES)/share/filter $(IOSRES)/program \ - $(IOSGEN) $(WORKDIR)/ios; + $(IOSRES)/share/config $(IOSRES)/filter $(IOSRES)/program \ + $(IOSRES)/config # generate file with call declarations $(SRCDIR)/solenv/bin/native-code.py \ @@ -41,10 +41,11 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i mkdir -p $(IOSRES)/share/config cp -R $(INSTDIR)/share/config/soffice.cfg $(IOSRES)/share/config cp $(WORKDIR)/CustomTarget/i18npool/breakiterator/dict_*.data $(IOSRES)/share - cp $(INSTDIR)/share/filter/oox-drawingml-adj-names $(IOSRES)/share/filter - cp $(INSTDIR)/share/filter/oox-drawingml-cs-presets $(IOSRES)/share/filter - cp $(INSTDIR)/share/filter/vml-shape-types $(IOSRES)/share/filter - cp -R $(INSTDIR)/share/registry $(IOSRES)/share + cp $(INSTDIR)/share/filter/oox-drawingml-adj-names $(IOSRES)/filter + cp $(INSTDIR)/share/filter/oox-drawingml-cs-presets $(IOSRES)/filter + cp $(INSTDIR)/share/filter/vml-shape-types $(IOSRES)/filter + cp -R $(INSTDIR)/share/registry $(IOSRES) + cp $(INSTDIR)/share/config/*zip $(IOSRES)/config # Set up rc, the "inifile". See getIniFileName_Impl(). echo '[Bootstrap]' > $(IOSRES)/rc @@ -56,7 +57,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i echo '[Bootstrap]' > $(IOSRES)/fundamentalrc echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> $(IOSRES)/fundamentalrc echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' >> $(IOSRES)/fundamentalrc - echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry ' \ + echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/registry ' \ 'res:$${BRAND_BASE_DIR}/registry' >> $(IOSRES)/fundamentalrc echo 'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \ 'file://$$APP_DATA_DIR/offapi.rdb' >> $(IOSRES)/fundamentalrc commit fa14baa5e09a47ff1ee30d7a2b23ab7ee49c04cd Author: Tor Lillqvist <[email protected]> AuthorDate: Fri Oct 5 17:36:03 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:47 2018 +0000 We should call pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)) also on iOS Change-Id: Id42d3b84ab97ec1efd9551e4d9cc5fd16ab77c80 (cherry picked from commit 88f7147c1ab9d1feeb5c14d67ffa1b623df5dc50) Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 734862fa1420..4a93cf37eb1c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2104,6 +2104,8 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, // the Size argument is irrelevant, I hope ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), DeviceFormat::DEFAULT); + pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); + pDevice->SetOutputSizePixel(Size(nCanvasWidth, nCanvasHeight)); pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, commit 85831e8bc9e6b95ff97096bdbe718d1b251b0265 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Oct 2 21:33:03 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:46 2018 +0000 Call SetOutputSizePixel() in the iOS case, too Change-Id: I844901f38ec1d93f4183e0678741fecdc7636139 (cherry picked from commit 65da08ea8efef28fc45694d0606e51bb425f1d65) Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 4032c25a9613..734862fa1420 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2104,6 +2104,8 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, // the Size argument is irrelevant, I hope ScopedVclPtrInstance<VirtualDevice> pDevice(&aData, Size(1, 1), DeviceFormat::DEFAULT); + pDevice->SetOutputSizePixel(Size(nCanvasWidth, nCanvasHeight)); + pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); #else commit 6cf73ae2491300882a30b8bade1212e9c3c284f9 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 5 22:42:03 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:46 2018 +0000 Re-introduce code to use the ICU data file in the iOS app bundle We used to have this code snippet in the TiledLibreOffice app back in the days. Then in LibreOfficeLight it was lost and forgotten (?). Clearly we need to tell ICU abouyt the data that we include as a separate file in iOS apps, and presumably any iOS app will be a LibreOffficeKit-based one, so let's do the initialistion here. Change-Id: Ib08dc9d7386789d10e8c53114e79d0b5beab7232 (cherry picked from commit a754ce416c844b6b26eff0aab3e6bac65387b433) Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 1491358a510e..133ee5aaf165 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -103,9 +103,15 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,sofficeapp,\ endif ifeq ($(OS),IOS) + $(eval $(call gb_Library_add_cflags,sofficeapp,\ $(gb_OBJCFLAGS) \ )) + +$(eval $(call gb_Library_add_cxxflags,sofficeapp,\ + $(gb_OBJCXXFLAGS) \ +)) + endif $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0ca3e1bcc48b..4032c25a9613 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * @@ -13,6 +13,16 @@ #include <string.h> #include <stdlib.h> +#ifdef IOS +#include <sys/mman.h> +#include <sys/stat.h> +#include <unicode/udata.h> +#include <unicode/ucnv.h> +#include <premac.h> +#import <Foundation/Foundation.h> +#include <postmac.h> +#endif + #include <algorithm> #include <memory> #include <iostream> @@ -3909,6 +3919,45 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char if (osl::FileBase::getFileURLFromSystemPath(aAppPath, aAppURL) != osl::FileBase::E_None) return 0; +#ifdef IOS + // A LibreOffice-using iOS app should have the ICU data file in the app bundle. Initialize ICU + // to use that. + NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; + + int fd = open([[bundlePath stringByAppendingPathComponent:@U_ICUDATA_NAME".dat"] UTF8String], O_RDONLY); + if (fd == -1) + NSLog(@"Could not open ICU data file %s", [[bundlePath stringByAppendingPathComponent:@U_ICUDATA_NAME".dat"] UTF8String]); + else + { + struct stat st; + if (fstat(fd, &st) == -1) + NSLog(@"fstat on ICU data file failed: %s", strerror(errno)); + else + { + void *icudata = mmap(0, (size_t) st.st_size, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0); + if (icudata == MAP_FAILED) + NSLog(@"mmap failed: %s", strerror(errno)); + else + { + UErrorCode icuStatus = U_ZERO_ERROR; + udata_setCommonData(icudata, &icuStatus); + if (U_FAILURE(icuStatus)) + NSLog(@"udata_setCommonData failed"); + else + { + // Quick test that ICU works... + UConverter *cnv = ucnv_open("iso-8859-3", &icuStatus); + NSLog(@"ucnv_open(iso-8859-3)-> %p, err = %s, name=%s", + (void *)cnv, u_errorName(icuStatus), (!cnv)?"?":ucnv_getName(cnv,&icuStatus)); + if (U_SUCCESS(icuStatus)) + ucnv_close(cnv); + } + } + } + close(fd); + } +#endif + try { if (eStage != SECOND_INIT) commit b0bfe33719eecacb3527ab7ab70094f442ad104a Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 5 21:57:29 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:46 2018 +0000 Handle passing a null pAppPath to lo_initialize() on iOS Change-Id: I293ede0dbac4b36a1b91b86100bc11593b402d06 (cherry picked from commit 46b2350cb303a84ffd549447d313c7ced50e7032) Signed-off-by: Michael Meeks <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a7c2790150ee..0ca3e1bcc48b 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3895,6 +3895,14 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char ::osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction >(lo_initialize), aAppURL); osl::FileBase::getSystemPathFromFileURL( aAppURL, aAppPath ); +#ifdef IOS + // The above gives something like + // "/private/var/containers/Bundle/Application/953AA851-CC15-4C60-A2CB-C2C6F24E6F71/Foo.app/Foo", + // and we want to drop the final component (the binary name). + sal_Int32 lastSlash = aAppPath.lastIndexOf('/'); + assert(lastSlash > 0); + aAppPath = aAppPath.copy(0, lastSlash); +#endif } OUString aAppURL; commit fc4f673b21cfc71d925d585a8870f2df2f158b5f Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 19:11:55 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:45 2018 +0000 Add a HAVE_FEATURE_PDFIUM conditional Change-Id: I7f4a34bb132141d867b028d40b100da674acaa91 Signed-off-by: Michael Meeks <[email protected]> diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 9a17a8062673..e5ab650a0935 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <svx/svdedtv.hxx> #include <editeng/outliner.hxx> #include <svx/svdundo.hxx> @@ -2052,13 +2054,14 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) } else if (pGraf->isEmbeddedPdfData()) { +#if HAVE_FEATURE_PDFIUM aLogicRect = pGraf->GetLogicRect(); ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), aLogicRect, pGraf->getEmbeddedPdfData()); if (pGraf->getEmbeddedPageNumber() < aFilter.GetPageCount()) { nInsAnz = aFilter.DoImport(*pOL, nInsPos, pGraf->getEmbeddedPageNumber(), pProgrInfo); } - +#endif // HAVE_FEATURE_PDFIUM } } commit 773e89a2750300138c1eff3e6a153edc902342b1 Author: Tor Lillqvist <[email protected]> AuthorDate: Fri Oct 5 18:58:45 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:45 2018 +0000 Bin some ancient debug tracing stuff from TiledLibreOffice days Change-Id: I3928c6e9240ad28a65aeb4fecb07268f789faf67 Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 192bdc5aa47e..6fca10b47553 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -40,40 +40,8 @@ #endif #include <sft.hxx> - -#if defined(IOS) && defined(DBG_UTIL) - -// Variables in TiledView.m -extern int DBG_DRAW_ROUNDS, DBG_DRAW_COUNTER, DBG_DRAW_DEPTH; - -#define DBG_DRAW_OPERATION(s,v) \ - do { \ - if (DBG_DRAW_ROUNDS >= 0) { \ - if (DBG_DRAW_COUNTER++ > DBG_DRAW_ROUNDS) \ - return v; \ - SAL_DEBUG("===> " << s << " " << DBG_DRAW_COUNTER); \ - } \ - } while (false) - -#define DBG_DRAW_OPERATION_EXIT(s) \ - do { \ - if (DBG_DRAW_ROUNDS >= 0) \ - SAL_DEBUG("<=== " << s << " " << DBG_DRAW_COUNTER); \ - } while (false) - -#define DBG_DRAW_OPERATION_EXIT_EARLY(s) DBG_DRAW_OPERATION_EXIT(s << " exit early " << __LINE__) - -#else - -#define DBG_DRAW_OPERATION(s,v) /* empty */ -#define DBG_DRAW_OPERATION_EXIT(s) /* empty */ -#define DBG_DRAW_OPERATION_EXIT_EARLY(s) /* empty */ - -#endif - using namespace vcl; - static const basegfx::B2DPoint aHalfPointOfs ( 0.5, 0.5 ); static void AddPolygonToPath( CGMutablePathRef xPath, @@ -603,8 +571,6 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp ) { - DBG_DRAW_OPERATION("drawAlphaBitmap", true); - if (rTR.mnSrcWidth != rTR.mnDestWidth || rTR.mnSrcHeight != rTR.mnDestHeight) { // TODO - would be better to scale it by the native code @@ -613,18 +579,12 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, // An image mask can't have a depth > 8 bits (should be 1 to 8 bits) if( rAlphaBmp.GetBitCount() > 8 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap"); return false; - } // are these two tests really necessary? (see vcl/unx/source/gdi/salgdi2.cxx) // horizontal/vertical mirroring not implemented yet if( rTR.mnDestWidth < 0 || rTR.mnDestHeight < 0 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap"); return false; - } const QuartzSalBitmap& rSrcSalBmp = static_cast<const QuartzSalBitmap&>(rSrcBitmap); const QuartzSalBitmap& rMaskSalBmp = static_cast<const QuartzSalBitmap&>(rAlphaBmp); @@ -632,10 +592,7 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, rTR.mnSrcY, rTR.mnSrcWidth, rTR.mnSrcHeight ); if( !xMaskedImage ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaBitmap"); return false; - } if ( CheckContext() ) { @@ -648,7 +605,6 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, SAL_INFO( "vcl.cg", "CGImageRelease(" << xMaskedImage << ")"); CGImageRelease(xMaskedImage); - DBG_DRAW_OPERATION_EXIT("drawAlphaBitmap"); return true; } @@ -656,13 +612,8 @@ bool AquaSalGraphics::drawTransformedBitmap( const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX, const basegfx::B2DPoint& rY, const SalBitmap& rSrcBitmap, const SalBitmap* pAlphaBmp ) { - DBG_DRAW_OPERATION("drawTransformedBitmap", true); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawTransformedBitmap"); return true; - } // get the Quartz image CGImageRef xImage = nullptr; @@ -675,10 +626,7 @@ bool AquaSalGraphics::drawTransformedBitmap( else xImage = rSrcSalBmp.CreateWithMask( *pMaskSalBmp, 0, 0, (int)aSize.Width(), (int)aSize.Height() ); if( !xImage ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawTransformedBitmap"); return false; - } // setup the image transformation // using the rNull,rX,rY points as destinations for the (0,0),(0,Width),(Height,0) source points @@ -709,20 +657,14 @@ bool AquaSalGraphics::drawTransformedBitmap( const CGRect aDstRect = CGRectApplyAffineTransform( aSrcRect, aCGMat ); RefreshRect( aDstRect ); - DBG_DRAW_OPERATION_EXIT("drawTransformedBitmap"); return true; } bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) { - DBG_DRAW_OPERATION("drawAlphaRect", true); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawAlphaRect"); return true; - } // save the current state SAL_INFO( "vcl.cg", "CGContextSaveGState(" << mrContext << ") " << ++mnContextStackDepth ); @@ -749,28 +691,19 @@ bool AquaSalGraphics::drawAlphaRect( long nX, long nY, long nWidth, CGContextRestoreGState(mrContext); RefreshRect( aRect ); - DBG_DRAW_OPERATION_EXIT("drawAlphaRect"); return true; } void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) { - DBG_DRAW_OPERATION("drawBitmap",); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap"); return; - } const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap); CGImageRef xImage = rBitmap.CreateCroppedImage( (int)rPosAry.mnSrcX, (int)rPosAry.mnSrcY, (int)rPosAry.mnSrcWidth, (int)rPosAry.mnSrcHeight ); if( !xImage ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap"); return; - } const CGRect aDstRect = CGRectMake(rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, rPosAry.mnDestHeight); SAL_INFO( "vcl.cg", "CGContextDrawImage(" << mrContext << "," << aDstRect << "," << xImage << ")" ); @@ -779,30 +712,20 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS SAL_INFO( "vcl.cg", "CGImageRelease(" << xImage << ")" ); CGImageRelease( xImage ); RefreshRect( aDstRect ); - - DBG_DRAW_OPERATION_EXIT("drawBitmap"); } void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, const SalBitmap& rTransparentBitmap ) { - DBG_DRAW_OPERATION("drawBitmap",); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap"); return; - } const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap); const QuartzSalBitmap& rMask = static_cast<const QuartzSalBitmap&>(rTransparentBitmap); CGImageRef xMaskedImage( rBitmap.CreateWithMask( rMask, rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcWidth, rPosAry.mnSrcHeight ) ); if( !xMaskedImage ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawBitmap"); return; - } const CGRect aDstRect = CGRectMake(rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, rPosAry.mnDestHeight); SAL_INFO( "vcl.cg", "CGContextDrawImage(" << mrContext << "," << aDstRect << "," << xMaskedImage << ")" ); @@ -810,8 +733,6 @@ void AquaSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rS SAL_INFO( "vcl.cg", "CGImageRelease(" << xMaskedImage << ")" ); CGImageRelease( xMaskedImage ); RefreshRect( aDstRect ); - - DBG_DRAW_OPERATION_EXIT("drawBitmap"); } #ifndef IOS @@ -868,22 +789,16 @@ bool AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) { - DBG_DRAW_OPERATION("drawLine",); - if( nX1 == nX2 && nY1 == nY2 ) { // #i109453# platform independent code expects at least one pixel to be drawn drawPixel( nX1, nY1 ); - DBG_DRAW_OPERATION_EXIT_EARLY("drawLine"); return; } if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawLine"); return; - } SAL_INFO( "vcl.cg", "CGContextBeginPath(" << mrContext << ")" ); CGContextBeginPath( mrContext ); @@ -897,29 +812,19 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) tools::Rectangle aRefreshRect( nX1, nY1, nX2, nY2 ); (void) aRefreshRect; // Is a call to RefreshRect( aRefreshRect ) missing here? - - DBG_DRAW_OPERATION_EXIT("drawLine"); } void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, SalColor nMaskColor ) { - DBG_DRAW_OPERATION("drawMask",); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawMask"); return; - } const QuartzSalBitmap& rBitmap = static_cast<const QuartzSalBitmap&>(rSalBitmap); CGImageRef xImage = rBitmap.CreateColorMask( rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcWidth, rPosAry.mnSrcHeight, nMaskColor ); if( !xImage ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawMask"); return; - } const CGRect aDstRect = CGRectMake(rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, rPosAry.mnDestHeight); SAL_INFO( "vcl.cg", "CGContextDrawImage(" << mrContext << "," << aDstRect << "," << xImage << ")" ); @@ -927,8 +832,6 @@ void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSal SAL_INFO( "vcl.cg", "CGImageRelease(" << xImage << ")" ); CGImageRelease( xImage ); RefreshRect( aDstRect ); - - DBG_DRAW_OPERATION_EXIT("drawMask"); } void AquaSalGraphics::drawPixel( long nX, long nY ) @@ -950,22 +853,14 @@ bool AquaSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolyLine, css::drawing::LineCap eLineCap, double fMiterMinimumAngle) { - DBG_DRAW_OPERATION("drawPolyLine", true); - // short circuit if there is nothing to do const int nPointCount = rPolyLine.count(); if( nPointCount <= 0 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); return true; - } #ifdef IOS if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); return false; - } #endif // #i101491# Aqua does not support B2DLineJoin::NONE; return false to use @@ -973,10 +868,7 @@ bool AquaSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolyLine, // #i104886# linejoin-mode and thus the above only applies to "fat" lines if( (basegfx::B2DLineJoin::NONE == eLineJoin) && (rLineWidths.getX() > 1.3) ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); return false; - } // setup line attributes CGLineJoin aCGLineJoin = kCGLineJoinMiter; @@ -1048,7 +940,6 @@ bool AquaSalGraphics::drawPolyLine( const basegfx::B2DPolygon& rPolyLine, SAL_INFO( "vcl.cg", "CGPathRelease(" << xPath << ")" ); CGPathRelease( xPath ); - DBG_DRAW_OPERATION_EXIT("drawPolyLine"); return true; } @@ -1060,22 +951,14 @@ bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const Pol bool AquaSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, double fTransparency ) { - DBG_DRAW_OPERATION("drawPolyPolygon", true); - // short circuit if there is nothing to do const int nPolyCount = rPolyPoly.count(); if( nPolyCount <= 0 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return true; - } // ignore invisible polygons if( (fTransparency >= 1.0) || (fTransparency < 0) ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return true; - } // setup poly-polygon path CGMutablePathRef xPath = CGPathCreateMutable(); @@ -1110,7 +993,6 @@ bool AquaSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" ); SAL_INFO( "vcl.cg", "CGPathRelease(" << xPath << ")" ); CGPathRelease( xPath ); - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return true; } @@ -1138,25 +1020,16 @@ bool AquaSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, SAL_INFO( "vcl.cg", "CGPathRelease(" << xPath << ")" ); CGPathRelease( xPath ); - DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); return true; } void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 *pPoints, PCONSTSALPOINT *ppPtAry ) { - DBG_DRAW_OPERATION("drawPolyPolygon",); - if( nPolyCount <= 0 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return; - } if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return; - } // find bound rect long leftX = 0, topY = 0, maxWidth = 0, maxHeight = 0; @@ -1203,7 +1076,6 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * else { SAL_WARN( "vcl.quartz", "Neither pen nor brush visible" ); - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyPolygon"); return; } @@ -1268,25 +1140,15 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * CGContextDrawPath( mrContext, eMode ); RefreshRect( leftX, topY, maxWidth, maxHeight ); - - DBG_DRAW_OPERATION_EXIT("drawPolyPolygon"); } void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry ) { - DBG_DRAW_OPERATION("drawPolygon",); - if( nPoints <= 1 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolygon"); return; - } if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolygon"); return; - } long nX = 0, nY = 0, nWidth = 0, nHeight = 0; getBoundRect( nPoints, pPtAry, nX, nY, nWidth, nHeight ); @@ -1344,8 +1206,6 @@ void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry ) SAL_INFO( "vcl.cg", "CGContextDrawPath(" << mrContext << "," << eMode << ")" ); CGContextDrawPath( mrContext, eMode ); RefreshRect( nX, nY, nWidth, nHeight ); - - DBG_DRAW_OPERATION_EXIT("drawPolygon"); } bool AquaSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const PolyFlags* ) @@ -1361,13 +1221,8 @@ bool AquaSalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) { - DBG_DRAW_OPERATION("drawRect",); - if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawRect"); return; - } CGRect aRect( CGRectMake(nX, nY, nWidth, nHeight) ); if( IsPenVisible() ) @@ -1389,25 +1244,15 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) CGContextStrokeRect( mrContext, aRect ); } RefreshRect( nX, nY, nWidth, nHeight ); - - DBG_DRAW_OPERATION_EXIT("drawRect"); } void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) { - DBG_DRAW_OPERATION("drawPolyLine",); - if( nPoints < 1 ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); return; - } if( !CheckContext() ) - { - DBG_DRAW_OPERATION_EXIT_EARLY("drawPolyLine"); return; - } long nX = 0, nY = 0, nWidth = 0, nHeight = 0; getBoundRect( nPoints, pPtAry, nX, nY, nWidth, nHeight ); @@ -1430,8 +1275,6 @@ void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) CGContextStrokePath(mrContext); RefreshRect( nX, nY, nWidth, nHeight ); - - DBG_DRAW_OPERATION_EXIT("drawPolyLine"); } sal_uInt16 AquaSalGraphics::GetBitCount() const commit a14960770087032f3818c9dffea13993c94e79c6 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Sep 27 17:56:46 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:45 2018 +0000 Need to handle css::uno::RuntimeException too now Change-Id: Idedcaddeab80fcfdc3d5a4f2852712827a98e848 (cherry picked from commit 45786711ec54e738d868ceabdc1a9f5bccffec1d) Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/source/ios.cxx b/ios/source/ios.cxx index 60b455d287ee..36aaa245f76d 100644 --- a/ios/source/ios.cxx +++ b/ios/source/ios.cxx @@ -28,6 +28,7 @@ void lo_ios_throwException(css::uno::Any const& aException) assert(aException.getValueTypeClass() == css::uno::TypeClass_EXCEPTION); tryThrow<css::ucb::InteractiveAugmentedIOException>(aException); + tryThrow<css::uno::RuntimeException>(aException); assert(false); } commit 1ba33db69fa72c79b806e2d418d91ce1ae7612b9 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 12 22:06:18 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:45 2018 +0000 Re-think cppu::throwException() and the C++/UNO bridge on iOS It seems that on iOS, where we don't have any Java, Python, BASIC, or other scripting, the only thing that would use the C++/UNO bridge functionality that invokes codeSnippet() was cppu::throwException(). codeSnippet() is part of what corresponds to the code that uses run-time-generated machine code on other platforms. We can't generate code at run-time on iOS, that has been known forever. Instead we have used some manually written assembler to handle it instead. We used to have a Perl script to generate a set of code snippets for different cases, different numbers of parameters of the called function and whatnot, but that went away at some stage some year ago. (It is unclear whether that broke the C++/UNO bridge on iOS, or whether the stuff continued to work even after that.) Anyway, this handwritten assembly, or the manual construction of internal data structures for exceptions, or something else, seemed to have bit-rotten. Exceptions thrown with cppu::throwException() were not catchable properly any longer. Instead of digging in and trying to understand what is wrong, I chose another solution. It turns out that the number of types of exception objects thrown by cppu::throwException() is fairly small. During startup of the LibreOffice code, and loading of an .odt document, only one kind of exception is thrown this way... (The lovely css::ucb:InteractiveAugmentedIOException.) So we can simply have code that checks what the type of object being thrown is, and explicitgly throws such an object then with a normal C++ throw statement. Seems to work. Sadly the cppu::getCaughtException() API still needs some inline assembly in the C++/UNO brige. That seems to work though, knock on wood. This commit also adds a small "unit test" for iOS, copied from cppuhelperm to ImplSVMain(). Ideally we should not copy code around of course, but have a separate unit test app for iOS that would somehow include relevant unit tests from source files all over the place. Later. Change-Id: Ib6d9d5b6fb8cc684ec15c97a312ca2f720e87069 Reviewed-on: https://gerrit.libreoffice.org/60506 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <[email protected]> (cherry picked from commit 7d6be61a62ca3724c67ab3fb93e60a2748d8a67e) Signed-off-by: Michael Meeks <[email protected]> diff --git a/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx index 762dbdc8db76..595d0e06cee3 100644 --- a/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx @@ -455,6 +455,10 @@ namespace sal_Int32 functionIndex, sal_Int32 vtableOffset) { + // For now temporarily assert when we get here. The intent is + // that we won't need the code snippets at all on iOS. + assert(false); + assert(functionIndex < nFunIndexes); if (!(functionIndex < nFunIndexes)) return NULL; diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index 4e39ae6c8b5a..4dd0b57c00de 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -29,6 +29,10 @@ #include <cppuhelper/exc_hlp.hxx> +#ifdef IOS +#include <ios/ios.hxx> +#endif + using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star; @@ -185,6 +189,9 @@ void SAL_CALL throwException( Any const & exc ) "(must be derived from com::sun::star::uno::Exception)!" ); } +#ifdef IOS + lo_ios_throwException(exc); +#else Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent()); if (! uno2cpp.is()) { @@ -199,6 +206,7 @@ void SAL_CALL throwException( Any const & exc ) ExceptionThrower::getCppuType() ); OSL_ASSERT( xThrower.is() ); xThrower->throwException( exc ); +#endif } diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 53496f2c1544..1491358a510e 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -43,7 +43,10 @@ $(eval $(call gb_Library_use_custom_headers,sofficeapp,\ officecfg/registry \ )) -$(eval $(call gb_Library_use_sdk_api,sofficeapp)) +$(eval $(call gb_Library_use_api,sofficeapp,\ + udkapi \ + offapi \ +)) $(eval $(call gb_Library_add_defs,sofficeapp,\ -DDESKTOP_DLLIMPLEMENTATION \ diff --git a/include/ios/ios.hxx b/include/ios/ios.hxx new file mode 100644 index 000000000000..d8fe4d7bd6e1 --- /dev/null +++ b/include/ios/ios.hxx @@ -0,0 +1,19 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_IOS_IOS_HXX +#define INCLUDED_IOS_IOS_HXX + +#include "com/sun/star/uno/Any.hxx" + +extern void lo_ios_throwException(css::uno::Any const& aException); + +#endif // INCLUDED_IOS_IOS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk index 1425e6076190..bc50bfc424f3 100644 --- a/ios/Module_ios.mk +++ b/ios/Module_ios.mk @@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,ios)) ifeq ($(OS),IOS) $(eval $(call gb_Module_add_targets,ios,\ + StaticLibrary_ios \ CustomTarget_iOS_setup \ )) diff --git a/ios/StaticLibrary_ios.mk b/ios/StaticLibrary_ios.mk new file mode 100644 index 000000000000..36baff4e064b --- /dev/null +++ b/ios/StaticLibrary_ios.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +$(eval $(call gb_StaticLibrary_StaticLibrary,ios)) + +$(eval $(call gb_StaticLibrary_use_api,ios,\ + udkapi \ + offapi \ +)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,ios,\ + ios/source/ios \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/ios/source/ios.cxx b/ios/source/ios.cxx new file mode 100644 index 000000000000..60b455d287ee --- /dev/null +++ b/ios/source/ios.cxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <cassert> + +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp" +#include "ios/ios.hxx" + +namespace +{ +template <class E> void tryThrow(css::uno::Any const& aException) +{ + E aSpecificException; + if (aException >>= aSpecificException) + throw aSpecificException; +} +} + +void lo_ios_throwException(css::uno::Any const& aException) +{ + assert(aException.getValueTypeClass() == css::uno::TypeClass_EXCEPTION); + + tryThrow<css::ucb::InteractiveAugmentedIOException>(aException); + + assert(false); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index f7d24d09079a..3a444e9c6119 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -176,6 +176,85 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo } +#ifdef IOS + +#include <cppuhelper/exc_hlp.hxx> +#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> + +// Swiped from cppuhelper/qa/misc/test_misc.cxx. Ideally we should +// have a unit test app for iOS that would somehow include relevant +// unit tests from source files all over the place. + +static void testExceptions() +{ + css::uno::Any aSavedExceptionAny; + std::exception_ptr + aSavedException; /// exception caught during unzipping is saved to be thrown during reading + try + { + throw css::uno::RuntimeException("RuntimeException"); + } + catch (...) + { + aSavedException = std::current_exception(); + } + assert(bool(aSavedException)); + try + { + std::rethrow_exception(aSavedException); + } + catch (const css::uno::RuntimeException&) + { + // the expected case + aSavedExceptionAny = cppu::getCaughtException(); + } + catch (...) + { + assert(false); + } + assert(aSavedExceptionAny.hasValue()); + + try + { + throw css::ucb::InteractiveAugmentedIOException(); + } + catch (const css::ucb::InteractiveAugmentedIOException&) + { + aSavedExceptionAny = cppu::getCaughtException(); + } + catch (const css::uno::Exception&) + { + assert(false); + } + catch (...) + { + assert(false); + } + assert(aSavedExceptionAny.hasValue()); + + try + { + css::ucb::InteractiveAugmentedIOException iaie; + css::uno::Any aEx = css::uno::makeAny(iaie); + // css::uno::Exception e; + // css::uno::Any aEx = css::uno::makeAny(e); + cppu::throwException(aEx); + } + catch (const css::ucb::InteractiveAugmentedIOException&) + { + } + catch (const css::uno::Exception& e) + { + assert(false); + } + catch (...) + { + assert(false); + } +} + +#endif + int ImplSVMain() { // The 'real' SVMain() @@ -191,6 +270,10 @@ int ImplSVMain() postInitVCLinitNSApp(); #endif +#ifdef IOS + testExceptions(); +#endif + if( bInit ) { // call application main commit 3f133f7cf7720033e386c464d4d5366a1003ea36 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Sep 6 16:48:10 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:44 2018 +0000 Return share/config/soffice.cfg as it was, as I think the code expects Change-Id: I0991b13a7538581642f530bf45a1bba1b1b644d5 Reviewed-on: https://gerrit.libreoffice.org/60505 Reviewed-by: Tor Lillqvist <[email protected]> Tested-by: Tor Lillqvist <[email protected]> Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index ed3e870cf079..ce45e456df8b 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -38,6 +38,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i cp $(INSTDIR)/program/types/oovbaapi.rdb $(IOSRES) cp $(INSTDIR)/program/services/services.rdb $(IOSRES)/services cp $(INSTDIR)/program/services.rdb $(IOSRES) + mkdir -p $(IOSRES)/share/config cp -R $(INSTDIR)/share/config/soffice.cfg $(IOSRES)/share/config cp $(WORKDIR)/CustomTarget/i18npool/breakiterator/dict_*.data $(IOSRES)/share cp $(INSTDIR)/share/filter/oox-drawingml-adj-names $(IOSRES)/share/filter commit 45a7bb9345e17986d389ebda988ec84fa21647fb Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 5 20:30:24 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:44 2018 +0000 Don't copy files into the source directory, use workdir Change-Id: I0b17c595fc0d169f6393ab8734a1eecb241f59be Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index 13ef8d1d3596..ed3e870cf079 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -6,7 +6,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #- Env ------------------------------------------------------------------------ -IOSGEN := $(SRCDIR)/ios/generated +IOSGEN := $(BUILDDIR)/workdir/CustomTarget/ios IOSRES := $(IOSGEN)/resources @@ -78,7 +78,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i $(SRCDIR)/bin/lo-all-static-libs | sed -e 's/ /\ -/g' >$(WORKDIR)/ios-all-static-libs.list +/g' >$(IOSGEN)/ios-all-static-libs.list #- clean ios ----------------------------------------------------------------- $(call gb_CustomTarget_get_clean_target,ios/iOS_setup): commit f71d2254baa600b5ba8050b27b22e96e24d8d558 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 5 13:53:06 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:44 2018 +0000 Put the lib names one per line to match what ld's -filelist expects Change-Id: I7454c10a1547db796554f45f2d630af81a916c55 (cherry picked from commit 59b9fc4776940863d905de14e25d74421f7de603) Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index aaeeb267dc17..13ef8d1d3596 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -77,7 +77,8 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i echo "buildid=$(BUILDID)" >> $(IOSRES)/program/versionrc - $(SRCDIR)/bin/lo-all-static-libs >$(WORKDIR)/ios-all-static-libs.list + $(SRCDIR)/bin/lo-all-static-libs | sed -e 's/ /\ +/g' >$(WORKDIR)/ios-all-static-libs.list #- clean ios ----------------------------------------------------------------- $(call gb_CustomTarget_get_clean_target,ios/iOS_setup): commit 26903d9024d55053017a22f146030c2108b973a7 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Sep 4 16:54:27 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:43 2018 +0000 Run bin/ios-all-static-libs and put its output in a file (To be used from Xcode projects elsewhere building iOS apps that want to link to iOS code built here.) Change-Id: I39bf2a4ed059930fcfc30c4d2016dfbc698da353 (cherry picked from commit e3bac83bec762db924149f710f1ba437e0c94582) Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index 24e28df768fe..aaeeb267dc17 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -77,6 +77,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i echo "buildid=$(BUILDID)" >> $(IOSRES)/program/versionrc + $(SRCDIR)/bin/lo-all-static-libs >$(WORKDIR)/ios-all-static-libs.list #- clean ios ----------------------------------------------------------------- $(call gb_CustomTarget_get_clean_target,ios/iOS_setup): commit 92c79400b210384ed84bdabd1c88314dd2509f34 Author: Eike Rathke <[email protected]> AuthorDate: Tue Jul 17 17:37:55 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:43 2018 +0000 Use $(ICU_MAJOR) instead of hard coded (Upgrade to ICU 62.1) Change-Id: Ifea7072922388b2c0b7631fb809b23e2a5524a3c Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk index b6796d5d4721..24e28df768fe 100644 --- a/ios/CustomTarget_iOS_setup.mk +++ b/ios/CustomTarget_iOS_setup.mk @@ -32,7 +32,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i > $(IOSGEN)/native-code.h # generate resource files used to start/run LibreOffice - cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt60l.dat $(IOSRES)/icudt60l.dat + cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt$(ICU_MAJOR)l.dat $(IOSRES)/icudt$(ICU_MAJOR)l.dat cp $(INSTDIR)/program/types.rdb $(IOSRES)/udkapi.rdb cp $(INSTDIR)/program/types/offapi.rdb $(IOSRES) cp $(INSTDIR)/program/types/oovbaapi.rdb $(IOSRES) commit 06f6d918fd2c6fb5b1d6203f8e2f22e7d04a9fee Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 18:28:17 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:43 2018 +0000 Don't bother with the WIP stuff for LibreOfficeLight in this branch LibreOfficeLight is buildable in master. In this branch I am now trying to make it build for the needs of the "Mobile" app in online.git. Change-Id: I08b1ea0ef74dc5384d3b2edb2607d4a4f031469a Signed-off-by: Michael Meeks <[email protected]> diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk index c280713cc198..1425e6076190 100644 --- a/ios/Module_ios.mk +++ b/ios/Module_ios.mk @@ -12,8 +12,6 @@ ifeq ($(OS),IOS) $(eval $(call gb_Module_add_targets,ios,\ CustomTarget_iOS_setup \ - StaticLibrary_iOSkit \ - CustomTarget_iOS_prelink \ )) commit 2cf09df8aea3a271278be03c24aca3c5ac2f1dda Author: jan Iversen <[email protected]> AuthorDate: Thu Jan 4 22:54:55 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:42 2018 +0000 libqxp, add update of config.sub Change-Id: I4999be84c45fa32d0ae6f62f667b2c7470972f49 (cherry picked from commit 90c22bf8a1e41cb6f4f8124f554e5efe081cc756) Signed-off-by: Michael Meeks <[email protected]> diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk index 017b21d9f55c..8519e983d957 100644 --- a/external/libqxp/UnpackedTarball_libqxp.mk +++ b/external/libqxp/UnpackedTarball_libqxp.mk @@ -13,6 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libqxp,$(QXP_TARBALL))) $(eval $(call gb_UnpackedTarball_set_patchlevel,libqxp,0)) +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libqxp)) + ifeq ($(COM_IS_CLANG),TRUE) ifneq ($(filter -fsanitize=%,$(CC)),) $(eval $(call gb_UnpackedTarball_add_patches,libqxp, \ commit e76a974854cca93d5c330f267f6e89d763647dd6 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 18:11:53 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:42 2018 +0000 Put most of this file in #if HAVE_FEATURE_PDFIUM like in master Change-Id: I43c6e841144b6e5f76d2c78e7b78ab41a29c20e5 Signed-off-by: Michael Meeks <[email protected]> diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 5a90da06b6eb..5193ce50b2f6 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -26,7 +26,6 @@ #include <fpdf_edit.h> #include <fpdf_save.h> #include <fpdf_text.h> -#endif #include <vcl/bitmapaccess.hxx> #include <vcl/graph.hxx> @@ -1257,4 +1256,6 @@ tools::Rectangle ImpSdrPdfImport::PointsToLogic(double left, double right, doubl return aRect; } +#endif // HAVE_FEATURE_PDFIUM + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 76b79597bb505d369ff0a6cc5a352aa2a95b6751 Author: jan Iversen <[email protected]> AuthorDate: Mon Feb 26 19:50:26 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:42 2018 +0000 vcl, solve iOS compile failure. "voided" new formal parameter Change-Id: I7d8849765eb6a2642f48159bae34c3b8bec3a8cd (cherry picked from commit 7c30bf05ec891b0d8cba117838ff20e9d0b6d63e) Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index c7cd3ae0f963..439adf04fa88 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -167,7 +167,9 @@ void SvpSalInstance::Wakeup(SvpRequest const request) g_CheckedMutex = true; } #endif -#ifndef IOS +#ifdef IOS + (void)request; +#else SvpSalYieldMutex *const pMutex(static_cast<SvpSalYieldMutex*>(mpSalYieldMutex.get())); std::unique_lock<std::mutex> g(pMutex->m_WakeUpMainMutex); if (request != SvpRequest::NONE) commit edc682446705722f3981086e8ffa8ffc1d53ecab Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Aug 27 15:00:20 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:42 2018 +0000 Fix warning in !HAVE_FEATURE_SCRIPTING case Change-Id: Ibc2a9d4426e9ef09eb874e7a9fef0ea31cad56d5 (cherry picked from commit 57ba456786614348e309ad1860219ace2f2a2e0b) Signed-off-by: Michael Meeks <[email protected]> diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 845cf395ebb1..106779983d12 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -616,6 +616,7 @@ struct VbaFormatInfo const char* mpOOoFormat; // if meType = VbaFormatType::UserDefined }; +#if HAVE_FEATURE_SCRIPTING const VbaFormatInfo pFormatInfoTable[] = { { VbaFormatType::Offset, OUStringLiteral("Long Date"), NF_DATE_SYSTEM_LONG, nullptr }, @@ -631,7 +632,6 @@ const VbaFormatInfo pFormatInfoTable[] = { VbaFormatType::Null, OUStringLiteral(""), NF_INDEX_TABLE_ENTRIES, nullptr } }; -#if HAVE_FEATURE_SCRIPTING const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) { const VbaFormatInfo* pInfo = pFormatInfoTable; commit 453395ee4708afb5b7b41fe876aae1a10fdbb526 Author: jan Iversen <[email protected]> AuthorDate: Mon Jan 8 11:52:17 2018 +0100 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:41 2018 +0000 basic, solve link problems When not using scripting, there were a number of unresolved symbols. First aproach did not work, so this commit is the more extensive. Change-Id: Iaf78bde10d9a43862d58d1aa8f46b14aa075eddb Signed-off-by: Michael Meeks <[email protected]> diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index d84e3953284e..e7a639a5a069 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -29,6 +29,7 @@ #include <unotools/resmgr.hxx> #include <strings.hrc> #include <sbxbase.hxx> +#include <config_features.h> struct BasicDLL::Impl { @@ -85,6 +86,7 @@ void BasicDLL::BasicBreak() { BasicDLL* pThis = BASIC_DLL; DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); +#if HAVE_FEATURE_SCRIPTING if ( pThis ) { // bJustStopping: if there's someone pressing STOP like crazy umpteen times, @@ -99,6 +101,7 @@ void BasicDLL::BasicBreak() bJustStopping = false; } } +#endif } SbxAppData& GetSbxData_Impl() diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index e59c9214a90b..9fbfdc15ec87 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -31,6 +31,7 @@ #include <math.h> #include <comphelper/processfactory.hxx> #include <memory> +#include <config_features.h> double ImpGetDate( const SbxValues* p ) @@ -96,6 +97,7 @@ double ImpGetDate( const SbxValues* p ) case SbxBYREF | SbxSTRING: case SbxSTRING: case SbxLPSTR: +#if HAVE_FEATURE_SCRIPTING if( !p->pOUString ) { nRes = 0; @@ -157,6 +159,9 @@ double ImpGetDate( const SbxValues* p ) SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); nRes = 0; } } +#else + nRes = 0; +#endif break; case SbxOBJECT: pVal = dynamic_cast<SbxValue*>( p->pObj ); @@ -272,6 +277,7 @@ start: case SbxSTRING: case SbxLPSTR: { +#if HAVE_FEATURE_SCRIPTING if( !p->pOUString ) { p->pOUString = new OUString; @@ -333,6 +339,7 @@ start: LANGUAGE_ENGLISH_US, eLangType ); pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor ); +#endif break; } case SbxOBJECT: diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 59d6fd6bead4..845cf395ebb1 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -631,6 +631,7 @@ const VbaFormatInfo pFormatInfoTable[] = { VbaFormatType::Null, OUStringLiteral(""), NF_INDEX_TABLE_ENTRIES, nullptr } }; +#if HAVE_FEATURE_SCRIPTING const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) { const VbaFormatInfo* pInfo = pFormatInfoTable; @@ -642,9 +643,11 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) } return pInfo; } +#endif } // namespace +#if HAVE_FEATURE_SCRIPTING #define VBAFORMAT_GENERALDATE "General Date" #define VBAFORMAT_C "c" #define VBAFORMAT_N "n" @@ -653,6 +656,7 @@ const VbaFormatInfo* getFormatInfo( const OUString& rFmt ) #define VBAFORMAT_Y "y" #define VBAFORMAT_LOWERCASE "<" #define VBAFORMAT_UPPERCASE ">" +#endif void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const { @@ -662,6 +666,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const // pflin, It is better to use SvNumberFormatter to handle the date/time/number format. // the SvNumberFormatter output is mostly compatible with // VBA output besides the OOo-basic output +#if HAVE_FEATURE_SCRIPTING if( pFmt && !SbxBasicFormater::isBasicFormat( *pFmt ) ) { OUString aStr = GetOUString(); @@ -786,6 +791,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const return; } } +#endif SbxDataType eType = GetType(); switch( eType ) commit 891e3623d3c255c4cd4c9d7468517b25397834d3 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 17:21:45 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:41 2018 +0000 Fix build in the !HAVE_FEATURE_PDFIUM case Change-Id: Ia9263e67c3a4094a58141a8140de66a22accb768 Signed-off-by: Michael Meeks <[email protected]> diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index 0eb30bf17ae0..02c7be44594f 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -192,7 +192,7 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream, return rOutStream.good(); } #else -size_t generatePreview(SvStream&, std::vector<Bitmap>&, sal_uInt64, sal_uInt64, size_t, int) +size_t generatePreview(SvStream&, std::vector<Bitmap>&, sal_uInt64, sal_uInt64, size_t, int, double) { return 0; } commit 669ac96a35675a8ce3ac4cf0eadb42147ae03418 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Sep 5 11:19:22 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:41 2018 +0000 Workaround for file name case inconsistency Change-Id: Ia13dc01f86e51064658d5ad9a996c6bd555cbeef (cherry picked from commit 1d6d1eef3a6c3c14ea88eeeadb0119624bfa8056) Signed-off-by: Michael Meeks <[email protected]> diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index b87f6fc569dd..309906b38d0c 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -166,7 +166,19 @@ $(eval $(call gb_Helper_collect_knownlibs)) gb_Library_DLLPOSTFIX := lo # Include platform/cpu/compiler specific config/definitions -include $(GBUILDDIR)/platform/$(OS)_$(CPUNAME)_$(COM).mk + +# Work around inconsistency in case of $(OS) being "IOS" (all +# upper-case) vs. the file being included here having the name +# iOS_*_*.mk (lower-case 'i'). This went unnoticed until now when I +# happen to build for iOS on a case-sensitive file system. + +ifeq ($(OS),IOS) +gbuildplatformosname=iOS +else +gbuildplatformosname=$(OS) +endif + +include $(GBUILDDIR)/platform/$(gbuildplatformosname)_$(CPUNAME)_$(COM).mk # this is optional include $(SRCDIR)/RepositoryFixes.mk commit 0862e6502d95d0d45432978f1363b88bceb595a3 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 16:44:32 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:40 2018 +0000 iOS SDK 12.0 is the current now Also, I don't see why we would want to use -miphoneos-version-min=12.0 just because we build against the 12.0 SDK. Use 11.0 as the minimum runtime iOS version for now. Change-Id: Ibbb65c785dc3c96c43413cf8b1f57fe8708bb5f7 Signed-off-by: Michael Meeks <[email protected]> diff --git a/configure.ac b/configure.ac index 8f35344a003f..65b5dc8e9847 100644 --- a/configure.ac +++ b/configure.ac @@ -2863,13 +2863,13 @@ dnl =================================================================== if test $_os = iOS; then AC_MSG_CHECKING([what iOS SDK to use]) - current_sdk_ver=11.1 + current_sdk_ver=12.0 if test "$enable_ios_simulator" = "yes"; then platform=iPhoneSimulator versionmin=-mios-simulator-version-min=$current_sdk_ver else platform=iPhoneOS - versionmin=-miphoneos-version-min=$current_sdk_ver + versionmin=-miphoneos-version-min=11.0 fi xcode_developer=`xcode-select -print-path` commit 6ea77cff60d5063e2d324cc479ffddeff81bb571 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Oct 29 16:39:23 2018 +0200 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:40 2018 +0000 It's the developer's choice whether to use --enable-werror and --enable-debug They belong in an autogen.input, not in a distro-configs file. Change-Id: I4d9133b7c192d6e95cada51e8c3105b21f0b7985 Signed-off-by: Michael Meeks <[email protected]> diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf index fc0b02ac33ff..75f732c0abbc 100644 --- a/distro-configs/LibreOfficeiOS.conf +++ b/distro-configs/LibreOfficeiOS.conf @@ -26,8 +26,5 @@ --without-tls ---enable-debug ---enable-werror - #--enable-ios-simulator --host=arm64-apple-darwin commit 452e00545e2dc7bfb8b46740d65d830c5d96f105 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Oct 11 19:37:00 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:40 2018 +0000 No reason to have --disable-dependency-tracking here ffs Change-Id: Ia42daaf0dbb8fcd0230c7cee21a0f5d560885c22 (cherry picked from commit b0bed2457ffd74f772aec6d5fc76862822f79bbe) Signed-off-by: Michael Meeks <[email protected]> diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf index ba7e45c57be1..fc0b02ac33ff 100644 --- a/distro-configs/LibreOfficeiOS.conf +++ b/distro-configs/LibreOfficeiOS.conf @@ -17,7 +17,6 @@ --disable-cups --disable-database-connectivity --disable-dconf ---disable-dependency-tracking --disable-extensions --disable-kde4 --disable-odk commit c9e6a76294b37a038ade688316289bdf819a2357 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Oct 3 10:22:22 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:40 2018 +0000 Don't disable dbgutil here, let the developer choose in their autogen.input Change-Id: If6149dce7a0467a73720e9ea40e54705518f3316 (cherry picked from commit 2b9d6a6c567d44bcdd337e92b5f9b8238fd76d26) Signed-off-by: Michael Meeks <[email protected]> diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf index 2041cabe51a9..ba7e45c57be1 100644 --- a/distro-configs/LibreOfficeiOS.conf +++ b/distro-configs/LibreOfficeiOS.conf @@ -16,7 +16,6 @@ --disable-compiler-plugins --disable-cups --disable-database-connectivity ---disable-dbgutil --disable-dconf --disable-dependency-tracking --disable-extensions commit 3d5f1d1220999be60e85f9b8759676af2695fddc Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Aug 27 14:36:36 2018 +0300 Commit: Michael Meeks <[email protected]> CommitDate: Tue Oct 30 17:00:39 2018 +0000 Disable mariadb for iOS (In master it is disabled for Android, too.) Change-Id: Iee7b31f1b1a498b99f027cc9f5aeb60360213e51 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Michael Meeks <[email protected]> diff --git a/configure.ac b/configure.ac index 932d8c73a6f6..8f35344a003f 100644 --- a/configure.ac +++ b/configure.ac @@ -8109,6 +8109,9 @@ AC_SUBST(PYTHON_VERSION_MAJOR) AC_SUBST(PYTHON_VERSION_MINOR) ENABLE_MARIADBC=TRUE +if test "$_os" = "iOS"; then + ENABLE_MARIADBC= +fi MARIADBC_MAJOR=1 MARIADBC_MINOR=0 MARIADBC_MICRO=2 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
