diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-19 11:47:43 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-19 13:19:56 +0100 |
commit | e8c0a29797250fd54eb41a4399f1fda39ef25647 (patch) | |
tree | d3a9ef40f4d213714e7f877203c01ebd2eccac6e /svx/source | |
parent | e8a68c1f50f32a0f9d8bcdf16c1270c319910baa (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/source')
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 11 |
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; |