1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLSCRIPT_SOURCE_XMLDLG_IMEXP_IMP_SHARE_HXX
21 #define INCLUDED_XMLSCRIPT_SOURCE_XMLDLG_IMEXP_IMP_SHARE_HXX
25 #include <xmlscript/xmldlg_imexp.hxx>
26 #include <xmlscript/xmllib_imexp.hxx>
27 #include <xmlscript/xmlmod_imexp.hxx>
28 #include <cppuhelper/implbase.hxx>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
32 #include <com/sun/star/container/XNameContainer.hpp>
33 #include <com/sun/star/beans/XPropertySet.hpp>
34 #include <com/sun/star/util/MalformedNumberFormatException.hpp>
35 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
36 #include <com/sun/star/awt/XControlModel.hpp>
37 #include <com/sun/star/awt/FontDescriptor.hpp>
38 #include <com/sun/star/awt/FontEmphasisMark.hpp>
39 #include <com/sun/star/awt/FontRelief.hpp>
40 #include <com/sun/star/xml/input/XRoot.hpp>
41 #include <com/sun/star/xml/sax/SAXException.hpp>
42 #include <com/sun/star/container/ElementExistException.hpp>
43 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
44 #include <osl/diagnose.h>
45 #include <rtl/ref.hxx>
52 inline sal_Int32
toInt32( OUString
const & rStr
)
55 if (rStr
.getLength() > 2 && rStr
[ 0 ] == '0' && rStr
[ 1 ] == 'x')
56 nVal
= rStr
.copy( 2 ).toUInt32( 16 );
58 nVal
= rStr
.toInt32();
62 inline bool getBoolAttr(
63 sal_Bool
* pRet
, OUString
const & rAttrName
,
64 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
67 OUString
aValue( xAttributes
->getValueByUidName( nUid
, rAttrName
) );
68 if (!aValue
.isEmpty())
70 if ( aValue
== "true" )
75 else if ( aValue
== "false" )
82 throw css::xml::sax::SAXException(
83 rAttrName
+ ": no boolean value (true|false)!",
84 css::uno::Reference
<css::uno::XInterface
>(), css::uno::Any() );
90 inline bool getStringAttr(
91 OUString
* pRet
, OUString
const & rAttrName
,
92 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
95 *pRet
= xAttributes
->getValueByUidName( nUid
, rAttrName
);
96 return (!pRet
->isEmpty());
99 inline bool getLongAttr(
100 sal_Int32
* pRet
, OUString
const & rAttrName
,
101 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
104 OUString
aValue( xAttributes
->getValueByUidName( nUid
, rAttrName
) );
105 if (!aValue
.isEmpty())
107 *pRet
= toInt32( aValue
);
116 : public ::cppu::WeakImplHelper
< css::xml::input::XRoot
>
118 friend class ImportContext
;
120 css::uno::Reference
< css::uno::XComponentContext
> _xContext
;
121 css::uno::Reference
< css::util::XNumberFormatsSupplier
> _xSupplier
;
123 std::shared_ptr
< std::vector
< OUString
> > _pStyleNames
;
124 std::shared_ptr
< std::vector
< css::uno::Reference
< css::xml::input::XElement
> > > _pStyles
;
126 css::uno::Reference
< css::frame::XModel
> _xDoc
;
128 css::uno::Reference
< css::container::XNameContainer
> _xDialogModel
;
129 css::uno::Reference
< css::lang::XMultiServiceFactory
> _xDialogModelFactory
;
131 sal_Int32 XMLNS_DIALOGS_UID
, XMLNS_SCRIPT_UID
;
134 sal_Int32 nUid
, OUString
const & rLocalName
) const
136 return ((XMLNS_SCRIPT_UID
== nUid
&& (rLocalName
== "event" || rLocalName
== "listener-event" )) ||
137 (XMLNS_DIALOGS_UID
== nUid
&& rLocalName
== "event" ));
141 OUString
const & rStyleId
,
142 css::uno::Reference
< css::xml::input::XElement
> const & xStyle
);
143 css::uno::Reference
< css::xml::input::XElement
> getStyle(
144 OUString
const & rStyleId
) const;
146 css::uno::Reference
< css::uno::XComponentContext
>
147 const & getComponentContext() const { return _xContext
; }
148 css::uno::Reference
< css::util::XNumberFormatsSupplier
>
149 const & getNumberFormatsSupplier();
152 css::uno::Reference
<css::uno::XComponentContext
> const & xContext
,
153 css::uno::Reference
<css::container::XNameContainer
>
154 const & xDialogModel
,
155 std::shared_ptr
< std::vector
< OUString
> > const & pStyleNames
,
156 std::shared_ptr
< std::vector
< css::uno::Reference
< css::xml::input::XElement
> > > const & pStyles
,
157 css::uno::Reference
<css::frame::XModel
> const & xDoc
)
158 : _xContext( xContext
)
159 , _pStyleNames( pStyleNames
)
160 , _pStyles( pStyles
)
162 , _xDialogModel( xDialogModel
)
163 , _xDialogModelFactory( xDialogModel
, css::uno::UNO_QUERY_THROW
)
164 , XMLNS_DIALOGS_UID( 0 )
165 , XMLNS_SCRIPT_UID( 0 )
166 { OSL_ASSERT( _xDialogModel
.is() && _xDialogModelFactory
.is() &&
168 DialogImport( const DialogImport
& rOther
) :
169 ::cppu::WeakImplHelper
< css::xml::input::XRoot
>()
170 , _xContext( rOther
._xContext
)
171 , _xSupplier( rOther
._xSupplier
)
172 , _pStyleNames( rOther
._pStyleNames
)
173 , _pStyles( rOther
._pStyles
)
174 , _xDoc( rOther
._xDoc
)
175 , _xDialogModel( rOther
._xDialogModel
)
176 , _xDialogModelFactory( rOther
._xDialogModelFactory
)
177 , XMLNS_DIALOGS_UID( rOther
.XMLNS_DIALOGS_UID
)
178 , XMLNS_SCRIPT_UID( rOther
.XMLNS_SCRIPT_UID
) {}
180 virtual ~DialogImport() override
;
182 const css::uno::Reference
< css::frame::XModel
>& getDocOwner() const { return _xDoc
; }
185 virtual void SAL_CALL
startDocument(
186 css::uno::Reference
< css::xml::input::XNamespaceMapping
>
187 const & xNamespaceMapping
) override
;
188 virtual void SAL_CALL
endDocument() override
;
189 virtual void SAL_CALL
processingInstruction(
190 OUString
const & rTarget
, OUString
const & rData
) override
;
191 virtual void SAL_CALL
setDocumentLocator(
192 css::uno::Reference
< css::xml::sax::XLocator
> const & xLocator
) override
;
193 virtual css::uno::Reference
< css::xml::input::XElement
>
194 SAL_CALL
startRootElement(
195 sal_Int32 nUid
, OUString
const & rLocalName
,
196 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
200 : public ::cppu::WeakImplHelper
< css::xml::input::XElement
>
203 rtl::Reference
<DialogImport
> const m_xImport
;
204 rtl::Reference
<ElementBase
> const m_xParent
;
206 const sal_Int32 _nUid
;
207 const OUString _aLocalName
;
209 const css::uno::Reference
< css::xml::input::XAttributes
> _xAttributes
;
213 sal_Int32 nUid
, OUString
const & rLocalName
,
214 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
215 ElementBase
* pParent
, DialogImport
* pImport
);
216 virtual ~ElementBase() override
;
219 virtual css::uno::Reference
<css::xml::input::XElement
> SAL_CALL
getParent() override
;
220 virtual OUString SAL_CALL
getLocalName() override
;
221 virtual sal_Int32 SAL_CALL
getUid() override
;
222 virtual css::uno::Reference
< css::xml::input::XAttributes
>
223 SAL_CALL
getAttributes() override
;
224 virtual void SAL_CALL
ignorableWhitespace(
225 OUString
const & rWhitespaces
) override
;
226 virtual void SAL_CALL
characters( OUString
const & rChars
) override
;
227 virtual void SAL_CALL
processingInstruction(
228 OUString
const & Target
, OUString
const & Data
) override
;
229 virtual void SAL_CALL
endElement() override
;
230 virtual css::uno::Reference
< css::xml::input::XElement
>
231 SAL_CALL
startChildElement(
232 sal_Int32 nUid
, OUString
const & rLocalName
,
233 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
240 virtual css::uno::Reference
< css::xml::input::XElement
>
241 SAL_CALL
startChildElement(
242 sal_Int32 nUid
, OUString
const & rLocalName
,
243 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
246 OUString
const & rLocalName
,
247 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
248 ElementBase
* pParent
, DialogImport
* pImport
)
249 : ElementBase( pImport
->XMLNS_DIALOGS_UID
,
250 rLocalName
, xAttributes
, pParent
, pImport
)
257 sal_Int32 _backgroundColor
;
258 sal_Int32 _textColor
;
259 sal_Int32 _textLineColor
;
261 sal_Int32 _borderColor
;
262 css::awt::FontDescriptor _descr
;
263 sal_Int16 _fontRelief
;
264 sal_Int16 _fontEmphasisMark
;
265 sal_Int32 _fillColor
;
266 sal_Int16 _visualEffect
;
268 // current highest mask: 0x40
269 short _inited
, _hasValue
;
271 void setFontProperties(
272 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
) const;
275 virtual css::uno::Reference
< css::xml::input::XElement
>
276 SAL_CALL
startChildElement(
277 sal_Int32 nUid
, OUString
const & rLocalName
,
278 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
279 virtual void SAL_CALL
endElement() override
;
281 void importTextColorStyle(
282 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
283 void importTextLineColorStyle(
284 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
285 void importFillColorStyle(
286 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
287 void importBackgroundColorStyle(
288 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
289 void importFontStyle(
290 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
291 void importBorderStyle(
292 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
293 void importVisualEffectStyle(
294 css::uno::Reference
< css::beans::XPropertySet
> const & xProps
);
297 OUString
const & rLocalName
,
298 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
299 ElementBase
* pParent
, DialogImport
* pImport
)
300 : ElementBase( pImport
->XMLNS_DIALOGS_UID
,
301 rLocalName
, xAttributes
, pParent
, pImport
)
302 , _backgroundColor(0)
307 , _fontRelief( css::awt::FontRelief::NONE
)
308 , _fontEmphasisMark( css::awt::FontEmphasisMark::NONE
)
317 class MenuPopupElement
320 std::vector
< OUString
> _itemValues
;
321 std::vector
< sal_Int16
> _itemSelected
;
323 css::uno::Sequence
< OUString
> getItemValues();
324 css::uno::Sequence
< sal_Int16
> getSelectedItems();
326 virtual css::uno::Reference
< css::xml::input::XElement
>
327 SAL_CALL
startChildElement(
328 sal_Int32 nUid
, OUString
const & rLocalName
,
329 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
332 OUString
const & rLocalName
,
333 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
334 ElementBase
* pParent
, DialogImport
* pImport
)
335 : ElementBase( pImport
->XMLNS_DIALOGS_UID
,
336 rLocalName
, xAttributes
, pParent
, pImport
)
343 friend class EventElement
;
346 sal_Int32 _nBasePosX
, _nBasePosY
;
348 std::vector
< css::uno::Reference
< css::xml::input::XElement
> > _events
;
350 OUString
getControlId(
351 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
352 OUString
getControlModelName(
353 OUString
const& rDefaultModel
,
354 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
355 css::uno::Reference
< css::xml::input::XElement
> getStyle(
356 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
358 std::vector
<css::uno::Reference
< css::xml::input::XElement
> >& getEvents()
362 OUString
const & rLocalName
,
363 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
364 ElementBase
* pParent
, DialogImport
* pImport
);
370 DialogImport
* const _pImport
;
371 const css::uno::Reference
< css::beans::XPropertySet
> _xControlModel
;
376 DialogImport
* pImport
,
377 css::uno::Reference
< css::beans::XPropertySet
> const & xControlModel_
,
378 OUString
const & id
)
379 : _pImport( pImport
),
380 _xControlModel( xControlModel_
),
382 { OSL_ASSERT( _xControlModel
.is() ); }
384 const css::uno::Reference
< css::beans::XPropertySet
>& getControlModel() const
385 { return _xControlModel
; }
387 void importScollableSettings( css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
);
389 sal_Int32 nBaseX
, sal_Int32 nBaseY
,
390 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
391 bool supportPrintable
= true );
393 std::vector
< css::uno::Reference
< css::xml::input::XElement
> >
396 bool importStringProperty(
397 OUString
const & rPropName
, OUString
const & rAttrName
,
398 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
399 bool importDoubleProperty(
400 OUString
const & rPropName
, OUString
const & rAttrName
,
401 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
402 bool importBooleanProperty(
403 OUString
const & rPropName
, OUString
const & rAttrName
,
404 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
405 bool importShortProperty(
406 OUString
const & rPropName
, OUString
const & rAttrName
,
407 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
408 bool importLongProperty(
409 OUString
const & rPropName
, OUString
const & rAttrName
,
410 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
411 bool importLongProperty(
413 OUString
const & rPropName
, OUString
const & rAttrName
,
414 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
415 bool importHexLongProperty(
416 OUString
const & rPropName
, OUString
const & rAttrName
,
417 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
418 bool importAlignProperty(
419 OUString
const & rPropName
, OUString
const & rAttrName
,
420 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
421 bool importVerticalAlignProperty(
422 OUString
const & rPropName
, OUString
const & rAttrName
,
423 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
424 bool importGraphicOrImageProperty(OUString
const & rAttrName
,
425 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
);
426 bool importImageAlignProperty(
427 OUString
const & rPropName
, OUString
const & rAttrName
,
428 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
429 bool importImagePositionProperty(
430 OUString
const & rPropName
, OUString
const & rAttrName
,
431 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
432 bool importDateProperty(
433 OUString
const & rPropName
, OUString
const & rAttrName
,
434 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
435 bool importDateFormatProperty(
436 OUString
const & rPropName
, OUString
const & rAttrName
,
437 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
438 bool importTimeProperty(
439 OUString
const & rPropName
, OUString
const & rAttrName
,
440 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
441 bool importTimeFormatProperty(
442 OUString
const & rPropName
, OUString
const & rAttrName
,
443 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
444 bool importOrientationProperty(
445 OUString
const & rPropName
, OUString
const & rAttrName
,
446 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
447 bool importButtonTypeProperty(
448 OUString
const & rPropName
, OUString
const & rAttrName
,
449 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
450 bool importLineEndFormatProperty(
451 OUString
const & rPropName
, OUString
const & rAttrName
,
452 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
453 bool importSelectionTypeProperty(
454 OUString
const & rPropName
, OUString
const & rAttrName
,
455 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
456 bool importDataAwareProperty(
457 OUString
const & rPropName
,
458 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
459 bool importImageScaleModeProperty(
460 ::rtl::OUString
const & rPropName
, ::rtl::OUString
const & rAttrName
,
461 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
);
464 class ControlImportContext
: public ImportContext
467 ControlImportContext(
468 DialogImport
* pImport
,
469 OUString
const & rId
, OUString
const & rControlName
)
472 css::uno::Reference
< css::beans::XPropertySet
>(
473 pImport
->_xDialogModelFactory
->createInstance( rControlName
),
474 css::uno::UNO_QUERY_THROW
), rId
)
476 ControlImportContext(
477 DialogImport
* pImport
,
478 const css::uno::Reference
< css::beans::XPropertySet
>& xProps
, OUString
const & rControlName
)
485 /// @throws css::xml::sax::SAXException
486 /// @throws css::uno::RuntimeException
491 _pImport
->_xDialogModel
->insertByName(
492 _aId
, css::uno::makeAny(
493 css::uno::Reference
<css::awt::XControlModel
>::query(
494 _xControlModel
) ) );
496 catch(const css::container::ElementExistException
&e
)
498 throw css::lang::WrappedTargetRuntimeException("", e
.Context
, makeAny(e
));
504 : public ControlElement
507 virtual css::uno::Reference
< css::xml::input::XElement
>
508 SAL_CALL
startChildElement(
509 sal_Int32 nUid
, OUString
const & rLocalName
,
510 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
511 virtual void SAL_CALL
endElement() override
;
514 OUString
const & rLocalName
,
515 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
516 DialogImport
* pImport
)
517 : ControlElement( rLocalName
, xAttributes
, nullptr, pImport
)
525 virtual void SAL_CALL
endElement() override
;
528 sal_Int32 nUid
, OUString
const & rLocalName
,
529 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
530 ElementBase
* pParent
, DialogImport
* pImport
)
531 : ElementBase( nUid
, rLocalName
, xAttributes
, pParent
, pImport
)
535 class BulletinBoardElement
536 : public ControlElement
539 virtual css::uno::Reference
< css::xml::input::XElement
>
540 SAL_CALL
startChildElement(
541 sal_Int32 nUid
, OUString
const & rLocalName
,
542 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
544 BulletinBoardElement(
545 OUString
const & rLocalName
,
546 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
547 ElementBase
* pParent
, DialogImport
* pImport
);
551 : public ControlElement
554 virtual css::uno::Reference
< css::xml::input::XElement
>
555 SAL_CALL
startChildElement(
556 sal_Int32 nUid
, OUString
const & rLocalName
,
557 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
558 virtual void SAL_CALL
endElement() override
;
561 OUString
const & rLocalName
,
562 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
563 ElementBase
* pParent
, DialogImport
* pImport
)
564 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
568 class CheckBoxElement
569 : public ControlElement
572 virtual css::uno::Reference
< css::xml::input::XElement
>
573 SAL_CALL
startChildElement(
574 sal_Int32 nUid
, OUString
const & rLocalName
,
575 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
576 virtual void SAL_CALL
endElement() override
;
579 OUString
const & rLocalName
,
580 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
581 ElementBase
* pParent
, DialogImport
* pImport
)
582 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
586 class ComboBoxElement
587 : public ControlElement
589 css::uno::Reference
< css::xml::input::XElement
> _popup
;
591 virtual css::uno::Reference
< css::xml::input::XElement
>
592 SAL_CALL
startChildElement(
593 sal_Int32 nUid
, OUString
const & rLocalName
,
594 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
595 virtual void SAL_CALL
endElement() override
;
598 OUString
const & rLocalName
,
599 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
600 ElementBase
* pParent
, DialogImport
* pImport
)
601 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
605 class MenuListElement
606 : public ControlElement
608 css::uno::Reference
< css::xml::input::XElement
> _popup
;
610 virtual css::uno::Reference
< css::xml::input::XElement
>
611 SAL_CALL
startChildElement(
612 sal_Int32 nUid
, OUString
const & rLocalName
,
613 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
614 virtual void SAL_CALL
endElement() override
;
617 OUString
const & rLocalName
,
618 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
619 ElementBase
* pParent
, DialogImport
* pImport
)
620 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
625 : public ControlElement
628 virtual css::uno::Reference
< css::xml::input::XElement
>
629 SAL_CALL
startChildElement(
630 sal_Int32 nUid
, OUString
const & rLocalName
,
631 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
634 OUString
const & rLocalName
,
635 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
636 ElementBase
* pParent
, DialogImport
* pImport
)
637 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
641 class RadioGroupElement
642 : public ControlElement
644 std::vector
< css::uno::Reference
< css::xml::input::XElement
> > _radios
;
646 virtual css::uno::Reference
< css::xml::input::XElement
>
647 SAL_CALL
startChildElement(
648 sal_Int32 nUid
, OUString
const & rLocalName
,
649 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
650 void SAL_CALL
endElement() override
;
653 OUString
const & rLocalName
,
654 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
655 ElementBase
* pParent
, DialogImport
* pImport
)
656 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
660 class TitledBoxElement
661 : public BulletinBoardElement
664 std::vector
< css::uno::Reference
< css::xml::input::XElement
> > _radios
;
666 virtual css::uno::Reference
< css::xml::input::XElement
>
667 SAL_CALL
startChildElement(
668 sal_Int32 nUid
, OUString
const & rLocalName
,
669 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
670 virtual void SAL_CALL
endElement() override
;
673 OUString
const & rLocalName
,
674 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
675 ElementBase
* pParent
, DialogImport
* pImport
)
676 : BulletinBoardElement( rLocalName
, xAttributes
, pParent
, pImport
)
681 : public ControlElement
684 virtual css::uno::Reference
< css::xml::input::XElement
>
685 SAL_CALL
startChildElement(
686 sal_Int32 nUid
, OUString
const & rLocalName
,
687 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
688 virtual void SAL_CALL
endElement() override
;
691 OUString
const & rLocalName
,
692 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
693 ElementBase
* pParent
, DialogImport
* pImport
)
694 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
697 class FixedHyperLinkElement
698 : public ControlElement
701 virtual css::uno::Reference
< css::xml::input::XElement
>
702 SAL_CALL
startChildElement(
703 sal_Int32 nUid
, OUString
const & rLocalName
,
704 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
705 virtual void SAL_CALL
endElement() override
;
707 FixedHyperLinkElement(
708 OUString
const & rLocalName
,
709 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
710 ElementBase
* pParent
, DialogImport
* pImport
)
711 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
715 class TextFieldElement
716 : public ControlElement
719 virtual css::uno::Reference
< css::xml::input::XElement
>
720 SAL_CALL
startChildElement(
721 sal_Int32 nUid
, OUString
const & rLocalName
,
722 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
723 virtual void SAL_CALL
endElement() override
;
726 OUString
const & rLocalName
,
727 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
728 ElementBase
* pParent
, DialogImport
* pImport
)
729 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
733 class ImageControlElement
734 : public ControlElement
737 virtual css::uno::Reference
< css::xml::input::XElement
>
738 SAL_CALL
startChildElement(
739 sal_Int32 nUid
, OUString
const & rLocalName
,
740 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
741 virtual void SAL_CALL
endElement() override
;
744 OUString
const & rLocalName
,
745 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
746 ElementBase
* pParent
, DialogImport
* pImport
)
747 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
751 class FileControlElement
752 : public ControlElement
755 virtual css::uno::Reference
< css::xml::input::XElement
>
756 SAL_CALL
startChildElement(
757 sal_Int32 nUid
, OUString
const & rLocalName
,
758 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
759 virtual void SAL_CALL
endElement() override
;
762 OUString
const & rLocalName
,
763 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
764 ElementBase
* pParent
, DialogImport
* pImport
)
765 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
769 class TreeControlElement
770 : public ControlElement
773 virtual css::uno::Reference
< css::xml::input::XElement
>
774 SAL_CALL
startChildElement(
775 sal_Int32 nUid
, OUString
const & rLocalName
,
776 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
777 virtual void SAL_CALL
endElement() override
;
780 OUString
const & rLocalName
,
781 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
782 ElementBase
* pParent
, DialogImport
* pImport
)
783 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
787 class CurrencyFieldElement
788 : public ControlElement
791 virtual css::uno::Reference
< css::xml::input::XElement
>
792 SAL_CALL
startChildElement(
793 sal_Int32 nUid
, OUString
const & rLocalName
,
794 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
795 virtual void SAL_CALL
endElement() override
;
797 CurrencyFieldElement(
798 OUString
const & rLocalName
,
799 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
800 ElementBase
* pParent
, DialogImport
* pImport
)
801 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
805 class DateFieldElement
806 : public ControlElement
809 virtual css::uno::Reference
< css::xml::input::XElement
>
810 SAL_CALL
startChildElement(
811 sal_Int32 nUid
, OUString
const & rLocalName
,
812 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
813 virtual void SAL_CALL
endElement() override
;
816 OUString
const & rLocalName
,
817 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
818 ElementBase
* pParent
, DialogImport
* pImport
)
819 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
823 class NumericFieldElement
824 : public ControlElement
827 virtual css::uno::Reference
< css::xml::input::XElement
>
828 SAL_CALL
startChildElement(
829 sal_Int32 nUid
, OUString
const & rLocalName
,
830 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
831 virtual void SAL_CALL
endElement() override
;
834 OUString
const & rLocalName
,
835 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
836 ElementBase
* pParent
, DialogImport
* pImport
)
837 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
841 class TimeFieldElement
842 : public ControlElement
845 virtual css::uno::Reference
< css::xml::input::XElement
>
846 SAL_CALL
startChildElement(
847 sal_Int32 nUid
, OUString
const & rLocalName
,
848 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
849 virtual void SAL_CALL
endElement() override
;
852 OUString
const & rLocalName
,
853 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
854 ElementBase
* pParent
, DialogImport
* pImport
)
855 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
859 class PatternFieldElement
860 : public ControlElement
863 virtual css::uno::Reference
< css::xml::input::XElement
>
864 SAL_CALL
startChildElement(
865 sal_Int32 nUid
, OUString
const & rLocalName
,
866 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
867 virtual void SAL_CALL
endElement() override
;
870 OUString
const & rLocalName
,
871 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
872 ElementBase
* pParent
, DialogImport
* pImport
)
873 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
877 class FormattedFieldElement
878 : public ControlElement
881 virtual css::uno::Reference
< css::xml::input::XElement
>
882 SAL_CALL
startChildElement(
883 sal_Int32 nUid
, OUString
const & rLocalName
,
884 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
885 virtual void SAL_CALL
endElement() override
;
887 FormattedFieldElement(
888 OUString
const & rLocalName
,
889 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
890 ElementBase
* pParent
, DialogImport
* pImport
)
891 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
895 class FixedLineElement
896 : public ControlElement
899 virtual css::uno::Reference
< css::xml::input::XElement
>
900 SAL_CALL
startChildElement(
901 sal_Int32 nUid
, OUString
const & rLocalName
,
902 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
903 virtual void SAL_CALL
endElement() override
;
906 OUString
const & rLocalName
,
907 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
908 ElementBase
* pParent
, DialogImport
* pImport
)
909 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
913 class ScrollBarElement
914 : public ControlElement
917 virtual css::uno::Reference
< css::xml::input::XElement
>
918 SAL_CALL
startChildElement(
919 sal_Int32 nUid
, OUString
const & rLocalName
,
920 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
921 virtual void SAL_CALL
endElement() override
;
924 OUString
const & rLocalName
,
925 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
926 ElementBase
* pParent
, DialogImport
* pImport
)
927 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
931 class SpinButtonElement
932 : public ControlElement
935 virtual css::uno::Reference
< css::xml::input::XElement
>
936 SAL_CALL
startChildElement(
937 sal_Int32 nUid
, OUString
const & rLocalName
,
938 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
939 virtual void SAL_CALL
endElement() override
;
942 OUString
const & rLocalName
,
943 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
944 ElementBase
* pParent
, DialogImport
* pImport
)
945 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
950 : public ControlElement
953 virtual css::uno::Reference
< css::xml::input::XElement
>
954 SAL_CALL
startChildElement(
955 sal_Int32 nUid
, OUString
const & rLocalName
,
956 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
957 virtual void SAL_CALL
endElement() override
;
960 OUString
const & rLocalName
,
961 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
962 ElementBase
* pParent
, DialogImport
* pImport
)
963 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
965 m_xContainer
.set( m_xImport
->_xDialogModelFactory
->createInstance( "com.sun.star.awt.UnoMultiPageModel" ), css::uno::UNO_QUERY
);
968 css::uno::Reference
< css::container::XNameContainer
> m_xContainer
;
972 : public ControlElement
976 virtual css::uno::Reference
< css::xml::input::XElement
>
977 SAL_CALL
startChildElement(
978 sal_Int32 nUid
, OUString
const & rLocalName
,
979 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
980 virtual void SAL_CALL
endElement() override
;
983 OUString
const & rLocalName
,
984 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
985 ElementBase
* pParent
, DialogImport
* pImport
)
986 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
989 css::uno::Reference
< css::container::XNameContainer
> m_xContainer
;
993 : public ControlElement
996 virtual css::uno::Reference
< css::xml::input::XElement
>
997 SAL_CALL
startChildElement(
998 sal_Int32 nUid
, OUString
const & rLocalName
,
999 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
1000 virtual void SAL_CALL
endElement() override
;
1003 OUString
const & rLocalName
,
1004 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
1005 ElementBase
* pParent
, DialogImport
* pImport
)
1006 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
1008 m_xContainer
.set( m_xImport
->_xDialogModelFactory
->createInstance( "com.sun.star.awt.UnoPageModel" ), css::uno::UNO_QUERY
);
1011 css::uno::Reference
< css::container::XNameContainer
> m_xContainer
;
1014 class ProgressBarElement
1015 : public ControlElement
1018 virtual css::uno::Reference
< css::xml::input::XElement
>
1019 SAL_CALL
startChildElement(
1020 sal_Int32 nUid
, OUString
const & rLocalName
,
1021 css::uno::Reference
<css::xml::input::XAttributes
> const & xAttributes
) override
;
1022 virtual void SAL_CALL
endElement() override
;
1025 OUString
const & rLocalName
,
1026 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
1027 ElementBase
* pParent
, DialogImport
* pImport
)
1028 : ControlElement( rLocalName
, xAttributes
, pParent
, pImport
)
1034 #endif // INCLUDED_XMLSCRIPT_SOURCE_XMLDLG_IMEXP_IMP_SHARE_HXX
1036 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */