24#include <osl/diagnose.h>
26#include <com/sun/star/uno/Sequence.hxx>
27#include <rtl/ustrbuf.hxx>
49 const OUString sSenderToken(
SwResId(STR_SENDER_TOKENS));
50 if (sSenderToken.isEmpty())
54 sal_Int32 nSttPos = 0;
55 bool bLastLength =
true;
57 std::u16string_view sToken =
o3tl::getToken(sSenderToken, 0,
';', nSttPos );
58 if (sToken ==
u"COMPANY")
60 sal_Int32 nOldLen = sRet.getLength();
62 bLastLength = sRet.getLength() != nOldLen;
64 else if (sToken ==
u"CR")
70 else if (sToken ==
u"FIRSTNAME")
72 else if (sToken ==
u"LASTNAME")
74 else if (sToken ==
u"ADDRESS")
76 else if (sToken ==
u"COUNTRY")
78 else if (sToken ==
u"POSTALCODE")
79 sRet.append(rUserOpt.
GetZip());
80 else if (sToken ==
u"CITY")
81 sRet.append(rUserOpt.
GetCity());
82 else if (sToken ==
u"STATEPROV")
84 else if (!sToken.empty())
87 return sRet.makeStringAndClear();
129 assert(SfxPoolItem::operator==(rItem));
159 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
160 if(aValues.getLength() != aNames.getLength())
163 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
222 Sequence<Any> aValues(aNames.getLength());
225 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
253 "Inscription/Addressee",
254 "Inscription/Sender",
255 "Inscription/UseSender",
256 "Format/AddresseeFromLeft",
257 "Format/AddresseeFromTop",
258 "Format/SenderFromLeft",
259 "Format/SenderFromTop",
268 Sequence<OUString> aNames(
nCount);
269 OUString* pNames = aNames.getArray();
296 OSL_FAIL(
"Wrong memberId");
319 bRet = (rVal >>= nTemp);
328 OSL_FAIL(
"Wrong memberId");
const PropertyValue * pValues
constexpr auto convertTwipToMm100(N n)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
OUString GetFirstName() const
OUString GetCountry() const
OUString GetCompany() const
OUString GetStreet() const
OUString GetState() const
OUString GetLastName() const
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
virtual void ImplCommit() override
virtual ~SwEnvCfgItem() override
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
static css::uno::Sequence< OUString > GetPropertyNames()
sal_Int32 m_nSendFromLeft
virtual SwEnvItem * Clone(SfxItemPool *=nullptr) const override
static SfxPoolItem * CreateDefault()
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
SwEnvItem & operator=(const SwEnvItem &rItem)
virtual bool operator==(const SfxPoolItem &rItem) const override
sal_Int32 m_nAddrFromLeft
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
static bool PutProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales)
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
#define SAL_NEWLINE_STRING
constexpr auto toTwips(N number, Length from)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
const PropertyStruct aPropNames[]
OUString SwResId(TranslateId aId)
#define MID_ENV_ADDR_FROM_LEFT
#define MID_ENV_ADDR_TEXT
#define MID_ENV_PRINT_FROM_ABOVE
#define MID_ENV_ADDR_FROM_TOP
#define MID_ENV_SHIFT_RIGHT
#define MID_ENV_SEND_FROM_LEFT
#define MID_ENV_SHIFT_DOWN
#define MID_ENV_SEND_FROM_TOP