23#include <com/sun/star/frame/XModel.hpp>
24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/container/XNameAccess.hpp>
27#include <com/sun/star/xforms/XFormsSupplier.hpp>
28#include <com/sun/star/xforms/XDataTypeRepository.hpp>
29#include <com/sun/star/xforms/Model.hpp>
30#include <com/sun/star/xforms/XModel2.hpp>
31#include <com/sun/star/container/XNameContainer.hpp>
32#include <com/sun/star/xsd/DataTypeClass.hpp>
45using com::sun::star::uno::UNO_QUERY;
46using com::sun::star::uno::UNO_QUERY_THROW;
48using com::sun::star::container::XNameAccess;
49using com::sun::star::xforms::XFormsSupplier;
50using com::sun::star::xforms::XDataTypeRepository;
51using com::sun::star::xforms::Model;
52using com::sun::star::xforms::XModel2;
53using com::sun::star::container::XNameContainer;
54using com::sun::star::uno::Any;
55using com::sun::star::uno::Exception;
71 bool bSuccess =
false;
93 SAL_WARN_IF( !bSuccess,
"xmloff",
"can't import model" );
98 const OUString& rBindingID,
117 for(
const auto& rName : aNames )
120 xForms->getByName( rName ), UNO_QUERY );
127 :
xModel->getSubmissions(),
131 if( xBindings->hasByName( rBindingID ) )
132 xRet.set( xBindings->getByName( rBindingID ),
154 const OUString& rBindingID )
161 const OUString& rBindingID )
167 const OUString& rName,
170 xPropertySet->setPropertyValue( rName, rAny );
193 const OUString& rXMLName )
199 sal_uInt16
nToken =
aMap.Get( nPrefix, sLocalName );
201 sal_uInt16 nTypeClass = css::xsd::DataTypeClass::STRING;
205 SAL_WARN_IF( !xRepository.is(),
"xmloff",
"can't find type without repository");
209 nTypeClass = css::xsd::DataTypeClass::STRING;
212 nTypeClass = css::xsd::DataTypeClass::anyURI;
215 nTypeClass = css::xsd::DataTypeClass::DECIMAL;
218 nTypeClass = css::xsd::DataTypeClass::DOUBLE;
221 nTypeClass = css::xsd::DataTypeClass::FLOAT;
224 nTypeClass = css::xsd::DataTypeClass::BOOLEAN;
227 nTypeClass = css::xsd::DataTypeClass::DATETIME;
230 nTypeClass = css::xsd::DataTypeClass::DATE;
233 nTypeClass = css::xsd::DataTypeClass::TIME;
236 nTypeClass = css::xsd::DataTypeClass::gYear;
239 nTypeClass = css::xsd::DataTypeClass::gDay;
242 nTypeClass = css::xsd::DataTypeClass::gMonth;
264 const OUString& rXMLName )
269 sal_uInt16
nToken =
aMap.Get( nPrefix, sLocalName );
278 const OUString& rXMLName )
280 OUString sTypeName = rXMLName;
284 xRepository->getBasicDataType(
sal_uInt16 GetKeyByAttrValueQName(const OUString &rAttrName, OUString *pLocalName) const
#define TOOLS_WARN_EXCEPTION(area, stream)
#define SAL_WARN_IF(condition, area, stream)
class SAL_NO_VTABLE XPropertySet
Reference< XComponentContext > getProcessComponentContext()
Handling of tokens in XML:
HashMap_OWString_Interface aMap
Reference< XModel > xModel
constexpr sal_uInt16 XML_NAMESPACE_XSD
#define XML_TOKEN_MAP_END