Skip to content

Commit

Permalink
Cleaned up project after rearranging Test and Externals #643
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Oct 1, 2013
1 parent 7cd1223 commit d232dfc
Show file tree
Hide file tree
Showing 67 changed files with 78 additions and 258 deletions.
18 changes: 16 additions & 2 deletions Core/Source/DTAttributedTextCell.m
Expand Up @@ -10,6 +10,7 @@
#import "DTAttributedTextCell.h"
#import "DTCSSStylesheet.h"
#import "DTVersion.h"
#import "DTLog.h"

@implementation DTAttributedTextCell
{
Expand Down Expand Up @@ -123,7 +124,7 @@ - (CGFloat)requiredRowHeightInTableView:(UITableView *)tableView
{
if (_hasFixedRowHeight)
{
NSLog(@"Warning: you are calling %s even though the cell is configured with fixed row height", (const char *)__PRETTY_FUNCTION__);
DTLogWarning(@"You are calling %s even though the cell is configured with fixed row height", (const char *)__PRETTY_FUNCTION__);
}

BOOL ios6Style = [DTVersion osVersionIsLessThen:@"7.0"];
Expand All @@ -140,28 +141,41 @@ - (CGFloat)requiredRowHeightInTableView:(UITableView *)tableView
switch (self.accessoryType)
{
case UITableViewCellAccessoryDisclosureIndicator:
{
contentWidth -= ios6Style ? 20.0f : 10.0f + 8.0f + 15.0f;
break;
}

case UITableViewCellAccessoryCheckmark:
{
contentWidth -= ios6Style ? 20.0f : 10.0f + 14.0f + 15.0f;
break;
}

case UITableViewCellAccessoryDetailDisclosureButton:
{
contentWidth -= ios6Style ? 33.0f : 10.0f + 42.0f + 15.0f;
break;
}

#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
case UITableViewCellAccessoryDetailButton:
{
contentWidth -= 10.0f + 22.0f + 15.0f;
break;
}
#endif

case UITableViewCellAccessoryNone:
{
break;
}

default:
NSLog(@"Warning: accessoryType %d not implemented on %@", self.accessoryType, NSStringFromClass([self class]));
{
DTLogWarning(@"AccessoryType %d not implemented on %@", self.accessoryType, NSStringFromClass([self class]));
break;
}
}

CGSize neededSize = [self.attributedTextContextView suggestedFrameSizeToFitEntireStringConstraintedToWidth:contentWidth];
Expand Down
3 changes: 2 additions & 1 deletion Core/Source/DTCoreTextGlyphRun.m
Expand Up @@ -14,6 +14,7 @@
#import "DTCoreTextFunctions.h"
#import "NSDictionary+DTCoreText.h"
#import "DTWeakSupport.h"
#import "DTLog.h"

@interface DTCoreTextGlyphRun ()

Expand Down Expand Up @@ -247,7 +248,7 @@ - (CGPathRef)newPathWithGlyphs

if (!font)
{
NSLog(@"CTFont missing on %@", self);
DTLogError(@"CTFont missing on %@", self);
return NULL;
}

Expand Down
6 changes: 2 additions & 4 deletions Core/Source/DTCoreTextLayoutFrame.m
Expand Up @@ -11,6 +11,7 @@
#import "DTCoreTextLayoutFrame.h"
#import "DTVersion.h"
#import "NSDictionary+DTCoreText.h"
#import "DTLog.h"

// global flag that shows debug frames
static BOOL _DTCoreTextLayoutFramesShouldDrawDebugFrames = NO;
Expand Down Expand Up @@ -391,8 +392,7 @@ - (CGPoint)baselineOriginToPositionLine:(DTCoreTextLayoutLine *)line afterLine:(
{
return [self _algorithmLegacy_BaselineOriginToPositionLine:line afterLine:previousLine];
}

NSLog(@"Invalid Option for %s", __PRETTY_FUNCTION__);

return CGPointZero;
}

Expand Down Expand Up @@ -765,8 +765,6 @@ - (void)_buildLinesWithStandardFramesetter

[tmpLines addObject:newLine];

NSLog(@"%d: %f %f %f, %@", lineIndex+1, newLine.leading, newLine.ascent, newLine.descent, NSStringFromCGPoint(newLine.baselineOrigin));

lineIndex++;
}
free(origins);
Expand Down
8 changes: 5 additions & 3 deletions Core/Source/DTHTMLAttributedStringBuilder.m
Expand Up @@ -16,6 +16,7 @@

#import "DTVersion.h"
#import "NSString+DTFormatNumbers.h"
#import "DTLog.h"

@interface DTHTMLAttributedStringBuilder ()

Expand Down Expand Up @@ -324,7 +325,7 @@ - (BOOL)_buildString
CFAbsoluteTime endTime = CFAbsoluteTimeGetCurrent();

// output metrics
NSLog(@"DTCoreText created string from %@ HTML in %.2f sec", [NSString stringByFormattingBytes:[_data length]], endTime-startTime);
DTLogInfo((@"DTCoreText created string from %@ HTML in %.2f sec", [NSString stringByFormattingBytes:[_data length]], endTime-startTime);
#endif

return result;
Expand Down Expand Up @@ -641,8 +642,9 @@ - (void)_registerTagEndHandlers
[_globalStyleSheet mergeStylesheet:localSheet];
}
}
else {
NSLog(@"WARNING: css link referencing a non-local target, ignored");
else
{
DTLogWarning(@"CSS link referencing a non-local target, ignored");
}
}
};
Expand Down
5 changes: 3 additions & 2 deletions Core/Source/DTHTMLElement.m
Expand Up @@ -17,6 +17,7 @@
#import "DTTextHTMLElement.h"
#import "NSString+DTUtilities.h"
#import "DTColorFunctions.h"
#import "DTLog.h"

