summaryrefslogtreecommitdiff
path: root/vcl/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-04-03 22:24:33 +0300
committerTor Lillqvist <tml@iki.fi>2012-04-04 01:05:44 +0300
commit3afbf314b76ab2677accf330915088c07bd7c471 (patch)
tree9523da29a469d79ce0f98f5df94f398e97ed51ed /vcl/ios
parentf85dfb96c407a68c5aa13815603c11ea8e340f6e (diff)
WaE fixes to the mostly dummy iOS code
Diffstat (limited to 'vcl/ios')
-rw-r--r--vcl/ios/source/gdi/salcoretextfontutils.cxx177
-rw-r--r--vcl/ios/source/gdi/salcoretextlayout.cxx26
-rw-r--r--vcl/ios/source/gdi/salnativewidgets.cxx18
-rw-r--r--vcl/ios/source/window/salframeview.mm16
4 files changed, 56 insertions, 181 deletions
diff --git a/vcl/ios/source/gdi/salcoretextfontutils.cxx b/vcl/ios/source/gdi/salcoretextfontutils.cxx
index b67e9548de25..388d497d0aa8 100644
--- a/vcl/ios/source/gdi/salcoretextfontutils.cxx
+++ b/vcl/ios/source/gdi/salcoretextfontutils.cxx
@@ -36,180 +36,6 @@
#include "ios/saldata.hxx"
#include "ios/salcoretextfontutils.hxx"
-// we have to get the font attributes from the name table
-// since neither head's macStyle nor OS/2's panose are easily available
-// during font enumeration. macStyle bits would be not sufficient anyway
-// and SFNT fonts on Mac usually do not contain an OS/2 table.
-static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttributes& rDFA )
-{
- rtl::OString aPSName( rtl::OUStringToOString( rPSName, RTL_TEXTENCODING_UTF8 ).toAsciiLowerCase() );
-
- // TODO: use a multi-string ignore-case matcher once it becomes available
- if( (aPSName.indexOf("regular") != -1)
- || (aPSName.indexOf("normal") != -1)
- || (aPSName.indexOf("roman") != -1)
- || (aPSName.indexOf("medium") != -1)
- || (aPSName.indexOf("plain") != -1)
- || (aPSName.indexOf("standard") != -1)
- || (aPSName.indexOf("std") != -1) )
- {
- rDFA.meWidthType = WIDTH_NORMAL;
- rDFA.meWeight = WEIGHT_NORMAL;
- rDFA.meItalic = ITALIC_NONE;
- }
-
- // heuristics for font weight
- if (aPSName.indexOf("extrablack") != -1)
- rDFA.meWeight = WEIGHT_BLACK;
- else if (aPSName.indexOf("black") != -1)
- rDFA.meWeight = WEIGHT_BLACK;
- //else if (aPSName.indexOf("book") != -1)
- // rDFA.meWeight = WEIGHT_SEMIBOLD;
- else if( (aPSName.indexOf("semibold") != -1)
- || (aPSName.indexOf("smbd") != -1))
- rDFA.meWeight = WEIGHT_SEMIBOLD;
- else if (aPSName.indexOf("ultrabold") != -1)
- rDFA.meWeight = WEIGHT_ULTRABOLD;
- else if (aPSName.indexOf("extrabold") != -1)
- rDFA.meWeight = WEIGHT_BLACK;
- else if( (aPSName.indexOf("bold") != -1)
- || (aPSName.indexOf("-bd") != -1))
- rDFA.meWeight = WEIGHT_BOLD;
- else if (aPSName.indexOf("extralight") != -1)
- rDFA.meWeight = WEIGHT_ULTRALIGHT;
- else if (aPSName.indexOf("ultralight") != -1)
- rDFA.meWeight = WEIGHT_ULTRALIGHT;
- else if (aPSName.indexOf("light") != -1)
- rDFA.meWeight = WEIGHT_LIGHT;
- else if (aPSName.indexOf("thin") != -1)
- rDFA.meWeight = WEIGHT_THIN;
- else if (aPSName.indexOf("-w3") != -1)
- rDFA.meWeight = WEIGHT_LIGHT;
- else if (aPSName.indexOf("-w4") != -1)
- rDFA.meWeight = WEIGHT_SEMILIGHT;
- else if (aPSName.indexOf("-w5") != -1)
- rDFA.meWeight = WEIGHT_NORMAL;
- else if (aPSName.indexOf("-w6") != -1)
- rDFA.meWeight = WEIGHT_SEMIBOLD;
- else if (aPSName.indexOf("-w7") != -1)
- rDFA.meWeight = WEIGHT_BOLD;
- else if (aPSName.indexOf("-w8") != -1)
- rDFA.meWeight = WEIGHT_ULTRABOLD;
- else if (aPSName.indexOf("-w9") != -1)
- rDFA.meWeight = WEIGHT_BLACK;
-
- // heuristics for font slant
- if( (aPSName.indexOf("italic") != -1)
- || (aPSName.indexOf(" ital") != -1)
- || (aPSName.indexOf("cursive") != -1)
- || (aPSName.indexOf("-it") != -1)
- || (aPSName.indexOf("lightit") != -1)
- || (aPSName.indexOf("mediumit") != -1)
- || (aPSName.indexOf("boldit") != -1)
- || (aPSName.indexOf("cnit") != -1)
- || (aPSName.indexOf("bdcn") != -1)
- || (aPSName.indexOf("bdit") != -1)
- || (aPSName.indexOf("condit") != -1)
- || (aPSName.indexOf("bookit") != -1)
- || (aPSName.indexOf("blackit") != -1) )
- rDFA.meItalic = ITALIC_NORMAL;
- if( (aPSName.indexOf("oblique") != -1)
- || (aPSName.indexOf("inclined") != -1)
- || (aPSName.indexOf("slanted") != -1) )
- rDFA.meItalic = ITALIC_OBLIQUE;
-
- // heuristics for font width
- if( (aPSName.indexOf("condensed") != -1)
- || (aPSName.indexOf("-cond") != -1)
- || (aPSName.indexOf("boldcond") != -1)
- || (aPSName.indexOf("boldcn") != -1)
- || (aPSName.indexOf("cnit") != -1) )
- rDFA.meWidthType = WIDTH_CONDENSED;
- else if (aPSName.indexOf("narrow") != -1)
- rDFA.meWidthType = WIDTH_SEMI_CONDENSED;
- else if (aPSName.indexOf("expanded") != -1)
- rDFA.meWidthType = WIDTH_EXPANDED;
- else if (aPSName.indexOf("wide") != -1)
- rDFA.meWidthType = WIDTH_EXPANDED;
-
- // heuristics for font pitch
- if( (aPSName.indexOf("mono") != -1)
- || (aPSName.indexOf("courier") != -1)
- || (aPSName.indexOf("monaco") != -1)
- || (aPSName.indexOf("typewriter") != -1) )
- rDFA.mePitch = PITCH_FIXED;
-
- // heuristics for font family type
- if( (aPSName.indexOf("script") != -1)
- || (aPSName.indexOf("chancery") != -1)
- || (aPSName.indexOf("zapfino") != -1))
- rDFA.meFamily = FAMILY_SCRIPT;
- else if( (aPSName.indexOf("comic") != -1)
- || (aPSName.indexOf("outline") != -1)
- || (aPSName.indexOf("pinpoint") != -1) )
- rDFA.meFamily = FAMILY_DECORATIVE;
- else if( (aPSName.indexOf("sans") != -1)
- || (aPSName.indexOf("arial") != -1) )
- rDFA.meFamily = FAMILY_SWISS;
- else if( (aPSName.indexOf("roman") != -1)
- || (aPSName.indexOf("times") != -1) )
- rDFA.meFamily = FAMILY_ROMAN;
-
- // heuristics for codepoint semantic
- if( (aPSName.indexOf("symbol") != -1)
- || (aPSName.indexOf("dings") != -1)
- || (aPSName.indexOf("dingbats") != -1)
- || (aPSName.indexOf("ornaments") != -1)
- || (aPSName.indexOf("embellishments") != -1) )
- rDFA.mbSymbolFlag = true;
-
- // #i100020# special heuristic for names with single-char styles
- // NOTE: we are checking name that hasn't been lower-cased
- if( rPSName.Len() > 3 )
- {
- int i = rPSName.Len();
- sal_Unicode c = rPSName.GetChar( --i );
- if( c == 'C' ) { // "capitals"
- rDFA.meFamily = FAMILY_DECORATIVE;
- c = rPSName.GetChar( --i );
- }
- if( c == 'O' ) { // CFF-based OpenType
- c = rPSName.GetChar( --i );
- }
- if( c == 'I' ) { // "italic"
- rDFA.meItalic = ITALIC_NORMAL;
- c = rPSName.GetChar( --i );
- }
- if( c == 'B' ) // "bold"
- rDFA.meWeight = WEIGHT_BOLD;
- if( c == 'C' ) // "capitals"
- rDFA.meFamily = FAMILY_DECORATIVE;
- // TODO: check that all single-char styles have been resolved?
- }
-}
-
-static bool GetDevFontAttributes( CTFontRef nFontRef, ImplDevFontAttributes& rDFA )
-{
- // all CT fonts are device fonts that can be directly rotated
- rDFA.mbOrientation = true;
- rDFA.mbDevice = true;
- rDFA.mnQuality = 0;
-
- // reset the attributes
- rDFA.meFamily = FAMILY_DONTKNOW;
- rDFA.mePitch = PITCH_VARIABLE;
- rDFA.meWidthType = WIDTH_NORMAL;
- rDFA.meWeight = WEIGHT_NORMAL;
- rDFA.meItalic = ITALIC_NONE;
- rDFA.mbSymbolFlag = false;
-
- // Implement...
-
- return false;
-}
-
-// =======================================================================
-
SystemFontList::SystemFontList()
{
}
@@ -220,6 +46,9 @@ SystemFontList::~SystemFontList()
void SystemFontList::AnnounceFonts( ImplDevFontList& rFontList ) const
{
+ (void) rFontList;
+
+ // Implement...
}
// not all fonts are suitable for glyph fallback => sort them
diff --git a/vcl/ios/source/gdi/salcoretextlayout.cxx b/vcl/ios/source/gdi/salcoretextlayout.cxx
index 461bb9c4645f..3ff4c07a4b99 100644
--- a/vcl/ios/source/gdi/salcoretextlayout.cxx
+++ b/vcl/ios/source/gdi/salcoretextlayout.cxx
@@ -130,7 +130,9 @@ CoreTextLayout::CoreTextLayout( CTFontSymbolicTraits& rCoreTextStyle, float fFon
mpDeltaY( NULL ),
mpFallbackInfo( NULL ),
mnBaseAdv( 0 )
-{}
+{
+ (void) rCoreTextStyle;
+}
// -----------------------------------------------------------------------
@@ -150,23 +152,33 @@ CoreTextLayout::~CoreTextLayout()
bool CoreTextLayout::LayoutText( ImplLayoutArgs& rArgs )
{
+ (void) rArgs;
// Implement...
return true;
}
void CoreTextLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
+ (void) rArgs;
// Implement...
}
void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
{
+ (void) rGraphics;
// Implement...
}
int CoreTextLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int& nStart,
sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
{
+ (void) nLen;
+ (void) pGlyphIDs;
+ (void) rPos;
+ (void) nStart;
+ (void) pGlyphAdvances;
+ (void) pCharIndexes;
+
if( nStart < 0 ) // first glyph requested?
nStart = 0;
@@ -195,20 +207,30 @@ long CoreTextLayout::FillDXArray( long* pDXArray ) const
int CoreTextLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
{
+ (void) nMaxWidth;
+ (void) nCharExtra;
+ (void) nFactor;
+ // Implement...
return 0;
}
void CoreTextLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
{
+ (void) nMaxIndex;
+ (void) pCaretXArray;
+ // Implement...
}
bool CoreTextLayout::GetBoundRect( SalGraphics&, Rectangle& rVCLRect ) const
{
+ (void) rVCLRect;
+ // Implement;
return true;
}
bool CoreTextLayout::InitGIA( ImplLayoutArgs* pArgs ) const
{
+ (void) pArgs;
// no need to run InitGIA more than once on the same CoreTextLayout object
if( mnGlyphCount >= 0 )
return true;
@@ -280,6 +302,8 @@ const ImplFontData* CoreTextLayout::GetFallbackFontData( sal_GlyphId nGlyphId )
int FallbackInfo::AddFallback( CTFontRef nFontId )
{
+ (void) nFontId;
+ // Implement...
return 0;
}
diff --git a/vcl/ios/source/gdi/salnativewidgets.cxx b/vcl/ios/source/gdi/salnativewidgets.cxx
index 23d8b8d4589e..c2d5068a2c8b 100644
--- a/vcl/ios/source/gdi/salnativewidgets.cxx
+++ b/vcl/ios/source/gdi/salnativewidgets.cxx
@@ -186,16 +186,23 @@ sal_Bool IosSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar
sal_Bool IosSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
const Point& rPos, sal_Bool& rIsInside )
{
+ (void) nType;
+ (void) nPart;
+ (void) rControlRegion;
+ (void) rPos;
+ (void) rIsInside;
return sal_False;
}
UInt32 IosSalGraphics::getState( ControlState nState )
{
+ (void) nState;
return 0;
}
UInt32 IosSalGraphics::getTrackState( ControlState nState )
{
+ (void) nState;
return 0;
}
@@ -215,6 +222,11 @@ sal_Bool IosSalGraphics::drawNativeControl(ControlType nType,
const ImplControlValue& aValue,
const rtl::OUString& )
{
+ (void) nType;
+ (void) nPart;
+ (void) rControlRegion;
+ (void) nState;
+ (void) aValue;
return sal_False;
}
@@ -236,6 +248,12 @@ sal_Bool IosSalGraphics::getNativeControlRegion( ControlType nType, ControlPart
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
{
+ (void) nType;
+ (void) nPart;
+ (void) rControlRegion;
+ (void) aValue;
+ (void) rNativeBoundingRegion;
+ (void) rNativeContentRegion;
return sal_False;
}
diff --git a/vcl/ios/source/window/salframeview.mm b/vcl/ios/source/window/salframeview.mm
index 68c34a9fbd8e..e92f1c2facf3 100644
--- a/vcl/ios/source/window/salframeview.mm
+++ b/vcl/ios/source/window/salframeview.mm
@@ -44,9 +44,9 @@
-(id)initWithSalFrame: (IosSalFrame*)pFrame
{
mpFrame = pFrame;
+#if 0
CGRect aRect = { { pFrame->maGeometry.nX, pFrame->maGeometry.nY },
{ pFrame->maGeometry.nWidth, pFrame->maGeometry.nHeight } };
-#if 0
NSWindow* pNSWindow = [super initWithContentRect: aRect styleMask: mpFrame->getStyleMask() backing: NSBackingStoreBuffered defer: NO ];
[pNSWindow useOptimizedDrawing: YES]; // OSX recommendation when there are no overlapping subviews within the receiver
return pNSWindow;
@@ -67,7 +67,7 @@
if( pMutex )
{
pMutex->acquire();
- [super displayIfNeeded];
+ // ??? [super displayIfNeeded];
pMutex->release();
}
}
@@ -85,7 +85,8 @@
return YES;
if( (mpFrame->mnStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
return YES;
- return [super canBecomeKeyWindow];
+ // ??? return [super canBecomeKeyWindow];
+ return NO;
}
-(void)windowDidBecomeKey: (NSNotification*)pNotification
@@ -95,10 +96,11 @@
if( mpFrame && IosSalFrame::isAlive( mpFrame ) )
{
+#if 0
static const sal_uLong nGuessDocument = SAL_FRAME_STYLE_MOVEABLE|
SAL_FRAME_STYLE_SIZEABLE|
SAL_FRAME_STYLE_CLOSEABLE;
-
+#endif
mpFrame->CallCallback( SALEVENT_GETFOCUS, 0 );
mpFrame->SendPaintEvent(); // repaint controls as active
}
@@ -204,6 +206,7 @@
{
// ???
+ (void) pFrame;
mfLastMagnifyTime = 0.0;
return self;
}
@@ -257,8 +260,9 @@ private:
if( mpFrame->mpGraphics )
{
mpFrame->mpGraphics->UpdateWindow( aRect );
- if( mpFrame->getClipPath() )
- [mpFrame->getWindow() invalidateShadow];
+ if( mpFrame->getClipPath() ) {
+ // ??? [mpFrame->getWindow() invalidateShadow];
+ }
}
}
}