LibreOffice Module xmloff (master) 1
elementimport.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include "propertyimport.hxx"
25#include "controlelement.hxx"
26#include "valueproperties.hxx"
27#include "eventimport.hxx"
28#include "logging.hxx"
30
31#include <com/sun/star/text/XTextCursor.hpp>
32#include <com/sun/star/container/XNameContainer.hpp>
33#include <com/sun/star/form/XGridColumnFactory.hpp>
34#include <com/sun/star/graphic/XGraphic.hpp>
35#include <osl/diagnose.h>
36
37#include <map>
38#include <vector>
39
41namespace xmloff
42{
43
44 class OFormLayerXMLImport_Impl;
45
46 //= OElementNameMap
48
52 {
53 typedef std::map<OUString, ElementType> MapString2Element;
54 static std::map<sal_Int32, ElementType> s_sElementTranslations2;
55
56 OElementNameMap() = delete;
57
58 public:
59 static ElementType getElementType(sal_Int32 nToken);
60 };
61
62 //= OElementImport
66 :public OPropertyImport
67 ,public IEventAttacher
68 ,public OStackedLogging
69 {
70 protected:
71 OUString m_sServiceName; // the service name as extracted from the service-name attribute
72 OUString m_sName; // the name of the object (redundant, already contained in the base class' array)
73 OFormLayerXMLImport_Impl& m_rFormImport; // the form import context
74 IEventAttacherManager& m_rEventManager; // the event attacher manager
75
76 const XMLTextStyleContext* m_pStyleElement; // the XML element which describes the style we encountered
77 // while reading our element
78
80 css::uno::Reference< css::container::XNameContainer >
82
84 css::uno::Reference< css::beans::XPropertySet >
86 css::uno::Reference< css::beans::XPropertySetInfo >
88
90
91 public:
103 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
104 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer
105 );
106 virtual ~OElementImport() override;
107
108 protected:
109 // SvXMLImportContext overridables
110 virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
111 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
112 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
113 sal_Int32 nElement,
114 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
115
116 // OPropertyImport overridables
117 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
118
119 // IEventAttacher
120 virtual void registerEvents(
121 const css::uno::Sequence< css::script::ScriptEventDescriptor >& _rEvents
122 ) override;
123
128 virtual css::uno::Reference< css::beans::XPropertySet >
130
131 protected:
139 void simulateDefaultedAttribute(sal_Int32 nElement, const OUString& _rPropertyName, const char* _pAttributeDefault);
140
144 bool tryGenericAttribute( sal_Int32 nElement, const OUString& _rValue );
145
150
151 private:
152 OUString implGetDefaultName() const;
155
156 PropertyGroups::const_iterator impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const;
157
158 virtual OUString determineDefaultServiceName() const;
159 };
160
161 //= OControlImport
165 :public OElementImport
167 {
168 protected:
169 OUString m_sControlId;
171
173 // the value properties (value, current-value, min-value, max-value) require some special
174 // handling
175
176 // we fake the attributes our base class gets: we add the attributes of the outer wrapper
177 // element which encloses us
178 css::uno::Reference< css::xml::sax::XFastAttributeList >
180
185
187 OUString m_sBindingID;
188
191
194
195 protected:
196 // for use by derived classes only
198 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
199 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer
200 );
201
202 public:
204 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
205 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
207 );
208
209 // SvXMLImportContext overridables
210 virtual void SAL_CALL startFastElement( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
211 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
212
213 // OPropertyImport overridables
214 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
215
216 void addOuterAttributes(const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxOuterAttribs);
217
218 protected:
220
221 protected:
222 static void implTranslateValueProperty(
223 const css::uno::Reference< css::beans::XPropertySetInfo >& _rxPropInfo,
224 css::beans::PropertyValue& /* [in/out] */ _rPropValue);
225
226 virtual OUString determineDefaultServiceName() const override;
227
238 virtual void doRegisterCellValueBinding( const OUString& _rBoundCellAddress );
239
241 void doRegisterXFormsValueBinding( const OUString& );
242
244 void doRegisterXFormsListBinding( const OUString& );
245
247 void doRegisterXFormsSubmission( const OUString& );
248
249 protected:
250
251 // OElementImport overridables
252 virtual css::uno::Reference< css::beans::XPropertySet >
253 createElement() override;
254 };
255
256 // TODO:
257 // this whole mechanism doesn't scale. Instead of deriving even more classes for every new attribute,
258 // we should have dedicated attribute handlers
259 // The rest of xmloff implements it this way - why don't we do, too?
260
261 //= OImagePositionImport
263 {
264 css::uno::Reference<css::graphic::XGraphic> m_xGraphic;
266 sal_Int16 m_nImageAlign;
268
269 public:
271 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
272 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
274 );
275
276 protected:
277 // SvXMLImportContext overridables
278 virtual void SAL_CALL startFastElement(
279 sal_Int32 nElement,
280 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList) override;
281
282 // OPropertyImport overridables
283 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
284 };
285
286 //= OReferredControlImport
288 {
289 OUString m_sReferringControls; // the list of ids of controls referring to the one being imported
290
291 public:
293 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
294 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer
295 );
296
297 // SvXMLImportContext overridables
298 virtual void SAL_CALL startFastElement(
299 sal_Int32 nElement,
300 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList) override;
301
302 // OPropertyImport overridables
303 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
304 };
305
306 //= OPasswordImport
308 {
309 public:
311 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
312 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
314 );
315
316 // OPropertyImport overridables
317 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
318 };
319
320 //= ORadioImport
322 {
323 public:
325 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
326 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
328 );
329
330 protected:
331 // OPropertyImport overridables
332 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
333 };
334
335 //= OURLReferenceImport
340 {
341 public:
343 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
344 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
346 );
347
348 protected:
349 // OPropertyImport overridables
350 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
351 };
352
353 //= OButtonImport
358 {
359 public:
361 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
362 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
364 );
365
366 protected:
367 // SvXMLImportContext overridables
368 virtual void SAL_CALL startFastElement(
369 sal_Int32 nElement,
370 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList) override;
371 };
372
373 //= OValueRangeImport
378 {
379 private:
381
382 public:
384 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
385 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
387 );
388
389 protected:
390 // SvXMLImportContext overridables
391 virtual void SAL_CALL startFastElement(
392 sal_Int32 nElement,
393 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList ) override;
394
395 // OPropertyImport overridables
396 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
397 };
398
399 //= OTextLikeImport
404 {
405 private:
406 css::uno::Reference< css::text::XTextCursor > m_xCursor;
407 css::uno::Reference< css::text::XTextCursor > m_xOldCursor;
409
410 public:
412 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
413 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
415 );
416
417 // SvXMLImportContext overridables
418 virtual void SAL_CALL startFastElement(
419 sal_Int32 nElement,
420 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList) override;
421 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
422 sal_Int32 nElement,
423 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
424 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
425
426 private:
429 };
430
431 //= OListAndComboImport
436 {
437 friend class OListOptionImport;
438 friend class OComboItemImport;
439
440 std::vector<OUString >
442 std::vector< OUString >
444
445 std::vector< sal_Int16 >
447 std::vector< sal_Int16 >
449
451
454
460 public:
462 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
463 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
465 );
466
467 // SvXMLImportContext overridables
468 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
469 const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override;
470 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
471 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
472 sal_Int32 nElement,
473 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
474
475 // OPropertyImport overridables
476 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
477
478 // OControlImport overridables
479 virtual void doRegisterCellValueBinding( const OUString& _rBoundCellAddress ) override;
480
481 protected:
482 void implPushBackLabel(const OUString& _rLabel);
483 void implPushBackValue(const OUString& _rValue);
484
485 void implEmptyLabelFound();
486 void implEmptyValueFound();
487
490 };
492
493 //= OListOptionImport
497 :public SvXMLImportContext
498 {
500
501 public:
503 OListAndComboImportRef _xListBox);
504
505 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
506 const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override;
507 };
508
509 //= OComboItemImport
513 :public SvXMLImportContext
514 {
516
517 public:
519 OListAndComboImportRef _xListBox);
520
521 protected:
522 // SvXMLImportContext overridables
523 virtual void SAL_CALL startFastElement( sal_Int32 nElement,
524 const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override;
525 };
526
527
528 //= OColumnImport
534 template <class BASE>
535 class OColumnImport : public BASE
536 {
537 css::uno::Reference< css::form::XGridColumnFactory >
539
540 public:
542 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
544
545 protected:
546 // OElementImport overridables
547 virtual css::uno::Reference< css::beans::XPropertySet >
548 createElement() override;
549 };
550
551 //= OColumnWrapperImport
553 {
554 css::uno::Reference< css::xml::sax::XFastAttributeList >
556 css::uno::Reference< css::container::XNameContainer >
560
561 public:
563 sal_Int32 nElement,
564 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer);
565
566 // SvXMLImportContext overridables
567 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
568 sal_Int32 nElement,
569 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
570 virtual void SAL_CALL startFastElement(
571 sal_Int32 nElement,
572 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttrList) override;
573 private:
575 sal_Int32 nElement,
577 };
578
582 {
583 public:
585 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
586 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
588
589 // SvXMLImportContext overridables
590 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
591 sal_Int32 nElement,
592 const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
593 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
594
595 private:
596 // OElementImport overridables
597 virtual css::uno::Reference< css::beans::XPropertySet > createElement() override;
598
599 css::uno::Reference< css::container::XNameContainer > m_xMeAsContainer;
600 };
601
605 {
606 public:
608 OFormLayerXMLImport_Impl& _rImport, IEventAttacherManager& _rEventManager,
609 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer
610 );
611
612 private:
613 // SvXMLImportContext overridables
614 virtual void SAL_CALL startFastElement(
615 sal_Int32 nElement,
616 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList) override;
617 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
618
619 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
620 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
621
622 // OPropertyImport overridables
623 virtual bool handleAttribute(sal_Int32 nElement, const OUString& _rValue) override;
624
625 // OElementImport overridables
626 virtual css::uno::Reference< css::beans::XPropertySet >
627 createElement() override;
628
629 virtual OUString determineDefaultServiceName() const override;
630 void implTranslateStringListProperty(const OUString& _rPropertyName, const OUString& _rValue);
631
632 css::uno::Reference< css::container::XNameContainer > m_xMeAsContainer;
633 };
634
635 //= OXMLDataSourceImport
637 {
638 public:
640 ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList
641 ,const css::uno::Reference< css::beans::XPropertySet >& _xElement);
642 };
643
644 //= OColumnImport
645 template <class BASE>
647 IEventAttacherManager& _rEventManager,
648 const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer,
650 :BASE(_rImport, _rEventManager, _rxParentContainer, _eType)
651 ,m_xColumnFactory(_rxParentContainer, css::uno::UNO_QUERY)
652 {
653 OSL_ENSURE(m_xColumnFactory.is(), "OColumnImport::OColumnImport: invalid parent container (no factory)!");
654 }
655
656 // OElementImport overridables
657 template <class BASE>
658 css::uno::Reference< css::beans::XPropertySet > OColumnImport< BASE >::createElement()
659 {
660 css::uno::Reference< css::beans::XPropertySet > xReturn;
661 // no call to the base class' method. We have to use the grid column factory
662 if (m_xColumnFactory.is())
663 {
664 // create the column
665 xReturn = m_xColumnFactory->createColumn(this->m_sServiceName);
666 OSL_ENSURE(xReturn.is(), "OColumnImport::createElement: the factory returned an invalid object!");
667 }
668 return xReturn;
669 }
670
671} // namespace xmloff
672
673/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
friend class SvXMLImport
Definition: xmlictxt.hxx:49
A specialized version of the <type>OControlImport</type> class, which handles the target frame for im...
OButtonImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
helper class importing a single grid column (without the <form:column> element wrapping the column).
OColumnImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
css::uno::Reference< css::form::XGridColumnFactory > m_xColumnFactory
virtual css::uno::Reference< css::beans::XPropertySet > createElement() override
OControlImport * implCreateChildContext(sal_Int32 nElement, OControlElement::ElementType _eType)
OColumnWrapperImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, sal_Int32 nElement, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer)
IEventAttacherManager & m_rEventManager
OFormLayerXMLImport_Impl & m_rFormImport
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
css::uno::Reference< css::xml::sax::XFastAttributeList > m_xOwnAttributes
css::uno::Reference< css::container::XNameContainer > m_xParentContainer
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
helper class for importing a single <form:item> element.
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override
OListAndComboImportRef m_xListBoxImport
OComboItemImport(SvXMLImport &_rImport, OListAndComboImportRef _xListBox)
helper for translating between control types and XML tags
helper class for importing the description of a single control
OUString m_sSubmissionID
name of a submission (xforms:submission attribute)
static void implTranslateValueProperty(const css::uno::Reference< css::beans::XPropertySetInfo > &_rxPropInfo, css::beans::PropertyValue &_rPropValue)
OUString m_sListBindingID
name of a list binding (form:xforms-list-source attribute)
void doRegisterXFormsValueBinding(const OUString &)
register the given XForms binding
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< css::beans::XPropertySet > createElement() override
create the (uninitialized) element which is to represent the read data
css::uno::Reference< css::xml::sax::XFastAttributeList > m_xOuterAttributes
void setElementType(OControlElement::ElementType _eType)
void doRegisterXFormsSubmission(const OUString &)
register the given XForms submission
OUString m_sBoundCellAddress
the address of the calc cell which the control model should be bound to, if applicable
virtual OUString determineDefaultServiceName() const override
void addOuterAttributes(const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxOuterAttribs)
virtual void doRegisterCellValueBinding(const OUString &_rBoundCellAddress)
registers the given cell address as value binding address for our element
OControlElement::ElementType m_eElementType
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
OUString m_sBindingID
name of a value binding (xforms:bind attribute)
PropertyValueArray m_aValueProperties
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
OControlImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer)
void doRegisterXFormsListBinding(const OUString &)
register the given XForms list binding
OControlImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
implements common behaviour for importing forms, controls and columns
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
PropertyGroups::const_iterator impl_matchPropertyGroup(const PropertyGroups &i_propertyGroups) const
virtual css::uno::Reference< css::beans::XPropertySet > createElement()
create the (uninitialized) element which is to represent the read data
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
css::uno::Reference< css::container::XNameContainer > m_xParentContainer
the parent container to insert the new element into
virtual ~OElementImport() override
OElementImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer)
ctor
bool tryGenericAttribute(sal_Int32 nElement, const OUString &_rValue)
to be called from within handleAttribute, checks whether the given attribute is covered by our generi...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
IEventAttacherManager & m_rEventManager
css::uno::Reference< css::beans::XPropertySet > m_xElement
the element we're creating. Valid after StartElement
OFormLayerXMLImport_Impl & m_rFormImport
OUString implGetDefaultName() const
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
void disableImplicitGenericAttributeHandling()
controls whether |handleAttribute| implicitly calls |tryGenericAttribute|, or whether the derived cla...
const XMLTextStyleContext * m_pStyleElement
virtual OUString determineDefaultServiceName() const
virtual void registerEvents(const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) override
void simulateDefaultedAttribute(sal_Int32 nElement, const OUString &_rPropertyName, const char *_pAttributeDefault)
can be used to handle properties where the attribute default and the property default differ.
helper class which allows fast translation of xml tag names into element types.
static ElementType getElementType(sal_Int32 nToken)
static std::map< sal_Int32, ElementType > s_sElementTranslations2
std::map< OUString, ElementType > MapString2Element
helper class importing a single <form:form> element
css::uno::Reference< css::container::XNameContainer > m_xMeAsContainer
virtual css::uno::Reference< css::beans::XPropertySet > createElement() override
create the (uninitialized) element which is to represent the read data
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual OUString determineDefaultServiceName() const override
OFormImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer)
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
void implTranslateStringListProperty(const OUString &_rPropertyName, const OUString &_rValue)
helper class importing a single <form:grid> element
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
OGridImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
css::uno::Reference< css::container::XNameContainer > m_xMeAsContainer
virtual css::uno::Reference< css::beans::XPropertySet > createElement() override
create the (uninitialized) element which is to represent the read data
OImagePositionImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
css::uno::Reference< css::graphic::XGraphic > m_xGraphic
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
A specialized version of the <type>OControlImport</type> class, which handles attributes / sub elemen...
std::vector< sal_Int16 > m_aDefaultSelectedSeq
void implPushBackLabel(const OUString &_rLabel)
bool m_bEncounteredLSAttrib
number of empty value items encountered during reading
std::vector< sal_Int16 > m_aSelectedSeq
void implPushBackValue(const OUString &_rValue)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual void doRegisterCellValueBinding(const OUString &_rBoundCellAddress) override
registers the given cell address as value binding address for our element
sal_Int32 m_nEmptyValueItems
number of empty list items encountered during reading
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
std::vector< OUString > m_aValueList
std::vector< OUString > m_aListSource
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override
sal_Int32 m_nEmptyListItems
the cell range which acts as list source for the control
OListAndComboImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
<TRUE> if and only if we should use a cell value binding which exchanges the selection index (instead...
helper class for importing a single <form:option> element.
OListOptionImport(SvXMLImport &_rImport, OListAndComboImportRef _xListBox)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override
OListAndComboImportRef m_xListBoxImport
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
OPasswordImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
Helper class for importing property values.
::std::vector< css::beans::PropertyValue > PropertyValueArray
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
ORadioImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
OReferredControlImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer)
A specialized version of the <type>OControlImport</type> class, which handles text like controls whic...
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
css::uno::Reference< css::text::XTextCursor > m_xCursor
css::uno::Reference< css::text::XTextCursor > m_xOldCursor
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
OTextLikeImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
a specialized version of the <type>OControlImport</type> class, which is able to handle attributes wh...
OURLReferenceImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
A specialized version of the <type>OControlImport</type> class, which imports the value-range element...
virtual bool handleAttribute(sal_Int32 nElement, const OUString &_rValue) override
handle one single attribute.
OValueRangeImport(OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override
OXMLDataSourceImport(SvXMLImport &_rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, const css::uno::Reference< css::beans::XPropertySet > &_xElement)
ElementType
::std::vector< PropertyDescriptionList > PropertyGroups
const OControlElement::ElementType & operator++(OControlElement::ElementType &_e)
rtl::Reference< OListAndComboImport > OListAndComboImportRef
BASE