Skip to content

Commit

Permalink
Merge branch 'release-1.6.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Jul 4, 2015
2 parents 7e53685 + 3f60e50 commit 5ed2b4b
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 55 deletions.
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
---
language: objective-c

before_install:
- brew update
- brew upgrade xctool

install:
- sudo easy_install cpp-coveralls

script:
- xctool -project DTCoreText.xcodeproj -scheme DemoApp build test -sdk iphonesimulator -arch i386 ONLY_ACTIVE_ARCH=NO
- xctool -project DTCoreText.xcodeproj -scheme "Mac Framework" test -arch x86_64 ONLY_ACTIVE_ARCH=NO
- xctool -project DTCoreText.xcodeproj -scheme DemoApp build -sdk iphonesimulator -arch i386 ONLY_ACTIVE_ARCH=NO
- xctool -project DTCoreText.xcodeproj -scheme "DTCoreText (iOS)" test -sdk iphonesimulator
- xctool -project DTCoreText.xcodeproj -scheme "DTCoreText (Mac)" build test
- appledoc -o /tmp .

after_success:
Expand Down
2 changes: 1 addition & 1 deletion Core/Source/DTAnchorHTMLElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright (c) 2013 Drobnik.com. All rights reserved.
//

#import "DTAnchorHTMLElement.h"
#import "DTCompatibility.h"
#import "DTAnchorHTMLElement.h"
#import "DTColorFunctions.h"

@implementation DTAnchorHTMLElement
Expand Down
14 changes: 6 additions & 8 deletions Core/Source/DTCompatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@

#if TARGET_OS_IPHONE

#import <UIKit/UIKit.h>

// Compatibility Aliases
@compatibility_alias DTColor UIColor;
@compatibility_alias DTImage UIImage;
@compatibility_alias DTFont UIFont;
#define DTColor UIColor
#define DTImage UIImage
#define DTFont UIFont

// Edge Insets
#define DTEdgeInsets UIEdgeInsets
Expand Down Expand Up @@ -86,9 +84,9 @@
#if !TARGET_OS_IPHONE

// Compatibility Aliases
@compatibility_alias DTColor NSColor;
@compatibility_alias DTImage NSImage;
@compatibility_alias DTFont NSFont;
#define DTColor NSColor
#define DTImage NSImage
#define DTFont NSFont

// Edge Insets
#define DTEdgeInsets NSEdgeInsets
Expand Down
2 changes: 1 addition & 1 deletion Core/Source/DTCoreTextFontDescriptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Copyright 2011 Drobnik.com. All rights reserved.
//

#import "DTCompatibility.h"
#import "DTCoreTextFontDescriptor.h"
#import "DTCoreTextFontCollection.h"
#import "DTCompatibility.h"
#import "DTCoreTextConstants.h"

static NSCache *_fontCache = nil;
Expand Down
2 changes: 1 addition & 1 deletion Core/Source/DTHTMLElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
@class DTTextAttachment;
@class DTCSSListStyle;

#import "DTCompatibility.h"
#import "DTCoreTextConstants.h"
#import "DTHTMLParserNode.h"
#import "DTTextAttachment.h"
#import "DTCompatibility.h"

@class DTBreakHTMLElement;

Expand Down
2 changes: 1 addition & 1 deletion Core/Source/DTTextAttachment.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ + (void)registerClass:(Class)class forTagName:(NSString *)tagName

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

[_classForTagNameLookup setObject:class forKey:tagName];
Expand Down
2 changes: 1 addition & 1 deletion Core/Source/DTTextHTMLElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "DTCoreTextFontDescriptor.h"
#import "NSAttributedString+SmallCaps.h"

#if DTCORETEXT_SUPPORT_NS_ATTRIBUTES && TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
#import "UIFont+DTCoreText.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion Core/Source/NSAttributedString+DTCoreText.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#import "NSDictionary+DTCoreText.h"
#import "NSAttributedStringRunDelegates.h"

#if DTCORETEXT_SUPPORT_NS_ATTRIBUTES && __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_5_1
#if TARGET_OS_IPHONE
#import "UIFont+DTCoreText.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion Core/Source/NSCoder+DTCompatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (c) 2014 Drobnik.com. All rights reserved.
//

#import "DTCompatibility.h"
#import <DTCoreText/DTCoreText.h>

@interface NSCoder (DTCompatibility)

Expand Down
9 changes: 9 additions & 0 deletions Core/Source/NSMutableAttributedString+HTML.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@
// Copyright 2011 Drobnik.com. All rights reserved.
//

#import "DTCompatibility.h"

#import "NSMutableAttributedString+HTML.h"
#import "DTCoreTextFontDescriptor.h"
#import "DTCoreTextParagraphStyle.h"
#import "NSDictionary+DTCoreText.h"

