23 #include <osl/diagnose.h>
25 #include <com/sun/star/uno/Sequence.hxx>
119 assert(SfxPoolItem::operator==(rItem));
187 static const char* aLabelPropNames[] =
194 "Format/HorizontalDistance",
195 "Format/VerticalDistance",
202 "Option/Synchronize",
206 "Inscription/UseAddress",
207 "Inscription/Address",
208 "Inscription/Database"
210 static const char* aBusinessPropNames[] =
212 "PrivateAddress/FirstName",
213 "PrivateAddress/Name",
214 "PrivateAddress/ShortCut",
215 "PrivateAddress/SecondFirstName",
216 "PrivateAddress/SecondName",
217 "PrivateAddress/SecondShortCut",
218 "PrivateAddress/Street",
219 "PrivateAddress/Zip",
220 "PrivateAddress/City",
221 "PrivateAddress/Country",
222 "PrivateAddress/State",
223 "PrivateAddress/Title",
224 "PrivateAddress/Profession",
225 "PrivateAddress/Phone",
226 "PrivateAddress/Mobile",
227 "PrivateAddress/Fax",
228 "PrivateAddress/WebAddress",
229 "PrivateAddress/Email",
230 "BusinessAddress/Company",
231 "BusinessAddress/CompanyExt",
232 "BusinessAddress/Slogan",
233 "BusinessAddress/Street",
234 "BusinessAddress/Zip",
235 "BusinessAddress/City",
236 "BusinessAddress/Country",
237 "BusinessAddress/State",
238 "BusinessAddress/Position",
239 "BusinessAddress/Phone",
240 "BusinessAddress/Mobile",
241 "BusinessAddress/Fax",
242 "BusinessAddress/WebAddress",
243 "BusinessAddress/Email",
247 const int nBusinessCount =
m_bIsLabel ? 0 : 34;
250 OUString* pNames = aNames.getArray();
252 for(
int nLabel = 0; nLabel < nLabelCount; nLabel++)
253 pNames[nIndex++] = OUString::createFromAscii(aLabelPropNames[nLabel]);
254 for(
int nBusiness = 0; nBusiness < nBusinessCount; nBusiness++)
255 pNames[nIndex++] = OUString::createFromAscii(aBusinessPropNames[nBusiness]);
260 ConfigItem(bLabel ? OUString(
"Office.Writer/Label") : OUString(
"Office.Writer/BusinessCard")),
267 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
268 bool bNoConfigValues =
true;
269 if(aValues.getLength() == aNames.getLength())
271 for(
int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++)
274 if(pValues[nProp].hasValue())
280 bNoConfigValues =
false;
283 case 0:
m_aItem.
m_bCont = *o3tl::doAccess<bool>(pValues[nProp]);
break;
321 case 14:
m_aItem.
m_bPage = *o3tl::doAccess<bool>(pValues[nProp]);
break;
324 case 17:
m_aItem.
m_bAddr = *o3tl::doAccess<bool>(pValues[nProp]);
break;
396 Sequence<Any> aValues(aNames.getLength());
399 for(
int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++)
constexpr auto toTwips(N number, Length from)
OUString GetCountry() const
css::uno::Sequence< OUString > GetPropertyNames() const
OUString m_aCompCompanyExt
constexpr auto convertTwipToMm100(N n)
OUString m_sGlossaryBlockName
OUString m_aPrivShortCut2
OUString GetTelephoneWork() const
OUString GetState() const
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
OUString m_aPrivProfession
OUString GetTitle() const
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)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
OUString m_aPrivFirstName2
SwLabItem & operator=(const SwLabItem &rItem)
virtual bool operator==(const SfxPoolItem &rItem) const override
OUString GetTelephoneHome() const
virtual SwLabItem * Clone(SfxItemPool *=nullptr) const override
SwLabCfgItem(bool bLabel)
OUString GetFirstName() const
OUString m_sGlossaryGroup
OUString GetEmail() const
const PropertyValue * pValues
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
OUString GetLastName() const
virtual void ImplCommit() override
OUString GetCompany() const
OUString GetStreet() const
OUString GetPosition() const
OUString m_aPrivFirstName