42 #include <com/sun/star/frame/XModel.hpp>
43 #include <com/sun/star/xml/sax/XAttributeList.hpp>
44 #include <com/sun/star/text/UserDataPart.hpp>
45 #include <com/sun/star/style/NumberingType.hpp>
46 #include <com/sun/star/text/PlaceholderType.hpp>
47 #include <com/sun/star/text/ReferenceFieldPart.hpp>
48 #include <com/sun/star/text/ReferenceFieldSource.hpp>
49 #include <com/sun/star/text/XTextContent.hpp>
50 #include <com/sun/star/beans/XPropertySet.hpp>
51 #include <com/sun/star/beans/XPropertySetInfo.hpp>
52 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
53 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
54 #include <com/sun/star/text/XDependentTextField.hpp>
55 #include <com/sun/star/text/FilenameDisplayFormat.hpp>
56 #include <com/sun/star/text/ChapterFormat.hpp>
57 #include <com/sun/star/text/TemplateDisplayFormat.hpp>
58 #include <com/sun/star/beans/PropertyValue.hpp>
59 #include <com/sun/star/text/BibliographyDataType.hpp>
60 #include <com/sun/star/util/XUpdatable.hpp>
61 #include <com/sun/star/sdb/CommandType.hpp>
62 #include <com/sun/star/container/XIndexReplace.hpp>
66 #include <rtl/ustring.hxx>
67 #include <rtl/ustrbuf.hxx>
69 #include <rtl/math.hxx>
71 #include <osl/diagnose.h>
126 const OUString& pService)
129 , rTextImportHelper(rHlp)
137 const Reference<XFastAttributeList> & xAttrList)
167 Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
174 catch (
const lang::IllegalArgumentException&)
193 const OUString& rServiceName)
201 Reference<XInterface> xIfc = xFactory->createInstance(rServiceName);
468 Reference<XUpdatable> xUpdate(rPropertySet, UNO_QUERY);
475 OSL_FAIL(
"Expected XUpdatable support!");
497 const Reference<XFastAttributeList> & xAttrList)
521 nSubType = UserDataPart::PHONE_PRIVATE;
530 nSubType = UserDataPart::PHONE_COMPANY;
558 sal_Int32 nAttrToken,
559 std::string_view sAttrValue)
590 if (
GetImport().GetTextImport()->IsOrganizerMode() ||
591 GetImport().GetTextImport()->IsStylesOnlyMode() )
609 , bAuthorFullName(true)
619 const Reference<XFastAttributeList> & xAttrList)
654 if (
GetImport().GetTextImport()->IsOrganizerMode() ||
655 GetImport().GetTextImport()->IsStylesOnlyMode() )
685 , eSelectPage(PageNumberType_CURRENT)
692 sal_Int32 nAttrToken, std::string_view sAttrValue )
700 lcl_aSelectPageAttrMap)
701 && (PageNumberType_CURRENT != nTmp) )
709 sString = OUString::fromUtf8(sAttrValue);
727 aAny <<= style::NumberingType::CHAR_SPECIAL;
743 , eSelectPage(PageNumberType_CURRENT)
744 , sNumberFormatOK(false)
750 sal_Int32 nAttrToken,
751 std::string_view sAttrValue )
764 lcl_aSelectPageAttrMap);
784 Reference<XPropertySetInfo> xPropertySetInfo(
785 xPropertySet->getPropertySetInfo());
792 nNumType= style::NumberingType::ARABIC;
798 nNumType = style::NumberingType::PAGE_DESCRIPTOR;
808 case PageNumberType_PREV:
811 case PageNumberType_CURRENT:
813 case PageNumberType_NEXT:
817 SAL_WARN(
"xmloff.text",
"unknown page number type");
845 sal_Int32 nAttrToken, std::string_view sAttrValue )
847 switch (nAttrToken) {
894 sal_Int32 nStart = 0;
895 sal_Int32
nLength = aContent.getLength();
896 if (aContent.startsWith(
"<"))
901 if (aContent.endsWith(
">"))
905 aAny <<= aContent.copy(nStart, nLength);
931 , bIsDefaultLanguage( true )
937 sal_Int32 nAttrToken, std::string_view sAttrValue )
977 nAdjust =
static_cast<sal_Int32
>(::rtl::math::approxFloor(fTmp * 60 * 24));
990 Reference<XPropertySetInfo> xPropertySetInfo(
991 rPropertySet->getPropertySetInfo());
1009 if (
GetImport().GetTextImport()->IsOrganizerMode() ||
1010 GetImport().GetTextImport()->IsStylesOnlyMode() )
1056 sal_Int32 nAttrToken,
1057 std::string_view sAttrValue )
1101 const OUString& pServiceName,
bool bUseDisplay)
1104 , m_bCommandTypeOK(false)
1105 , m_bDisplay( true )
1106 , m_bDisplayOK( false )
1107 , m_bUseDisplay( bUseDisplay )
1108 , m_bDatabaseOK(false)
1109 , m_bDatabaseNameOK(false)
1110 , m_bDatabaseURLOK(false)
1116 sal_Int32 nAttrToken, std::string_view sAttrValue )
1165 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
1171 switch (aIter.getToken())
1232 sal_Int32 nAttrToken, std::string_view sAttrValue )
1245 const OUString& pServiceName) :
1259 , bConditionOK(false)
1264 sal_Int32 nAttrToken, std::string_view sAttrValue )
1270 OUString::fromUtf8(sAttrValue), &sTmp );
1313 sal_Int32 nAttrToken,
1314 std::string_view sAttrValue )
1349 sPropertyNumberingType(
1360 sal_Int32 nAttrToken,
1361 std::string_view sAttrValue )
1394 sal_Int16
nNumType = style::NumberingType::ARABIC;
1414 sal_Int32 nElementToken,
1415 bool bContent,
bool bAuthor)
1422 , bHasAuthor(bAuthor)
1423 , bHasContent(bContent)
1429 sal_Int32 nAttrToken,
1430 std::string_view sAttrValue )
1448 Reference<XPropertySetInfo> xPropertySetInfo(rPropertySet->getPropertySetInfo());
1460 if (
GetImport().GetTextImport()->IsOrganizerMode() ||
1461 GetImport().GetTextImport()->IsStylesOnlyMode() )
1486 sal_Int32 nElementToken)
1488 OUString pServiceName;
1490 switch(nElementToken)
1493 pServiceName =
"DocInfo.CreateAuthor";
1502 pServiceName =
"DocInfo.Description";
1505 pServiceName =
"DocInfo.EditTime";
1511 pServiceName =
"DocInfo.PrintAuthor";
1520 pServiceName =
"DocInfo.KeyWords";
1523 pServiceName =
"DocInfo.Subject";
1526 pServiceName =
"DocInfo.Revision";
1529 pServiceName =
"DocInfo.ChangeAuthor";
1538 pServiceName =
"DocInfo.Title";
1545 return pServiceName;
1570 if (
GetImport().GetTextImport()->IsOrganizerMode() ||
1571 GetImport().GetTextImport()->IsStylesOnlyMode() )
1598 , bHasDateTime(false)
1599 , bIsDefaultLanguage(true)
1626 OSL_FAIL(
"XMLDateTimeDocInfoImportContext needs date/time doc. fields");
1633 sal_Int32 nAttrToken,
1634 std::string_view sAttrValue )
1674 if( xPropertySet->getPropertySetInfo()->
1691 sal_Int32 nElement) :
1698 , bIsDefaultLanguage( true )
1704 sal_Int32 nAttrToken,
1705 std::string_view sAttrValue )
1725 aName = OUString::fromUtf8(sAttrValue);
1739 const css::uno::Reference<css::beans::XPropertySet> & xPropertySet)
1741 if ( !
aName.isEmpty() )
1745 Reference<XPropertySetInfo> xPropertySetInfo(
1746 xPropertySet->getPropertySetInfo());
1778 sal_Int32 nAttrToken,
1779 std::string_view sAttrValue )
1785 OUString::fromUtf8(sAttrValue), &sTmp );
1825 bConditionOK(false),
1828 bCurrentValue(false)
1833 sal_Int32 nAttrToken,
1834 std::string_view sAttrValue )
1842 GetKeyByAttrValueQName(OUString::fromUtf8(sAttrValue), &sTmp);
1896 bConditionOK(false),
1903 sal_Int32 nAttrToken,
1904 std::string_view sAttrValue )
1912 GetKeyByAttrValueQName(OUString::fromUtf8(sAttrValue), &sTmp);
1924 sString = OUString::fromUtf8(sAttrValue);
1957 {
XML_PATH, FilenameDisplayFormat::PATH },
1958 {
XML_NAME, FilenameDisplayFormat::NAME },
1960 {
XML_FULL, FilenameDisplayFormat::FULL },
1969 sPropertyCurrentPresentation(
1971 nFormat(FilenameDisplayFormat::
FULL),
1978 sal_Int32 nAttrToken,
1979 std::string_view sAttrValue )
1996 aFilenameDisplayMap))
2013 Reference<XPropertySetInfo> xPropertySetInfo(
2014 xPropertySet->getPropertySetInfo());
2038 {
XML_FULL, TemplateDisplayFormat::FULL },
2039 {
XML_PATH, TemplateDisplayFormat::PATH },
2040 {
XML_NAME, TemplateDisplayFormat::NAME },
2042 {
XML_AREA, TemplateDisplayFormat::AREA },
2043 {
XML_TITLE, TemplateDisplayFormat::TITLE },
2052 nFormat(TemplateDisplayFormat::
FULL)
2058 sal_Int32 nAttrToken,
2059 std::string_view sAttrValue )
2067 aTemplateDisplayMap))
2106 nFormat(ChapterFormat::NAME_NUMBER),
2113 sal_Int32 nAttrToken,
2114 std::string_view sAttrValue )
2122 aChapterDisplayMap))
2124 nFormat =
static_cast<sal_Int16
>(nTmp);
2132 nTmp, sAttrValue, 1,
2133 GetImport().GetTextImport()->GetChapterNumbering()->getCount()
2162 sal_Int32 nElement) :
2164 sPropertyNumberingType(
2168 bNumberFormatOK(false)
2174 sal_Int32 nAttrToken,
2175 std::string_view sAttrValue )
2197 if (!xPropertySet->getPropertySetInfo()->
2204 nNumType= style::NumberingType::ARABIC;
2210 nNumType = style::NumberingType::PAGE_DESCRIPTOR;
2217 OUString pServiceName;
2222 pServiceName =
"WordCount";
2225 pServiceName =
"ParagraphCount";
2228 pServiceName =
"TableCount";
2231 pServiceName =
"CharacterCount";
2234 pServiceName =
"GraphicObjectCount";
2237 pServiceName =
"EmbeddedObjectCount";
2240 pServiceName =
"PageCount";
2247 return pServiceName;
2259 bNumberFormatOK(false)
2265 sal_Int32 nAttrToken,
2266 std::string_view sAttrValue )
2288 nNumType= style::NumberingType::ARABIC;
2294 nNumType = style::NumberingType::PAGE_DESCRIPTOR;
2315 sal_Int32 nAttrToken,
2316 std::string_view sAttrValue )
2334 nAdjust =
static_cast<sal_Int16
>(nTmp);
2347 xPropertySet->setPropertyValue(
"On",
Any(
bActive));
2358 bDescriptionOK(false)
2364 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
2379 sal_Int32 nAttrToken,
2380 std::string_view sAttrValue )
2389 sMacro = OUString::fromUtf8(sAttrValue);
2402 xPropertySet->setPropertyValue(
sAPI_hint, aAny);
2408 OUString sLibraryName;
2409 OUString sScriptURL;
2415 Sequence<PropertyValue> aValues;
2418 for(
const auto&
rValue : std::as_const(aValues) )
2420 if (
rValue.Name ==
"ScriptType" )
2424 else if (
rValue.Name ==
"Library" )
2426 rValue.Value >>= sLibraryName;
2428 else if (
rValue.Name ==
"MacroName" )
2430 rValue.Value >>= sMacroName;
2432 if (
rValue.Name ==
"Script" )
2434 rValue.Value >>= sScriptURL;
2444 for( sal_Int32
i = 0; (i < 3) && (nPos > 0);
i++ )
2447 while ( (pBuf[nPos] !=
'.') && (nPos > 0) )
2453 sLibraryName =
sMacro.copy(0, nPos);
2454 sMacroName =
sMacro.copy(nPos+1);
2460 xPropertySet->setPropertyValue(
"ScriptURL",
Any(sScriptURL));
2461 xPropertySet->setPropertyValue(
"MacroName",
Any(sMacroName));
2462 xPropertySet->setPropertyValue(
"MacroLibrary",
Any(sLibraryName));
2473 , nElementToken(nToken)
2475 ,
nType(ReferenceFieldPart::PAGE_DESC)
2483 {
XML_PAGE, ReferenceFieldPart::PAGE},
2485 {
XML_TEXT, ReferenceFieldPart::TEXT },
2488 {
XML_CAPTION, ReferenceFieldPart::ONLY_CAPTION },
2489 {
XML_VALUE, ReferenceFieldPart::ONLY_SEQUENCE_NUMBER },
2499 const Reference<XFastAttributeList> & xAttrList)
2505 nSource = ReferenceFieldSource::REFERENCE_MARK;
2508 nSource = ReferenceFieldSource::BOOKMARK;
2511 nSource = ReferenceFieldSource::FOOTNOTE;
2514 nSource = ReferenceFieldSource::SEQUENCE_FIELD;
2527 sal_Int32 nAttrToken,
2528 std::string_view sAttrValue )
2534 nSource = ReferenceFieldSource::ENDNOTE;
2537 sName = OUString::fromUtf8(sAttrValue);
2544 lcl_aReferenceTypeTokenMap))
2551 ( (
nType == ReferenceFieldPart::CATEGORY_AND_NUMBER) ||
2552 (
nType == ReferenceFieldPart::ONLY_CAPTION) ||
2553 (
nType == ReferenceFieldPart::ONLY_SEQUENCE_NUMBER) ) )
2555 nType = ReferenceFieldPart::PAGE_DESC;
2562 sLanguage = OUString::fromUtf8(sAttrValue);
2575 xPropertySet->setPropertyValue(
"ReferenceFieldPart",
Any(
nType));
2577 xPropertySet->setPropertyValue(
"ReferenceFieldSource",
Any(
nSource));
2579 xPropertySet->setPropertyValue(
"ReferenceFieldLanguage",
Any(
sLanguage));
2584 xPropertySet->setPropertyValue(
"SourceName",
Any(
sName));
2609 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
2631 const Reference<XFastAttributeList> & xAttrList)
2634 OUString sCommandApplication;
2635 OUString sCommandTopic;
2636 OUString sCommandItem;
2638 bool bUpdate =
false;
2639 bool bNameOK =
false;
2640 bool bCommandApplicationOK =
false;
2641 bool bCommandTopicOK =
false;
2642 bool bCommandItemOK =
false;
2647 switch (aIter.getToken())
2650 sName = aIter.toString();
2654 sCommandApplication = aIter.toString();
2655 bCommandApplicationOK =
true;
2658 sCommandTopic = aIter.toString();
2659 bCommandTopicOK =
true;
2662 sCommandItem = aIter.toString();
2663 bCommandItemOK =
true;
2680 if (!(bNameOK && bCommandApplicationOK && bCommandTopicOK && bCommandItemOK))
2686 if( !xFactory.is() )
2697 Reference<XInterface> xIfc =
2702 if (xPropSet.is() &&
2703 xPropSet->getPropertySetInfo()->hasPropertyByName(
2708 xPropSet->setPropertyValue(
"DDECommandType",
Any(sCommandApplication));
2710 xPropSet->setPropertyValue(
"DDECommandFile",
Any(sCommandTopic));
2712 xPropSet->setPropertyValue(
"DDECommandElement",
2715 xPropSet->setPropertyValue(
"IsAutomaticUpdate",
2744 sal_Int32 nAttrToken,
2745 std::string_view sAttrValue )
2749 sName = OUString::fromUtf8(sAttrValue);
2765 Reference<XTextFieldsSupplier> xTextFieldsSupp(
GetImport().GetModel(),
2768 xTextFieldsSupp->getTextFieldMasters();
2770 if (!xFieldMasterNameAccess->hasByName(sMasterName))
2774 Any aAny = xFieldMasterNameAccess->getByName(sMasterName);
2784 Reference<XDependentTextField> xDepTextField(xField,UNO_QUERY);
2785 xDepTextField->attachTextFieldMaster(xMaster);
2788 Reference<XTextContent> xTextContent(xField, UNO_QUERY);
2789 if (xTextContent.is())
2820 sal_Int32 nAttrToken,
2821 std::string_view sAttrValue)
2845 std::string_view sAttrValue )
2852 const css::uno::Reference<css::beans::XPropertySet> &)
2869 sal_Int32 nAttrToken,
2870 std::string_view sAttrValue )
2879 sFrame = OUString::fromUtf8(sAttrValue);
2896 xPropertySet->setPropertyValue(
"TargetFrame",
Any(
sFrame));
2899 xPropertySet->setPropertyValue(
"Representation",
Any(
GetContent()));
2916 {
XML_BOOK, BibliographyDataType::BOOK },
2924 {
XML_EMAIL, BibliographyDataType::EMAIL },
2925 {
XML_INBOOK, BibliographyDataType::INBOOK },
2929 {
XML_MANUAL, BibliographyDataType::MANUAL },
2931 {
XML_MISC, BibliographyDataType::MISC },
2936 {
XML_WWW, BibliographyDataType::WWW },
2946 const Reference<XFastAttributeList> & xAttrList)
2954 PropertyValue aValue;
2955 aValue.Name = OUString::createFromAscii(
2966 nTmp, aIter.toView(),
2969 aAny <<= static_cast<sal_Int16>(nTmp);
2970 aValue.Value = aAny;
2977 aAny <<= aIter.toString();
2978 aValue.Value = aAny;
2992 assert(
false &&
"This should not have happened.");
3001 Sequence<PropertyValue> aValueSequence(nCount);
3002 for(sal_Int32
i = 0;
i < nCount;
i++)
3008 xPropertySet->setPropertyValue(
"Fields",
Any(aValueSequence));
3014 const char*
pName =
nullptr;
3019 pName =
"Identifier";
3024 pName =
"BibiliographicType";
3036 pName =
"Booktitle";
3048 pName =
"Howpublished";
3051 pName =
"Institution";
3066 pName =
"Organizations";
3072 pName =
"Publisher";
3084 pName =
"Report_Type";
3114 assert(
false &&
"Unknown bibliography info data");
3126 sal_Int32 nElement) :
3139 sal_Int32 nAttrToken,
3140 std::string_view sAttrValue )
3143 aName = OUString::fromUtf8(sAttrValue);
3145 aResolved = OUString::fromUtf8(sAttrValue);
3152 const uno::Reference< xml::sax::XFastAttributeList>& xAttrList )
3170 Any aAny =
mxField->getPropertyValue(
"TextRange" );
3171 Reference< XText > xText;
3179 mxCursor = xText->createTextCursor();
3185 return xTxtImport->CreateTextChildContext(
GetImport(), nElement, xAttrList );
3222 uno::Reference< text::XTextContent > xPrevField;
3224 Reference<XTextFieldsSupplier> xTextFieldsSupplier(
GetImport().GetModel(), UNO_QUERY);
3225 uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
3226 uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
3227 while (xFields->hasMoreElements())
3229 uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
3230 uno::Reference<beans::XPropertySetInfo>
const xInfo(
3231 xCurrField->getPropertySetInfo());
3232 if (xInfo->hasPropertyByName(
sAPI_name))
3234 OUString aFieldName;
3235 xCurrField->getPropertyValue(
sAPI_name) >>= aFieldName;
3236 if (aFieldName ==
aName)
3238 xPrevField.set( xCurrField, uno::UNO_QUERY );
3244 if ( xPrevField.is() )
3249 uno::Reference<text::XTextCursor> xCursor =
3251 xCursor->gotoRange(xPrevField->getAnchor(),
true);
3253 xText->insertTextContent(xCursor, xPrevField, !xCursor->isCollapsed());
3264 Reference < XTextContent > xTextContent(
mxField, UNO_QUERY );
3271 catch (
const lang::IllegalArgumentException&)
3291 xPropertySet->setPropertyValue(
"Initials",
makeAny(sInitials));
3296 xPropertySet->setPropertyValue(
"Resolved",
makeAny(bTmp));
3298 util::DateTime aDateTime;
3313 OUString sBuffer =
aTextBuffer.makeStringAndClear();
3314 if ( sBuffer.getLength() )
3317 if (
char(0x0a) == sBuffer[sBuffer.getLength()-1])
3318 sBuffer = sBuffer.copy(0, sBuffer.getLength()-1);
3322 if (!
aName.isEmpty())
3339 sal_Int32 nAttrToken,
3340 std::string_view sAttrValue )
3374 xPropertySet->setPropertyValue(
"URLContent",
Any(
bContentOK));
3392 sal_Int32 nAttrToken,
3393 std::string_view sAttrValue )
3419 xPropertySet->setPropertyValue(
"Kind",
Any(
mnKind));
3441 const Reference<XFastAttributeList>& xAttrList,
3445 bool bValid =
false;
3448 switch (aIter.getToken())
3452 rLabel = aIter.toString();
3471 sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
3476 bool bIsSelected =
false;
3488 sal_Int32 nAttrToken,
3489 std::string_view sAttrValue )
3493 sName = OUString::fromUtf8(sAttrValue);
3498 sHelp = OUString::fromUtf8(sAttrValue);
3503 sHint = OUString::fromUtf8(sAttrValue);
3516 OUString* pSequence = aSequence.getArray();
3522 xPropertySet->setPropertyValue(
"Items",
Any(aSequence) );
3526 xPropertySet->setPropertyValue(
"SelectedItem",
Any(pSequence[
nSelected]) );
3532 xPropertySet->setPropertyValue(
"Name",
Any(
sName) );
3537 xPropertySet->setPropertyValue(
"Help",
Any(
sHelp) );
3542 xPropertySet->setPropertyValue(
"Tooltip",
Any(
sHint) );
3605 std::string_view sAttrValue )
3612 const css::uno::Reference<
3613 css::beans::XPropertySet> &)
XMLRevisionDocInfoImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attributes
::std::vector< css::beans::PropertyValue > aValues
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
constexpr OUStringLiteral sAPI_is_hidden
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
constexpr OUStringLiteral gsPropertyDataBaseURL(u"DataBaseURL")
const OUString sPropertyNumberingType
static OUString MapTokenToServiceName(sal_Int32 nElement)
constexpr OUStringLiteral sAPI_docinfo_print_date_time
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
create XTextField and insert into document; calls PrepareTextField
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyFixed
import file name fields ()
const OUString sPropertySetNumber
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
exports com.sun.star. sdb
const OUString sPropertyFixed
API subtype for ExtUser field.
XMLHiddenTextImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
const OUString sPropertyFixed
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
superclass for database fields: handle database and table names
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
process attributes (fill aValues)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
parses attributes and calls ProcessAttribute
constexpr OUStringLiteral sAPI_textfield_prefix
constexpr OUStringLiteral gsPropertyDataCommandType(u"DataCommandType")
inherit sender field because of fixed attribute in ProcessAttributes
const OUString sPropertyIsHidden
XMLDdeFieldDeclsImportContext(SvXMLImport &rImport)
XMLCountFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
import conditional text fields ()
const OUString sPropertyIsFixedLanguage
constexpr OUStringLiteral sAPI_set_number
static const char * MapBibliographyFieldName(sal_Int32 nElement)
XMLDropDownFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import hidden paragraph fields ()
XMLMacroFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import docinfo fields with date or time attributes and numberformats
const OUString sPropertyIsHidden
const OUString sPropertyDateTimeValue
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
Import an annotation field ()
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
XMLFileNameImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
SvXMLImport & GetImport()
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
#define XMLOFF_WARN_UNKNOWN_ATTR(area, token, value)
abstract class for text field import
XMLTimeFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
constexpr OUStringLiteral gsPropertyLevel(u"Level")
import page continuation fields ()
XMLAuthorFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
SvXMLNamespaceMap & GetNamespaceMap()
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Text import helper.
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
XMLPageNumberImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
const OUString sPropertySubType
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
XMLPlaceholderFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Text import helper.
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
static bool parseDateTime(css::util::DateTime &rDateTime, std::u16string_view rString)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
XMLAnnotationImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
XMLDatabaseSelectImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
constexpr char16_t sAPI_fieldmaster_prefix[]
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyIsDate
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
const OUString & GetServiceName() const
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
bool CreateField(css::uno::Reference< css::beans::XPropertySet > &xField, const OUString &sServiceName)
create field from ServiceName
const OUString sPropertyCondition
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
const SvXMLEnumMapEntry< sal_uInt16 > aChapterDisplayMap[]
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
no attributes -> empty method
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
set properties
css::uno::Any const & rValue
static void ForceUpdate(const css::uno::Reference< css::beans::XPropertySet > &rPropertySet)
force an update of the field's value call update on optional XUpdatable interface; (disable Fixed pro...
XMLScriptImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
XMLUrlFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
XMLTextImportHelper & rTextImportHelper
service name for text field
constexpr OUStringLiteral gsPropertyPlaceholderType(u"PlaceHolderType")
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
XMLUserDocInfoImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
constexpr OUStringLiteral sAPI_offset
XMLPageContinuationImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
continuation string encountered?
static bool parseTimeOrDateTime(css::util::DateTime &rDateTime, std::u16string_view rString)
const OUString sPropertyOffset
constexpr OUStringLiteral sAPI_is_fixed
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void InsertString(const OUString &rChars)
bool sStringOK
previous, current
constexpr OUStringLiteral sAPI_hint
import date fields (); inherit from TimeField to reuse implementation
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
constexpr OUStringLiteral sServiceName
void GetEventSequence(const OUString &rName, css::uno::Sequence< css::beans::PropertyValue > &rSequence)
if the import operates in delayed mode, you can use this method to obtain the value sequence for a sp...
sal_Int16 nPlaceholderType
constexpr OUStringLiteral sAPI_name
constexpr OUStringLiteral gsPropertyAuthorFullName(u"FullName")
#define XMLOFF_WARN_UNKNOWN(area, rIter)
XMLTemplateNameImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import expression fields ()
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
import bibliography info fields ()
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attributes
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
set properties
rtl::Reference< XMLEventsImportContext > xEventContext
void ProcessSequenceReference(const OUString &sXMLId, const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
set sequence ID or insert into backpatch list
sal_uInt16 GetKeyByAttrValueQName(const OUString &rAttrName, OUString *pLocalName) const
XMLSheetNameImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
empty method
constexpr OUStringLiteral sAPI_docinfo_create_date_time
SvXMLEnumMapEntry< PageNumberType > const lcl_aSelectPageAttrMap[]
import database next fields ()
const OUString sPropertyFileFormat
bool convertNumFormat(sal_Int16 &rType, const OUString &rNumFormat, std::u16string_view rNumLetterSync, bool bNumberNone=false) const
convert num-format and num-letter-sync values to NumberingType
constexpr OUStringLiteral sAPI_date_time
constexpr OUStringLiteral gsPropertyFalseContent(u"FalseContent")
css::uno::Reference< css::text::XText > & GetText()
import variable set fields ()
const OUString sPropertyCondition
constexpr OUStringLiteral gsPropertyIsConditionTrue(u"IsConditionTrue")
const OUString sPropertyCondition
const SvXMLEnumMapEntry< sal_uInt16 > aFilenameDisplayMap[]
constexpr OUStringLiteral sAPI_dde
virtual void SAL_CALL characters(const OUString &sContent) override
name of SO API service
constexpr OUStringLiteral sAPI_file_format
XMLDdeFieldDeclImportContext(SvXMLImport &rImport)
css::util::DateTime aDateTimeValue
XMLConditionalTextImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
no attributes -> empty method
constexpr OUStringLiteral sAPI_url
const OUString sPropertyCurrentPresentation
css::uno::Reference< css::text::XTextCursor > mxCursor
constexpr OUStringLiteral gsPropertyAdjust(u"Adjust")
static bool lcl_ProcessLabel(const Reference< XFastAttributeList > &xAttrList, OUString &rLabel, bool &rIsSelected)
css::uno::Reference< css::text::XTextCursor > mxOldCursor
#define DBG_ASSERT(sCon, aError)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
for children
const OUString sPropertyName
XMLDatabaseNameImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
no attributes -> empty method
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr OUStringLiteral sAPI_sub_type
constexpr OUStringLiteral sAPI_docinfo_change_date_time
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
import sheet name fields (Calc) dde fields ()
XMLTextImportHelper & GetImportHelper()
get helper
OUStringBuffer sContentBuffer
const OUString sPropertyCondition
constexpr OUStringLiteral sPropertyRevision(u"Revision")
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
constexpr OUStringLiteral sAPI_condition
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
handle database-location children
import variable get fields ()
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
OUString sContent
collect character data
XMLDatabaseNumberImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
static XMLTextFieldImportContext * CreateTextFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
create the appropriate field context from (for use in paragraph import)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
import user docinfo field ()
XMLMeasureFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
const OUString sPropertySubType
SvXMLImportContext(SvXMLImport &rImport)
A contexts constructor does anything that is required if an element starts.
import conditional text fields ()
constexpr OUStringLiteral sAPI_content
static void convertDuration(OUStringBuffer &rBuffer, const double fTime)
XMLChapterImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import page variable fields ()
import document template name fields ()
constexpr OUStringLiteral sAPI_is_fixed_language
SvXMLEnumMapEntry< sal_uInt16 > const lcl_aReferenceTypeTokenMap[]
constexpr OUStringLiteral sAPI_number_format
XMLDatabaseNextImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, const OUString &pServiceName)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
const OUString sPropertyHint
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyContent
OUStringBuffer aDateBuffer
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
Import all text into a string buffer.
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
OUStringBuffer aInitialsBuffer
XMLSenderFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyIsFixedLanguage
constexpr OUStringLiteral sAPI_true
static bool convertBool(bool &rBool, std::u16string_view rString)
constexpr OUStringLiteral gsPropertyChapterFormat(u"ChapterFormat")
const OUString sPropertyContent
import page variable fields ()
const OUString sPropertyNumberFormat
css::text::PageNumberType eSelectPage
import reference fields ()
This class deliberately does not support XWeak, to improve performance when loading large documents...
import table formula fields (deprecated; for Writer 2.0 compatibility)
void InsertTextContent(css::uno::Reference< css::text::XTextContent > const &xContent)
constexpr OUStringLiteral sAPI_docinfo_custom
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet)=0
prepare XTextField for insertion into document
const OUString sPropertyCurrentPresentation
Map an XMLTokenEnum to an enum value.
constexpr OUStringLiteral gsPropertyIsVisible(u"IsVisible")
OUString sPropertyContent
constexpr OUStringLiteral sAPI_page_number
const OUString sPropertyAuthor
const OUString sPropertyContent
constexpr OUStringLiteral gsPropertyTrueContent(u"TrueContent")
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
create XTextField and insert into document; calls PrepareTextField
void ProcessFootnoteReference(const OUString &sXMLId, const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
set the proper footnote reference ID, or put into backpatch list if ID is unknown ...
OUStringBuffer aAuthorBuffer
import database select fields ()
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
create textfield, attach master, and insert into document
import page|slide name fields ()
OUString const & GetContent()
constexpr OUStringLiteral sAPI_author
constexpr bool IsTokenInNamespace(sal_Int32 nToken, sal_uInt16 nNamespacePrefix)
constexpr OUStringLiteral gsPropertyTableName(u"DataTableName")
OUString GetAbsoluteReference(const OUString &rValue) const
import docinfo fields with only fixed attribute
XMLTextFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, const OUString &pService)
whether this field is valid ?
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
std::vector< OUString > aLabels
import database display fields ()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
import page number fields ()
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
Handling of tokens in XML:
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyDateTime
const OUString sPropertyFixed
XMLPageVarSetFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
const OUString sPropertySetNumber
const char sAPI_presentation_prefix[]
constexpr OUStringLiteral gsPropertyFieldSubType(u"UserDataType")
const OUString sPropertyNumberingType
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
XMLDateFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
constexpr OUStringLiteral sAPI_date_time_value
#define XML_ELEMENT(prefix, name)
const OUString sPropertyNumberFormat
constexpr OUStringLiteral gsPropertyDataBaseName(u"DataBaseName")
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
static bool convertEnum(EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
constexpr OUStringLiteral sAPI_current_presentation
const SvXMLUnitConverter & GetMM100UnitConverter() const
bool sNumberFormatOK
previous, current
XMLDdeFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
XMLHiddenParagraphImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
const OUString sPropertyCurrentPresentation
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
Text import helper.
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
import database display number fields ()
const OUString sPropertyIsFixedLanguage
constexpr OUStringLiteral gsPropertyUserText(u"UserText")
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
const OUString sPropertyContent
XMLPageNameFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import page|slide name fields ()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
static OUString MapTokenToServiceName(sal_Int32 nElementToken)
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
XMLDateTimeDocInfoImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElement)
const SvXMLEnumMapEntry< sal_uInt16 > aTemplateDisplayMap[]
#define SAL_WARN(area, stream)
Reference< XSingleServiceFactory > xFactory
constexpr sal_Int32 TOKEN_MASK
const OUString sPropertyFileFormat
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
const OUString sPropertyFixed
css::uno::Reference< css::beans::XPropertySet > mxField
const OUString sPropertyNumberingType
import dde field declaration ()
css::text::PageNumberType eSelectPage
continuation string
XMLDateTimeFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
import footer fields ()
const OUString sPropertyIsDate
const OUString sPropertyNumberFormat
XMLDatabaseFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, const OUString &pServiceName, bool bUseDisplay)
protected constructor: only for subclasses
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
convert aValues into sequence and set property
OUString sServicePrefix
the import helper
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
no attributes -> empty method
constexpr sal_uInt16 XML_NAMESPACE_OOOW
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue)=0
process attribute values
constexpr OUStringLiteral sAPI_is_date
virtual void PrepareField(const css::uno::Reference< css::beans::XPropertySet > &xPropertySet) override
prepare XTextField for insertion into document
import database name fields ()
dropdown field (filter legacy)
XMLReferenceFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nToken)
void SetServiceName(const OUString &sStr)
const OUString sPropertyNumberingType
virtual void ProcessAttribute(sal_Int32 nAttrToken, std::string_view sAttrValue) override
process attribute values
XMLPageVarGetFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
start element
XMLBibliographyFieldImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp)
OUStringBuffer aTextBuffer
XMLSimpleDocInfoImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_Int32 nElementToken, bool bContent, bool bAuthor)
constexpr OUStringLiteral gsPropertyPlaceholder(u"PlaceHolder")
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)