LibreOffice Module xmloff (master) 1
|
#include <xmloff/xformsexport.hxx>
#include "XFormsModelExport.hxx"
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/namespacemap.hxx>
#include <DomExport.hxx>
#include <sax/tools/converter.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/NamedPropertyValues.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <com/sun/star/form/binding/XBindableValue.hpp>
#include <com/sun/star/form/binding/XListEntrySink.hpp>
#include <com/sun/star/form/submission/XSubmissionSupplier.hpp>
#include <com/sun/star/xforms/XModel.hpp>
#include <com/sun/star/xforms/XDataTypeRepository.hpp>
#include <com/sun/star/xforms/XFormsSupplier.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/xsd/WhiteSpaceTreatment.hpp>
#include <com/sun/star/xsd/DataTypeClass.hpp>
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/Duration.hpp>
Go to the source code of this file.
Macros | |
#define | TABLE_END { nullptr, 0, 0, nullptr } |
Typedefs | |
typedef OUString(* | convert_t) (const Any &) |
Functions | |
void | exportXForms (SvXMLExport &rExport) |
export an XForms model. More... | |
static void | exportXFormsInstance (SvXMLExport &, const Sequence< PropertyValue > &) |
static void | exportXFormsBinding (SvXMLExport &, const Reference< XPropertySet > &) |
static void | exportXFormsSubmission (SvXMLExport &, const Reference< XPropertySet > &) |
static void | exportXFormsSchemas (SvXMLExport &, const Reference< css::xforms::XModel > &) |
static void | lcl_export (const Reference< XPropertySet > &rPropertySet, SvXMLExport &rExport, const ExportTable *pTable) |
static OUString | xforms_string (const Any &) |
static OUString | xforms_bool (const Any &) |
static OUString | xforms_whitespace (const Any &) |
template<typename T , void(*)(OUStringBuffer &, T) FUNC> | |
static OUString | xforms_convert (const Any &) |
template<typename T , void(*)(OUStringBuffer &, const T &) FUNC> | |
static OUString | xforms_convertRef (const Any &) |
static void | xforms_formatDate (OUStringBuffer &aBuffer, const util::Date &aDate) |
static void | xforms_formatTime (OUStringBuffer &aBuffer, const css::util::Time &aTime) |
static void | xforms_formatDateTime (OUStringBuffer &aBuffer, const util::DateTime &aDateTime) |
static void | convertNumber (OUStringBuffer &b, sal_Int32 n) |
static OUString | lcl_getXSDType (SvXMLExport const &rExport, const Reference< XPropertySet > &xType) |
void | exportXFormsModel (SvXMLExport &rExport, const Reference< XPropertySet > &xModelPropSet) |
static void | lcl_exportDataTypeFacets (SvXMLExport &rExport, const Reference< XPropertySet > &rPropertySet, const ExportTable *pTable) |
static void | lcl_exportDataType (SvXMLExport &rExport, const Reference< XPropertySet > &xType) |
template<typename T , void(*)(OUStringBuffer &, T) FUNC> | |
OUString | xforms_convert (const Any &rAny) |
template<typename T , void(*)(OUStringBuffer &, const T &) FUNC> | |
OUString | xforms_convertRef (const Any &rAny) |
static OUString | lcl_getXFormsBindName (const Reference< XPropertySet > &xBinding) |
return name of Binding More... | |
OUString | getXFormsBindName (const Reference< XPropertySet > &xControl) |
OUString | getXFormsListBindName (const Reference< XPropertySet > &xControl) |
OUString | getXFormsSubmissionName (const Reference< XPropertySet > &xBinding) |
void | getXFormsSettings (const Reference< XNameAccess > &_rXForms, Sequence< PropertyValue > &_out_rSettings) |
Variables | |
convert_t const | xforms_int32 = &xforms_convert<sal_Int32,&convertNumber> |
convert_t const | xforms_double = &xforms_convert<double,&::sax::Converter::convertDouble> |
convert_t const | xforms_dateTime = &xforms_convertRef<util::DateTime,&xforms_formatDateTime> |
convert_t const | xforms_date = &xforms_convertRef<util::Date,&xforms_formatDate> |
convert_t const | xforms_time = &xforms_convertRef<css::util::Time,&xforms_formatTime> |
const ExportTable | aXFormsModelTable [] |
const ExportTable | aXFormsBindingTable [] |
const ExportTable | aXFormsSubmissionTable [] |
const ExportTable | aDataTypeFacetTable [] |
#define TABLE_END { nullptr, 0, 0, nullptr } |
Definition at line 125 of file xformsexport.cxx.
typedef OUString(* convert_t) (const Any &) |
Definition at line 107 of file xformsexport.cxx.
|
static |
Definition at line 138 of file xformsexport.cxx.
References n.
void exportXForms | ( | SvXMLExport & | rExport | ) |
export an XForms model.
Definition at line 80 of file xformsexport.cxx.
References exportXFormsModel(), SvXMLExport::GetModel(), and xModel.
|
static |
Definition at line 269 of file xformsexport.cxx.
References comphelper::AttributeList::AddAttribute(), SvXMLExport::AddAttribute(), Any, aXFormsBindingTable, Exception, SvXMLExport::GetAttrList(), comphelper::AttributeList::GetIndexByName(), SvXMLNamespaceMap::GetKeyByPrefix(), SvXMLNamespaceMap::GetNameByKey(), SvXMLExport::GetNamespaceMap(), comphelper::AttributeList::getValueByIndex(), lcl_export(), lcl_getXSDType(), nId, sName, xmloff::token::XML_BIND, XML_NAMESPACE_NONE, XML_NAMESPACE_UNKNOWN, XML_NAMESPACE_XFORMS, xmloff::token::XML_TYPE, and xModel.
Referenced by exportXFormsModel().
|
static |
Definition at line 217 of file xformsexport.cxx.
References SvXMLExport::AddAttribute(), Any, exportDom(), SvXMLExport::IgnorableWhitespace(), sId, sName, xmloff::token::XML_ID, xmloff::token::XML_INSTANCE, XML_NAMESPACE_NONE, XML_NAMESPACE_XFORMS, and xmloff::token::XML_SRC.
Referenced by exportXFormsModel().
void exportXFormsModel | ( | SvXMLExport & | rExport, |
const Reference< XPropertySet > & | xModelPropSet | ||
) |
Definition at line 163 of file xformsexport.cxx.
References aXFormsModelTable, exportXFormsBinding(), exportXFormsInstance(), exportXFormsSchemas(), exportXFormsSubmission(), i, lcl_export(), nCount, xmloff::token::XML_MODEL, XML_NAMESPACE_XFORMS, and xModel.
Referenced by exportXForms().
|
static |
Definition at line 557 of file xformsexport.cxx.
References exportDom(), lcl_exportDataType(), SAL_WARN_IF, XML_NAMESPACE_XSD, xmloff::token::XML_SCHEMA, and xModel.
Referenced by exportXFormsModel().
|
static |
Definition at line 389 of file xformsexport.cxx.
References aXFormsSubmissionTable, lcl_export(), XML_NAMESPACE_XFORMS, and xmloff::token::XML_SUBMISSION.
Referenced by exportXFormsModel().
OUString getXFormsBindName | ( | const Reference< XPropertySet > & | xControl | ) |
Definition at line 720 of file xformsexport.cxx.
References lcl_getXFormsBindName().
Referenced by xmloff::OControlExport::examine(), and xmloff::OControlExport::exportXFormsBindAttributes().
OUString getXFormsListBindName | ( | const Reference< XPropertySet > & | xControl | ) |
Definition at line 730 of file xformsexport.cxx.
References lcl_getXFormsBindName().
Referenced by xmloff::OControlExport::examine(), and xmloff::OControlExport::exportXFormsListAttributes().
void getXFormsSettings | ( | const Reference< XNameAccess > & | _rXForms, |
Sequence< PropertyValue > & | _out_rSettings | ||
) |
Definition at line 760 of file xformsexport.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::getProcessComponentContext(), comphelper::makePropertyValue(), and u.
OUString getXFormsSubmissionName | ( | const Reference< XPropertySet > & | xBinding | ) |
Definition at line 740 of file xformsexport.cxx.
Referenced by xmloff::OControlExport::examine(), and xmloff::OControlExport::exportXFormsSubmissionAttributes().
|
static |
Definition at line 596 of file xformsexport.cxx.
References SvXMLExport::AddAttribute(), and Any.
Referenced by exportXFormsBinding(), exportXFormsModel(), and exportXFormsSubmission().
|
static |
Definition at line 524 of file xformsexport.cxx.
References aDataTypeFacetTable, SvXMLExport::AddAttribute(), lcl_exportDataTypeFacets(), lcl_getXSDType(), sName, xmloff::token::XML_BASE, xmloff::token::XML_NAME, XML_NAMESPACE_NONE, XML_NAMESPACE_XSD, xmloff::token::XML_RESTRICTION, and xmloff::token::XML_SIMPLETYPE.
Referenced by exportXFormsSchemas().
|
static |
Definition at line 435 of file xformsexport.cxx.
References SvXMLExport::AddAttribute(), sName, XML_NAMESPACE_NONE, and xmloff::token::XML_VALUE.
Referenced by lcl_exportDataType().
|
static |
return name of Binding
Definition at line 706 of file xformsexport.cxx.
Referenced by getXFormsBindName(), and getXFormsListBindName().
|
static |
Definition at line 463 of file xformsexport.cxx.
References eToken, SvXMLExport::GetNamespaceMap(), SvXMLNamespaceMap::GetQNameByKey(), xmloff::token::GetXMLToken(), xmloff::token::XML_ANYURI, xmloff::token::XML_BOOLEAN, xmloff::token::XML_DATE, xmloff::token::XML_DATETIME_XSD, xmloff::token::XML_DAY, xmloff::token::XML_DECIMAL, xmloff::token::XML_DOUBLE, xmloff::token::XML_FLOAT, xmloff::token::XML_MONTH, XML_NAMESPACE_XSD, xmloff::token::XML_STRING, xmloff::token::XML_TIME, and xmloff::token::XML_YEAR.
Referenced by exportXFormsBinding(), and lcl_exportDataType().
|
static |
Definition at line 651 of file xformsexport.cxx.
References xmloff::token::GetXMLToken(), xmloff::token::XML_FALSE, and xmloff::token::XML_TRUE.
|
static |
Definition at line 621 of file xformsexport.cxx.
OUString xforms_convert | ( | const Any & | rAny | ) |
Definition at line 621 of file xformsexport.cxx.
|
static |
Definition at line 633 of file xformsexport.cxx.
OUString xforms_convertRef | ( | const Any & | rAny | ) |
Definition at line 633 of file xformsexport.cxx.
|
static |
Definition at line 660 of file xformsexport.cxx.
References aBuffer.
|
static |
Definition at line 677 of file xformsexport.cxx.
References aBuffer, and sax::Converter::convertDateTime().
|
static |
Definition at line 667 of file xformsexport.cxx.
References aBuffer, and sax::Converter::convertDuration().
|
static |
Definition at line 644 of file xformsexport.cxx.
|
static |
Definition at line 682 of file xformsexport.cxx.
References xmloff::token::GetXMLToken(), n, xmloff::token::XML_COLLAPSE, xmloff::token::XML_PRESERVE, and xmloff::token::XML_REPLACE.
const ExportTable aDataTypeFacetTable[] |
Definition at line 401 of file xformsexport.cxx.
Referenced by lcl_exportDataType().
const ExportTable aXFormsBindingTable[] |
Definition at line 255 of file xformsexport.cxx.
Referenced by exportXFormsBinding().
const ExportTable aXFormsModelTable[] |
Definition at line 156 of file xformsexport.cxx.
Referenced by exportXFormsModel().
const ExportTable aXFormsSubmissionTable[] |
Definition at line 369 of file xformsexport.cxx.
Referenced by exportXFormsSubmission().
convert_t const xforms_date = &xforms_convertRef<util::Date,&xforms_formatDate> |
Definition at line 145 of file xformsexport.cxx.
convert_t const xforms_dateTime = &xforms_convertRef<util::DateTime,&xforms_formatDateTime> |
Definition at line 144 of file xformsexport.cxx.
convert_t const xforms_double = &xforms_convert<double,&::sax::Converter::convertDouble> |
Definition at line 143 of file xformsexport.cxx.
convert_t const xforms_int32 = &xforms_convert<sal_Int32,&convertNumber> |
Definition at line 142 of file xformsexport.cxx.
convert_t const xforms_time = &xforms_convertRef<css::util::Time,&xforms_formatTime> |
Definition at line 146 of file xformsexport.cxx.