26#include <com/sun/star/sdbc/DataType.hpp>
35MacabHeader::MacabHeader(
const sal_Int32 _size,
macabfield **_fields)
39 fields = std::make_unique<macabfield *[]>(
size);
42 if(_fields[
i] ==
nullptr)
89 fields = std::make_unique<macabfield *[]>(
size);
107 sal_Int32 numToAdd = 0, numAdded = 0;
109 for(
i = 0;
i < rSize;
i++)
123 for(
i = 0;
i < rSize;
i++)
129 if(numAdded == numToAdd)
181 sorted[0] =
get(_start+1);
182 sorted[1] =
get(_start);
186 sorted[0] =
get(_start);
187 sorted[1] =
get(_start+1);
190 else if(_length == 1)
192 sorted[0] =
get(_start);
197 sal_Int32 halfLength = floor(_length/2);
198 sal_Int32 fp = 0, lp = 0;
203 for(
i = 0;
i < _length;
i++)
207 sorted[
i] = firstHalf[fp++];
210 for(
i++;
i < _length;
i++)
212 sorted[
i] = lastHalf[lp++];
219 sorted[
i] = lastHalf[lp++];
220 if(lp == _length - halfLength)
222 for(
i++;
i < _length;
i++)
224 sorted[
i] = firstHalf[fp++];
250 if(_field1 == _field2)
252 if(_field1 ==
nullptr)
254 if(_field2 ==
nullptr)
257 CFComparisonResult
result = CFStringCompare(
258 static_cast<CFStringRef
>(_field1->
value),
259 static_cast<CFStringRef
>(_field2->
value),
262 return static_cast<sal_Int32
>(
result);
321 return record->get(
id);
std::unique_ptr< macabfield *[]> fields
macabfield * get(const sal_Int32 i) const
sal_Int32 getSize() const
macabfield * copy(const sal_Int32 i) const
bool contains(const macabfield *_field) const
OUString CFStringToOUString(const CFStringRef sOrig)