2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-11-17 18:03:33 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 21:05:46 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2008-04-10 21:05:46 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2008-04-10 21:05:46 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2008-04-10 21:05:46 +00: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.
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2008-04-10 21:05:46 +00: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).
|
2000-11-17 18:03:33 +00:00
|
|
|
*
|
2008-04-10 21:05:46 +00: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.
|
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>
|
2007-06-27 14:15:36 +00:00
|
|
|
#include <xmloff/formlayerexport.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#include "strings.hxx"
|
|
|
|
#include "elementexport.hxx"
|
|
|
|
#include "xmlnmspe.hxx"
|
2007-06-27 14:15:36 +00:00
|
|
|
#include <xmloff/xmlexp.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#include "layerexport.hxx"
|
|
|
|
#include "propertyexport.hxx"
|
|
|
|
#include <osl/diagnose.h>
|
2001-03-16 13:37:07 +00:00
|
|
|
#include <comphelper/extract.hxx>
|
2000-11-17 18:03:33 +00:00
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <comphelper/stl_types.hxx>
|
2001-03-20 12:35:38 +00:00
|
|
|
#include "officeforms.hxx"
|
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
|
|
|
|
//.........................................................................
|
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|