summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-02-04 09:18:33 +0100
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-02-04 09:18:33 +0100
commit3b865735f967a4484d6bed9b5db1acc92e7bbea1 (patch)
tree2803e5c9c24c64f1350d16b7c9e9eb7e29e75510 /svx
parent3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff)
parent098c9d9fcf2b88aa7f789023ad38b2e5d56e8633 (diff)
Merge from DEv300:m71
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmobj.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 684c37c1b67c..6412653f9c0c 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -519,7 +519,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
while (nCurrentSourceIndex <= nIndex)
{
sal_Bool bEqualDSS = sal_False;
- while (!bEqualDSS) // (we don't have to check nCurrentSourceIndex here : it's bounded by nIndex)
+ while (!bEqualDSS) // (we don't have to check nCurrentSourceIndex here : it's bound by nIndex)
{
xSourceContainer->getByIndex(nCurrentSourceIndex) >>= xCurrentSourceForm;
DBG_ASSERT(xCurrentSourceForm.is(), "FmFormObj::ensureModelEnv : invalid form ancestor (2) !");
@@ -581,12 +581,11 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
// correct this ...
try
{
- Reference< XPersistObject > xSourcePersist(xCurrentSourceForm, UNO_QUERY);
- DBG_ASSERT(xSourcePersist.is(), "FmFormObj::ensureModelEnv : invalid form (no persist object) !");
-
- // create and insert (into the destination) a clone of the form
- Reference< XCloneable > xCloneable( xSourcePersist, UNO_QUERY_THROW );
- xCurrentDestForm.set( xCloneable->createClone(), UNO_QUERY_THROW );
+ // create and insert (into the destination) a copy of the form
+ xCurrentDestForm.set(
+ ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.form.component.DataForm" ) ),
+ UNO_QUERY_THROW );
+ ::comphelper::copyProperties( xCurrentSourceForm, xCurrentDestForm );
DBG_ASSERT(nCurrentDestIndex == xDestContainer->getCount(), "FmFormObj::ensureModelEnv : something went wrong with the numbers !");
xDestContainer->insertByIndex(nCurrentDestIndex, makeAny(xCurrentDestForm));
@@ -604,7 +603,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
}
}
- // now xCurrentDestForm is a form aequivalent to xSourceForm (which means they have the same DSS and the same number
+ // now xCurrentDestForm is a form equivalent to xSourceForm (which means they have the same DSS and the same number
// of left siblings with the same DSS, which counts for all their ancestors, too)
// go down