summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-01-19 11:47:43 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-01-19 13:19:56 +0100
commite8c0a29797250fd54eb41a4399f1fda39ef25647 (patch)
treed3a9ef40f4d213714e7f877203c01ebd2eccac6e /svx
parente8a68c1f50f32a0f9d8bcdf16c1270c319910baa (diff)
initializeControlModel needs parent to be set
And thus it seems it expects to be called *after* insertion. Change-Id: I752dcd84c76c7beba75cd564162def5eaee7de4c
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 4418a4745f64..16a37bd1200a 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -533,6 +533,12 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
else
xCol->setPropertyValue(FM_PROP_LABEL, makeAny(sFieldName));
+ // jetzt einfuegen
+ Any aElement;
+ aElement <<= xCol;
+
+ xCols->insertByIndex(nPos, aElement);
+
FormControlFactory aControlFactory;
aControlFactory.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xCol );
aControlFactory.initializeFieldDependentProperties( xField, xCol, xNumberFormats );
@@ -567,11 +573,6 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
else
xCol->setPropertyValue(FM_PROP_NAME, makeAny(sFieldName));
- // jetzt einfuegen
- Any aElement;
- aElement <<= xCol;
- xCols->insertByIndex(nPos, aElement);
-
if (bDateNTimeCol)
{
aElement <<= xSecondCol;