diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-15 20:45:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-16 08:50:01 +0200 |
commit | 28c64afa68f52fb847e9915cde108b856fa39987 (patch) | |
tree | 105faff9cbb1bc78d61118aab3eec834569cb440 /xmlscript | |
parent | 4a19fefaee65b62377fa296698a4ca16dc279c4f (diff) |
loplugin:ostr in xmlscript
Change-Id: Iaa78cb8994fc1f1b40f02d26e4e1218882ac4b6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167706
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/qa/cppunit/test.cxx | 79 | ||||
-rw-r--r-- | xmlscript/source/xml_helper/xml_impctx.cxx | 12 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 854 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 402 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 674 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 244 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 24 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/xmllib_export.cxx | 42 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/xmllib_import.cxx | 32 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/xmlmod_export.cxx | 14 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/xmlmod_import.cxx | 10 |
12 files changed, 1202 insertions, 1191 deletions
diff --git a/xmlscript/qa/cppunit/test.cxx b/xmlscript/qa/cppunit/test.cxx index 6db22be43738..f09bfac589dd 100644 --- a/xmlscript/qa/cppunit/test.cxx +++ b/xmlscript/qa/cppunit/test.cxx @@ -88,7 +88,7 @@ Reference<container::XNameContainer> XmlScriptTest::importFile(std::u16string_vi Reference<container::XNameContainer> xDialogModel( mxComponentContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", mxComponentContext), + u"com.sun.star.awt.UnoControlDialogModel"_ustr, mxComponentContext), UNO_QUERY); ::xmlscript::importDialogModel(::xmlscript::createInputStream(std::move(bytes)), xDialogModel, @@ -146,55 +146,66 @@ void XmlScriptTest::testBasicElements() CPPUNIT_ASSERT(pXmlDoc); // Ensure we have all elements - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[1]"_ostr, "id"_ostr, "button1"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[2]"_ostr, "id"_ostr, "button3"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[1]"_ostr, "id"_ostr, "check1"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[2]"_ostr, "id"_ostr, "check2"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[3]"_ostr, "id"_ostr, "check3"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[1]"_ostr, "id"_ostr, "list1"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[2]"_ostr, "id"_ostr, "list2"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox[1]"_ostr, "id"_ostr, "combo1"); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[1]"_ostr, "id"_ostr, + u"button1"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:button[2]"_ostr, "id"_ostr, + u"button3"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[1]"_ostr, "id"_ostr, + u"check1"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[2]"_ostr, "id"_ostr, + u"check2"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:checkbox[3]"_ostr, "id"_ostr, + u"check3"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[1]"_ostr, "id"_ostr, + u"list1"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:menulist[2]"_ostr, "id"_ostr, + u"list2"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox[1]"_ostr, "id"_ostr, + u"combo1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[1]"_ostr, - "id"_ostr, "radio1"); + "id"_ostr, u"radio1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[2]"_ostr, - "id"_ostr, "radio2"); + "id"_ostr, u"radio2"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[1]/dlg:radio[3]"_ostr, - "id"_ostr, "radio3"); + "id"_ostr, u"radio3"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:titledbox[1]"_ostr, "id"_ostr, - "groupbox1"); + u"groupbox1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[2]/dlg:radio[1]"_ostr, - "id"_ostr, "radio5"); + "id"_ostr, u"radio5"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[2]/dlg:radio[2]"_ostr, - "id"_ostr, "radio7"); + "id"_ostr, u"radio7"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:radiogroup[2]/dlg:radio[3]"_ostr, - "id"_ostr, "radio8"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:text[1]"_ostr, "id"_ostr, "fixed1"); + "id"_ostr, u"radio8"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:text[1]"_ostr, "id"_ostr, + u"fixed1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:textfield[1]"_ostr, "id"_ostr, - "field1"); + u"field1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:textfield[2]"_ostr, "id"_ostr, - "field2"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:img[1]"_ostr, "id"_ostr, "image1"); + u"field2"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:img[1]"_ostr, "id"_ostr, + u"image1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:filecontrol[1]"_ostr, "id"_ostr, - "file1"); + u"file1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:datefield[1]"_ostr, "id"_ostr, - "datefield1"); - assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:timefield[1]"_ostr, "id"_ostr, "time1"); + u"datefield1"_ustr); + assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:timefield[1]"_ostr, "id"_ostr, + u"time1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:patternfield[1]"_ostr, "id"_ostr, - "pattern1"); + u"pattern1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:currencyfield[1]"_ostr, "id"_ostr, - "currency1"); + u"currency1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:numericfield[1]"_ostr, "id"_ostr, - "numeric1"); + u"numeric1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:fixedline[1]"_ostr, "id"_ostr, - "fixedline1"); + u"fixedline1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:progressmeter[1]"_ostr, "id"_ostr, - "progress1"); + u"progress1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:scrollbar[1]"_ostr, "id"_ostr, - "scrollbar1"); + u"scrollbar1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:formattedfield[1]"_ostr, "id"_ostr, - "ffield0"); + u"ffield0"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:formattedfield[2]"_ostr, "id"_ostr, - "ffield1"); + u"ffield1"_ustr); Reference<lang::XComponent> xDialogModelComp(xModel, UNO_QUERY); if (xDialogModelComp) @@ -219,13 +230,13 @@ void XmlScriptTest::testEmptyPopupItems() // Ensure we have 3 items in combobox after import/export and second one is empty assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox/dlg:menupopup/dlg:menuitem[1]"_ostr, - "value"_ostr, "Eintrag1"); + "value"_ostr, u"Eintrag1"_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox/dlg:menupopup/dlg:menuitem[2]"_ostr, - "value"_ostr, ""); + "value"_ostr, u""_ustr); assertXPath(pXmlDoc, "/dlg:window/dlg:bulletinboard/dlg:combobox/dlg:menupopup/dlg:menuitem[3]"_ostr, - "value"_ostr, "Eintrag2"); + "value"_ostr, u"Eintrag2"_ustr); } CPPUNIT_TEST_SUITE_REGISTRATION(XmlScriptTest); diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index e9255e91a3bc..238a029a3fbc 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -171,9 +171,9 @@ DocumentHandlerImpl::DocumentHandlerImpl( : m_xRoot( xRoot ), m_uid_count( 0 ), m_nLastURI_lookup( UID_UNKNOWN ), - m_aLastURI_lookup( "<<< unknown URI >>>" ), + m_aLastURI_lookup( u"<<< unknown URI >>>"_ustr ), m_nLastPrefix_lookup( UID_UNKNOWN ), - m_aLastPrefix_lookup( "<<< unknown URI >>>" ), + m_aLastPrefix_lookup( u"<<< unknown URI >>>"_ustr ), m_nSkipElements( 0 ) { m_elements.reserve( 10 ); @@ -353,7 +353,7 @@ inline ExtendedAttributes::ExtendedAttributes( OUString DocumentHandlerImpl::getImplementationName() { - return "com.sun.star.comp.xml.input.SaxDocumentHandler"; + return u"com.sun.star.comp.xml.input.SaxDocumentHandler"_ustr; } sal_Bool DocumentHandlerImpl::supportsService( OUString const & servicename ) @@ -363,7 +363,7 @@ sal_Bool DocumentHandlerImpl::supportsService( OUString const & servicename ) Sequence< OUString > DocumentHandlerImpl::getSupportedServiceNames() { - return { "com.sun.star.xml.input.SaxDocumentHandler" }; + return { u"com.sun.star.xml.input.SaxDocumentHandler"_ustr }; } // XInitialization @@ -377,7 +377,7 @@ void DocumentHandlerImpl::initialize( !(arguments[ 0 ] >>= xRoot) || !xRoot.is()) { - throw RuntimeException( "missing root instance!" ); + throw RuntimeException( u"missing root instance!"_ustr ); } m_xRoot = xRoot; } @@ -399,7 +399,7 @@ OUString DocumentHandlerImpl::getUriByUid( sal_Int32 Uid ) if (rURIUid.second == Uid) return rURIUid.first; } - throw container::NoSuchElementException( "no such xmlns uid!" , getXWeak() ); + throw container::NoSuchElementException( u"no such xmlns uid!"_ustr , getXWeak() ); } // XDocumentHandler diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 9eec588c48f3..b3ce62a111cc 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -493,7 +493,7 @@ public: } catch(const css::container::ElementExistException &e) { - throw css::lang::WrappedTargetRuntimeException("", e.Context, css::uno::Any(e)); + throw css::lang::WrappedTargetRuntimeException(u""_ustr, e.Context, css::uno::Any(e)); } } }; @@ -962,7 +962,7 @@ public: ElementBase * pParent, DialogImport * pImport ) : ControlElement( rLocalName, xAttributes, pParent, pImport ) { - m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoMultiPageModel" ), css::uno::UNO_QUERY ); + m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( u"com.sun.star.awt.UnoMultiPageModel"_ustr ), css::uno::UNO_QUERY ); } private: css::uno::Reference< css::container::XNameContainer > m_xContainer; @@ -1005,7 +1005,7 @@ public: ElementBase * pParent, DialogImport * pImport ) : ControlElement( rLocalName, xAttributes, pParent, pImport ) { - m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoPageModel" ), css::uno::UNO_QUERY ); + m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( u"com.sun.star.awt.UnoPageModel"_ustr ), css::uno::UNO_QUERY ); } private: css::uno::Reference< css::container::XNameContainer > m_xContainer; diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 261528b3d5a1..287d762db266 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -37,10 +37,10 @@ namespace xmlscript static bool readBorderProps( ElementDescriptor * element, Style & style ) { - if (element->readProp( &style._border, "Border" )) { + if (element->readProp( &style._border, u"Border"_ustr )) { if (style._border == BORDER_SIMPLE /* simple */) { - if (element->readProp( &style._borderColor, "BorderColor" )) + if (element->readProp( &style._borderColor, u"BorderColor"_ustr )) style._border = BORDER_SIMPLE_COLOR; } return true; @@ -51,11 +51,11 @@ static bool readBorderProps( static bool readFontProps( ElementDescriptor * element, Style & style ) { bool ret = element->readProp( - &style._descr, "FontDescriptor" ); + &style._descr, u"FontDescriptor"_ustr ); ret |= element->readProp( - &style._fontEmphasisMark, "FontEmphasisMark" ); + &style._fontEmphasisMark, u"FontEmphasisMark"_ustr ); ret |= element->readProp( - &style._fontRelief, "FontRelief" ); + &style._fontRelief, u"FontRelief"_ustr ); return ret; } @@ -63,32 +63,32 @@ void ElementDescriptor::readMultiPageModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" , all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr , all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readLongAttr( "MultiPageValue", XMLNS_DIALOGS_PREFIX ":value" ); - Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) ); + readLongAttr( u"MultiPageValue"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + Any aDecorationAny( _xProps->getPropertyValue( u"Decoration"_ustr ) ); bool bDecoration = true; if ( (aDecorationAny >>= bDecoration) && !bDecoration ) - addAttribute( XMLNS_DIALOGS_PREFIX ":withtabs", "false" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":withtabs"_ustr, u"false"_ustr ); readEvents(); uno::Reference< container::XNameContainer > xPagesContainer( _xProps, uno::UNO_QUERY ); if ( xPagesContainer.is() && xPagesContainer->getElementNames().hasElements() ) { - rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); + rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":bulletinboard"_ustr, _xDocument ); pElem->readBullitinBoard( all_styles ); addSubElement( pElem ); } @@ -99,31 +99,31 @@ void ElementDescriptor::readFrameModel( StyleBag * all_styles ) // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 ); - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); OUString aTitle; - if ( readProp( "Label" ) >>= aTitle) + if ( readProp( u"Label"_ustr ) >>= aTitle) { - rtl::Reference<ElementDescriptor> title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument ); - title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle ); + rtl::Reference<ElementDescriptor> title = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":title"_ustr, _xDocument ); + title->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value"_ustr, aTitle ); addSubElement( title ); } uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY ); if ( xControlContainer.is() && xControlContainer->getElementNames().hasElements() ) { - rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); + rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":bulletinboard"_ustr, _xDocument ); pElem->readBullitinBoard( all_styles ); addSubElement( pElem ); } @@ -134,26 +134,26 @@ void ElementDescriptor::readPageModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" ); + readStringAttr( u"Title"_ustr, u"" XMLNS_DIALOGS_PREFIX ":title"_ustr ); uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY ); if ( xControlContainer.is() && xControlContainer->getElementNames().hasElements() ) { - rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); + rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":bulletinboard"_ustr, _xDocument ); pElem->readBullitinBoard( all_styles ); addSubElement( pElem ); } @@ -164,51 +164,51 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "DefaultButton", XMLNS_DIALOGS_PREFIX ":default" ); - readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readButtonTypeAttr( "PushButtonType", XMLNS_DIALOGS_PREFIX ":button-type" ); - readImageOrGraphicAttr(XMLNS_DIALOGS_PREFIX ":image-src"); - readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" ); - readImageAlignAttr( "ImageAlign", XMLNS_DIALOGS_PREFIX ":image-align" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"DefaultButton"_ustr, u"" XMLNS_DIALOGS_PREFIX ":default"_ustr ); + readStringAttr( u"Label"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readButtonTypeAttr( u"PushButtonType"_ustr, u"" XMLNS_DIALOGS_PREFIX ":button-type"_ustr ); + readImageOrGraphicAttr(u"" XMLNS_DIALOGS_PREFIX ":image-src"_ustr); + readImagePositionAttr( u"ImagePosition"_ustr, u"" XMLNS_DIALOGS_PREFIX ":image-position"_ustr ); + readImageAlignAttr( u"ImageAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":image-align"_ustr ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Toggle" ) )) - addAttribute( XMLNS_DIALOGS_PREFIX ":toggled", "1" ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Toggle"_ustr ) )) + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":toggled"_ustr, u"1"_ustr ); - readBoolAttr( "FocusOnClick", XMLNS_DIALOGS_PREFIX ":grab-focus" ); - readBoolAttr( "MultiLine",XMLNS_DIALOGS_PREFIX ":multiline" ); + readBoolAttr( u"FocusOnClick"_ustr, u"" XMLNS_DIALOGS_PREFIX ":grab-focus"_ustr ); + readBoolAttr( u"MultiLine"_ustr,u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); // State sal_Int16 nState = 0; - if (readProp( "State" ) >>= nState) + if (readProp( u"State"_ustr ) >>= nState) { switch (nState) { case 0: - addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"false"_ustr ); break; case 1: - addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"true"_ustr ); break; default: OSL_FAIL( "### unexpected radio state!" ); @@ -223,46 +223,46 @@ void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; - if (readProp( "VisualEffect" ) >>= aStyle._visualEffect) + if (readProp( u"VisualEffect"_ustr ) >>= aStyle._visualEffect) aStyle._set |= 0x40; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readImageOrGraphicAttr(XMLNS_DIALOGS_PREFIX ":image-src"); - readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" ); - readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readStringAttr( u"Label"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readImageOrGraphicAttr(u"" XMLNS_DIALOGS_PREFIX ":image-src"_ustr); + readImagePositionAttr( u"ImagePosition"_ustr, u"" XMLNS_DIALOGS_PREFIX ":image-position"_ustr ); + readBoolAttr( u"MultiLine"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); bool bTriState = false; - if ((readProp( "TriState" ) >>= bTriState) && bTriState) + if ((readProp( u"TriState"_ustr ) >>= bTriState) && bTriState) { - addAttribute( XMLNS_DIALOGS_PREFIX ":tristate", "true" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":tristate"_ustr, u"true"_ustr ); } sal_Int16 nState = 0; - if (_xProps->getPropertyValue( "State" ) >>= nState) + if (_xProps->getPropertyValue( u"State"_ustr ) >>= nState) { switch (nState) { case 0: - addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"false"_ustr ); break; case 1: - addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"true"_ustr ); break; case 2: // tristate=true exported, checked omitted => don't know! OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" ); @@ -279,11 +279,11 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -291,34 +291,34 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readBoolAttr( "Autocomplete", XMLNS_DIALOGS_PREFIX ":autocomplete" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" ); - readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" ); - readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readBoolAttr( u"Autocomplete"_ustr, u"" XMLNS_DIALOGS_PREFIX ":autocomplete"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"Dropdown"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + readShortAttr( u"MaxTextLen"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxlength"_ustr ); + readShortAttr( u"LineCount"_ustr, u"" XMLNS_DIALOGS_PREFIX ":linecount"_ustr ); // Cell Range, Ref Cell etc. - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":source-cell-range"_ustr ); // string item list Sequence< OUString > itemValues; - if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.hasElements()) + if ((readProp( u"StringItemList"_ustr ) >>= itemValues) && itemValues.hasElements()) { - rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); + rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":menupopup"_ustr, _xDocument ); for (const auto& rItemValue : itemValues) { - rtl::Reference<ElementDescriptor> item = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument ); - item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", rItemValue ); + rtl::Reference<ElementDescriptor> item = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":menuitem"_ustr, _xDocument ); + item->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value"_ustr, rItemValue ); popup->addSubElement( item ); } @@ -331,11 +331,11 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -343,41 +343,41 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "MultiSelection", XMLNS_DIALOGS_PREFIX ":multiselection" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" ); - readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"MultiSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiselection"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"Dropdown"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + readShortAttr( u"LineCount"_ustr, u"" XMLNS_DIALOGS_PREFIX ":linecount"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":source-cell-range"_ustr ); // string item list Sequence< OUString > itemValues; - if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.hasElements()) + if ((readProp( u"StringItemList"_ustr ) >>= itemValues) && itemValues.hasElements()) { - rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); + rtl::Reference<ElementDescriptor> popup = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":menupopup"_ustr, _xDocument ); for (const auto& rItemValue : itemValues) { - rtl::Reference<ElementDescriptor> item = new ElementDescriptor(_xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument ); - item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", rItemValue ); + rtl::Reference<ElementDescriptor> item = new ElementDescriptor(_xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":menuitem"_ustr, _xDocument ); + item->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value"_ustr, rItemValue ); popup->addSubElement( item ); } Sequence< sal_Int16 > selected; - if (readProp( "SelectedItems" ) >>= selected) + if (readProp( u"SelectedItems"_ustr ) >>= selected) { sal_Int16 const * pSelected = selected.getConstArray(); for ( sal_Int32 nPos = selected.getLength(); nPos--; ) { ElementDescriptor * item = static_cast< ElementDescriptor * >( popup->getSubElement( pSelected[ nPos ] ).get() ); - item->addAttribute( XMLNS_DIALOGS_PREFIX ":selected", "true" ); + item->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":selected"_ustr, u"true"_ustr ); } } @@ -390,49 +390,49 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; - if (readProp( "VisualEffect" ) >>= aStyle._visualEffect) + if (readProp( u"VisualEffect"_ustr ) >>= aStyle._visualEffect) aStyle._set |= 0x40; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" , all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr , all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr("Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readImageOrGraphicAttr(XMLNS_DIALOGS_PREFIX ":image-src"); - readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" ); - readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); - readStringAttr( "GroupName", XMLNS_DIALOGS_PREFIX ":group-name" ); + readBoolAttr(u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readStringAttr( u"Label"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readImageOrGraphicAttr(u"" XMLNS_DIALOGS_PREFIX ":image-src"_ustr); + readImagePositionAttr( u"ImagePosition"_ustr, u"" XMLNS_DIALOGS_PREFIX ":image-position"_ustr ); + readBoolAttr( u"MultiLine"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); + readStringAttr( u"GroupName"_ustr, u"" XMLNS_DIALOGS_PREFIX ":group-name"_ustr ); sal_Int16 nState = 0; - if (readProp( "State" ) >>= nState) + if (readProp( u"State"_ustr ) >>= nState) { switch (nState) { case 0: - addAttribute(XMLNS_DIALOGS_PREFIX ":checked", "false" ); + addAttribute(u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"false"_ustr ); break; case 1: - addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":checked"_ustr, u"true"_ustr ); break; default: OSL_FAIL( "### unexpected radio state!" ); break; } } - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); readEvents(); } @@ -440,25 +440,25 @@ void ElementDescriptor::readGroupBoxModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x2 | 0x8 | 0x20 ); - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); OUString aTitle; - if (readProp( "Label" ) >>= aTitle) + if (readProp( u"Label"_ustr ) >>= aTitle) { - rtl::Reference<ElementDescriptor> title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument ); - title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle ); + rtl::Reference<ElementDescriptor> title = new ElementDescriptor( _xProps, _xPropState, u"" XMLNS_DIALOGS_PREFIX ":title"_ustr, _xDocument ); + title->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value"_ustr, aTitle ); addSubElement( title ); } @@ -469,11 +469,11 @@ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -481,17 +481,17 @@ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" ); + readStringAttr( u"Label"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"MultiLine"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"NoLabel"_ustr, u"" XMLNS_DIALOGS_PREFIX ":nolabel"_ustr ); readEvents(); } @@ -499,11 +499,11 @@ void ElementDescriptor::readFixedHyperLinkModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -511,18 +511,18 @@ void ElementDescriptor::readFixedHyperLinkModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readStringAttr( "Label",XMLNS_DIALOGS_PREFIX ":value" ); - readStringAttr( "URL", XMLNS_DIALOGS_PREFIX ":url" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" ); + readStringAttr( u"Label"_ustr,u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readStringAttr( u"URL"_ustr, u"" XMLNS_DIALOGS_PREFIX ":url"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"MultiLine"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"NoLabel"_ustr, u"" XMLNS_DIALOGS_PREFIX ":nolabel"_ustr ); readEvents(); } @@ -530,11 +530,11 @@ void ElementDescriptor::readEditModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -542,30 +542,30 @@ void ElementDescriptor::readEditModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "HardLineBreaks", XMLNS_DIALOGS_PREFIX ":hard-linebreaks" ); - readBoolAttr( "HScroll", XMLNS_DIALOGS_PREFIX ":hscroll" ); - readBoolAttr( "VScroll", XMLNS_DIALOGS_PREFIX ":vscroll" ); - readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" ); - readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" ); - readLineEndFormatAttr( "LineEndFormat", XMLNS_DIALOGS_PREFIX ":lineend-format" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"HardLineBreaks"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hard-linebreaks"_ustr ); + readBoolAttr( u"HScroll"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hscroll"_ustr ); + readBoolAttr( u"VScroll"_ustr, u"" XMLNS_DIALOGS_PREFIX ":vscroll"_ustr ); + readShortAttr( u"MaxTextLen"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxlength"_ustr ); + readBoolAttr( u"MultiLine"_ustr, u"" XMLNS_DIALOGS_PREFIX ":multiline"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readLineEndFormatAttr( u"LineEndFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":lineend-format"_ustr ); sal_Int16 nEcho = 0; - if (readProp( "EchoChar" ) >>= nEcho) + if (readProp( u"EchoChar"_ustr ) >>= nEcho) { sal_Unicode cEcho = static_cast<sal_Unicode>(nEcho); - addAttribute( XMLNS_DIALOGS_PREFIX ":echochar", OUString( &cEcho, 1 ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":echochar"_ustr, OUString( &cEcho, 1 ) ); } - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); readEvents(); } @@ -573,21 +573,21 @@ void ElementDescriptor::readImageControlModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x4 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "ScaleImage", XMLNS_DIALOGS_PREFIX ":scale-image" ); - readImageScaleModeAttr( "ScaleMode", XMLNS_DIALOGS_PREFIX ":scale-mode" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readImageOrGraphicAttr(XMLNS_DIALOGS_PREFIX ":src"); + readBoolAttr( u"ScaleImage"_ustr, u"" XMLNS_DIALOGS_PREFIX ":scale-image"_ustr ); + readImageScaleModeAttr( u"ScaleMode"_ustr, u"" XMLNS_DIALOGS_PREFIX ":scale-mode"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readImageOrGraphicAttr(u"" XMLNS_DIALOGS_PREFIX ":src"_ustr); readEvents(); } @@ -595,11 +595,11 @@ void ElementDescriptor::readFileControlModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -607,15 +607,15 @@ void ElementDescriptor::readFileControlModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); readEvents(); } @@ -623,26 +623,26 @@ void ElementDescriptor::readTreeControlModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readSelectionTypeAttr( "SelectionType", XMLNS_DIALOGS_PREFIX ":selectiontype" ); - - readBoolAttr( "RootDisplayed", XMLNS_DIALOGS_PREFIX ":rootdisplayed" ); - readBoolAttr( "ShowsHandles", XMLNS_DIALOGS_PREFIX ":showshandles" ); - readBoolAttr( "ShowsRootHandles", XMLNS_DIALOGS_PREFIX ":showsroothandles" ); - readBoolAttr( "Editable", XMLNS_DIALOGS_PREFIX ":editable" ); - readBoolAttr( "InvokesStopNodeEditing", XMLNS_DIALOGS_PREFIX ":invokesstopnodeediting" ); - readLongAttr( "RowHeight", XMLNS_DIALOGS_PREFIX ":rowheight" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readSelectionTypeAttr( u"SelectionType"_ustr, u"" XMLNS_DIALOGS_PREFIX ":selectiontype"_ustr ); + + readBoolAttr( u"RootDisplayed"_ustr, u"" XMLNS_DIALOGS_PREFIX ":rootdisplayed"_ustr ); + readBoolAttr( u"ShowsHandles"_ustr, u"" XMLNS_DIALOGS_PREFIX ":showshandles"_ustr ); + readBoolAttr( u"ShowsRootHandles"_ustr, u"" XMLNS_DIALOGS_PREFIX ":showsroothandles"_ustr ); + readBoolAttr( u"Editable"_ustr, u"" XMLNS_DIALOGS_PREFIX ":editable"_ustr ); + readBoolAttr( u"InvokesStopNodeEditing"_ustr, u"" XMLNS_DIALOGS_PREFIX ":invokesstopnodeediting"_ustr ); + readLongAttr( u"RowHeight"_ustr, u"" XMLNS_DIALOGS_PREFIX ":rowheight"_ustr ); readEvents(); } @@ -650,11 +650,11 @@ void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -662,29 +662,29 @@ void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readStringAttr( "CurrencySymbol", XMLNS_DIALOGS_PREFIX ":currency-symbol" ); - readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" ); - readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" ); - readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" ); - readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readDoubleAttr( "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" ); - readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" ); - readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); - readBoolAttr("PrependCurrencySymbol", XMLNS_DIALOGS_PREFIX ":prepend-symbol" ); - readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readStringAttr( u"CurrencySymbol"_ustr, u"" XMLNS_DIALOGS_PREFIX ":currency-symbol"_ustr ); + readShortAttr( u"DecimalAccuracy"_ustr, u"" XMLNS_DIALOGS_PREFIX ":decimal-accuracy"_ustr ); + readBoolAttr( u"ShowThousandsSeparator"_ustr, u"" XMLNS_DIALOGS_PREFIX ":thousands-separator"_ustr ); + readDoubleAttr( u"Value"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readDoubleAttr( u"ValueMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readDoubleAttr( u"ValueMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); + readDoubleAttr( u"ValueStep"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-step"_ustr ); + readBoolAttr( u"Spin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); + readBoolAttr(u"PrependCurrencySymbol"_ustr, u"" XMLNS_DIALOGS_PREFIX ":prepend-symbol"_ustr ); + readBoolAttr( u"EnforceFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":enforce-format"_ustr ); readEvents(); } @@ -692,11 +692,11 @@ void ElementDescriptor::readDateFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -704,28 +704,28 @@ void ElementDescriptor::readDateFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readDateFormatAttr( "DateFormat", XMLNS_DIALOGS_PREFIX ":date-format" ); - readBoolAttr( "DateShowCentury", XMLNS_DIALOGS_PREFIX ":show-century" ); - readDateAttr( "Date", XMLNS_DIALOGS_PREFIX ":value" ); - readDateAttr( "DateMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readDateAttr( "DateMax", XMLNS_DIALOGS_PREFIX ":value-max" ); - readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); - readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":dropdown" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" ); - readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readDateFormatAttr( u"DateFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":date-format"_ustr ); + readBoolAttr( u"DateShowCentury"_ustr, u"" XMLNS_DIALOGS_PREFIX ":show-century"_ustr ); + readDateAttr( u"Date"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readDateAttr( u"DateMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readDateAttr( u"DateMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); + readBoolAttr( u"Spin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); + readBoolAttr( u"Dropdown"_ustr, u"" XMLNS_DIALOGS_PREFIX ":dropdown"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":text"_ustr ); + readBoolAttr( u"EnforceFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":enforce-format"_ustr ); readEvents(); } @@ -733,11 +733,11 @@ void ElementDescriptor::readNumericFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -745,27 +745,27 @@ void ElementDescriptor::readNumericFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" ); - readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" ); - readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" ); - readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readDoubleAttr( "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" ); - readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" ); - readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); - readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readShortAttr( u"DecimalAccuracy"_ustr, u"" XMLNS_DIALOGS_PREFIX ":decimal-accuracy"_ustr ); + readBoolAttr( u"ShowThousandsSeparator"_ustr, u"" XMLNS_DIALOGS_PREFIX ":thousands-separator"_ustr ); + readDoubleAttr( u"Value"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readDoubleAttr( u"ValueMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readDoubleAttr( u"ValueMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); + readDoubleAttr( u"ValueStep"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-step"_ustr ); + readBoolAttr( u"Spin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); + readBoolAttr( u"EnforceFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":enforce-format"_ustr ); readEvents(); } @@ -773,11 +773,11 @@ void ElementDescriptor::readTimeFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -785,24 +785,24 @@ void ElementDescriptor::readTimeFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop"); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readTimeFormatAttr( "TimeFormat", XMLNS_DIALOGS_PREFIX ":time-format" ); - readTimeAttr( "Time", XMLNS_DIALOGS_PREFIX ":value" ); - readTimeAttr( "TimeMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readTimeAttr( "TimeMax", XMLNS_DIALOGS_PREFIX ":value-max" ); - readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" ); - readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readTimeFormatAttr( u"TimeFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":time-format"_ustr ); + readTimeAttr( u"Time"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readTimeAttr( u"TimeMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readTimeAttr( u"TimeMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); + readBoolAttr( u"Spin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":text"_ustr ); + readBoolAttr( u"EnforceFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":enforce-format"_ustr ); readEvents(); } @@ -810,11 +810,11 @@ void ElementDescriptor::readPatternFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -822,19 +822,19 @@ void ElementDescriptor::readPatternFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" ); - readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" ); - readStringAttr( "EditMask", XMLNS_DIALOGS_PREFIX ":edit-mask" ); - readStringAttr( "LiteralMask", XMLNS_DIALOGS_PREFIX ":literal-mask" ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr, u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readShortAttr( u"MaxTextLen"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxlength"_ustr ); + readStringAttr( u"EditMask"_ustr, u"" XMLNS_DIALOGS_PREFIX ":edit-mask"_ustr ); + readStringAttr( u"LiteralMask"_ustr, u"" XMLNS_DIALOGS_PREFIX ":literal-mask"_ustr ); readEvents(); } @@ -842,11 +842,11 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; @@ -854,51 +854,51 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles ) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" ); - readBoolAttr( "HideInactiveSelection",XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" ); - readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" ); - readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" ); - readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" ); - readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" ); - readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" ); - if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) )) - readLongAttr( "RepeatDelay",XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ ); - - Any a( readProp( "EffectiveDefault" ) ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"ReadOnly"_ustr, u"" XMLNS_DIALOGS_PREFIX ":readonly"_ustr ); + readBoolAttr( u"HideInactiveSelection"_ustr,u"" XMLNS_DIALOGS_PREFIX ":hide-inactive-selection"_ustr ); + readBoolAttr( u"StrictFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":strict-format"_ustr ); + readStringAttr( u"Text"_ustr, u"" XMLNS_DIALOGS_PREFIX ":text"_ustr ); + readAlignAttr( u"Align"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readShortAttr( u"MaxTextLen"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxlength"_ustr ); + readBoolAttr( u"Spin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":spin"_ustr ); + if (extract_throw<bool>( _xProps->getPropertyValue( u"Repeat"_ustr ) )) + readLongAttr( u"RepeatDelay"_ustr,u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr, true /* force */ ); + + Any a( readProp( u"EffectiveDefault"_ustr ) ); switch (a.getValueTypeClass()) { case TypeClass_DOUBLE: - addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", OUString::number( *o3tl::forceAccess<double>(a) ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value-default"_ustr, OUString::number( *o3tl::forceAccess<double>(a) ) ); break; case TypeClass_STRING: - addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", *o3tl::forceAccess<OUString>(a) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":value-default"_ustr, *o3tl::forceAccess<OUString>(a) ); break; default: break; } - readDoubleAttr( "EffectiveMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readDoubleAttr( "EffectiveMax", XMLNS_DIALOGS_PREFIX ":value-max" ); - readDoubleAttr( "EffectiveValue", XMLNS_DIALOGS_PREFIX ":value" ); + readDoubleAttr( u"EffectiveMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readDoubleAttr( u"EffectiveMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); + readDoubleAttr( u"EffectiveValue"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); // format spec sal_Int32 nKey = 0; - if (readProp( "FormatKey" ) >>= nKey) + if (readProp( u"FormatKey"_ustr ) >>= nKey) { Reference< util::XNumberFormatsSupplier > xSupplier; - if (readProp( "FormatsSupplier" ) >>= xSupplier) + if (readProp( u"FormatsSupplier"_ustr ) >>= xSupplier) { addNumberFormatAttr( xSupplier->getNumberFormats()->getByKey( nKey ) ); } } - readBoolAttr( "TreatAsNumber", XMLNS_DIALOGS_PREFIX ":treat-as-number" ); - readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" ); + readBoolAttr( u"TreatAsNumber"_ustr, u"" XMLNS_DIALOGS_PREFIX ":treat-as-number"_ustr ); + readBoolAttr( u"EnforceFormat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":enforce-format"_ustr ); readEvents(); } @@ -907,27 +907,27 @@ void ElementDescriptor::readSpinButtonModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x4 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" ); - readLongAttr( "SpinIncrement", XMLNS_DIALOGS_PREFIX ":increment" ); - readLongAttr( "SpinValue", XMLNS_DIALOGS_PREFIX ":curval" ); - readLongAttr( "SpinValueMax", XMLNS_DIALOGS_PREFIX ":maxval" ); - readLongAttr( "SpinValueMin", XMLNS_DIALOGS_PREFIX ":minval" ); - readLongAttr( "Repeat", XMLNS_DIALOGS_PREFIX ":repeat" ); - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat-delay" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" ); - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); + readOrientationAttr( u"Orientation"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readLongAttr( u"SpinIncrement"_ustr, u"" XMLNS_DIALOGS_PREFIX ":increment"_ustr ); + readLongAttr( u"SpinValue"_ustr, u"" XMLNS_DIALOGS_PREFIX ":curval"_ustr ); + readLongAttr( u"SpinValueMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxval"_ustr ); + readLongAttr( u"SpinValueMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":minval"_ustr ); + readLongAttr( u"Repeat"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr ); + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat-delay"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readHexLongAttr( u"SymbolColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":symbol-color"_ustr ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); readEvents(); } @@ -935,21 +935,21 @@ void ElementDescriptor::readFixedLineModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x2 | 0x8 | 0x20 ); - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" ); - readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" ); + readStringAttr( u"Label"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readOrientationAttr( u"Orientation"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); readEvents(); } @@ -957,22 +957,22 @@ void ElementDescriptor::readProgressBarModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x4 | 0x10 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; - if (readProp( "FillColor" ) >>= aStyle._descr) + if (readProp( u"FillColor"_ustr ) >>= aStyle._descr) aStyle._set |= 0x10; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readLongAttr( "ProgressValue", XMLNS_DIALOGS_PREFIX ":value" ); - readLongAttr( "ProgressValueMin", XMLNS_DIALOGS_PREFIX ":value-min" ); - readLongAttr( "ProgressValueMax", XMLNS_DIALOGS_PREFIX ":value-max" ); + readLongAttr( u"ProgressValue"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value"_ustr ); + readLongAttr( u"ProgressValueMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-min"_ustr ); + readLongAttr( u"ProgressValueMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":value-max"_ustr ); readEvents(); } @@ -980,29 +980,29 @@ void ElementDescriptor::readScrollBarModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x4 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" ); - readLongAttr( "BlockIncrement", XMLNS_DIALOGS_PREFIX ":pageincrement" ); - readLongAttr( "LineIncrement", XMLNS_DIALOGS_PREFIX ":increment" ); - readLongAttr( "ScrollValue", XMLNS_DIALOGS_PREFIX ":curpos" ); - readLongAttr( "ScrollValueMax", XMLNS_DIALOGS_PREFIX ":maxpos" ); - readLongAttr( "ScrollValueMin", XMLNS_DIALOGS_PREFIX ":minpos" ); - readLongAttr( "VisibleSize", XMLNS_DIALOGS_PREFIX ":visible-size" ); - readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat" ); - readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" ); - readBoolAttr( "LiveScroll", XMLNS_DIALOGS_PREFIX ":live-scroll" ); - readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" ); - readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" ); + readOrientationAttr( u"Orientation"_ustr, u"" XMLNS_DIALOGS_PREFIX ":align"_ustr ); + readLongAttr( u"BlockIncrement"_ustr, u"" XMLNS_DIALOGS_PREFIX ":pageincrement"_ustr ); + readLongAttr( u"LineIncrement"_ustr, u"" XMLNS_DIALOGS_PREFIX ":increment"_ustr ); + readLongAttr( u"ScrollValue"_ustr, u"" XMLNS_DIALOGS_PREFIX ":curpos"_ustr ); + readLongAttr( u"ScrollValueMax"_ustr, u"" XMLNS_DIALOGS_PREFIX ":maxpos"_ustr ); + readLongAttr( u"ScrollValueMin"_ustr, u"" XMLNS_DIALOGS_PREFIX ":minpos"_ustr ); + readLongAttr( u"VisibleSize"_ustr, u"" XMLNS_DIALOGS_PREFIX ":visible-size"_ustr ); + readLongAttr( u"RepeatDelay"_ustr, u"" XMLNS_DIALOGS_PREFIX ":repeat"_ustr ); + readBoolAttr( u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr ); + readBoolAttr( u"LiveScroll"_ustr, u"" XMLNS_DIALOGS_PREFIX ":live-scroll"_ustr ); + readHexLongAttr( u"SymbolColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":symbol-color"_ustr ); + readDataAwareAttr( u"" XMLNS_DIALOGS_PREFIX ":linked-cell"_ustr ); readEvents(); } @@ -1010,72 +1010,72 @@ void ElementDescriptor::readGridControlModel( StyleBag * all_styles ) { // collect styles Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 ); - if (readProp("BackgroundColor") >>= aStyle._backgroundColor) + if (readProp(u"BackgroundColor"_ustr) >>= aStyle._backgroundColor) aStyle._set |= 0x1; if (readBorderProps( this, aStyle )) aStyle._set |= 0x4; - if (readProp("TextColor") >>= aStyle._textColor) + if (readProp(u"TextColor"_ustr) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp("TextLineColor") >>= aStyle._textLineColor) + if (readProp(u"TextLineColor"_ustr) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id",all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr,all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults(); - readBoolAttr("Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop"); - readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign"); - readSelectionTypeAttr( "SelectionModel", XMLNS_DIALOGS_PREFIX ":selectiontype"); - readBoolAttr( "ShowColumnHeader", XMLNS_DIALOGS_PREFIX ":showcolumnheader"); - readBoolAttr( "ShowRowHeader", XMLNS_DIALOGS_PREFIX ":showrowheader"); - readHexLongAttr( "GridLineColor", XMLNS_DIALOGS_PREFIX ":gridline-color"); - readBoolAttr( "UseGridLines", XMLNS_DIALOGS_PREFIX ":usegridlines" ); - readHexLongAttr( "HeaderBackgroundColor", XMLNS_DIALOGS_PREFIX ":headerbackground-color"); - readHexLongAttr( "HeaderTextColor", XMLNS_DIALOGS_PREFIX ":headertext-color"); - readHexLongAttr( "ActiveSelectionBackgroundColor", XMLNS_DIALOGS_PREFIX ":activeselectionbackground-color"); - readHexLongAttr( "ActiveSelectionTextColor", XMLNS_DIALOGS_PREFIX ":activeselectiontext-color"); - readHexLongAttr( "InactiveSelectionBackgroundColor", XMLNS_DIALOGS_PREFIX ":inactiveselectionbackground-color"); - readHexLongAttr( "InactiveSelectionTextColor", XMLNS_DIALOGS_PREFIX ":inactiveselectiontext-color"); + readBoolAttr(u"Tabstop"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tabstop"_ustr); + readVerticalAlignAttr( u"VerticalAlign"_ustr, u"" XMLNS_DIALOGS_PREFIX ":valign"_ustr); + readSelectionTypeAttr( u"SelectionModel"_ustr, u"" XMLNS_DIALOGS_PREFIX ":selectiontype"_ustr); + readBoolAttr( u"ShowColumnHeader"_ustr, u"" XMLNS_DIALOGS_PREFIX ":showcolumnheader"_ustr); + readBoolAttr( u"ShowRowHeader"_ustr, u"" XMLNS_DIALOGS_PREFIX ":showrowheader"_ustr); + readHexLongAttr( u"GridLineColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":gridline-color"_ustr); + readBoolAttr( u"UseGridLines"_ustr, u"" XMLNS_DIALOGS_PREFIX ":usegridlines"_ustr ); + readHexLongAttr( u"HeaderBackgroundColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":headerbackground-color"_ustr); + readHexLongAttr( u"HeaderTextColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":headertext-color"_ustr); + readHexLongAttr( u"ActiveSelectionBackgroundColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":activeselectionbackground-color"_ustr); + readHexLongAttr( u"ActiveSelectionTextColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":activeselectiontext-color"_ustr); + readHexLongAttr( u"InactiveSelectionBackgroundColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":inactiveselectionbackground-color"_ustr); + readHexLongAttr( u"InactiveSelectionTextColor"_ustr, u"" XMLNS_DIALOGS_PREFIX ":inactiveselectiontext-color"_ustr); readEvents(); } void ElementDescriptor::readDialogModel( StyleBag * all_styles ) { // collect elements - addAttribute( "xmlns:" XMLNS_DIALOGS_PREFIX, XMLNS_DIALOGS_URI ); - addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI ); + addAttribute( u"xmlns:" XMLNS_DIALOGS_PREFIX ""_ustr, XMLNS_DIALOGS_URI ); + addAttribute( u"xmlns:" XMLNS_SCRIPT_PREFIX ""_ustr, XMLNS_SCRIPT_URI ); // collect styles Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 ); - if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor) + if (readProp( u"BackgroundColor"_ustr ) >>= aStyle._backgroundColor) aStyle._set |= 0x1; - if (readProp( "TextColor" ) >>= aStyle._textColor) + if (readProp( u"TextColor"_ustr ) >>= aStyle._textColor) aStyle._set |= 0x2; - if (readProp( "TextLineColor" ) >>= aStyle._textLineColor) + if (readProp( u"TextLineColor"_ustr ) >>= aStyle._textLineColor) aStyle._set |= 0x20; if (readFontProps( this, aStyle )) aStyle._set |= 0x8; if (aStyle._set) { - addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, all_styles->getStyleId( aStyle ) ); } // collect elements readDefaults( false, false ); - readBoolAttr("Closeable", XMLNS_DIALOGS_PREFIX ":closeable" ); - readBoolAttr( "Moveable", XMLNS_DIALOGS_PREFIX ":moveable" ); - readBoolAttr( "Sizeable", XMLNS_DIALOGS_PREFIX ":resizeable" ); - readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" ); + readBoolAttr(u"Closeable"_ustr, u"" XMLNS_DIALOGS_PREFIX ":closeable"_ustr ); + readBoolAttr( u"Moveable"_ustr, u"" XMLNS_DIALOGS_PREFIX ":moveable"_ustr ); + readBoolAttr( u"Sizeable"_ustr, u"" XMLNS_DIALOGS_PREFIX ":resizeable"_ustr ); + readStringAttr( u"Title"_ustr, u"" XMLNS_DIALOGS_PREFIX ":title"_ustr ); readScrollableSettings(); - Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) ); + Any aDecorationAny( _xProps->getPropertyValue( u"Decoration"_ustr ) ); bool bDecoration = false; if ( (aDecorationAny >>= bDecoration) && !bDecoration ) - addAttribute( XMLNS_DIALOGS_PREFIX ":withtitlebar", "false" ); - readImageOrGraphicAttr(XMLNS_DIALOGS_PREFIX ":image-src"); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":withtitlebar"_ustr, u"false"_ustr ); + readImageOrGraphicAttr(u"" XMLNS_DIALOGS_PREFIX ":image-src"_ustr); readEvents(); } @@ -1110,15 +1110,15 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles ) rtl::Reference<ElementDescriptor> pElem; // group up radio buttons - if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) + if ( xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr ) ) { if (! pRadioGroup) // open radiogroup { - pRadioGroup = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radiogroup", _xDocument ); + pRadioGroup = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":radiogroup"_ustr, _xDocument ); all_elements.push_back( pRadioGroup ); } - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radio", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":radio"_ustr, _xDocument ); pElem->readRadioButtonModel( all_styles ); pRadioGroup->addSubElement( pElem ); } @@ -1126,130 +1126,130 @@ void ElementDescriptor::readBullitinBoard( StyleBag * all_styles ) { pRadioGroup = nullptr; // close radiogroup - if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) ) + if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlButtonModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":button", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":button"_ustr, _xDocument ); pElem->readButtonModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":checkbox", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":checkbox"_ustr, _xDocument ); pElem->readCheckBoxModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlComboBoxModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":combobox", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":combobox"_ustr, _xDocument ); pElem->readComboBoxModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlListBoxModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":menulist", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":menulist"_ustr, _xDocument ); pElem->readListBoxModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":titledbox", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":titledbox"_ustr, _xDocument ); pElem->readGroupBoxModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoMultiPageModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoMultiPageModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":multipage", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":multipage"_ustr, _xDocument ); pElem->readMultiPageModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoFrameModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoFrameModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":frame", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":frame"_ustr, _xDocument ); pElem->readFrameModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoPageModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoPageModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":page", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":page"_ustr, _xDocument ); pElem->readPageModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedTextModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":text", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":text"_ustr, _xDocument ); pElem->readFixedTextModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlEditModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":textfield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":textfield"_ustr, _xDocument ); pElem->readEditModel( all_styles ); } // FixedHyperLink - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":linklabel", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":linklabel"_ustr, _xDocument ); pElem->readFixedHyperLinkModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlImageControlModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":img", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":img"_ustr, _xDocument ); pElem->readImageControlModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFileControlModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":filecontrol", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":filecontrol"_ustr, _xDocument ); pElem->readFileControlModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.tree.TreeControlModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.tree.TreeControlModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":treecontrol", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":treecontrol"_ustr, _xDocument ); pElem->readTreeControlModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":currencyfield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":currencyfield"_ustr, _xDocument ); pElem->readCurrencyFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlDateFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":datefield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":datefield"_ustr, _xDocument ); pElem->readDateFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":numericfield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":numericfield"_ustr, _xDocument ); pElem->readNumericFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":timefield", _xDocument); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":timefield"_ustr, _xDocument); pElem->readTimeFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":patternfield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":patternfield"_ustr, _xDocument ); pElem->readPatternFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":formattedfield", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":formattedfield"_ustr, _xDocument ); pElem->readFormattedFieldModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlFixedLineModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":fixedline", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":fixedline"_ustr, _xDocument ); pElem->readFixedLineModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlScrollBarModel"_ustr ) ) { - pElem = new ElementDescriptor(xProps, xPropState, XMLNS_DIALOGS_PREFIX ":scrollbar", _xDocument ); + pElem = new ElementDescriptor(xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":scrollbar"_ustr, _xDocument ); pElem->readScrollBarModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlSpinButtonModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":spinbutton", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":spinbutton"_ustr, _xDocument ); pElem->readSpinButtonModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.UnoControlProgressBarModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":progressmeter", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":progressmeter"_ustr, _xDocument ); pElem->readProgressBarModel( all_styles ); } - else if (xServiceInfo->supportsService( "com.sun.star.awt.grid.UnoControlGridModel" ) ) + else if (xServiceInfo->supportsService( u"com.sun.star.awt.grid.UnoControlGridModel"_ustr ) ) { - pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":table", _xDocument ); + pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":table"_ustr, _xDocument ); pElem->readGridControlModel( all_styles ); } diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 7b781c4914e3..385a706f8654 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -78,33 +78,33 @@ namespace xmlscript Reference< xml::sax::XAttributeList > Style::createElement() { - rtl::Reference<ElementDescriptor> pStyle = new ElementDescriptor( XMLNS_DIALOGS_PREFIX ":style" ); + rtl::Reference<ElementDescriptor> pStyle = new ElementDescriptor( u"" XMLNS_DIALOGS_PREFIX ":style"_ustr ); // style-id - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", _id ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":style-id"_ustr, _id ); // background-color if (_set & 0x1) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":background-color", "0x" + OUString::number(_backgroundColor,16)); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":background-color"_ustr, "0x" + OUString::number(_backgroundColor,16)); } // text-color if (_set & 0x2) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":text-color", "0x" + OUString::number(_textColor,16)); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":text-color"_ustr, "0x" + OUString::number(_textColor,16)); } // textline-color if (_set & 0x20) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":textline-color", "0x" + OUString::number(_textLineColor,16)); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":textline-color"_ustr, "0x" + OUString::number(_textLineColor,16)); } // fill-color if (_set & 0x10) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":fill-color", "0x" + OUString::number(_fillColor,16)); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":fill-color"_ustr, "0x" + OUString::number(_fillColor,16)); } // border @@ -113,16 +113,16 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_border) { case BORDER_NONE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "none" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":border"_ustr, u"none"_ustr ); break; case BORDER_3D: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "3d" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":border"_ustr, u"3d"_ustr ); break; case BORDER_SIMPLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "simple" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":border"_ustr, u"simple"_ustr ); break; case BORDER_SIMPLE_COLOR: { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":border", "0x" + OUString::number(_borderColor,16)); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":border"_ustr, "0x" + OUString::number(_borderColor,16)); break; } default: @@ -137,13 +137,13 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_visualEffect) { case awt::VisualEffect::NONE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "none" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":look"_ustr, u"none"_ustr ); break; case awt::VisualEffect::LOOK3D: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "3d" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":look"_ustr, u"3d"_ustr ); break; case awt::VisualEffect::FLAT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "simple" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":look"_ustr, u"simple"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected visual effect value!" ); @@ -159,22 +159,22 @@ Reference< xml::sax::XAttributeList > Style::createElement() // dialog:font-name CDATA #IMPLIED if (def_descr.Name != _descr.Name) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-name", _descr.Name ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-name"_ustr, _descr.Name ); } // dialog:font-height %numeric; #IMPLIED if (def_descr.Height != _descr.Height) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-height", OUString::number( _descr.Height ) ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-height"_ustr, OUString::number( _descr.Height ) ); } // dialog:font-width %numeric; #IMPLIED if (def_descr.Width != _descr.Width) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-width", OUString::number( _descr.Width ) ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-width"_ustr, OUString::number( _descr.Width ) ); } // dialog:font-stylename CDATA #IMPLIED if (def_descr.StyleName != _descr.StyleName) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-stylename", _descr.StyleName ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-stylename"_ustr, _descr.StyleName ); } // dialog:font-family "(decorative|modern|roman|script|swiss|system)" #IMPLIED if (def_descr.Family != _descr.Family) @@ -182,22 +182,22 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Family) { case awt::FontFamily::DECORATIVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "decorative" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"decorative"_ustr ); break; case awt::FontFamily::MODERN: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "modern" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"modern"_ustr ); break; case awt::FontFamily::ROMAN: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "roman" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"roman"_ustr ); break; case awt::FontFamily::SCRIPT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "script" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"script"_ustr ); break; case awt::FontFamily::SWISS: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "swiss" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"swiss"_ustr ); break; case awt::FontFamily::SYSTEM: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "system" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-family"_ustr, u"system"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-family!" ); @@ -210,34 +210,34 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.CharSet) { case awt::CharSet::ANSI: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ansi" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ansi"_ustr ); break; case awt::CharSet::MAC: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "mac" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"mac"_ustr ); break; case awt::CharSet::IBMPC_437: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_437" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_437"_ustr ); break; case awt::CharSet::IBMPC_850: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_850" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_850"_ustr ); break; case awt::CharSet::IBMPC_860: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_860" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_860"_ustr ); break; case awt::CharSet::IBMPC_861: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_861" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_861"_ustr ); break; case awt::CharSet::IBMPC_863: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_863" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_863"_ustr ); break; case awt::CharSet::IBMPC_865: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "ibmpc_865" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"ibmpc_865"_ustr ); break; case awt::CharSet::SYSTEM: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "system" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"system"_ustr ); break; case awt::CharSet::SYMBOL: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "symbol" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charset"_ustr, u"symbol"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-charset!" ); @@ -250,10 +250,10 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Pitch) { case awt::FontPitch::FIXED: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-pitch", "fixed" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-pitch"_ustr, u"fixed"_ustr ); break; case awt::FontPitch::VARIABLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-pitch", "variable" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-pitch"_ustr, u"variable"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-pitch!" ); @@ -263,12 +263,12 @@ Reference< xml::sax::XAttributeList > Style::createElement() // dialog:font-charwidth CDATA #IMPLIED if (def_descr.CharacterWidth != _descr.CharacterWidth) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charwidth", OUString::number( _descr.CharacterWidth ) ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-charwidth"_ustr, OUString::number( _descr.CharacterWidth ) ); } // dialog:font-weight CDATA #IMPLIED if (def_descr.Weight != _descr.Weight) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-weight", OUString::number( _descr.Weight ) ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-weight"_ustr, OUString::number( _descr.Weight ) ); } // dialog:font-slant "(oblique|italic|reverse_oblique|reverse_italic)" #IMPLIED if (def_descr.Slant != _descr.Slant) @@ -276,16 +276,16 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Slant) { case awt::FontSlant_OBLIQUE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "oblique" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-slant"_ustr, u"oblique"_ustr ); break; case awt::FontSlant_ITALIC: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "italic" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-slant"_ustr, u"italic"_ustr ); break; case awt::FontSlant_REVERSE_OBLIQUE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "reverse_oblique" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-slant"_ustr, u"reverse_oblique"_ustr ); break; case awt::FontSlant_REVERSE_ITALIC: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "reverse_italic" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-slant"_ustr, u"reverse_italic"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-slant!" ); @@ -298,55 +298,55 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Underline) { case awt::FontUnderline::SINGLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "single" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"single"_ustr ); break; case awt::FontUnderline::DOUBLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "double" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"double"_ustr ); break; case awt::FontUnderline::DOTTED: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dotted" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"dotted"_ustr ); break; case awt::FontUnderline::DASH: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dash" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"dash"_ustr ); break; case awt::FontUnderline::LONGDASH: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "longdash" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"longdash"_ustr ); break; case awt::FontUnderline::DASHDOT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dashdot" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"dashdot"_ustr ); break; case awt::FontUnderline::DASHDOTDOT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "dashdotdot" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"dashdotdot"_ustr ); break; case awt::FontUnderline::SMALLWAVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "smallwave" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"smallwave"_ustr ); break; case awt::FontUnderline::WAVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "wave" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"wave"_ustr ); break; case awt::FontUnderline::DOUBLEWAVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "doublewave" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"doublewave"_ustr ); break; case awt::FontUnderline::BOLD: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bold" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"bold"_ustr ); break; case awt::FontUnderline::BOLDDOTTED: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddotted" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"bolddotted"_ustr ); break; case awt::FontUnderline::BOLDDASH: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddash" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"bolddash"_ustr ); break; case awt::FontUnderline::BOLDLONGDASH: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "boldlongdash" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"boldlongdash"_ustr ); break; case awt::FontUnderline::BOLDDASHDOT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddashdot" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"bolddashdot"_ustr ); break; case awt::FontUnderline::BOLDDASHDOTDOT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "bolddashdotdot" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"bolddashdotdot"_ustr ); break; case awt::FontUnderline::BOLDWAVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "boldwave" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-underline"_ustr, u"boldwave"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-underline!" ); @@ -359,19 +359,19 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Strikeout) { case awt::FontStrikeout::SINGLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "single" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-strikeout"_ustr, u"single"_ustr ); break; case awt::FontStrikeout::DOUBLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "double" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-strikeout"_ustr, u"double"_ustr ); break; case awt::FontStrikeout::BOLD: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "bold" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-strikeout"_ustr, u"bold"_ustr ); break; case awt::FontStrikeout::SLASH: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "slash" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-strikeout"_ustr, u"slash"_ustr ); break; case awt::FontStrikeout::X: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "x" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-strikeout"_ustr, u"x"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-strikeout!" ); @@ -381,17 +381,17 @@ Reference< xml::sax::XAttributeList > Style::createElement() // dialog:font-orientation CDATA #IMPLIED if (def_descr.Orientation != _descr.Orientation) { - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-orientation", OUString::number( _descr.Orientation ) ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-orientation"_ustr, OUString::number( _descr.Orientation ) ); } // dialog:font-kerning %boolean; #IMPLIED if (bool(def_descr.Kerning) != bool(_descr.Kerning)) { - pStyle->addBoolAttr( XMLNS_DIALOGS_PREFIX ":font-kerning", _descr.Kerning ); + pStyle->addBoolAttr( u"" XMLNS_DIALOGS_PREFIX ":font-kerning"_ustr, _descr.Kerning ); } // dialog:font-wordlinemode %boolean; #IMPLIED if (bool(def_descr.WordLineMode) != bool(_descr.WordLineMode)) { - pStyle->addBoolAttr( XMLNS_DIALOGS_PREFIX ":font-wordlinemode", _descr.WordLineMode ); + pStyle->addBoolAttr( u"" XMLNS_DIALOGS_PREFIX ":font-wordlinemode"_ustr, _descr.WordLineMode ); } // dialog:font-type "(raster|device|scalable)" #IMPLIED if (def_descr.Type != _descr.Type) @@ -399,13 +399,13 @@ Reference< xml::sax::XAttributeList > Style::createElement() switch (_descr.Type) { case awt::FontType::RASTER: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "raster" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-type"_ustr, u"raster"_ustr ); break; case awt::FontType::DEVICE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "device" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-type"_ustr, u"device"_ustr ); break; case awt::FontType::SCALABLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "scalable" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-type"_ustr, u"scalable"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-type!" ); @@ -420,10 +420,10 @@ Reference< xml::sax::XAttributeList > Style::createElement() case awt::FontRelief::NONE: // don't export default break; case awt::FontRelief::EMBOSSED: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-relief", "embossed" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-relief"_ustr, u"embossed"_ustr ); break; case awt::FontRelief::ENGRAVED: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-relief", "engraved" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-relief"_ustr, u"engraved"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-relief!" ); @@ -435,22 +435,22 @@ Reference< xml::sax::XAttributeList > Style::createElement() case awt::FontEmphasisMark::NONE: // don't export default break; case awt::FontEmphasisMark::DOT: - pStyle->addAttribute(XMLNS_DIALOGS_PREFIX ":font-emphasismark", "dot" ); + pStyle->addAttribute(u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"dot"_ustr ); break; case awt::FontEmphasisMark::CIRCLE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "circle" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"circle"_ustr ); break; case awt::FontEmphasisMark::DISC: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "disc" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"disc"_ustr ); break; case awt::FontEmphasisMark::ACCENT: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "accent" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"accent"_ustr ); break; case awt::FontEmphasisMark::ABOVE: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "above" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"above"_ustr ); break; case awt::FontEmphasisMark::BELOW: - pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "below" ); + pStyle->addAttribute( u"" XMLNS_DIALOGS_PREFIX ":font-emphasismark"_ustr, u"below"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected font-emphasismark!" ); @@ -466,10 +466,10 @@ void ElementDescriptor::addNumberFormatAttr( { OUString sFormat; lang::Locale locale; - OSL_VERIFY( xFormatProperties->getPropertyValue( "FormatString" ) >>= sFormat ); - OSL_VERIFY( xFormatProperties->getPropertyValue( "Locale" ) >>= locale ); + OSL_VERIFY( xFormatProperties->getPropertyValue( u"FormatString"_ustr ) >>= sFormat ); + OSL_VERIFY( xFormatProperties->getPropertyValue( u"Locale"_ustr ) >>= locale ); - addAttribute(XMLNS_DIALOGS_PREFIX ":format-code", sFormat ); + addAttribute(u"" XMLNS_DIALOGS_PREFIX ":format-code"_ustr, sFormat ); // format-locale LanguageTag aLanguageTag( locale); @@ -487,7 +487,7 @@ void ElementDescriptor::addNumberFormatAttr( { aStr = aLanguageTag.getBcp47( false); } - addAttribute( XMLNS_DIALOGS_PREFIX ":format-locale", aStr ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":format-locale"_ustr, aStr ); } Any ElementDescriptor::readProp( OUString const & rPropName ) @@ -537,40 +537,40 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString switch (*n) { case 0: - addAttribute( rAttrName, "system_short" ); + addAttribute( rAttrName, u"system_short"_ustr ); break; case 1: - addAttribute( rAttrName, "system_short_YY" ); + addAttribute( rAttrName, u"system_short_YY"_ustr ); break; case 2: - addAttribute( rAttrName, "system_short_YYYY" ); + addAttribute( rAttrName, u"system_short_YYYY"_ustr ); break; case 3: - addAttribute( rAttrName, "system_long" ); + addAttribute( rAttrName, u"system_long"_ustr ); break; case 4: - addAttribute( rAttrName, "short_DDMMYY" ); + addAttribute( rAttrName, u"short_DDMMYY"_ustr ); break; case 5: - addAttribute( rAttrName, "short_MMDDYY" ); + addAttribute( rAttrName, u"short_MMDDYY"_ustr ); break; case 6: - addAttribute( rAttrName, "short_YYMMDD" ); + addAttribute( rAttrName, u"short_YYMMDD"_ustr ); break; case 7: - addAttribute( rAttrName, "short_DDMMYYYY" ); + addAttribute( rAttrName, u"short_DDMMYYYY"_ustr ); break; case 8: - addAttribute( rAttrName, "short_MMDDYYYY" ); + addAttribute( rAttrName, u"short_MMDDYYYY"_ustr ); break; case 9: - addAttribute( rAttrName, "short_YYYYMMDD" ); + addAttribute( rAttrName, u"short_YYYYMMDD"_ustr ); break; case 10: - addAttribute( rAttrName, "short_YYMMDD_DIN5008" ); + addAttribute( rAttrName, u"short_YYMMDD_DIN5008"_ustr ); break; case 11: - addAttribute( rAttrName, "short_YYYYMMDD_DIN5008" ); + addAttribute( rAttrName, u"short_YYYYMMDD_DIN5008"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected date format!" ); @@ -634,22 +634,22 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString switch (*n) { case 0: - addAttribute( rAttrName, "24h_short" ); + addAttribute( rAttrName, u"24h_short"_ustr ); break; case 1: - addAttribute( rAttrName, "24h_long" ); + addAttribute( rAttrName, u"24h_long"_ustr ); break; case 2: - addAttribute( rAttrName, "12h_short" ); + addAttribute( rAttrName, u"12h_short"_ustr ); break; case 3: - addAttribute( rAttrName, "12h_long" ); + addAttribute( rAttrName, u"12h_long"_ustr ); break; case 4: - addAttribute( rAttrName, "Duration_short" ); + addAttribute( rAttrName, u"Duration_short"_ustr ); break; case 5: - addAttribute( rAttrName, "Duration_long" ); + addAttribute( rAttrName, u"Duration_long"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### unexpected time format!" ); @@ -671,13 +671,13 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons switch (*n) { case 0: - addAttribute( rAttrName, "left" ); + addAttribute( rAttrName, u"left"_ustr ); break; case 1: - addAttribute( rAttrName, "center" ); + addAttribute( rAttrName, u"center"_ustr ); break; case 2: - addAttribute( rAttrName, "right" ); + addAttribute( rAttrName, u"right"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal alignment value!" ); @@ -701,13 +701,13 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr switch (eAlign) { case style::VerticalAlignment_TOP: - addAttribute( rAttrName, "top" ); + addAttribute( rAttrName, u"top"_ustr ); break; case style::VerticalAlignment_MIDDLE: - addAttribute( rAttrName, "center" ); + addAttribute( rAttrName, u"center"_ustr ); break; case style::VerticalAlignment_BOTTOM: - addAttribute( rAttrName, "bottom" ); + addAttribute( rAttrName, u"bottom"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal vertical alignment value!" ); @@ -721,10 +721,10 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr void ElementDescriptor::readImageOrGraphicAttr(OUString const & rAttrName) { OUString sURL; - if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState("Graphic")) + if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState(u"Graphic"_ustr)) { uno::Reference<graphic::XGraphic> xGraphic; - _xProps->getPropertyValue("Graphic") >>= xGraphic; + _xProps->getPropertyValue(u"Graphic"_ustr) >>= xGraphic; if (xGraphic.is()) { Reference< document::XStorageBasedDocument > xDocStorage( _xDocument, UNO_QUERY ); @@ -742,9 +742,9 @@ void ElementDescriptor::readImageOrGraphicAttr(OUString const & rAttrName) } // tdf#130793 Above fails if the dialog is not part of a document. Export the ImageURL then. if (sURL.isEmpty() - && beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState("ImageURL")) + && beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState(u"ImageURL"_ustr)) { - _xProps->getPropertyValue("ImageURL") >>= sURL; + _xProps->getPropertyValue(u"ImageURL"_ustr) >>= sURL; } if (!sURL.isEmpty()) addAttribute(rAttrName, sURL); @@ -761,16 +761,16 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString switch (*n) { case 0: - addAttribute( rAttrName, "left" ); + addAttribute( rAttrName, u"left"_ustr ); break; case 1: - addAttribute( rAttrName, "top" ); + addAttribute( rAttrName, u"top"_ustr ); break; case 2: - addAttribute( rAttrName, "right" ); + addAttribute( rAttrName, u"right"_ustr ); break; case 3: - addAttribute( rAttrName, "bottom" ); + addAttribute( rAttrName, u"bottom"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal image alignment value!" ); @@ -794,43 +794,43 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr switch (*n) { case awt::ImagePosition::LeftTop: - addAttribute( rAttrName, "left-top" ); + addAttribute( rAttrName, u"left-top"_ustr ); break; case awt::ImagePosition::LeftCenter: - addAttribute( rAttrName, "left-center" ); + addAttribute( rAttrName, u"left-center"_ustr ); break; case awt::ImagePosition::LeftBottom: - addAttribute( rAttrName, "left-bottom" ); + addAttribute( rAttrName, u"left-bottom"_ustr ); break; case awt::ImagePosition::RightTop: - addAttribute( rAttrName, "right-top" ); + addAttribute( rAttrName, u"right-top"_ustr ); break; case awt::ImagePosition::RightCenter: - addAttribute( rAttrName, "right-center" ); + addAttribute( rAttrName, u"right-center"_ustr ); break; case awt::ImagePosition::RightBottom: - addAttribute( rAttrName, "right-bottom" ); + addAttribute( rAttrName, u"right-bottom"_ustr ); break; case awt::ImagePosition::AboveLeft: - addAttribute( rAttrName, "top-left" ); + addAttribute( rAttrName, u"top-left"_ustr ); break; case awt::ImagePosition::AboveCenter: - addAttribute( rAttrName, "top-center" ); + addAttribute( rAttrName, u"top-center"_ustr ); break; case awt::ImagePosition::AboveRight: - addAttribute( rAttrName, "top-right" ); + addAttribute( rAttrName, u"top-right"_ustr ); break; case awt::ImagePosition::BelowLeft: - addAttribute( rAttrName, "bottom-left" ); + addAttribute( rAttrName, u"bottom-left"_ustr ); break; case awt::ImagePosition::BelowCenter: - addAttribute( rAttrName, "bottom-center" ); + addAttribute( rAttrName, u"bottom-center"_ustr ); break; case awt::ImagePosition::BelowRight: - addAttribute( rAttrName, "bottom-right" ); + addAttribute( rAttrName, u"bottom-right"_ustr ); break; case awt::ImagePosition::Centered: - addAttribute( rAttrName, "center" ); + addAttribute( rAttrName, u"center"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal image position value!" ); @@ -851,16 +851,16 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString switch (static_cast<awt::PushButtonType>(*n)) { case awt::PushButtonType_STANDARD: - addAttribute( rAttrName, "standard" ); + addAttribute( rAttrName, u"standard"_ustr ); break; case awt::PushButtonType_OK: - addAttribute( rAttrName, "ok" ); + addAttribute( rAttrName, u"ok"_ustr ); break; case awt::PushButtonType_CANCEL: - addAttribute( rAttrName, "cancel" ); + addAttribute( rAttrName, u"cancel"_ustr ); break; case awt::PushButtonType_HELP: - addAttribute( rAttrName, "help" ); + addAttribute( rAttrName, u"help"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal button-type value!" ); @@ -881,10 +881,10 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin switch (*n) { case 0: - addAttribute( rAttrName, "horizontal" ); + addAttribute( rAttrName, u"horizontal"_ustr ); break; case 1: - addAttribute( rAttrName, "vertical" ); + addAttribute( rAttrName, u"vertical"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal orientation value!" ); @@ -905,13 +905,13 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr switch (*n) { case awt::LineEndFormat::CARRIAGE_RETURN: - addAttribute( rAttrName, "carriage-return" ); + addAttribute( rAttrName, u"carriage-return"_ustr ); break; case awt::LineEndFormat::LINE_FEED: - addAttribute( rAttrName, "line-feed" ); + addAttribute( rAttrName, u"line-feed"_ustr ); break; case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: - addAttribute( rAttrName, "carriage-return-line-feed" ); + addAttribute( rAttrName, u"carriage-return-line-feed"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal line end format value!" ); @@ -931,15 +931,15 @@ void ElementDescriptor::readDataAwareAttr( OUString const & rAttrName ) { try { - Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellAddressConversion" ), uno::UNO_QUERY ); + Reference< beans::XPropertySet > xConvertor( xFac->createInstance( u"com.sun.star.table.CellAddressConversion"_ustr ), uno::UNO_QUERY ); Reference< beans::XPropertySet > xBindable( xBinding->getValueBinding(), UNO_QUERY ); if ( xBindable.is() ) { table::CellAddress aAddress; - xBindable->getPropertyValue( "BoundCell" ) >>= aAddress; - xConvertor->setPropertyValue( "Address", Any( aAddress ) ); + xBindable->getPropertyValue( u"BoundCell"_ustr ) >>= aAddress; + xConvertor->setPropertyValue( u"Address"_ustr, Any( aAddress ) ); OUString sAddress; - xConvertor->getPropertyValue( "PersistentRepresentation" ) >>= sAddress; + xConvertor->getPropertyValue( u"PersistentRepresentation"_ustr ) >>= sAddress; if ( !sAddress.isEmpty() ) addAttribute( rAttrName, sAddress ); @@ -961,14 +961,14 @@ void ElementDescriptor::readDataAwareAttr( OUString const & rAttrName ) try { - Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellRangeAddressConversion" ), uno::UNO_QUERY ); + Reference< beans::XPropertySet > xConvertor( xFac->createInstance( u"com.sun.star.table.CellRangeAddressConversion"_ustr ), uno::UNO_QUERY ); table::CellRangeAddress aAddress; - xListSource->getPropertyValue( "CellRange" ) >>= aAddress; + xListSource->getPropertyValue( u"CellRange"_ustr ) >>= aAddress; OUString sAddress; - xConvertor->setPropertyValue( "Address", Any( aAddress ) ); - xConvertor->getPropertyValue( "PersistentRepresentation" ) >>= sAddress; + xConvertor->setPropertyValue( u"Address"_ustr, Any( aAddress ) ); + xConvertor->getPropertyValue( u"PersistentRepresentation"_ustr ) >>= sAddress; SAL_INFO("xmlscript.xmldlg","**** cell range source list " << sAddress ); if ( !sAddress.isEmpty() ) addAttribute( rAttrName, sAddress ); @@ -995,16 +995,16 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr switch (eSelectionType) { case ::view::SelectionType_NONE: - addAttribute( rAttrName, "none" ); + addAttribute( rAttrName, u"none"_ustr ); break; case ::view::SelectionType_SINGLE: - addAttribute( rAttrName, "single" ); + addAttribute( rAttrName, u"single"_ustr ); break; case ::view::SelectionType_MULTI: - addAttribute( rAttrName, "multi" ); + addAttribute( rAttrName, u"multi"_ustr ); break; case ::view::SelectionType_RANGE: - addAttribute( rAttrName, "range" ); + addAttribute( rAttrName, u"range"_ustr ); break; default: SAL_WARN( "xmlscript.xmldlg", "### illegal selection type value!" ); @@ -1014,18 +1014,18 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr void ElementDescriptor::readScrollableSettings() { - readLongAttr( "ScrollHeight", - XMLNS_DIALOGS_PREFIX ":scrollheight" ); - readLongAttr( "ScrollWidth", - XMLNS_DIALOGS_PREFIX ":scrollwidth" ); - readLongAttr( "ScrollTop", - XMLNS_DIALOGS_PREFIX ":scrolltop" ); - readLongAttr( "ScrollLeft", - XMLNS_DIALOGS_PREFIX ":scrollleft" ); - readBoolAttr( "HScroll", - XMLNS_DIALOGS_PREFIX ":hscroll" ); - readBoolAttr( "VScroll", - XMLNS_DIALOGS_PREFIX ":vscroll" ); + readLongAttr( u"ScrollHeight"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":scrollheight"_ustr ); + readLongAttr( u"ScrollWidth"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":scrollwidth"_ustr ); + readLongAttr( u"ScrollTop"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":scrolltop"_ustr ); + readLongAttr( u"ScrollLeft"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":scrollleft"_ustr ); + readBoolAttr( u"HScroll"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":hscroll"_ustr ); + readBoolAttr( u"VScroll"_ustr, + u"" XMLNS_DIALOGS_PREFIX ":vscroll"_ustr ); } void ElementDescriptor::readImageScaleModeAttr( OUString const & rPropName, OUString const & rAttrName ) @@ -1044,13 +1044,13 @@ void ElementDescriptor::readImageScaleModeAttr( OUString const & rPropName, OUSt switch(nImageScaleMode) { case ::awt::ImageScaleMode::NONE: - addAttribute( rAttrName, "none" ); + addAttribute( rAttrName, u"none"_ustr ); break; case ::awt::ImageScaleMode::ISOTROPIC: - addAttribute( rAttrName, "isotropic" ); + addAttribute( rAttrName, u"isotropic"_ustr ); break; case ::awt::ImageScaleMode::ANISOTROPIC: - addAttribute( rAttrName, "anisotropic" ); + addAttribute( rAttrName, u"anisotropic"_ustr ); break; default: OSL_ENSURE( false, "### illegal image scale mode value."); @@ -1060,7 +1060,7 @@ void ElementDescriptor::readImageScaleModeAttr( OUString const & rPropName, OUSt void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible ) { - Any a( _xProps->getPropertyValue( "Name" ) ); + Any a( _xProps->getPropertyValue( u"Name"_ustr ) ); // The following is a hack to allow 'form' controls to override the default // control supported by dialogs. This should work well for both VBA support and @@ -1073,25 +1073,25 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible // is only an implementation detail here, in the future some other // method (perhaps a custom prop) could be used instead. Reference< lang::XServiceInfo > xSrvInfo( _xProps, UNO_QUERY ); - if ( xSrvInfo.is() && xSrvInfo->supportsService( "com.sun.star.form.FormComponent" ) ) + if ( xSrvInfo.is() && xSrvInfo->supportsService( u"com.sun.star.form.FormComponent"_ustr ) ) { Reference< io::XPersistObject > xPersist( _xProps, UNO_QUERY ); if ( xPersist.is() ) { OUString sCtrlName = xPersist->getServiceName(); if ( !sCtrlName.isEmpty() ) - addAttribute( XMLNS_DIALOGS_PREFIX ":control-implementation", sCtrlName ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":control-implementation"_ustr, sCtrlName ); } } - addAttribute( XMLNS_DIALOGS_PREFIX ":id", *o3tl::doAccess<OUString>(a) ); - readShortAttr( "TabIndex", XMLNS_DIALOGS_PREFIX ":tab-index" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":id"_ustr, *o3tl::doAccess<OUString>(a) ); + readShortAttr( u"TabIndex"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tab-index"_ustr ); bool bEnabled = false; - if (_xProps->getPropertyValue( "Enabled" ) >>= bEnabled) + if (_xProps->getPropertyValue( u"Enabled"_ustr ) >>= bEnabled) { if (! bEnabled) { - addAttribute( XMLNS_DIALOGS_PREFIX ":disabled", "true" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":disabled"_ustr, u"true"_ustr ); } } else @@ -1102,13 +1102,13 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible if (supportVisible) try { bool bVisible = true; - if (_xProps->getPropertyValue("EnableVisible" ) >>= bVisible) + if (_xProps->getPropertyValue(u"EnableVisible"_ustr ) >>= bVisible) { // only write out the non default case if (! bVisible) { - addAttribute( XMLNS_DIALOGS_PREFIX ":visible", "false" ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":visible"_ustr, u"false"_ustr ); } } } @@ -1117,35 +1117,35 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible DBG_UNHANDLED_EXCEPTION("xmlscript.xmldlg"); } // force writing of pos/size - a = _xProps->getPropertyValue( "PositionX" ); + a = _xProps->getPropertyValue( u"PositionX"_ustr ); if (auto n = o3tl::tryAccess<sal_Int32>(a)) { - addAttribute( XMLNS_DIALOGS_PREFIX ":left", OUString::number(*n) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":left"_ustr, OUString::number(*n) ); } - a = _xProps->getPropertyValue( "PositionY" ); + a = _xProps->getPropertyValue( u"PositionY"_ustr ); if (auto n = o3tl::tryAccess<sal_Int32>(a)) { - addAttribute( XMLNS_DIALOGS_PREFIX ":top", OUString::number(*n) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":top"_ustr, OUString::number(*n) ); } - a = _xProps->getPropertyValue( "Width" ); + a = _xProps->getPropertyValue( u"Width"_ustr ); if (auto n = o3tl::tryAccess<sal_Int32>(a)) { - addAttribute( XMLNS_DIALOGS_PREFIX ":width", OUString::number(*n) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":width"_ustr, OUString::number(*n) ); } - a = _xProps->getPropertyValue( "Height" ); + a = _xProps->getPropertyValue( u"Height"_ustr ); if (auto n = o3tl::tryAccess<sal_Int32>(a)) { - addAttribute( XMLNS_DIALOGS_PREFIX ":height", OUString::number(*n) ); + addAttribute( u"" XMLNS_DIALOGS_PREFIX ":height"_ustr, OUString::number(*n) ); } if (supportPrintable) { - readBoolAttr( "Printable", XMLNS_DIALOGS_PREFIX ":printable" ); + readBoolAttr( u"Printable"_ustr, u"" XMLNS_DIALOGS_PREFIX ":printable"_ustr ); } - readLongAttr( "Step", XMLNS_DIALOGS_PREFIX ":page" ); - readStringAttr( "Tag", XMLNS_DIALOGS_PREFIX ":tag" ); - readStringAttr( "HelpText", XMLNS_DIALOGS_PREFIX ":help-text" ); - readStringAttr( "HelpURL", XMLNS_DIALOGS_PREFIX ":help-url" ); + readLongAttr( u"Step"_ustr, u"" XMLNS_DIALOGS_PREFIX ":page"_ustr ); + readStringAttr( u"Tag"_ustr, u"" XMLNS_DIALOGS_PREFIX ":tag"_ustr ); + readStringAttr( u"HelpText"_ustr, u"" XMLNS_DIALOGS_PREFIX ":help-text"_ustr ); + readStringAttr( u"HelpURL"_ustr, u"" XMLNS_DIALOGS_PREFIX ":help-url"_ustr ); } void ElementDescriptor::readEvents() @@ -1191,18 +1191,18 @@ void ElementDescriptor::readEvents() if (!aEventName.isEmpty()) // script:event { - pElem = new ElementDescriptor( XMLNS_SCRIPT_PREFIX ":event" ); - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":event-name", aEventName ); + pElem = new ElementDescriptor( u"" XMLNS_SCRIPT_PREFIX ":event"_ustr ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":event-name"_ustr, aEventName ); } else // script:listener-event { - pElem = new ElementDescriptor( XMLNS_SCRIPT_PREFIX ":listener-event" ); - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-type", descr.ListenerType ); - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-method", descr.EventMethod ); + pElem = new ElementDescriptor( u"" XMLNS_SCRIPT_PREFIX ":listener-event"_ustr ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":listener-type"_ustr, descr.ListenerType ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":listener-method"_ustr, descr.EventMethod ); if (!descr.AddListenerParam.isEmpty()) { - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":listener-param", descr.AddListenerParam ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":listener-param"_ustr, descr.AddListenerParam ); } } if ( descr.ScriptType == "StarBasic" ) @@ -1211,21 +1211,21 @@ void ElementDescriptor::readEvents() sal_Int32 nIndex = descr.ScriptCode.indexOf( ':' ); if (nIndex >= 0) { - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":location", descr.ScriptCode.copy( 0, nIndex ) ); - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode.copy( nIndex +1 ) ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":location"_ustr, descr.ScriptCode.copy( 0, nIndex ) ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":macro-name"_ustr, descr.ScriptCode.copy( nIndex +1 ) ); } else { - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":macro-name"_ustr, descr.ScriptCode ); } } else { - pElem->addAttribute(XMLNS_SCRIPT_PREFIX ":macro-name", descr.ScriptCode ); + pElem->addAttribute(u"" XMLNS_SCRIPT_PREFIX ":macro-name"_ustr, descr.ScriptCode ); } // language - pElem->addAttribute( XMLNS_SCRIPT_PREFIX ":language", descr.ScriptType ); + pElem->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":language"_ustr, descr.ScriptType ); addSubElement( pElem ); } @@ -1347,7 +1347,7 @@ void StyleBag::dump( Reference< xml::sax::XExtendedDocumentHandler > const & xOu if ( _styles.empty()) return; - OUString aStylesName( XMLNS_DIALOGS_PREFIX ":styles" ); + OUString aStylesName( u"" XMLNS_DIALOGS_PREFIX ":styles"_ustr ); xOut->ignorableWhitespace( OUString() ); xOut->startElement( aStylesName, Reference< xml::sax::XAttributeList >() ); // export styles @@ -1372,17 +1372,17 @@ void exportDialogModel( Reference< beans::XPropertyState > xPropState( xProps, UNO_QUERY ); OSL_ASSERT( xPropState.is() ); - rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", xDocument ); + rtl::Reference<ElementDescriptor> pElem = new ElementDescriptor( xProps, xPropState, u"" XMLNS_DIALOGS_PREFIX ":bulletinboard"_ustr, xDocument ); pElem->readBullitinBoard( &all_styles ); xOut->startDocument(); xOut->unknown( - "<!DOCTYPE dlg:window PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" - " \"dialog.dtd\">" ); + u"<!DOCTYPE dlg:window PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" + " \"dialog.dtd\">"_ustr ); xOut->ignorableWhitespace( OUString() ); - OUString aWindowName( XMLNS_DIALOGS_PREFIX ":window" ); + OUString aWindowName( u"" XMLNS_DIALOGS_PREFIX ":window"_ustr ); rtl::Reference<ElementDescriptor> pWindow = new ElementDescriptor( xProps, xPropState, aWindowName, xDocument ); pWindow->readDialogModel( &all_styles ); xOut->ignorableWhitespace( OUString() ); @@ -1395,7 +1395,7 @@ void exportDialogModel( if ( xDialogModel->getElementNames().hasElements() ) { // open up bulletinboard - OUString aBBoardName( XMLNS_DIALOGS_PREFIX ":bulletinboard" ); + OUString aBBoardName( u"" XMLNS_DIALOGS_PREFIX ":bulletinboard"_ustr ); xOut->ignorableWhitespace( OUString() ); xOut->startElement( aBBoardName, pElem ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index e64e60eabb3d..5457d02edb7e 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -38,7 +38,7 @@ Reference< xml::input::XElement > Frame::startChildElement( Reference< xml::input::XAttributes > const & xAttributes ) { if ( !m_xContainer.is() ) - m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoFrameModel" ), UNO_QUERY ); + m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( u"com.sun.star.awt.UnoFrameModel"_ustr ), UNO_QUERY ); // event if (m_pImport->isEventElement( nUid, rLocalName )) { @@ -53,21 +53,21 @@ Reference< xml::input::XElement > Frame::startChildElement( } else if ( rLocalName == "title" ) { - getStringAttr( &_label, "value", xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + getStringAttr( &_label, u"value"_ustr, xAttributes, m_pImport->XMLNS_DIALOGS_UID ); return new ElementBase( m_pImport->XMLNS_DIALOGS_UID, rLocalName, xAttributes, this, m_pImport ); } else { SAL_INFO("xmlscript.xmldlg","****** ARGGGGG!!!! **********"); - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } } void Frame::endElement() { if ( !m_xContainer.is() ) - m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( "com.sun.star.awt.UnoFrameModel" ), UNO_QUERY ); + m_xContainer.set( m_pImport->_xDialogModelFactory->createInstance( u"com.sun.star.awt.UnoFrameModel"_ustr ), UNO_QUERY ); Reference< beans::XPropertySet > xProps( m_xContainer, UNO_QUERY_THROW ); // m_pImport is what we need to add to ( e.g. the dialog in this case ) ControlImportContext ctx( m_pImport, xProps, getControlId( _xAttributes ) ); @@ -86,7 +86,7 @@ void Frame::endElement() ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement if (!_label.isEmpty()) { - xControlModel->setPropertyValue( "Label" , Any( _label ) ); + xControlModel->setPropertyValue( u"Label"_ustr , Any( _label ) ); } ctx.importEvents( _events ); // avoid ring-reference: @@ -118,7 +118,7 @@ Reference< xml::input::XElement > MultiPage::startChildElement( else { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } } @@ -141,8 +141,8 @@ void MultiPage::endElement() } ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement - ctx.importLongProperty("MultiPageValue" , "value", _xAttributes ); - ctx.importBooleanProperty( "Decoration", "withtabs", _xAttributes) ; + ctx.importLongProperty(u"MultiPageValue"_ustr , u"value"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Decoration"_ustr, u"withtabs"_ustr, _xAttributes) ; ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -171,7 +171,7 @@ Reference< xml::input::XElement > Page::startChildElement( else { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } } @@ -194,7 +194,7 @@ void Page::endElement() } ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement - ctx.importStringProperty( "Title", "title", _xAttributes ); + ctx.importStringProperty( u"Title"_ustr, u"title"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -211,7 +211,7 @@ Reference< xml::input::XElement > ProgressBarElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( @@ -220,7 +220,7 @@ Reference< xml::input::XElement > ProgressBarElement::startChildElement( void ProgressBarElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlProgressBarModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlProgressBarModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -233,9 +233,9 @@ void ProgressBarElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importLongProperty( "ProgressValue", "value", _xAttributes ); - ctx.importLongProperty( "ProgressValueMin", "value-min", _xAttributes ); - ctx.importLongProperty( "ProgressValueMax", "value-max", _xAttributes ); + ctx.importLongProperty( u"ProgressValue"_ustr, u"value"_ustr, _xAttributes ); + ctx.importLongProperty( u"ProgressValueMin"_ustr, u"value-min"_ustr, _xAttributes ); + ctx.importLongProperty( u"ProgressValueMax"_ustr, u"value-max"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -252,7 +252,7 @@ Reference< xml::input::XElement > ScrollBarElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -260,7 +260,7 @@ Reference< xml::input::XElement > ScrollBarElement::startChildElement( void ScrollBarElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlScrollBarModel" , _xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlScrollBarModel"_ustr , _xAttributes ) ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -272,19 +272,19 @@ void ScrollBarElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importOrientationProperty( "Orientation" , "align", _xAttributes ); - ctx.importLongProperty( "BlockIncrement" , "pageincrement" , _xAttributes ); - ctx.importLongProperty( "LineIncrement" , "increment" , _xAttributes ); - ctx.importLongProperty( "ScrollValue" ,"curpos", _xAttributes ); - ctx.importLongProperty( "ScrollValueMax" , "maxpos" , _xAttributes ); - ctx.importLongProperty( "ScrollValueMin","minpos", _xAttributes ); - ctx.importLongProperty( "VisibleSize", "visible-size", _xAttributes ); - ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop" , _xAttributes ); - ctx.importBooleanProperty( "LiveScroll", "live-scroll", _xAttributes ); - ctx.importHexLongProperty( "SymbolColor", "symbol-color", _xAttributes ); - - ctx.importDataAwareProperty( "linked-cell" , _xAttributes ); + ctx.importOrientationProperty( u"Orientation"_ustr , u"align"_ustr, _xAttributes ); + ctx.importLongProperty( u"BlockIncrement"_ustr , u"pageincrement"_ustr , _xAttributes ); + ctx.importLongProperty( u"LineIncrement"_ustr , u"increment"_ustr , _xAttributes ); + ctx.importLongProperty( u"ScrollValue"_ustr ,u"curpos"_ustr, _xAttributes ); + ctx.importLongProperty( u"ScrollValueMax"_ustr , u"maxpos"_ustr , _xAttributes ); + ctx.importLongProperty( u"ScrollValueMin"_ustr,u"minpos"_ustr, _xAttributes ); + ctx.importLongProperty( u"VisibleSize"_ustr, u"visible-size"_ustr, _xAttributes ); + ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"LiveScroll"_ustr, u"live-scroll"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"SymbolColor"_ustr, u"symbol-color"_ustr, _xAttributes ); + + ctx.importDataAwareProperty( u"linked-cell"_ustr , _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -301,7 +301,7 @@ Reference< xml::input::XElement > SpinButtonElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -309,7 +309,7 @@ Reference< xml::input::XElement > SpinButtonElement::startChildElement( void SpinButtonElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlSpinButtonModel", _xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlSpinButtonModel"_ustr, _xAttributes ) ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -321,16 +321,16 @@ void SpinButtonElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importOrientationProperty( "Orientation", "align", _xAttributes ); - ctx.importLongProperty("SpinIncrement", "increment", _xAttributes ); - ctx.importLongProperty("SpinValue", "curval" ,_xAttributes ); - ctx.importLongProperty("SpinValueMax", "maxval", _xAttributes ); - ctx.importLongProperty( "SpinValueMin","minval",_xAttributes ); - ctx.importLongProperty( "Repeat", "repeat", _xAttributes ); - ctx.importLongProperty( "RepeatDelay", "repeat-delay",_xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importHexLongProperty( "SymbolColor", "symbol-color" , _xAttributes ); - ctx.importDataAwareProperty( "linked-cell" , _xAttributes ); + ctx.importOrientationProperty( u"Orientation"_ustr, u"align"_ustr, _xAttributes ); + ctx.importLongProperty(u"SpinIncrement"_ustr, u"increment"_ustr, _xAttributes ); + ctx.importLongProperty(u"SpinValue"_ustr, u"curval"_ustr ,_xAttributes ); + ctx.importLongProperty(u"SpinValueMax"_ustr, u"maxval"_ustr, _xAttributes ); + ctx.importLongProperty( u"SpinValueMin"_ustr,u"minval"_ustr,_xAttributes ); + ctx.importLongProperty( u"Repeat"_ustr, u"repeat"_ustr, _xAttributes ); + ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat-delay"_ustr,_xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"SymbolColor"_ustr, u"symbol-color"_ustr , _xAttributes ); + ctx.importDataAwareProperty( u"linked-cell"_ustr , _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -347,7 +347,7 @@ Reference< xml::input::XElement > FixedLineElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -355,7 +355,7 @@ Reference< xml::input::XElement > FixedLineElement::startChildElement( void FixedLineElement::endElement() { - ControlImportContext ctx(m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedLineModel" ); + ControlImportContext ctx(m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlFixedLineModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -368,8 +368,8 @@ void FixedLineElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importStringProperty( "Label", "value", _xAttributes ); - ctx.importOrientationProperty( "Orientation", "align", _xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, _xAttributes ); + ctx.importOrientationProperty( u"Orientation"_ustr, u"align"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -386,7 +386,7 @@ Reference< xml::input::XElement > PatternFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -394,7 +394,7 @@ Reference< xml::input::XElement > PatternFieldElement::startChildElement( void PatternFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlPatternFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlPatternFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -409,14 +409,14 @@ void PatternFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importStringProperty( "Text", "value", _xAttributes ); - ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes ); - ctx.importStringProperty( "EditMask", "edit-mask", _xAttributes ); - ctx.importStringProperty( "LiteralMask", "literal-mask", _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"value"_ustr, _xAttributes ); + ctx.importShortProperty( u"MaxTextLen"_ustr, u"maxlength"_ustr, _xAttributes ); + ctx.importStringProperty( u"EditMask"_ustr, u"edit-mask"_ustr, _xAttributes ); + ctx.importStringProperty( u"LiteralMask"_ustr, u"literal-mask"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -433,7 +433,7 @@ Reference< xml::input::XElement > FormattedFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -441,7 +441,7 @@ Reference< xml::input::XElement > FormattedFieldElement::startChildElement( void FormattedFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFormattedFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlFormattedFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -456,43 +456,43 @@ void FormattedFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format" , _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importAlignProperty( "Align" , "align" , _xAttributes ); - ctx.importDoubleProperty( "EffectiveMin", "value-min" , _xAttributes ); - ctx.importDoubleProperty( "EffectiveMax", "value-max", _xAttributes); - ctx.importDoubleProperty( "EffectiveValue", "value", _xAttributes ); - ctx.importStringProperty( "Text", "text", _xAttributes ); - ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes ); - ctx.importBooleanProperty( "Spin", "spin", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue( "Repeat" , Any(true) ); - - OUString sDefault(_xAttributes->getValueByUidName(m_pImport->XMLNS_DIALOGS_UID, "value-default") ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr , u"align"_ustr , _xAttributes ); + ctx.importDoubleProperty( u"EffectiveMin"_ustr, u"value-min"_ustr , _xAttributes ); + ctx.importDoubleProperty( u"EffectiveMax"_ustr, u"value-max"_ustr, _xAttributes); + ctx.importDoubleProperty( u"EffectiveValue"_ustr, u"value"_ustr, _xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"text"_ustr, _xAttributes ); + ctx.importShortProperty( u"MaxTextLen"_ustr, u"maxlength"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Spin"_ustr, u"spin"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue( u"Repeat"_ustr , Any(true) ); + + OUString sDefault(_xAttributes->getValueByUidName(m_pImport->XMLNS_DIALOGS_UID, u"value-default"_ustr) ); if (!sDefault.isEmpty()) { double d = sDefault.toDouble(); if (d != 0.0 || sDefault == "0" || sDefault == "0.0" ) { - ctx.getControlModel()->setPropertyValue( "EffectiveDefault", Any( d ) ); + ctx.getControlModel()->setPropertyValue( u"EffectiveDefault"_ustr, Any( d ) ); } else // treat as string { - ctx.getControlModel()->setPropertyValue( "EffectiveDefault", Any( sDefault ) ); + ctx.getControlModel()->setPropertyValue( u"EffectiveDefault"_ustr, Any( sDefault ) ); } } // format spec - ctx.getControlModel()->setPropertyValue("FormatsSupplier", Any( m_pImport->getNumberFormatsSupplier() ) ); + ctx.getControlModel()->setPropertyValue(u"FormatsSupplier"_ustr, Any( m_pImport->getNumberFormatsSupplier() ) ); - OUString sFormat( _xAttributes->getValueByUidName(m_pImport->XMLNS_DIALOGS_UID, "format-code" ) ); + OUString sFormat( _xAttributes->getValueByUidName(m_pImport->XMLNS_DIALOGS_UID, u"format-code"_ustr ) ); if (!sFormat.isEmpty()) { lang::Locale locale; - OUString sLocale( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "format-locale" ) ); + OUString sLocale( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"format-locale"_ustr ) ); if (!sLocale.isEmpty()) { // split locale @@ -530,7 +530,7 @@ void FormattedFieldElement::endElement() { nKey = xFormats->addNew( sFormat, locale ); } - ctx.getControlModel()->setPropertyValue("FormatKey", Any( nKey ) ); + ctx.getControlModel()->setPropertyValue(u"FormatKey"_ustr, Any( nKey ) ); } catch (const util::MalformedNumberFormatException & exc) { @@ -540,10 +540,10 @@ void FormattedFieldElement::endElement() throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), anyEx ); } } - ctx.importBooleanProperty("TreatAsNumber", "treat-as-number" , _xAttributes ); - ctx.importBooleanProperty("EnforceFormat", "enforce-format", _xAttributes ); + ctx.importBooleanProperty(u"TreatAsNumber"_ustr, u"treat-as-number"_ustr , _xAttributes ); + ctx.importBooleanProperty(u"EnforceFormat"_ustr, u"enforce-format"_ustr, _xAttributes ); - ctx.importDataAwareProperty( "linked-cell" , _xAttributes ); + ctx.importDataAwareProperty( u"linked-cell"_ustr , _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -560,7 +560,7 @@ Reference< xml::input::XElement > TimeFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -568,7 +568,7 @@ Reference< xml::input::XElement > TimeFieldElement::startChildElement( void TimeFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlTimeFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlTimeFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -583,19 +583,19 @@ void TimeFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty("ReadOnly", "readonly", _xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes ); - ctx.importBooleanProperty("HideInactiveSelection","hide-inactive-selection", _xAttributes ); - ctx.importTimeFormatProperty( "TimeFormat", "time-format", _xAttributes ); - ctx.importTimeProperty( "Time", "value", _xAttributes ); - ctx.importTimeProperty( "TimeMin", "value-min", _xAttributes ); - ctx.importTimeProperty( "TimeMax", "value-max", _xAttributes ); - ctx.importBooleanProperty( "Spin", "spin", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue("Repeat", Any(true) ); - ctx.importStringProperty( "Text", "text" , _xAttributes ); - ctx.importBooleanProperty( "EnforceFormat", "enforce-format" , _xAttributes ); + ctx.importBooleanProperty(u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"HideInactiveSelection"_ustr,u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importTimeFormatProperty( u"TimeFormat"_ustr, u"time-format"_ustr, _xAttributes ); + ctx.importTimeProperty( u"Time"_ustr, u"value"_ustr, _xAttributes ); + ctx.importTimeProperty( u"TimeMin"_ustr, u"value-min"_ustr, _xAttributes ); + ctx.importTimeProperty( u"TimeMax"_ustr, u"value-max"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Spin"_ustr, u"spin"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue(u"Repeat"_ustr, Any(true) ); + ctx.importStringProperty( u"Text"_ustr, u"text"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"EnforceFormat"_ustr, u"enforce-format"_ustr , _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: @@ -613,7 +613,7 @@ Reference< xml::input::XElement > NumericFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -621,7 +621,7 @@ Reference< xml::input::XElement > NumericFieldElement::startChildElement( void NumericFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlNumericFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlNumericFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -636,22 +636,22 @@ void NumericFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "Tabstop","tabstop",_xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly",_xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importShortProperty( "DecimalAccuracy", "decimal-accuracy", _xAttributes ); - ctx.importBooleanProperty( "ShowThousandsSeparator", "thousands-separator", _xAttributes ); - ctx.importDoubleProperty( "Value", "value", _xAttributes ); - ctx.importDoubleProperty( "ValueMin", "value-min", _xAttributes ); - ctx.importDoubleProperty( "ValueMax", "value-max", _xAttributes ); - ctx.importDoubleProperty( "ValueStep", "value-step", _xAttributes ); - ctx.importBooleanProperty( "Spin", "spin", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue("Repeat", Any(true) ); - ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr,u"tabstop"_ustr,_xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr,_xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importShortProperty( u"DecimalAccuracy"_ustr, u"decimal-accuracy"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowThousandsSeparator"_ustr, u"thousands-separator"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"Value"_ustr, u"value"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueMin"_ustr, u"value-min"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueMax"_ustr, u"value-max"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueStep"_ustr, u"value-step"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Spin"_ustr, u"spin"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue(u"Repeat"_ustr, Any(true) ); + ctx.importBooleanProperty( u"EnforceFormat"_ustr, u"enforce-format"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -668,7 +668,7 @@ Reference< xml::input::XElement > DateFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -676,7 +676,7 @@ Reference< xml::input::XElement > DateFieldElement::startChildElement( void DateFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlDateFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlDateFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -691,23 +691,23 @@ void DateFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importDateFormatProperty( "DateFormat", "date-format", _xAttributes ); - ctx.importBooleanProperty( "DateShowCentury", "show-century", _xAttributes ); - ctx.importDateProperty( "Date", "value", _xAttributes ); - ctx.importDateProperty( "DateMin", "value-min", _xAttributes ); - ctx.importDateProperty( "DateMax", "value-max", _xAttributes ); - ctx.importBooleanProperty( "Spin", "spin", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue( "Repeat", Any(true) ); - ctx.importBooleanProperty( "Dropdown", "dropdown", _xAttributes ); - ctx.importStringProperty( "Text", "text", _xAttributes ); - ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importDateFormatProperty( u"DateFormat"_ustr, u"date-format"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"DateShowCentury"_ustr, u"show-century"_ustr, _xAttributes ); + ctx.importDateProperty( u"Date"_ustr, u"value"_ustr, _xAttributes ); + ctx.importDateProperty( u"DateMin"_ustr, u"value-min"_ustr, _xAttributes ); + ctx.importDateProperty( u"DateMax"_ustr, u"value-max"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Spin"_ustr, u"spin"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue( u"Repeat"_ustr, Any(true) ); + ctx.importBooleanProperty( u"Dropdown"_ustr, u"dropdown"_ustr, _xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"text"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"EnforceFormat"_ustr, u"enforce-format"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -724,7 +724,7 @@ Reference< xml::input::XElement > CurrencyFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr , Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -732,7 +732,7 @@ Reference< xml::input::XElement > CurrencyFieldElement::startChildElement( void CurrencyFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlCurrencyFieldModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlCurrencyFieldModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -747,24 +747,24 @@ void CurrencyFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly" , _xAttributes ); - ctx.importBooleanProperty( "StrictFormat", "strict-format", _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importStringProperty( "CurrencySymbol", "currency-symbol", _xAttributes ); - ctx.importShortProperty( "DecimalAccuracy", "decimal-accuracy", _xAttributes ); - ctx.importBooleanProperty( "ShowThousandsSeparator", "thousands-separator", _xAttributes ); - ctx.importDoubleProperty( "Value", "value", _xAttributes ); - ctx.importDoubleProperty( "ValueMin", "value-min", _xAttributes ); - ctx.importDoubleProperty( "ValueMax", "value-max", _xAttributes ); - ctx.importDoubleProperty( "ValueStep", "value-step", _xAttributes ); - ctx.importBooleanProperty( "Spin", "spin", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue( "Repeat", Any(true) ); - ctx.importBooleanProperty( "PrependCurrencySymbol", "prepend-symbol", _xAttributes ); - ctx.importBooleanProperty( "EnforceFormat", "enforce-format", _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr , _xAttributes ); + ctx.importBooleanProperty( u"StrictFormat"_ustr, u"strict-format"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importStringProperty( u"CurrencySymbol"_ustr, u"currency-symbol"_ustr, _xAttributes ); + ctx.importShortProperty( u"DecimalAccuracy"_ustr, u"decimal-accuracy"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowThousandsSeparator"_ustr, u"thousands-separator"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"Value"_ustr, u"value"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueMin"_ustr, u"value-min"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueMax"_ustr, u"value-max"_ustr, _xAttributes ); + ctx.importDoubleProperty( u"ValueStep"_ustr, u"value-step"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Spin"_ustr, u"spin"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue( u"Repeat"_ustr, Any(true) ); + ctx.importBooleanProperty( u"PrependCurrencySymbol"_ustr, u"prepend-symbol"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"EnforceFormat"_ustr, u"enforce-format"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -781,7 +781,7 @@ Reference< xml::input::XElement > FileControlElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -789,7 +789,7 @@ Reference< xml::input::XElement > FileControlElement::startChildElement( void FileControlElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFileControlModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlFileControlModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -804,10 +804,10 @@ void FileControlElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty("HideInactiveSelection","hide-inactive-selection", _xAttributes ); - ctx.importStringProperty( "Text", "value", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"HideInactiveSelection"_ustr,u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"value"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -824,7 +824,7 @@ Reference< xml::input::XElement > TreeControlElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -832,7 +832,7 @@ Reference< xml::input::XElement > TreeControlElement::startChildElement( void TreeControlElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.tree.TreeControlModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.tree.TreeControlModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -844,14 +844,14 @@ void TreeControlElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importSelectionTypeProperty( "SelectionType", "selectiontype", _xAttributes ); - ctx.importBooleanProperty( "RootDisplayed", "rootdisplayed", _xAttributes ); - ctx.importBooleanProperty( "ShowsHandles", "showshandles", _xAttributes ); - ctx.importBooleanProperty( "ShowsRootHandles", "showsroothandles" ,_xAttributes ); - ctx.importBooleanProperty( "Editable", "editable", _xAttributes ); - ctx.importBooleanProperty( "RowHeight", "readonly", _xAttributes ); - ctx.importBooleanProperty( "InvokesStopNodeEditing", "invokesstopnodeediting", _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importSelectionTypeProperty( u"SelectionType"_ustr, u"selectiontype"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"RootDisplayed"_ustr, u"rootdisplayed"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowsHandles"_ustr, u"showshandles"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowsRootHandles"_ustr, u"showsroothandles"_ustr ,_xAttributes ); + ctx.importBooleanProperty( u"Editable"_ustr, u"editable"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"RowHeight"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"InvokesStopNodeEditing"_ustr, u"invokesstopnodeediting"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: @@ -869,7 +869,7 @@ Reference< xml::input::XElement > ImageControlElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr , Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -877,7 +877,7 @@ Reference< xml::input::XElement > ImageControlElement::startChildElement( void ImageControlElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlImageControlModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlImageControlModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -889,10 +889,10 @@ void ImageControlElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "ScaleImage", "scale-image", _xAttributes ); - ctx.importImageScaleModeProperty( "ScaleMode" , "scale-mode" , _xAttributes ); - ctx.importGraphicOrImageProperty("src" , _xAttributes); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); + ctx.importBooleanProperty( u"ScaleImage"_ustr, u"scale-image"_ustr, _xAttributes ); + ctx.importImageScaleModeProperty( u"ScaleMode"_ustr , u"scale-mode"_ustr , _xAttributes ); + ctx.importGraphicOrImageProperty(u"src"_ustr , _xAttributes); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -909,7 +909,7 @@ Reference< xml::input::XElement > TextElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -917,7 +917,7 @@ Reference< xml::input::XElement > TextElement::startChildElement( void TextElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedTextModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlFixedTextModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -932,12 +932,12 @@ void TextElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importStringProperty( "Label", "value", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline" ,_xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "NoLabel", "nolabel", _xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr ,_xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"NoLabel"_ustr, u"nolabel"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -954,7 +954,7 @@ Reference< xml::input::XElement > FixedHyperLinkElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!" , Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr , Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -962,7 +962,7 @@ Reference< xml::input::XElement > FixedHyperLinkElement::startChildElement( void FixedHyperLinkElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlFixedHyperlinkModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlFixedHyperlinkModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -977,14 +977,14 @@ void FixedHyperLinkElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importStringProperty( "Label", "value", _xAttributes ); - ctx.importStringProperty( "URL", "url", _xAttributes ); - - ctx.importAlignProperty( "Align", "align" ,_xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "NoLabel", "nolabel", _xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, _xAttributes ); + ctx.importStringProperty( u"URL"_ustr, u"url"_ustr, _xAttributes ); + + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr ,_xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"NoLabel"_ustr, u"nolabel"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) @@ -1001,7 +1001,7 @@ Reference< xml::input::XElement > TextFieldElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -1009,7 +1009,7 @@ Reference< xml::input::XElement > TextFieldElement::startChildElement( void TextFieldElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlEditModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlEditModel"_ustr ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); @@ -1024,20 +1024,20 @@ void TextFieldElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty("Tabstop", "tabstop", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "HardLineBreaks", "hard-linebreaks", _xAttributes ); - ctx.importBooleanProperty( "HScroll", "hscroll" ,_xAttributes ); - ctx.importBooleanProperty( "VScroll", "vscroll", _xAttributes ); - ctx.importBooleanProperty("HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importShortProperty( "MaxTextLen", "maxlength", _xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes ); - ctx.importStringProperty( "Text", "value", _xAttributes ); - ctx.importLineEndFormatProperty( "LineEndFormat", "lineend-format", _xAttributes ); + ctx.importBooleanProperty(u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HardLineBreaks"_ustr, u"hard-linebreaks"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HScroll"_ustr, u"hscroll"_ustr ,_xAttributes ); + ctx.importBooleanProperty( u"VScroll"_ustr, u"vscroll"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importShortProperty( u"MaxTextLen"_ustr, u"maxlength"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"value"_ustr, _xAttributes ); + ctx.importLineEndFormatProperty( u"LineEndFormat"_ustr, u"lineend-format"_ustr, _xAttributes ); OUString aValue; - if (getStringAttr( &aValue, "echochar", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && !aValue.isEmpty() ) + if (getStringAttr( &aValue, u"echochar"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && !aValue.isEmpty() ) { SAL_WARN_IF( aValue.getLength() != 1, "xmlscript.xmldlg", "### more than one character given for echochar!" ); sal_Int16 nChar = 0; @@ -1045,7 +1045,7 @@ void TextFieldElement::endElement() { nChar = static_cast<sal_Int16>(aValue[ 0 ]); } - xControlModel->setPropertyValue( "EchoChar", Any( nChar ) ); + xControlModel->setPropertyValue( u"EchoChar"_ustr, Any( nChar ) ); } ctx.importEvents( _events ); @@ -1068,12 +1068,12 @@ Reference< xml::input::XElement > TitledBoxElement::startChildElement( } else if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // title else if ( rLocalName == "title" ) { - getStringAttr( &_label, "value", xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + getStringAttr( &_label, u"value"_ustr, xAttributes, m_pImport->XMLNS_DIALOGS_UID ); return new ElementBase( m_pImport->XMLNS_DIALOGS_UID, rLocalName, xAttributes, this, m_pImport ); } @@ -1096,7 +1096,7 @@ Reference< xml::input::XElement > TitledBoxElement::startChildElement( void TitledBoxElement::endElement() { { - ControlImportContext ctx(m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlGroupBoxModel" ); + ControlImportContext ctx(m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlGroupBoxModel"_ustr ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); @@ -1112,7 +1112,7 @@ void TitledBoxElement::endElement() if (!_label.isEmpty()) { - xControlModel->setPropertyValue( "Label", Any( _label ) ); + xControlModel->setPropertyValue( u"Label"_ustr, Any( _label ) ); } ctx.importEvents( _events ); @@ -1128,7 +1128,7 @@ void TitledBoxElement::endElement() { Reference< xml::input::XAttributes > xAttributes( xRadio->getAttributes() ); - ControlImportContext ctx( m_pImport, getControlId( xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlRadioButtonModel", xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr, xAttributes ) ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) ); @@ -1143,23 +1143,23 @@ void TitledBoxElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", xAttributes ); - ctx.importStringProperty( "Label", "value", xAttributes ); - ctx.importAlignProperty( "Align", "align", xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", xAttributes ); - ctx.importGraphicOrImageProperty("image-src" , _xAttributes); - ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); - ctx.importStringProperty( "GroupName", "group-name", xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, xAttributes ); + ctx.importGraphicOrImageProperty(u"image-src"_ustr , _xAttributes); + ctx.importImagePositionProperty( u"ImagePosition"_ustr, u"image-position"_ustr, xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, xAttributes ); + ctx.importStringProperty( u"GroupName"_ustr, u"group-name"_ustr, xAttributes ); sal_Int16 nVal = 0; sal_Bool bChecked = false; - if (getBoolAttr( &bChecked, "checked", xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) + if (getBoolAttr( &bChecked, u"checked"_ustr, xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) { nVal = 1; } - xControlModel->setPropertyValue( "State", Any( nVal ) ); - ctx.importDataAwareProperty( "linked-cell" , xAttributes ); + xControlModel->setPropertyValue( u"State"_ustr, Any( nVal ) ); + ctx.importDataAwareProperty( u"linked-cell"_ustr , xAttributes ); ::std::vector< Reference< xml::input::XElement > > & radioEvents = static_cast< RadioElement * >( xRadio.get() )->getEvents(); ctx.importEvents( radioEvents ); @@ -1182,7 +1182,7 @@ Reference< xml::input::XElement > RadioElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException("expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -1195,7 +1195,7 @@ Reference< xml::input::XElement > RadioGroupElement::startChildElement( { if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // radio else if ( rLocalName == "radio" ) @@ -1209,7 +1209,7 @@ Reference< xml::input::XElement > RadioGroupElement::startChildElement( } else { - throw xml::sax::SAXException( "expected radio element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected radio element!"_ustr, Reference< XInterface >(), Any() ); } } void RadioGroupElement::endElement() @@ -1219,7 +1219,7 @@ void RadioGroupElement::endElement() Reference< xml::input::XAttributes > xAttributes( xRadio->getAttributes() ); - ControlImportContext ctx( m_pImport, getControlId( xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlRadioButtonModel", xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr, xAttributes ) ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( xAttributes ) ); @@ -1234,23 +1234,23 @@ void RadioGroupElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, xAttributes ); - ctx.importBooleanProperty("Tabstop", "tabstop", xAttributes ); - ctx.importStringProperty( "Label", "value", xAttributes ); - ctx.importAlignProperty( "Align", "align", xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", xAttributes ); - ctx.importGraphicOrImageProperty("image-src" , _xAttributes); - ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); - ctx.importStringProperty( "GroupName", "group-name", xAttributes ); + ctx.importBooleanProperty(u"Tabstop"_ustr, u"tabstop"_ustr, xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, xAttributes ); + ctx.importGraphicOrImageProperty(u"image-src"_ustr , _xAttributes); + ctx.importImagePositionProperty( u"ImagePosition"_ustr, u"image-position"_ustr, xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, xAttributes ); + ctx.importStringProperty( u"GroupName"_ustr, u"group-name"_ustr, xAttributes ); sal_Int16 nVal = 0; sal_Bool bChecked = false; - if (getBoolAttr( &bChecked, "checked", xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) + if (getBoolAttr( &bChecked, u"checked"_ustr, xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) { nVal = 1; } - xControlModel->setPropertyValue( "State", Any( nVal ) ); + xControlModel->setPropertyValue( u"State"_ustr, Any( nVal ) ); - ctx.importDataAwareProperty( "linked-cell", xAttributes ); + ctx.importDataAwareProperty( u"linked-cell"_ustr, xAttributes ); ::std::vector< Reference< xml::input::XElement > > & radioEvents = static_cast< RadioElement * >( xRadio.get() )->getEvents(); @@ -1273,18 +1273,18 @@ Reference< xml::input::XElement > MenuPopupElement::startChildElement( { if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // menuitem else if ( rLocalName == "menuitem" ) { - OUString aValue( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID,"value" ) ); + OUString aValue( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID,u"value"_ustr ) ); SAL_WARN_IF( aValue.isEmpty() && !_allowEmptyItems, "xmlscript.xmldlg", "### menuitem has no value?" ); if ((!aValue.isEmpty()) || _allowEmptyItems) { _itemValues.push_back( aValue ); - OUString aSel( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "selected" ) ); + OUString aSel( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"selected"_ustr ) ); if (!aSel.isEmpty() && aSel == "true") { _itemSelected.push_back( static_cast<sal_Int16>(_itemValues.size()) -1 ); @@ -1294,7 +1294,7 @@ Reference< xml::input::XElement > MenuPopupElement::startChildElement( } else { - throw xml::sax::SAXException("expected menuitem!" , Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"expected menuitem!"_ustr , Reference< XInterface >(), Any() ); } } Sequence< OUString > MenuPopupElement::getItemValues() @@ -1330,7 +1330,7 @@ Reference< xml::input::XElement > MenuListElement::startChildElement( } else if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // menupopup else if ( rLocalName == "menupopup" ) @@ -1340,13 +1340,13 @@ Reference< xml::input::XElement > MenuListElement::startChildElement( } else { - throw xml::sax::SAXException( "expected event or menupopup element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event or menupopup element!"_ustr, Reference< XInterface >(), Any() ); } } void MenuListElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlListBoxModel", _xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlListBoxModel"_ustr, _xAttributes ) ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); @@ -1361,20 +1361,20 @@ void MenuListElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "MultiSelection", "multiselection", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes ); - ctx.importBooleanProperty( "Dropdown", "spin", _xAttributes ); - ctx.importShortProperty( "LineCount", "linecount", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - bool bHasLinkedCell = ctx.importDataAwareProperty( "linked-cell" , _xAttributes ); - bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiSelection"_ustr, u"multiselection"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Dropdown"_ustr, u"spin"_ustr, _xAttributes ); + ctx.importShortProperty( u"LineCount"_ustr, u"linecount"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + bool bHasLinkedCell = ctx.importDataAwareProperty( u"linked-cell"_ustr , _xAttributes ); + bool bHasSrcRange = ctx.importDataAwareProperty( u"source-cell-range"_ustr , _xAttributes ); if (_popup.is()) { if ( !bHasSrcRange ) - xControlModel->setPropertyValue( "StringItemList", Any( _popup->getItemValues() ) ); + xControlModel->setPropertyValue( u"StringItemList"_ustr, Any( _popup->getItemValues() ) ); if ( !bHasLinkedCell ) - xControlModel->setPropertyValue( "SelectedItems", Any( _popup->getSelectedItems() ) ); + xControlModel->setPropertyValue( u"SelectedItems"_ustr, Any( _popup->getSelectedItems() ) ); } ctx.importEvents( _events ); @@ -1397,7 +1397,7 @@ Reference< xml::input::XElement > ComboBoxElement::startChildElement( } else if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // menupopup else if ( rLocalName == "menupopup" ) @@ -1407,12 +1407,12 @@ Reference< xml::input::XElement > ComboBoxElement::startChildElement( } else { - throw xml::sax::SAXException( "expected event or menupopup element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event or menupopup element!"_ustr, Reference< XInterface >(), Any() ); } } void ComboBoxElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( "com.sun.star.awt.UnoControlComboBoxModel", _xAttributes ) ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), getControlModelName( u"com.sun.star.awt.UnoControlComboBoxModel"_ustr, _xAttributes ) ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); @@ -1427,20 +1427,20 @@ void ComboBoxElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importBooleanProperty( "ReadOnly", "readonly", _xAttributes ); - ctx.importBooleanProperty( "Autocomplete", "autocomplete", _xAttributes ); - ctx.importBooleanProperty( "Dropdown", "spin", _xAttributes ); - ctx.importBooleanProperty( "HideInactiveSelection", "hide-inactive-selection", _xAttributes ); - ctx.importShortProperty( "MaxTextLen", "maxlength" ,_xAttributes ); - ctx.importShortProperty( "LineCount", "linecount" ,_xAttributes ); - ctx.importStringProperty( "Text", "value", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importDataAwareProperty( "linked-cell" , _xAttributes ); - bool bHasSrcRange = ctx.importDataAwareProperty( "source-cell-range" , _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ReadOnly"_ustr, u"readonly"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Autocomplete"_ustr, u"autocomplete"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Dropdown"_ustr, u"spin"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"HideInactiveSelection"_ustr, u"hide-inactive-selection"_ustr, _xAttributes ); + ctx.importShortProperty( u"MaxTextLen"_ustr, u"maxlength"_ustr ,_xAttributes ); + ctx.importShortProperty( u"LineCount"_ustr, u"linecount"_ustr ,_xAttributes ); + ctx.importStringProperty( u"Text"_ustr, u"value"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importDataAwareProperty( u"linked-cell"_ustr , _xAttributes ); + bool bHasSrcRange = ctx.importDataAwareProperty( u"source-cell-range"_ustr , _xAttributes ); if (_popup.is() && !bHasSrcRange ) { - xControlModel->setPropertyValue( "StringItemList", Any( _popup->getItemValues() ) ); + xControlModel->setPropertyValue( u"StringItemList"_ustr, Any( _popup->getItemValues() ) ); } ctx.importEvents( _events ); @@ -1459,7 +1459,7 @@ Reference< xml::input::XElement > CheckBoxElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -1467,7 +1467,7 @@ Reference< xml::input::XElement > CheckBoxElement::startChildElement( void CheckBoxElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlCheckBoxModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlCheckBoxModel"_ustr ); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); @@ -1482,30 +1482,30 @@ void CheckBoxElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importStringProperty( "Label", "value", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importGraphicOrImageProperty("image-src" , _xAttributes); - ctx.importImagePositionProperty( "ImagePosition", "image-position", _xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importGraphicOrImageProperty(u"image-src"_ustr , _xAttributes); + ctx.importImagePositionProperty( u"ImagePosition"_ustr, u"image-position"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, _xAttributes ); sal_Bool bTriState = false; - if (getBoolAttr( &bTriState, "tristate", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getBoolAttr( &bTriState, u"tristate"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { - xControlModel->setPropertyValue( "TriState", Any( bTriState ) ); + xControlModel->setPropertyValue( u"TriState"_ustr, Any( bTriState ) ); } sal_Bool bChecked = false; - if (getBoolAttr( &bChecked, "checked", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getBoolAttr( &bChecked, u"checked"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { // has "checked" attribute sal_Int16 nVal = (bChecked ? 1 : 0); - xControlModel->setPropertyValue( "State", Any( nVal ) ); + xControlModel->setPropertyValue( u"State"_ustr, Any( nVal ) ); } else { sal_Int16 nVal = (bTriState ? 2 : 0); // if tristate set, but checked omitted => don't know! - xControlModel->setPropertyValue( "State", Any( nVal ) ); + xControlModel->setPropertyValue( u"State"_ustr, Any( nVal ) ); } ctx.importEvents( _events ); @@ -1524,7 +1524,7 @@ Reference< xml::input::XElement > ButtonElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -1532,7 +1532,7 @@ Reference< xml::input::XElement > ButtonElement::startChildElement( void ButtonElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.UnoControlButtonModel" ); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.UnoControlButtonModel"_ustr ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -1546,27 +1546,27 @@ void ButtonElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importStringProperty( "Label", "value", _xAttributes ); - ctx.importAlignProperty( "Align", "align", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importBooleanProperty( "DefaultButton", "default", _xAttributes ); - ctx.importButtonTypeProperty( "PushButtonType", "button-type", _xAttributes ); - ctx.importGraphicOrImageProperty("image-src" , _xAttributes); - ctx.importImagePositionProperty( "ImagePosition", "image-position", _xAttributes ); - ctx.importImageAlignProperty( "ImageAlign", "image-align", _xAttributes ); - if (ctx.importLongProperty( "RepeatDelay", "repeat", _xAttributes )) - ctx.getControlModel()->setPropertyValue( "Repeat", Any(true) ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importStringProperty( u"Label"_ustr, u"value"_ustr, _xAttributes ); + ctx.importAlignProperty( u"Align"_ustr, u"align"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"DefaultButton"_ustr, u"default"_ustr, _xAttributes ); + ctx.importButtonTypeProperty( u"PushButtonType"_ustr, u"button-type"_ustr, _xAttributes ); + ctx.importGraphicOrImageProperty(u"image-src"_ustr , _xAttributes); + ctx.importImagePositionProperty( u"ImagePosition"_ustr, u"image-position"_ustr, _xAttributes ); + ctx.importImageAlignProperty( u"ImageAlign"_ustr, u"image-align"_ustr, _xAttributes ); + if (ctx.importLongProperty( u"RepeatDelay"_ustr, u"repeat"_ustr, _xAttributes )) + ctx.getControlModel()->setPropertyValue( u"Repeat"_ustr, Any(true) ); sal_Int32 toggled = 0; - if (getLongAttr( &toggled, "toggled", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && toggled == 1) - ctx.getControlModel()->setPropertyValue( "Toggle" , Any(true)); - ctx.importBooleanProperty( "FocusOnClick", "grab-focus", _xAttributes ); - ctx.importBooleanProperty( "MultiLine", "multiline", _xAttributes ); + if (getLongAttr( &toggled, u"toggled"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && toggled == 1) + ctx.getControlModel()->setPropertyValue( u"Toggle"_ustr , Any(true)); + ctx.importBooleanProperty( u"FocusOnClick"_ustr, u"grab-focus"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"MultiLine"_ustr, u"multiline"_ustr, _xAttributes ); // State sal_Bool bChecked = false; - if (getBoolAttr( &bChecked, "checked", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) + if (getBoolAttr( &bChecked, u"checked"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ) && bChecked) { - ctx.getControlModel()->setPropertyValue( "State" , Any( sal_Int16(1) ) ); + ctx.getControlModel()->setPropertyValue( u"State"_ustr , Any( sal_Int16(1) ) ); } ctx.importEvents( _events ); @@ -1584,7 +1584,7 @@ Reference< xml::input::XElement > BulletinBoardElement::startChildElement( { if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException("illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // button else if ( rLocalName == "button" ) @@ -1730,12 +1730,12 @@ BulletinBoardElement::BulletinBoardElement( : ControlElement( rLocalName, xAttributes, pParent, pImport ), mxDialogImport(pImport) { - OUString aValue( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "left" ) ); + OUString aValue( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"left"_ustr ) ); if (!aValue.isEmpty()) { _nBasePosX += toInt32( aValue ); } - aValue = _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "top" ); + aValue = _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"top"_ustr ); if (!aValue.isEmpty()) { _nBasePosY += toInt32( aValue ); @@ -1747,15 +1747,15 @@ Reference< xml::input::XElement > StyleElement::startChildElement( sal_Int32 /*nUid*/, OUString const & /*rLocalName*/, Reference< xml::input::XAttributes > const & /*xAttributes*/ ) { - throw xml::sax::SAXException( "unexpected sub elements of style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"unexpected sub elements of style!"_ustr, Reference< XInterface >(), Any() ); } void StyleElement::endElement() { - OUString aStyleId( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "style-id" ) ); + OUString aStyleId( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"style-id"_ustr ) ); if (aStyleId.isEmpty()) { - throw xml::sax::SAXException( "missing style-id attribute!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"missing style-id attribute!"_ustr, Reference< XInterface >(), Any() ); } m_pImport->addStyle( aStyleId, this ); @@ -1768,7 +1768,7 @@ Reference< xml::input::XElement > StylesElement::startChildElement( { if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // style else if ( rLocalName == "style" ) @@ -1777,7 +1777,7 @@ Reference< xml::input::XElement > StylesElement::startChildElement( } else { - throw xml::sax::SAXException( "expected style element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected style element!"_ustr, Reference< XInterface >(), Any() ); } } @@ -1793,7 +1793,7 @@ Reference< xml::input::XElement > WindowElement::startChildElement( } else if (m_pImport->XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // styles else if ( rLocalName == "styles" ) @@ -1807,7 +1807,7 @@ Reference< xml::input::XElement > WindowElement::startChildElement( } else { - throw xml::sax::SAXException( "expected styles or bulletinboard element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected styles or bulletinboard element!"_ustr, Reference< XInterface >(), Any() ); } } @@ -1828,12 +1828,12 @@ void WindowElement::endElement() } ctx.importDefaults( 0, 0, _xAttributes, false ); - ctx.importBooleanProperty( "Closeable", "closeable", _xAttributes ); - ctx.importBooleanProperty( "Moveable", "moveable", _xAttributes ); - ctx.importBooleanProperty("Sizeable", "resizeable", _xAttributes ); - ctx.importStringProperty("Title", "title", _xAttributes ); - ctx.importBooleanProperty("Decoration", "withtitlebar", _xAttributes ); - ctx.importGraphicOrImageProperty("image-src" , _xAttributes); + ctx.importBooleanProperty( u"Closeable"_ustr, u"closeable"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"Moveable"_ustr, u"moveable"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"Sizeable"_ustr, u"resizeable"_ustr, _xAttributes ); + ctx.importStringProperty(u"Title"_ustr, u"title"_ustr, _xAttributes ); + ctx.importBooleanProperty(u"Decoration"_ustr, u"withtitlebar"_ustr, _xAttributes ); + ctx.importGraphicOrImageProperty(u"image-src"_ustr , _xAttributes); ctx.importScollableSettings( _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: @@ -1849,7 +1849,7 @@ Reference< xml::input::XElement > GridControlElement::startChildElement( // event if (!m_pImport->isEventElement( nUid, rLocalName )) { - throw xml::sax::SAXException( "expected event element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected event element!"_ustr, Reference< XInterface >(), Any() ); } return new EventElement( nUid, rLocalName, xAttributes, this, m_pImport ); @@ -1858,7 +1858,7 @@ Reference< xml::input::XElement > GridControlElement::startChildElement( void GridControlElement::endElement() { - ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), "com.sun.star.awt.grid.UnoControlGridModel"); + ControlImportContext ctx( m_pImport, getControlId( _xAttributes ), u"com.sun.star.awt.grid.UnoControlGridModel"_ustr); Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); if (xStyle.is()) @@ -1871,19 +1871,19 @@ void GridControlElement::endElement() pStyle->importFontStyle( xControlModel ); } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); - ctx.importBooleanProperty( "Tabstop", "tabstop", _xAttributes ); - ctx.importVerticalAlignProperty( "VerticalAlign", "valign", _xAttributes ); - ctx.importSelectionTypeProperty( "SelectionModel", "selectiontype", _xAttributes ); - ctx.importBooleanProperty( "ShowColumnHeader", "showcolumnheader", _xAttributes ); - ctx.importBooleanProperty( "ShowRowHeader", "showrowheader", _xAttributes ); - ctx.importHexLongProperty( "GridLineColor", "gridline-color", _xAttributes ); - ctx.importBooleanProperty( "UseGridLines", "usegridlines", _xAttributes ); - ctx.importHexLongProperty( "HeaderBackgroundColor", "headerbackground-color", _xAttributes ); - ctx.importHexLongProperty( "HeaderTextColor", "headertext-color", _xAttributes ); - ctx.importHexLongProperty( "ActiveSelectionBackgroundColor", "activeselectionbackground-color", _xAttributes ); - ctx.importHexLongProperty( "ActiveSelectionTextColor", "activeselectiontext-color", _xAttributes ); - ctx.importHexLongProperty( "InactiveSelectionBackgroundColor", "inactiveselectionbackground-color", _xAttributes ); - ctx.importHexLongProperty( "InactiveSelectionTextColor", "inactiveselectiontext-color", _xAttributes ); + ctx.importBooleanProperty( u"Tabstop"_ustr, u"tabstop"_ustr, _xAttributes ); + ctx.importVerticalAlignProperty( u"VerticalAlign"_ustr, u"valign"_ustr, _xAttributes ); + ctx.importSelectionTypeProperty( u"SelectionModel"_ustr, u"selectiontype"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowColumnHeader"_ustr, u"showcolumnheader"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"ShowRowHeader"_ustr, u"showrowheader"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"GridLineColor"_ustr, u"gridline-color"_ustr, _xAttributes ); + ctx.importBooleanProperty( u"UseGridLines"_ustr, u"usegridlines"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"HeaderBackgroundColor"_ustr, u"headerbackground-color"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"HeaderTextColor"_ustr, u"headertext-color"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"ActiveSelectionBackgroundColor"_ustr, u"activeselectionbackground-color"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"ActiveSelectionTextColor"_ustr, u"activeselectiontext-color"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"InactiveSelectionBackgroundColor"_ustr, u"inactiveselectionbackground-color"_ustr, _xAttributes ); + ctx.importHexLongProperty( u"InactiveSelectionTextColor"_ustr, u"inactiveselectiontext-color"_ustr, _xAttributes ); ctx.importEvents( _events ); // avoid ring-reference: // vector< event elements > holding event elements holding this (via _pParent) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 1e4bda6ab01c..e0014c26a573 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -95,7 +95,7 @@ ControlElement::ControlElement( Reference< xml::input::XElement > ControlElement::getStyle( Reference< xml::input::XAttributes > const & xAttributes ) { - OUString aStyleId( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID,"style-id" ) ); + OUString aStyleId( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID,u"style-id"_ustr ) ); if (!aStyleId.isEmpty()) { return m_pImport->getStyle( aStyleId ); @@ -106,10 +106,10 @@ Reference< xml::input::XElement > ControlElement::getStyle( OUString ControlElement::getControlId( Reference< xml::input::XAttributes > const & xAttributes ) { - OUString aId( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "id" ) ); + OUString aId( xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"id"_ustr ) ); if (aId.isEmpty()) { - throw xml::sax::SAXException( "missing id attribute!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"missing id attribute!"_ustr, Reference< XInterface >(), Any() ); } return aId; } @@ -118,7 +118,7 @@ OUString ControlElement::getControlModelName( OUString const& rDefaultModel, Reference< xml::input::XAttributes > const & xAttributes ) { - OUString aModel = xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "control-implementation"); + OUString aModel = xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, u"control-implementation"_ustr); if (aModel.isEmpty()) aModel = rDefaultModel; return aModel; @@ -131,16 +131,16 @@ void StyleElement::importTextColorStyle( { if ((_hasValue & 0x2) != 0) { - xProps->setPropertyValue("TextColor", Any( _textColor ) ); + xProps->setPropertyValue(u"TextColor"_ustr, Any( _textColor ) ); } return; } _inited |= 0x2; - if (getLongAttr( &_textColor, "text-color", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getLongAttr( &_textColor, u"text-color"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _hasValue |= 0x2; - xProps->setPropertyValue( "TextColor", Any( _textColor ) ); + xProps->setPropertyValue( u"TextColor"_ustr, Any( _textColor ) ); return; } } @@ -152,16 +152,16 @@ void StyleElement::importTextLineColorStyle( { if ((_hasValue & 0x20) != 0) { - xProps->setPropertyValue( "TextLineColor", Any( _textLineColor ) ); + xProps->setPropertyValue( u"TextLineColor"_ustr, Any( _textLineColor ) ); } return; } _inited |= 0x20; - if (getLongAttr( &_textLineColor, "textline-color", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getLongAttr( &_textLineColor, u"textline-color"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _hasValue |= 0x20; - xProps->setPropertyValue( "TextLineColor", Any( _textLineColor ) ); + xProps->setPropertyValue( u"TextLineColor"_ustr, Any( _textLineColor ) ); } } @@ -172,16 +172,16 @@ void StyleElement::importFillColorStyle( { if ((_hasValue & 0x10) != 0) { - xProps->setPropertyValue( "FillColor", Any( _fillColor ) ); + xProps->setPropertyValue( u"FillColor"_ustr, Any( _fillColor ) ); } return; } _inited |= 0x10; - if (getLongAttr( &_fillColor, "fill-color", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getLongAttr( &_fillColor, u"fill-color"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _hasValue |= 0x10; - xProps->setPropertyValue( "FillColor", Any( _fillColor ) ); + xProps->setPropertyValue( u"FillColor"_ustr, Any( _fillColor ) ); } } @@ -192,16 +192,16 @@ void StyleElement::importBackgroundColorStyle( { if ((_hasValue & 0x1) != 0) { - xProps->setPropertyValue( "BackgroundColor", Any( _backgroundColor ) ); + xProps->setPropertyValue( u"BackgroundColor"_ustr, Any( _backgroundColor ) ); } return; } _inited |= 0x1; - if (getLongAttr( &_backgroundColor, "background-color", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getLongAttr( &_backgroundColor, u"background-color"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _hasValue |= 0x1; - xProps->setPropertyValue( "BackgroundColor", Any( _backgroundColor ) ); + xProps->setPropertyValue( u"BackgroundColor"_ustr, Any( _backgroundColor ) ); } } @@ -212,16 +212,16 @@ void StyleElement::importBorderStyle( { if ((_hasValue & 0x4) != 0) { - xProps->setPropertyValue( "Border", Any( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) ); + xProps->setPropertyValue( u"Border"_ustr, Any( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) ); if (_border == BORDER_SIMPLE_COLOR) - xProps->setPropertyValue( "BorderColor", Any(_borderColor) ); + xProps->setPropertyValue( u"BorderColor"_ustr, Any(_borderColor) ); } return; } _inited |= 0x4; OUString aValue; - if (!getStringAttr(&aValue, "border", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (!getStringAttr(&aValue, u"border"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) return; if ( aValue == "none" ) @@ -246,14 +246,14 @@ void StyleElement::importVisualEffectStyle( { if ((_hasValue & 0x40) != 0) { - xProps->setPropertyValue( "VisualEffect", Any(_visualEffect) ); + xProps->setPropertyValue( u"VisualEffect"_ustr, Any(_visualEffect) ); } return; } _inited |= 0x40; OUString aValue; - if (!getStringAttr( &aValue, "look", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (!getStringAttr( &aValue, u"look"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) return; if ( aValue == "none" ) @@ -272,15 +272,15 @@ void StyleElement::importVisualEffectStyle( OSL_ASSERT( false ); _hasValue |= 0x40; - xProps->setPropertyValue( "VisualEffect", Any(_visualEffect) ); + xProps->setPropertyValue( u"VisualEffect"_ustr, Any(_visualEffect) ); } void StyleElement::setFontProperties( Reference< beans::XPropertySet > const & xProps ) const { - xProps->setPropertyValue("FontDescriptor", Any( _descr ) ); - xProps->setPropertyValue("FontEmphasisMark", Any( _fontEmphasisMark ) ); - xProps->setPropertyValue("FontRelief", Any( _fontRelief ) ); + xProps->setPropertyValue(u"FontDescriptor"_ustr, Any( _descr ) ); + xProps->setPropertyValue(u"FontEmphasisMark"_ustr, Any( _fontEmphasisMark ) ); + xProps->setPropertyValue(u"FontRelief"_ustr, Any( _fontRelief ) ); } void StyleElement::importFontStyle( @@ -300,25 +300,25 @@ void StyleElement::importFontStyle( bool bFontImport; // dialog:font-name CDATA #IMPLIED - bFontImport = getStringAttr( &_descr.Name, "font-name", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + bFontImport = getStringAttr( &_descr.Name, u"font-name"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); // dialog:font-height %numeric; #IMPLIED - if (getStringAttr( &aValue, "font-height", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-height"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _descr.Height = static_cast<sal_Int16>(toInt32( aValue )); bFontImport = true; } // dialog:font-width %numeric; #IMPLIED - if (getStringAttr(&aValue, "font-width", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr(&aValue, u"font-width"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _descr.Width = static_cast<sal_Int16>(toInt32( aValue )); bFontImport = true; } // dialog:font-stylename CDATA #IMPLIED - bFontImport |= getStringAttr( &_descr.StyleName, "font-stylename", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + bFontImport |= getStringAttr( &_descr.StyleName, u"font-stylename"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); // dialog:font-family "(decorative|modern|roman|script|swiss|system)" #IMPLIED - if (getStringAttr(&aValue, "font-family", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr(&aValue, u"font-family"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "decorative" ) { @@ -346,13 +346,13 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-family style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-family style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-charset "(ansi|mac|ibmpc_437|ibmpc_850|ibmpc_860|ibmpc_861|ibmpc_863|ibmpc_865|system|symbol)" #IMPLIED - if (getStringAttr(&aValue, "font-charset", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr(&aValue, u"font-charset"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "ansi" ) { @@ -396,13 +396,13 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-charset style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-charset style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-pitch "(fixed|variable)" #IMPLIED - if (getStringAttr( &aValue, "font-pitch", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-pitch"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "fixed" ) { @@ -414,26 +414,26 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-pitch style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-pitch style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-charwidth CDATA #IMPLIED - if (getStringAttr( &aValue, "font-charwidth", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-charwidth"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _descr.CharacterWidth = aValue.toFloat(); bFontImport = true; } // dialog:font-weight CDATA #IMPLIED - if (getStringAttr( &aValue, "font-weight", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-weight"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _descr.Weight = aValue.toFloat(); bFontImport = true; } // dialog:font-slant "(oblique|italic|reverse_oblique|reverse_italic)" #IMPLIED - if (getStringAttr( &aValue, "font-slant", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-slant"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "oblique" ) { @@ -453,13 +453,13 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-slant style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-slant style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-underline "(single|double|dotted|dash|longdash|dashdot|dashdotdot|smallwave|wave|doublewave|bold|bolddotted|bolddash|boldlongdash|bolddashdot|bolddashdotdot|boldwave)" #IMPLIED - if (getStringAttr( &aValue, "font-underline", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-underline"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "single" ) { @@ -531,13 +531,13 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-underline style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-underline style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-strikeout "(single|double|bold|slash|x)" #IMPLIED - if (getStringAttr( &aValue, "font-strikeout", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-strikeout"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "single" ) { @@ -561,24 +561,24 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException( "invalid font-strikeout style!" , Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid font-strikeout style!"_ustr , Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-orientation CDATA #IMPLIED - if (getStringAttr( &aValue, "font-orientation", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-orientation"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { _descr.Orientation = aValue.toFloat(); bFontImport = true; } // dialog:font-kerning %boolean; #IMPLIED - bFontImport |= getBoolAttr( &_descr.Kerning, "font-kerning", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + bFontImport |= getBoolAttr( &_descr.Kerning, u"font-kerning"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); // dialog:font-wordlinemode %boolean; #IMPLIED - bFontImport |= getBoolAttr( &_descr.WordLineMode,"font-wordlinemode", _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); + bFontImport |= getBoolAttr( &_descr.WordLineMode,u"font-wordlinemode"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID ); // dialog:font-type "(raster|device|scalable)" #IMPLIED - if (getStringAttr( &aValue, "font-type", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-type"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "raster" ) { @@ -594,14 +594,14 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException( "invalid font-type style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid font-type style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // additional properties which are not part of the FontDescriptor struct // dialog:font-relief (none|embossed|engraved) #IMPLIED - if (getStringAttr( &aValue, "font-relief", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr( &aValue, u"font-relief"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "none" ) { @@ -617,12 +617,12 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException("invalid font-relief style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid font-relief style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } // dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED - if (getStringAttr(&aValue, "font-emphasismark", _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) + if (getStringAttr(&aValue, u"font-emphasismark"_ustr, _xAttributes, m_pImport->XMLNS_DIALOGS_UID )) { if ( aValue == "none" ) { @@ -654,7 +654,7 @@ void StyleElement::importFontStyle( } else { - throw xml::sax::SAXException( "invalid font-emphasismark style!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid font-emphasismark style!"_ustr, Reference< XInterface >(), Any() ); } bFontImport = true; } @@ -799,7 +799,7 @@ bool ImportContext::importAlignProperty( } else { - throw xml::sax::SAXException("invalid align value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"invalid align value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nAlign ) ); @@ -833,7 +833,7 @@ bool ImportContext::importVerticalAlignProperty( } else { - throw xml::sax::SAXException( "invalid vertical align value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid vertical align value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( eAlign ) ); @@ -858,7 +858,7 @@ bool ImportContext::importGraphicOrImageProperty( { uno::Sequence< Any > aArgs{ Any(xDocStorage->getDocumentStorage()) }; xGraphicStorageHandler.set( - _pImport->getComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.Svx.GraphicImportHelper" , aArgs, _pImport->getComponentContext() ), + _pImport->getComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( u"com.sun.star.comp.Svx.GraphicImportHelper"_ustr , aArgs, _pImport->getComponentContext() ), UNO_QUERY ); if (xGraphicStorageHandler.is()) { @@ -877,7 +877,7 @@ bool ImportContext::importGraphicOrImageProperty( Reference<beans::XPropertySet> xProps = getControlModel(); if (xProps.is()) { - xProps->setPropertyValue("Graphic", Any(xGraphic)); + xProps->setPropertyValue(u"Graphic"_ustr, Any(xGraphic)); return true; } } @@ -888,7 +888,7 @@ bool ImportContext::importGraphicOrImageProperty( Reference<beans::XPropertySet> xProps = getControlModel(); if (xProps.is()) { - xProps->setPropertyValue("ImageURL", Any(sURL)); + xProps->setPropertyValue(u"ImageURL"_ustr, Any(sURL)); return true; } } @@ -914,17 +914,17 @@ bool ImportContext::importDataAwareProperty( if ( !sLinkedCell.isEmpty() ) { Reference< form::binding::XBindableValue > xBindable( getControlModel(), uno::UNO_QUERY ); - Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellAddressConversion" ), uno::UNO_QUERY ); + Reference< beans::XPropertySet > xConvertor( xFac->createInstance( u"com.sun.star.table.CellAddressConversion"_ustr ), uno::UNO_QUERY ); if ( xBindable.is() && xConvertor.is() ) { table::CellAddress aAddress; - xConvertor->setPropertyValue( "PersistentRepresentation" , uno::Any( sLinkedCell ) ); - xConvertor->getPropertyValue( "Address" ) >>= aAddress; + xConvertor->setPropertyValue( u"PersistentRepresentation"_ustr , uno::Any( sLinkedCell ) ); + xConvertor->getPropertyValue( u"Address"_ustr ) >>= aAddress; beans::NamedValue aArg1; aArg1.Name = "BoundCell"; aArg1.Value <<= aAddress; - uno::Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( "com.sun.star.table.CellValueBinding" , { uno::Any(aArg1) }), uno::UNO_QUERY ); + uno::Reference< form::binding::XValueBinding > xBinding( xFac->createInstanceWithArguments( u"com.sun.star.table.CellValueBinding"_ustr , { uno::Any(aArg1) }), uno::UNO_QUERY ); xBindable->setValueBinding( xBinding ); bRes = true; } @@ -933,17 +933,17 @@ bool ImportContext::importDataAwareProperty( if ( !sCellRange.isEmpty() ) { Reference< form::binding::XListEntrySink > xListEntrySink( getControlModel(), uno::UNO_QUERY ); - Reference< beans::XPropertySet > xConvertor( xFac->createInstance( "com.sun.star.table.CellRangeAddressConversion" ), uno::UNO_QUERY ); + Reference< beans::XPropertySet > xConvertor( xFac->createInstance( u"com.sun.star.table.CellRangeAddressConversion"_ustr ), uno::UNO_QUERY ); if ( xListEntrySink.is() && xConvertor.is() ) { table::CellRangeAddress aAddress; - xConvertor->setPropertyValue( "PersistentRepresentation" , uno::Any( sCellRange ) ); - xConvertor->getPropertyValue( "Address" ) >>= aAddress; + xConvertor->setPropertyValue( u"PersistentRepresentation"_ustr , uno::Any( sCellRange ) ); + xConvertor->getPropertyValue( u"Address"_ustr ) >>= aAddress; beans::NamedValue aArg1; aArg1.Name = "CellRange"; aArg1.Value <<= aAddress; - uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( "com.sun.star.table.CellRangeListSource" , { uno::Any(aArg1) } ), uno::UNO_QUERY ); + uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( u"com.sun.star.table.CellRangeListSource"_ustr , { uno::Any(aArg1) } ), uno::UNO_QUERY ); xListEntrySink->setListEntrySource( xSource ); bRes = true; } @@ -980,7 +980,7 @@ bool ImportContext::importImageAlignProperty( } else { - throw xml::sax::SAXException( "invalid image align value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid image align value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nAlign ) ); @@ -1053,7 +1053,7 @@ bool ImportContext::importImagePositionProperty( } else { - throw xml::sax::SAXException( "invalid image position value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid image position value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nPosition ) ); @@ -1090,7 +1090,7 @@ bool ImportContext::importButtonTypeProperty( } else { - throw xml::sax::SAXException( "invalid button-type value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid button-type value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( static_cast<sal_Int16>(nButtonType) ) ); @@ -1159,7 +1159,7 @@ bool ImportContext::importDateFormatProperty( } else { - throw xml::sax::SAXException( "invalid date-format value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid date-format value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nFormat ) ); @@ -1238,7 +1238,7 @@ bool ImportContext::importTimeFormatProperty( } else { - throw xml::sax::SAXException( "invalid time-format value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid time-format value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nFormat ) ); @@ -1267,7 +1267,7 @@ bool ImportContext::importOrientationProperty( } else { - throw xml::sax::SAXException( "invalid orientation value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid orientation value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nOrient ) ); @@ -1300,7 +1300,7 @@ bool ImportContext::importLineEndFormatProperty( } else { - throw xml::sax::SAXException( "invalid line end format value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid line end format value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( nFormat ) ); @@ -1338,7 +1338,7 @@ bool ImportContext::importSelectionTypeProperty( } else { - throw xml::sax::SAXException( "invalid selection type value!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"invalid selection type value!"_ustr, Reference< XInterface >(), Any() ); } _xControlModel->setPropertyValue( rPropName, Any( eSelectionType ) ); @@ -1372,7 +1372,7 @@ bool ImportContext::importImageScaleModeProperty( } else { - throw xml::sax::SAXException( "invalid scale image mode value!", + throw xml::sax::SAXException( u"invalid scale image mode value!"_ustr, Reference< XInterface >(), Any() ); } @@ -1448,15 +1448,15 @@ void ImportContext::importEvents( // nowadays script events if (_pImport->XMLNS_SCRIPT_UID == nUid) { - if (!getStringAttr( &descr.ScriptType, "language" , xAttributes, _pImport->XMLNS_SCRIPT_UID ) || - !getStringAttr( &descr.ScriptCode, "macro-name", xAttributes, _pImport->XMLNS_SCRIPT_UID )) + if (!getStringAttr( &descr.ScriptType, u"language"_ustr , xAttributes, _pImport->XMLNS_SCRIPT_UID ) || + !getStringAttr( &descr.ScriptCode, u"macro-name"_ustr, xAttributes, _pImport->XMLNS_SCRIPT_UID )) { - throw xml::sax::SAXException( "missing language or macro-name attribute(s) of event!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"missing language or macro-name attribute(s) of event!"_ustr, Reference< XInterface >(), Any() ); } if ( descr.ScriptType == "StarBasic" ) { OUString aLocation; - if (getStringAttr( &aLocation, "location", xAttributes, _pImport->XMLNS_SCRIPT_UID )) + if (getStringAttr( &aLocation, u"location"_ustr, xAttributes, _pImport->XMLNS_SCRIPT_UID )) { // prepend location descr.ScriptCode = aLocation + ":" + descr.ScriptCode; @@ -1477,9 +1477,9 @@ void ImportContext::importEvents( if ( aLocalName == "event" ) { OUString aEventName; - if (! getStringAttr( &aEventName, "event-name", xAttributes, _pImport->XMLNS_SCRIPT_UID )) + if (! getStringAttr( &aEventName, u"event-name"_ustr, xAttributes, _pImport->XMLNS_SCRIPT_UID )) { - throw xml::sax::SAXException( "missing event-name attribute!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"missing event-name attribute!"_ustr, Reference< XInterface >(), Any() ); } // lookup in table @@ -1502,35 +1502,35 @@ void ImportContext::importEvents( if (! p->first) { - throw xml::sax::SAXException( "no matching event-name found!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"no matching event-name found!"_ustr, Reference< XInterface >(), Any() ); } } else // script:listener-event element { SAL_WARN_IF( aLocalName != "listener-event", "xmlscript.xmldlg", "aLocalName != listener-event" ); - if (!getStringAttr( &descr.ListenerType, "listener-type" , xAttributes, _pImport->XMLNS_SCRIPT_UID ) || - !getStringAttr( &descr.EventMethod , "listener-method", xAttributes, _pImport->XMLNS_SCRIPT_UID )) + if (!getStringAttr( &descr.ListenerType, u"listener-type"_ustr , xAttributes, _pImport->XMLNS_SCRIPT_UID ) || + !getStringAttr( &descr.EventMethod , u"listener-method"_ustr, xAttributes, _pImport->XMLNS_SCRIPT_UID )) { - throw xml::sax::SAXException("missing listener-type or listener-method attribute(s)!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"missing listener-type or listener-method attribute(s)!"_ustr, Reference< XInterface >(), Any() ); } // optional listener param - getStringAttr( &descr.AddListenerParam, "listener-param", xAttributes, _pImport->XMLNS_SCRIPT_UID ); + getStringAttr( &descr.AddListenerParam, u"listener-param"_ustr, xAttributes, _pImport->XMLNS_SCRIPT_UID ); } } else // deprecated dlg:event element { SAL_WARN_IF( _pImport->XMLNS_DIALOGS_UID != nUid || aLocalName != "event", "xmlscript.xmldlg", "_pImport->XMLNS_DIALOGS_UID != nUid || aLocalName != \"event\"" ); - if (!getStringAttr( &descr.ListenerType, "listener-type", xAttributes, _pImport->XMLNS_DIALOGS_UID ) || - !getStringAttr( &descr.EventMethod, "event-method", xAttributes, _pImport->XMLNS_DIALOGS_UID )) + if (!getStringAttr( &descr.ListenerType, u"listener-type"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ) || + !getStringAttr( &descr.EventMethod, u"event-method"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID )) { - throw xml::sax::SAXException("missing listener-type or event-method attribute(s)!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"missing listener-type or event-method attribute(s)!"_ustr, Reference< XInterface >(), Any() ); } - getStringAttr( &descr.ScriptType, "script-type", xAttributes, _pImport->XMLNS_DIALOGS_UID ); - getStringAttr( &descr.ScriptCode, "script-code", xAttributes, _pImport->XMLNS_DIALOGS_UID ); - getStringAttr( &descr.AddListenerParam, "param", xAttributes, _pImport->XMLNS_DIALOGS_UID ); + getStringAttr( &descr.ScriptType, u"script-type"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ); + getStringAttr( &descr.ScriptCode, u"script-code"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ); + getStringAttr( &descr.AddListenerParam, u"param"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ); } xEvents->insertByName( descr.ListenerType + "::" + descr.EventMethod, Any( descr ) ); @@ -1539,23 +1539,23 @@ void ImportContext::importEvents( void ImportContext::importScollableSettings( Reference< xml::input::XAttributes > const & _xAttributes ) { - importLongProperty( "ScrollHeight", - "scrollheight", + importLongProperty( u"ScrollHeight"_ustr, + u"scrollheight"_ustr, _xAttributes ); - importLongProperty( "ScrollWidth", - "scrollwidth", + importLongProperty( u"ScrollWidth"_ustr, + u"scrollwidth"_ustr, _xAttributes ); - importLongProperty( "ScrollTop", - "scrolltop", + importLongProperty( u"ScrollTop"_ustr, + u"scrolltop"_ustr, _xAttributes ); - importLongProperty( "ScrollLeft", - "scrollleft", + importLongProperty( u"ScrollLeft"_ustr, + u"scrollleft"_ustr, _xAttributes ); - importBooleanProperty( "HScroll", - "hscroll", + importBooleanProperty( u"HScroll"_ustr, + u"hscroll"_ustr, _xAttributes ); - importBooleanProperty( "VScroll", - "vscroll", + importBooleanProperty( u"VScroll"_ustr, + u"vscroll"_ustr, _xAttributes ); } @@ -1564,22 +1564,22 @@ void ImportContext::importDefaults( Reference< xml::input::XAttributes > const & xAttributes, bool supportPrintable ) { - _xControlModel->setPropertyValue( "Name", Any( _aId ) ); + _xControlModel->setPropertyValue( u"Name"_ustr, Any( _aId ) ); - importShortProperty( "TabIndex", "tab-index", xAttributes ); + importShortProperty( u"TabIndex"_ustr, u"tab-index"_ustr, xAttributes ); sal_Bool bDisable = false; - if (getBoolAttr( &bDisable,"disabled", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bDisable) + if (getBoolAttr( &bDisable,u"disabled"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bDisable) { - _xControlModel->setPropertyValue( "Enabled", Any( false ) ); + _xControlModel->setPropertyValue( u"Enabled"_ustr, Any( false ) ); } sal_Bool bVisible = true; - if (getBoolAttr( &bVisible, "visible", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible) + if (getBoolAttr( &bVisible, u"visible"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible) { try { - _xControlModel->setPropertyValue( "EnableVisible", Any( false ) ); + _xControlModel->setPropertyValue( u"EnableVisible"_ustr, Any( false ) ); } catch( Exception& ) { @@ -1587,29 +1587,29 @@ void ImportContext::importDefaults( } } - if (!importLongProperty( nBaseX, "PositionX", "left", xAttributes ) || - !importLongProperty( nBaseY, "PositionY", "top", xAttributes ) || - !importLongProperty( "Width", "width", xAttributes ) || - !importLongProperty( "Height", "height", xAttributes )) + if (!importLongProperty( nBaseX, u"PositionX"_ustr, u"left"_ustr, xAttributes ) || + !importLongProperty( nBaseY, u"PositionY"_ustr, u"top"_ustr, xAttributes ) || + !importLongProperty( u"Width"_ustr, u"width"_ustr, xAttributes ) || + !importLongProperty( u"Height"_ustr, u"height"_ustr, xAttributes )) { - throw xml::sax::SAXException( "missing pos size attribute(s)!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"missing pos size attribute(s)!"_ustr, Reference< XInterface >(), Any() ); } if (supportPrintable) { - importBooleanProperty("Printable", "printable", xAttributes ); + importBooleanProperty(u"Printable"_ustr, u"printable"_ustr, xAttributes ); } sal_Int32 nLong; - if (! getLongAttr( &nLong, "page", xAttributes, _pImport->XMLNS_DIALOGS_UID )) + if (! getLongAttr( &nLong, u"page"_ustr, xAttributes, _pImport->XMLNS_DIALOGS_UID )) { nLong = 0; } - _xControlModel->setPropertyValue( "Step", Any( nLong ) ); + _xControlModel->setPropertyValue( u"Step"_ustr, Any( nLong ) ); - importStringProperty("Tag", "tag", xAttributes ); - importStringProperty( "HelpText", "help-text", xAttributes ); - importStringProperty( "HelpURL", "help-url", xAttributes ); + importStringProperty(u"Tag"_ustr, u"tag"_ustr, xAttributes ); + importStringProperty( u"HelpText"_ustr, u"help-text"_ustr, xAttributes ); + importStringProperty( u"HelpURL"_ustr, u"help-url"_ustr, xAttributes ); } Reference< xml::input::XElement > ElementBase::getParent() @@ -1656,7 +1656,7 @@ Reference< xml::input::XElement > ElementBase::startChildElement( sal_Int32 /*nUid*/, OUString const & /*rLocalName*/, Reference< xml::input::XAttributes > const & /*xAttributes*/ ) { - throw xml::sax::SAXException( "unexpected element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"unexpected element!"_ustr, Reference< XInterface >(), Any() ); } ElementBase::ElementBase( @@ -1708,7 +1708,7 @@ Reference< xml::input::XElement > DialogImport::startRootElement( { if (XMLNS_DIALOGS_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // window else if ( rLocalName == "window" ) diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx index 1bf90bf8d519..720983ff8466 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx @@ -64,14 +64,14 @@ namespace xmlscript if ( aArguments.getLength() != 1 ) { - throw RuntimeException( "XMLBasicExporterBase::initialize: invalid number of arguments!" ); + throw RuntimeException( u"XMLBasicExporterBase::initialize: invalid number of arguments!"_ustr ); } aArguments[0] >>= m_xHandler; if ( !m_xHandler.is() ) { - throw RuntimeException( "XMLBasicExporterBase::initialize: invalid argument format!" ); + throw RuntimeException( u"XMLBasicExporterBase::initialize: invalid argument format!"_ustr ); } } @@ -85,7 +85,7 @@ namespace xmlscript if ( !m_xModel.is() ) { - throw IllegalArgumentException( "XMLBasicExporter::setSourceDocument: no document model!", Reference< XInterface >(), 1 ); + throw IllegalArgumentException( u"XMLBasicExporter::setSourceDocument: no document model!"_ustr, Reference< XInterface >(), 1 ); } } @@ -125,7 +125,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / pLibContElement->addAttribute( "xmlns:" + aPrefix, aURI ); // xlink namespace attribute - pLibContElement->addAttribute( "xmlns:" XMLNS_XLINK_PREFIX, XMLNS_XLINK_URI ); + pLibContElement->addAttribute( u"xmlns:" XMLNS_XLINK_PREFIX ""_ustr, XMLNS_XLINK_URI ); // <ooo/script:libraries... m_xHandler->ignorableWhitespace( OUString() ); @@ -143,7 +143,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / // try the "BasicLibraries" property (old-style, for compatibility) Reference< beans::XPropertySet > xPSet( m_xModel, UNO_QUERY ); if ( xPSet.is() ) - xPSet->getPropertyValue("BasicLibraries" ) >>= xLibContainer; + xPSet->getPropertyValue(u"BasicLibraries"_ustr ) >>= xLibContainer; } SAL_WARN_IF( !xLibContainer.is(), "xmlscript.xmlflat", "XMLBasicExporterBase::filter: nowhere to export to!" ); @@ -155,7 +155,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / { if ( xLibContainer->hasByName( rLibName ) ) { - OUString aTrueStr( "true" ); + OUString aTrueStr( u"true"_ustr ); if ( xLibContainer->isLibraryLink( rLibName ) ) { @@ -170,10 +170,10 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / if ( !aLinkURL.isEmpty() ) { // xlink:href attribute - pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":href", aLinkURL ); + pLibElement->addAttribute( u"" XMLNS_XLINK_PREFIX ":href"_ustr, aLinkURL ); // xlink:type attribute - pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":type", "simple" ); + pLibElement->addAttribute( u"" XMLNS_XLINK_PREFIX ":type"_ustr, u"simple"_ustr ); } if ( xLibContainer->isLibraryReadOnly( rLibName ) ) @@ -324,12 +324,12 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString XMLBasicExporter::getImplementationName( ) { - return "com.sun.star.comp.xmlscript.XMLBasicExporter"; + return u"com.sun.star.comp.xmlscript.XMLBasicExporter"_ustr; } Sequence< OUString > XMLBasicExporter::getSupportedServiceNames( ) { - return { "com.sun.star.document.XMLBasicExporter" }; + return { u"com.sun.star.document.XMLBasicExporter"_ustr }; } // XMLOasisBasicExporter @@ -347,12 +347,12 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString XMLOasisBasicExporter::getImplementationName( ) { - return "com.sun.star.comp.xmlscript.XMLOasisBasicExporter"; + return u"com.sun.star.comp.xmlscript.XMLOasisBasicExporter"_ustr; } Sequence< OUString > XMLOasisBasicExporter::getSupportedServiceNames( ) { - return { "com.sun.star.document.XMLOasisBasicExporter" }; + return { u"com.sun.star.document.XMLOasisBasicExporter"_ustr }; } } // namespace xmlscript diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx index 6ab9b994c9c2..470a39927b9b 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx @@ -40,15 +40,15 @@ exportLibraryContainer( xOut->startDocument(); xOut->unknown( - "<!DOCTYPE library:libraries PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" - " \"libraries.dtd\">" ); + u"<!DOCTYPE library:libraries PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" + " \"libraries.dtd\">"_ustr ); xOut->ignorableWhitespace( OUString() ); - OUString aLibrariesName( XMLNS_LIBRARY_PREFIX ":libraries" ); + OUString aLibrariesName( u"" XMLNS_LIBRARY_PREFIX ":libraries"_ustr ); rtl::Reference<XMLElement> pLibsElement = new XMLElement( aLibrariesName ); - pLibsElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI ); - pLibsElement->addAttribute( "xmlns:" XMLNS_XLINK_PREFIX, XMLNS_XLINK_URI ); + pLibsElement->addAttribute( u"xmlns:" XMLNS_LIBRARY_PREFIX ""_ustr, XMLNS_LIBRARY_URI ); + pLibsElement->addAttribute( u"xmlns:" XMLNS_XLINK_PREFIX ""_ustr, XMLNS_XLINK_URI ); xOut->ignorableWhitespace( OUString() ); xOut->startElement( aLibrariesName, pLibsElement ); @@ -61,21 +61,21 @@ exportLibraryContainer( { LibDescriptor& rLib = pLibArray->mpLibs[i]; - rtl::Reference<XMLElement> pLibElement(new XMLElement( XMLNS_LIBRARY_PREFIX ":library" )); + rtl::Reference<XMLElement> pLibElement(new XMLElement( u"" XMLNS_LIBRARY_PREFIX ":library"_ustr )); - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":name"_ustr, rLib.aName ); if( !rLib.aStorageURL.isEmpty() ) { - pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":href", rLib.aStorageURL ); - pLibElement->addAttribute( XMLNS_XLINK_PREFIX ":type", "simple" ); + pLibElement->addAttribute( u"" XMLNS_XLINK_PREFIX ":href"_ustr, rLib.aStorageURL ); + pLibElement->addAttribute( u"" XMLNS_XLINK_PREFIX ":type"_ustr, u"simple"_ustr ); } - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":link", rLib.bLink ? sTrueStr : sFalseStr ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":link"_ustr, rLib.bLink ? sTrueStr : sFalseStr ); if( rLib.bLink ) { - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":readonly", rLib.bReadOnly ? sTrueStr : sFalseStr ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":readonly"_ustr, rLib.bReadOnly ? sTrueStr : sFalseStr ); } pLibElement->dump( xOut ); @@ -95,31 +95,31 @@ exportLibrary( xOut->startDocument(); xOut->unknown( - "<!DOCTYPE library:library PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" - " \"library.dtd\">" ); + u"<!DOCTYPE library:library PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" + " \"library.dtd\">"_ustr ); xOut->ignorableWhitespace( OUString() ); - rtl::Reference<XMLElement> pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); + rtl::Reference<XMLElement> pLibElement = new XMLElement( u"" XMLNS_LIBRARY_PREFIX ":library"_ustr ); - pLibElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI ); + pLibElement->addAttribute( u"xmlns:" XMLNS_LIBRARY_PREFIX ""_ustr, XMLNS_LIBRARY_URI ); - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":name"_ustr, rLib.aName ); OUString sTrueStr(aTrueStr); OUString sFalseStr(aFalseStr); - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":readonly", rLib.bReadOnly ? sTrueStr : sFalseStr ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":readonly"_ustr, rLib.bReadOnly ? sTrueStr : sFalseStr ); - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":passwordprotected", rLib.bPasswordProtected ? sTrueStr : sFalseStr ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":passwordprotected"_ustr, rLib.bPasswordProtected ? sTrueStr : sFalseStr ); if( rLib.bPreload ) - pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":preload", sTrueStr ); + pLibElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":preload"_ustr, sTrueStr ); for( const auto& rElementName : rLib.aElementNames ) { - rtl::Reference<XMLElement> pElement(new XMLElement( XMLNS_LIBRARY_PREFIX ":element" )); + rtl::Reference<XMLElement> pElement(new XMLElement( u"" XMLNS_LIBRARY_PREFIX ":element"_ustr )); - pElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", + pElement->addAttribute( u"" XMLNS_LIBRARY_PREFIX ":name"_ustr, rElementName ); pLibElement->addSubElement( pElement ); diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx index 2666089c4766..007205672669 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx @@ -74,7 +74,7 @@ Reference< xml::input::XElement > LibElementBase::startChildElement( sal_Int32 /*nUid*/, OUString const & /*rLocalName*/, Reference< xml::input::XAttributes > const & /*xAttributes*/ ) { - throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"unexpected element!"_ustr, Reference< XInterface >(), Any() ); } LibElementBase::LibElementBase( @@ -122,7 +122,7 @@ Reference< xml::input::XElement > LibraryImport::startRootElement( { if (XMLNS_LIBRARY_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } else if ( mpLibArray && rLocalName == "libraries" ) { @@ -133,10 +133,10 @@ Reference< xml::input::XElement > LibraryImport::startRootElement( LibDescriptor& aDesc = *mpLibDesc; aDesc.bLink = aDesc.bReadOnly = aDesc.bPasswordProtected = aDesc.bPreload = false; - aDesc.aName = xAttributes->getValueByUidName(XMLNS_LIBRARY_UID, "name" ); - getBoolAttr( &aDesc.bReadOnly, "readonly", xAttributes, XMLNS_LIBRARY_UID ); - getBoolAttr( &aDesc.bPasswordProtected, "passwordprotected", xAttributes, XMLNS_LIBRARY_UID ); - getBoolAttr( &aDesc.bPreload, "preload", xAttributes, XMLNS_LIBRARY_UID ); + aDesc.aName = xAttributes->getValueByUidName(XMLNS_LIBRARY_UID, u"name"_ustr ); + getBoolAttr( &aDesc.bReadOnly, u"readonly"_ustr, xAttributes, XMLNS_LIBRARY_UID ); + getBoolAttr( &aDesc.bPasswordProtected, u"passwordprotected"_ustr, xAttributes, XMLNS_LIBRARY_UID ); + getBoolAttr( &aDesc.bPreload, u"preload"_ustr, xAttributes, XMLNS_LIBRARY_UID ); return new LibraryElement( rLocalName, xAttributes, nullptr, this ); } @@ -158,7 +158,7 @@ Reference< xml::input::XElement > LibrariesElement::startChildElement( { if (mxImport->XMLNS_LIBRARY_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // library else if ( rLocalName == "library" ) @@ -166,18 +166,18 @@ Reference< xml::input::XElement > LibrariesElement::startChildElement( LibDescriptor aDesc; aDesc.bLink = aDesc.bReadOnly = aDesc.bPasswordProtected = aDesc.bPreload = false; - aDesc.aName = xAttributes->getValueByUidName(mxImport->XMLNS_LIBRARY_UID, "name" ); - aDesc.aStorageURL = xAttributes->getValueByUidName( mxImport->XMLNS_XLINK_UID, "href" ); - getBoolAttr(&aDesc.bLink, "link", xAttributes, mxImport->XMLNS_LIBRARY_UID ); - getBoolAttr(&aDesc.bReadOnly, "readonly", xAttributes, mxImport->XMLNS_LIBRARY_UID ); - getBoolAttr(&aDesc.bPasswordProtected, "passwordprotected", xAttributes, mxImport->XMLNS_LIBRARY_UID ); + aDesc.aName = xAttributes->getValueByUidName(mxImport->XMLNS_LIBRARY_UID, u"name"_ustr ); + aDesc.aStorageURL = xAttributes->getValueByUidName( mxImport->XMLNS_XLINK_UID, u"href"_ustr ); + getBoolAttr(&aDesc.bLink, u"link"_ustr, xAttributes, mxImport->XMLNS_LIBRARY_UID ); + getBoolAttr(&aDesc.bReadOnly, u"readonly"_ustr, xAttributes, mxImport->XMLNS_LIBRARY_UID ); + getBoolAttr(&aDesc.bPasswordProtected, u"passwordprotected"_ustr, xAttributes, mxImport->XMLNS_LIBRARY_UID ); mLibDescriptors.push_back( aDesc ); return new LibraryElement( rLocalName, xAttributes, this, mxImport.get() ); } else { - throw xml::sax::SAXException( "expected styles of bulletinboard element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected styles of bulletinboard element!"_ustr, Reference< XInterface >(), Any() ); } } @@ -200,12 +200,12 @@ Reference< xml::input::XElement > LibraryElement::startChildElement( { if (mxImport->XMLNS_LIBRARY_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // library else if ( rLocalName == "element" ) { - OUString aValue( xAttributes->getValueByUidName(mxImport->XMLNS_LIBRARY_UID, "name" ) ); + OUString aValue( xAttributes->getValueByUidName(mxImport->XMLNS_LIBRARY_UID, u"name"_ustr ) ); if (!aValue.isEmpty()) mElements.push_back( aValue ); @@ -213,7 +213,7 @@ Reference< xml::input::XElement > LibraryElement::startChildElement( } else { - throw xml::sax::SAXException( "expected styles or bulletinboard element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"expected styles or bulletinboard element!"_ustr, Reference< XInterface >(), Any() ); } } diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx index 55b447561544..4a8c97806eae 100644 --- a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx +++ b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx @@ -37,19 +37,19 @@ exportScriptModule( xOut->startDocument(); xOut->unknown( - "<!DOCTYPE script:module PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" - " \"module.dtd\">"); + u"<!DOCTYPE script:module PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" + " \"module.dtd\">"_ustr); xOut->ignorableWhitespace( OUString() ); - OUString aModuleName( XMLNS_SCRIPT_PREFIX ":module" ); + OUString aModuleName( u"" XMLNS_SCRIPT_PREFIX ":module"_ustr ); rtl::Reference<XMLElement> pModElement = new XMLElement( aModuleName ); - pModElement->addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI ); + pModElement->addAttribute( u"xmlns:" XMLNS_SCRIPT_PREFIX ""_ustr, XMLNS_SCRIPT_URI ); - pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":name", rMod.aName ); - pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":language", rMod.aLanguage ); + pModElement->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":name"_ustr, rMod.aName ); + pModElement->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":language"_ustr, rMod.aLanguage ); if( !rMod.aModuleType.isEmpty() ) - pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":moduleType", rMod.aModuleType ); + pModElement->addAttribute( u"" XMLNS_SCRIPT_PREFIX ":moduleType"_ustr, rMod.aModuleType ); xOut->ignorableWhitespace( OUString() ); xOut->startElement( aModuleName, pModElement ); diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx index 5d84d9a07adf..151ea458a434 100644 --- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx +++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx @@ -75,7 +75,7 @@ Reference< xml::input::XElement > ModuleElement::startChildElement( sal_Int32 /*nUid*/, OUString const & /*rLocalName*/, Reference< xml::input::XAttributes > const & /*xAttributes*/ ) { - throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException(u"unexpected element!"_ustr, Reference< XInterface >(), Any() ); } ModuleElement::ModuleElement( @@ -122,14 +122,14 @@ Reference< xml::input::XElement > ModuleImport::startRootElement( { if (XMLNS_SCRIPT_UID != nUid) { - throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( u"illegal namespace!"_ustr, Reference< XInterface >(), Any() ); } // window else if ( rLocalName == "module" ) { - mrModuleDesc.aName = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "name" ); - mrModuleDesc.aLanguage = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "language" ); - mrModuleDesc.aModuleType = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "moduleType" ); + mrModuleDesc.aName = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, u"name"_ustr ); + mrModuleDesc.aLanguage = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, u"language"_ustr ); + mrModuleDesc.aModuleType = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, u"moduleType"_ustr ); return new ModuleElement( rLocalName, xAttributes, this ); } |