[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/res/cursors/vtext.png |binary 1 file changed New commits: commit 85e843067bb07211eba8fb6abcb9224b340bcc65 Author: Matthias Seidel AuthorDate: Wed Feb 6 19:46:02 2019 + Commit: Matthias Seidel CommitDate: Wed Feb 6 19:46:02 2019 + Converted mouse pointer from indexed color to RGB diff --git a/vcl/aqua/source/res/cursors/vtext.png b/vcl/aqua/source/res/cursors/vtext.png index 2d6c847c9fc7..dcc1080e5fcf 100644 Binary files a/vcl/aqua/source/res/cursors/vtext.png and b/vcl/aqua/source/res/cursors/vtext.png differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/res/cursors/hourglass.png |binary 1 file changed New commits: commit e98508d60780866d836d19d41ae6a0ed67414767 Author: Matthias Seidel AuthorDate: Tue Feb 5 15:36:10 2019 + Commit: Matthias Seidel CommitDate: Tue Feb 5 15:36:10 2019 + Converted mouse pointer from grayscale to RGB diff --git a/vcl/aqua/source/res/cursors/hourglass.png b/vcl/aqua/source/res/cursors/hourglass.png index 07bb5af73e6e..822368d7c950 100644 Binary files a/vcl/aqua/source/res/cursors/hourglass.png and b/vcl/aqua/source/res/cursors/hourglass.png differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/OSXTransferable.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 22a134b62d46843db387c786fbdd46093eec9d30 Author: Jim Jagielski AuthorDate: Fri Jan 25 15:10:14 2019 + Commit: Jim Jagielski CommitDate: Fri Jan 25 15:10:14 2019 + macOS requires SDK 10.11 and ensure correct casting diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx index 9a126895331e..7818c31af253 100644 --- a/vcl/aqua/source/dtrans/OSXTransferable.cxx +++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx @@ -85,7 +85,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) } bool bInternal(false); - NSString* sysFormat = + const NSString* sysFormat = (aFlavor.MimeType.compareToAscii( "image/png", 9 ) == 0) ? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard ) : mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor, bInternal); @@ -93,12 +93,12 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) if ([sysFormat caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame) { - NSArray* sysData = [mPasteboard propertyListForType: sysFormat]; + NSArray* sysData = [mPasteboard propertyListForType: (NSString*)sysFormat]; dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); } else { - NSData* sysData = [mPasteboard dataForType: sysFormat]; + NSData* sysData = [mPasteboard dataForType: (NSString*)sysFormat]; dp = mDataFlavorMapper->getDataProvider(sysFormat, sysData); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua vcl/Library_vcl.mk
vcl/Library_vcl.mk |7 +-- vcl/aqua/source/dtrans/PictToBmpFlt.cxx |2 +- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 3215360f49ce63f773db32d1640de1e23c040b78 Author: Jim JagielskiDate: Thu Oct 12 15:32:34 2017 + macOS compilation fixes, mostly due to 10.7/10.9 SDK differences and items deprecated diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 0f6393ce9ec1..673e0e680ba1 100755 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -106,13 +106,15 @@ $(eval $(call gb_Library_add_libs,vcl,\ endif ifeq ($(OS),MACOSX) -$(eval $(call gb_Library_set_ldflags,vcl,\ +$(eval $(call gb_Library_add_ldflags,vcl,\ $$(LDFLAGS) \ )) endif ifeq ($(GUIBASE),aqua) $(eval $(call gb_Library_add_cxxflags,vcl,\ +$$(CXXFLAGS) \ +$$(OBJCXXFLAGS) \ $(gb_OBJCXXFLAGS) \ )) ifeq ($(ENABLE_CAIRO),TRUE) @@ -503,13 +505,14 @@ $(eval $(call gb_Library_add_linked_libs,vcl,\ AppleRemote \ )) $(eval $(call gb_Library_add_libs,vcl,\ +$$(LDFLAGS) \ -framework Cocoa \ -framework Carbon \ -framework CoreFoundation \ )) # ??? what about this ifneq ($(MACOSX_DEPLOYMENT_TARGET),10.7) -$(eval $(call gb_Library_set_ldflags,vcl, $$(LDFLAGS) -framework QuickTime )) +$(eval $(call gb_Library_add_ldflags,vcl, $$(LDFLAGS) -framework QuickTime )) endif endif diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx index ef103a8a2f80..549edeba3a44 100644 --- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx +++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx @@ -31,7 +31,7 @@ #define DEPRECATED_ATTRIBUTE #include -#include +// #include #include #include "PictToBmpFlt.hxx" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/DropTarget.cxx | 20 +++- vcl/aqua/source/dtrans/DropTarget.hxx |2 +- 2 files changed, 16 insertions(+), 6 deletions(-) New commits: commit 024b54d68cc4bcd0d4a71be7b686cad98238bfc8 Author: Herbert Dürr h...@apache.org Date: Wed Jun 24 07:08:31 2015 + #i105098# fix dragdrop insertion of files/images on Mac Fixed-by: Manik mm...@yahoo.com Reviewed-by: Herbert Duerr h...@apache.org diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 46d6780..c02bfdc 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -133,7 +133,8 @@ namespace /* private */ -(BOOL)performDragOperation:(id NSDraggingInfo)sender { - return mDropTarget-performDragOperation(sender); + (void) sender; + return mDropTarget-performDragOperation(); } @@ -235,7 +236,10 @@ NSDragOperation DropTarget::draggingEntered(id sender) sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -274,7 +278,10 @@ NSDragOperation DropTarget::draggingUpdated(id sender) { sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -326,7 +333,7 @@ BOOL DropTarget::prepareForDragOperation(id /*sender*/) } -BOOL DropTarget::performDragOperation(id sender) +BOOL DropTarget::performDragOperation() { bool bSuccess = false; @@ -340,7 +347,10 @@ BOOL DropTarget::performDragOperation(id sender) } NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx index c8532a8..111867c 100644 --- a/vcl/aqua/source/dtrans/DropTarget.hxx +++ b/vcl/aqua/source/dtrans/DropTarget.hxx @@ -133,7 +133,7 @@ public: virtual NSDragOperation draggingUpdated(id sender); virtual void draggingExited(id sender); virtual BOOL prepareForDragOperation(id sender); - virtual BOOL performDragOperation(id sender); + virtual BOOL performDragOperation(); virtual void concludeDragOperation(id sender); /* If multiple actions are supported by the drag source and ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/a11y/aqua11ywrapper.mm |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ac91424975502e1a67434dcaa649e26a2bcf8be4 Author: Herbert Dürr h...@apache.org Date: Fri Oct 31 16:30:42 2014 + #i125815# fix build breaker with Mac 10.10 SDK diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index a0e7559..c577ad4 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -694,7 +694,7 @@ static BOOL isPopupMenuOpen = NO; -(BOOL)accessibilityIsIgnored { // #i90575# guard NSAccessibility protocol against unwanted access if ( isPopupMenuOpen ) { -return nil; +return FALSE; } BOOL ignored = NO; sal_Int16 nRole = [ self accessibleContext ] - getAccessibleRole(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/salnativewidgets.cxx | 28 1 file changed, 16 insertions(+), 12 deletions(-) New commits: commit cc147840647a02cdca5d59bef373ce4ec73ee969 Author: Herbert Dürr h...@apache.org Date: Mon Jul 14 14:59:11 2014 + #i125234# the scrollbar arrows disappeared in OSX=10.7 so the native-widget assumptions about the scrollbar layout has to be adjusted. diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index 37d23b5..457e3c9 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -131,6 +131,10 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) } } +// the scrollbar arrows disappeared in OSX=10.7 +#define SCROLL_BUTTON_HEIGHT 0 +#define SCROLL_BUTTON_WIDTH 0 + static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart, const Rectangle rControlRect, Rectangle rResultRect ) { @@ -141,38 +145,38 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart, { case PART_BUTTON_UP: if( GetSalData()-mbIsScrollbarDoubleMax ) -rResultRect.Top() = rControlRect.Bottom() - 2*BUTTON_HEIGHT; -rResultRect.Bottom() = rResultRect.Top() + BUTTON_HEIGHT; +rResultRect.Top() = rControlRect.Bottom() - 2*SCROLL_BUTTON_HEIGHT; +rResultRect.Bottom() = rResultRect.Top() + SCROLL_BUTTON_HEIGHT; break; case PART_BUTTON_DOWN: -rResultRect.Top() = rControlRect.Bottom() - BUTTON_HEIGHT; +rResultRect.Top() = rControlRect.Bottom() - SCROLL_BUTTON_HEIGHT; break; case PART_BUTTON_LEFT: if( GetSalData()-mbIsScrollbarDoubleMax ) -rResultRect.Left() = rControlRect.Right() - 2*BUTTON_WIDTH; -rResultRect.Right() = rResultRect.Left() + BUTTON_WIDTH; +rResultRect.Left() = rControlRect.Right() - 2*SCROLL_BUTTON_WIDTH; +rResultRect.Right() = rResultRect.Left() + SCROLL_BUTTON_WIDTH; break; case PART_BUTTON_RIGHT: -rResultRect.Left() = rControlRect.Right() - BUTTON_WIDTH; +rResultRect.Left() = rControlRect.Right() - SCROLL_BUTTON_WIDTH; break; case PART_TRACK_HORZ_AREA: -rResultRect.Right() -= BUTTON_WIDTH + 1; +rResultRect.Right() -= SCROLL_BUTTON_WIDTH + 1; if( GetSalData()-mbIsScrollbarDoubleMax ) -rResultRect.Right() -= BUTTON_WIDTH; +rResultRect.Right() -= SCROLL_BUTTON_WIDTH; else -rResultRect.Left() += BUTTON_WIDTH + 1; +rResultRect.Left() += SCROLL_BUTTON_WIDTH + 1; break; case PART_TRACK_VERT_AREA: -rResultRect.Bottom() -= BUTTON_HEIGHT + 1; +rResultRect.Bottom() -= SCROLL_BUTTON_HEIGHT + 1; if( GetSalData()-mbIsScrollbarDoubleMax ) -rResultRect.Bottom() -= BUTTON_HEIGHT; +rResultRect.Bottom() -= SCROLL_BUTTON_HEIGHT; else -rResultRect.Top() += BUTTON_HEIGHT + 1; +rResultRect.Top() += SCROLL_BUTTON_HEIGHT + 1; break; case PART_THUMB_HORZ: if( GetSalData()-mbIsScrollbarDoubleMax ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |5 +++-- vcl/aqua/source/a11y/aqua11ytextwrapper.mm |6 +- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 0a4564b42de0fc61253ae4e69039860c09e53eba Author: Herbert Dürr h...@apache.org Date: Wed Jun 25 11:40:58 2014 + #i122471# make the Mac lookup feature handle the correct word diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm index 39ec446..5f30b34 100644 --- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm @@ -227,12 +227,13 @@ using namespace ::rtl; [ string beginEditing ]; // add default attributes for whole string Sequence PropertyValue defaultAttributes = [ wrapper accessibleTextAttributes ] - getDefaultAttributes ( emptySequence ); -[ AquaA11yTextAttributesWrapper applyAttributesFrom: defaultAttributes toString: string forRange: [ origRange rangeValue ] storeDefaultsTo: wrapper getDefaultsFrom: nil ]; +NSRange offsetRange = NSMakeRange ( 0, len ); +[ AquaA11yTextAttributesWrapper applyAttributesFrom: defaultAttributes toString: string forRange: offsetRange storeDefaultsTo: wrapper getDefaultsFrom: nil ]; // add attributes for attribute run(s) while ( currentIndex endIndex ) { TextSegment textSegment = [ wrapper accessibleText ] - getTextAtIndex ( currentIndex, AccessibleTextType::ATTRIBUTE_RUN ); int endOfRange = endIndex textSegment.SegmentEnd ? textSegment.SegmentEnd : endIndex; -NSRange rangeForAttributeRun = NSMakeRange ( currentIndex, endOfRange - currentIndex ); +NSRange rangeForAttributeRun = NSMakeRange ( currentIndex-loc, endOfRange - currentIndex ); // add run attributes Sequence PropertyValue attributes = [ wrapper accessibleTextAttributes ] - getRunAttributes ( currentIndex, emptySequence ); [ AquaA11yTextAttributesWrapper applyAttributesFrom: attributes toString: string forRange: rangeForAttributeRun storeDefaultsTo: nil getDefaultsFrom: wrapper ]; diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm index 1320b09..616bf08 100644 --- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm @@ -210,7 +210,11 @@ using namespace ::rtl; +(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point { NSValue * value = nil; -sal_Int32 index = [ wrapper accessibleText ] - getIndexAtPoint ( [ AquaA11yUtil nsPointToVclPoint: point ] ); +Point aPoint( [ AquaA11yUtil nsPointToVclPoint: point ]); +const Point screenPos = [ wrapper accessibleComponent ] - getLocationOnScreen(); +aPoint.X -= screenPos.X; +aPoint.Y -= screenPos.Y; +sal_Int32 index = [ wrapper accessibleText ] - getIndexAtPoint( aPoint ); if ( index -1 ) { value = [ AquaA11yTextWrapper rangeForIndexAttributeForElement: wrapper forParameter: [ NSNumber numberWithLong: index ] ]; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua vcl/unx
vcl/aqua/source/a11y/documentfocuslistener.cxx | 51 - vcl/unx/gtk/a11y/atkutil.cxx | 42 ++-- 2 files changed, 48 insertions(+), 45 deletions(-) New commits: commit 4da0e442f0fd4838e93e7316c24cfeef9289207d Author: Herbert Dürr h...@apache.org Date: Mon Jun 23 07:55:44 2014 + #i124970# fix DocumentFocusListener::notifyEvent's handling of IndexOutOfBoundsException the DocumentFocusListener::notifyEvent() throw list only allows a RuntimeException to propagate. The methods called in notifyEvent() allow IndexOutOfBoundsException though, so it must be handled in all cases to prevent C++ from invoking its unexpected() abort mechanisms. Ceterum censeo, non-empty throw lists should be removed altogether... diff --git a/vcl/aqua/source/a11y/documentfocuslistener.cxx b/vcl/aqua/source/a11y/documentfocuslistener.cxx index 3fbda71..b15d4f8 100644 --- a/vcl/aqua/source/a11y/documentfocuslistener.cxx +++ b/vcl/aqua/source/a11y/documentfocuslistener.cxx @@ -65,10 +65,10 @@ void SAL_CALL DocumentFocusListener::notifyEvent( const AccessibleEventObject aEvent ) throw( RuntimeException ) { -switch( aEvent.EventId ) -{ -case AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = AccessibleStateType::INVALID; aEvent.NewValue = nState; @@ -76,34 +76,35 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject aEvent ) if( AccessibleStateType::FOCUSED == nState ) m_aFocusTracker.setFocusedObject( getAccessible(aEvent) ); } -catch(IndexOutOfBoundsException e) -{ -OSL_TRACE(Focused object has invalid index in parent); -} break; -case AccessibleEventId::CHILD: -{ -Reference XAccessible xChild; -if( (aEvent.OldValue = xChild) xChild.is() ) -detachRecursive(xChild); +case AccessibleEventId::CHILD: +{ +Reference XAccessible xChild; +if( (aEvent.OldValue = xChild) xChild.is() ) +detachRecursive(xChild); -if( (aEvent.NewValue = xChild) xChild.is() ) -attachRecursive(xChild); -} +if( (aEvent.NewValue = xChild) xChild.is() ) +attachRecursive(xChild); +} break; -case AccessibleEventId::INVALIDATE_ALL_CHILDREN: -{ -Reference XAccessible xAccessible( getAccessible(aEvent) ); -detachRecursive(xAccessible); -attachRecursive(xAccessible); -} - +case AccessibleEventId::INVALIDATE_ALL_CHILDREN: +{ +Reference XAccessible xAccessible( getAccessible(aEvent) ); +detachRecursive(xAccessible); +attachRecursive(xAccessible); +} OSL_TRACE( Invalidate all children called\n ); break; -default: -break; + +default: +break; +} +} +catch(IndexOutOfBoundsException e) +{ +OSL_TRACE(Focused object has invalid index in parent); } } diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 8a6d7fa..4fbe84b 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -202,10 +202,10 @@ void DocumentFocusListener::disposing( const lang::EventObject aEvent ) void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject aEvent ) throw( uno::RuntimeException ) { -switch( aEvent.EventId ) -{ -case accessibility::AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case accessibility::AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = accessibility::AccessibleStateType::INVALID; aEvent.NewValue = nState; @@ -213,34 +213,36 @@ void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObj if( accessibility::AccessibleStateType::FOCUSED == nState ) atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) ); } -catch(const lang::IndexOutOfBoundsException e) -{ -g_warning(Focused object has invalid index in parent); -} break; -case accessibility::AccessibleEventId::CHILD: -{ -uno::Reference accessibility::XAccessible xChild; -if( (aEvent.OldValue = xChild) xChild.is() ) -detachRecursive(xChild); +case accessibility::AccessibleEventId::CHILD: +{
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/salnativewidgets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ced067d3d23dcb03f1548707cefe9b0b6498345d Author: Herbert Dürr h...@apache.org Date: Wed May 28 11:43:02 2014 + #i98991# remove Aqua Pinstripe background in dialogs Patch-by: Thorsten Wagner thorsten.wagne...@gmail.com Reviewed-by: Herbert Duerr h...@apache.org diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index f49e56b..37d23b5 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -533,7 +533,7 @@ sal_Bool AquaSalGraphics::drawNativeControl(ControlType nType, HIThemeBackgroundDrawInfo aThemeBackgroundInfo; aThemeBackgroundInfo.version = 0; aThemeBackgroundInfo.state = getState( nState ); -aThemeBackgroundInfo.kind = kThemeBrushDialogBackgroundInactive; +aThemeBackgroundInfo.kind = kThemeBrushDialogBackgroundActive; // FIXME: without this magical offset there is a 2 pixel black border on the right and bottom rc.size.width += 2; rc.size.height += 2; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/ctfonts.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit 0ee124496ac74172f41ed2e116fd554130036824 Author: Herbert Dürr h...@apache.org Date: Tue May 6 09:07:50 2014 + #i124823# fix the calculation of leading metrics for CoreText diff --git a/vcl/aqua/source/gdi/ctfonts.cxx b/vcl/aqua/source/gdi/ctfonts.cxx index d7f3a2d..6d4ae40 100644 --- a/vcl/aqua/source/gdi/ctfonts.cxx +++ b/vcl/aqua/source/gdi/ctfonts.cxx @@ -176,10 +176,13 @@ void CTTextStyle::GetFontMetric( float fDPIY, ImplFontMetricData rMetric ) cons CTFontRef aCTFontRef = (CTFontRef)CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ); const double fPixelSize = (mfFontScale * fDPIY); -rMetric.mnAscent = lrint( CTFontGetAscent( aCTFontRef ) * fPixelSize); +const CGFloat fAscent = CTFontGetAscent( aCTFontRef ); +const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef ); +rMetric.mnAscent = lrint( fAscent * fPixelSize); rMetric.mnDescent = lrint( CTFontGetDescent( aCTFontRef ) * fPixelSize); -rMetric.mnIntLeading = lrint( CTFontGetLeading( aCTFontRef ) * fPixelSize); -rMetric.mnExtLeading = 0; +rMetric.mnExtLeading = lrint( CTFontGetLeading( aCTFontRef ) * fPixelSize); +rMetric.mnIntLeading = lrint( (fAscent - fCapHeight) * fPixelSize); + // since ImplFontMetricData::mnWidth is only used for stretching/squeezing fonts // setting this width to the pixel height of the fontsize is good enough // it also makes the calculation of the stretch factor simple ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/ctlayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8db10217765f523bcc317b76c7f2ded31555bae7 Author: Herbert Dürr h...@apache.org Date: Fri Apr 11 06:44:58 2014 + #i124657# #i124617# restore lost comment markers diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 6005b15..8f57ca1 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -67,7 +67,7 @@ private: float mfFontScale; // TODO: does CoreText have a font size limit? CGFloat mfFontRotation; // text direction angle (in radians) -CGFloat mfFontStretch; 1.0: font is squeezed, 1.0 font is stretched +CGFloat mfFontStretch; // 1.0: font gets squeezed, 1.0: font gets stretched // cached details about the resulting layout // mutable members since these details are all lazy initialized ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/app/salinst.cxx | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) New commits: commit 7a16301474acc0433c431248aaca7f0589dbe6ec Author: Herbert Dürr h...@apache.org Date: Wed Apr 2 12:09:54 2014 + #i124509# use setenv() instead of putenv() on OSX putenv() has changed its semantic to no longer copy input buffers which results in problems if the input buffers were only temporary. Using setenv(), which still copies the input buffers solves the problem. diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 5bf7944c..819b162 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -303,32 +303,29 @@ void InitSalMain() // Assign to PATH environment variable if ( aCmdPath.Len() ) { -aTmpPath = ByteString( PATH= ); -aTmpPath += aCmdPath; +aTmpPath = aCmdPath; if ( aPath.Len() ) aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ); aTmpPath += aPath; -putenv( (char*)aTmpPath.GetBuffer() ); +setenv( PATH, aTmpPath.GetBuffer(), TRUE ); } // Assign to STAR_RESOURCEPATH environment variable if ( aCmdPath.Len() ) { -aTmpPath = ByteString( STAR_RESOURCEPATH= ); -aTmpPath += aCmdPath; +aTmpPath = aCmdPath; if ( aResPath.Len() ) aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ); aTmpPath += aResPath; -putenv( (char*)aTmpPath.GetBuffer() ); +setenv( STAR_RESOURCEPATH, aTmpPath.GetBuffer(), TRUE ); } // Assign to DYLD_LIBRARY_PATH environment variable if ( aCmdPath.Len() ) { -aTmpPath = ByteString( DYLD_LIBRARY_PATH= ); -aTmpPath += aCmdPath; +aTmpPath = aCmdPath; if ( aLibPath.Len() ) aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ); aTmpPath += aLibPath; -putenv( (char*)aTmpPath.GetBuffer() ); +setenv( DYLD_LIBRARY_PATH, aTmpPath.GetBuffer(), TRUE ); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/ctlayout.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit c7243848547b19a3b237f18629b809d93ee821c4 Author: Herbert Dürr h...@apache.org Date: Mon Mar 24 07:48:44 2014 + #i124375# force soft-hyphen visibility for CoreText to meet Writer+EEng expectations diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 88b912f..4aa5112 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -121,8 +121,16 @@ bool CTLayout::LayoutText( ImplLayoutArgs rArgs ) if( mnCharCount = 0 ) return false; -// create the CoreText line layout +// prepare the string to be layouted by CoreText CFStringRef aCFText = CFStringCreateWithCharactersNoCopy( NULL, rArgs.mpStr + mnMinCharPos, mnCharCount, kCFAllocatorNull ); +// #i124375# force soft-hyphen visibility to meet the expectations of Writer+EditEngine +if( CFStringFind( aCFText, (CFStringRef)@\u00AD, 0).length 0 ) +{ +NSString* pDashStr = [(NSString*)aCFText stringByReplacingOccurrencesOfString: @\u00AD withString: @-]; +aCFText = CFStringCreateCopy( NULL, (CFStringRef)pDashStr ); +} + +// create the CoreText line layout using the requested text style mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpTextStyle-GetStyleDict() ); mpCTLine = CTLineCreateWithAttributedString( mpAttrString ); CFRelease( aCFText); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 14 +++- vcl/aqua/source/dtrans/PictToBmpFlt.cxx | 30 ++- 2 files changed, 42 insertions(+), 2 deletions(-) New commits: commit b201c7b5bf8af3423392b031c818008d39ec8d26 Author: Herbert Dürr h...@apache.org Date: Wed Jan 22 14:26:16 2014 + #i123895# implement DragDrop for images on OSX=10.6 diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx index c3650e5..095a5ee 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx @@ -608,7 +608,13 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavo } else */ - if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame) +#ifdef MAC_OS_X_VERSION_10_6 + if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypePNG] == NSOrderedSame) +{ + dp = DataProviderPtr_t( new PNGDataProvider( data, NSPNGFileType)); +} else +#endif // MAC_OS_X_VERSION_10_5 + if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame) { dp = DataProviderPtr_t( new PNGDataProvider( data, PICTImageFileType)); } @@ -657,6 +663,12 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavo { dp = DataProviderPtr_t(new HTMLFormatDataProvider(systemData)); } +#ifdef MAC_OS_X_VERSION_10_6 + else if ([systemFlavor caseInsensitiveCompare: NSPasteboardTypePNG] == NSOrderedSame) +{ + dp = DataProviderPtr_t( new PNGDataProvider(systemData, NSPNGFileType)); +} +#endif // MAC_OS_X_VERSION_10_6 else if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame) { dp = DataProviderPtr_t( new PNGDataProvider(systemData, PICTImageFileType)); diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx index 2697fcd..ef103a8 100644 --- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx +++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx @@ -39,6 +39,9 @@ bool PICTtoPNG( com::sun::star::uno::Sequencesal_Int8 rPictData, com::sun::star::uno::Sequencesal_Int8 rPngData) { +#ifdef MAC_OS_X_VERSION_10_6 +return false; +#else // MAC_OS_X_VERSION_10_6 ComponentInstance pngExporter = NULL; if( OpenADefaultComponent( GraphicsExporterComponentType, kQTFileTypePNG, pngExporter) != noErr) return false; @@ -72,12 +75,16 @@ bool PICTtoPNG( com::sun::star::uno::Sequencesal_Int8 rPictData, CloseComponent( pngExporter); return (nPngSize 0); +#endif // MAC_OS_X_VERSION_10_6 } bool PNGtoPICT( com::sun::star::uno::Sequencesal_Int8 rPngData, com::sun::star::uno::Sequencesal_Int8 rPictData) { +#ifdef MAC_OS_X_VERSION_10_6 +return false; +#else // MAC_OS_X_VERSION_10_6 ComponentInstance pictExporter; if( OpenADefaultComponent( GraphicsImporterComponentType, kQTFileTypePNG, pictExporter) != noErr) return false; @@ -99,9 +106,11 @@ bool PNGtoPICT( com::sun::star::uno::Sequencesal_Int8 rPngData, rtl_copyMemory( rPictData.getArray(), ((sal_Int8*)*hPict), nPictSize); HUnlock( (Handle)hPict); +#if __MAC_OS_X_VERSION_MAX_ALLOWED = 1060 // Release the data associated with the picture -// Note: This function is deprecated in Mac OSX 10.4 +// Note: This function has been deprecated in OSX 10.4 and removed in OSX 10.7 KillPicture( hPict); +#endif } if( hPng) @@ -110,15 +119,24 @@ bool PNGtoPICT( com::sun::star::uno::Sequencesal_Int8 rPngData, CloseComponent( pictExporter); return (nPictSize 512); +#endif // MAC_OS_X_VERSION_10_6 } bool ImageToPNG( com::sun::star::uno::Sequencesal_Int8 rImgData, com::sun::star::uno::Sequencesal_Int8 rPngData, NSBitmapImageFileType eInFormat) { +// short circuit for PNG-PNG request +if( eInFormat == NSPNGFileType) { +rPngData = rImgData; +return true; +} + +// special handling for old PICT images that are not supported by NSBitmapImage if( eInFormat == PICTImageFileType) return PICTtoPNG( rImgData, rPngData); +// let Cocoa's NSBitmapImageRep do the conversion NSData* pData = [NSData dataWithBytesNoCopy: (void*)rImgData.getConstArray() length: rImgData.getLength() freeWhenDone: 0]; if( !pData) return false; @@ -131,6 +149,7 @@ bool ImageToPNG( com::sun::star::uno::Sequencesal_Int8 rImgData, if( !pOut) return false; +// get the conversion result const size_t nPngSize = [pOut length]; rPngData.realloc( nPngSize); [pOut getBytes: rPngData.getArray() length: nPngSize]; @@ -142,9 +161,17 @@ bool PNGToImage( com::sun::star::uno::Sequencesal_Int8 rPngData,
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua vcl/inc vcl/os2 vcl/source vcl/unx vcl/win
vcl/aqua/source/gdi/salgdi.cxx | 32 vcl/inc/aqua/salgdi.h | 14 +++--- vcl/inc/os2/salgdi.h| 12 ++-- vcl/inc/salgdi.hxx | 20 ++-- vcl/inc/unx/pspgraphics.h | 10 +- vcl/inc/unx/salgdi.h| 12 ++-- vcl/inc/win/salgdi.h| 10 +- vcl/os2/source/gdi/salgdi.cxx | 16 vcl/os2/source/gdi/salgdi2.cxx |2 +- vcl/source/gdi/salgdilayout.cxx | 10 +- vcl/unx/generic/gdi/pspgraphics.cxx | 13 ++--- vcl/unx/generic/gdi/salgdi.cxx | 14 +++--- vcl/unx/headless/svpgdi.cxx | 12 ++-- vcl/unx/headless/svpgdi.hxx | 10 +- vcl/unx/headless/svppspgraphics.cxx | 14 ++ vcl/unx/headless/svppspgraphics.hxx | 10 +- vcl/win/source/gdi/salgdi.cxx |8 vcl/win/source/gdi/salgdi2.cxx |2 +- 18 files changed, 109 insertions(+), 112 deletions(-) New commits: commit 03f5dce97331acc1a5e832f956d711a5dc0aac0e Author: Herbert Dürr h...@apache.org Date: Tue Dec 17 16:47:23 2013 + #i123840# normalize SalGraphics point count argument types to sal_uInt32 The old mixture of sal_uInt32, ULONG, sal_uLong, sal_uIntPtr gets consolidated. 4e9 points are more than enough for a SalGraphics. diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 76f13a6..48f2ec3 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -744,13 +744,13 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) // --- -static void getBoundRect( sal_uLong nPoints, const SalPoint *pPtAry, long rX, long rY, long rWidth, long rHeight ) +static void getBoundRect( sal_uInt32 nPoints, const SalPoint* pPtAry, long rX, long rY, long rWidth, long rHeight ) { long nX1 = pPtAry-mnX; long nX2 = nX1; long nY1 = pPtAry-mnY; long nY2 = nY1; -for( sal_uLong n = 1; n nPoints; n++ ) +for( sal_uInt32 n = 1; n nPoints; ++n ) { if( pPtAry[n].mnX nX1 ) nX1 = pPtAry[n].mnX; @@ -774,7 +774,7 @@ static inline void alignLinePoint( const SalPoint* i_pIn, float o_fX, float o_ o_fY = static_castfloat(i_pIn-mnY ) + 0.5; } -void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry ) +void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) { if( nPoints 1 ) return; @@ -790,7 +790,7 @@ void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry ) alignLinePoint( pPtAry, fX, fY ); CGContextMoveToPoint( mrContext, fX, fY ); pPtAry++; -for( sal_uLong nPoint = 1; nPoint nPoints; nPoint++, pPtAry++ ) +for( sal_uInt32 nPoint = 1; nPoint nPoints; ++nPoint, ++pPtAry ) { alignLinePoint( pPtAry, fX, fY ); CGContextAddLineToPoint( mrContext, fX, fY ); @@ -802,7 +802,7 @@ void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry ) // --- -void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) +void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) { if( nPoints = 1 ) return; @@ -830,7 +830,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) alignLinePoint( pPtAry, fX, fY ); CGContextMoveToPoint( mrContext, fX, fY ); pPtAry++; -for( sal_uLong nPoint = 1; nPoint nPoints; nPoint++, pPtAry++ ) +for( sal_uInt32 nPoint = 1; nPoint nPoints; ++nPoint, ++pPtAry ) { alignLinePoint( pPtAry, fX, fY ); CGContextAddLineToPoint( mrContext, fX, fY ); @@ -840,7 +840,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) { CGContextMoveToPoint( mrContext, pPtAry-mnX, pPtAry-mnY ); pPtAry++; -for( sal_uLong nPoint = 1; nPoint nPoints; nPoint++, pPtAry++ ) +for( sal_uInt32 nPoint = 1; nPoint nPoints; ++nPoint, ++pPtAry ) CGContextAddLineToPoint( mrContext, pPtAry-mnX, pPtAry-mnY ); } @@ -850,7 +850,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) // --- -void AquaSalGraphics::drawPolyPolygon( sal_uLong nPolyCount, const sal_uLong *pPoints, PCONSTSALPOINT *ppPtAry ) +void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32* pPoints, PCONSTSALPOINT* ppPtAry ) { if( nPolyCount = 0 ) return; @@ -897,7 +897,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uLong nPolyCount, const sal_uLong *pP { for(
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 23 --- vcl/aqua/source/dtrans/DataFlavorMapping.hxx | 13 +++-- vcl/aqua/source/dtrans/aqua_clipboard.cxx|8 vcl/aqua/source/dtrans/aqua_clipboard.hxx|4 ++-- 4 files changed, 25 insertions(+), 23 deletions(-) New commits: commit 0801e9b488660e792a09d12717da951d224b26e0 Author: Herbert Dürr h...@apache.org Date: Thu Dec 12 13:37:51 2013 + #i123841# fix constness issues in OSX 64bit clipboard handling diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx index c784602..c3650e5 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx @@ -64,7 +64,7 @@ namespace // private typedef vectorsal_Unicode UnicodeBuffer; - OUString NSStringToOUString(NSString* cfString) + OUString NSStringToOUString( const NSString* cfString) { BOOST_ASSERT(cfString Invalid parameter); @@ -113,7 +113,7 @@ namespace // private struct FlavorMap { -NSString* SystemFlavor; +const NSString* SystemFlavor; const char* OOoFlavor; const char* HumanPresentableName; Type DataType; @@ -121,7 +121,7 @@ namespace // private /* At the moment it appears as if only MS Office pastes public.html to the clipboard. */ - FlavorMap flavorMap[] = + static const FlavorMap flavorMap[] = { { NSStringPboardType, text/plain;charset=utf-16, Unicode Text (UTF-16), CPPUTYPE_OUSTRING }, { NSRTFPboardType, text/richtext, Rich Text Format, CPPUTYPE_SEQINT8 }, @@ -521,13 +521,13 @@ DataFlavorMapper::~DataFlavorMapper() } } -DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor) const +DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDataFlavor) const { DataFlavor oOOFlavor; for (size_t i = 0; i SIZE_FLAVOR_MAP; i++) { - if ([systemDataFlavor caseInsensitiveCompare: flavorMap[i].SystemFlavor] == NSOrderedSame) + if ([systemDataFlavor caseInsensitiveCompare:const_castNSString*(flavorMap[i].SystemFlavor)] == NSOrderedSame) { oOOFlavor.MimeType = OUString::createFromAscii( flavorMap[i].OOoFlavor); oOOFlavor.HumanPresentableName = OUString::createFromAscii( flavorMap[i].HumanPresentableName); @@ -549,9 +549,10 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor return oOOFlavor; } -NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor oOOFlavor, bool rbInternal) const +const NSString* DataFlavorMapper::openOfficeToSystemFlavor( const DataFlavor oOOFlavor, bool rbInternal) const { -NSString* sysFlavor = NULL; +const NSString* sysFlavor = NULL; +rbInternal = false; rbInternal = false; for( size_t i = 0; i SIZE_FLAVOR_MAP; ++i ) @@ -583,7 +584,7 @@ NSString* DataFlavorMapper::openOfficeImageToSystemFlavor(NSPasteboard* pPastebo return sysFlavor; } -DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, ReferenceXTransferable rTransferable) const +DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavor, ReferenceXTransferable rTransferable) const { DataProviderPtr_t dp; @@ -639,12 +640,12 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe return dp; } -DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* /*systemFlavor*/, NSArray* systemData) const +DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* /*systemFlavor*/, NSArray* systemData) const { return DataProviderPtr_t(new FileListDataProvider(systemData)); } -DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* systemFlavor, NSData* systemData) const +DataProviderPtr_t DataFlavorMapper::getDataProvider( const NSString* systemFlavor, NSData* systemData) const { DataProviderPtr_t dp; @@ -708,7 +709,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno: } else { - NSString* str = openOfficeToSystemFlavor(flavors[i], bNeedDummyInternalFlavor); + const NSString* str = openOfficeToSystemFlavor(flavors[i], bNeedDummyInternalFlavor); if (str != NULL) { diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx index 9a9e709..6adf3fb 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx @@ -78,14 +78,14 @@ public: mapping from a system data flavor to a OpenOffice data flavor. */ - com::sun::star::datatransfer::DataFlavor systemToOpenOfficeFlavor(NSString* systemDataFlavor) const; + com::sun::star::datatransfer::DataFlavor systemToOpenOfficeFlavor( const NSString* systemDataFlavor) const; /* Map an OpenOffice data flavor to a system data
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 30 +++ vcl/aqua/source/dtrans/DataFlavorMapping.hxx |4 --- vcl/aqua/source/dtrans/OSXTransferable.cxx |3 +- vcl/aqua/source/dtrans/aqua_clipboard.cxx|3 +- 4 files changed, 18 insertions(+), 22 deletions(-) New commits: commit 11d6690fddcebec67baba285f87e647241ebfd82 Author: Armin Le Grand a...@apache.org Date: Thu Jun 6 12:10:35 2013 + i122420 Re-activated the internal OpenOfficeToSystemFlavor diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx index 1669e5a..c784602 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx @@ -549,9 +549,10 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor return oOOFlavor; } -NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor oOOFlavor) const +NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor oOOFlavor, bool rbInternal) const { NSString* sysFlavor = NULL; +rbInternal = false; for( size_t i = 0; i SIZE_FLAVOR_MAP; ++i ) { @@ -561,17 +562,16 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor oOOFlavor } } -return sysFlavor; -} +if(!sysFlavor) +{ +rbInternal = true; +OfficeOnlyTypes::const_iterator it = maOfficeOnlyTypes.find( oOOFlavor.MimeType ); -NSString* DataFlavorMapper::internalOpenOfficeToSystemFlavor(const DataFlavor oOOFlavor) const -{ -NSString* sysFlavor = NULL; -OfficeOnlyTypes::const_iterator it = maOfficeOnlyTypes.find( oOOFlavor.MimeType ); -if( it == maOfficeOnlyTypes.end() ) -sysFlavor = maOfficeOnlyTypes[ oOOFlavor.MimeType ] = OUStringToNSString( oOOFlavor.MimeType ); -else -sysFlavor = it-second; +if( it == maOfficeOnlyTypes.end() ) +sysFlavor = maOfficeOnlyTypes[ oOOFlavor.MimeType ] = OUStringToNSString( oOOFlavor.MimeType ); +else +sysFlavor = it-second; +} return sysFlavor; } @@ -697,7 +697,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno: sal_uInt32 nFlavors = flavors.getLength(); NSMutableArray* array = [[NSMutableArray alloc] initWithCapacity: 1]; - bool bNeedDummyInternalFlavor (true); + bool bNeedDummyInternalFlavor(false); for (sal_uInt32 i = 0; i nFlavors; i++) { @@ -708,11 +708,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno: } else { - NSString* str = openOfficeToSystemFlavor(flavors[i]); - if (str == NULL) - str = internalOpenOfficeToSystemFlavor(flavors[i]); - else - bNeedDummyInternalFlavor = false; + NSString* str = openOfficeToSystemFlavor(flavors[i], bNeedDummyInternalFlavor); if (str != NULL) { diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx index 296d8f0..9a9e709 100644 --- a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx +++ b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx @@ -85,7 +85,7 @@ public: If there is no suiteable mapping available NULL will be returned. */ - NSString* openOfficeToSystemFlavor(const com::sun::star::datatransfer::DataFlavor oooDataFlavor) const; + NSString* openOfficeToSystemFlavor(const com::sun::star::datatransfer::DataFlavor oooDataFlavor, bool rbInternal) const; /* Select the best available image data type If there is no suiteable mapping available NULL will @@ -132,8 +132,6 @@ private: */ bool isValidMimeContentType(const rtl::OUString contentType) const; - NSString* internalOpenOfficeToSystemFlavor(const com::sun::star::datatransfer::DataFlavor oooDataFlavor) const; - private: ::com::sun::star::uno::Reference ::com::sun::star::datatransfer::XMimeContentTypeFactory mrXMimeCntFactory; typedef std::hash_map rtl::OUString, NSString*, rtl::OUStringHash OfficeOnlyTypes; diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx index 21aadd5..9a12689 100644 --- a/vcl/aqua/source/dtrans/OSXTransferable.cxx +++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx @@ -84,10 +84,11 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor aFlavor ) static_castXTransferable*(this)); } + bool bInternal(false); NSString* sysFormat = (aFlavor.MimeType.compareToAscii( image/png, 9 ) == 0) ? mDataFlavorMapper-openOfficeImageToSystemFlavor( mPasteboard ) - : mDataFlavorMapper-openOfficeToSystemFlavor(aFlavor); + : mDataFlavorMapper-openOfficeToSystemFlavor(aFlavor, bInternal); DataProviderPtr_t dp; if ([sysFormat caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame) diff --git