#if TARGET_OS_IPHONE
#import "UIFont+DTCoreText.h"
#endif


@implementation NSMutableAttributedString (HTML)

Expand Down Expand Up @@ -135,6 +143,7 @@ - (void)appendEndOfParagraph
{
[appendAttributes setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];
}

}
else
#endif
Expand Down
2 changes: 2 additions & 0 deletions Core/Source/UIFont+DTCoreText.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright (c) 2012 Drobnik.com. All rights reserved.
//

#import <CoreText/CoreText.h>

/**
Methods to translate from `CTFont` to `UIFont`
*/
Expand Down
16 changes: 0 additions & 16 deletions DTCoreText.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@
A7949AA314CC5BDF00A8CCDE /* DTHTMLAttributedStringBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A7949A4614CAF58C00A8CCDE /* DTHTMLAttributedStringBuilder.m */; };
A7985E0D178ECD86005D40B2 /* DTHTMLWriterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A7985E0B178ECD86005D40B2 /* DTHTMLWriterTest.m */; };
A7985E1B178ECDE4005D40B2 /* NSAttributedString+HTML.m in Sources */ = {isa = PBXBuildFile; fileRef = A788C93B14863E8700E1AFD9 /* NSAttributedString+HTML.m */; };
A79BA6381B46A1FB0086C2F6 /* DTCoreText.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A79BA6201B46A1FB0086C2F6 /* DTCoreText.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
A79BA65B1B46A2290086C2F6 /* DTCoreText.h in Headers */ = {isa = PBXBuildFile; fileRef = A70B4C9E1486558200873A4A /* DTCoreText.h */; };
A79BA65C1B46A2300086C2F6 /* DTCompatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A672B91532F2D100920A18 /* DTCompatibility.h */; settings = {ATTRIBUTES = (Public, ); }; };
A79BA65D1B46A2300086C2F6 /* DTCompatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A672B91532F2D100920A18 /* DTCompatibility.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -1061,20 +1060,6 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
A79BA6591B46A1FB0086C2F6 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
A79BA6381B46A1FB0086C2F6 /* DTCoreText.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* RTDemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RTDemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -2323,7 +2308,6 @@
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
A79BA6591B46A1FB0086C2F6 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Coverage">
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,6 +39,15 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E2262DC51638331500BFDAD7"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (Mac)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand Down Expand Up @@ -67,6 +76,15 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E2262DC51638331500BFDAD7"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (Mac)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A79BA61F1B46A1FB0086C2F6"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (iOS)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A788CA671486456100E1AFD9"
BuildableName = "UnitTest.xctest"
BlueprintName = "UnitTest"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A79BA61F1B46A1FB0086C2F6"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (iOS)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A79BA61F1B46A1FB0086C2F6"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (iOS)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A79BA61F1B46A1FB0086C2F6"
BuildableName = "DTCoreText.framework"
BlueprintName = "DTCoreText (iOS)"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
10 changes: 0 additions & 10 deletions DTCoreText.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@
</Test>
</SkippedTests>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A79BA6291B46A1FB0086C2F6"
BuildableName = "DTCoreTextTests.xctest"
BlueprintName = "DTCoreTextTests"
ReferencedContainer = "container:DTCoreText.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
1 change: 0 additions & 1 deletion Test/MacUnitTest-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <XCTest/XCTest.h>
#import "DTCoreText.h"
#endif

#define CGSizeValue sizeValue
Expand Down
2 changes: 1 addition & 1 deletion Test/Source/DTCoreTextFontDescriptorTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright (c) 2013 Drobnik.com. All rights reserved.
//

#import <DTCoreText/DTCoreText.h>
#import "DTCoreTextTestCase.h"
#import "DTCoreTextFontDescriptor.h"

@interface DTCoreTextFontDescriptorTest : DTCoreTextTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion Test/Source/DTCoreTextParagraphStyleTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// Copyright (c) 2013 Drobnik.com. All rights reserved.
//

#import "DTCompatibility.h"
#import "DTCoreTextParagraphStyleTest.h"
#import "DTCoreTextParagraphStyle.h"

#import "DTCompatibility.h"

@interface DTCoreTextParagraphStyle ()

Expand Down
1 change: 1 addition & 0 deletions Test/Source/DTHTMLElementTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "DTHTMLElementTest.h"
#import <DTCoreText/DTCoreText.h>

@implementation DTHTMLElementTest

Expand Down
1 change: 1 addition & 0 deletions Test/Source/MacUnitTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "MacUnitTest.h"
#import "DTHTMLAttributedStringBuilder.h"
#import "NSObject+DTRuntime.h"
#import "NSString+HTML.h"

#define TESTCASE_FILE_EXTENSION @"html"
//#define ONLY_TEST_CURRENT 1
Expand Down
Loading

0 comments on commit 5ed2b4b

Please sign in to comment.