summaryrefslogtreecommitdiff
path: root/svx/source/form
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-05 11:15:32 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-05 11:15:32 +0100
commit38b970f68319a35c64fb54503343da169d5e0b49 (patch)
tree3a59feaef701e08658a34f337891e7a1b3f11fea /svx/source/form
parentaa8543f821e9e84bd52382f424ec165ebd27f558 (diff)
parent3b865735f967a4484d6bed9b5db1acc92e7bbea1 (diff)
autorecovery: merge after pulling CWS dba33e
Diffstat (limited to 'svx/source/form')
-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