20#include <com/sun/star/beans/XPropertySet.hpp>
21#include <com/sun/star/text/XTextFieldsSupplier.hpp>
22#include <com/sun/star/util/XRefreshable.hpp>
25#include <unoprnms.hxx>
34 uno::Reference< text::XTextFieldsSupplier > xFields(
xModel, uno::UNO_QUERY);
35 uno::Reference< container::XNameAccess > xFieldMasters = xFields->getTextFieldMasters();
37 static const struct SwLabItemMap {
78 for(
const SwLabItemMap*
p =
aArr;
p->pName; ++
p )
81 "com.sun.star.text.FieldMaster.User."
82 + OUString::createFromAscii(
p->pName));
83 if( xFieldMasters->hasByName( uFieldName ))
85 uno::Any aFirstName = xFieldMasters->getByName( uFieldName );
86 uno::Reference< beans::XPropertySet > xField;
87 aFirstName >>= xField;
89 aContent <<= rItem.*
p->pValue;
94 catch (
const uno::RuntimeException&)
99 uno::Reference< container::XEnumerationAccess > xFieldAcc = xFields->getTextFields();
100 uno::Reference< util::XRefreshable > xRefresh(xFieldAcc, uno::UNO_QUERY);
static void UpdateFieldInformation(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
OUString m_aCompCompanyExt
OUString m_aPrivFirstName2
OUString m_aPrivShortCut2
OUString m_aPrivProfession
OUString m_aPrivFirstName
Reference< XModel > xModel
constexpr OUStringLiteral UNO_NAME_CONTENT