LibreOffice Module sd (master) 1
stlsheet.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <com/sun/star/beans/PropertyAttribute.hpp>
21#include <com/sun/star/beans/XPropertySet.hpp>
22#include <com/sun/star/lang/DisposedException.hpp>
23#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
24#include <com/sun/star/style/XStyle.hpp>
25#include <com/sun/star/table/BorderLine.hpp>
26#include <com/sun/star/text/XTextColumns.hpp>
27
28#include <o3tl/string_view.hxx>
29#include <osl/mutex.hxx>
30#include <vcl/svapp.hxx>
33
34#include <editeng/eeitem.hxx>
35#include <editeng/fhgtitem.hxx>
36#include <editeng/ulspitem.hxx>
37#include <svl/hint.hxx>
38#include <svl/intitem.hxx>
39#include <svl/itemset.hxx>
40
41#include <svx/xflbmtit.hxx>
42#include <svx/xflbstit.hxx>
43#include <svx/xlnclit.hxx>
45#include <editeng/lrspitem.hxx>
46#include <svx/unoshprp.hxx>
47#include <svx/unoshape.hxx>
48#include <svx/svdpool.hxx>
49#include <svx/sdmetitm.hxx>
50#include <svx/sdtaaitm.hxx>
51#include <svx/sdtacitm.hxx>
52#include <svx/sdtayitm.hxx>
53#include <svx/sdtaiitm.hxx>
55#include <svx/xit.hxx>
56#include <svx/xflclit.hxx>
58#include <stlsheet.hxx>
59#include <sdresid.hxx>
60#include <sdpage.hxx>
61#include <drawdoc.hxx>
62#include <stlpool.hxx>
63#include <strings.hrc>
64#include <app.hrc>
65#include <strings.hxx>
66#include <glob.hxx>
67#include <DrawViewShell.hxx>
68#include <ViewShellBase.hxx>
69
70#include <cstddef>
71#include <memory>
72#include <string_view>
73
74using ::osl::MutexGuard;
75using ::com::sun::star::table::BorderLine;
76using namespace ::com::sun::star::uno;
77using namespace ::com::sun::star::util;
78using namespace ::com::sun::star::lang;
79using namespace ::com::sun::star::style;
80using namespace ::com::sun::star::beans;
81using namespace ::com::sun::star::container;
82using namespace ::com::sun::star::drawing;
83
84#define WID_STYLE_HIDDEN 7997
85#define WID_STYLE_DISPNAME 7998
86#define WID_STYLE_FAMILY 7999
87
89{
90 static const SfxItemPropertyMapEntry aFullPropertyMap_Impl[] =
91 {
92 { u"Family", WID_STYLE_FAMILY, ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
93 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<XNameContainer>::get(), 0, 0},
94 { u"DisplayName", WID_STYLE_DISPNAME, ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
95 { u"Hidden", WID_STYLE_HIDDEN, cppu::UnoType<bool>::get(), 0, 0},
96
110 };
111
112 static SvxItemPropertySet aPropSet( aFullPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
113 return aPropSet;
114}
115
117{
118public:
119 explicit ModifyListenerForwarder( SdStyleSheet* pStyleSheet );
120
121 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
122
123private:
125};
126
128: mpStyleSheet( pStyleSheet )
129{
130 if( pStyleSheet )
131 {
132 SfxBroadcaster& rBC = static_cast< SfxBroadcaster& >( *pStyleSheet );
133 StartListening( rBC );
134 }
135}
136
138{
139 if( mpStyleSheet )
141}
142
143SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, SfxStyleSearchBits _nMask)
144: SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask)
145, msApiName( rDisplayName )
146, mxPool( &_rPool )
147{
148}
149
151{
152 delete pSet;
153 pSet = nullptr; // that following destructors also get a change
154}
155
156void SdStyleSheet::SetApiName( const OUString& rApiName )
157{
158 msApiName = rApiName;
159}
160
161OUString const & SdStyleSheet::GetApiName() const
162{
163 if( !msApiName.isEmpty() )
164 return msApiName;
165 else
166 return GetName();
167}
168
169bool SdStyleSheet::SetParent(const OUString& rParentName)
170{
171 bool bResult = false;
172
173 if (SfxStyleSheet::SetParent(rParentName))
174 {
175 // PseudoStyleSheets do not have their own ItemSets
176 if (nFamily != SfxStyleFamily::Pseudo)
177 {
178 if( !rParentName.isEmpty() )
179 {
180 SfxStyleSheetBase* pStyle = m_pPool->Find(rParentName, nFamily);
181 if (pStyle)
182 {
183 bResult = true;
184 SfxItemSet& rParentSet = pStyle->GetItemSet();
185 GetItemSet().SetParent(&rParentSet);
186 Broadcast( SfxHint( SfxHintId::DataChanged ) );
187 }
188 }
189 else
190 {
191 bResult = true;
192 GetItemSet().SetParent(nullptr);
193 Broadcast( SfxHint( SfxHintId::DataChanged ) );
194 }
195 }
196 else
197 {
198 bResult = true;
199 }
200 }
201 return bResult;
202}
203
208{
209 if (nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Page)
210 {
211 // we create the ItemSet 'on demand' if necessary
212 if (!pSet)
213 {
214 pSet = new SfxItemSetFixed<
221 EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
222 bMySet = true;
223 }
224
225 return *pSet;
226 }
227
228 else if( nFamily == SfxStyleFamily::Frame )
229 {
230 if (!pSet)
231 {
232 pSet = new SfxItemSetFixed<
239 EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
240
241 bMySet = true;
242 }
243
244 return *pSet;
245 }
246
247 // this is a dummy template for the internal template of the
248 // current presentation layout; return the ItemSet of that template
249 else
250 {
251
252 SdStyleSheet* pSdSheet = GetRealStyleSheet();
253
254 if (pSdSheet)
255 {
256 return pSdSheet->GetItemSet();
257 }
258 else
259 {
260 if (!pSet)
261 {
262 pSet = new SfxItemSetFixed<
269 EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
270 bMySet = true;
271 }
272
273 return(*pSet);
274 }
275 }
276}
277
283{
284 bool bResult = false;
285
286 ForAllListeners(
287 [this, &bResult] (SfxListener* pListener)
288 {
289 if( pListener == this )
290 return false; // continue
291
292 const svl::StyleSheetUser* const pUser(dynamic_cast<svl::StyleSheetUser*>(pListener));
293 if (pUser)
294 bResult = pUser->isUsedByModel();
295 if (bResult)
296 return true; // break loop
297 return false;
298 });
299
300 if( !bResult )
301 {
302 std::unique_lock aGuard( m_aMutex );
303
304 if( maModifyListeners.getLength(aGuard) )
305 {
306 std::vector<css::uno::Reference<XModifyListener>> aModifyListeners( maModifyListeners.getElements(aGuard) );
307 bResult = std::any_of(aModifyListeners.begin(), aModifyListeners.end(),
308 [](const Reference<XInterface>& rListener) {
309 Reference< XStyle > xStyle( rListener, UNO_QUERY );
310 try
311 {
312 Reference<XPropertySet> xPropertySet(xStyle, UNO_QUERY_THROW);
313 if (xPropertySet->getPropertyValue("IsPhysical").get<bool>())
314 return true;
315 }
316 catch (const Exception&)
317 {
318 }
319 return xStyle.is() && xStyle->isInUse();
320 });
321 }
322 }
323 return bResult;
324}
325
332{
333 if (GetFamily() != SfxStyleFamily::Frame)
334 return true;
335
336 if (!IsUserDefined())
337 return false;
338
339 bool bFoundOne = false;
340 ForAllListeners(
341 [this, &bFoundOne] (SfxListener* pListener)
342 {
343 if (pListener != this && dynamic_cast<SdStyleSheet*>(pListener))
344 {
345 bFoundOne = true;
346 return true; // break loop
347 }
348 return false;
349 });
350 if (bFoundOne)
351 return false;
352
353 std::unique_lock aGuard(m_aMutex);
354 return maModifyListeners.getLength(aGuard) <= 1;
355}
356
361{
362 OUString aRealStyle;
363 OUString aSep( SD_LT_SEPARATOR );
364 SdStyleSheet* pRealStyle = nullptr;
365 SdDrawDocument* pDoc = static_cast<SdStyleSheetPool*>(m_pPool)->GetDoc();
366
367 ::sd::DrawViewShell* pDrawViewShell = nullptr;
368
369 ::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase* >( SfxViewShell::Current() );
370 if( pBase )
371 pDrawViewShell = dynamic_cast< ::sd::DrawViewShell* >( pBase->GetMainViewShell().get() );
372
373 if (pDrawViewShell && pDrawViewShell->GetDoc() == pDoc)
374 {
375 SdPage* pPage = pDrawViewShell->getCurrentPage();
376 if( pPage )
377 {
378 aRealStyle = pPage->GetLayoutName();
379 // cut after separator string
380
381 if( aRealStyle.indexOf(aSep) >= 0)
382 {
383 aRealStyle = aRealStyle.copy(0,(aRealStyle.indexOf(aSep) + aSep.getLength()));
384 }
385 }
386 }
387 if (aRealStyle.isEmpty())
388 {
389 SdPage* pPage = pDoc->GetSdPage(0, PageKind::Standard);
390
391 if (pPage)
392 {
393 aRealStyle = pDoc->GetSdPage(0, PageKind::Standard)->GetLayoutName();
394 }
395 else
396 {
397 /* no page available yet. This can happen when actualizing the
398 document templates. */
399 SfxStyleSheetIterator aIter(m_pPool, SfxStyleFamily::Page);
400 SfxStyleSheetBase* pSheet = aIter.First();
401 if( pSheet )
402 aRealStyle = pSheet->GetName();
403 }
404
405 if( aRealStyle.indexOf(aSep) >= 0)
406 {
407 aRealStyle = aRealStyle.copy(0,(aRealStyle.indexOf(aSep) + aSep.getLength()));
408 }
409 }
410
411 /* now map from the name (specified for country language) to the internal
412 name (independent of the country language) */
413 OUString aInternalName;
414 OUString aStyleName(aName);
415
416 if (aStyleName == SdResId(STR_PSEUDOSHEET_TITLE))
417 {
418 aInternalName = STR_LAYOUT_TITLE;
419 }
420 else if (aStyleName == SdResId(STR_PSEUDOSHEET_SUBTITLE))
421 {
422 aInternalName = STR_LAYOUT_SUBTITLE;
423 }
424 else if (aStyleName == SdResId(STR_PSEUDOSHEET_BACKGROUND))
425 {
426 aInternalName = STR_LAYOUT_BACKGROUND;
427 }
428 else if (aStyleName == SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS))
429 {
430 aInternalName = STR_LAYOUT_BACKGROUNDOBJECTS;
431 }
432 else if (aStyleName == SdResId(STR_PSEUDOSHEET_NOTES))
433 {
434 aInternalName = STR_LAYOUT_NOTES;
435 }
436 else
437 {
438 OUString aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE));
439 sal_Int32 nPos = aStyleName.indexOf(aOutlineStr);
440 if (nPos >= 0)
441 {
442 std::u16string_view aNumStr(aStyleName.subView(aOutlineStr.getLength()));
443 aInternalName = STR_LAYOUT_OUTLINE + aNumStr;
444 }
445 }
446
447 aRealStyle += aInternalName;
448 pRealStyle = static_cast< SdStyleSheet* >( m_pPool->Find(aRealStyle, SfxStyleFamily::Page) );
449
450#ifdef DBG_UTIL
451 if( !pRealStyle )
452 {
453 SfxStyleSheetIterator aIter(m_pPool, SfxStyleFamily::Page);
454 if( aIter.Count() > 0 )
455 // StyleSheet not found, but pool already loaded
456 DBG_ASSERT(pRealStyle, "Internal StyleSheet not found");
457 }
458#endif
459
460 return pRealStyle;
461}
462
467{
468 SdStyleSheet* pPseudoStyle = nullptr;
469 OUString aSep( SD_LT_SEPARATOR );
470 OUString aStyleName(aName);
471 // without layout name and separator
472
473 if( aStyleName.indexOf(aSep) >=0 )
474 {
475 aStyleName = aStyleName.copy (aStyleName.indexOf(aSep) + aSep.getLength());
476 }
477
478 if (aStyleName == STR_LAYOUT_TITLE)
479 {
480 aStyleName = SdResId(STR_PSEUDOSHEET_TITLE);
481 }
482 else if (aStyleName == STR_LAYOUT_SUBTITLE)
483 {
484 aStyleName = SdResId(STR_PSEUDOSHEET_SUBTITLE);
485 }
486 else if (aStyleName == STR_LAYOUT_BACKGROUND)
487 {
488 aStyleName = SdResId(STR_PSEUDOSHEET_BACKGROUND);
489 }
490 else if (aStyleName == STR_LAYOUT_BACKGROUNDOBJECTS)
491 {
492 aStyleName = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS);
493 }
494 else if (aStyleName == STR_LAYOUT_NOTES)
495 {
496 aStyleName = SdResId(STR_PSEUDOSHEET_NOTES);
497 }
498 else
499 {
500 OUString aOutlineStr(STR_LAYOUT_OUTLINE);
501 sal_Int32 nPos = aStyleName.indexOf(aOutlineStr);
502 if (nPos != -1)
503 {
504 std::u16string_view aNumStr(aStyleName.subView(aOutlineStr.getLength()));
505 aStyleName = SdResId(STR_PSEUDOSHEET_OUTLINE) + aNumStr;
506 }
507 }
508
509 pPseudoStyle = static_cast<SdStyleSheet*>(m_pPool->Find(aStyleName, SfxStyleFamily::Pseudo));
510 DBG_ASSERT(pPseudoStyle, "PseudoStyleSheet missing");
511
512 return pPseudoStyle;
513}
514
516{
517 // first, base class functionality
518 SfxStyleSheet::Notify(rBC, rHint);
519
520 if (nFamily != SfxStyleFamily::Pseudo)
521 return;
522
523 /* if the dummy gets a notify about a changed attribute, he takes care that
524 the actual meant style sheet sends broadcasts. */
525 if (rHint.GetId() == SfxHintId::DataChanged)
526 {
527 SdStyleSheet* pRealStyle = GetRealStyleSheet();
528 if (pRealStyle)
529 pRealStyle->Broadcast(rHint);
530 }
531}
532
541void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems)
542{
543 /* If not explicit set, adjust bullet width and text indent to new font
544 height. */
545 SfxStyleFamily eFamily = nFamily;
546 OUString aStyleName(aName);
547 if (eFamily == SfxStyleFamily::Pseudo)
548 {
549 SfxStyleSheet* pRealStyle = GetRealStyleSheet();
550 eFamily = pRealStyle->GetFamily();
551 aStyleName = pRealStyle->GetName();
552 }
553
554 if (!(eFamily == SfxStyleFamily::Page &&
555 aStyleName.indexOf(STR_LAYOUT_OUTLINE) != -1 &&
556 rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET))
557 return;
558
559 const SfxItemSet* pCurSet = &GetItemSet();
560 sal_uInt32 nNewHeight = rSet.Get(EE_CHAR_FONTHEIGHT).GetHeight();
561 sal_uInt32 nOldHeight = pCurSet->Get(EE_CHAR_FONTHEIGHT).GetHeight();
562
563 if (rSet.GetItemState(EE_PARA_BULLET) != SfxItemState::SET || !bOnlyMissingItems)
564 {
565 const SvxBulletItem& rBItem = pCurSet->Get(EE_PARA_BULLET);
566 double fBulletFraction = double(rBItem.GetWidth()) / nOldHeight;
567 SvxBulletItem aNewBItem(rBItem);
568 aNewBItem.SetWidth(static_cast<sal_uInt32>(fBulletFraction * nNewHeight));
569 rSet.Put(aNewBItem);
570 }
571
572 if (rSet.GetItemState(EE_PARA_LRSPACE) != SfxItemState::SET || !bOnlyMissingItems)
573 {
574 const SvxLRSpaceItem& rLRItem = pCurSet->Get(EE_PARA_LRSPACE);
575 double fIndentFraction = double(rLRItem.GetTextLeft()) / nOldHeight;
576 SvxLRSpaceItem aNewLRItem(rLRItem);
577 aNewLRItem.SetTextLeft(fIndentFraction * nNewHeight);
578 double fFirstIndentFraction = double(rLRItem.GetTextFirstLineOffset()) / nOldHeight;
579 aNewLRItem.SetTextFirstLineOffset(static_cast<short>(fFirstIndentFraction * nNewHeight));
580 rSet.Put(aNewLRItem);
581 }
582
583 if (rSet.GetItemState(EE_PARA_ULSPACE) != SfxItemState::SET || !bOnlyMissingItems)
584 {
585 const SvxULSpaceItem& rULItem = pCurSet->Get(EE_PARA_ULSPACE);
586 SvxULSpaceItem aNewULItem(rULItem);
587 double fLowerFraction = double(rULItem.GetLower()) / nOldHeight;
588 aNewULItem.SetLower(static_cast<sal_uInt16>(fLowerFraction * nNewHeight));
589 double fUpperFraction = double(rULItem.GetUpper()) / nOldHeight;
590 aNewULItem.SetUpper(static_cast<sal_uInt16>(fUpperFraction * nNewHeight));
591 rSet.Put(aNewULItem);
592 }
593}
594
596{
597 return false;
598}
599
601{
602 return true;
603}
604
606{
607 return true;
608}
609
610namespace
611{
612struct ApiNameMap
613{
614 std::u16string_view mpApiName;
615 sal_uInt32 mnHelpId;
616} const pApiNameMap[]
617 = { { std::u16string_view(u"title"), HID_PSEUDOSHEET_TITLE },
618 { std::u16string_view(u"subtitle"), HID_PSEUDOSHEET_SUBTITLE },
619 { std::u16string_view(u"background"), HID_PSEUDOSHEET_BACKGROUND },
620 { std::u16string_view(u"backgroundobjects"), HID_PSEUDOSHEET_BACKGROUNDOBJECTS },
621 { std::u16string_view(u"notes"), HID_PSEUDOSHEET_NOTES },
622 { std::u16string_view(u"standard"), HID_STANDARD_STYLESHEET_NAME },
623 { std::u16string_view(u"objectwithoutfill"), HID_POOLSHEET_OBJWITHOUTFILL },
624
625 { std::u16string_view(u"Text"), HID_POOLSHEET_TEXT },
626 { std::u16string_view(u"A4"), HID_POOLSHEET_A4 },
627 { std::u16string_view(u"Title A4"), HID_POOLSHEET_A4_TITLE },
628 { std::u16string_view(u"Heading A4"), HID_POOLSHEET_A4_HEADLINE },
629 { std::u16string_view(u"Text A4"), HID_POOLSHEET_A4_TEXT },
630 { std::u16string_view(u"A0"), HID_POOLSHEET_A0 },
631 { std::u16string_view(u"Title A0"), HID_POOLSHEET_A0_TITLE },
632 { std::u16string_view(u"Heading A0"), HID_POOLSHEET_A0_HEADLINE },
633 { std::u16string_view(u"Text A0"), HID_POOLSHEET_A0_TEXT },
634
635 { std::u16string_view(u"Graphic"), HID_POOLSHEET_GRAPHIC },
636 { std::u16string_view(u"Shapes"), HID_POOLSHEET_SHAPES },
637 { std::u16string_view(u"Filled"), HID_POOLSHEET_FILLED },
638 { std::u16string_view(u"Filled Blue"), HID_POOLSHEET_FILLED_BLUE },
639 { std::u16string_view(u"Filled Green"), HID_POOLSHEET_FILLED_GREEN },
640 { std::u16string_view(u"Filled Red"), HID_POOLSHEET_FILLED_RED },
641 { std::u16string_view(u"Filled Yellow"), HID_POOLSHEET_FILLED_YELLOW },
642 { std::u16string_view(u"Outlined"), HID_POOLSHEET_OUTLINE },
643 { std::u16string_view(u"Outlined Blue"), HID_POOLSHEET_OUTLINE_BLUE },
644 { std::u16string_view(u"Outlined Green"), HID_POOLSHEET_OUTLINE_GREEN },
645 { std::u16string_view(u"Outlined Red"), HID_POOLSHEET_OUTLINE_RED },
646 { std::u16string_view(u"Outlined Yellow"), HID_POOLSHEET_OUTLINE_YELLOW },
647 { std::u16string_view(u"Lines"), HID_POOLSHEET_LINES },
648 { std::u16string_view(u"Arrow Line"), HID_POOLSHEET_MEASURE },
649 { std::u16string_view(u"Arrow Dashed"), HID_POOLSHEET_LINES_DASHED }
650 };
651
652OUString GetApiNameForHelpId(sal_uLong nId)
653{
654 if ((nId >= HID_PSEUDOSHEET_OUTLINE1) && (nId <= HID_PSEUDOSHEET_OUTLINE9))
655 return "outline" + OUStringChar(sal_Unicode('1' + (nId - HID_PSEUDOSHEET_OUTLINE1)));
656
657 for (const auto& i : pApiNameMap)
658 if (nId == i.mnHelpId)
659 return OUString(i.mpApiName);
660
661 return OUString();
662}
663
664sal_uInt32 GetHelpIdForApiName(std::u16string_view sName)
665{
666 std::u16string_view sRest;
667 if (o3tl::starts_with(sName, u"outline", &sRest))
668 {
669 if (sRest.length() == 1)
670 {
671 sal_Unicode ch = sRest.front();
672 if ('1' <= ch && ch <= '9')
673 return HID_PSEUDOSHEET_OUTLINE1 + ch - '1';
674 }
675 // No other pre-defined names start with "outline"
676 return 0;
677 }
678
679 for (const auto& i : pApiNameMap)
680 if (sName == i.mpApiName)
681 return i.mnHelpId;
682
683 return 0;
684}
685}
686
687void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
688{
690
691 const OUString sNewApiName = GetApiNameForHelpId(nId);
692 if (!sNewApiName.isEmpty())
693 msApiName = sNewApiName;
694}
695
697{
698 switch( eFamily )
699 {
700 case SfxStyleFamily::Frame:
701 return "cell";
702 default:
703 OSL_FAIL( "SdStyleSheet::GetFamilyString(), illegal family!" );
704 [[fallthrough]];
705 case SfxStyleFamily::Para:
706 return "graphics";
707 }
708}
709
711{
712 if( !mxPool.is() )
713 throw DisposedException();
714}
715
717{
718 OUString aName;
719 sal_Int32 nIndex = 1;
720 do
721 {
722 aName = "user" + OUString::number( nIndex++ );
723 }
724 while( rPool.Find( aName, eFamily ) != nullptr );
725
726 return new SdStyleSheet(aName, rPool, eFamily, SfxStyleSearchBits::UserDefined);
727}
728
729// XInterface
730
731void SAL_CALL SdStyleSheet::release( ) noexcept
732{
733 if (osl_atomic_decrement( &m_refCount ) != 0)
734 return;
735
736 // restore reference count:
737 osl_atomic_increment( &m_refCount );
738 if (! m_bDisposed) try
739 {
740 dispose();
741 }
742 catch (RuntimeException const&)
743 {
744 // don't break throw ()
745 TOOLS_WARN_EXCEPTION( "sd", "" );
746 }
747 OSL_ASSERT( m_bDisposed );
748 SdStyleSheetBase::release();
749}
750
751// XComponent
752
753void SAL_CALL SdStyleSheet::dispose( )
754{
755 {
756 std::unique_lock aGuard(m_aMutex);
758 return;
759
760 m_bInDispose = true;
761 }
762 try
763 {
764 std::unique_lock aGuard(m_aMutex);
765 // side effect: keeping a reference to this
766 EventObject aEvt( static_cast< OWeakObject * >( this ) );
767 try
768 {
769 maModifyListeners.disposeAndClear( aGuard, aEvt );
770 maEventListeners.disposeAndClear( aGuard, aEvt );
771 disposing();
772 }
773 catch (...)
774 {
775 // bDisposed and bInDispose must be set in this order:
776 m_bDisposed = true;
777 m_bInDispose = false;
778 throw;
779 }
780 // bDisposed and bInDispose must be set in this order:
781 m_bDisposed = true;
782 m_bInDispose = false;
783 }
784 catch (RuntimeException &)
785 {
786 throw;
787 }
788 catch (const Exception & exc)
789 {
790 css::uno::Any anyEx = cppu::getCaughtException();
791 throw css::lang::WrappedTargetRuntimeException(
792 "unexpected UNO exception caught: " + exc.Message ,
793 nullptr, anyEx );
794 }
795}
796
798{
799 SolarMutexGuard aGuard;
800 if (bMySet)
801 {
802 delete pSet;
803 }
804 pSet = nullptr;
805 m_pPool = nullptr;
806 mxPool.clear();
807}
808
809void SAL_CALL SdStyleSheet::addEventListener( const Reference< XEventListener >& xListener )
810{
811 std::unique_lock aGuard( m_aMutex );
813 {
814 aGuard.unlock();
815 EventObject aEvt( static_cast< OWeakObject * >( this ) );
816 xListener->disposing( aEvt );
817 }
818 else
819 {
820 maEventListeners.addInterface( aGuard, xListener );
821 }
822}
823
824void SAL_CALL SdStyleSheet::removeEventListener( const Reference< XEventListener >& xListener )
825{
826 std::unique_lock aGuard( m_aMutex );
827 maEventListeners.removeInterface( aGuard, xListener );
828}
829
830// XModifyBroadcaster
831
832void SAL_CALL SdStyleSheet::addModifyListener( const Reference< XModifyListener >& xListener )
833{
834 std::unique_lock aGuard( m_aMutex );
836 {
837 aGuard.unlock();
838 EventObject aEvt( static_cast< OWeakObject * >( this ) );
839 xListener->disposing( aEvt );
840 }
841 else
842 {
845 maModifyListeners.addInterface( aGuard, xListener );
846 }
847}
848
849void SAL_CALL SdStyleSheet::removeModifyListener( const Reference< XModifyListener >& xListener )
850{
851 std::unique_lock aGuard( m_aMutex );
852 maModifyListeners.removeInterface( aGuard, xListener );
853}
854
856{
857 std::unique_lock aGuard( m_aMutex );
858
859 if( maModifyListeners.getLength(aGuard) )
860 {
861 EventObject aEvt( static_cast< OWeakObject * >( this ) );
862 maModifyListeners.notifyEach(aGuard, &XModifyListener::modified, aEvt);
863 }
864}
865
866// XServiceInfo
868{
869 return "SdStyleSheet";
870}
871
872sal_Bool SAL_CALL SdStyleSheet::supportsService( const OUString& ServiceName )
873{
874 return cppu::supportsService( this, ServiceName );
875}
876
877Sequence< OUString > SAL_CALL SdStyleSheet::getSupportedServiceNames()
878{
879 return { "com.sun.star.style.Style",
880 "com.sun.star.drawing.FillProperties",
881 "com.sun.star.drawing.LineProperties",
882 "com.sun.star.drawing.ShadowProperties",
883 "com.sun.star.drawing.ConnectorProperties",
884 "com.sun.star.drawing.MeasureProperties",
885 "com.sun.star.style.ParagraphProperties",
886 "com.sun.star.style.CharacterProperties",
887 "com.sun.star.drawing.TextProperties",
888 "com.sun.star.drawing.Text" };
889}
890
891bool SdStyleSheet::SetName(const OUString& rNewName, bool bReindexNow)
892{
893 const bool bResult = SfxUnoStyleSheet::SetName(rNewName, bReindexNow);
894 // Don't overwrite predefined API names
895 if (bResult && GetHelpIdForApiName(msApiName) == 0)
896 {
897 msApiName = rNewName;
898 Broadcast(SfxHint(SfxHintId::DataChanged));
899 }
900 return bResult;
901}
902
903// XNamed
904OUString SAL_CALL SdStyleSheet::getName()
905{
906 SolarMutexGuard aGuard;
908 return GetApiName();
909}
910
911void SAL_CALL SdStyleSheet::setName( const OUString& rName )
912{
913 SolarMutexGuard aGuard;
915 SetName(rName);
916}
917
918// XStyle
919
921{
922 SolarMutexGuard aGuard;
924 return IsUserDefined();
925}
926
928{
929 SolarMutexGuard aGuard;
931 return IsUsed();
932}
933
935{
936 SolarMutexGuard aGuard;
938
939 if( !GetParent().isEmpty() )
940 {
941 SdStyleSheet* pParentStyle = static_cast< SdStyleSheet* >( mxPool->Find( GetParent(), nFamily ) );
942 if( pParentStyle )
943 return pParentStyle->GetApiName();
944 }
945 return OUString();
946}
947
948void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName )
949{
950 SolarMutexGuard aGuard;
952
953 if( !rParentName.isEmpty() )
954 {
955 OUString const name(GetName());
956 sal_Int32 const sep(name.indexOf(SD_LT_SEPARATOR));
957 OUString const master((sep == -1) ? OUString() : name.copy(0, sep));
958 std::shared_ptr<SfxStyleSheetIterator> aSSSI = std::make_shared<SfxStyleSheetIterator>(mxPool.get(), nFamily);
959 for (SfxStyleSheetBase *pStyle = aSSSI->First(); pStyle; pStyle = aSSSI->Next())
960 {
961 // we hope that we have only sd style sheets
962 SdStyleSheet* pSdStyleSheet = static_cast<SdStyleSheet*>(pStyle);
963 OUString const curName(pStyle->GetName());
964 sal_Int32 const curSep(curName.indexOf(SD_LT_SEPARATOR));
965 OUString const curMaster((curSep == -1)
966 ? OUString() : curName.copy(0, curSep));
967 // check that the master matches, as msApiName exists once per
968 // master page
969 if (pSdStyleSheet->msApiName == rParentName && master == curMaster)
970 {
971 if( pStyle != this )
972 {
973 SetParent(curName);
974 }
975 return;
976 }
977 }
978 throw NoSuchElementException();
979 }
980 else
981 {
982 SetParent( rParentName );
983 }
984}
985
986// XPropertySet/XMultiPropertySet utility functions
987
988// Does not broadcast
989// Must be guarded by solar mutex; must not be disposed
990void SdStyleSheet::setPropertyValue_Impl(const OUString& aPropertyName, const css::uno::Any& aValue)
991{
992 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( aPropertyName );
993 if( pEntry == nullptr )
994 {
995 throw UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(this));
996 }
997
998 if( pEntry->nWID == WID_STYLE_HIDDEN )
999 {
1000 bool bValue = false;
1001 if ( aValue >>= bValue )
1002 SetHidden( bValue );
1003 return;
1004 }
1005 if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
1006 return; // not yet implemented for styles
1007
1008 if( pEntry->nWID == WID_STYLE_FAMILY )
1009 throw PropertyVetoException();
1010
1011 if( (pEntry->nWID == EE_PARA_NUMBULLET) && (GetFamily() == SfxStyleFamily::Page) )
1012 {
1013 OUString aStr;
1014 const sal_uInt32 nTempHelpId = GetHelpId( aStr );
1015
1016 if( (nTempHelpId >= HID_PSEUDOSHEET_OUTLINE2) && (nTempHelpId <= HID_PSEUDOSHEET_OUTLINE9) )
1017 return;
1018 }
1019
1020 SfxItemSet &rStyleSet = GetItemSet();
1021
1022 if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
1023 {
1025 if( aValue >>= eMode )
1026 {
1027 rStyleSet.Put( XFillBmpStretchItem( eMode == BitmapMode_STRETCH ) );
1028 rStyleSet.Put( XFillBmpTileItem( eMode == BitmapMode_REPEAT ) );
1029 return;
1030 }
1031 throw IllegalArgumentException();
1032 }
1033
1034 if (pEntry->nWID == OWN_ATTR_TEXTCOLUMNS)
1035 {
1036 if (css::uno::Reference<css::text::XTextColumns> xColumns; aValue >>= xColumns)
1037 {
1038 rStyleSet.Put(SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER, xColumns->getColumnCount()));
1039 if (css::uno::Reference<css::beans::XPropertySet> xPropSet{ xColumns,
1040 css::uno::UNO_QUERY })
1041 {
1042 auto aVal = xPropSet->getPropertyValue("AutomaticDistance");
1043 if (sal_Int32 nSpacing; aVal >>= nSpacing)
1044 rStyleSet.Put(SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING, nSpacing));
1045 }
1046 return;
1047 }
1048 throw IllegalArgumentException();
1049 }
1050
1051 SfxItemSet aSet( GetPool()->GetPool(), pEntry->nWID, pEntry->nWID);
1052 aSet.Put( rStyleSet );
1053
1054 if( !aSet.Count() )
1055 {
1056 if( EE_PARA_NUMBULLET == pEntry->nWID )
1057 {
1058 vcl::Font aBulletFont;
1059 SdStyleSheetPool::PutNumBulletItem( this, aBulletFont );
1060 aSet.Put( rStyleSet );
1061 }
1062 else
1063 {
1064 aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
1065 }
1066 }
1067
1068 if( pEntry->nMemberId == MID_NAME &&
1069 ( pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT ||
1070 pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ||
1071 pEntry->nWID == XATTR_LINESTART || pEntry->nWID == XATTR_LINEEND || pEntry->nWID == XATTR_LINEDASH) )
1072 {
1073 OUString aTempName;
1074 if(!(aValue >>= aTempName ))
1075 throw IllegalArgumentException();
1076
1077 SvxShape::SetFillAttribute( pEntry->nWID, aTempName, aSet );
1078 }
1079 else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( pEntry, aValue, aSet ))
1080 {
1081 SvxItemPropertySet_setPropertyValue( pEntry, aValue, aSet );
1082 }
1083
1084 rStyleSet.Put( aSet );
1085}
1086
1087// Must be guarded by solar mutex; must not be disposed
1088css::uno::Any SdStyleSheet::getPropertyValue_Impl(const OUString& PropertyName)
1089{
1090 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( PropertyName );
1091 if( pEntry == nullptr )
1092 {
1093 throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this));
1094 }
1095
1096 Any aAny;
1097
1098 if( pEntry->nWID == WID_STYLE_FAMILY )
1099 {
1100 if( nFamily == SfxStyleFamily::Page )
1101 {
1102 const OUString aLayoutName( GetName() );
1103 aAny <<= aLayoutName.copy( 0, aLayoutName.indexOf( SD_LT_SEPARATOR) );
1104 }
1105 else
1106 {
1107 aAny <<= GetFamilyString(nFamily);
1108 }
1109 }
1110 else if( pEntry->nWID == WID_STYLE_DISPNAME )
1111 {
1112 OUString aDisplayName;
1113 if ( nFamily == SfxStyleFamily::Page )
1114 {
1115 const SdStyleSheet* pStyleSheet = GetPseudoStyleSheet();
1116 if (pStyleSheet != nullptr)
1117 aDisplayName = pStyleSheet->GetName();
1118 }
1119
1120 if (aDisplayName.isEmpty())
1121 aDisplayName = GetName();
1122
1123 aAny <<= aDisplayName;
1124 }
1125 else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
1126 {
1127 aAny <<= false;
1128 }
1129 else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
1130 {
1131 SfxItemSet &rStyleSet = GetItemSet();
1132
1133 const XFillBmpStretchItem* pStretchItem = rStyleSet.GetItem<XFillBmpStretchItem>(XATTR_FILLBMP_STRETCH);
1134 const XFillBmpTileItem* pTileItem = rStyleSet.GetItem<XFillBmpTileItem>(XATTR_FILLBMP_TILE);
1135
1136 if( pStretchItem && pTileItem )
1137 {
1138 if( pTileItem->GetValue() )
1139 aAny <<= BitmapMode_REPEAT;
1140 else if( pStretchItem->GetValue() )
1141 aAny <<= BitmapMode_STRETCH;
1142 else
1143 aAny <<= BitmapMode_NO_REPEAT;
1144 }
1145 }
1146 else if( pEntry->nWID == WID_STYLE_HIDDEN )
1147 {
1148 aAny <<= IsHidden( );
1149 }
1150 else if (pEntry->nWID == OWN_ATTR_TEXTCOLUMNS)
1151 {
1152 const SfxItemSet& rStyleSet = GetItemSet();
1153
1154 auto xIf = SvxXTextColumns_createInstance();
1155 css::uno::Reference<css::text::XTextColumns> xCols(xIf, css::uno::UNO_QUERY_THROW);
1156 xCols->setColumnCount(rStyleSet.Get(SDRATTR_TEXTCOLUMNS_NUMBER).GetValue());
1157 css::uno::Reference<css::beans::XPropertySet> xProp(xIf, css::uno::UNO_QUERY_THROW);
1158 xProp->setPropertyValue(
1159 "AutomaticDistance",
1160 css::uno::Any(rStyleSet.Get(SDRATTR_TEXTCOLUMNS_SPACING).GetValue()));
1161 aAny <<= xIf;
1162 }
1163 else
1164 {
1165 SfxItemSet aSet( GetPool()->GetPool(), pEntry->nWID, pEntry->nWID);
1166
1167 const SfxPoolItem* pItem;
1168 SfxItemSet& rStyleSet = GetItemSet();
1169
1170 if( rStyleSet.GetItemState( pEntry->nWID, true, &pItem ) == SfxItemState::SET )
1171 aSet.Put( *pItem );
1172
1173 if( !aSet.Count() )
1174 aSet.Put( GetPool()->GetPool().GetDefaultItem( pEntry->nWID ) );
1175
1176 if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pEntry, aAny ))
1177 return aAny;
1178
1179 // Get value of ItemSet
1180 aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
1181 }
1182
1183 if( pEntry->aType != aAny.getValueType() )
1184 {
1185 // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
1186 if( ( pEntry->aType == ::cppu::UnoType<sal_Int16>::get()) && aAny.getValueType() == ::cppu::UnoType<sal_Int32>::get() )
1187 {
1188 sal_Int32 nValue = 0;
1189 aAny >>= nValue;
1190 aAny <<= static_cast<sal_Int16>(nValue);
1191 }
1192 else
1193 {
1194 OSL_FAIL("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" );
1195 }
1196 }
1197
1198 return aAny;
1199}
1200
1201// XPropertySet
1202
1203Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo()
1204{
1206 static Reference< XPropertySetInfo > xInfo = GetStylePropertySet().getPropertySetInfo();
1207 return xInfo;
1208}
1209
1210void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
1211{
1212 SolarMutexGuard aGuard;
1214
1215 setPropertyValue_Impl(aPropertyName, aValue);
1216 Broadcast(SfxHint(SfxHintId::DataChanged));
1217}
1218
1219Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
1220{
1221 SolarMutexGuard aGuard;
1223
1224 return getPropertyValue_Impl(PropertyName);
1225}
1226
1227void SAL_CALL SdStyleSheet::addPropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
1228void SAL_CALL SdStyleSheet::removePropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
1229void SAL_CALL SdStyleSheet::addVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
1230void SAL_CALL SdStyleSheet::removeVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
1231
1232// XMultiPropertySet
1233
1234void SAL_CALL SdStyleSheet::setPropertyValues(const css::uno::Sequence<OUString>& aPropertyNames,
1235 const css::uno::Sequence<css::uno::Any>& aValues)
1236{
1237 const sal_Int32 nCount = aPropertyNames.getLength();
1238
1239 if (nCount != aValues.getLength())
1240 throw css::lang::IllegalArgumentException();
1241
1242 if (!nCount)
1243 return;
1244
1245 SolarMutexGuard aGuard;
1247
1248 for (sal_Int32 i = 0; i < nCount; ++i)
1249 {
1250 try
1251 {
1252 setPropertyValue_Impl(aPropertyNames[i], aValues[i]);
1253 }
1254 catch (const css::beans::UnknownPropertyException&)
1255 {
1257 }
1258 }
1259
1260 Broadcast(SfxHint(SfxHintId::DataChanged));
1261}
1262
1263css::uno::Sequence<css::uno::Any>
1264SAL_CALL SdStyleSheet::getPropertyValues(const css::uno::Sequence<OUString>& aPropertyNames)
1265{
1266 SolarMutexGuard aGuard;
1268
1269 const sal_Int32 nCount = aPropertyNames.getLength();
1270 css::uno::Sequence<css::uno::Any> aValues(nCount);
1271 Any* pAny = aValues.getArray();
1272
1273 for (sal_Int32 i = 0; i < nCount; ++i)
1274 pAny[i] = getPropertyValue_Impl(aPropertyNames[i]);
1275
1276 return aValues;
1277}
1278
1279void SAL_CALL SdStyleSheet::addPropertiesChangeListener(const css::uno::Sequence<OUString>&, const css::uno::Reference<css::beans::XPropertiesChangeListener>&) {}
1280void SAL_CALL SdStyleSheet::removePropertiesChangeListener(const css::uno::Reference<css::beans::XPropertiesChangeListener>&) {}
1281void SAL_CALL SdStyleSheet::firePropertiesChangeEvent(const css::uno::Sequence<OUString>&, const css::uno::Reference<css::beans::XPropertiesChangeListener>&) {}
1282
1283// XPropertyState
1284
1285PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyName )
1286{
1287 SolarMutexGuard aGuard;
1288
1290
1291 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( PropertyName );
1292
1293 if( pEntry == nullptr )
1294 throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this));
1295
1296 if( pEntry->nWID == WID_STYLE_FAMILY )
1297 {
1298 return PropertyState_DIRECT_VALUE;
1299 }
1300 else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
1301 {
1302 return PropertyState_DEFAULT_VALUE;
1303 }
1304 else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
1305 {
1306 const SfxItemSet& rSet = GetItemSet();
1307
1308 if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET ||
1309 rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET )
1310 {
1311 return PropertyState_DIRECT_VALUE;
1312 }
1313 else
1314 {
1315 return PropertyState_AMBIGUOUS_VALUE;
1316 }
1317 }
1318 else if (pEntry->nWID == OWN_ATTR_TEXTCOLUMNS)
1319 {
1320 const SfxItemSet& rSet = GetItemSet();
1321
1322 const auto eState1 = rSet.GetItemState(SDRATTR_TEXTCOLUMNS_NUMBER, false);
1323 const auto eState2 = rSet.GetItemState(SDRATTR_TEXTCOLUMNS_SPACING, false);
1324 if (eState1 == SfxItemState::SET || eState2 == SfxItemState::SET)
1325 return PropertyState_DIRECT_VALUE;
1326 else if (eState1 == SfxItemState::DEFAULT && eState2 == SfxItemState::DEFAULT)
1327 return PropertyState_DEFAULT_VALUE;
1328 else
1329 return PropertyState_AMBIGUOUS_VALUE;
1330 }
1331 else
1332 {
1333 SfxItemSet &rStyleSet = GetItemSet();
1334
1335 PropertyState eState;
1336
1337 switch( rStyleSet.GetItemState( pEntry->nWID, false ) )
1338 {
1339 case SfxItemState::SET:
1340 eState = PropertyState_DIRECT_VALUE;
1341 break;
1342 case SfxItemState::DEFAULT:
1343 eState = PropertyState_DEFAULT_VALUE;
1344 break;
1345 default:
1346 eState = PropertyState_AMBIGUOUS_VALUE;
1347 break;
1348 }
1349
1350 // if an item is set, this doesn't mean we want it :)
1351 if( PropertyState_DIRECT_VALUE == eState )
1352 {
1353 switch( pEntry->nWID )
1354 {
1355 case XATTR_FILLBITMAP:
1356 case XATTR_FILLGRADIENT:
1357 case XATTR_FILLHATCH:
1359 case XATTR_LINEEND:
1360 case XATTR_LINESTART:
1361 case XATTR_LINEDASH:
1362 {
1363 const NameOrIndex* pItem = rStyleSet.GetItem<NameOrIndex>(pEntry->nWID);
1364 if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
1365 eState = PropertyState_DEFAULT_VALUE;
1366 }
1367 break;
1368 case XATTR_FILLCOLOR:
1369 if (pEntry->nMemberId == MID_COLOR_THEME_INDEX)
1370 {
1371 const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
1373 {
1374 eState = PropertyState_DEFAULT_VALUE;
1375 }
1376 }
1377 else if (pEntry->nMemberId == MID_COLOR_LUM_MOD)
1378 {
1379 const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
1380 sal_Int16 nLumMod = 10000;
1381 for (auto const& rTransform : pColor->getComplexColor().getTransformations())
1382 {
1383 if (rTransform.meType == model::TransformationType::LumMod)
1384 nLumMod = rTransform.mnValue;
1385 }
1386 if (nLumMod == 10000)
1387 {
1388 eState = PropertyState_DEFAULT_VALUE;
1389 }
1390 }
1391 else if (pEntry->nMemberId == MID_COLOR_LUM_OFF)
1392 {
1393 const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
1394 sal_Int16 nLumOff = 0;
1395 for (auto const& rTransform : pColor->getComplexColor().getTransformations())
1396 {
1397 if (rTransform.meType == model::TransformationType::LumOff)
1398 nLumOff = rTransform.mnValue;
1399 }
1400 if (nLumOff == 0)
1401 {
1402 eState = PropertyState_DEFAULT_VALUE;
1403 }
1404 }
1405 else if (pEntry->nMemberId == MID_COMPLEX_COLOR)
1406 {
1407 auto const* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
1408 if (pColor->getComplexColor().getType() == model::ColorType::Unused)
1409 {
1410 eState = PropertyState_DEFAULT_VALUE;
1411 }
1412 }
1413 break;
1414 case XATTR_LINECOLOR:
1415 if (pEntry->nMemberId == MID_COMPLEX_COLOR)
1416 {
1417 auto const* pColor = rStyleSet.GetItem<XLineColorItem>(pEntry->nWID);
1418 if (pColor->getComplexColor().getType() == model::ColorType::Unused)
1419 {
1420 eState = PropertyState_DEFAULT_VALUE;
1421 }
1422 }
1423 break;
1424 }
1425 }
1426
1427 return eState;
1428 }
1429}
1430
1431Sequence< PropertyState > SAL_CALL SdStyleSheet::getPropertyStates( const Sequence< OUString >& aPropertyName )
1432{
1433 SolarMutexGuard aGuard;
1434
1436
1437 sal_Int32 nCount = aPropertyName.getLength();
1438
1439 Sequence< PropertyState > aPropertyStateSequence( nCount );
1440
1441 std::transform(aPropertyName.begin(), aPropertyName.end(), aPropertyStateSequence.getArray(),
1442 [this](const OUString& rName) -> PropertyState { return getPropertyState(rName); });
1443
1444 return aPropertyStateSequence;
1445}
1446
1447void SAL_CALL SdStyleSheet::setPropertyToDefault( const OUString& PropertyName )
1448{
1449 SolarMutexGuard aGuard;
1450
1452
1453 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( PropertyName );
1454 if( pEntry == nullptr )
1455 throw UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this));
1456
1457 SfxItemSet &rStyleSet = GetItemSet();
1458
1459 if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
1460 {
1461 rStyleSet.ClearItem( XATTR_FILLBMP_STRETCH );
1462 rStyleSet.ClearItem( XATTR_FILLBMP_TILE );
1463 }
1464 else
1465 {
1466 rStyleSet.ClearItem( pEntry->nWID );
1467 }
1468 Broadcast(SfxHint(SfxHintId::DataChanged));
1469}
1470
1471Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName )
1472{
1473 SolarMutexGuard aGuard;
1474
1476
1477 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( aPropertyName );
1478 if( pEntry == nullptr )
1479 throw UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(this));
1480 Any aRet;
1481 if( pEntry->nWID == WID_STYLE_FAMILY )
1482 {
1483 aRet <<= GetFamilyString(nFamily);
1484 }
1485 else if( pEntry->nWID == SDRATTR_TEXTDIRECTION )
1486 {
1487 aRet <<= false;
1488 }
1489 else if( pEntry->nWID == OWN_ATTR_FILLBMP_MODE )
1490 {
1491 aRet <<= BitmapMode_REPEAT;
1492 }
1493 else
1494 {
1495 SfxItemPool& rMyPool = GetPool()->GetPool();
1496 SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID);
1497 aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
1498 aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
1499 }
1500 return aRet;
1501}
1502
1504const SfxItemPropertyMapEntry* SdStyleSheet::getPropertyMapEntry( std::u16string_view rPropertyName )
1505{
1506 return GetStylePropertySet().getPropertyMapEntry(rPropertyName);
1507}
1508
1509//Broadcast that a SdStyleSheet has changed, taking into account outline sublevels
1510//which need to be explicitly broadcast as changing if their parent style was
1511//the one that changed
1514{
1515 SdStyleSheet* pRealSheet = static_cast<SdStyleSheet const *>(pStyleSheet)->GetRealStyleSheet();
1516 pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
1517
1519 return;
1520
1521 OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " ");
1522
1523 for( sal_uInt16 n = static_cast<sal_uInt16>(ePO) - static_cast<sal_uInt16>(PresentationObjects::Outline_1) + 2; n < 10; n++ )
1524 {
1525 OUString aName( sStyleName + OUString::number(n) );
1526
1527 SfxStyleSheetBase* pSheet = pSSPool->Find( aName, SfxStyleFamily::Pseudo);
1528
1529 if(pSheet)
1530 {
1531 SdStyleSheet* pRealStyleSheet = static_cast<SdStyleSheet*>(pSheet)->GetRealStyleSheet();
1532 pRealStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
1533 }
1534 }
1535}
1536
1537/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxXTextColumns_createInstance() noexcept
ModifyListenerForwarder(SdStyleSheet *pStyleSheet)
Definition: stlsheet.cxx:127
SdStyleSheet * mpStyleSheet
Definition: stlsheet.cxx:124
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: stlsheet.cxx:137
OUString const & GetName() const
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
Definition: drawdoc2.cxx:207
virtual OUString GetLayoutName() const override
Definition: sdpage.hxx:255
static void PutNumBulletItem(SfxStyleSheetBase *pSheet, vcl::Font &rBulletFont)
Definition: stlpool.cxx:1059
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: stlsheet.cxx:832
virtual OUString SAL_CALL getImplementationName() override
Definition: stlsheet.cxx:867
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: stlsheet.cxx:877
void disposing()
Definition: stlsheet.cxx:797
OUString msApiName
Definition: stlsheet.hxx:161
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
Definition: stlsheet.cxx:1285
bool m_bInDispose
Definition: stlsheet.hxx:158
void notifyModifyListener()
Definition: stlsheet.cxx:855
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: stlsheet.cxx:1279
OUString const & GetApiName() const
Definition: stlsheet.cxx:161
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: stlsheet.cxx:849
virtual OUString SAL_CALL getName() override
Definition: stlsheet.cxx:904
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: stlsheet.cxx:1219
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Definition: stlsheet.cxx:809
void throwIfDisposed()
Definition: stlsheet.cxx:710
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: stlsheet.cxx:872
SdStyleSheet * GetRealStyleSheet() const
Determine the style sheet for which this dummy is for.
Definition: stlsheet.cxx:360
virtual void SAL_CALL setName(const OUString &aName) override
Definition: stlsheet.cxx:911
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
Definition: stlsheet.cxx:1447
virtual void SetHelpId(const OUString &r, sal_uLong nId) override
Definition: stlsheet.cxx:687
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: stlsheet.cxx:1281
SdStyleSheet * GetPseudoStyleSheet() const
Determine pseudo style sheet which stands for this style sheet.
Definition: stlsheet.cxx:466
SdStyleSheet(const OUString &rDisplayName, SfxStyleSheetBasePool &rPool, SfxStyleFamily eFamily, SfxStyleSearchBits nMask)
Definition: stlsheet.cxx:143
static OUString GetFamilyString(SfxStyleFamily eFamily)
Definition: stlsheet.cxx:696
virtual bool SetParent(const OUString &rParentName) override
Definition: stlsheet.cxx:169
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: stlsheet.cxx:1229
virtual bool HasParentSupport() const override
Definition: stlsheet.cxx:600
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: stlsheet.cxx:1264
virtual void SAL_CALL setParentStyle(const OUString &aParentStyle) override
Definition: stlsheet.cxx:948
bool IsEditable()
Checks if a cell style is used in two places at once.
Definition: stlsheet.cxx:331
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maEventListeners
Definition: stlsheet.hxx:160
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true) override
Definition: stlsheet.cxx:891
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: stlsheet.cxx:515
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
Definition: stlsheet.cxx:1431
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: stlsheet.cxx:1210
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: stlsheet.cxx:1280
virtual SfxItemSet & GetItemSet() override
create if necessary and return ItemSets
Definition: stlsheet.cxx:207
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: stlsheet.cxx:1234
virtual void SAL_CALL dispose() override
Definition: stlsheet.cxx:753
comphelper::OInterfaceContainerHelper4< css::util::XModifyListener > maModifyListeners
Definition: stlsheet.hxx:159
virtual sal_Bool SAL_CALL isUserDefined() override
Definition: stlsheet.cxx:920
void AdjustToFontHeight(SfxItemSet &rSet, bool bOnlyMissingItems=true)
Adjust the bullet width and the left text indent of the provided ItemSets to their font height.
Definition: stlsheet.cxx:541
std::mutex m_aMutex
Definition: stlsheet.hxx:156
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: stlsheet.cxx:1230
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: stlsheet.cxx:1203
static rtl::Reference< SdStyleSheet > CreateEmptyUserStyle(SfxStyleSheetBasePool &rPool, SfxStyleFamily eFamily)
Definition: stlsheet.cxx:716
virtual ~SdStyleSheet() override
Definition: stlsheet.cxx:150
void setPropertyValue_Impl(const OUString &aPropertyName, const css::uno::Any &aValue)
Definition: stlsheet.cxx:990
css::uno::Any getPropertyValue_Impl(const OUString &PropertyName)
Definition: stlsheet.cxx:1088
void SetApiName(const OUString &rApiName)
Definition: stlsheet.cxx:156
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: stlsheet.cxx:1228
virtual bool HasFollowSupport() const override
Definition: stlsheet.cxx:595
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: stlsheet.cxx:824
virtual bool IsUsed() const override
A template is used when it is referenced by inserted object or by a used template.
Definition: stlsheet.cxx:282
rtl::Reference< SfxStyleSheetBasePool > mxPool
Definition: stlsheet.hxx:162
virtual OUString SAL_CALL getParentStyle() override
Definition: stlsheet.cxx:934
virtual bool HasClearParentSupport() const override
Definition: stlsheet.cxx:605
virtual sal_Bool SAL_CALL isInUse() override
Definition: stlsheet.cxx:927
static void BroadcastSdStyleSheetChange(SfxStyleSheetBase const *pStyleSheet, PresentationObjects ePO, SfxStyleSheetBasePool *pSSPool)
Definition: stlsheet.cxx:1512
std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder
Definition: stlsheet.hxx:164
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: stlsheet.cxx:1227
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
Definition: stlsheet.cxx:1471
static const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rPropertyName)
this is used because our property map is not sorted yet
Definition: stlsheet.cxx:1504
virtual void SAL_CALL release() noexcept override
Definition: stlsheet.cxx:731
bool m_bDisposed
Definition: stlsheet.hxx:157
static SdrItemPool & GetGlobalDrawObjectItemPool()
SfxHintId GetId() const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
void SetParent(const SfxItemSet *pNew)
sal_uInt16 Count() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual void SetHelpId(const OUString &r, sal_uLong nId)
virtual SfxItemSet & GetItemSet()
virtual sal_Int32 Count()
virtual SfxStyleSheetBase * First()
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual bool SetParent(const OUString &) override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
void SetWidth(tools::Long nNew)
tools::Long GetWidth() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rName) const
short GetTextFirstLineOffset() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
static bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName, SfxItemSet &rSet, SdrModel const *pModel)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
sal_uInt16 GetUpper() const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
sal_uInt16 GetLower() const
const model::ComplexColor & getComplexColor() const
std::vector< css::uno::Reference< ListenerT > > getElements(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(std::unique_lock< std::mutex > &rGuard, void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event) const
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
css::uno::Type const & get()
std::vector< Transformation > const & getTransformations() const
ThemeColorType getSchemeType() const
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
virtual SdPage * getCurrentPage() const override
inherited from sd::ViewShell
Definition: drviews1.cxx:636
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
std::shared_ptr< ViewShell > GetMainViewShell() const
Return the main view shell stacked on the called ViewShellBase object.
SdDrawDocument * GetDoc() const
Definition: viewshel.cxx:1412
int nCount
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
virtual OUString GetName() const override
ULONG m_refCount
float u
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxULSpaceItem > EE_PARA_ULSPACE(EE_PARA_START+14)
constexpr sal_uInt16 EE_PARA_START(EE_ITEMS_START+0)
constexpr TypedWhichId< SvxLRSpaceItem > EE_PARA_LRSPACE(EE_PARA_START+13)
constexpr TypedWhichId< SvxBulletItem > EE_PARA_BULLET(EE_PARA_START+12)
constexpr sal_uInt16 EE_CHAR_END(EE_CHAR_START+32)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
constexpr OUStringLiteral IsHidden(u"IsHidden")
sal_Int16 nValue
constexpr OUStringLiteral SD_LT_SEPARATOR
Definition: glob.hxx:49
const char * name
sal_Int32 nIndex
OUString aName
Mode eMode
sal_Int64 n
sal_uInt16 nPos
#define BOTTOM_BORDER
#define TOP_BORDER
#define RIGHT_BORDER
#define MID_COLOR_LUM_MOD
#define MID_COMPLEX_COLOR
#define MID_NAME
#define MID_COLOR_THEME_INDEX
#define LEFT_BORDER
#define MID_COLOR_LUM_OFF
aStr
@ Exception
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
int i
BitmapMode
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
sal_Int16 nId
PresentationObjects
Definition: prlayout.hxx:29
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
static SfxItemSet & rSet
sal_uIntPtr sal_uLong
#define WID_STYLE_FAMILY
Definition: stlsheet.cxx:86
#define WID_STYLE_DISPNAME
Definition: stlsheet.cxx:85
static SvxItemPropertySet & GetStylePropertySet()
Definition: stlsheet.cxx:88
#define WID_STYLE_HIDDEN
Definition: stlsheet.cxx:84
cppu::ImplInheritanceHelper< SfxUnoStyleSheet, css::beans::XPropertySet, css::beans::XMultiPropertySet, css::lang::XServiceInfo, css::beans::XPropertyState, css::util::XModifyBroadcaster, css::lang::XComponent > SdStyleSheetBase
Definition: stlsheet.hxx:44
constexpr OUStringLiteral STR_LAYOUT_TITLE
Definition: strings.hxx:15
constexpr OUStringLiteral STR_LAYOUT_OUTLINE
Definition: strings.hxx:16
constexpr OUStringLiteral STR_LAYOUT_SUBTITLE
Definition: strings.hxx:20
constexpr OUStringLiteral STR_LAYOUT_BACKGROUNDOBJECTS
Definition: strings.hxx:18
constexpr OUStringLiteral STR_LAYOUT_NOTES
Definition: strings.hxx:19
constexpr OUStringLiteral STR_LAYOUT_BACKGROUND
Definition: strings.hxx:17
css::uno::Type aType
SfxStyleFamily
SfxStyleSearchBits
constexpr sal_uInt16 SDRATTR_TABLE_FIRST(SDRATTR_CUSTOMSHAPE_LAST+1)
constexpr sal_uInt16 SDRATTR_MEASURE_LAST(SDRATTR_MEASUREDECIMALPLACES)
constexpr TypedWhichId< SvXMLAttrContainerItem > SDRATTR_XMLATTRIBUTES(SDRATTR_MISC_FIRST+22)
constexpr sal_uInt16 SDRATTR_3D_FIRST(SDRATTR_GRAF_LAST+1)
constexpr sal_uInt16 SDRATTR_3D_LAST(SDRATTR_3DSCENE_LAST)
constexpr sal_uInt16 SDRATTR_SHADOW_FIRST(XATTR_END+1)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_WORDWRAP(SDRATTR_MISC_FIRST+24)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_MINFRAMEHEIGHT(SDRATTR_MISC_FIRST+1)
constexpr sal_uInt16 SDRATTR_TABLE_LAST(SDRATTR_TABLE_CELL_GRABBAG)
constexpr TypedWhichId< SvxBoxItem > SDRATTR_TABLE_BORDER(SDRATTR_TABLE_FIRST+0)
constexpr TypedWhichId< SfxInt16Item > SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWALIGNMENT)
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1)
constexpr sal_uInt16 SDRATTR_EDGE_FIRST(SDRATTR_MISC_LAST+1)
unsigned char sal_Bool
sal_uInt16 sal_Unicode
#define OWN_ATTR_FILLBMP_MODE
void SVXCORE_DLLPUBLIC SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet)
css::uno::Any SVXCORE_DLLPUBLIC SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
#define LINE_PROPERTIES
#define FILL_PROPERTIES
#define OWN_ATTR_TEXTCOLUMNS
#define LINE_PROPERTIES_START_END
#define CONNECTOR_PROPERTIES
#define EDGERADIUS_PROPERTIES
#define SHADOW_PROPERTIES
#define TEXT_PROPERTIES_DEFAULTS
#define SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
#define SVX_UNOEDIT_NUMBERING_PROPERTY
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
constexpr sal_uInt16 XATTR_LINE_FIRST(XATTR_START)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_LINE_LAST(XATTR_LINECAP)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)