[Libreoffice-commits] core.git: vcl/ios vcl/osx vcl/qt5 vcl/source vcl/unx vcl/win
vcl/ios/clipboard.cxx|6 +--- vcl/osx/DragSource.cxx | 14 +- vcl/osx/DropTarget.cxx | 10 +++ vcl/osx/clipboard.cxx|2 - vcl/qt5/QtClipboard.cxx |2 - vcl/qt5/QtDragAndDrop.cxx| 10 +++ vcl/source/app/session.cxx |2 - vcl/source/components/dtranscomp.cxx |8 +++--- vcl/source/filter/graphicfilter.cxx |2 - vcl/unx/generic/dtrans/X11_clipboard.cxx |4 +-- vcl/unx/generic/dtrans/X11_selection.cxx | 40 +++ vcl/unx/gtk3/gtkinst.cxx | 10 +++ vcl/win/dtrans/clipboardmanager.cxx |3 -- 13 files changed, 54 insertions(+), 59 deletions(-) New commits: commit b4de1a98e61a75782464a440a33acf7435e1bbb9 Author: Mike Kaganski AuthorDate: Sun Apr 23 20:15:40 2023 +0300 Commit: Mike Kaganski CommitDate: Sun May 28 11:50:12 2023 +0200 Use getXWeak in vcl Change-Id: I665c9dc8c4f9cc4a996d9bf990cbfa33822bd07f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150885 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/ios/clipboard.cxx b/vcl/ios/clipboard.cxx index 61530b926e2a..59209504da31 100644 --- a/vcl/ios/clipboard.cxx +++ b/vcl/ios/clipboard.cxx @@ -121,8 +121,7 @@ void iOSClipboard::fireClipboardChangedEvent( if (!listeners.empty()) { -aEvent = css::datatransfer::clipboard::ClipboardEvent(static_cast(this), - xNewContents); +aEvent = css::datatransfer::clipboard::ClipboardEvent(getXWeak(), xNewContents); } aGuard.clear(); @@ -177,8 +176,7 @@ css::uno::Sequence SAL_CALL iOSClipboard::getSupportedServiceNames() css::uno::Reference IosSalInstance::CreateClipboard(const css::uno::Sequence&) { -return css::uno::Reference( -static_cast(new iOSClipboard())); +return getXWeak(new iOSClipboard()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx index bf2c0c25a310..fbe3b216a653 100644 --- a/vcl/osx/DragSource.cxx +++ b/vcl/osx/DragSource.cxx @@ -97,7 +97,7 @@ static Sequence dragSource_getSupportedServiceNames() { (void)anImage; (void)aPoint; -DragSourceDragEvent dsde(static_cast(mDragSource), +DragSourceDragEvent dsde(mDragSource->getXWeak(), new DragSourceContext, mDragSource, DNDConstants::ACTION_COPY, @@ -116,7 +116,7 @@ static Sequence dragSource_getSupportedServiceNames() if( DragSource::g_DropSuccessSet ) bDropSuccess = DragSource::g_DropSuccess; -DragSourceDropEvent dsde(static_cast(mDragSource), +DragSourceDropEvent dsde(mDragSource->getXWeak(), new DragSourceContext, static_cast< XDragSource* >(mDragSource), SystemToOfficeDragActions(operation), @@ -130,7 +130,7 @@ static Sequence dragSource_getSupportedServiceNames() { (void)draggedImage; (void)screenPoint; -DragSourceDragEvent dsde(static_cast(mDragSource), +DragSourceDragEvent dsde(mDragSource->getXWeak(), new DragSourceContext, mDragSource, DNDConstants::ACTION_COPY, @@ -163,7 +163,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (aArguments.getLength() < 2) { throw Exception("DragSource::initialize: Not enough parameter.", - static_cast(this)); + getXWeak()); } Any pNSView = aArguments[1]; @@ -181,13 +181,13 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) ![mView respondsToSelector: @selector(unregisterMouseEventListener:)]) { throw Exception("DragSource::initialize: Provided view doesn't support mouse listener", - static_cast(this)); + getXWeak()); } NSWindow* pWin = [mView window]; if( ! pWin || ![pWin respondsToSelector: @selector(getSalFrame)] ) { throw Exception("DragSource::initialize: Provided view is not attached to a vcl frame", - static_cast(this)); + getXWeak()); } mpFrame = reinterpret_cast([pWin performSelector: @selector(getSalFrame)]); @@ -196,7 +196,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (mDragSourceHelper == nil) { throw Exception("DragSource::initialize: Cannot initialize DragSource", - static_cast(this)); + getXWeak()); } [static_cast>(mView) registerMouseEventListener: mDragSourceHelper]; diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx index
[Libreoffice-commits] core.git: vcl/ios vcl/source
vcl/ios/iOSTransferable.cxx | 10 ++ vcl/source/window/dialog.cxx | 13 + 2 files changed, 23 insertions(+) New commits: commit b0b8815fffcd1d3862a4784fe93bb7c9d66b7d1c Author: Patrick Luby AuthorDate: Fri Mar 10 12:11:25 2023 -0500 Commit: Patrick Luby CommitDate: Tue Mar 14 21:42:24 2023 + Handle pasting disallowed clipboard contents on iOS When another app owns the current clipboard contents, pasting will display a "allow or disallow" dialog. If the disallow option is selected, the data from the UIPasteboard will be garbage and GetLOKNotifier() will return a nullptr. Since calling SetLOKNotifier() with a nullptr aborts in an assert(), fix the crash by failing gracefully. Also, throw an exception if the -[UIPasteboard dataForPasteboardType:] returns nil. By throwing an exception, the "allow or disallow" dialog will display again the next time the user tries to paste. Change-Id: I05d689b679a7643a8478e3ce0f416205fdf8ec23 Reference-to: https://github.com/CollaboraOnline/online/issues/5908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148655 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit 1dd68786a927a23e5465589025abd90b8c9f4e7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148627 Tested-by: Jenkins Reviewed-by: Patrick Luby diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx index ece771e7f60b..bfbc8a9afa82 100644 --- a/vcl/ios/iOSTransferable.cxx +++ b/vcl/ios/iOSTransferable.cxx @@ -109,6 +109,16 @@ Any SAL_CALL iOSTransferable::getTransferData(const DataFlavor& aFlavor) DataProviderPtr_t dp; NSData* sysData = [[UIPasteboard generalPasteboard] dataForPasteboardType:sysFormat]; +if (!sysData) +{ +// Related: gh#5908 throw an exception if the data flavor is nil +// If nil is returned, it can mean that the user has selected the +// "disallow" option and so we can't access the current clipboard +// contents. Also, by throwing an exception, the "allow or disallow" +// dialog will display again the next time the user tries to paste. +throw UnsupportedFlavorException("Data flavor is nil", static_cast(this)); +} + dp = DataFlavorMapper::getDataProvider(sysFormat, sysData); if (dp.get() == nullptr) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index a255ed4b9a47..3327e371e6c1 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -926,7 +926,20 @@ bool Dialog::ImplStartExecute() if (bModal) { if (bKitActive && !GetLOKNotifier()) +{ +#ifdef IOS +// gh#5908 handle pasting disallowed clipboard contents on iOS +// When another app owns the current clipboard contents, pasting +// will display a "allow or disallow" dialog. If the disallow +// option is selected, the data from the UIPasteboard will be +// garbage and we will find ourselves here. Since calling +// SetLOKNotifier() with a nullptr aborts in an assert(), fix +// the crash by failing gracefully. +return false; +#else SetLOKNotifier(mpDialogImpl->m_aInstallLOKNotifierHdl.Call(nullptr)); +#endif +} switch ( Application::GetDialogCancelMode() ) {
[Libreoffice-commits] core.git: vcl/ios vcl/source
vcl/ios/DataFlavorMapping.cxx|2 +- vcl/source/treelist/transfer.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit e84dcee44aa7cdd340ee22d528afe14abebba994 Author: Tor Lillqvist AuthorDate: Thu Dec 16 19:24:20 2021 +0200 Commit: Tor Lillqvist CommitDate: Thu Dec 16 21:30:15 2021 +0100 Fix iOS compilation after recent changes to Sequence Change-Id: I73c519174029766a3a2f61f9ad93fd63589b8184 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126957 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 6a3815cf7eb3..05abf2b8a6f9 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -559,7 +559,7 @@ DataFlavorMapper::typesArrayToFlavorSequence(NSArray* types) const if (isValidFlavor(oOOFlavor)) { flavors.realloc(flavors.getLength() + 1); -flavors[flavors.getLength() - 1] = oOOFlavor; +flavors.getArray()[flavors.getLength() - 1] = oOOFlavor; SAL_INFO("vcl.ios.clipboard", "Mapped " << [sysFormat UTF8String] << " to " << oOOFlavor.MimeType); } diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 260e3ba65613..23a865a0a3f0 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -668,7 +668,7 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavo #ifdef IOS // Use faster compression on slow devices aFilterData.realloc(aFilterData.getLength() + 1); -aFilterData[aFilterData.getLength() - 1].Name = "Compression"; +aFilterData.getArray()[aFilterData.getLength() - 1].Name = "Compression"; // We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. For a // typical 15 megapixel image from a DSLR, we are talking about a difference of 17 s for @@ -677,7 +677,7 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavo // Sure, the best would be to not have to re-encode the image at all, but have access to // the original JPEG or PNG when there is a such. -aFilterData[aFilterData.getLength() - 1].Value <<= 1; +aFilterData.getArray()[aFilterData.getLength() - 1].Value <<= 1; #endif vcl::PNGWriter aPNGWriter(rBitmapEx, );
[Libreoffice-commits] core.git: vcl/ios vcl/osx
vcl/ios/iOSTransferable.cxx |1 - vcl/osx/DataFlavorMapping.cxx |1 - vcl/osx/OSXTransferable.cxx |1 - vcl/osx/salframe.cxx |1 - vcl/osx/salinst.cxx |1 - 5 files changed, 5 deletions(-) New commits: commit 490479c9b6f75dd857b8b644f84f65c37c1b460f Author: Julien Nabet AuthorDate: Wed Oct 6 21:20:21 2021 +0200 Commit: Julien Nabet CommitDate: Wed Oct 6 22:55:55 2021 +0200 drop 'using namespace std' in vcl (MacOs/ios), blindly but hopefully there's a Jenkins machine on MacOs Change-Id: If5e87d16e64f010494ca1e5751ea6873f3a21a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123190 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx index 6e1bd00b3a97..ece771e7f60b 100644 --- a/vcl/ios/iOSTransferable.cxx +++ b/vcl/ios/iOSTransferable.cxx @@ -31,7 +31,6 @@ #include "DataFlavorMapping.hxx" -using namespace std; using namespace osl; using namespace cppu; using namespace com::sun::star::uno; diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index feecca3f663e..1145c77cfa76 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -45,7 +45,6 @@ using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::uno; using namespace com::sun::star::lang; using namespace cppu; -using namespace std; namespace { diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx index 4857843c34f3..f3ed1ec83fae 100644 --- a/vcl/osx/OSXTransferable.cxx +++ b/vcl/osx/OSXTransferable.cxx @@ -30,7 +30,6 @@ #include "DataFlavorMapping.hxx" -using namespace std; using namespace osl; using namespace cppu; using namespace com::sun::star::uno; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 5b3a7e665ff5..7ef3b7b2c1ce 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -54,7 +54,6 @@ #include #include -using namespace std; AquaSalFrame* AquaSalFrame::s_pCaptureFrame = nullptr; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 9424c4e90909..452821f33e14 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -84,7 +84,6 @@ extern "C" { #include } -using namespace std; using namespace ::com::sun::star; static int* gpnInit = nullptr;
[Libreoffice-commits] core.git: vcl/ios vcl/osx vcl/quartz
vcl/ios/salios.cxx | 147 ++ vcl/osx/salmacos.cxx| 152 vcl/quartz/salgdicommon.cxx | 147 -- 3 files changed, 299 insertions(+), 147 deletions(-) New commits: commit 2cce064e6bb570361c845f7b3d82960f89c70bb1 Author: Thorsten Wagner AuthorDate: Wed May 19 17:47:58 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat May 22 18:02:29 2021 +0200 tdf#142061 Add window scaling to XOR emulation on macOS Window scaling for retina displays on macOS has been added to fix tdf#138122 in commit 1a167625314bf36b735176ed488e6ba9b5e9b675 Missing window scaling for XOR emulation is added by this change. Code modified for macOS is moved from quartz/salgidcommon.cxx to osx/salmacos.cxx while original code is copied to ios/salios.cxx to prevent modifications for iOS. Change-Id: Ia8c52f9045379cc37d5aff1279650db0dddee8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115816 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/ios/salios.cxx b/vcl/ios/salios.cxx index ac11faff3072..335c14264c64 100644 --- a/vcl/ios/salios.cxx +++ b/vcl/ios/salios.cxx @@ -325,6 +325,153 @@ void AquaSalGraphics::SetVirDevGraphics(CGLayerHolder const & rLayer, CGContextR maShared.setState(); } +void XorEmulation::SetTarget( int nWidth, int nHeight, int nTargetDepth, + CGContextRef xTargetContext, CGLayerRef xTargetLayer ) +{ +SAL_INFO( "vcl.quartz", "XorEmulation::SetTarget() this=" << this << + " (" << nWidth << "x" << nHeight << ") depth=" << nTargetDepth << + " context=" << xTargetContext << " layer=" << xTargetLayer ); + +// prepare to replace old mask+temp context +if( m_xMaskContext ) +{ +// cleanup the mask context +CGContextRelease( m_xMaskContext ); +delete[] m_pMaskBuffer; +m_xMaskContext = nullptr; +m_pMaskBuffer = nullptr; + +// cleanup the temp context if needed +if( m_xTempContext ) +{ +CGContextRelease( m_xTempContext ); +delete[] m_pTempBuffer; +m_xTempContext = nullptr; +m_pTempBuffer = nullptr; +} +} + +// return early if there is nothing more to do +if( !xTargetContext ) +{ +return; +} +// retarget drawing operations to the XOR mask +m_xTargetLayer = xTargetLayer; +m_xTargetContext = xTargetContext; + +// prepare creation of matching CGBitmaps +CGColorSpaceRef aCGColorSpace = GetSalData()->mxRGBSpace; +CGBitmapInfo aCGBmpInfo = kCGImageAlphaNoneSkipFirst; +int nBitDepth = nTargetDepth; +if( !nBitDepth ) +{ +nBitDepth = 32; +} +int nBytesPerRow = 4; +const size_t nBitsPerComponent = (nBitDepth == 16) ? 5 : 8; +if( nBitDepth <= 8 ) +{ +aCGColorSpace = GetSalData()->mxGraySpace; +aCGBmpInfo = kCGImageAlphaNone; +nBytesPerRow = 1; +} +nBytesPerRow *= nWidth; +m_nBufferLongs = (nHeight * nBytesPerRow + sizeof(sal_uLong)-1) / sizeof(sal_uLong); + +// create a XorMask context +m_pMaskBuffer = new sal_uLong[ m_nBufferLongs ]; +m_xMaskContext = CGBitmapContextCreate( m_pMaskBuffer, +nWidth, nHeight, +nBitsPerComponent, nBytesPerRow, +aCGColorSpace, aCGBmpInfo ); +SAL_WARN_IF( !m_xMaskContext, "vcl.quartz", "mask context creation failed" ); + +// reset the XOR mask to black +memset( m_pMaskBuffer, 0, m_nBufferLongs * sizeof(sal_uLong) ); + +// a bitmap context will be needed for manual XORing +// create one unless the target context is a bitmap context +if( nTargetDepth ) +{ +m_pTempBuffer = static_cast(CGBitmapContextGetData( m_xTargetContext )); +} +if( !m_pTempBuffer ) +{ +// create a bitmap context matching to the target context +m_pTempBuffer = new sal_uLong[ m_nBufferLongs ]; +m_xTempContext = CGBitmapContextCreate( m_pTempBuffer, +nWidth, nHeight, +nBitsPerComponent, nBytesPerRow, +aCGColorSpace, aCGBmpInfo ); +SAL_WARN_IF( !m_xTempContext, "vcl.quartz", "temp context creation failed" ); +} + +// initialize XOR mask context for drawing +CGContextSetFillColorSpace( m_xMaskContext, aCGColorSpace ); +CGContextSetStrokeColorSpace( m_xMaskContext, aCGColorSpace ); +CGContextSetShouldAntialias( m_xMaskContext, false ); + +// improve the XorMask's XOR emulation a little +// NOTE: currently only enabled for monochrome contexts +if( aCGColorSpace ==
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/DataFlavorMapping.cxx | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) New commits: commit 41041d83de337e2ad6ebcb3a6c91b70b350c8b29 Author: Tor Lillqvist AuthorDate: Wed Mar 24 16:09:05 2021 +0200 Commit: Tor Lillqvist CommitDate: Thu Mar 25 09:04:32 2021 +0100 tdf#141217: Improve plain text pasting on iOS Handle public.utf8-plain-text. That is the actual concrete UTI for UTF-8 text. For instance if you copy text from the Safari address bar, public.utf8-plain-text is the only type put on the pasteboard. Previously we were not able to paste than into the iOS app at all. Change-Id: Idbdd3870431f3b9a312cc9b672ffe1f16d13edbd Signed-off-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113045 diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index e64b6b867fe9..6a3815cf7eb3 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -74,9 +74,7 @@ NSString* OUStringToNSString(const OUString& ustring) return [NSString stringWithCString:utf8Str.getStr() encoding:NSUTF8StringEncoding]; } -NSString* PBTYPE_PLAINTEXT = (__bridge NSString*)kUTTypePlainText; -// Nope. See commented-out use below. -// NSString* PBTYPE_UTF8PLAINTEXT = (__bridge NSString*)kUTTypeUTF8PlainText; +NSString* PBTYPE_UTF8PLAINTEXT = (__bridge NSString*)kUTTypeUTF8PlainText; NSString* PBTYPE_RTF = (__bridge NSString*)kUTTypeRTF; NSString* PBTYPE_PNG = (__bridge NSString*)kUTTypePNG; NSString* PBTYPE_JPEG = (__bridge NSString*)kUTTypeJPEG; @@ -118,9 +116,7 @@ struct FlavorMap // lcl_TestFormat() in sc/source/ui/view/cellsh.cxx. static const FlavorMap flavorMap[] -= { { PBTYPE_PLAINTEXT, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", true }, -// Nope. The LO code does not understand text/plain in UTF-8. Which is a shame. -// PBTYPE_UTF8PLAINTEXT, "text/plain;charset=utf-8", "Unicode Text (UTF-8)", false }, += { { PBTYPE_UTF8PLAINTEXT, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", true }, { PBTYPE_RTF, "text/rtf", "Rich Text Format", false }, { PBTYPE_PNG, "image/png", "Portable Network Graphics", false }, { PBTYPE_JPEG, "image/jpeg", "JPEG", false }, @@ -183,27 +179,27 @@ DataProviderBaseImpl::~DataProviderBaseImpl() } } -class UniDataProvider : public DataProviderBaseImpl +class Utf8DataProvider : public DataProviderBaseImpl { public: -UniDataProvider(const Any& data); -UniDataProvider(NSData* data); +Utf8DataProvider(const Any& data); +Utf8DataProvider(NSData* data); NSData* getSystemData() override; Any getOOoData() override; }; -UniDataProvider::UniDataProvider(const Any& data) +Utf8DataProvider::Utf8DataProvider(const Any& data) : DataProviderBaseImpl(data) { } -UniDataProvider::UniDataProvider(NSData* data) +Utf8DataProvider::Utf8DataProvider(NSData* data) : DataProviderBaseImpl(data) { } -NSData* UniDataProvider::getSystemData() +NSData* Utf8DataProvider::getSystemData() { OUString ustr; mData >>= ustr; @@ -214,7 +210,7 @@ NSData* UniDataProvider::getSystemData() return [NSData dataWithBytes:strUtf8.getStr() length:strUtf8.getLength()]; } -Any UniDataProvider::getOOoData() +Any Utf8DataProvider::getOOoData() { Any oOOData; @@ -464,7 +460,7 @@ DataFlavorMapper::getDataProvider(const NSString* systemFlavor, else // Must be OUString type { SAL_WARN_IF(!isOUStringType(data.getValueType()), "vcl", "must be OUString type"); -dp = DataProviderPtr_t(new UniDataProvider(data)); +dp = DataProviderPtr_t(new Utf8DataProvider(data)); } } catch (const UnsupportedFlavorException& e) @@ -483,9 +479,12 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* systemFlavor { DataProviderPtr_t dp; -if ([systemFlavor caseInsensitiveCompare:PBTYPE_PLAINTEXT] == NSOrderedSame) +if (systemData == nil) +return dp; + +if ([systemFlavor caseInsensitiveCompare:PBTYPE_UTF8PLAINTEXT] == NSOrderedSame) { -dp = DataProviderPtr_t(new UniDataProvider(systemData)); +dp = DataProviderPtr_t(new Utf8DataProvider(systemData)); } else if ([systemFlavor caseInsensitiveCompare:PBTYPE_HTML] == NSOrderedSame) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/DataFlavorMapping.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit ae2299301c3a5797b1a99d69156f367cabc614b0 Author: Tor Lillqvist AuthorDate: Tue Jan 12 22:48:34 2021 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 23 10:41:25 2021 +0100 Log successful mapping from system pasteboard format to internal MIME type Change-Id: I98bedc8fc07a56fbbf3e175277cc9846da46a8c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109201 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112949 Tested-by: Tor Lillqvist diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 4ccbe374de87..e64b6b867fe9 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -561,6 +561,8 @@ DataFlavorMapper::typesArrayToFlavorSequence(NSArray* types) const { flavors.realloc(flavors.getLength() + 1); flavors[flavors.getLength() - 1] = oOOFlavor; +SAL_INFO("vcl.ios.clipboard", + "Mapped " << [sysFormat UTF8String] << " to " << oOOFlavor.MimeType); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios vcl/osx vcl/quartz
vcl/ios/salios.cxx| 18 -- vcl/osx/salmacos.cxx | 16 vcl/quartz/salbmp.cxx |1 - 3 files changed, 35 deletions(-) New commits: commit fdcf4418e9acfe4e95000b9d12a182d6702d42b6 Author: Tor Lillqvist AuthorDate: Sun Jan 17 22:13:39 2021 +0200 Commit: Tor Lillqvist CommitDate: Mon Jan 18 00:35:42 2021 +0100 Clean up includes a bit for iOS and macOS Change-Id: I1dc6256968503ee3865f90e3693acce911a1d65c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109485 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/vcl/ios/salios.cxx b/vcl/ios/salios.cxx index 625fcb049a09..59474c7443eb 100644 --- a/vcl/ios/salios.cxx +++ b/vcl/ios/salios.cxx @@ -25,25 +25,7 @@ #include #include -#include -#include - -#include -#include -#include #include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include #include #include diff --git a/vcl/osx/salmacos.cxx b/vcl/osx/salmacos.cxx index 7d4569d65bca..9efe4dcb8003 100644 --- a/vcl/osx/salmacos.cxx +++ b/vcl/osx/salmacos.cxx @@ -25,21 +25,7 @@ #include #include -#include -#include - -#include -#include -#include #include -#include -#include -#include -#include -#include -#include - -#include #include #include @@ -47,8 +33,6 @@ #include #include -#include -#include // From salbmp.cxx diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index a1570dd04ffb..f50c81c3b637 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -25,7 +25,6 @@ #include #include -#include #include #include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/DataFlavorMapping.cxx | 81 +- 1 file changed, 41 insertions(+), 40 deletions(-) New commits: commit b4f6a6c143567187c6d0f374b2b9f853ecc63af0 Author: Tor Lillqvist AuthorDate: Fri Jan 15 15:32:58 2021 +0200 Commit: Tor Lillqvist CommitDate: Fri Jan 15 15:07:29 2021 +0100 Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on iOS This should fix https://github.com/CollaboraOnline/online/issues/849 This is based on the corresponding fix for macOS. Much of our clipboard code for iOS is based on that for macOS. We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME type that includes the typename attribute, because the code in sc checks for that when it decides whether it is a proper OBJECTDESCRIPTOR. Simplify the data in the flavorMap array. No need to duplicate the same MIME type string as both the pasteboard type and MIME type, for those cases where the MIME type is used diretly as pasteboard type. We also know that for those types, the MIME type might have additional parameters, so be more lenient in checking. With this change, and my recent change to sot, this now works: Start the Collabora Office app. Open a spreadsheet. Select a cell range. (It can include formulas.) Copy. Close the spreadsheet document. (Killing the app process is not necessary, as no in-process clipboard is kept on iOS, but to make sure you are really accessing the system pasteboard and not some in-process cache, feel free to kill the process. After that, start Collabora Office again.) Open a spreadsheet. Paste. You get the very same cells that you pasted as such (with relative cell addresses in formulas properly adjusted, as expected). Previously, it would paste an image of the copied cell range, which is fairly pointless. There is still lots of opportunity for cleanup in the clipboard code for macOS and iOS. Change-Id: I4a385d52bbaafcd2ab8cb18e8f613c5efa592d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109368 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 037939b2c57c..9d2ade8b513e 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -82,21 +82,6 @@ NSString* PBTYPE_PNG = (__bridge NSString*)kUTTypePNG; NSString* PBTYPE_JPEG = (__bridge NSString*)kUTTypeJPEG; NSString* PBTYPE_HTML = (__bridge NSString*)kUTTypeHTML; NSString* PBTYPE_PDF = (__bridge NSString*)kUTTypePDF; -NSString* PBTYPE_SESX -= @"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\""; -NSString* PBTYPE_SLSDX = @"application/" - @"x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link " - @"Source Descriptor (XML)\""; -NSString* PBTYPE_LSX -= @"application/x-openoffice-link-source-xml;windows_formatname=\"Star Link Source (XML)\""; -NSString* PBTYPE_EOX = @"application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star " - @"Embedded Object (XML)\""; -NSString* PBTYPE_SVXB -= @"application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView Bitmap/Animation)\""; -NSString* PBTYPE_GDIMF = @"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""; -NSString* PBTYPE_SODX = @"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star " -@"Object Descriptor (XML)\""; -NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-internal"; const char* FLAVOR_SESX = "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\""; @@ -113,8 +98,6 @@ const char* FLAVOR_GDIMF = "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""; const char* FLAVOR_SODX = "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star " "Object Descriptor (XML)\""; -const char* FLAVOR_DUMMY_INTERNAL = "application/x-openoffice-internal"; - struct FlavorMap { NSString* SystemFlavor; @@ -123,6 +106,17 @@ struct FlavorMap bool DataTypeOUString; // sequence otherwise }; +// The SystemFlavor member is nil for the cases where there is no predefined pasteboard type UTI and +// we use the internal MIME type (media type) also on the pasteboard. That is OK, there dos not seem +// to be a requirement that the types are well-formed UTIs even on iOS. For an introduction to UTIs, +// see for instance +// https://alastairs-place.net/blog/2012/06/06/utis-are-better-than-you-think-and-heres-why/ +// +// In those cases the MIME type might actually have parameters appended, separated by semicolons. +// At least the FLAVOR_SODX one must have at least a typename="%PRODUCTNAME %PRODUCTVERSION +//
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/DataFlavorMapping.cxx |5 - vcl/ios/clipboard.cxx |1 + vcl/ios/iOSTransferable.cxx | 13 +++-- 3 files changed, 8 insertions(+), 11 deletions(-) New commits: commit 21e96548719b77310da5e2bae91de52cc468960b Author: Tor Lillqvist AuthorDate: Mon Dec 21 15:18:21 2020 +0200 Commit: Tor Lillqvist CommitDate: Mon Dec 21 23:47:53 2020 +0100 Improve SAL_INFO output for clipboard operations on iOS Change-Id: Id9ed115067655c62346f765ddc3ed9bdce05ab9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108101 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108103 Tested-by: Tor Lillqvist diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 88b0e6199818..037939b2c57c 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -560,8 +560,11 @@ DataFlavorMapper::typesArrayToFlavorSequence(NSArray* types) const { flavors.realloc(flavors.getLength() + 1); flavors[flavors.getLength() - 1] = oOOFlavor; +} +else +{ SAL_INFO("vcl.ios.clipboard", - "Mapped " << [sysFormat UTF8String] << " to " << oOOFlavor.MimeType); + "Was not able to map " << [sysFormat UTF8String] << " to an internal flavour"); } } diff --git a/vcl/ios/clipboard.cxx b/vcl/ios/clipboard.cxx index b60cda1bef4d..ad0af57e3995 100644 --- a/vcl/ios/clipboard.cxx +++ b/vcl/ios/clipboard.cxx @@ -74,6 +74,7 @@ void SAL_CALL iOSClipboard::setContents( dict[types[i]] = pBoardData; } } +SAL_INFO("vcl.ios.clipboard", "Setting pasteboard items: " << NSDictionaryKeysToOUString(dict)); [mPasteboard setItems:array options:@{}]; // We don't keep a copy of the clipboard contents around in-process, so fire the lost clipboard diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx index 9ec27867fb0b..1ae2277014b6 100644 --- a/vcl/ios/iOSTransferable.cxx +++ b/vcl/ios/iOSTransferable.cxx @@ -25,6 +25,8 @@ #include #include +#include + #include "iOSTransferable.hxx" #include "DataFlavorMapping.hxx" @@ -143,16 +145,7 @@ void iOSTransferable::initClipboardItemList() throw RuntimeException("Cannot get clipboard data", static_cast(this)); } -#ifdef SAL_LOG_INFO -NSString* types = @""; -for (unsigned i = 0; i < [pboardFormats count]; i++) -{ -if ([types length] > 0) -types = [types stringByAppendingString:@", "]; -types = [types stringByAppendingString:[pboardFormats objectAtIndex:i]]; -} -SAL_INFO("vcl.ios.clipboard", "Types on clipboard: " << [types UTF8String]); -#endif +SAL_INFO("vcl.ios.clipboard", "Types on clipboard: " << NSStringArrayToOUString(pboardFormats)); mFlavorList = mDataFlavorMapper->typesArrayToFlavorSequence(pboardFormats); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/DataFlavorMapping.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6df7989dacd75e8750ddc1b53049d79311feb0d8 Author: Tor Lillqvist AuthorDate: Mon Nov 11 11:24:37 2019 +0200 Commit: Tor Lillqvist CommitDate: Mon Nov 11 23:32:33 2019 +0200 Fix copy/paste error that probably has had no ill effect Change-Id: I062fef5f2316a3aa7560ecb42799496cd38362e9 diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index fab611349c8a..2978e64afa4e 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -129,7 +129,7 @@ static const FlavorMap flavorMap[] // PBTYPE_UTF8PLAINTEXT, "text/plain;charset=utf-8", "Unicode Text (UTF-8)", false }, { PBTYPE_RTF, "text/rtf", "Rich Text Format", false }, { PBTYPE_PNG, "image/png", "Portable Network Graphics", false }, -{ PBTYPE_JPEG, "image/jpeg", "Portable Network Graphics", false }, +{ PBTYPE_JPEG, "image/jpeg", "JPEG", false }, { PBTYPE_HTML, "text/html", "Plain HTML", false }, { PBTYPE_PDF, "application/pdf", "PDF File", false }, { PBTYPE_SESX, FLAVOR_SESX, "Star Embed Source (XML)", false }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e3444ff546cf1e7f41b3d8ed29a0b1b42399cf57 Author: Tor Lillqvist AuthorDate: Fri Mar 29 18:08:30 2019 +0200 Commit: Tor Lillqvist CommitDate: Mon Oct 7 15:28:48 2019 +0300 Avoid dialog headings showing up as some serif font in the iOS app Apparently the use of [UIFont systemFontOfSize:10] familyName] to get a default font family name is a bad idea. Presumably the return value from this, ".SF UI Text", is matched against the list of font family names enumerated from the system. (The "SF" apparently stands for "San Francisco".) That ".SF UI Text" is not among them, so maybe vcl chooses some arbitrary other font instead that happens to be a serif one? If we instead use "Helvetica", at least we get a sans-serif font, even if it doesn't match the system UI font exactly. Change-Id: I7ff39d8e7893ce3c27f3f12d227f87209bbc7952 (cherry picked from commit 685e91a7aee4a4acc60e33bf1313a394fd15b1ff) Reviewed-on: https://gerrit.libreoffice.org/79196 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit ba9f91a909cb52194178ac2ed78dc62bd61c1be3) diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index dede35d52b89..65963ef9c099 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -107,7 +107,7 @@ public: virtual void UpdateSettings( AllSettings ) override { // Clobber the UI fonts -vcl::Font aFont( OUString::fromUtf8( [[[UIFont systemFontOfSize:10] familyName] UTF8String] ), Size( 0, 10 ) ); +vcl::Font aFont( "Helvetica", Size( 0, 10 ) ); StyleSettings aStyleSet = rSettings.GetStyleSettings(); aStyleSet.SetAppFont( aFont ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit c6a822790d93f5fdbdf57ad6857c1663504bf37a Author: Tor Lillqvist AuthorDate: Tue Aug 20 16:10:51 2019 +0300 Commit: Tor Lillqvist CommitDate: Mon Oct 7 14:55:56 2019 +0300 tdf#126964: Set background colours to white in IosSalFrame::UpdateSettings() Change-Id: I92110a7a501571d7fd707dc33502ff553f02ae5e Reviewed-on: https://gerrit.libreoffice.org/77823 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit e84c42ee32d1a23729c65b534c4418e2043f706d) Reviewed-on: https://gerrit.libreoffice.org/78994 (cherry picked from commit 1e7a3f82324c3b855c2b3c1f8d4dec73c5162806) diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 19cc75e5057b..dede35d52b89 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -122,6 +122,12 @@ public: aStyleSet.SetTabFont( aFont ); aStyleSet.SetGroupFont( aFont ); +Color aBackgroundColor( 0xff, 0xff, 0xff ); +aStyleSet.BatchSetBackgrounds( aBackgroundColor, false ); +aStyleSet.SetMenuColor( aBackgroundColor ); +aStyleSet.SetMenuBarColor( aBackgroundColor ); +aStyleSet.SetDialogColor( aBackgroundColor ); + rSettings.SetStyleSettings( aStyleSet ); } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/dummies.cxx | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit 80258f93448d278a50cd4aaf130d821a01361a34 Author: Tor Lillqvist AuthorDate: Mon Oct 8 11:36:34 2018 +0300 Commit: Tor Lillqvist CommitDate: Mon Oct 8 12:42:22 2018 +0300 Define a dummy GlyphCache class here for now Change-Id: Ib26ed91ca90cc2f38e21cce54c093795b1059877 diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx index 641b0db2d6bf..94e2a86204ee 100644 --- a/vcl/ios/dummies.cxx +++ b/vcl/ios/dummies.cxx @@ -23,6 +23,9 @@ #include "unx/fontmanager.hxx" #include "unx/gendata.hxx" +class GlyphCache +{ +}; std::unique_ptr SvpSalInstance::CreatePrinter( SalInfoPrinter* /* pInfoPrinter */ ) { @@ -125,16 +128,19 @@ bool AquaSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong ) using namespace psp; GenericUnixSalData::GenericUnixSalData(GenericUnixSalDataType const t, SalInstance *const pInstance) -: m_eType(t), m_pDisplay(nullptr), m_pPrintFontManager(nullptr) +: m_eType(t) +, m_pDisplay(nullptr) +, m_pGlyphCache(new GlyphCache) +, m_pPrintFontManager(nullptr) { -m_pInstance = pInstance; SetSalData(this); +m_pInstance = pInstance; +SetSalData(this); } GenericUnixSalData::~GenericUnixSalData() { } - PrintFontManager::~PrintFontManager() { } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/dummies.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit f5c00cd780dab434c96bd2760821e1565475fc0f Author: jan IversenDate: Mon Mar 5 09:32:35 2018 +0100 vcl, make ios/dummies compile Point were not defined Change-Id: I725b3058d44d527ca2d3201060e4f467fd69c78d diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx index 56fd92a93f3a..ff8991dfacfa 100644 --- a/vcl/ios/dummies.cxx +++ b/vcl/ios/dummies.cxx @@ -16,13 +16,14 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include #include "salprn.hxx" #include "headless/svpgdi.hxx" #include "headless/svpinst.hxx" #include "unx/fontmanager.hxx" #include "unx/gendata.hxx" + SalPrinter* SvpSalInstance::CreatePrinter( SalInfoPrinter* /* pInfoPrinter */ ) { return NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 99f23a451050eb24938a5ff5a21b50a3f9a3340a Author: jan IversenDate: Wed May 3 14:59:30 2017 +0200 iOS remove unused parameter Removed pSys parameter from IosSalFrame Change-Id: Ib61f09448ef0c6751d4261b11d6a7b9dc45e786b diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 92cd91ada51b..b2b090834d87 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -87,11 +87,9 @@ class IosSalFrame : public SvpSalFrame public: IosSalFrame( IosSalInstance *pInstance, SalFrame *pParent, - SalFrameStyleFlags nSalFrameStyle, - SystemParentData *pSysParent ) + SalFrameStyleFlags nSalFrameStyle) : SvpSalFrame( pInstance, pParent, nSalFrameStyle ) { -pSysParent = NULL; if (pParent == NULL && viewWidth > 1 && viewHeight > 1) SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT); } @@ -131,12 +129,13 @@ public: SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) { -return new IosSalFrame( this, NULL, nStyle, pParent ); +pParent = NULL; +return new IosSalFrame( this, NULL, nStyle ); } SalFrame *IosSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) { -return new IosSalFrame( this, pParent, nStyle, NULL ); +return new IosSalFrame( this, pParent, nStyle ); } // All the interesting stuff is slaved from the IosSalInstance ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 5a394be952c0795cd12ed0eea8f5186e44814225 Author: jan IversenDate: Fri Apr 28 12:13:06 2017 +0200 iOS, fixed build breaker. Fast fix to build breaker from commit 3a36cf434fb4a967c9ea767cb7ac5f4da0502a0d Removing the parameter from the constructor gave ripple effects to move/copy constructors, so not done for now. Change-Id: I98e060e80946dbfe6586744e4f362ccb358a210d diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index e71b71156035..92cd91ada51b 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -89,9 +89,9 @@ public: SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle, SystemParentData *pSysParent ) -: SvpSalFrame( pInstance, pParent, nSalFrameStyle, - pSysParent ) +: SvpSalFrame( pInstance, pParent, nSalFrameStyle ) { +pSysParent = NULL; if (pParent == NULL && viewWidth > 1 && viewHeight > 1) SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit c989f5e0e11e295b11ffc921b0d105869e037e47 Author: Tor Lillqvist t...@collabora.com Date: Sat Nov 8 00:51:21 2014 +0200 These constants are now in the scoped enum MouseEventModifiers Change-Id: I73e1498198cbb55ccd969713a38b6cd678c94643 diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 73092e6..f3fe0b3 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -321,15 +321,15 @@ void touch_lo_mouse(int x, int y, MLOMouseButtonState state, MLOModifierMask mod switch (state) { case DOWN: -aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, nModifiers); +aEvent = MouseEvent(Point(x, y), 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT, nModifiers); nEvent = VCLEVENT_WINDOW_MOUSEBUTTONDOWN; break; case MOVE: -aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLEMOVE, MOUSE_LEFT, nModifiers); +aEvent = MouseEvent(Point(x, y), 1, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT, nModifiers); nEvent = VCLEVENT_WINDOW_MOUSEMOVE; break; case UP: -aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, nModifiers); +aEvent = MouseEvent(Point(x, y), 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT, nModifiers); nEvent = VCLEVENT_WINDOW_MOUSEBUTTONUP; break; default: @@ -388,7 +388,7 @@ void touch_lo_keyboard_did_hide() if (pFocus) { MouseEvent aEvent; -aEvent = MouseEvent(Point(0, 0), 0, MOUSE_LEAVEWINDOW, MOUSE_LEFT); +aEvent = MouseEvent(Point(0, 0), 0, MouseEventModifiers::LEAVEWINDOW, MOUSE_LEFT); Application::PostMouseEvent(VCLEVENT_WINDOW_MOUSEMOVE, pFocus-GetWindow(), aEvent); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a1740a682a6c46c57dc6a356299f6c9a92eb4af6 Author: Noel Grandin n...@peralex.com Date: Thu Sep 18 14:44:39 2014 +0200 use vcl::Font Change-Id: I22fd5c1340ca0c646725d9fce77304c10d9eb5d5 diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index f2df460..f1d87b8 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -149,7 +149,7 @@ public: virtual void UpdateSettings( AllSettings rSettings ) SAL_OVERRIDE { // Clobber the UI fonts -Font aFont( OUString( Helvetica ), Size( 0, 14 ) ); +vcl::Font aFont( OUString( Helvetica ), Size( 0, 14 ) ); StyleSettings aStyleSet = rSettings.GetStyleSettings(); aStyleSet.SetAppFont( aFont ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |8 1 file changed, 8 deletions(-) New commits: commit d08a81d67826d780b626a5a6faad3de7179576bc Author: Tor Lillqvist t...@collabora.com Date: Mon Aug 18 22:28:44 2014 +0300 Bin temporary code that doesn't compile any longer Change-Id: I7550a40bab4ffd1b585ad37dceb59c38cf1e4ca3 diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 61cc1b1..f2df460 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -234,14 +234,6 @@ int IosSalSystem::ShowNativeDialog( const OUString rTitle, NSLog(@%@: %@, CreateNSString(rTitle), CreateNSString(rMessage)); -if (IosSalInstance::getInstance() != NULL) -{ -// Temporary... -MessageDialog aVclErrBox(NULL, rMessage); -aVclErrBox.SetTitle(rTitle); -aVclErrBox.Execute(); -} - return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5a79f2dcbb7fff9bdc2895b0ac78e2a8ecf511e9 Author: Tor Lillqvist t...@collabora.com Date: Mon Apr 7 12:38:27 2014 +0300 For consistency, set the same GDI and Win flags for iOS as for OS X No visible effect, though. Which is both good and bad: Good because it means that without ill effects a larger degree of idenical code paths can be used for both iOS and OS X. Bad because this change didn't help in getting rid of the annoying misrenderings on iOS of some Smart Art objects. Change-Id: I9da0f98ca90554dbac963688705b3c7955021741 diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 857e076..fca7062 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -265,6 +265,8 @@ SalInstance *CreateSalInstance() IosSalInstance* pInstance = new IosSalInstance( new SalYieldMutex() ); new IosSalData( pInstance ); pInstance-AcquireYieldMutex(1); +ImplGetSVData()-maGDIData.mbNoXORClipping = true; +ImplGetSVData()-maWinData.mbNoSaveBackground = true; return pInstance; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 24dd10c727ab2d7a38368292498520e11d98e3cb Author: tsahi glik tsahi.g...@cloudon.com Date: Thu Feb 20 17:59:14 2014 -0800 fix compilation of ios diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 3d8472a..a8dccdf 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -30,6 +30,7 @@ #include headless/svpdummies.hxx #include generic/gendata.hxx #include quartz/utils.h +#include vcl/settings.hxx // Horrible hack static int viewWidth = 1, viewHeight = 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 512d8f049530b944ee5f693e34db27797dc2756b Author: Tor Lillqvist t...@collabora.com Date: Sun Jan 26 12:03:53 2014 +0200 Make sure ShowNativeDialog() shows something: Use NSLog() Change-Id: I5ca0a471c980aa19d243500e95ee8cf585e1be9e diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index bcef629..3d8472a 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -29,6 +29,7 @@ #include ios/iosinst.hxx #include headless/svpdummies.hxx #include generic/gendata.hxx +#include quartz/utils.h // Horrible hack static int viewWidth = 1, viewHeight = 1; @@ -281,6 +282,8 @@ int IosSalSystem::ShowNativeDialog( const OUString rTitle, (void)rButtons; (void)nDefButton; +NSLog(@%@: %@, CreateNSString(rTitle), CreateNSString(rMessage)); + if (IosSalInstance::getInstance() != NULL) { // Temporary... ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/dummies.cxx | 11 --- 1 file changed, 11 deletions(-) New commits: commit b89121733ad443915fcc4cf895393f485016fedc Author: Tor Lillqvist t...@collabora.com Date: Sun Dec 15 14:02:32 2013 +0200 We already get AquaSalGraphics::CreateFontSubset from salgdicommon.cxx now Change-Id: Ie63ee5ea20a8340cfcbb51323871e5b0318e6cc3 diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx index c9571aa..a98fdbc 100644 --- a/vcl/ios/dummies.cxx +++ b/vcl/ios/dummies.cxx @@ -21,17 +21,6 @@ #include headless/svpgdi.hxx #include headless/svpinst.hxx -sal_Bool SvpSalGraphics::CreateFontSubset( const OUString/* rToFile */, - const PhysicalFontFace* /* pFontData */, - sal_Int32* /* pGlyphIDs */, - sal_uInt8* /* pEncoding */, - sal_Int32* /* pGlyphWidths */, - int /* nGlyphCount */, - FontSubsetInfo /* rInfo */ ) -{ -return sal_False; -} - SalPrinter* SvpSalInstance::CreatePrinter( SalInfoPrinter* /* pInfoPrinter */ ) { return NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios vcl/source
vcl/ios/iosinst.cxx | 19 +-- vcl/source/window/window.cxx |1 + 2 files changed, 18 insertions(+), 2 deletions(-) New commits: commit 16a53253e5991de8d44679157c29d58bb431eb2c Author: tsahi glik tsahi.g...@cloudon.com Date: Fri Aug 30 11:10:40 2013 -0700 Sync IOS screen invalidate to end of paint Change-Id: If179c5280366a377ace710e4acf7df737544b224 Reviewed-on: https://gerrit.libreoffice.org/5706 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index b316d34..8b654a5 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -146,6 +146,9 @@ SalSystem *IosSalInstance::CreateSalSystem() class IosSalFrame : public SvpSalFrame { +private: +basegfx::B2IBox m_DamagedRect; + public: IosSalFrame( IosSalInstance *pInstance, SalFrame *pParent, @@ -176,7 +179,7 @@ public: if (rDamageRect.isEmpty()) return; -IosSalInstance::getInstance()-damaged( this, rDamageRect ); +m_DamagedRect.expand(rDamageRect); } virtual void UpdateSettings( AllSettings rSettings ) @@ -199,6 +202,16 @@ public: rSettings.SetStyleSettings( aStyleSet ); } + +virtual void Flush() +{ +IosSalInstance::getInstance()-damaged( this, m_DamagedRect ); +} + +void resetDamaged() +{ +m_DamagedRect.reset(); +} }; SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) @@ -322,7 +335,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) for( std::list SalFrame* ::const_iterator it = getFrames().begin(); it != getFrames().end(); it++ ) { -SvpSalFrame *pFrame = static_castSvpSalFrame *(*it); +IosSalFrame *pFrame = static_castIosSalFrame *(*it); SalFrameGeometry aGeom = pFrame-GetGeometry(); CGRect bbox = CGRectMake( aGeom.nX, aGeom.nY, aGeom.nWidth, aGeom.nHeight ); if ( pFrame-IsVisible() @@ -344,6 +357,8 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) false, kCGRenderingIntentDefault ); CGContextDrawImage( arg-context, bbox, image ); + +pFrame-resetDamaged(); } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 669e0eb..d027eaa 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -7568,6 +7568,7 @@ void Window::Update() } pUpdateWindow-ImplCallPaint( NULL, pUpdateWindow-mpWindowImpl-mnPaintFlags ); +bFlush = sal_True; } if ( bFlush ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/iosinst.cxx | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) New commits: commit 015a0a652f89c05ccef2b23af3d81604b990ba33 Author: tsahi glik tsahi.g...@cloudon.com Date: Fri Aug 30 13:18:23 2013 -0700 in iOS avoid copying covered windows to screen Change-Id: Iebf53e5c2e3909e068739351ccce497ca91b67a5 Reviewed-on: https://gerrit.libreoffice.org/5710 Reviewed-by: Tor Lillqvist t...@collabora.com Tested-by: Tor Lillqvist t...@collabora.com diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 8b654a5..dd92c6e 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -332,14 +332,16 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) rc = pthread_mutex_lock( m_aRenderMutex ); SAL_WARN_IF( rc != 0, vcl.ios, pthread_mutex_lock failed: strerror( rc ) ); -for( std::list SalFrame* ::const_iterator it = getFrames().begin(); - it != getFrames().end(); +CGRect invalidRect = arg-rect; + +for( std::list SalFrame* ::const_reverse_iterator it = getFrames().rbegin(); + it != getFrames().rend(); it++ ) { IosSalFrame *pFrame = static_castIosSalFrame *(*it); SalFrameGeometry aGeom = pFrame-GetGeometry(); CGRect bbox = CGRectMake( aGeom.nX, aGeom.nY, aGeom.nWidth, aGeom.nHeight ); if ( pFrame-IsVisible() - CGRectIntersectsRect( arg-rect, bbox ) ) { + CGRectIntersectsRect( invalidRect, bbox ) ) { const basebmp::BitmapDeviceSharedPtr aDevice = pFrame-getDevice(); CGDataProviderRef provider = @@ -358,6 +360,12 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg ) kCGRenderingIntentDefault ); CGContextDrawImage( arg-context, bbox, image ); +// if current frame covers the whole invalidRect then break +if (CGRectEqualToRect(CGRectIntersection(invalidRect, bbox), invalidRect)) +{ +break; +} + pFrame-resetDamaged(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/dummies.cxx |7 --- 1 file changed, 7 deletions(-) New commits: commit 96329b45a8b19beb84a67c13c8fbc0f96ac72d68 Author: Tor Lillqvist t...@iki.fi Date: Tue Jun 25 20:25:41 2013 +0300 There is already the AddTempDevFont() in coretext Change-Id: I384e9d499eedbe87030417952bf057b16cf549d2 diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx index 7cf84b5..c9571aa 100644 --- a/vcl/ios/dummies.cxx +++ b/vcl/ios/dummies.cxx @@ -32,13 +32,6 @@ sal_Bool SvpSalGraphics::CreateFontSubset( const OUString /* rToFile */, return sal_False; } -bool SvpSalGraphics::AddTempDevFont( ImplDevFontList* /* pFontList */, - const OUString /* rFileURL */, - const OUString /* rFontName */ ) -{ -return false; -} - SalPrinter* SvpSalInstance::CreatePrinter( SalInfoPrinter* /* pInfoPrinter */ ) { return NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/ios
vcl/ios/source/gdi/salgdicommon.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1c3c38122a020a998a92dd15a0870c576a66a8aa Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Mar 21 12:17:00 2013 +0100 avoid Wundef / fix endian detection diff --git a/vcl/ios/source/gdi/salgdicommon.cxx b/vcl/ios/source/gdi/salgdicommon.cxx index c15346a..947c719 100644 --- a/vcl/ios/source/gdi/salgdicommon.cxx +++ b/vcl/ios/source/gdi/salgdicommon.cxx @@ -19,6 +19,7 @@ #include sal/types.h #include osl/file.hxx +#include osl/endian.h #include basegfx/polygon/b2dpolygon.hxx @@ -1083,7 +1084,7 @@ SalColor QuartzSalGraphics::getPixel( long nX, long nY ) // prepare creation of matching a CGBitmapContext CGColorSpaceRef aCGColorSpace = GetSalData()-mxRGBSpace; CGBitmapInfo aCGBmpInfo = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Big; -#if __BIG_ENDIAN__ +#if defined OSL_BIGENDIAN struct{ unsigned char b, g, r, a; } aPixel; #else struct{ unsigned char a, r, g, b; } aPixel; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits