#80556# make setParent/insertByName behaviour more consistent

This commit is contained in:
Martin Gallwey
2000-11-29 13:09:05 +00:00
parent 2d5e27c5f1
commit e5341c0538
2 changed files with 7 additions and 12 deletions

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageEntry.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: mtg $ $Date: 2000-11-29 05:19:35 $
* last change: $Author: mtg $ $Date: 2000-11-29 14:09:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,7 +64,6 @@
using namespace com::sun::star;
ZipPackageEntry::ZipPackageEntry (void)
: bSetParent(sal_False)
{
}
@@ -133,7 +132,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< uno::XInterface
uno::Any aAny;
uno::Reference < lang::XUnoTunnel > xTunnel = this;
aAny <<= xTunnel;
xNewParent->insertByName(getName(), aAny);
bSetParent = sal_True;
if (!xNewParent->hasByName(getName()))
xNewParent->insertByName(getName(), aAny);
xParent = Parent;
}

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageFolder.cxx,v $
*
* $Revision: 1.14 $
* $Revision: 1.15 $
*
* last change: $Author: mtg $ $Date: 2000-11-29 13:47:18 $
* last change: $Author: mtg $ $Date: 2000-11-29 14:09:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -134,15 +134,11 @@ void SAL_CALL ZipPackageFolder::insertByName( const ::rtl::OUString& aName, cons
uno::Reference < lang::XUnoTunnel > xRef;
aElement >>= xRef;
uno::Reference < container::XNamed > xNamed (xRef, uno::UNO_QUERY);
/*
uno::Reference < container::XChild > xChild (xRef, uno::UNO_QUERY);
uno::Reference < uno::XInterface > xInterface (*this);
*/
xNamed->setName (sName);
/*
xChild->setParent (xInterface);
*/
aContents[sName] = xRef;
xChild->setParent (xInterface);
}
}
void SAL_CALL ZipPackageFolder::removeByName( const ::rtl::OUString& Name )