openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1560745 - in /openoffice/trunk/main/vcl: aqua/source/a11y/ aqua/source/app/ aqua/source/dtrans/ aqua/source/gdi/ aqua/source/window/ inc/aqua/
Date Thu, 23 Jan 2014 16:56:04 GMT
Author: hdu
Date: Thu Jan 23 16:56:03 2014
New Revision: 1560745

URL: http://svn.apache.org/r1560745
Log:
#i123895# add VCL support for 64bit OSX port

Modified:
    openoffice/trunk/main/vcl/aqua/source/a11y/aqua11ywrapperrow.mm
    openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx
    openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm
    openoffice/trunk/main/vcl/aqua/source/dtrans/DropTarget.cxx
    openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx
    openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx
    openoffice/trunk/main/vcl/aqua/source/window/salframeview.mm
    openoffice/trunk/main/vcl/aqua/source/window/salmenu.cxx
    openoffice/trunk/main/vcl/inc/aqua/aquavcltypes.h
    openoffice/trunk/main/vcl/inc/aqua/salframeview.h
    openoffice/trunk/main/vcl/inc/aqua/salgdi.h

Modified: openoffice/trunk/main/vcl/aqua/source/a11y/aqua11ywrapperrow.mm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/a11y/aqua11ywrapperrow.mm?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/a11y/aqua11ywrapperrow.mm (original)
+++ openoffice/trunk/main/vcl/aqua/source/a11y/aqua11ywrapperrow.mm Thu Jan 23 16:56:03 2014
@@ -34,7 +34,8 @@
 @implementation AquaA11yWrapperRow : AquaA11yWrapper
 
 -(id)disclosingAttribute {
-    return NO; // TODO
+    // TODO: implement
+    return nil;
 }
 
 -(NSArray *)accessibilityAttributeNames {

Modified: openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx Thu Jan 23 16:56:03 2014
@@ -190,8 +190,10 @@ static void initNSApp()
     else
         NSLog(@"Unable to obtain system version: %ld", (long)err);
 
-     // Initialize Apple Remote
+    // Initialize Apple Remote
+#if 0 // disabled for now for stability problems
     GetSalData()->mpMainController = [[MainController alloc] init];
+#endif
 
     [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
                                            selector: @selector(applicationWillBecomeActive:)

Modified: openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/vclnsapp.mm Thu Jan 23 16:56:03 2014
@@ -79,7 +79,7 @@
                 if( nModMask == NSCommandKeyMask
                     && [[pEvent charactersIgnoringModifiers] isEqualToString: @"w"]
)
                 {
-                    [pFrame->getNSWindow() windowShouldClose: nil];
+                    [(SalFrameWindow*)pFrame->getNSWindow() windowShouldClose: nil];
                     return;
                 }
             }

Modified: openoffice/trunk/main/vcl/aqua/source/dtrans/DropTarget.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/dtrans/DropTarget.cxx?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/dtrans/DropTarget.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/dtrans/DropTarget.cxx Thu Jan 23 16:56:03 2014
@@ -299,15 +299,12 @@ NSDragOperation DropTarget::draggingUpda
 	  //NSLog(@"Drag update: Source actions: %x proposed action %x selected action %x", mDragSourceSupportedActions,
currentAction, mSelectedDropAction);
 	}
  
-  // Weird but it appears as if there is no method in Cocoa
-  // to create a kThemeCopyArrowCursor hence we have to use
-  // Carbon to do it
   if (dragOp == NSDragOperationNone)
-	SetThemeCursor(kThemeNotAllowedCursor);
+	[[NSCursor operationNotAllowedCursor] set];
   else if (dragOp == NSDragOperationCopy)
-    SetThemeCursor(kThemeCopyArrowCursor);
+	[[NSCursor dragCopyCursor] set];
   else 
-	SetThemeCursor(kThemeArrowCursor);
+	[[NSCursor arrowCursor] set];
 
   return dragOp;
 }
