summaryrefslogtreecommitdiff
path: root/svx/source/form/fmobj.cxx
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-01-21 11:54:03 +0100
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-01-21 11:54:03 +0100
commit34492fbb0f264bf96deae1c9294c1f375ae9197e (patch)
tree1514e475fd8d698bbd1fca81fa696b427ddbc765 /svx/source/form/fmobj.cxx
parent3b3e144c13a85b21b32904f245f44256c63e10e5 (diff)
parentbc7afd018ae687b2a8ba9096dfe463097b54799a (diff)
dba33e: merge to m70
Diffstat (limited to 'svx/source/form/fmobj.cxx')
-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