@interface DTHTMLElement ()

Expand Down Expand Up @@ -971,11 +972,11 @@ - (void)applyStyleDictionary:(NSDictionary *)styles
}
else if ([decoration isEqualToString:@"overline"])
{
NSLog(@"Note: 'overline' text decoration not supported");
DTLogInfo(@"Note: 'overline' text decoration not supported");
}
else if ([decoration isEqualToString:@"blink"])
{
NSLog(@"Note: 'blink' text decoration not supported");
DTLogInfo(@"Note: 'blink' text decoration not supported");
}
else if ([decoration isEqualToString:@"inherit"])
{
Expand Down
4 changes: 2 additions & 2 deletions Core/Source/DTLazyImageView.m
Expand Up @@ -8,6 +8,7 @@

#import <ImageIO/ImageIO.h>
#import "DTLazyImageView.h"
#import "DTLog.h"

static NSCache *_imageCache = nil;

Expand Down Expand Up @@ -213,10 +214,9 @@ - (void)completeDownloadWithData:(NSData *)data
}
else
{
NSLog(@"Warning, %@ did not get an image for %@", NSStringFromClass([self class]), [_url absoluteString]);
DTLogWarning(@"Warning, %@ did not get an image for %@", NSStringFromClass([self class]), [_url absoluteString]);
}
}

}

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
Expand Down
3 changes: 2 additions & 1 deletion Core/Source/DTTextAttachment.m
Expand Up @@ -16,6 +16,7 @@
#import "DTImageTextAttachment.h"
#import "DTObjectTextAttachment.h"
#import "DTVideoTextAttachment.h"
#import "DTLog.h"

static NSMutableDictionary *_classForTagNameLookup = nil;

Expand Down Expand Up @@ -162,7 +163,7 @@ + (void)registerClass:(Class)class forTagName:(NSString *)tagName

if (previousClass)
{
NSLog(@"Warning: replacing previously registered class '%@' for tag name '%@' with '%@'", NSStringFromClass(previousClass), tagName, NSStringFromClass(class));
DTLogWarning(@"Replacing previously registered class '%@' for tag name '%@' with '%@'", NSStringFromClass(previousClass), tagName, NSStringFromClass(class));
}

[_classForTagNameLookup setObject:class forKey:tagName];
Expand Down
15 changes: 0 additions & 15 deletions Core/Test/Source/NSString+SlashEscaping.h

This file was deleted.

121 changes: 0 additions & 121 deletions Core/Test/Source/NSString+SlashEscaping.m

This file was deleted.

0 comments on commit d232dfc

Please sign in to comment.