summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/macab/macabutilities.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/macab/macabutilities.hxx')
-rw-r--r--connectivity/source/drivers/macab/macabutilities.hxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx
index d0027c8da6ed..7e0f6b091085 100644
--- a/connectivity/source/drivers/macab/macabutilities.hxx
+++ b/connectivity/source/drivers/macab/macabutilities.hxx
@@ -17,11 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MACAB_MACABUTILITIES_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MACAB_MACABUTILITIES_HXX
+#pragma once
+
+#include <sal/config.h>
+
+#include <memory>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <unotools/resmgr.hxx>
#include <time.h>
#include <premac.h>
@@ -47,15 +51,15 @@ namespace connectivity::macab
CFRetain(sOrig);
CFIndex nStringLength = CFStringGetLength(sOrig);
- UniChar unichars[nStringLength+1];
+ auto const unichars = std::make_unique<UniChar[]>(nStringLength+1);
//'close' the string buffer correctly
unichars[nStringLength] = '\0';
- CFStringGetCharacters (sOrig, CFRangeMake(0,nStringLength), unichars);
+ CFStringGetCharacters (sOrig, CFRangeMake(0,nStringLength), unichars.get());
CFRelease(sOrig);
- return OUString(reinterpret_cast<sal_Unicode *>(unichars));
+ return OUString(reinterpret_cast<sal_Unicode *>(unichars.get()));
}
@@ -132,9 +136,7 @@ namespace connectivity::macab
return dataType;
}
- void impl_throwError(const char* pErrorId);
+ void impl_throwError(TranslateId pErrorId);
}
-#endif // _ CONNECTIVITY_MACAB_UTILITIES_HXX_
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */