summaryrefslogtreecommitdiff
path: root/forms/source/component/Columns.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/Columns.cxx')
-rw-r--r--forms/source/component/Columns.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 24a431aca5d5..42de375a20b9 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -63,10 +63,10 @@ const sal_uInt16 COMPATIBLE_HIDDEN = 0x0008;
const css::uno::Sequence<OUString>& getColumnTypes()
{
- static css::uno::Sequence<OUString> aColumnTypes(10);
- if (aColumnTypes.getConstArray()[0].isEmpty())
+ static css::uno::Sequence<OUString> aColumnTypes = [&]()
{
- OUString* pNames = aColumnTypes.getArray();
+ css::uno::Sequence<OUString> tmp(10);
+ OUString* pNames = tmp.getArray();
pNames[TYPE_CHECKBOX] = "CheckBox";
pNames[TYPE_COMBOBOX] = "ComboBox";
pNames[TYPE_CURRENCYFIELD] = "CurrencyField";
@@ -77,7 +77,8 @@ const css::uno::Sequence<OUString>& getColumnTypes()
pNames[TYPE_PATTERNFIELD] = "PatternField";
pNames[TYPE_TEXTFIELD] = "TextField";
pNames[TYPE_TIMEFIELD] = "TimeField";
- }
+ return tmp;
+ }();
return aColumnTypes;
}