configure.in | 3 ios/qa/sc/Makefile | 18 - ios/qa/sc/filters-test.m | 15 ios/qa/sc/lo-qa-sc-filters-test-Info.plist | 45 ++ ios/qa/sc/lo-qa-sc-filters-test.xcodeproj/project.pbxproj | 216 ++++++++++++++ solenv/bin/image-sort.pl | 116 ++++--- 6 files changed, 351 insertions(+), 62 deletions(-)
New commits: commit 5afda5fcdf191e1144a2cad614c8307bf5850ce0 Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 19:02:16 2012 +0200 Pass parameters to cppunittester's lo_main() diff --git a/ios/qa/sc/filters-test.m b/ios/qa/sc/filters-test.m index 5621f34..88de28a 100644 --- a/ios/qa/sc/filters-test.m +++ b/ios/qa/sc/filters-test.m @@ -35,7 +35,7 @@ extern "C" { extern CppUnitTestPlugIn *cppunitTestPlugIn(void); - extern int lo_main(int argc, char **argv); + extern int lo_main(int argc, const char **argv); } int @@ -70,9 +70,16 @@ didFinishLaunchingWithOptions: (NSDictionary *) launchOptions CppUnitTestPlugIn *iface = cppunitTestPlugIn(); iface->initialize(&CppUnit::TestFactoryRegistry::getRegistry(), CppUnit::PlugInParameters()); - // Temporarily until we actualy get this to link, then - // add actual args needed by cppunittester - lo_main(0, NULL); + const char *argv[] = { + "lo-qa-sc-filters-test", + "dummy-testlib", + "--headless", + "--protector", + "dummy-libunoexceptionprotector", + "dummy-unoexceptionprotector" + }; + + lo_main(sizeof(argv)/sizeof(*argv), argv); [self.window makeKeyAndVisible]; return YES; commit d4cd853edd3744a4569bd5a23fd461394837e5c7 Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 16:17:30 2012 +0200 Add Xcode project diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile index 2081346..1300785 100644 --- a/ios/qa/sc/Makefile +++ b/ios/qa/sc/Makefile @@ -1,8 +1,21 @@ include ../../../config_host.mk +APP=lo-qa-sc-filters-test + +# If run from Xcode, check the CURRENT_ARCH env var for which platform we are +# building, device or simulator + +ifeq ($(CURRENT_ARCH),i386) +PLATFORM=iphonesimulator +else +PLATFORM=iphoneos +endif + +APPDIR=build/Debug-$(PLATFORM)/$(APP).app + # Stuff lifted from solenv/gbuild/platform/IOS_ARM_GCC.mk -gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 +gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -g gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS) gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS) @@ -13,9 +26,6 @@ gb_Library__FRAMEWORKS := \ CoreText \ UIKit \ -APP=lo-qa-sc-filters-test -APPDIR=$(APP).app - SRCS = filters-test.m CFLAGS = $(SOLARINC) diff --git a/ios/qa/sc/lo-qa-sc-filters-test-Info.plist b/ios/qa/sc/lo-qa-sc-filters-test-Info.plist new file mode 100644 index 0000000..61b7fd1 --- /dev/null +++ b/ios/qa/sc/lo-qa-sc-filters-test-Info.plist @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>org.libreoffice.${PRODUCT_NAME:rfc1034identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>armv7</string> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> +</dict> +</plist> diff --git a/ios/qa/sc/lo-qa-sc-filters-test.xcodeproj/project.pbxproj b/ios/qa/sc/lo-qa-sc-filters-test.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ccada1f --- /dev/null +++ b/ios/qa/sc/lo-qa-sc-filters-test.xcodeproj/project.pbxproj @@ -0,0 +1,216 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXFileReference section */ + BEA648A215062FE6004B2E1C /* lo-qa-sc-filters-test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "lo-qa-sc-filters-test.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + BEA648A615062FE6004B2E1C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + BEA648A815062FE6004B2E1C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + BEA648AA15062FE6004B2E1C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + BEA648AE15062FE6004B2E1C /* lo-qa-sc-filters-test-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "lo-qa-sc-filters-test-Info.plist"; sourceTree = SOURCE_ROOT; }; + BEA648BD1506312A004B2E1C /* filters-test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "filters-test.m"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + BEA6489715062FE6004B2E1C = { + isa = PBXGroup; + children = ( + BEA648AC15062FE6004B2E1C /* lo-qa-sc-filters-test */, + BEA648A515062FE6004B2E1C /* Frameworks */, + BEA648A315062FE6004B2E1C /* Products */, + ); + sourceTree = "<group>"; + }; + BEA648A315062FE6004B2E1C /* Products */ = { + isa = PBXGroup; + children = ( + BEA648A215062FE6004B2E1C /* lo-qa-sc-filters-test.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + BEA648A515062FE6004B2E1C /* Frameworks */ = { + isa = PBXGroup; + children = ( + BEA648A615062FE6004B2E1C /* UIKit.framework */, + BEA648A815062FE6004B2E1C /* Foundation.framework */, + BEA648AA15062FE6004B2E1C /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; + BEA648AC15062FE6004B2E1C /* lo-qa-sc-filters-test */ = { + isa = PBXGroup; + children = ( + BEA648BD1506312A004B2E1C /* filters-test.m */, + BEA648AE15062FE6004B2E1C /* lo-qa-sc-filters-test-Info.plist */, + ); + path = "lo-qa-sc-filters-test"; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + BEA648A115062FE6004B2E1C /* lo-qa-sc-filters-test */ = { + isa = PBXNativeTarget; + buildConfigurationList = BEA648BA15062FE6004B2E1C /* Build configuration list for PBXNativeTarget "lo-qa-sc-filters-test" */; + buildPhases = ( + BEA648D01506398A004B2E1C /* ShellScript */, + BEA648A015062FE6004B2E1C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "lo-qa-sc-filters-test"; + productName = "lo-qa-sc-filters-test"; + productReference = BEA648A215062FE6004B2E1C /* lo-qa-sc-filters-test.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BEA6489915062FE6004B2E1C /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = LO; + LastUpgradeCheck = 0430; + }; + buildConfigurationList = BEA6489C15062FE6004B2E1C /* Build configuration list for PBXProject "lo-qa-sc-filters-test" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = BEA6489715062FE6004B2E1C; + productRefGroup = BEA648A315062FE6004B2E1C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BEA648A115062FE6004B2E1C /* lo-qa-sc-filters-test */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BEA648A015062FE6004B2E1C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + BEA648D01506398A004B2E1C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/opt/lo/bin/make\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + BEA648B815062FE6004B2E1C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + BEA648B915062FE6004B2E1C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + BEA648BB15062FE6004B2E1C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "lo-qa-sc-filters-test-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + BEA648BC15062FE6004B2E1C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "lo-qa-sc-filters-test-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BEA6489C15062FE6004B2E1C /* Build configuration list for PBXProject "lo-qa-sc-filters-test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BEA648B815062FE6004B2E1C /* Debug */, + BEA648B915062FE6004B2E1C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BEA648BA15062FE6004B2E1C /* Build configuration list for PBXNativeTarget "lo-qa-sc-filters-test" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BEA648BB15062FE6004B2E1C /* Debug */, + BEA648BC15062FE6004B2E1C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BEA6489915062FE6004B2E1C /* Project object */; +} commit 1f41d7b024e3964c66ad2a8034be57e156c6f5ce Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 10:17:26 2012 +0200 Cosmetics: Format code consistently diff --git a/solenv/bin/image-sort.pl b/solenv/bin/image-sort.pl index e02248c..86a1cb8 100755 --- a/solenv/bin/image-sort.pl +++ b/solenv/bin/image-sort.pl @@ -15,8 +15,8 @@ sub read_icons($) } open ($fileh, "$base_path/$fname") || die "Can't open $base_path/$fname: $!"; while (<$fileh>) { - m/xlink:href=\"\.uno:(\S+)\"\s+/ || next; - push @images, lc($1); + m/xlink:href=\"\.uno:(\S+)\"\s+/ || next; + push @images, lc($1); } close ($fileh); @@ -32,12 +32,12 @@ sub read_new_icons($$) my @new_icons; my %new_icons; for my $icon (@images) { - my $iname = "cmd/" . $prefix . $icon . ".png"; - if (!defined $global_hash{$iname} && - !defined $new_icons{$iname}) { - push @new_icons, $iname; - $new_icons{$iname} = 1; - } + my $iname = "cmd/" . $prefix . $icon . ".png"; + if (!defined $global_hash{$iname} && + !defined $new_icons{$iname}) { + push @new_icons, $iname; + $new_icons{$iname} = 1; + } } return @new_icons; } @@ -51,22 +51,22 @@ sub process_group($@) # a very noddy sorting algorithm for my $uiconfig (@uiconfigs) { - my @images = read_new_icons ($uiconfig, $prefix); - my $prev = ''; - for my $icon (@images) { - if (!defined $group{$icon}) { - if (!defined $group{$prev}) { - $group{$icon} = $cur_max; - $cur_max += 1.0; - } else { - $group{$icon} = $group{$prev} + (1.0 - 0.5 / $cur_max); + my @images = read_new_icons ($uiconfig, $prefix); + my $prev = ''; + for my $icon (@images) { + if (!defined $group{$icon}) { + if (!defined $group{$prev}) { + $group{$icon} = $cur_max; + $cur_max += 1.0; + } else { + $group{$icon} = $group{$prev} + (1.0 - 0.5 / $cur_max); + } + } # else a duplicate } - } # else a duplicate - } } for my $icon (sort { $group{$a} <=> $group{$b} } keys %group) { - push @global_list, $icon; - $global_hash{$icon} = 1; + push @global_list, $icon; + $global_hash{$icon} = 1; } } @@ -75,8 +75,8 @@ sub process_file($$) my @images = read_new_icons (shift, shift); for my $icon (@images) { - push @global_list, $icon; - $global_hash{$icon} = 1; + push @global_list, $icon; + $global_hash{$icon} = 1; } } @@ -87,37 +87,43 @@ sub chew_controlfile($) my @list; open ($fileh, $fname) || die "Can't open $fname: $!"; while (<$fileh>) { - /^\#/ && next; - s/[\r\n]*$//; - /^\s*$/ && next; - - my $line = $_; - if ($line =~ s/^-- (\S+)\s*//) { - # control code - my $code = $1; - my $small = (lc ($line) eq 'small'); - if (lc($code) eq 'group') { - if (!$small) { process_group ("lc_", @list); } - process_group ("sc_", @list); - } elsif (lc ($code) eq 'ordered') { - if (!$small) { - for my $file (@list) { process_file ($file, "lc_"); } - } - for my $file (@list) { process_file ($file, "sc_"); } - } elsif (lc ($code) eq 'literal') { - for my $file (@list) { - if (!defined $global_hash{$file}) { - push @global_list, $file; - $global_hash{$file} = 1; + /^\#/ && next; + s/[\r\n]*$//; + /^\s*$/ && next; + + my $line = $_; + if ($line =~ s/^-- (\S+)\s*//) { + # control code + my $code = $1; + my $small = (lc ($line) eq 'small'); + if (lc($code) eq 'group') { + if (!$small) { + process_group ("lc_", @list); + } + process_group ("sc_", @list); + } elsif (lc ($code) eq 'ordered') { + if (!$small) { + for my $file (@list) { + process_file ($file, "lc_"); + } + } + for my $file (@list) { + process_file ($file, "sc_"); + } + } elsif (lc ($code) eq 'literal') { + for my $file (@list) { + if (!defined $global_hash{$file}) { + push @global_list, $file; + $global_hash{$file} = 1; + } + } + } else { + die ("Unknown code '$code'"); } - } + @list = (); } else { - die ("Unknown code '$code'"); + push @list, $line; } - @list = (); - } else { - push @list, $line; - } } close ($fileh); } commit 40978924953fb2acea522fa2011182a795e65d4c Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 10:13:09 2012 +0200 Add Emacs and vim mode lines diff --git a/solenv/bin/image-sort.pl b/solenv/bin/image-sort.pl index 01f0b5e..e02248c 100755 --- a/solenv/bin/image-sort.pl +++ b/solenv/bin/image-sort.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w # -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil -*- my @global_list = (); my %global_hash = (); @@ -151,3 +151,5 @@ for my $icon (@global_list) { } close $output if (!$stdout_out); + +# dnl vim:set shiftwidth=4 softtabstop=4 expandtab: commit 7c83312ccdd07541efde3f16c090fa59c8b73bf0 Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 10:11:36 2012 +0200 Just skip non-existent files diff --git a/solenv/bin/image-sort.pl b/solenv/bin/image-sort.pl index e4fd849..01f0b5e 100755 --- a/solenv/bin/image-sort.pl +++ b/solenv/bin/image-sort.pl @@ -9,6 +9,10 @@ sub read_icons($) my $fname = shift; my $fileh; my @images; + if (! -e "$base_path/$fname") { + print "Skipping non-existent $base_path/$fname\n"; + return @images; + } open ($fileh, "$base_path/$fname") || die "Can't open $base_path/$fname: $!"; while (<$fileh>) { m/xlink:href=\"\.uno:(\S+)\"\s+/ || next; commit 41daea641b836370ef009182ac1e0013d76576ae Author: Tor Lillqvist <t...@iki.fi> Date: Tue Mar 6 10:01:43 2012 +0200 Make Emacs mode line consistent with the vim one diff --git a/configure.in b/configure.in index f6a2367..ad50261 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl -*- Mode: Autoconf; tab-width: 8; indent-tabs-mode: nil -*- +dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil -*- dnl configure.in serves as input for the GNU autoconf package dnl in order to create a configure script. @@ -11124,5 +11124,4 @@ for details _EOF - dnl vim:set shiftwidth=4 softtabstop=4 expandtab: _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits