summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-23 11:05:40 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-23 11:05:40 +0000
commit07e77b670254467aeba85f8ccf010c3f0769abdf (patch)
treeadbae174c287a68efe7ff7170025573f20a5dd03 /xmloff
parent4291fd79818eeb88e9e72e34c20bf4a67318e66f (diff)
INTEGRATION: CWS eforms4 (1.25.22); FILE MERGED
2005/03/21 13:49:13 fs 1.25.22.2: #i10000# merge the changes from xmlperf02 into this CWS (pre-integration step) 2004/12/13 17:27:32 fs 1.25.22.1: #i36597# +exportXForms/pageContainsForms/documentContainsXForms
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/layerexport.cxx42
1 files changed, 32 insertions, 10 deletions
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 9b755b108ec5..2aea730061c3 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: layerexport.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: kz $ $Date: 2005-03-18 18:31:33 $
+ * last change: $Author: vg $ $Date: 2005-03-23 12:05:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,11 +101,6 @@
#include <comphelper/extract.hxx>
#endif
-// #110680#
-//#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
-//#include <comphelper/processfactory.hxx>
-//#endif
-
#ifndef _XMLOFF_FORMS_CONTROLPROPERTYMAP_HXX_
#include "controlpropertymap.hxx"
#endif
@@ -115,6 +110,9 @@
#ifndef _COM_SUN_STAR_FORM_XFORMSSUPPLIER2_HPP_
#include <com/sun/star/form/XFormsSupplier2.hpp>
#endif
+#ifndef _COM_SUN_STAR_XFORMS_XFORMSSUPPLIER_HPP_
+#include <com/sun/star/xforms/XFormsSupplier.hpp>
+#endif
#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
#include <com/sun/star/form/FormComponentType.hpp>
#endif
@@ -165,6 +163,8 @@ namespace xmloff
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::text;
+ typedef ::com::sun::star::xforms::XFormsSupplier XXFormsSupplier;
+
//=====================================================================
//= OFormLayerXMLExport_Impl
//=====================================================================
@@ -400,14 +400,36 @@ namespace xmloff
implMoveIterators(_rxDrawPage, sal_False);
OSL_ENSURE(bPageIsKnown, "OFormLayerXMLExport_Impl::exportForms: exporting a page which has not been examined!");
- // export XForms models
- exportXForms( m_rContext );
-
// export forms collection
exportCollectionElements(xCollectionIndex);
}
//---------------------------------------------------------------------
+ void OFormLayerXMLExport_Impl::exportXForms() const
+ {
+ // export XForms models
+ ::exportXForms( m_rContext );
+ }
+
+ //---------------------------------------------------------------------
+ bool OFormLayerXMLExport_Impl::pageContainsForms( const Reference< XDrawPage >& _rxDrawPage ) const
+ {
+ Reference< XFormsSupplier2 > xFormsSupp( _rxDrawPage, UNO_QUERY );
+ DBG_ASSERT( xFormsSupp.s(), "OFormLayerXMLExport_Impl::pageContainsForms: no XFormsSupplier2!" );
+ return xFormsSupp.is() && xFormsSupp->hasForms();
+ }
+
+ //---------------------------------------------------------------------
+ bool OFormLayerXMLExport_Impl::documentContainsXForms() const
+ {
+ Reference< XXFormsSupplier > xXFormSupp( m_rContext.GetModel(), UNO_QUERY );
+ Reference< XNameContainer > xForms;
+ if ( xXFormSupp.is() )
+ xForms = xXFormSupp->getXForms();
+ return xForms.is() && xForms->hasElements();
+ }
+
+ //---------------------------------------------------------------------
sal_Bool OFormLayerXMLExport_Impl::implMoveIterators(const Reference< XDrawPage >& _rxDrawPage, sal_Bool _bClear)
{
sal_Bool bKnownPage = sal_False;