24#include <unofield.hxx>
39#include <unoprnms.hxx>
50#include <com/sun/star/util/DateTime.hpp>
51#include <com/sun/star/util/Date.hpp>
52#include <com/sun/star/beans/PropertyAttribute.hpp>
56#include <com/sun/star/text/SetVariableType.hpp>
57#include <com/sun/star/text/WrapTextMode.hpp>
58#include <com/sun/star/text/TextContentAnchorType.hpp>
77#include <tools/datetime.hxx>
187 if (aEntry.nServiceId == nServiceId)
188 return aEntry.nResId;
189#if OSL_DEBUG_LEVEL > 0
190 OSL_FAIL(
"service id not found");
209 const sal_uInt16 nSubType = rField.
GetSubType();
210 switch( nSubType & 0xff )
264 if( nWhich == pMap->nResId )
266 nSrvId = pMap->nServiceId;
270#if OSL_DEBUG_LEVEL > 0
272 OSL_FAIL(
"resid not found");
319 nId = pEntry ? pEntry->
nWID : USHRT_MAX;
400 assert(nRet != USHRT_MAX &&
"wrong service id");
463 return "SwXFieldMaster";
481 pEntry =
"SetExpression";
487 pEntry =
"Bibliography";
493 return "com.sun.star.text.fieldmaster." + OUString::createFromAscii(pEntry);
503uno::Sequence< OUString > SAL_CALL
506 return {
"com.sun.star.text.TextFieldMaster", getServiceName(
m_pImpl->m_nResTypeId) };
544 pFM->
m_pImpl->m_wThis = xFM.get();
549uno::Reference<beans::XPropertySetInfo> SAL_CALL
553 uno::Reference< beans::XPropertySetInfo > aRef =
560 const OUString& rPropertyName,
const uno::Any& rValue)
566 bool bSetValue =
true;
569 const std::vector<OUString>& rExtraArr(
571 const OUString sTypeName = pType->
GetName();
572 static sal_uInt16 nIds[] =
581 for(
const sal_uInt16 * pIds = nIds; *pIds; ++pIds)
583 if(sTypeName == rExtraArr[ *pIds ] )
597 const sal_uInt16 nMemberValueId =
GetFieldTypeMId( rPropertyName, *pType );
598 if ( USHRT_MAX == nMemberValueId )
600 throw beans::UnknownPropertyException(
601 "Unknown property: " + rPropertyName,
605 pType->
PutValue( rValue, nMemberValueId );
617 rValue >>= sTypeName;
619 m_pImpl->m_nResTypeId, sTypeName,
false);
623 ( sTypeName ==
SwResId(STR_POOLCOLL_LABEL_TABLE) ||
624 sTypeName ==
SwResId(STR_POOLCOLL_LABEL_DRAWING) ||
625 sTypeName ==
SwResId(STR_POOLCOLL_LABEL_FRAME) ||
626 sTypeName ==
SwResId(STR_POOLCOLL_LABEL_ABB) ||
627 sTypeName ==
SwResId(STR_POOLCOLL_LABEL_FIGURE) )))
629 throw lang::IllegalArgumentException();
637 pType2 =
m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
647 m_pImpl->m_bParam1 ? SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL);
648 pType2 =
m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
654 if (!
m_pImpl->m_sParam1.isEmpty())
658 pType2 =
m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
671 throw uno::RuntimeException(
"no field type found!", *
this);
685 throw lang::IllegalArgumentException();
691 throw lang::IllegalArgumentException();
708 if ( ( !
m_pImpl->m_sParam1.isEmpty()
709 || !
m_pImpl->m_sParam5.isEmpty())
710 && !
m_pImpl->m_sParam2.isEmpty()
711 && !
m_pImpl->m_sParam3.isEmpty())
727 if (
m_pImpl->m_sParam1.isEmpty())
737 while (nIndex < m_pImpl->m_sParam1.getLength())
750 nStart,
nIndex - nStart, sTmp);
759 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
773 if (!
m_pImpl->m_sParam1.isEmpty())
775 else if (!
m_pImpl->m_sParam5.isEmpty())
783 SwFieldType *
const pType =
m_pImpl->m_pDoc->getIDocumentFieldsAccess().InsertFieldType(aType);
811 std::vector<SwFormatField*> vpFields;
813 uno::Sequence<uno::Reference <text::XDependentTextField> >
aSeq(vpFields.size());
814 std::transform(vpFields.begin(), vpFields.end(),
aSeq.getArray(),
815 [
this](
SwFormatField* pF) { return uno::Reference<text::XDependentTextField>(SwXTextField::CreateXTextField(m_pImpl->m_pDoc, pF)); });
822 if (USHRT_MAX == nMId)
824 throw beans::UnknownPropertyException(
825 "Unknown property: " + rPropertyName,
833 OUString aDataSource;
834 aRet >>= aDataSource;
837 OUString *pStr =
nullptr;
840 aObj.
SetURL( aDataSource );
841 bool bIsURL = aObj.
GetProtocol() != INetProtocol::NotValid;
858 uno::Sequence<uno::Reference <text::XDependentTextField> > aRetSeq(0);
880 bool bIsURL = aObj.
GetProtocol() != INetProtocol::NotValid;
907 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
916 OSL_FAIL(
"not implemented");
921 OSL_FAIL(
"not implemented");
926 OSL_FAIL(
"not implemented");
931 OSL_FAIL(
"not implemented");
939 throw uno::RuntimeException();
940 size_t nTypeIdx = SIZE_MAX;
942 for(
size_t i = 0;
i < pTypes->size();
i++ )
944 if((*pTypes)[
i].
get()== pFieldType)
949 std::vector<SwFormatField*> vpFields;
951 for(
auto pField : vpFields)
954 m_pImpl->m_pDoc->getIDocumentFieldsAccess().RemoveFieldType(nTypeIdx);
958 const uno::Reference<lang::XEventListener> & xListener)
960 std::unique_lock aGuard(
m_pImpl->m_Mutex);
961 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
965 const uno::Reference<lang::XEventListener> & xListener)
967 std::unique_lock aGuard(
m_pImpl->m_Mutex);
968 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
973 if(rHint.
GetId() == SfxHintId::Dying)
977 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
982 lang::EventObject
const ev(xThis);
983 std::unique_lock aGuard(
m_Mutex);
996 if((*pTypes)[
i].get() == &rType)
1007 const OUString& rFormula,
1011 const OUString sProgName(
1013 if(sProgName != sTypeName)
1015 const OUString sSource = bQuery ? sTypeName : sProgName;
1016 const OUString sDest = bQuery ? sProgName : sTypeName;
1017 if(rFormula.startsWith(sSource))
1019 return sDest + rFormula.subView(sSource.getLength());
1027struct SwFieldProperties_Impl
1037 uno::Sequence<beans::PropertyValue> aPropSeq;
1038 uno::Sequence<OUString> aStrings;
1039 std::unique_ptr<util::DateTime> pDateTime;
1043 sal_uInt16 nUSHORT1;
1044 sal_uInt16 nUSHORT2;
1047 bool bFormatIsDefault;
1053 SwFieldProperties_Impl():
1062 bFormatIsDefault(true),
1092 : m_pFieldType(nullptr)
1093 , m_pFormatField(pFormat)
1095 , m_bIsDescriptor(pFormat == nullptr)
1096 , m_bCallUpdate(false)
1097 , m_nServiceId(pFormat
1100 , m_pProps(pFormat ? nullptr : new SwFieldProperties_Impl)
1108 if (m_xTextObject.is())
1110 m_xTextObject->DisposeEditSource();
1116 m_pFormatField = pFormatField;
1126 return m_pFormatField;
1132 return m_bIsDescriptor;
1136 const SwField* GetField()
const;
1140 if(!m_pDoc && !IsDescriptor())
1141 throw uno::RuntimeException();
1142 else if (IsDescriptor())
1143 return m_pFieldType;
1150 m_pFieldType = &rType;
1156 m_pFieldType =
nullptr;
1172 m_pImpl->m_pProps->bBool2 =
true;
1176 m_pImpl->m_pProps->bBool1 =
true;
1180 m_pImpl->m_pProps->nUSHORT2 = USHRT_MAX;
1197 assert(!pFormat || pDoc);
1213 const_cast<SwFormatField *
>(pFormat)->SetXTextField(xField);
1216 pField->
m_pImpl->m_wThis = xField.get();
1244 pXField->m_pImpl->SetFormatField(
nullptr,
nullptr);
1249 assert(tempFormat.
GetField() != &rField);
1250 assert(tempFormat.
GetField() != &tempField);
1253 std::shared_ptr<SwPaM> pPamForTextField;
1256 assert(pPamForTextField);
1257 sal_Int32
const nStart(pPamForTextField->Start()->GetContentIndex());
1260 bool bSuccess = rIDCO.
InsertPoolItem(*pPamForTextField, tempFormat);
1270 pXField->m_pImpl->SetFormatField(
const_cast<SwFormatField*
>(&rNewFormat), &rNode.
GetDoc());
1271 const_cast<SwFormatField&
>(rNewFormat).SetXTextField(pXField);
1276 const uno::Reference< beans::XPropertySet > & xFieldMaster)
1281 throw uno::RuntimeException();
1288 throw lang::IllegalArgumentException();
1291 m_pImpl->SetFieldType(*pFieldType);
1294uno::Reference< beans::XPropertySet > SAL_CALL
1300 if (!pType && !
m_pImpl->m_pDoc)
1302 uno::Reference<beans::XPropertySet>
const xRet(
1314 throw uno::RuntimeException();
1320 const uno::Reference< text::XTextRange > & xTextRange)
1326 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
1328 SwDoc* pDoc = pRange ? &pRange->
GetDoc() : pCursor ? pCursor->GetDoc() :
nullptr;
1332 throw lang::IllegalArgumentException();
1337 std::unique_ptr<SwField> xField;
1338 switch (
m_pImpl->m_nServiceId)
1345 if (
m_pImpl->m_pProps->pDateTime)
1347 aDateTime = *(
m_pImpl->m_pProps->pDateTime);
1350 sal_uInt32 nImportedId = 0;
1351 if (!
m_pImpl->m_pProps->sPar6.isEmpty())
1352 nImportedId =
m_pImpl->m_pProps->sPar6.toInt32(16);
1353 sal_uInt32 nParentId = 0;
1354 if (!
m_pImpl->m_pProps->sPar5.isEmpty())
1355 nParentId =
m_pImpl->m_pProps->sPar5.toInt32(16);
1369 if (
m_pImpl->m_xTextObject.is() )
1374 xField.reset(pPostItField);
1387 sal_uInt16 nSub = 0;
1388 if (
m_pImpl->m_pProps->bBool1)
1390 if (
m_pImpl->m_pProps->bBool2)
1397 nSub,
m_pImpl->m_pProps->nFormat);
1398 xField.reset(pDTField);
1399 if (
m_pImpl->m_pProps->fDouble > 0.)
1403 if (
m_pImpl->m_pProps->pDateTime)
1414 sal_Int32 nFormat =
m_pImpl->m_pProps->nFormat;
1415 if (
m_pImpl->m_pProps->bBool2)
1419 xField.reset(pFNField);
1420 if (!
m_pImpl->m_pProps->sPar3.isEmpty())
1423 aFormat <<=
m_pImpl->m_pProps->nFormat;
1433 aFormat <<=
m_pImpl->m_pProps->nFormat;
1443 xField.reset(pChapterField);
1446 aVal <<= static_cast<sal_Int16>(
m_pImpl->m_pProps->nUSHORT1);
1453 if (
m_pImpl->m_pProps->bBool2)
1459 xField.reset(pAuthorField);
1473 xField.reset(pHTField);
1476 aVal <<=
m_pImpl->m_pProps->sPar4;
1486 xField.reset(pHPField);
1499 if (!
m_pImpl->m_pProps->sPar3.isEmpty())
1502 aVal <<= static_cast<sal_Int16>(
m_pImpl->m_pProps->nUSHORT1);
1504 aVal <<= static_cast<sal_Int16>(
m_pImpl->m_pProps->nUSHORT2);
1506 aVal <<=
m_pImpl->m_pProps->nSHORT1;
1541 if (
m_pImpl->m_pProps->bBool2)
1552 if (
m_pImpl->m_pProps->bBool1)
1557 if (!
m_pImpl->m_pProps->sPar3.isEmpty())
1563 sal_Int32 nFormat = 0;
1564 if (
m_pImpl->m_pProps->bBool1)
1570 m_pImpl->m_pProps->nUSHORT1, nFormat);
1571 xField.reset(pEUField);
1580 throw uno::RuntimeException();
1581 sal_uInt16 nUserSubType = (
m_pImpl->m_pProps->bBool1)
1583 if (
m_pImpl->m_pProps->bBool2)
1585 if (
m_pImpl->m_pProps->bFormatIsDefault &&
1588 m_pImpl->m_pProps->nFormat = -1;
1608 m_pImpl->m_pProps->nUSHORT1 );
1609 xField.reset(pRGField);
1620 xField.reset(pPNField);
1623 aVal <<=
m_pImpl->m_pProps->nSubType;
1632 throw uno::RuntimeException();
1644 sal_uInt16 nSubType = xField->GetSubType();
1645 if (
m_pImpl->m_pProps->bBool2)
1649 xField->SetSubType(nSubType);
1672 OUString::number(
m_pImpl->m_pProps->nFormat),
1686 xField.reset(pDBSNField);
1688 sal_uInt16 nSubType = xField->GetSubType();
1689 if (
m_pImpl->m_pProps->bBool2)
1693 xField->SetSubType(nSubType);
1701 throw uno::RuntimeException();
1704 static_cast<SwDBField*
>(xField.get())->InitContent(
m_pImpl->m_pProps->sPar1);
1706 if (
m_pImpl->m_pProps->bBool2)
1710 xField->SetSubType(nSubType);
1718 throw uno::RuntimeException();
1720 if (
m_pImpl->m_pProps->bFormatIsDefault &&
1723 m_pImpl->m_pProps->nFormat = -1;
1728 m_pImpl->m_pProps->nUSHORT2 != USHRT_MAX ?
1730 xField.reset(pSEField);
1732 sal_uInt16 nSubType = xField->GetSubType();
1733 if (
m_pImpl->m_pProps->bBool2)
1737 if (
m_pImpl->m_pProps->bBool3)
1741 xField->SetSubType(nSubType);
1745 if (!
m_pImpl->m_pProps->sPar4.isEmpty())
1752 sal_uInt16 nSubType;
1753 switch (
m_pImpl->m_pProps->nSubType)
1760 OSL_FAIL(
"wrong value");
1766 bool bSetGetExpFieldUninitialized =
false;
1774 bSetGetExpFieldUninitialized =
true;
1776 if (
m_pImpl->m_pProps->bBool2)
1783 m_pImpl->m_pProps->sPar1, nSubType,
1785 xField.reset(pGEField);
1787 if (!
m_pImpl->m_pProps->sPar4.isEmpty())
1790 if (bSetGetExpFieldUninitialized)
1800 throw uno::RuntimeException();
1801 sal_uInt16 nInpSubType =
1802 sal::static_int_cast<sal_uInt16>(
1813 xField.reset(pTextField);
1822 if (!
m_pImpl->m_pProps->sPar4.isEmpty())
1843 sal_uInt16 nSubType =
DS_PAGE;
1844 switch (
m_pImpl->m_nServiceId)
1857 nSubType,
m_pImpl->m_pProps->nUSHORT2));
1866 if (
m_pImpl->m_pProps->aPropSeq.hasElements())
1869 aVal <<=
m_pImpl->m_pProps->aPropSeq;
1885 xField.reset(pDDField);
1899 if (
m_pImpl->m_pProps->bBool1)
1902 if (
m_pImpl->m_pProps->bFormatIsDefault)
1903 m_pImpl->m_pProps->nFormat = -1;
1913 default: OSL_FAIL(
"What kind of type is that?");
1917 throw uno::RuntimeException(
"no SwField created?");
1919 xField->SetAutomaticLanguage(!
m_pImpl->m_pProps->bBool4);
1930 const bool bForceExpandHints(
1952 throw uno::RuntimeException(
"no SwTextAttr inserted?");
1963 OSL_ENSURE( pPostItField !=
nullptr,
"<SwXTextField::attachToRange(..)> - annotation field missing!" );
1964 if ( pPostItField !=
nullptr )
1973 assert(
m_pImpl->GetFormatField());
1975 m_pImpl->GetFormatField()->SetXTextField(
this);
1977 m_pImpl->m_bIsDescriptor =
false;
1982 else if ( !
m_pImpl->IsDescriptor()
1989 throw lang::IllegalArgumentException();
1997 std::unique_ptr<SwPostItField> pPostItField(
static_cast< SwPostItField*
>(
m_pImpl->GetFormatField()->GetField()->CopyField().release()));
1999 pPostItField.reset();
2014 if ( pTextAttr !=
nullptr )
2022 OSL_ENSURE( pField !=
nullptr,
"<SwXTextField::attach(..)> - annotation field missing!" );
2023 if ( pField !=
nullptr )
2035 throw lang::IllegalArgumentException();
2038uno::Reference< text::XTextRange > SAL_CALL
2049 throw uno::RuntimeException();
2051 std::shared_ptr< SwPaM > pPamForTextField;
2053 if (pPamForTextField ==
nullptr)
2063 if ((*ppMark)->GetName() == pPostItField->
GetName())
2065 pPamForTextField = std::make_shared<SwPaM>((*ppMark)->GetMarkStart(), (*ppMark)->GetMarkEnd());
2072 *
m_pImpl->m_pDoc, *(pPamForTextField->GetPoint()), pPamForTextField->GetMark());
2083 assert(
m_pImpl->GetFormatField()->GetTextField() &&
"<SwXTextField::dispose()> - missing <SwTextField> --> crash");
2087 if (
m_pImpl->m_xTextObject.is())
2089 m_pImpl->m_xTextObject->DisposeEditSource();
2090 m_pImpl->m_xTextObject.clear();
2096 const uno::Reference<lang::XEventListener> & xListener)
2098 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2099 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
2103 const uno::Reference<lang::XEventListener> & xListener)
2105 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2106 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
2109uno::Reference< beans::XPropertySetInfo > SAL_CALL
2114 uno::Reference< beans::XPropertySetInfo > aRef;
2117 throw uno::RuntimeException();
2121 const uno::Reference<beans::XPropertySetInfo>& xInfo = pPropSet->
getPropertySetInfo();
2123 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
2132 const OUString& rPropertyName,
const uno::Any& rValue)
2141 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2142 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2143 throw beans::PropertyVetoException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2157 OSL_FAIL(
"not implemented");
2165 throw uno::RuntimeException();
2171 assert(
m_pImpl->GetFormatField());
2174 m_pImpl->GetFormatField()->Broadcast(
2179 if (
m_pImpl->GetFormatField()->GetTextField())
2181 m_pImpl->GetFormatField()->GetTextField()->ExpandTextField();
2192 bool* pBool =
nullptr;
2193 switch(pEntry->
nWID)
2196 rValue >>=
m_pImpl->m_pProps->sPar1;
2199 rValue >>=
m_pImpl->m_pProps->sPar2;
2202 rValue >>=
m_pImpl->m_pProps->sPar3;
2205 rValue >>=
m_pImpl->m_pProps->sPar4;
2208 rValue >>=
m_pImpl->m_pProps->sPar5;
2211 rValue >>=
m_pImpl->m_pProps->sPar6;
2214 rValue >>=
m_pImpl->m_pProps->nFormat;
2215 m_pImpl->m_pProps->bFormatIsDefault =
false;
2221 rValue >>=
m_pImpl->m_pProps->nByte1;
2224 pBool = &
m_pImpl->m_pProps->bBool1;
2227 pBool = &
m_pImpl->m_pProps->bBool2;
2230 pBool = &
m_pImpl->m_pProps->bBool3;
2233 pBool = &
m_pImpl->m_pProps->bBool4;
2237 auto aTemp = o3tl::tryAccess<util::Date>(rValue);
2239 throw lang::IllegalArgumentException();
2241 m_pImpl->m_pProps->aDate =
Date(aTemp->Day, aTemp->Month, aTemp->Year);
2250 m_pImpl->m_pProps->nUSHORT1 = nVal;
2252 m_pImpl->m_pProps->nUSHORT2 = nVal;
2256 rValue >>=
m_pImpl->m_pProps->nSHORT1;
2260 throw lang::IllegalArgumentException();
2261 rValue >>=
m_pImpl->m_pProps->fDouble;
2265 if (!
m_pImpl->m_pProps->pDateTime)
2266 m_pImpl->m_pProps->pDateTime.reset(
new util::DateTime );
2267 rValue >>= *
m_pImpl->m_pProps->pDateTime;
2270 rValue >>=
m_pImpl->m_pProps->aPropSeq;
2273 rValue >>=
m_pImpl->m_pProps->aStrings;
2280 throw lang::IllegalArgumentException();
2286 throw uno::RuntimeException();
2303 throw beans::UnknownPropertyException(
"Unknown property: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
2305 switch( pEntry->
nWID )
2308 aRet <<= text::WrapTextMode_NONE;
2311 aRet <<= text::TextContentAnchorType_AS_CHARACTER;
2315 uno::Sequence<text::TextContentAnchorType>
aTypes { text::TextContentAnchorType_AS_CHARACTER };
2326 bool bIsFieldUsed =
false;
2327 bool bIsFieldDisplayed =
false;
2343 else if (pViewShell)
2346 throw uno::RuntimeException();
2352 ?
m_pImpl->GetFormatField()->GetTextField() :
nullptr;
2354 throw uno::RuntimeException();
2362 bool bHidden = rTextNode.
IsHidden();
2365 sal_Int32 nHiddenStart;
2366 sal_Int32 nHiddenEnd;
2369 nHiddenStart, nHiddenEnd );
2377 bIsFieldUsed = bFrame || bHidden;
2378 bIsFieldDisplayed = bIsFieldUsed && !bHidden;
2387 switch(pEntry->
nWID)
2391 if (!
m_pImpl->m_xTextObject.is())
2397 uno::Reference<text::XText> xText(
m_pImpl->m_xTextObject);
2402 aRet <<=
m_pImpl->m_pProps->sPar1;
2405 aRet <<=
m_pImpl->m_pProps->sPar2;
2408 aRet <<=
m_pImpl->m_pProps->sPar3;
2411 aRet <<=
m_pImpl->m_pProps->sPar4;
2414 aRet <<=
m_pImpl->m_pProps->sPar5;
2417 aRet <<=
m_pImpl->m_pProps->sPar6;
2420 aRet <<=
m_pImpl->m_pProps->nFormat;
2423 aRet <<=
m_pImpl->m_pProps->nSubType;
2426 aRet <<=
m_pImpl->m_pProps->nByte1;
2429 aRet <<=
m_pImpl->m_pProps->bBool1;
2432 aRet <<=
m_pImpl->m_pProps->bBool2;
2435 aRet <<=
m_pImpl->m_pProps->bBool3;
2438 aRet <<=
m_pImpl->m_pProps->bBool4;
2441 aRet <<=
m_pImpl->m_pProps->aDate.GetUNODate();
2444 aRet <<= static_cast<sal_Int16>(
m_pImpl->m_pProps->nUSHORT1);
2447 aRet <<= static_cast<sal_Int16>(
m_pImpl->m_pProps->nUSHORT2);
2450 aRet <<=
m_pImpl->m_pProps->nSHORT1;
2453 aRet <<=
m_pImpl->m_pProps->fDouble;
2456 if (
m_pImpl->m_pProps->pDateTime)
2457 aRet <<= *
m_pImpl->m_pProps->pDateTime;
2460 aRet <<=
m_pImpl->m_pProps->aPropSeq;
2463 aRet <<=
m_pImpl->m_pProps->aStrings;
2472 throw uno::RuntimeException();
2479 OSL_FAIL(
"not implemented");
2484 OSL_FAIL(
"not implemented");
2489 OSL_FAIL(
"not implemented");
2494 OSL_FAIL(
"not implemented");
2503 switch(pField->
Which())
2546 m_pImpl->GetFormatField()->ForceUpdateTextNode();
2549 m_pImpl->m_bCallUpdate =
true;
2554 return "SwXTextField";
2559 static const char aOldNamePart1[] =
".TextField.DocInfo.";
2560 static const char aOldNamePart2[] =
".TextField.";
2561 OUString sServiceNameCC( rOld );
2562 sal_Int32 nIdx = sServiceNameCC.indexOf( aOldNamePart1 );
2564 sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart1),
u".textfield.docinfo." );
2565 nIdx = sServiceNameCC.indexOf( aOldNamePart2 );
2567 sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart2),
u".textfield." );
2568 return sServiceNameCC;
2584 sal_Int32 nLen =
sServiceName == sServiceNameCC ? 2 : 3;
2586 uno::Sequence< OUString > aRet( nLen );
2587 OUString* pArray = aRet.getArray();
2590 *pArray++ = sServiceNameCC;
2591 *pArray++ =
"com.sun.star.text.TextContent";
2600 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
2605 lang::EventObject
const ev(xThis);
2606 std::unique_lock aGuard(
m_Mutex);
2613 if(rHint.
GetId() == SfxHintId::Dying)
2615 else if (rHint.
GetId() == SfxHintId::SwLegacyModify)
2618 switch(pLegacyHint->m_pOld ? pLegacyHint->m_pOld->Which() : 0)
2630 return m_pFormatField ? m_pFormatField->GetField() :
nullptr;
2635 return "SwXTextFieldMasters";
2645 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextFieldMasters" };
2677 rTypeName = rName.getToken( 0,
'.', nIdx );
2678 if (rTypeName ==
"User")
2680 else if (rTypeName ==
"DDE")
2682 else if (rTypeName ==
"SetExpression")
2686 const OUString sFieldTypName( rName.getToken( 0,
'.', nIdx ));
2689 if( sUIName != sFieldTypName )
2692 else if (rTypeName.equalsIgnoreAsciiCase(
"DataBase"))
2694 rName = rName.copy(RTL_CONSTASCII_LENGTH(
"DataBase."));
2695 if (!rName.isEmpty())
2698 rName =
"DataBase." + rName;
2702 else if (rTypeName ==
"Bibliography")
2711 throw uno::RuntimeException();
2713 OUString
sName(rName), sTypeName;
2716 throw container::NoSuchElementException(
2717 "SwXTextFieldMasters::getByName(" + rName +
")",
2718 css::uno::Reference<css::uno::XInterface>());
2723 throw container::NoSuchElementException(
2724 "SwXTextFieldMasters::getByName(" + rName +
")",
2725 css::uno::Reference<css::uno::XInterface>());
2727 uno::Reference<beans::XPropertySet>
const xRet(
2737 switch( rFieldType.
Which() )
2740 sField =
"User." + rFieldType.
GetName();
2743 sField =
"DDE." + rFieldType.
GetName();
2751 sField =
"DataBase." + rFieldType.
GetName().replaceAll(OUStringChar(
DB_DELIM),
".");
2755 sField =
"Bibliography";
2770 throw uno::RuntimeException();
2773 const size_t nCount = pFieldTypes->size();
2780 OUString sFieldName;
2794 throw uno::RuntimeException();
2796 OUString
sName(rName), sTypeName;
2817 throw uno::RuntimeException();
2830 return "SwXTextFieldTypes";
2840 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextFields" };
2858 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2859 m_pImpl->m_RefreshListeners.disposeAndClear(aGuard, ev);
2866 throw uno::RuntimeException();
2879 throw uno::RuntimeException();
2888 throw uno::RuntimeException();
2895 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2896 m_pImpl->m_RefreshListeners.notifyEach(aGuard,
2897 & util::XRefreshListener::refreshed, event);
2901 const uno::Reference<util::XRefreshListener> & xListener)
2903 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2904 m_pImpl->m_RefreshListeners.addInterface(aGuard, xListener);
2908 const uno::Reference<util::XRefreshListener> & xListener)
2910 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2911 m_pImpl->m_RefreshListeners.removeInterface(aGuard, xListener);
2919 std::vector<uno::Reference<text::XTextField>>
m_Items;
2931 if(rHint.
GetId() == SfxHintId::Dying)
2939 return "SwXFieldEnumeration";
2947uno::Sequence<OUString> SAL_CALL
2950 return {
"com.sun.star.text.FieldEnumeration" };
2959 const SwFieldTypes* pFieldTypes =
m_pImpl->m_pDoc->getIDocumentFieldsAccess().GetFieldTypes();
2960 const size_t nCount = pFieldTypes->size();
2964 std::vector<SwFormatField*> vFormatFields;
2966 std::for_each(vFormatFields.begin(), vFormatFields.end(),
2967 [
this](
SwFormatField* pF) { m_pImpl->m_Items.push_back(SwXTextField::CreateXTextField(m_pImpl->m_pDoc, pF)); });
2970 const std::vector< uno::Reference<text::XTextField> > MetaFields(
2971 m_pImpl->m_pDoc->GetMetaFieldManager().getMetaFields() );
2972 for (
const auto & rMetaField : MetaFields)
2974 m_pImpl->m_Items.push_back( rMetaField );
2992 return m_pImpl->m_nNextIndex <
static_cast<sal_Int32
>(
m_pImpl->m_Items.size());
2999 if (
m_pImpl->m_nNextIndex >=
static_cast<sal_Int32
>(
m_pImpl->m_Items.size()))
3000 throw container::NoSuchElementException(
3001 "SwXFieldEnumeration::nextElement",
3002 css::uno::Reference<css::uno::XInterface>());
3004 uno::Reference< text::XTextField > &rxField =
constexpr OUStringLiteral sServiceName
const char *const aFieldNames[]
Text operation/manipulation interface.
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
virtual const SwFieldTypes * GetFieldTypes() const =0
virtual void UpdateFields(bool bCloseDB)=0
virtual void PutValueToField(const SwPosition &rPos, const css::uno::Any &rVal, sal_uInt16 nWhich)=0
Puts a value into a field at a certain position.
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getAnnotationMarksEnd() const =0
virtual const_iterator_t getFieldmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of fieldmarks.
virtual const_iterator_t getAnnotationMarksBegin() const =0
virtual const_iterator_t getFieldmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of fieldmarks.
virtual sw::mark::IMark * makeAnnotationMark(const SwPaM &rPaM, const OUString &rName)=0
virtual void SetModified()=0
Must be called manually at changes of format.
virtual void UpdateDocStat(bool bCompleteAsync, bool bFields)=0
Updates the internal document's statistics.
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
INetProtocol GetProtocol() const
bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
bool StartListening(SvtBroadcaster &rBroadcaster)
static OUString Expand(sal_uLong)
void SetExpansion(const OUString &rStr)
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bib...
SwRect FindLayoutRect(const bool bPrtArea=false, const Point *pPoint=nullptr) const
virtual sal_uInt16 GetSubType() const override
void SetSetNumber(tools::Long nNum)
void SetOffset(tools::Long nMinutes)
void SetExpansion(const OUString &rStr)
const OUString & GetName() const
virtual sal_uInt16 GetSubType() const override
IDocumentState const & getIDocumentState() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
SwEditShell const * GetEditShell() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
IDocumentMarkAccess * getIDocumentMarkAccess()
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
IDocumentStatistics const & getIDocumentStatistics() const
Field type for dropdown boxes.
void SetSelectedItem(const OUString &rItem)
Sets the selected item.
void SetToolTip(const OUString &rToolTip)
Sets the tool tip of the field.
void SetItems(std::vector< OUString > &&rItems)
Sets the items of the dropdown box.
void SetHelp(const OUString &rHelp)
Sets the help text of the field.
void SetName(const OUString &rName)
Sets the name of the field.
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
static OUString Expand(sal_uInt16 nSubType)
virtual sal_uInt16 GetSubType() const override
void SetExpansion(const OUString &rStr)
Instances of SwFields and those derived from it occur 0 to n times.
void SetXObject(rtl::Reference< SwXFieldMaster > const &xFieldMaster)
virtual void UpdateFields()
virtual OUString GetName() const
Only in derived classes.
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich)
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
unotools::WeakReference< SwXFieldMaster > const & GetXObject() const
Base class of all fields.
virtual sal_uInt16 GetSubType() const
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
virtual OUString GetFieldName() const
get name or content
SwFieldType * GetTyp() const
SwFieldIds Which() const
ResId.
LanguageType GetLanguage() const
Language at field position.
void SetExpansion(const OUString &rStr)
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
void SetLateInitialization()
void SetHidden(bool bHidden)
void SetValue(bool bHidden)
static void CreateMacroString(OUString &rMacro, std::u16string_view rMacroName, const OUString &rLibraryName)
create an internally used macro name from the library and macro name parts
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
void SetUserString(const OUString &rS)
const OUString & GetName() const
void SetTextObject(std::optional< OutlinerParaObject > pText)
virtual void SetPar2(const OUString &rStr) override
set the PostIt's text
void Width(tools::Long nNew)
void SetText(const OUString &rText, SwRootFrame const *pLayout)
static bool GetBoundsOfHiddenRange(const SwTextNode &rNode, sal_Int32 nPos, sal_Int32 &rnStartPos, sal_Int32 &rnEndPos, std::vector< sal_Int32 > *pList=nullptr)
Hidden text range information - static and non-version.
sal_uInt16 GetType() const
void SetOutlineLvl(sal_uInt8 n)
void SetDelimiter(const OUString &s)
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
void SetInputFlag(bool bInp)
SwFormatField * GetFormatField()
void SetPromptText(const OUString &rStr)
void SetSeqNumber(sal_uInt16 n)
Logical number, sequence fields.
bool GetInputFlag() const
static const std::vector< OUString > & GetExtraUINameArray()
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
static SW_DLLPUBLIC const OUString & GetSpecialExtraProgName(const OUString &rExtraUIName)
static const OUString & GetSpecialExtraUIName(const OUString &rExtraProgName)
Implementation in tblcalc.cxx.
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetStart() const
const SwFormatField & GetFormatField() const
SwTextNode & GetTextNode() const
SwTextNode * GetpTextNode() const
static void DeleteTextField(const SwTextField &rTextField)
static void GetPamForTextField(const SwTextField &rTextField, std::shared_ptr< SwPaM > &rPamForTextField)
SwTextNode is a paragraph in the document model.
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Expand) const
virtual void Invalidate()
o3tl::span< const SfxItemPropertyMapEntry > GetPropertyMapEntries(sal_uInt16 PropertyId)
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
The shared part of a user field.
sal_uInt16 GetType() const
The non-shared part of a user field.
virtual void SetValue(const double &rVal)
virtual void CalcLayout()
std::vector< uno::Reference< text::XTextField > > m_Items
sal_Int32 m_nNextIndex
index of next element to be returned
virtual void Notify(const SfxHint &rHint) override
virtual ~SwXFieldEnumeration() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL hasMoreElements() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual css::uno::Any SAL_CALL nextElement() override
SwXFieldEnumeration(SwDoc &rDoc)
virtual OUString SAL_CALL getImplementationName() override
::sw::UnoImplPtr< Impl > m_pImpl
unotools::WeakReference< SwXFieldMaster > m_wThis
Impl(SwPageDesc *const pPageDesc, SwDoc *pDoc, SwFieldIds nResId)
virtual void Notify(const SfxHint &rHint) override
void SetFieldType(SwFieldType *pType)
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
Impl(SwFieldType *const pType, SwDoc *pDoc, SwFieldIds nResId)
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
static OUString LocalizeFormula(const SwSetExpField &rField, const OUString &rFormula, bool bQuery)
virtual ~SwXFieldMaster() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual OUString SAL_CALL getImplementationName() override
static rtl::Reference< SwXFieldMaster > CreateXFieldMaster(SwDoc *pDoc, SwFieldType *pType, SwFieldIds nResId=SwFieldIds::Unknown)
SwXFieldMaster(SwFieldType &rType, SwDoc *pDoc)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
SwFieldType * GetFieldType(bool bDontCreate=false) const
::sw::UnoImplPtr< Impl > m_pImpl
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
static OUString GetProgrammaticName(const SwFieldType &rType, SwDoc &rDoc)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
static rtl::Reference< SwXBookmark > CreateXFieldmark(SwDoc &rDoc, ::sw::mark::IMark *pMark, bool isReplacementObject=false)
static OUString GetProviderName(SwServiceType nObjectType)
bool IsAtEndOfMeta() const
SwXTextFieldMasters(SwDoc *pDoc)
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL hasByName(const OUString &rName) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual sal_Bool SAL_CALL hasElements() override
virtual ~SwXTextFieldMasters() override
virtual css::uno::Any SAL_CALL getByName(const OUString &rName) override
static bool getInstanceName(const SwFieldType &rFieldType, OUString &rName)
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
::comphelper::OInterfaceContainerHelper4< util::XRefreshListener > m_RefreshListeners
SwXTextFieldTypes(SwDoc *pDoc)
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
virtual void SAL_CALL refresh() override
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
virtual OUString SAL_CALL getImplementationName() override
virtual void Invalidate() override
std::unique_ptr< Impl > m_pImpl
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual sal_Bool SAL_CALL hasElements() override
virtual ~SwXTextFieldTypes() override
virtual css::uno::Type SAL_CALL getElementType() override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
SwFormatField * m_pFormatField
std::unique_ptr< SwFieldProperties_Impl > m_pProps
SwFieldType * m_pFieldType
Impl(SwDoc *const pDoc, SwFormatField *const pFormat, SwServiceType nServiceId)
rtl::Reference< SwTextAPIObject > m_xTextObject
const SwField * GetField() const
SwServiceType m_nServiceId
bool IsDescriptor() const
void SetFieldType(SwFieldType &rType)
unotools::WeakReference< SwXTextField > m_wThis
void SetFormatField(SwFormatField *pFormatField, SwDoc *pDoc)
SwFieldType * GetFieldType() const
virtual void Notify(const SfxHint &) override
SwFormatField * GetFormatField()
UNO wrapper around an SwFormatField, i.e.
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual OUString SAL_CALL getPresentation(sal_Bool bShowCommand) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
SwServiceType GetServiceId() const
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual void SAL_CALL attachTextFieldMaster(const css::uno::Reference< css::beans::XPropertySet > &xFieldMaster) override
SwXTextField(SwFormatField &rFormat, SwDoc &rDoc)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual void SAL_CALL update() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
static rtl::Reference< SwXTextField > CreateXTextField(SwDoc *pDoc, SwFormatField const *pFormat, SwServiceType nServiceId=SwServiceType::Invalid)
::sw::UnoImplPtr< Impl > m_pImpl
static void TransmuteLeadToInputField(SwSetExpField &rField)
Convert between SwSetExpField with InputFlag false and InputFlag true.
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getTextFieldMaster() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual ~SwXTextField() override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
css::uno::Type const & get()
OUString getDataSource() const
#define FN_UNO_ANCHOR_TYPE
#define FN_UNO_ANCHOR_TYPES
virtual void SetValue(tools::Long nNew) override
SwFieldTypesEnum
List of FieldTypes at UI.
@ Database
For old documents the Field-Which IDs must be preserved !!!
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_REMOVE_UNO_OBJECT(181)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_FORMAT_MSG_BEGIN)
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral aData
sal_Int32 GetEnumAsInt32(const css::uno::Any &rVal)
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
const SwDocInfoSubType DI_DOCNO
const SwDocInfoSubType DI_SUB_AUTHOR
const SwDocInfoSubType DI_CUSTOM
const SwDocInfoSubType DI_CHANGE
const SwDocInfoSubType DI_COMMENT
const SwDocInfoSubType DI_SUB_FIXED
const SwDocInfoSubType DI_PRINT
const SwDocInfoSubType DI_SUB_DATE
const SwDocInfoSubType DI_KEYS
const SwDocInfoSubType DI_EDIT
const SwDocInfoSubType DI_SUBJECT
const SwDocInfoSubType DI_TITLE
const SwDocInfoSubType DI_SUB_TIME
const SwDocInfoSubType DI_CREATE
const SwExtendedSubType SUB_CMD
Show command.
const SwExtendedSubType SUB_INVISIBLE
Invisible.
const SwGetSetExpType GSE_EXPR
Expression.
const SwGetSetExpType GSE_FORMULA
Formula.
const SwGetSetExpType GSE_STRING
String.
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr OUStringLiteral EMPTY
const sal_Unicode cTokenSeparator
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
@ RES_POOLCOLL_LABEL_DRAWING
Label drawing objects.
@ RES_POOLCOLL_EXTRA_BEGIN
Special ranges.
@ RES_POOLCOLL_LABEL_FRAME
Label frame.
@ RES_POOLCOLL_LABEL_FIGURE
Label figure.
@ RES_POOLCOLL_LABEL_TABLE
Label table.
@ RES_POOLCOLL_LABEL_ABB
Label illustration.
@ RES_POOLPAGE_STANDARD
Standard page.
Marks a position in the document model.
sal_Int32 GetContentIndex() const
OUString SwResId(TranslateId aId)
@ FORCEHINTEXPAND
Force hint expand (only matters for hints with CH_TXTATR).
constexpr sal_uInt8 MAXLEVEL
SwServiceType
entries in this enum are mapped in an array in unocoll.cxx
@ FieldTypeConditionedText
@ FieldTypeDatabaseNumSet
@ FieldTypeGraphicObjectCount
@ FieldMasterBibliography
@ FieldTypeParagraphCount
@ FieldTypeDocInfoRevision
@ FieldTypeDatabaseNextSet
@ FieldTypeDocInfoPrintAuthor
@ FieldTypeDocInfoCreateDateTime
@ FieldTypeDocInfoKeywords
@ FieldTypeDocInfoSubject
@ FieldTypeDocInfoDescription
@ FieldTypeCharacterCount
@ FieldTypeDocInfoChangeAuthor
@ FieldTypeEmbeddedObjectCount
@ FieldTypeDocInfoEditTime
@ FieldTypeCombinedCharacters
@ FieldTypeDocInfoCreateAuthor
@ FieldTypeDocInfoPrintDateTime
@ FieldTypeDatabaseSetNum
@ FieldTypeDocInfoChangeDateTime
static sal_uInt16 lcl_GetPropertyMapOfService(SwServiceType nServiceId)
static sal_uInt16 GetFieldTypeMId(std::u16string_view rProperty, const SwFieldType &rTyp)
static SwFieldIds lcl_GetIdByName(OUString &rName, OUString &rTypeName)
const sal_uInt16 aDocInfoSubTypeFromService[]
static OUString OldNameToNewName_Impl(const OUString &rOld)
static SwFieldIds lcl_ServiceIdToResId(SwServiceType nServiceId)
static sal_uInt16 lcl_GetPropMapIdForFieldType(SwFieldIds nWhich)
const ServiceIdResId aServiceToRes[]
constexpr OUStringLiteral COM_TEXT_FLDMASTER_CC
static SwServiceType lcl_GetServiceForField(const SwField &rField)
static sal_Int32 lcl_PropName2TokenPos(std::u16string_view rPropertyName)
#define FIELD_PROP_DATE_TIME
#define FIELD_PROP_IS_FIELD_DISPLAYED
#define FIELD_PROP_STRINGS
#define FIELD_PROP_PROP_SEQ
#define FIELD_PROP_SUBTYPE
#define FIELD_PROP_USHORT1
#define FIELD_PROP_USHORT2
#define FIELD_PROP_FORMAT
#define FIELD_PROP_DOUBLE
#define FIELD_PROP_SHORT1
#define FIELD_PROP_IS_FIELD_USED
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_FLDTYP_GET_EXP
#define PROPERTY_MAP_FLDTYP_JUMP_EDIT
#define PROPERTY_MAP_FLDTYP_DDE
#define PROPERTY_MAP_FLDTYP_DATETIME
#define PROPERTY_MAP_FLDTYP_DOC_INFO
#define PROPERTY_MAP_FLDMSTR_USER
#define PROPERTY_MAP_FLDTYP_TABLE_FORMULA
#define PROPERTY_MAP_FLDTYP_SET_EXP
#define PROPERTY_MAP_FLDTYP_ANNOTATION
#define PROPERTY_MAP_FLDTYP_FILE_NAME
#define PROPERTY_MAP_FLDTYP_CHAPTER
#define PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME
#define PROPERTY_MAP_FLDTYP_DOCINFO_REVISION
#define PROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET
#define PROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR
#define PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME
#define PROPERTY_MAP_FLDTYP_AUTHOR
#define PROPERTY_MAP_FLDTYP_MACRO
#define PROPERTY_MAP_FLDTYP_GET_REFERENCE
#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS
#define PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY
#define PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS
#define PROPERTY_MAP_FLDMSTR_DDE
#define PROPERTY_MAP_FLDTYP_DOCSTAT
#define PROPERTY_MAP_FLDTYP_USER
#define PROPERTY_MAP_FLDTYP_SCRIPT
#define PROPERTY_MAP_FLDTYP_DATABASE
#define PROPERTY_MAP_FLDTYP_USER_EXT
#define PROPERTY_MAP_FLDMSTR_DUMMY0
#define PROPERTY_MAP_FLDTYP_REF_PAGE_GET
#define PROPERTY_MAP_FLDTYP_INPUT
#define PROPERTY_MAP_FLDTYP_HIDDEN_PARA
#define PROPERTY_MAP_FLDTYP_REF_PAGE_SET
#define PROPERTY_MAP_FLDTYP_DROPDOWN
#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM
#define PROPERTY_MAP_FLDTYP_DATABASE_NAME
#define PROPERTY_MAP_FLDTYP_DATABASE_SET_NUM
#define PROPERTY_MAP_FLDTYP_PAGE_NUM
#define PROPERTY_MAP_FLDTYP_DATABASE_NUM_SET
#define PROPERTY_MAP_FLDMSTR_SET_EXP
#define PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT
#define PROPERTY_MAP_FLDMSTR_DATABASE
#define PROPERTY_MAP_FLDTYP_DOCINFO_MISC
#define PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY
#define PROPERTY_MAP_FLDTYP_HIDDEN_TEXT
#define PROPERTY_MAP_FLDTYP_TEMPLATE_NAME
#define PROPERTY_MAP_FLDTYP_DUMMY_0
constexpr OUStringLiteral UNO_NAME_DDE_COMMAND_TYPE
constexpr OUStringLiteral UNO_NAME_DEPENDENT_TEXT_FIELDS
constexpr OUStringLiteral UNO_NAME_VALUE
constexpr OUStringLiteral UNO_NAME_DDE_COMMAND_ELEMENT
constexpr OUStringLiteral UNO_NAME_IS_AUTOMATIC_UPDATE
constexpr OUStringLiteral UNO_NAME_NAME
constexpr OUStringLiteral UNO_NAME_DATA_COLUMN_NAME
constexpr OUStringLiteral UNO_NAME_DATA_TABLE_NAME
constexpr OUStringLiteral UNO_NAME_DATA_BASE_NAME
constexpr OUStringLiteral UNO_NAME_CONTENT
constexpr OUStringLiteral UNO_NAME_DATA_BASE_URL
constexpr OUStringLiteral UNO_NAME_DDE_COMMAND_FILE
constexpr OUStringLiteral UNO_NAME_DATA_COMMAND_TYPE
constexpr OUStringLiteral UNO_NAME_INSTANCE_NAME
constexpr OUStringLiteral UNO_NAME_NUMBERING_SEPARATOR
constexpr OUStringLiteral UNO_NAME_IS_EXPRESSION
constexpr OUStringLiteral UNO_NAME_SUB_TYPE
constexpr OUStringLiteral UNO_NAME_CHAPTER_NUMBERING_LEVEL