diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-10-02 17:31:56 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-10-02 17:31:56 +0200 |
commit | d6418f680b8861dfea1ce1be6e9358b23cfb3064 (patch) | |
tree | 90be280825a3e212ac44ccafc56272a7d2d35336 | |
parent | 4afd166c229e27d741b48a6f099d2f00d01b05de (diff) |
Revert "Fix fdo#55142 - wrong character pos calculation on mac."
Caused fdo#55350, better fix in the next commit.
This reverts commit f1651ee579bf38a49b839dbcb28ac38c0163a3d2.
-rw-r--r-- | vcl/aqua/source/gdi/atsui/salgdi.cxx | 29 | ||||
-rw-r--r-- | vcl/inc/aqua/atsui/salgdi.h | 1 |
2 files changed, 2 insertions, 28 deletions
diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx b/vcl/aqua/source/gdi/atsui/salgdi.cxx index a57068db0efc..5c0bff7a6243 100644 --- a/vcl/aqua/source/gdi/atsui/salgdi.cxx +++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx @@ -354,8 +354,6 @@ AquaSalGraphics::AquaSalGraphics() { // create the style object for font attributes ATSUCreateStyle( &maATSUStyle ); - - ResetFontStyle(); } // ----------------------------------------------------------------------- @@ -581,29 +579,6 @@ bool AquaSalGraphics::AddTempDevFont( ImplDevFontList*, // ----------------------------------------------------------------------- -void AquaSalGraphics::ResetFontStyle() -{ - ATSUClearStyle(maATSUStyle); - - // Set justification attributes - ATSJustPriorityWidthDeltaOverrides nPriorityJustOverrides; - memset(nPriorityJustOverrides, 0, sizeof(nPriorityJustOverrides)); - - nPriorityJustOverrides[kJUSTLetterPriority].growFlags = kJUSTOverrideLimits; - nPriorityJustOverrides[kJUSTLetterPriority].shrinkFlags = kJUSTOverrideLimits; - - ATSUAttributeTag theTag = kATSUPriorityJustOverrideTag; - ByteCount theSize = sizeof(ATSJustPriorityWidthDeltaOverrides); - ATSUAttributeValuePtr thePtr = &nPriorityJustOverrides; - OSStatus eStatus = ATSUSetAttributes(maATSUStyle, 1, &theTag, &theSize, &thePtr); - if (eStatus != noErr) - { - DBG_WARNING("AquaSalGraphics::ResetFontStyle() : Could not override justification attributes!\n"); - } -} - -// ----------------------------------------------------------------------- - // callbacks from ATSUGlyphGetCubicPaths() fore GetGlyphOutline() struct GgoData { basegfx::B2DPolygon maPolygon; basegfx::B2DPolyPolygon* mpPolyPoly; }; @@ -723,7 +698,7 @@ sal_uInt16 AquaSalGraphics::SetFont( FontSelectPattern* pReqFont, int /*nFallbac { if( !pReqFont ) { - ResetFontStyle(); + ATSUClearStyle( maATSUStyle ); mpMacFontData = NULL; return 0; } @@ -809,7 +784,7 @@ sal_uInt16 AquaSalGraphics::SetFont( FontSelectPattern* pReqFont, int /*nFallbac if( eStatus != noErr ) { DBG_WARNING( "AquaSalGraphics::SetFont() : Could not set font attributes!\n"); - ResetFontStyle(); + ATSUClearStyle( maATSUStyle ); mpMacFontData = NULL; return 0; } diff --git a/vcl/inc/aqua/atsui/salgdi.h b/vcl/inc/aqua/atsui/salgdi.h index eeb7aa43f2b3..19fe1f48b9f7 100644 --- a/vcl/inc/aqua/atsui/salgdi.h +++ b/vcl/inc/aqua/atsui/salgdi.h @@ -353,7 +353,6 @@ private: bool GetRawFontData( const PhysicalFontFace* pFontData, std::vector<unsigned char>& rBuffer, bool* pJustCFF ); - void ResetFontStyle(); }; // --- some trivial inlines |