@@ -319,7 +316,7 @@ void DropTarget::draggingExited(id /*sen
 	fire_dragExit(dte);
 	mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
 	mSelectedDropAction = DNDConstants::ACTION_NONE;
-	SetThemeCursor(kThemeArrowCursor);
+	[[NSCursor arrowCursor] set];
 }
 
 
@@ -373,7 +370,7 @@ void DropTarget::concludeDragOperation(i
 	mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
 	mSelectedDropAction = DNDConstants::ACTION_NONE;
 	mXCurrentDragClipboard = uno::Reference<XClipboard>();
-	SetThemeCursor(kThemeArrowCursor);
+	[[NSCursor arrowCursor] set];
 }
 
 

Modified: openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/salgdiutils.cxx Thu Jan 23 16:56:03 2014
@@ -175,7 +175,7 @@ void AquaSalGraphics::SetState()
 
 bool AquaSalGraphics::CheckContext()
 {
-    if( mbWindow && mpFrame != NULL )
+    if( mbWindow && mpFrame && mpFrame->getNSWindow() )
     {
         const unsigned int nWidth = mpFrame->maGeometry.nWidth;
         const unsigned int nHeight = mpFrame->maGeometry.nHeight;

Modified: openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/window/salframe.cxx Thu Jan 23 16:56:03 2014
@@ -207,7 +207,7 @@ void AquaSalFrame::initWindowAndView()
     else
         [mpNSWindow setAcceptsMouseMovedEvents: YES];
     [mpNSWindow setHasShadow: YES];
-    [mpNSWindow setDelegate: mpNSWindow];
+    [mpNSWindow setDelegate: static_cast<id<NSWindowDelegate> >(mpNSWindow)];
     
     const NSRect aRect = NSMakeRect( 0,0, maGeometry.nWidth, maGeometry.nHeight );
     mnTrackingRectTag = [mpNSView addTrackingRect: aRect owner: mpNSView userData: nil assumeInside:
NO];

Modified: openoffice/trunk/main/vcl/aqua/source/window/salframeview.mm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/window/salframeview.mm?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/window/salframeview.mm (original)
+++ openoffice/trunk/main/vcl/aqua/source/window/salframeview.mm Thu Jan 23 16:56:03 2014
@@ -136,9 +136,9 @@ static const struct ExceptionalKey
 
 static AquaSalFrame* getMouseContainerFrame()
 {
-    int nWindows = 0;
+    NSInteger nWindows = 0;
     NSCountWindows( &nWindows );
-    int* pWindows = (int*)alloca( nWindows * sizeof(int) );
+    NSInteger* pWindows = (NSInteger*)alloca( nWindows * sizeof(NSInteger) );
     // note: NSWindowList is supposed to be in z-order front to back
     NSWindowList( nWindows, pWindows );
     AquaSalFrame* pDispatchFrame = NULL;
@@ -1636,7 +1636,7 @@ private:
     return nil;
 }
 
-- (unsigned int)characterIndexForPoint:(NSPoint)thePoint
+- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
 {
     (void)thePoint;
     // FIXME

Modified: openoffice/trunk/main/vcl/aqua/source/window/salmenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/window/salmenu.cxx?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/window/salmenu.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/window/salmenu.cxx Thu Jan 23 16:56:03 2014
@@ -255,7 +255,7 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar 
     if( ! mbMenuBar )
     {
         mpMenu = [[SalNSMenu alloc] initWithMenu: this];
-        [mpMenu setDelegate: mpMenu];
+        [mpMenu setDelegate: (id<NSMenuDelegate>)mpMenu];
     }
     else
     {

Modified: openoffice/trunk/main/vcl/inc/aqua/aquavcltypes.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/aquavcltypes.h?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/aquavcltypes.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/aquavcltypes.h Thu Jan 23 16:56:03 2014
@@ -29,4 +29,5 @@
 #import <AppKit/NSEvent.h>
 #include "postmac.h"
 
-#endif _AQUAVCLTYPES_H
+#endif // _AQUAVCLTYPES_H
+

Modified: openoffice/trunk/main/vcl/inc/aqua/salframeview.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/salframeview.h?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/salframeview.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/salframeview.h Thu Jan 23 16:56:03 2014
@@ -26,7 +26,7 @@
 
 #include "aqua/aqua11ywrapper.h"
 
-@interface SalFrameWindow : NSWindow
+@interface SalFrameWindow : NSWindow<NSWindowDelegate>
 {
     AquaSalFrame*       mpFrame;
 	id mDraggingDestinationHandler;
@@ -42,6 +42,9 @@
 -(void)windowDidMiniaturize: (NSNotification*)pNotification;
 -(void)windowDidDeminiaturize: (NSNotification*)pNotification;
 -(BOOL)windowShouldClose: (NSNotification*)pNotification;
+//-(void)willEncodeRestorableState:(NSCoder*)pCoderState;
+//-(void)didDecodeRestorableState:(NSCoder*)pCoderState;
+//-(void)windowWillEnterVersionBrowser:(NSNotification*)pNotification;
 -(void)dockMenuItemTriggered: (id)sender;
 -(AquaSalFrame*)getSalFrame;
 -(BOOL)containsMouse;

Modified: openoffice/trunk/main/vcl/inc/aqua/salgdi.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/aqua/salgdi.h?rev=1560745&r1=1560744&r2=1560745&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/aqua/salgdi.h (original)
+++ openoffice/trunk/main/vcl/inc/aqua/salgdi.h Thu Jan 23 16:56:03 2014
@@ -44,6 +44,8 @@ class ImplMacTextStyle;
 
 struct CGRect;
 
+typedef std::vector<unsigned char> ByteVector;
+
 #ifndef CGFLOAT_TYPE
 typedef float CGFloat;
 #endif
@@ -52,23 +54,27 @@ typedef float CGFloat;
 class ImplMacFontData : public ImplFontData
 {
 public:
-	ImplMacFontData( const ImplDevFontAttributes&, ATSUFontID );
-
-    virtual ~ImplMacFontData();
+	ImplMacFontData( const ImplDevFontAttributes&, sal_IntPtr nFontID );
+	virtual ~ImplMacFontData();
 
-    virtual ImplFontData*   Clone() const;
-    virtual ImplFontEntry*  CreateFontInstance( ImplFontSelectData& ) const;
+	virtual ImplFontData*   Clone() const = 0;
+	virtual ImplFontEntry*  CreateFontInstance( ImplFontSelectData& ) const;
 	virtual sal_IntPtr      GetFontId() const;
+
+	virtual ImplMacTextStyle* CreateMacTextStyle( const ImplFontSelectData& ) const = 0;
+	virtual int             GetFontTable( const char pTagName[5], unsigned char* ) const = 0;
     
-    const ImplFontCharMap*	GetImplFontCharMap() const;
+	const ImplFontCharMap*	GetImplFontCharMap() const;
 	bool					HasChar( sal_uInt32 cChar ) const;
 
 	void					ReadOs2Table() const;
 	void					ReadMacCmapEncoding() const;
 	bool					HasCJKSupport() const;
 
+protected:
+	ImplMacFontData( const ImplMacFontData&);
 private:
-    const ATSUFontID			mnFontId;
+	const sal_IntPtr			mnFontId;
 	mutable const ImplFontCharMap*	mpCharMap;
 	mutable bool				mbOs2Read;		 // true if OS2-table related info is valid
 	mutable bool				mbHasOs2Table;
@@ -90,16 +96,57 @@ public:
 	CGFloat GetGreen() const { return mfRGBA[1]; }
 	CGFloat GetBlue() const  { return mfRGBA[2]; }
 	CGFloat GetAlpha() const { return mfRGBA[3]; }
- private:
+private:
 	CGFloat mfRGBA[4]; // RGBA
 };
 
+// --------------------
+// - ImplMacTextStyle -
+// --------------------
+class ImplMacTextStyle
+{
+public:
+	explicit		ImplMacTextStyle( const ImplFontSelectData& );
+	virtual			~ImplMacTextStyle( void );
+
+	virtual SalLayout* GetTextLayout( void ) const = 0;
+
+	virtual void	GetFontMetric( float fPDIY, ImplFontMetricData& ) const = 0;
+	virtual bool	GetGlyphBoundRect( sal_GlyphId, Rectangle& ) const = 0;
+	virtual bool	GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) const = 0;
+
+	virtual void	SetTextColor( const RGBAColor& ) = 0;
+
+//###protected:
+	const ImplMacFontData*	mpFontData;
+	/// workaround to prevent overflows for huge font sizes
+	float				mfFontScale;
+	/// <1.0: font is squeezed, >1.0 font is stretched, else 1.0
+	float				mfFontStretch;
+	/// text rotation in radian
+	float				mfFontRotation;
+};
+
+// ------------------
+// - SystemFontList -
+// TODO: move into cross-platform headers
+// ------------------
+class SystemFontList
+{
+public:
+	virtual ~SystemFontList( void );
+
+	virtual void	AnnounceFonts( ImplDevFontList& ) const = 0;
+	virtual ImplMacFontData* GetFontDataFromId( sal_IntPtr nFontId ) const = 0;
+};
+
 // -------------------
 // - AquaSalGraphics -
 // -------------------
 class AquaSalGraphics : public SalGraphics
 {
     friend class ATSLayout;
+    friend class CTLayout;
 protected:
     AquaSalFrame*                           mpFrame;
 	CGLayerRef								mxLayer;	// Quartz graphics layer
@@ -126,18 +173,12 @@ protected:
     /// brush color RGBA
     RGBAColor                               maFillColor;
 
-    // Device Font settings
+	// Device Font settings
  	const ImplMacFontData*                  mpMacFontData;
-    /// ATSU style object which carries all font attributes
-    ATSUStyle			                    maATSUStyle;
-    /// text rotation as ATSU angle
-    Fixed                                   mnATSUIRotation;
-    /// workaround to prevent ATSU overflows for huge font sizes
-    float                                   mfFontScale;
-    /// <1.0: font is squeezed, >1.0 font is stretched, else 1.0
-    float                                   mfFontStretch;
-    /// allows text to be rendered without antialiasing
-    bool                                    mbNonAntialiasedText;
+	ImplMacTextStyle*                       mpMacTextStyle;
+	RGBAColor                               maTextColor;
+	// allows text to be rendered without antialiasing
+	bool                                    mbNonAntialiasedText;
 
 	// Graphics types
     



Mime
View raw message