#80556# make setParent/insertByName behaviour more consistent
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: ZipPackageEntry.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -64,7 +64,6 @@
|
|||||||
|
|
||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
ZipPackageEntry::ZipPackageEntry (void)
|
ZipPackageEntry::ZipPackageEntry (void)
|
||||||
: bSetParent(sal_False)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +132,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< uno::XInterface
|
|||||||
uno::Any aAny;
|
uno::Any aAny;
|
||||||
uno::Reference < lang::XUnoTunnel > xTunnel = this;
|
uno::Reference < lang::XUnoTunnel > xTunnel = this;
|
||||||
aAny <<= xTunnel;
|
aAny <<= xTunnel;
|
||||||
xNewParent->insertByName(getName(), aAny);
|
if (!xNewParent->hasByName(getName()))
|
||||||
bSetParent = sal_True;
|
xNewParent->insertByName(getName(), aAny);
|
||||||
xParent = Parent;
|
xParent = Parent;
|
||||||
}
|
}
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: ZipPackageFolder.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -134,15 +134,11 @@ void SAL_CALL ZipPackageFolder::insertByName( const ::rtl::OUString& aName, cons
|
|||||||
uno::Reference < lang::XUnoTunnel > xRef;
|
uno::Reference < lang::XUnoTunnel > xRef;
|
||||||
aElement >>= xRef;
|
aElement >>= xRef;
|
||||||
uno::Reference < container::XNamed > xNamed (xRef, uno::UNO_QUERY);
|
uno::Reference < container::XNamed > xNamed (xRef, uno::UNO_QUERY);
|
||||||
/*
|
|
||||||
uno::Reference < container::XChild > xChild (xRef, uno::UNO_QUERY);
|
uno::Reference < container::XChild > xChild (xRef, uno::UNO_QUERY);
|
||||||
uno::Reference < uno::XInterface > xInterface (*this);
|
uno::Reference < uno::XInterface > xInterface (*this);
|
||||||
*/
|
|
||||||
xNamed->setName (sName);
|
xNamed->setName (sName);
|
||||||
/*
|
|
||||||
xChild->setParent (xInterface);
|
|
||||||
*/
|
|
||||||
aContents[sName] = xRef;
|
aContents[sName] = xRef;
|
||||||
|
xChild->setParent (xInterface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void SAL_CALL ZipPackageFolder::removeByName( const ::rtl::OUString& Name )
|
void SAL_CALL ZipPackageFolder::removeByName( const ::rtl::OUString& Name )
|
||||||
|
Reference in New Issue
Block a user