22#include <com/sun/star/util/DateTime.hpp>
23#include <com/sun/star/sdbc/DataType.hpp>
28#include <Carbon/Carbon.h>
29#include <AddressBook/ABAddressBookC.h>
43 if (
nullptr == sOrig) {
48 CFIndex nStringLength = CFStringGetLength(sOrig);
50 UniChar unichars[nStringLength+1];
53 unichars[nStringLength] =
'\0';
55 CFStringGetCharacters (sOrig, CFRangeMake(0,nStringLength), unichars);
58 return OUString(
reinterpret_cast<sal_Unicode *
>(unichars));
69 CFStringRef ref = CFStringCreateWithCharacters(kCFAllocatorDefault,
reinterpret_cast<UniChar
const *
>(aString.getStr()), aString.getLength());
83 css::util::DateTime nRet;
84 double timeSince2001 = CFDateGetAbsoluteTime(_cfDate);
85 time_t unixtime = timeSince2001+kCFAbsoluteTimeIntervalSince1970;
86 struct tm *ptm = localtime(&unixtime);
87 nRet.Year = ptm->tm_year+1900;
88 nRet.Month = ptm->tm_mon+1;
89 nRet.Day = ptm->tm_mday;
90 nRet.Hours = ptm->tm_hour;
91 nRet.Minutes = ptm->tm_min;
92 nRet.Seconds = ptm->tm_sec;
98 inline OUString
fixLabel(
const OUString& _originalLabel)
103 if(_originalLabel.startsWith(
"_$!<"))
105 return _originalLabel.copy(4,_originalLabel.getLength()-8);
108 return _originalLabel;
117 case kABStringProperty:
118 dataType = css::sdbc::DataType::CHAR;
120 case kABDateProperty:
121 dataType = css::sdbc::DataType::TIMESTAMP;
123 case kABIntegerProperty:
124 dataType = css::sdbc::DataType::INTEGER;
126 case kABRealProperty:
127 dataType = css::sdbc::DataType::FLOAT;
OUString fixLabel(const OUString &_originalLabel)
sal_Int32 ABTypeToDataType(const ABPropertyType _abType)
CFStringRef OUStringToCFString(const OUString &aString)
void impl_throwError(TranslateId pErrorId)
css::util::DateTime CFDateToDateTime(const CFDateRef _cfDate)
OUString CFStringToOUString(const CFStringRef sOrig)
TransliterationModules tm