2000-11-17 18:03:33 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* $RCSfile: formlayerexport.cxx,v $
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2007-06-27 14:15:36 +00:00
|
|
|
* $Revision: 1.18 $
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2007-06-27 14:15:36 +00:00
|
|
|
* last change: $Author: hr $ $Date: 2007-06-27 15:15:36 $
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* This library 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 for more details.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2005-09-09 13:10:24 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 09:35:46 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_xmloff.hxx"
|
|
|
|
|
2000-11-29 09:32:13 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2000-11-17 18:03:33 +00:00
|
|
|
#ifndef _XMLOFF_FORMLAYEREXPORT_HXX_
|
2007-06-27 14:15:36 +00:00
|
|
|
#include <xmloff/formlayerexport.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_FORMS_STRINGS_HXX_
|
|
|
|
#include "strings.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_ELEMENTEXPORT_HXX_
|
|
|
|
#include "elementexport.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_XMLNMSPE_HXX
|
|
|
|
#include "xmlnmspe.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_XMLEXP_HXX
|
2007-06-27 14:15:36 +00:00
|
|
|
#include <xmloff/xmlexp.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_FORMS_LAYEREXPORT_HXX_
|
|
|
|
#include "layerexport.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_FORMS_PROPERTYEXPORT_HXX_
|
|
|
|
#include "propertyexport.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _OSL_DIAGNOSE_H_
|
|
|
|
#include <osl/diagnose.h>
|
|
|
|
#endif
|
2001-03-16 13:37:07 +00:00
|
|
|
#ifndef _COMPHELPER_EXTRACT_HXX_
|
|
|
|
#include <comphelper/extract.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _COMPHELPER_STLTYPES_HXX_
|
|
|
|
#include <comphelper/stl_types.hxx>
|
|
|
|
#endif
|
2001-03-20 12:35:38 +00:00
|
|
|
#ifndef _XMLOFF_FORMS_OFFICEFORMS_HXX_
|
|
|
|
#include "officeforms.hxx"
|
|
|
|
#endif
|
2000-11-17 18:03:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
//.........................................................................
|
|
|
|
namespace xmloff
|
|
|
|
{
|
|
|
|
//.........................................................................
|
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::lang;
|
2002-09-25 11:02:38 +00:00
|
|
|
using namespace ::com::sun::star::awt;
|
2000-11-17 18:03:33 +00:00
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::container;
|
2000-12-03 09:57:06 +00:00
|
|
|
using namespace ::com::sun::star::drawing;
|
2001-03-20 12:35:38 +00:00
|
|
|
using namespace ::com::sun::star::frame;
|
2000-11-17 18:03:33 +00:00
|
|
|
|
|
|
|
//=====================================================================
|
|
|
|
//= OFormLayerXMLExport
|
|
|
|
//=====================================================================
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
OFormLayerXMLExport::OFormLayerXMLExport(SvXMLExport& _rContext)
|
|
|
|
:m_rContext(_rContext)
|
|
|
|
,m_pImpl(new OFormLayerXMLExport_Impl(_rContext))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
OFormLayerXMLExport::~OFormLayerXMLExport()
|
|
|
|
{
|
|
|
|
delete m_pImpl;
|
|
|
|
m_pImpl = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2000-12-06 16:28:05 +00:00
|
|
|
sal_Bool OFormLayerXMLExport::seekPage(const Reference< XDrawPage >& _rxDrawPage)
|
|
|
|
{
|
|
|
|
return m_pImpl->seekPage(_rxDrawPage);
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
2000-12-18 15:22:35 +00:00
|
|
|
::rtl::OUString OFormLayerXMLExport::getControlId(const Reference< XPropertySet >& _rxControl)
|
2000-12-06 16:28:05 +00:00
|
|
|
{
|
|
|
|
return m_pImpl->getControlId(_rxControl);
|
|
|
|
}
|
|
|
|
|
2001-05-28 13:59:18 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
::rtl::OUString OFormLayerXMLExport::getControlNumberStyle( const Reference< XPropertySet >& _rxControl )
|
|
|
|
{
|
|
|
|
return m_pImpl->getControlNumberStyle(_rxControl);
|
|
|
|
}
|
|
|
|
|
2001-02-01 08:46:47 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
::vos::ORef< SvXMLExportPropertyMapper > OFormLayerXMLExport::getStylePropertyMapper()
|
|
|
|
{
|
|
|
|
return m_pImpl->getStylePropertyMapper();
|
2000-12-18 14:14:35 +00:00
|
|
|
}
|
|
|
|
|
2000-12-06 16:28:05 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::initialize()
|
|
|
|
{
|
|
|
|
m_pImpl->clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::examineForms(const Reference< XDrawPage >& _rxDrawPage)
|
2000-11-17 18:03:33 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2000-12-03 09:57:06 +00:00
|
|
|
m_pImpl->examineForms(_rxDrawPage);
|
2000-11-17 18:03:33 +00:00
|
|
|
}
|
|
|
|
catch(Exception&)
|
|
|
|
{
|
2000-12-03 09:57:06 +00:00
|
|
|
OSL_ENSURE(sal_False, "OFormLayerXMLExport::examine: could not examine the draw page!");
|
2000-11-17 18:03:33 +00:00
|
|
|
}
|
2000-12-03 09:57:06 +00:00
|
|
|
}
|
2000-11-17 18:03:33 +00:00
|
|
|
|
2000-12-03 09:57:06 +00:00
|
|
|
//---------------------------------------------------------------------
|
2000-12-06 16:28:05 +00:00
|
|
|
void OFormLayerXMLExport::exportForms(const Reference< XDrawPage >& _rxDrawPage)
|
2000-12-03 09:57:06 +00:00
|
|
|
{
|
2000-12-06 16:28:05 +00:00
|
|
|
m_pImpl->exportForms(_rxDrawPage);
|
2000-11-17 18:03:33 +00:00
|
|
|
}
|
|
|
|
|
2005-03-23 10:25:13 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::exportXForms() const
|
|
|
|
{
|
|
|
|
m_pImpl->exportXForms();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
bool OFormLayerXMLExport::pageContainsForms( const Reference< XDrawPage >& _rxDrawPage ) const
|
|
|
|
{
|
|
|
|
return m_pImpl->pageContainsForms( _rxDrawPage );
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
bool OFormLayerXMLExport::documentContainsXForms() const
|
|
|
|
{
|
|
|
|
return m_pImpl->documentContainsXForms();
|
|
|
|
}
|
|
|
|
|
2001-05-28 13:59:18 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::exportControlNumberStyles()
|
|
|
|
{
|
|
|
|
m_pImpl->exportControlNumberStyles();
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::exportAutoControlNumberStyles()
|
|
|
|
{
|
|
|
|
m_pImpl->exportAutoControlNumberStyles();
|
|
|
|
}
|
|
|
|
|
2002-10-25 06:58:00 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::exportAutoStyles()
|
|
|
|
{
|
|
|
|
m_pImpl->exportAutoStyles();
|
|
|
|
}
|
|
|
|
|
2002-09-25 11:02:38 +00:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
void OFormLayerXMLExport::excludeFromExport( const Reference< XControlModel > _rxControl )
|
|
|
|
{
|
|
|
|
m_pImpl->excludeFromExport( _rxControl );
|
|
|
|
}
|
|
|
|
|
2001-03-20 12:35:38 +00:00
|
|
|
//=========================================================================
|
|
|
|
//= OOfficeFormsExport
|
|
|
|
//=========================================================================
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
OOfficeFormsExport::OOfficeFormsExport( SvXMLExport& _rExp )
|
|
|
|
:m_pImpl(NULL)
|
|
|
|
{
|
|
|
|
m_pImpl = new OFormsRootExport(_rExp);
|
|
|
|
}
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
OOfficeFormsExport::~OOfficeFormsExport()
|
|
|
|
{
|
|
|
|
delete m_pImpl;
|
|
|
|
}
|
|
|
|
|
2000-11-17 18:03:33 +00:00
|
|
|
//.........................................................................
|
|
|
|
} // namespace xmloff
|
|
|
|
//.........................................................................
|
|
|
|
|