2001-09-14 08:33:38 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* $RCSfile: ContentInfo.hxx,v $
|
|
|
|
* $Revision: 1.9 $
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
2008-04-10 10:48:40 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-09-14 08:33:38 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _CONTENT_INFO_HXX_
|
|
|
|
#define _CONTENT_INFO_HXX_
|
|
|
|
|
|
|
|
#include <com/sun/star/container/XNameContainer.hpp>
|
|
|
|
#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEl_HPP_
|
|
|
|
#include <com/sun/star/lang/XUnoTunnel.hpp>
|
|
|
|
#endif
|
|
|
|
#include <ZipPackageFolder.hxx>
|
|
|
|
#include <ZipPackageStream.hxx>
|
|
|
|
|
2003-06-12 04:13:08 -05:00
|
|
|
namespace com { namespace sun { namespace star { namespace packages {
|
2001-10-30 06:54:47 -06:00
|
|
|
class ContentInfo : public cppu::OWeakObject
|
2001-09-14 08:33:38 -05:00
|
|
|
{
|
2001-10-30 06:54:47 -06:00
|
|
|
public:
|
2001-09-14 08:33:38 -05:00
|
|
|
com::sun::star::uno::Reference < com::sun::star::lang::XUnoTunnel > xTunnel;
|
|
|
|
bool bFolder;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
ZipPackageFolder *pFolder;
|
|
|
|
ZipPackageStream *pStream;
|
|
|
|
};
|
|
|
|
ContentInfo ( ZipPackageStream * pNewStream )
|
2006-06-20 00:14:03 -05:00
|
|
|
: xTunnel ( pNewStream )
|
|
|
|
, bFolder ( false )
|
2001-09-14 08:33:38 -05:00
|
|
|
, pStream ( pNewStream )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
ContentInfo ( ZipPackageFolder * pNewFolder )
|
2006-06-20 00:14:03 -05:00
|
|
|
: xTunnel ( pNewFolder )
|
|
|
|
, bFolder ( true )
|
2001-09-14 08:33:38 -05:00
|
|
|
, pFolder ( pNewFolder )
|
|
|
|
{
|
|
|
|
}
|
2001-10-30 06:54:47 -06:00
|
|
|
virtual ~ContentInfo ()
|
2001-10-26 15:46:08 -05:00
|
|
|
{
|
2001-10-30 06:54:47 -06:00
|
|
|
if ( bFolder )
|
2001-10-26 15:46:08 -05:00
|
|
|
pFolder->releaseUpwardRef();
|
2004-10-04 15:08:42 -05:00
|
|
|
else
|
|
|
|
pStream->clearParent();
|
2001-10-26 15:46:08 -05:00
|
|
|
}
|
2001-09-14 08:33:38 -05:00
|
|
|
};
|
2006-06-20 00:14:03 -05:00
|
|
|
} } } }
|
2001-09-14 08:33:38 -05:00
|
|
|
#endif
|