21#include <com/sun/star/beans/XPropertySet.hpp>
22#include <com/sun/star/util/MalformedNumberFormatException.hpp>
23#include <com/sun/star/xml/sax/SAXException.hpp>
37 sal_Int32 nUid, OUString
const & rLocalName,
38 Reference< xml::input::XAttributes >
const & xAttributes )
47 else if ( rLocalName ==
"bulletinboard" )
54 else if ( rLocalName ==
"title" )
62 SAL_INFO(
"xmlscript.xmldlg",
"****** ARGGGGG!!!! **********");
63 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
71 Reference< beans::XPropertySet > xProps(
m_xContainer, UNO_QUERY_THROW );
75 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
89 xControlModel->setPropertyValue(
"Label" ,
Any(
_label ) );
101 sal_Int32 nUid, OUString
const & rLocalName,
102 Reference< xml::input::XAttributes >
const & xAttributes )
108 nUid, rLocalName, xAttributes,
this,
m_pImport );
110 else if ( rLocalName ==
"bulletinboard" )
121 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
127 Reference< beans::XPropertySet > xProps(
m_xContainer, UNO_QUERY_THROW );
131 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
155 sal_Int32 nUid, OUString
const & rLocalName,
156 Reference< xml::input::XAttributes >
const & xAttributes )
162 nUid, rLocalName, xAttributes,
this,
m_pImport );
164 else if ( rLocalName ==
"bulletinboard" )
174 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
180 Reference< beans::XPropertySet > xProps(
m_xContainer, UNO_QUERY_THROW );
184 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
208 sal_Int32 nUid, OUString
const & rLocalName,
209 Reference< xml::input::XAttributes >
const & xAttributes )
214 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
218 nUid, rLocalName, xAttributes,
this,
m_pImport );
229 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
237 ctx.importLongProperty(
"ProgressValueMin",
"value-min",
_xAttributes );
238 ctx.importLongProperty(
"ProgressValueMax",
"value-max",
_xAttributes );
249 sal_Int32 nUid, OUString
const & rLocalName,
250 Reference< xml::input::XAttributes >
const & xAttributes )
255 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
269 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
275 ctx.importOrientationProperty(
"Orientation" ,
"align",
_xAttributes );
276 ctx.importLongProperty(
"BlockIncrement" ,
"pageincrement" ,
_xAttributes );
277 ctx.importLongProperty(
"LineIncrement" ,
"increment" ,
_xAttributes );
284 ctx.importBooleanProperty(
"LiveScroll",
"live-scroll",
_xAttributes );
285 ctx.importHexLongProperty(
"SymbolColor",
"symbol-color",
_xAttributes );
298 sal_Int32 nUid, OUString
const & rLocalName,
299 Reference< xml::input::XAttributes >
const & xAttributes )
304 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
318 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
332 ctx.importHexLongProperty(
"SymbolColor",
"symbol-color" ,
_xAttributes );
344 sal_Int32 nUid, OUString
const & rLocalName,
345 Reference< xml::input::XAttributes >
const & xAttributes )
350 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
364 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
383 sal_Int32 nUid, OUString
const & rLocalName,
384 Reference< xml::input::XAttributes >
const & xAttributes )
389 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
403 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
414 ctx.importBooleanProperty(
"StrictFormat",
"strict-format",
_xAttributes );
415 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
419 ctx.importStringProperty(
"LiteralMask",
"literal-mask",
_xAttributes );
430 sal_Int32 nUid, OUString
const & rLocalName,
431 Reference< xml::input::XAttributes >
const & xAttributes )
436 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
450 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
461 ctx.importBooleanProperty(
"StrictFormat",
"strict-format" ,
_xAttributes );
462 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
464 ctx.importDoubleProperty(
"EffectiveMin",
"value-min" ,
_xAttributes );
471 ctx.getControlModel()->setPropertyValue(
"Repeat" ,
Any(
true) );
474 if (!sDefault.isEmpty())
476 double d = sDefault.toDouble();
477 if (
d != 0.0 || sDefault ==
"0" || sDefault ==
"0.0" )
479 ctx.getControlModel()->setPropertyValue(
"EffectiveDefault",
Any(
d ) );
483 ctx.getControlModel()->setPropertyValue(
"EffectiveDefault",
Any( sDefault ) );
491 if (!sFormat.isEmpty())
496 if (!sLocale.isEmpty())
501 sal_Int32 semi0 = sLocale.indexOf(
';' );
508 sal_Int32 semi1 = sLocale.indexOf(
';', semi0 +1 );
511 SAL_WARN(
"xmlscript.xmldlg",
"format-locale with variant that is ignored: " << sLocale);
512 locale.Language = sLocale.copy( 0, semi0 );
513 locale.Country = sLocale.copy( semi0 +1, semi1 - semi0 -1 );
518 locale.Language = sLocale.copy( 0, semi0 );
519 locale.Country = sLocale.copy( semi0 +1 );
526 Reference< util::XNumberFormats > xFormats(
528 sal_Int32 nKey = xFormats->queryKey( sFormat, locale,
true );
531 nKey = xFormats->addNew( sFormat, locale );
533 ctx.getControlModel()->setPropertyValue(
"FormatKey",
Any( nKey ) );
535 catch (
const util::MalformedNumberFormatException & exc)
540 throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), anyEx );
543 ctx.importBooleanProperty(
"TreatAsNumber",
"treat-as-number" ,
_xAttributes );
544 ctx.importBooleanProperty(
"EnforceFormat",
"enforce-format",
_xAttributes );
557 sal_Int32 nUid, OUString
const & rLocalName,
558 Reference< xml::input::XAttributes >
const & xAttributes )
563 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
577 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
588 ctx.importBooleanProperty(
"StrictFormat",
"strict-format",
_xAttributes );
589 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
590 ctx.importTimeFormatProperty(
"TimeFormat",
"time-format",
_xAttributes );
596 ctx.getControlModel()->setPropertyValue(
"Repeat",
Any(
true) );
598 ctx.importBooleanProperty(
"EnforceFormat",
"enforce-format" ,
_xAttributes );
610 sal_Int32 nUid, OUString
const & rLocalName,
611 Reference< xml::input::XAttributes >
const & xAttributes )
616 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
630 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
640 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
643 ctx.importBooleanProperty(
"StrictFormat",
"strict-format",
_xAttributes );
644 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
645 ctx.importShortProperty(
"DecimalAccuracy",
"decimal-accuracy",
_xAttributes );
646 ctx.importBooleanProperty(
"ShowThousandsSeparator",
"thousands-separator",
_xAttributes );
653 ctx.getControlModel()->setPropertyValue(
"Repeat",
Any(
true) );
654 ctx.importBooleanProperty(
"EnforceFormat",
"enforce-format",
_xAttributes );
665 sal_Int32 nUid, OUString
const & rLocalName,
666 Reference< xml::input::XAttributes >
const & xAttributes )
671 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
685 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
695 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
698 ctx.importBooleanProperty(
"StrictFormat",
"strict-format",
_xAttributes );
699 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
700 ctx.importDateFormatProperty(
"DateFormat",
"date-format",
_xAttributes );
701 ctx.importBooleanProperty(
"DateShowCentury",
"show-century",
_xAttributes );
707 ctx.getControlModel()->setPropertyValue(
"Repeat",
Any(
true) );
710 ctx.importBooleanProperty(
"EnforceFormat",
"enforce-format",
_xAttributes );
721 sal_Int32 nUid, OUString
const & rLocalName,
722 Reference< xml::input::XAttributes >
const & xAttributes )
727 throw xml::sax::SAXException(
"expected event element!" , Reference< XInterface >(),
Any() );
741 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
751 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
754 ctx.importBooleanProperty(
"StrictFormat",
"strict-format",
_xAttributes );
755 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
756 ctx.importStringProperty(
"CurrencySymbol",
"currency-symbol",
_xAttributes );
757 ctx.importShortProperty(
"DecimalAccuracy",
"decimal-accuracy",
_xAttributes );
758 ctx.importBooleanProperty(
"ShowThousandsSeparator",
"thousands-separator",
_xAttributes );
765 ctx.getControlModel()->setPropertyValue(
"Repeat",
Any(
true) );
766 ctx.importBooleanProperty(
"PrependCurrencySymbol",
"prepend-symbol",
_xAttributes );
767 ctx.importBooleanProperty(
"EnforceFormat",
"enforce-format",
_xAttributes );
778 sal_Int32 nUid, OUString
const & rLocalName,
779 Reference< xml::input::XAttributes >
const & xAttributes )
784 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
798 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
808 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
821 sal_Int32 nUid, OUString
const & rLocalName,
822 Reference< xml::input::XAttributes >
const & xAttributes )
827 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
841 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
848 ctx.importSelectionTypeProperty(
"SelectionType",
"selectiontype",
_xAttributes );
849 ctx.importBooleanProperty(
"RootDisplayed",
"rootdisplayed",
_xAttributes );
850 ctx.importBooleanProperty(
"ShowsHandles",
"showshandles",
_xAttributes );
851 ctx.importBooleanProperty(
"ShowsRootHandles",
"showsroothandles" ,
_xAttributes );
854 ctx.importBooleanProperty(
"InvokesStopNodeEditing",
"invokesstopnodeediting",
_xAttributes );
866 sal_Int32 nUid, OUString
const & rLocalName,
867 Reference< xml::input::XAttributes >
const & xAttributes )
872 throw xml::sax::SAXException(
"expected event element!" , Reference< XInterface >(),
Any() );
886 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
892 ctx.importBooleanProperty(
"ScaleImage",
"scale-image",
_xAttributes );
893 ctx.importImageScaleModeProperty(
"ScaleMode" ,
"scale-mode" ,
_xAttributes );
906 sal_Int32 nUid, OUString
const & rLocalName,
907 Reference< xml::input::XAttributes >
const & xAttributes )
912 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
926 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
937 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
951 sal_Int32 nUid, OUString
const & rLocalName,
952 Reference< xml::input::XAttributes >
const & xAttributes )
957 throw xml::sax::SAXException(
"expected event element!" , Reference< XInterface >(),
Any() );
971 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
984 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
998 sal_Int32 nUid, OUString
const & rLocalName,
999 Reference< xml::input::XAttributes >
const & xAttributes )
1004 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
1013 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1029 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
1030 ctx.importBooleanProperty(
"HardLineBreaks",
"hard-linebreaks",
_xAttributes );
1033 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
1038 ctx.importLineEndFormatProperty(
"LineEndFormat",
"lineend-format",
_xAttributes );
1042 SAL_WARN_IF( aValue.getLength() != 1,
"xmlscript.xmldlg",
"### more than one character given for echochar!" );
1043 sal_Int16 nChar = 0;
1044 if(!aValue.isEmpty())
1046 nChar =
static_cast<sal_Int16
>(aValue[ 0 ]);
1048 xControlModel->setPropertyValue(
"EchoChar",
Any( nChar ) );
1061 sal_Int32 nUid, OUString
const & rLocalName,
1062 Reference< xml::input::XAttributes >
const & xAttributes )
1071 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1074 else if ( rLocalName ==
"title" )
1081 else if ( rLocalName ==
"radio" )
1085 Reference< xml::input::XElement > xRet(
1100 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1115 xControlModel->setPropertyValue(
"Label",
Any(
_label ) );
1127 for (Reference<XElement>& xRadio :
_radios)
1129 Reference< xml::input::XAttributes > xAttributes( xRadio->getAttributes() );
1132 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1134 Reference< xml::input::XElement > xStyle(
getStyle( xAttributes ) );
1146 ctx.importBooleanProperty(
"Tabstop",
"tabstop", xAttributes );
1147 ctx.importStringProperty(
"Label",
"value", xAttributes );
1148 ctx.importAlignProperty(
"Align",
"align", xAttributes );
1149 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign", xAttributes );
1151 ctx.importImagePositionProperty(
"ImagePosition",
"image-position", xAttributes );
1152 ctx.importBooleanProperty(
"MultiLine",
"multiline", xAttributes );
1153 ctx.importStringProperty(
"GroupName",
"group-name", xAttributes );
1161 xControlModel->setPropertyValue(
"State",
Any( nVal ) );
1162 ctx.importDataAwareProperty(
"linked-cell" , xAttributes );
1163 ::std::vector< Reference< xml::input::XElement > > & radioEvents =
1165 ctx.importEvents( radioEvents );
1168 radioEvents.clear();
1179 sal_Int32 nUid, OUString
const & rLocalName,
1180 Reference< xml::input::XAttributes >
const & xAttributes )
1185 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
1193 sal_Int32 nUid, OUString
const & rLocalName,
1194 Reference< xml::input::XAttributes >
const & xAttributes )
1198 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1201 else if ( rLocalName ==
"radio" )
1205 Reference< xml::input::XElement > xRet(
1212 throw xml::sax::SAXException(
"expected radio element!", Reference< XInterface >(),
Any() );
1217 for (Reference<XElement>& xRadio :
_radios)
1219 Reference< xml::input::XAttributes > xAttributes(
1220 xRadio->getAttributes() );
1223 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1225 Reference< xml::input::XElement > xStyle(
getStyle( xAttributes ) );
1237 ctx.importBooleanProperty(
"Tabstop",
"tabstop", xAttributes );
1238 ctx.importStringProperty(
"Label",
"value", xAttributes );
1239 ctx.importAlignProperty(
"Align",
"align", xAttributes );
1240 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign", xAttributes );
1242 ctx.importImagePositionProperty(
"ImagePosition",
"image-position", xAttributes );
1243 ctx.importBooleanProperty(
"MultiLine",
"multiline", xAttributes );
1244 ctx.importStringProperty(
"GroupName",
"group-name", xAttributes );
1251 xControlModel->setPropertyValue(
"State",
Any( nVal ) );
1253 ctx.importDataAwareProperty(
"linked-cell", xAttributes );
1255 ::std::vector< Reference< xml::input::XElement > > & radioEvents =
1257 ctx.importEvents( radioEvents );
1260 radioEvents.clear();
1271 sal_Int32 nUid, OUString
const & rLocalName,
1272 Reference< xml::input::XAttributes >
const & xAttributes )
1276 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1279 else if ( rLocalName ==
"menuitem" )
1288 if (!aSel.isEmpty() && aSel ==
"true")
1297 throw xml::sax::SAXException(
"expected menuitem!" , Reference< XInterface >(),
Any() );
1303 OUString * pRet = aRet.getArray();
1313 sal_Int16 * pRet = aRet.getArray();
1323 sal_Int32 nUid, OUString
const & rLocalName,
1324 Reference< xml::input::XAttributes >
const & xAttributes )
1333 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1336 else if ( rLocalName ==
"menupopup" )
1343 throw xml::sax::SAXException(
"expected event or menupopup element!", Reference< XInterface >(),
Any() );
1350 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1365 ctx.importBooleanProperty(
"MultiSelection",
"multiselection",
_xAttributes );
1370 bool bHasLinkedCell =
ctx.importDataAwareProperty(
"linked-cell" ,
_xAttributes );
1371 bool bHasSrcRange =
ctx.importDataAwareProperty(
"source-cell-range" ,
_xAttributes );
1375 if ( !bHasSrcRange )
1376 xControlModel->setPropertyValue(
"StringItemList",
Any(
p->getItemValues() ) );
1377 if ( !bHasLinkedCell )
1378 xControlModel->setPropertyValue(
"SelectedItems",
Any(
p->getSelectedItems() ) );
1391 sal_Int32 nUid, OUString
const & rLocalName,
1392 Reference< xml::input::XAttributes >
const & xAttributes )
1401 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1404 else if ( rLocalName ==
"menupopup" )
1411 throw xml::sax::SAXException(
"expected event or menupopup element!", Reference< XInterface >(),
Any() );
1417 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1433 ctx.importBooleanProperty(
"Autocomplete",
"autocomplete",
_xAttributes );
1435 ctx.importBooleanProperty(
"HideInactiveSelection",
"hide-inactive-selection",
_xAttributes );
1441 bool bHasSrcRange =
ctx.importDataAwareProperty(
"source-cell-range" ,
_xAttributes );
1442 if (
_popup.is() && !bHasSrcRange )
1445 xControlModel->setPropertyValue(
"StringItemList",
Any(
p->getItemValues() ) );
1458 sal_Int32 nUid, OUString
const & rLocalName,
1459 Reference< xml::input::XAttributes >
const & xAttributes )
1464 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
1473 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1490 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
1492 ctx.importImagePositionProperty(
"ImagePosition",
"image-position",
_xAttributes );
1498 xControlModel->setPropertyValue(
"TriState",
Any( bTriState ) );
1504 sal_Int16 nVal = (bChecked ? 1 : 0);
1505 xControlModel->setPropertyValue(
"State",
Any( nVal ) );
1509 sal_Int16 nVal = (bTriState ? 2 : 0);
1510 xControlModel->setPropertyValue(
"State",
Any( nVal ) );
1523 sal_Int32 nUid, OUString
const & rLocalName,
1524 Reference< xml::input::XAttributes >
const & xAttributes )
1529 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
1543 const Reference< beans::XPropertySet >& xControlModel(
ctx.getControlModel() );
1554 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
1555 ctx.importBooleanProperty(
"DefaultButton",
"default",
_xAttributes );
1556 ctx.importButtonTypeProperty(
"PushButtonType",
"button-type",
_xAttributes );
1558 ctx.importImagePositionProperty(
"ImagePosition",
"image-position",
_xAttributes );
1559 ctx.importImageAlignProperty(
"ImageAlign",
"image-align",
_xAttributes );
1561 ctx.getControlModel()->setPropertyValue(
"Repeat",
Any(
true) );
1562 sal_Int32 toggled = 0;
1564 ctx.getControlModel()->setPropertyValue(
"Toggle" ,
Any(
true));
1565 ctx.importBooleanProperty(
"FocusOnClick",
"grab-focus",
_xAttributes );
1571 ctx.getControlModel()->setPropertyValue(
"State" ,
Any( sal_Int16(1) ) );
1584 sal_Int32 nUid, OUString
const & rLocalName,
1585 Reference< xml::input::XAttributes >
const & xAttributes )
1589 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1592 else if ( rLocalName ==
"button" )
1597 else if ( rLocalName ==
"checkbox" )
1602 else if ( rLocalName ==
"combobox" )
1607 else if ( rLocalName ==
"menulist" )
1612 else if ( rLocalName ==
"radiogroup" )
1617 else if ( rLocalName ==
"titledbox" )
1622 else if ( rLocalName ==
"text" )
1626 else if ( rLocalName ==
"linklabel" )
1631 else if ( rLocalName ==
"textfield" )
1636 else if ( rLocalName ==
"img" )
1641 else if ( rLocalName ==
"filecontrol" )
1646 else if ( rLocalName ==
"treecontrol" )
1651 else if ( rLocalName ==
"currencyfield" )
1656 else if ( rLocalName ==
"datefield" )
1661 else if ( rLocalName ==
"numericfield" )
1666 else if ( rLocalName ==
"timefield" )
1671 else if ( rLocalName ==
"patternfield" )
1676 else if ( rLocalName ==
"formattedfield" )
1681 else if ( rLocalName ==
"fixedline" )
1686 else if ( rLocalName ==
"scrollbar" )
1691 else if ( rLocalName ==
"spinbutton" )
1696 else if ( rLocalName ==
"progressmeter" )
1701 else if (rLocalName ==
"table")
1705 else if ( rLocalName ==
"multipage" )
1709 else if ( rLocalName ==
"frame" )
1713 else if ( rLocalName ==
"page" )
1715 return new Page( rLocalName, xAttributes,
this,
m_pImport );
1718 else if ( rLocalName ==
"bulletinboard" )
1724 throw xml::sax::SAXException(
"expected styles, bulletinboard or bulletinboard element, not: " + rLocalName, Reference< XInterface >(),
Any() );
1729 OUString
const & rLocalName,
1730 Reference< xml::input::XAttributes >
const & xAttributes,
1733 mxDialogImport(pImport)
1736 if (!aValue.isEmpty())
1741 if (!aValue.isEmpty())
1749 sal_Int32 , OUString
const & ,
1750 Reference< xml::input::XAttributes >
const & )
1752 throw xml::sax::SAXException(
"unexpected sub elements of style!", Reference< XInterface >(),
Any() );
1758 if (aStyleId.isEmpty())
1760 throw xml::sax::SAXException(
"missing style-id attribute!", Reference< XInterface >(),
Any() );
1768 sal_Int32 nUid, OUString
const & rLocalName,
1769 Reference< xml::input::XAttributes >
const & xAttributes )
1773 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1776 else if ( rLocalName ==
"style" )
1782 throw xml::sax::SAXException(
"expected style element!", Reference< XInterface >(),
Any() );
1788 sal_Int32 nUid, OUString
const & rLocalName,
1789 Reference< xml::input::XAttributes >
const & xAttributes )
1798 throw xml::sax::SAXException(
"illegal namespace!", Reference< XInterface >(),
Any() );
1801 else if ( rLocalName ==
"styles" )
1806 else if ( rLocalName ==
"bulletinboard" )
1812 throw xml::sax::SAXException(
"expected styles or bulletinboard element!", Reference< XInterface >(),
Any() );
1818 Reference< beans::XPropertySet > xProps(
1837 ctx.importBooleanProperty(
"Decoration",
"withtitlebar",
_xAttributes );
1848 sal_Int32 nUid, OUString
const & rLocalName,
1849 Reference< xml::input::XAttributes >
const & xAttributes )
1854 throw xml::sax::SAXException(
"expected event element!", Reference< XInterface >(),
Any() );
1864 Reference< beans::XPropertySet > xControlModel(
ctx.getControlModel() );
1877 ctx.importVerticalAlignProperty(
"VerticalAlign",
"valign",
_xAttributes );
1878 ctx.importSelectionTypeProperty(
"SelectionModel",
"selectiontype",
_xAttributes );
1879 ctx.importBooleanProperty(
"ShowColumnHeader",
"showcolumnheader",
_xAttributes );
1880 ctx.importBooleanProperty(
"ShowRowHeader",
"showrowheader",
_xAttributes );
1881 ctx.importHexLongProperty(
"GridLineColor",
"gridline-color",
_xAttributes );
1882 ctx.importBooleanProperty(
"UseGridLines",
"usegridlines",
_xAttributes );
1883 ctx.importHexLongProperty(
"HeaderBackgroundColor",
"headerbackground-color",
_xAttributes );
1884 ctx.importHexLongProperty(
"HeaderTextColor",
"headertext-color",
_xAttributes );
1885 ctx.importHexLongProperty(
"ActiveSelectionBackgroundColor",
"activeselectionbackground-color",
_xAttributes );
1886 ctx.importHexLongProperty(
"ActiveSelectionTextColor",
"activeselectiontext-color",
_xAttributes );
1887 ctx.importHexLongProperty(
"InactiveSelectionBackgroundColor",
"inactiveselectionbackground-color",
_xAttributes );
1888 ctx.importHexLongProperty(
"InactiveSelectionTextColor",
"inactiveselectiontext-color",
_xAttributes );
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
BulletinBoardElement(OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes, ElementBase *pParent, DialogImport *pImport)
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
css::uno::Reference< css::xml::input::XElement > _popup
virtual void SAL_CALL endElement() override
OUString getControlModelName(OUString const &rDefaultModel, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes)
OUString getControlId(css::uno::Reference< css::xml::input::XAttributes > const &xAttributes)
css::uno::Reference< css::xml::input::XElement > getStyle(css::uno::Reference< css::xml::input::XAttributes > const &xAttributes)
std::vector< css::uno::Reference< css::xml::input::XElement > > _events
friend class EventElement
std::vector< css::uno::Reference< css::xml::input::XElement > > & getEvents()
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
const css::uno::Reference< css::xml::input::XAttributes > _xAttributes
ElementBase(sal_Int32 nUid, OUString aLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes, ElementBase *pParent, DialogImport *pImport)
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
css::uno::Reference< css::container::XNameContainer > m_xContainer
virtual void SAL_CALL endElement() override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid,::rtl::OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
css::uno::Reference< css::container::XNameContainer > m_xContainer
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
css::uno::Reference< css::container::XNameContainer > m_xContainer
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
std::vector< css::uno::Reference< css::xml::input::XElement > > _radios
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
void SAL_CALL endElement() override
void importVisualEffectStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
void importFillColorStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
void importFontStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
void importTextColorStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
void importBorderStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
void importBackgroundColorStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
void importTextLineColorStyle(css::uno::Reference< css::beans::XPropertySet > const &xProps)
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
std::vector< css::uno::Reference< css::xml::input::XElement > > _radios
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(sal_Int32 nUid, OUString const &rLocalName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes) override
virtual void SAL_CALL endElement() override
OString exceptionToString(const css::uno::Any &caught)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
Any SAL_CALL getCaughtException()
bool getLongAttr(sal_Int32 *pRet, OUString const &rAttrName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes, sal_Int32 nUid)
bool getBoolAttr(sal_Bool *pRet, OUString const &rAttrName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes, sal_Int32 nUid)
sal_Int32 toInt32(std::u16string_view rStr)
bool getStringAttr(OUString *pRet, OUString const &rAttrName, css::uno::Reference< css::xml::input::XAttributes > const &xAttributes, sal_Int32 nUid)
bool isEventElement(sal_Int32 nUid, std::u16string_view rLocalName) const
sal_Int32 XMLNS_DIALOGS_UID
css::uno::Reference< css::lang::XMultiServiceFactory > _xDialogModelFactory
css::uno::Reference< css::util::XNumberFormatsSupplier > const & getNumberFormatsSupplier()
void addStyle(OUString const &rStyleId, css::uno::Reference< css::xml::input::XElement > const &xStyle)
css::uno::Reference< css::container::XNameContainer > _xDialogModel