Hello
I think it's bug of Numbers. As far as I have tested, Numbers erases existing cell contents as reported when pasting hyperlink in clipboard which is represented by data of types public.url and public.url-name. It is the case when link is copied by, e.g., Safari or TextEdit. Meanwhile, link represented by data of type public.html is pasted properly without destroying existing contents. It is the case when link is copied by, e.g., Firefox.
A workaround is to convert link representation in clipboard. You may try running the following AppleScript script before pasting the link in Numbers cell. It is a simple wrapper of RubyCocoa code which converts link representation in clipboard. You may invoke it from script menu when saved as compiled script in ~/Library/Scripts/Applications/Numbers directory or service menu when saved as Automator service in ~/Library/Services directory.
Tested with Numbers 2.0.5 under 10.6.5.
Hope this may help,
H
do shell script "/usr/bin/ruby <<'EOF'
#
# convert [public.url + public.url-name] to [public.html] in clipboard
#
# * To represent hyperlink data in clipboard,
# [public.url + public.url-name] is used by Safari, TextEdit etc, and
# [public.html] is used by Firefox.
#
require 'osx/cocoa'
include OSX
pboard = NSPasteboard.generalPasteboard
pbtype = pboard.availableTypeFromArray(['public.url'])
exit if pbtype == nil
urldata = pboard.dataForType(pbtype)
url = NSString.alloc.objc_send(
:initWithData, urldata,
:encoding, NSUTF8StringEncoding)
pbtype = pboard.availableTypeFromArray(['public.url-name'])
urlndata = pbtype ? pboard.dataForType(pbtype) : urldata
urln = NSString.alloc.objc_send(
:initWithData, urlndata,
:encoding, NSUTF8StringEncoding)
html = <<EOT
<html>
<head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"></head>
<body><a href=\"#{url}\">#{urln}</a></body>
</html>
EOT
htmldata = html.to_ns.dataUsingEncoding(NSUTF8StringEncoding)
pbtype = 'public.html'
pboard.objc_send(
:declareTypes, [pbtype],
:owner, nil)
pboard.objc_send(
:setData, htmldata,
:forType, pbtype)
EOF"