LibreOffice Module sw (master) 1
unosett.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 <editeng/editids.hrc>
21#include <swtypes.hxx>
22#include <unomid.h>
23#include <hintids.hxx>
24#include <strings.hrc>
25#include <poolfmt.hxx>
26#include <fmtcol.hxx>
27#include <unomap.hxx>
28#include <unosett.hxx>
29#include <unoprnms.hxx>
30#include <ftninfo.hxx>
31#include <doc.hxx>
32#include <pagedesc.hxx>
34#include <charfmt.hxx>
35#include <lineinfo.hxx>
36#include <docsh.hxx>
37#include <docary.hxx>
38#include <docstyle.hxx>
39#include <editeng/brushitem.hxx>
40#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
41#include <com/sun/star/text/FootnoteNumbering.hpp>
42#include <com/sun/star/text/HoriOrientation.hpp>
43#include <com/sun/star/style/LineNumberPosition.hpp>
44#include <com/sun/star/awt/FontDescriptor.hpp>
45#include <com/sun/star/awt/XBitmap.hpp>
46#include <com/sun/star/graphic/XGraphic.hpp>
47#include <com/sun/star/beans/PropertyAttribute.hpp>
48#include <o3tl/any.hxx>
49#include <o3tl/enumarray.hxx>
51#include <vcl/font.hxx>
52#include <editeng/flstitem.hxx>
53#include <vcl/metric.hxx>
54#include <vcl/graph.hxx>
55#include <vcl/GraphicLoader.hxx>
56#include <sfx2/docfile.hxx>
57#include <svtools/ctrltool.hxx>
58#include <vcl/svapp.hxx>
59#include <editeng/unofdesc.hxx>
60#include <fmtornt.hxx>
61#include <SwStyleNameMapper.hxx>
62#include <com/sun/star/text/PositionAndSpaceMode.hpp>
63#include <com/sun/star/text/LabelFollow.hpp>
64#include <numrule.hxx>
69#include <svl/itemprop.hxx>
70#include <svl/listener.hxx>
71#include <paratr.hxx>
72#include <sal/log.hxx>
73
74using namespace ::com::sun::star;
75using namespace ::com::sun::star::uno;
76using namespace ::com::sun::star::lang;
77using namespace ::com::sun::star::beans;
78using namespace ::com::sun::star::text;
79using namespace ::com::sun::star::style;
80
81
82namespace
83{
84 SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc)
85 {
87 }
88}
89
90#define WID_PREFIX 0
91#define WID_SUFFIX 1
92#define WID_NUMBERING_TYPE 2
93#define WID_START_AT 3
94#define WID_FOOTNOTE_COUNTING 4
95#define WID_PARAGRAPH_STYLE 5
96#define WID_PAGE_STYLE 6
97#define WID_CHARACTER_STYLE 7
98#define WID_POSITION_END_OF_DOC 8
99#define WID_END_NOTICE 9
100#define WID_BEGIN_NOTICE 10
101#define WID_ANCHOR_CHARACTER_STYLE 11
102#define WID_NUM_ON 12
103#define WID_SEPARATOR_INTERVAL 13
104#define WID_NUMBER_POSITION 14
105#define WID_DISTANCE 15
106#define WID_INTERVAL 16
107#define WID_SEPARATOR_TEXT 17
108#define WID_COUNT_EMPTY_LINES 18
109#define WID_COUNT_LINES_IN_FRAMES 19
110#define WID_RESTART_AT_EACH_PAGE 20
111
112
114{
115 static const SfxItemPropertyMapEntry aFootnoteMap_Impl[] =
116 {
129 };
130 static const SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl);
131 return &aFootnoteSet_Impl;
132}
133
135{
136 static const SfxItemPropertyMapEntry aEndnoteMap_Impl[] =
137 {
146 };
147 static const SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl);
148 return &aEndnoteSet_Impl;
149}
150
152{
153 static const SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] =
154 {
158 { u"" UNO_NAME_NAME, WID_RULE_NAME , ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
160 { u"" UNO_NAME_DEFAULT_LIST_ID, WID_DEFAULT_LIST_ID, ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
161 };
162 static const SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl );
163 return &aNumberingRulesSet_Impl;
164}
165
167{
168 static const SfxItemPropertyMapEntry aLineNumberingMap_Impl[] =
169 {
181 };
182 static const SfxItemPropertySet aLineNumberingSet_Impl(aLineNumberingMap_Impl);
183 return &aLineNumberingSet_Impl;
184}
185
186static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
187{
188 SwCharFormat* pRet = nullptr;
189 OUString uTmp;
190 aValue >>= uTmp;
191 OUString sCharFormat;
193 if (sCharFormat != SwResId(STR_POOLCHR_STANDARD))
194 {
195 pRet = pDoc->FindCharFormatByName( sCharFormat );
196 }
197 if(!pRet)
198 {
200 if(USHRT_MAX != nId)
202 }
203 return pRet;
204}
205
206static SwTextFormatColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
207{
208 OUString uTmp;
209 aValue >>= uTmp;
210 OUString sParaStyle;
212 SwTextFormatColl* pRet = pDoc->FindTextFormatCollByName( sParaStyle );
213 if( !pRet )
214 {
216 if( USHRT_MAX != nId )
218 }
219 return pRet;
220}
221
222static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
223{
224 OUString uTmp;
225 aValue >>= uTmp;
226 OUString sPageDesc;
228 SwPageDesc* pRet = pDoc->FindPageDesc( sPageDesc );
229 if(!pRet)
230 {
232 if(USHRT_MAX != nId)
234 }
235 return pRet;
236}
237
238// Numbering
240{
241 text::HoriOrientation::LEFT, //3
242 text::HoriOrientation::RIGHT, //1
243 sal_Int16(-1),
244 text::HoriOrientation::CENTER, //2
245 sal_Int16(-1),
246 sal_Int16(-1)
247};
248
250{
251 return "SwXFootnoteProperties";
252}
253
255{
256 return cppu::supportsService(this, rServiceName);
257}
258
260{
261 Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
262 return aRet;
263}
264
266 m_pDoc(pDc),
267 m_pPropertySet(GetFootnoteSet())
268{
269}
270
272{
273
274}
275
276uno::Reference< beans::XPropertySetInfo > SwXFootnoteProperties::getPropertySetInfo()
277{
278 static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
279 return aRef;
280}
281
282void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
283{
284 SolarMutexGuard aGuard;
285 if(!m_pDoc)
286 throw uno::RuntimeException();
287
288 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
289 if(!pEntry)
290 throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
291
292 if ( pEntry->nFlags & PropertyAttribute::READONLY)
293 throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
294 SwFootnoteInfo aFootnoteInfo(m_pDoc->GetFootnoteInfo());
295 switch(pEntry->nWID)
296 {
297 case WID_PREFIX:
298 {
299 OUString uTmp;
300 aValue >>= uTmp;
301 aFootnoteInfo.SetPrefix(uTmp);
302 }
303 break;
304 case WID_SUFFIX:
305 {
306 OUString uTmp;
307 aValue >>= uTmp;
308 aFootnoteInfo.SetSuffix(uTmp);
309 }
310 break;
312 {
313 sal_Int16 nTmp = 0;
314 aValue >>= nTmp;
315 if(!(nTmp >= 0 &&
316 (nTmp <= SVX_NUM_ARABIC ||
317 nTmp > SVX_NUM_BITMAP)))
318 throw lang::IllegalArgumentException();
319
320 aFootnoteInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
321
322 }
323 break;
324 case WID_START_AT:
325 {
326 sal_Int16 nTmp = 0;
327 aValue >>= nTmp;
328 aFootnoteInfo.m_nFootnoteOffset = nTmp;
329 }
330 break;
332 {
333 sal_Int16 nTmp = 0;
334 aValue >>= nTmp;
335 switch(nTmp)
336 {
337 case FootnoteNumbering::PER_PAGE:
338 aFootnoteInfo.m_eNum = FTNNUM_PAGE;
339 break;
340 case FootnoteNumbering::PER_CHAPTER:
341 aFootnoteInfo.m_eNum = FTNNUM_CHAPTER;
342 break;
343 case FootnoteNumbering::PER_DOCUMENT:
344 aFootnoteInfo.m_eNum = FTNNUM_DOC;
345 break;
346 }
347 }
348 break;
350 {
351 SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
352 if(pColl)
353 aFootnoteInfo.SetFootnoteTextColl(*pColl);
354 }
355 break;
356 case WID_PAGE_STYLE:
357 {
358 SwPageDesc* pDesc = lcl_GetPageDesc(m_pDoc, aValue);
359 if(pDesc)
360 aFootnoteInfo.ChgPageDesc( pDesc );
361 }
362 break;
365 {
366 SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
367 if(pFormat)
368 {
369 if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
370 aFootnoteInfo.SetAnchorCharFormat(pFormat);
371 else
372 aFootnoteInfo.SetCharFormat(pFormat);
373 }
374 }
375 break;
377 {
378 bool bVal = *o3tl::doAccess<bool>(aValue);
379 aFootnoteInfo.m_ePos = bVal ? FTNPOS_CHAPTER : FTNPOS_PAGE;
380 }
381 break;
382 case WID_END_NOTICE:
383 {
384 OUString uTmp;
385 aValue >>= uTmp;
386 aFootnoteInfo.m_aQuoVadis = uTmp;
387 }
388 break;
389 case WID_BEGIN_NOTICE:
390 {
391 OUString uTmp;
392 aValue >>= uTmp;
393 aFootnoteInfo.m_aErgoSum = uTmp;
394 }
395 break;
396 }
397 m_pDoc->SetFootnoteInfo(aFootnoteInfo);
398
399
400}
401
403{
404 SolarMutexGuard aGuard;
405 uno::Any aRet;
406 if(!m_pDoc)
407 throw uno::RuntimeException();
408
409 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
410 if(!pEntry)
411 throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
412
413 const SwFootnoteInfo& rFootnoteInfo = m_pDoc->GetFootnoteInfo();
414 switch(pEntry->nWID)
415 {
416 case WID_PREFIX:
417 {
418 aRet <<= rFootnoteInfo.GetPrefix();
419 }
420 break;
421 case WID_SUFFIX:
422 {
423 aRet <<= rFootnoteInfo.GetSuffix();
424 }
425 break;
426 case WID_NUMBERING_TYPE :
427 {
428 aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_aFormat.GetNumberingType());
429 }
430 break;
431 case WID_START_AT:
432 aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_nFootnoteOffset);
433 break;
435 {
436 sal_Int16 nRet = 0;
437 switch(rFootnoteInfo.m_eNum)
438 {
439 case FTNNUM_PAGE:
440 nRet = FootnoteNumbering::PER_PAGE;
441 break;
442 case FTNNUM_CHAPTER:
443 nRet = FootnoteNumbering::PER_CHAPTER;
444 break;
445 case FTNNUM_DOC:
446 nRet = FootnoteNumbering::PER_DOCUMENT;
447 break;
448 }
449 aRet <<= nRet;
450 }
451 break;
453 {
454 SwTextFormatColl* pColl = rFootnoteInfo.GetFootnoteTextColl();
455 OUString aString;
456 if(pColl)
457 aString = pColl->GetName();
459 aRet <<= aString;
460 }
461 break;
462 case WID_PAGE_STYLE :
463 {
464 OUString aString;
465 if( rFootnoteInfo.KnowsPageDesc() )
466 {
468 rFootnoteInfo.GetPageDesc( *m_pDoc )->GetName(),
469 aString,
471 }
472 aRet <<= aString;
473 }
474 break;
477 {
478 OUString aString;
479 const SwCharFormat* pCharFormat = rFootnoteInfo.GetCurrentCharFormat(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE);
480 if( pCharFormat )
481 {
483 pCharFormat->GetName(),
484 aString,
486 }
487 aRet <<= aString;
488 }
489 break;
491 aRet <<= FTNPOS_CHAPTER == rFootnoteInfo.m_ePos;
492 break;
493 case WID_END_NOTICE :
494 aRet <<= rFootnoteInfo.m_aQuoVadis;
495 break;
496 case WID_BEGIN_NOTICE :
497 aRet <<= rFootnoteInfo.m_aErgoSum;
498 break;
499 }
500
501
502 return aRet;
503}
504
506 const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
507{
508 OSL_FAIL("not implemented");
509}
510
512 const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
513{
514 OSL_FAIL("not implemented");
515}
516
518 const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
519{
520 OSL_FAIL("not implemented");
521}
522
524 const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
525{
526 OSL_FAIL("not implemented");
527}
528
530{
531 return "SwXEndnoteProperties";
532}
533
535{
536 return cppu::supportsService(this, rServiceName);
537}
538
540{
541 Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
542 return aRet;
543}
544
546 m_pDoc(pDc),
547 m_pPropertySet(GetEndnoteSet())
548{
549}
550
552{
553}
554
555uno::Reference< beans::XPropertySetInfo > SwXEndnoteProperties::getPropertySetInfo()
556{
557 static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
558 return aRef;
559}
560
561void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
562{
563 SolarMutexGuard aGuard;
564 if(!m_pDoc)
565 return;
566
567 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
568 if(!pEntry)
569 throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
570
571 if ( pEntry->nFlags & PropertyAttribute::READONLY)
572 throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
574 switch(pEntry->nWID)
575 {
576 case WID_PREFIX:
577 {
578 OUString uTmp;
579 aValue >>= uTmp;
580 aEndInfo.SetPrefix(uTmp);
581 }
582 break;
583 case WID_SUFFIX:
584 {
585 OUString uTmp;
586 aValue >>= uTmp;
587 aEndInfo.SetSuffix(uTmp);
588 }
589 break;
590 case WID_NUMBERING_TYPE :
591 {
592 sal_Int16 nTmp = 0;
593 aValue >>= nTmp;
594 aEndInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
595 }
596 break;
597 case WID_START_AT:
598 {
599 sal_Int16 nTmp = 0;
600 aValue >>= nTmp;
601 aEndInfo.m_nFootnoteOffset = nTmp;
602 }
603 break;
605 {
606 SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
607 if(pColl)
608 aEndInfo.SetFootnoteTextColl(*pColl);
609 }
610 break;
611 case WID_PAGE_STYLE :
612 {
613 SwPageDesc* pDesc = lcl_GetPageDesc(m_pDoc, aValue);
614 if(pDesc)
615 aEndInfo.ChgPageDesc( pDesc );
616 }
617 break;
620 {
621 SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
622 if(pFormat)
623 {
624 if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
625 aEndInfo.SetAnchorCharFormat(pFormat);
626 else
627 aEndInfo.SetCharFormat(pFormat);
628 }
629 }
630 break;
631 }
632 m_pDoc->SetEndNoteInfo(aEndInfo);
633}
634
636{
637 SolarMutexGuard aGuard;
638 uno::Any aRet;
639 if(m_pDoc)
640 {
641 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
642 if(!pEntry)
643 throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
644
645 const SwEndNoteInfo& rEndInfo = m_pDoc->GetEndNoteInfo();
646 switch(pEntry->nWID)
647 {
648 case WID_PREFIX:
649 aRet <<= rEndInfo.GetPrefix();
650 break;
651 case WID_SUFFIX:
652 aRet <<= rEndInfo.GetSuffix();
653 break;
654 case WID_NUMBERING_TYPE :
655 aRet <<= static_cast<sal_Int16>(rEndInfo.m_aFormat.GetNumberingType());
656 break;
657 case WID_START_AT:
658 aRet <<= static_cast<sal_Int16>(rEndInfo.m_nFootnoteOffset);
659 break;
661 {
662 SwTextFormatColl* pColl = rEndInfo.GetFootnoteTextColl();
663 OUString aString;
664 if(pColl)
665 aString = pColl->GetName();
667 aString,
668 aString,
670 aRet <<= aString;
671
672 }
673 break;
674 case WID_PAGE_STYLE :
675 {
676 OUString aString;
677 if( rEndInfo.KnowsPageDesc() )
678 {
680 rEndInfo.GetPageDesc( *m_pDoc )->GetName(),
681 aString,
683 }
684 aRet <<= aString;
685 }
686 break;
689 {
690 OUString aString;
691 const SwCharFormat* pCharFormat = rEndInfo.GetCurrentCharFormat( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE );
692 if( pCharFormat )
693 {
695 pCharFormat->GetName(),
696 aString,
698 }
699 aRet <<= aString;
700 }
701 break;
702 }
703
704 }
705 return aRet;
706}
707
709 const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
710{
711 OSL_FAIL("not implemented");
712}
713
714void SwXEndnoteProperties::removePropertyChangeListener(const OUString& /*PropertyName*/,
715 const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
716{
717 OSL_FAIL("not implemented");
718}
719
720void SwXEndnoteProperties::addVetoableChangeListener(const OUString& /*PropertyName*/,
721 const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
722{
723 OSL_FAIL("not implemented");
724}
725
726void SwXEndnoteProperties::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
727{
728 OSL_FAIL("not implemented");
729}
730
732{
733 return "SwXLineNumberingProperties";
734}
735
737{
738 return cppu::supportsService(this, rServiceName);
739}
740
742{
743 Sequence<OUString> aRet { "com.sun.star.text.LineNumberingProperties" };
744 return aRet;
745}
746
748 m_pDoc(pDc),
749 m_pPropertySet(GetLineNumberingSet())
750{
751}
752
754{
755}
756
757uno::Reference< beans::XPropertySetInfo > SwXLineNumberingProperties::getPropertySetInfo()
758{
759 static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
760 return aRef;
761}
762
764 const OUString& rPropertyName, const Any& aValue)
765{
766 SolarMutexGuard aGuard;
767 if(!m_pDoc)
768 throw uno::RuntimeException();
769
770 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
771 if(!pEntry)
772 throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
773
774 if ( pEntry->nFlags & PropertyAttribute::READONLY)
775 throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
777 switch(pEntry->nWID)
778 {
779 case WID_NUM_ON:
780 {
781 bool bVal = *o3tl::doAccess<bool>(aValue);
782 aFontMetric.SetPaintLineNumbers(bVal);
783 }
784 break;
786 {
787 SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
788 if(pFormat)
789 aFontMetric.SetCharFormat(pFormat);
790 }
791 break;
792 case WID_NUMBERING_TYPE :
793 {
794 SvxNumberType aNumType(aFontMetric.GetNumType());
795 sal_Int16 nTmp = 0;
796 aValue >>= nTmp;
797 aNumType.SetNumberingType(static_cast<SvxNumType>(nTmp));
798 aFontMetric.SetNumType(aNumType);
799 }
800 break;
802 {
803 sal_Int16 nTmp = 0;
804 aValue >>= nTmp;
805 switch(nTmp)
806 {
807 case style::LineNumberPosition::LEFT:
808 aFontMetric.SetPos(LINENUMBER_POS_LEFT);
809 break;
810 case style::LineNumberPosition::RIGHT :
811 aFontMetric.SetPos(LINENUMBER_POS_RIGHT);
812 break;
813 case style::LineNumberPosition::INSIDE:
814 aFontMetric.SetPos(LINENUMBER_POS_INSIDE);
815 break;
816 case style::LineNumberPosition::OUTSIDE:
817 aFontMetric.SetPos(LINENUMBER_POS_OUTSIDE);
818 break;
819 }
820 }
821 break;
822 case WID_DISTANCE :
823 {
824 sal_Int32 nVal = 0;
825 aValue >>= nVal;
826 sal_Int32 nTmp = o3tl::toTwips(nVal, o3tl::Length::mm100);
827 if (nTmp > SAL_MAX_UINT16)
828 nTmp = SAL_MAX_UINT16;
829 aFontMetric.SetPosFromLeft(nTmp);
830 }
831 break;
832 case WID_INTERVAL :
833 {
834 sal_Int16 nTmp = 0;
835 aValue >>= nTmp;
836 if( nTmp > 0)
837 aFontMetric.SetCountBy(nTmp);
838 }
839 break;
840 case WID_SEPARATOR_TEXT :
841 {
842 OUString uTmp;
843 aValue >>= uTmp;
844 aFontMetric.SetDivider(uTmp);
845 }
846 break;
848 {
849 sal_Int16 nTmp = 0;
850 aValue >>= nTmp;
851 if( nTmp >= 0)
852 aFontMetric.SetDividerCountBy(nTmp);
853 }
854 break;
856 {
857 bool bVal = *o3tl::doAccess<bool>(aValue);
858 aFontMetric.SetCountBlankLines(bVal);
859 }
860 break;
862 {
863 bool bVal = *o3tl::doAccess<bool>(aValue);
864 aFontMetric.SetCountInFlys(bVal);
865 }
866 break;
868 {
869 bool bVal = *o3tl::doAccess<bool>(aValue);
870 aFontMetric.SetRestartEachPage(bVal);
871 }
872 break;
873 }
874 m_pDoc->SetLineNumberInfo(aFontMetric);
875}
876
878{
879 SolarMutexGuard aGuard;
880 Any aRet;
881 if(!m_pDoc)
882 throw uno::RuntimeException();
883
884 const SfxItemPropertyMapEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
885 if(!pEntry)
886 throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
887
888 const SwLineNumberInfo& rInfo = m_pDoc->GetLineNumberInfo();
889 switch(pEntry->nWID)
890 {
891 case WID_NUM_ON:
892 aRet <<= rInfo.IsPaintLineNumbers();
893 break;
895 {
896 OUString aString;
897 // return empty string if no char format is set
898 // otherwise it would be created here
899 if(rInfo.HasCharFormat())
900 {
903 aString,
905 }
906 aRet <<= aString;
907 }
908 break;
909 case WID_NUMBERING_TYPE :
910 aRet <<= static_cast<sal_Int16>(rInfo.GetNumType().GetNumberingType());
911 break;
913 {
914 sal_Int16 nRet = 0;
915 switch(rInfo.GetPos())
916 {
918 nRet = style::LineNumberPosition::LEFT;
919 break;
921 nRet = style::LineNumberPosition::RIGHT ;
922 break;
924 nRet = style::LineNumberPosition::INSIDE ;
925 break;
927 nRet = style::LineNumberPosition::OUTSIDE ;
928 break;
929 }
930 aRet <<= nRet;
931 }
932 break;
933 case WID_DISTANCE :
934 {
935 sal_uInt32 nPos = rInfo.GetPosFromLeft();
936 if(USHRT_MAX == nPos)
937 nPos = 0;
938 aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(nPos));
939 }
940 break;
941 case WID_INTERVAL :
942 aRet <<= static_cast<sal_Int16>(rInfo.GetCountBy());
943 break;
944 case WID_SEPARATOR_TEXT :
945 aRet <<= rInfo.GetDivider();
946 break;
948 aRet <<= static_cast<sal_Int16>(rInfo.GetDividerCountBy());
949 break;
951 aRet <<= rInfo.IsCountBlankLines();
952 break;
954 aRet <<= rInfo.IsCountInFlys();
955 break;
957 aRet <<= rInfo.IsRestartEachPage();
958 break;
959 }
960 return aRet;
961}
962
963void SwXLineNumberingProperties::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
964{
965OSL_FAIL("not implemented");
966}
967
968void SwXLineNumberingProperties::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
969{
970OSL_FAIL("not implemented");
971}
972
973void SwXLineNumberingProperties::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
974{
975OSL_FAIL("not implemented");
976}
977
978void SwXLineNumberingProperties::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
979{
980OSL_FAIL("not implemented");
981}
982
983constexpr OUStringLiteral aInvalidStyle = u"__XXX___invalid";
984
986 : public SvtListener
987{
989 virtual void Notify(const SfxHint&) override;
990 public:
991 explicit Impl(SwXNumberingRules& rParent) : m_rParent(rParent) {}
992};
993
994bool SwXNumberingRules::isInvalidStyle(std::u16string_view rName)
995{
996 return rName == aInvalidStyle;
997}
998
999namespace
1000{
1001}
1002
1003const uno::Sequence< sal_Int8 > & SwXNumberingRules::getUnoTunnelId()
1004{
1005 static const comphelper::UnoIdInit theSwXNumberingRulesUnoTunnelId;
1006 return theSwXNumberingRulesUnoTunnelId.getSeq();
1007}
1008
1009// return implementation specific data
1010sal_Int64 SwXNumberingRules::getSomething( const uno::Sequence< sal_Int8 > & rId )
1011{
1012 return comphelper::getSomethingImpl(rId, this);
1013}
1014
1016{
1017 return "SwXNumberingRules";
1018}
1019
1021{
1022 return cppu::supportsService(this, rServiceName);
1023}
1024
1026{
1027 Sequence<OUString> aRet { "com.sun.star.text.NumberingRules" };
1028 return aRet;
1029}
1030
1032 m_pImpl(new SwXNumberingRules::Impl(*this)),
1033 m_pDoc(doc),
1034 m_pDocShell(nullptr),
1035 m_pNumRule(new SwNumRule(rRule)),
1036 m_pPropertySet(GetNumberingRulesSet()),
1037 m_bOwnNumRuleCreated(true)
1038{
1039 // first organize the document - it is dependent on the set character formats
1040 // if no format is set, it should work as well
1041 for( sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1042 {
1043 SwNumFormat rFormat(m_pNumRule->Get(i));
1044 SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1045 if(pCharFormat)
1046 {
1047 m_pDoc = pCharFormat->GetDoc();
1048 break;
1049 }
1050 }
1051 if(m_pDoc)
1052 m_pImpl->StartListening(GetPageDescNotifier(m_pDoc));
1053 for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1054 {
1057 }
1058}
1059
1061 m_pImpl(new SwXNumberingRules::Impl(*this)),
1062 m_pDoc(nullptr),
1063 m_pDocShell(&rDocSh),
1064 m_pNumRule(nullptr),
1065 m_pPropertySet(GetNumberingRulesSet()),
1066 m_bOwnNumRuleCreated(false)
1067{
1068 m_pImpl->StartListening(GetPageDescNotifier(m_pDocShell->GetDoc()));
1069}
1070
1072 m_pImpl(new SwXNumberingRules::Impl(*this)),
1073 m_pDoc(&rDoc),
1074 m_pDocShell(nullptr),
1075 m_pNumRule(nullptr),
1076 m_pPropertySet(GetNumberingRulesSet()),
1077 m_bOwnNumRuleCreated(false)
1078{
1079 m_pImpl->StartListening(GetPageDescNotifier(&rDoc));
1081 rDoc.MakeNumRule( m_sCreatedNumRuleName, nullptr, false,
1082 // #i89178#
1084}
1085
1087{
1088 SolarMutexGuard aGuard;
1089 if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1092 delete m_pNumRule;
1093}
1094
1095void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement)
1096{
1097 SolarMutexGuard aGuard;
1098 if(nIndex < 0 || MAXLEVEL <= nIndex)
1099 throw lang::IndexOutOfBoundsException();
1100
1101 auto rProperties = o3tl::tryAccess<uno::Sequence<beans::PropertyValue>>(
1102 rElement);
1103 if(!rProperties)
1104 throw lang::IllegalArgumentException();
1105 SwNumRule* pRule = nullptr;
1106 if(m_pNumRule)
1108 *rProperties, nIndex);
1109 else if(m_pDocShell)
1110 {
1111 // #i87650# - correction of cws warnings:
1112 SwNumRule aNumRule( *(m_pDocShell->GetDoc()->GetOutlineNumRule()) );
1114 *rProperties, nIndex);
1115 // set character format if needed
1116 // this code appears to be dead - except when a style is assigned for BITMAP numbering?
1117 const SwCharFormats* pFormats = m_pDocShell->GetDoc()->GetCharFormats();
1118 const size_t nChCount = pFormats->size();
1119 for(sal_uInt16 i = 0; i < MAXLEVEL;i++)
1120 {
1121 SwNumFormat aFormat(aNumRule.Get( i ));
1122 if (!m_sNewCharStyleNames[i].isEmpty() &&
1123 (!aFormat.GetCharFormat() || aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
1124 {
1125 SwCharFormat* pCharFormat = nullptr;
1126 for(size_t j = 0; j< nChCount; ++j)
1127 {
1128 SwCharFormat* pTmp = (*pFormats)[j];
1129 if(pTmp->GetName() == m_sNewCharStyleNames[i])
1130 {
1131 pCharFormat = pTmp;
1132 break;
1133 }
1134 }
1135 if(!pCharFormat)
1136 {
1137 SfxStyleSheetBase* pBase;
1139 SfxStyleFamily::Char);
1140 if(!pBase)
1141 pBase = &m_pDocShell->GetStyleSheetPool()->Make(m_sNewCharStyleNames[i], SfxStyleFamily::Char);
1142 pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1143
1144 }
1145 aFormat.SetCharFormat( pCharFormat );
1146 aNumRule.Set( i, aFormat );
1147 }
1148 }
1149 m_pDocShell->GetDoc()->SetOutlineNumRule( aNumRule );
1150 }
1151 else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty() &&
1152 nullptr != (pRule = m_pDoc->FindNumRulePtr( m_sCreatedNumRuleName )))
1153 {
1155 *rProperties, nIndex);
1156
1157 pRule->Validate(*m_pDoc);
1158 }
1159 else
1160 throw uno::RuntimeException();
1161}
1162
1164{
1165 return MAXLEVEL;
1166}
1167
1169{
1170 SolarMutexGuard aGuard;
1171 if(nIndex < 0 || MAXLEVEL <= nIndex)
1172 throw lang::IndexOutOfBoundsException();
1173
1174 uno::Any aVal;
1175 const SwNumRule* pRule = m_pNumRule;
1176 if(!pRule && m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1178 if(pRule)
1179 {
1180 uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1181 *pRule, nIndex);
1182 aVal <<= aRet;
1183
1184 }
1185 else if(m_pDocShell)
1186 {
1187 uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1189 aVal <<= aRet;
1190 }
1191 else
1192 throw uno::RuntimeException();
1193 return aVal;
1194}
1195
1197{
1199}
1200
1202{
1203 return true;
1204}
1205
1207{
1208 STR_POOLCOLL_HEADLINE1,
1209 STR_POOLCOLL_HEADLINE2,
1210 STR_POOLCOLL_HEADLINE3,
1211 STR_POOLCOLL_HEADLINE4,
1212 STR_POOLCOLL_HEADLINE5,
1213 STR_POOLCOLL_HEADLINE6,
1214 STR_POOLCOLL_HEADLINE7,
1215 STR_POOLCOLL_HEADLINE8,
1216 STR_POOLCOLL_HEADLINE9,
1217 STR_POOLCOLL_HEADLINE10
1218};
1219
1220uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
1221 const SwNumRule& rNumRule, sal_Int32 nIndex) const
1222{
1223 SolarMutexGuard aGuard;
1224 OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1225
1226 const SwNumFormat& rFormat = rNumRule.Get( o3tl::narrowing<sal_uInt16>(nIndex) );
1227
1228 SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1229 OUString CharStyleName;
1230 if (pCharFormat)
1231 CharStyleName = pCharFormat->GetName();
1232
1233 // Whether or not a style is present: the array entry overwrites this string
1234 if (!m_sNewCharStyleNames[nIndex].isEmpty() &&
1236 {
1237 CharStyleName = m_sNewCharStyleNames[nIndex];
1238 }
1239
1240 OUString aUString;
1241 if (m_pDocShell) // -> Chapter Numbering
1242 {
1243 // template name
1244 OUString sValue(SwResId(STR_POOLCOLL_HEADLINE_ARY[nIndex]));
1246 const size_t nCount = pColls->size();
1247 for(size_t i = 0; i < nCount; ++i)
1248 {
1249 SwTextFormatColl &rTextColl = *pColls->operator[](i);
1250 if(rTextColl.IsDefault())
1251 continue;
1252
1253 const sal_Int16 nOutLevel = rTextColl.IsAssignedToListLevelOfOutlineStyle()
1254 ? static_cast<sal_Int16>(rTextColl.GetAssignedOutlineStyleLevel())
1255 : MAXLEVEL;
1256 if ( nOutLevel == nIndex )
1257 {
1258 sValue = rTextColl.GetName();
1259 break; // the style for the level in question has been found
1260 }
1261 else if( sValue==rTextColl.GetName() )
1262 {
1263 // if the default for the level is existing, but its
1264 // level is different, then it cannot be the default.
1265 sValue.clear();
1266 }
1267 }
1269 }
1270
1271 OUString referer;
1272 if (m_pDoc != nullptr) {
1273 auto const sh = m_pDoc->GetPersist();
1274 if (sh != nullptr && sh->HasName()) {
1275 referer = sh->GetMedium()->GetName();
1276 }
1277 }
1279 rFormat, CharStyleName, m_pDocShell ? & aUString : nullptr, referer);
1280
1281}
1282
1283uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
1284 const SwNumFormat& rFormat, OUString const& rCharFormatName,
1285 OUString const*const pHeadingStyleName, OUString const & referer)
1286{
1287 bool bChapterNum = pHeadingStyleName != nullptr;
1288
1289 std::vector<PropertyValue> aPropertyValues;
1290 aPropertyValues.reserve(32);
1291 //fill all properties into the array
1292
1293 //adjust
1294 SvxAdjust eAdj = rFormat.GetNumAdjust();
1295 sal_Int16 nINT16 = aSvxToUnoAdjust[eAdj];
1296 aPropertyValues.push_back(comphelper::makePropertyValue("Adjust", nINT16));
1297
1298 //parentnumbering
1299 nINT16 = rFormat.GetIncludeUpperLevels();
1300 aPropertyValues.push_back(comphelper::makePropertyValue("ParentNumbering", nINT16));
1301
1302 //prefix
1303 OUString aUString = rFormat.GetPrefix();
1304 aPropertyValues.push_back(comphelper::makePropertyValue("Prefix", aUString));
1305
1306 //suffix
1307 aUString = rFormat.GetSuffix();
1308 aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", aUString));
1309
1310 //listformat
1311 if (rFormat.HasListFormat())
1312 {
1313 aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", rFormat.GetListFormat()));
1314 }
1315
1316 //char style name
1317 aUString.clear();
1319 aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
1320
1321 //startvalue
1322 nINT16 = rFormat.GetStart();
1323 aPropertyValues.push_back(comphelper::makePropertyValue("StartWith", nINT16));
1324
1326 {
1327 //leftmargin
1328 sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetAbsLSpace());
1330
1331 //chartextoffset
1332 nINT32 = convertTwipToMm100(rFormat.GetCharTextDistance());
1334
1335 //firstlineoffset
1336 nINT32 = convertTwipToMm100(rFormat.GetFirstLineOffset());
1338 }
1339
1340 // PositionAndSpaceMode
1341 nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
1343 {
1344 nINT16 = PositionAndSpaceMode::LABEL_ALIGNMENT;
1345 }
1347
1349 {
1350 // LabelFollowedBy
1351 nINT16 = LabelFollow::LISTTAB;
1352 if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
1353 {
1354 nINT16 = LabelFollow::SPACE;
1355 }
1356 else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
1357 {
1358 nINT16 = LabelFollow::NOTHING;
1359 }
1360 else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NEWLINE )
1361 {
1362 nINT16 = LabelFollow::NEWLINE;
1363 }
1365
1366 // ListtabStopPosition
1367 sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetListtabPos());
1369
1370 // FirstLineIndent
1371 nINT32 = convertTwipToMm100(rFormat.GetFirstLineIndent());
1373
1374 // IndentAt
1375 nINT32 = convertTwipToMm100(rFormat.GetIndentAt());
1377 }
1378
1379 //numberingtype
1380 nINT16 = rFormat.GetNumberingType();
1381 aPropertyValues.push_back(comphelper::makePropertyValue("NumberingType", nINT16));
1382
1383 if(!bChapterNum)
1384 {
1385 if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
1386 {
1387 sal_UCS4 cBullet = rFormat.GetBulletChar();
1388
1389 //BulletId
1390 nINT16 = cBullet;
1391 aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
1392
1393 std::optional<vcl::Font> pFont = rFormat.GetBulletFont();
1394
1395 //BulletChar
1396 aUString = OUString(&cBullet, 1);
1397 aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
1398
1399 //BulletFontName
1400 aUString = pFont ? pFont->GetStyleName() : OUString();
1401 aPropertyValues.push_back(comphelper::makePropertyValue("BulletFontName", aUString));
1402
1403 //BulletFont
1404 if(pFont)
1405 {
1406 awt::FontDescriptor aDesc;
1409 }
1410 }
1411 if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
1412 {
1413 const SvxBrushItem* pBrush = rFormat.GetBrush();
1414 const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
1415 if (pGraphic)
1416 {
1417 //GraphicBitmap
1418 uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
1420 }
1421
1422 Size aSize = rFormat.GetGraphicSize();
1423 // #i101131#
1424 // adjust conversion due to type mismatch between <Size> and <awt::Size>
1425 awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
1427
1428 const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
1429 if(pOrient)
1430 {
1431 uno::Any any;
1432 pOrient->QueryValue(any);
1433 aPropertyValues.emplace_back(
1434 UNO_NAME_VERT_ORIENT, -1, any, PropertyState_DIRECT_VALUE);
1435 }
1436 }
1437 }
1438 else
1439 {
1440 aUString = *pHeadingStyleName;
1442 }
1443
1444 return ::comphelper::containerToSequence(aPropertyValues);
1445}
1446
1448 SwNumRule& rNumRule,
1449 const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
1450{
1451 SolarMutexGuard aGuard;
1452 OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1453
1454 SwNumFormat aFormat(rNumRule.Get( o3tl::narrowing<sal_uInt16>(nIndex) ));
1455
1456 OUString sHeadingStyleName;
1457 OUString sParagraphStyleName;
1458
1461 &sHeadingStyleName, &sParagraphStyleName,
1462 m_pDoc, m_pDocShell, rProperties);
1463
1464
1465 if (m_pDoc && !sParagraphStyleName.isEmpty())
1466 {
1467 const SwTextFormatColls* pColls = m_pDoc->GetTextFormatColls();
1468 const size_t nCount = pColls->size();
1469 for (size_t k = 0; k < nCount; ++k)
1470 {
1471 SwTextFormatColl &rTextColl = *((*pColls)[k]);
1472 if (rTextColl.GetName() == sParagraphStyleName)
1473 rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
1474 }
1475 }
1476
1477 if (!sHeadingStyleName.isEmpty())
1478 {
1479 assert(m_pDocShell);
1481 const size_t nCount = pColls->size();
1482 for (size_t k = 0; k < nCount; ++k)
1483 {
1484 SwTextFormatColl &rTextColl = *((*pColls)[k]);
1485 if (rTextColl.IsDefault())
1486 continue;
1487 if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
1488 rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
1489 rTextColl.GetName() != sHeadingStyleName)
1490 {
1492 }
1493 else if (rTextColl.GetName() == sHeadingStyleName)
1494 {
1496 }
1497 }
1498 }
1499
1500 rNumRule.Set(o3tl::narrowing<sal_uInt16>(nIndex), aFormat);
1501}
1502
1504 SwNumFormat & aFormat,
1505 OUString & rCharStyleName, OUString *const pBulletFontName,
1506 OUString *const pHeadingStyleName,
1507 OUString *const pParagraphStyleName,
1508 SwDoc *const pDoc,
1509 SwDocShell *const pDocShell,
1510 const uno::Sequence<beans::PropertyValue>& rProperties)
1511{
1512 assert(pDoc == nullptr || pDocShell == nullptr); // can't be both ordinary and chapter numbering
1513
1514 bool bWrongArg = false;
1515 std::unique_ptr<SvxBrushItem> pSetBrush;
1516 std::unique_ptr<Size> pSetSize;
1517 std::unique_ptr<SwFormatVertOrient> pSetVOrient;
1518 bool bCharStyleNameSet = false;
1519
1520 for (const beans::PropertyValue& rProp : rProperties)
1521 {
1522 if (rProp.Name == UNO_NAME_ADJUST)
1523 {
1525 rProp.Value >>= nValue;
1526 switch (nValue) {
1527 case text::HoriOrientation::RIGHT:
1528 aFormat.SetNumAdjust(SvxAdjust::Right);
1529 break;
1530 case text::HoriOrientation::CENTER:
1531 aFormat.SetNumAdjust(SvxAdjust::Center);
1532 break;
1533 case text::HoriOrientation::LEFT:
1534 aFormat.SetNumAdjust(SvxAdjust::Left);
1535 break;
1536 default:
1537 bWrongArg = true;
1538 break;
1539 }
1540 }
1541 else if (rProp.Name == UNO_NAME_PARENT_NUMBERING)
1542 {
1543 sal_Int16 nSet = 0;
1544 rProp.Value >>= nSet;
1545 if(nSet >= 0 && MAXLEVEL >= nSet)
1546 aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
1547 }
1548 else if (rProp.Name == UNO_NAME_PREFIX)
1549 {
1550 OUString uTmp;
1551 rProp.Value >>= uTmp;
1552 aFormat.SetPrefix(uTmp);
1553 }
1554 else if (rProp.Name == UNO_NAME_SUFFIX)
1555 {
1556 OUString uTmp;
1557 rProp.Value >>= uTmp;
1558 aFormat.SetSuffix(uTmp);
1559 }
1560 else if (rProp.Name == UNO_NAME_CHAR_STYLE_NAME)
1561 {
1562 bCharStyleNameSet = true;
1563 OUString uTmp;
1564 rProp.Value >>= uTmp;
1565 OUString sCharFormatName;
1567 SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc;
1568 if (sCharFormatName.isEmpty())
1569 {
1570 rCharStyleName.clear();
1571 aFormat.SetCharFormat(nullptr);
1572 aFormat.SetCharFormatName("");
1573 }
1574 else if (pLocalDoc)
1575 {
1576 SwCharFormat* pCharFormat = nullptr;
1577 if (!sCharFormatName.isEmpty())
1578 {
1579 pCharFormat = pLocalDoc->FindCharFormatByName(sCharFormatName);
1580 if(!pCharFormat)
1581 {
1582
1583 SfxStyleSheetBase* pBase;
1584 SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
1585 pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
1586 if(!pBase)
1587 pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
1588 pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1589 }
1590 }
1591 aFormat.SetCharFormat( pCharFormat );
1592 // #i51842#
1593 // If the character format has been found its name should not be in the
1594 // char style names array
1595 rCharStyleName.clear();
1596 }
1597 else
1598 rCharStyleName = sCharFormatName;
1599 }
1600 else if (rProp.Name == UNO_NAME_START_WITH)
1601 {
1602 sal_Int16 nVal = 0;
1603 rProp.Value >>= nVal;
1604 aFormat.SetStart(nVal);
1605 }
1606 else if (rProp.Name == UNO_NAME_LEFT_MARGIN)
1607 {
1608 sal_Int32 nValue = 0;
1609 rProp.Value >>= nValue;
1610 // #i23727# nValue can be negative
1612 }
1613 else if (rProp.Name == UNO_NAME_SYMBOL_TEXT_DISTANCE)
1614 {
1615 sal_Int32 nValue = 0;
1616 rProp.Value >>= nValue;
1617 if (nValue >= 0)
1619 else
1620 bWrongArg = true;
1621 }
1622 else if (rProp.Name == UNO_NAME_FIRST_LINE_OFFSET)
1623 {
1624 sal_Int32 nValue = 0;
1625 rProp.Value >>= nValue;
1626 // #i23727# nValue can be positive
1628 aFormat.SetFirstLineOffset(nValue);
1629 }
1630 else if (rProp.Name == UNO_NAME_POSITION_AND_SPACE_MODE)
1631 {
1632 sal_Int16 nValue = 0;
1633 rProp.Value >>= nValue;
1634 if ( nValue == 0 )
1635 {
1637 }
1638 else if ( nValue == 1 )
1639 {
1641 }
1642 else
1643 {
1644 bWrongArg = true;
1645 }
1646 }
1647 else if (rProp.Name == UNO_NAME_LABEL_FOLLOWED_BY)
1648 {
1649 sal_Int16 nValue = 0;
1650 rProp.Value >>= nValue;
1651 if ( nValue == LabelFollow::LISTTAB )
1652 {
1654 }
1655 else if ( nValue == LabelFollow::SPACE )
1656 {
1658 }
1659 else if ( nValue == LabelFollow::NOTHING )
1660 {
1662 }
1663 else if ( nValue == LabelFollow::NEWLINE )
1664 {
1666 }
1667 else
1668 {
1669 bWrongArg = true;
1670 }
1671 }
1672 else if (rProp.Name == UNO_NAME_LISTTAB_STOP_POSITION)
1673 {
1674 sal_Int32 nValue = 0;
1675 rProp.Value >>= nValue;
1677 if ( nValue >= 0 )
1678 {
1679 aFormat.SetListtabPos( nValue );
1680 }
1681 else
1682 {
1683 bWrongArg = true;
1684 }
1685 }
1686 else if (rProp.Name == UNO_NAME_FIRST_LINE_INDENT)
1687 {
1688 sal_Int32 nValue = 0;
1689 rProp.Value >>= nValue;
1691 aFormat.SetFirstLineIndent( nValue );
1692 }
1693 else if (rProp.Name == UNO_NAME_INDENT_AT)
1694 {
1695 sal_Int32 nValue = 0;
1696 rProp.Value >>= nValue;
1698 aFormat.SetIndentAt( nValue );
1699 }
1700 else if (rProp.Name == UNO_NAME_NUMBERING_TYPE)
1701 {
1702 sal_Int16 nSet = 0;
1703 rProp.Value >>= nSet;
1704 if(nSet >= 0)
1705 aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
1706 else
1707 bWrongArg = true;
1708 }
1709 else if (rProp.Name == UNO_NAME_PARAGRAPH_STYLE_NAME)
1710 {
1711 if (pParagraphStyleName)
1712 {
1713 OUString uTmp;
1714 rProp.Value >>= uTmp;
1715 OUString sStyleName;
1717 *pParagraphStyleName = sStyleName;
1718 }
1719 }
1720 else if (rProp.Name == UNO_NAME_BULLET_ID)
1721 {
1722 sal_Int16 nSet = 0;
1723 if( rProp.Value >>= nSet )
1724 aFormat.SetBulletChar(nSet);
1725 else
1726 bWrongArg = true;
1727 }
1728 else if (rProp.Name == UNO_NAME_BULLET_FONT)
1729 {
1730 awt::FontDescriptor desc;
1731 if (rProp.Value >>= desc)
1732 {
1733 // #i93725#
1734 // do not accept "empty" font
1735 if (!desc.Name.isEmpty())
1736 {
1737 vcl::Font aFont;
1739 aFormat.SetBulletFont(&aFont);
1740 }
1741 }
1742 else
1743 bWrongArg = true;
1744 }
1745 else if (rProp.Name == UNO_NAME_BULLET_FONT_NAME)
1746 {
1747 OUString sBulletFontName;
1748 rProp.Value >>= sBulletFontName;
1749 SwDocShell *const pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
1750 if (!sBulletFontName.isEmpty() && pLclDocShell)
1751 {
1752 const SvxFontListItem* pFontListItem =
1753 static_cast<const SvxFontListItem* >(pLclDocShell
1754 ->GetItem( SID_ATTR_CHAR_FONTLIST ));
1755 const FontList* pList = pFontListItem->GetFontList();
1756 FontMetric aFontMetric = pList->Get(
1758 vcl::Font aFont(aFontMetric);
1759 aFormat.SetBulletFont(&aFont);
1760 }
1761 else if (pBulletFontName)
1762 *pBulletFontName = sBulletFontName;
1763 }
1764 else if (rProp.Name == UNO_NAME_BULLET_CHAR)
1765 {
1766 OUString aChar;
1767 rProp.Value >>= aChar;
1768 if (aChar.isEmpty())
1769 {
1770 // If w:lvlText's value is null - set bullet char to zero
1771 aFormat.SetBulletChar(u'\0');
1772 }
1773 else
1774 {
1775 sal_Int32 nIndexUtf16 = 0;
1776 sal_UCS4 cBullet = aChar.iterateCodePoints(&nIndexUtf16);
1777 if (aChar.getLength() == nIndexUtf16)
1778 aFormat.SetBulletChar(cBullet);
1779 else
1780 bWrongArg = true;
1781 }
1782 }
1783 else if (rProp.Name == UNO_NAME_GRAPHIC)
1784 {
1785 uno::Reference<graphic::XGraphic> xGraphic;
1786 if (rProp.Value >>= xGraphic)
1787 {
1788 if (!pSetBrush)
1789 {
1790 const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1791 if(pOrigBrush)
1792 pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1793 else
1794 pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1795 }
1796 Graphic aGraphic(xGraphic);
1797 pSetBrush->SetGraphic(aGraphic);
1798 }
1799 else
1800 bWrongArg = true;
1801 }
1802 else if (rProp.Name == UNO_NAME_GRAPHIC_BITMAP)
1803 {
1804 uno::Reference<awt::XBitmap> xBitmap;
1805 if (rProp.Value >>= xBitmap)
1806 {
1807 if(!pSetBrush)
1808 {
1809 const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1810 if(pOrigBrush)
1811 pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1812 else
1813 pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1814 }
1815
1816 uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
1817 Graphic aGraphic(xGraphic);
1818 pSetBrush->SetGraphic(aGraphic);
1819 }
1820 else
1821 bWrongArg = true;
1822 }
1823 else if (rProp.Name == UNO_NAME_GRAPHIC_SIZE)
1824 {
1825 if(!pSetSize)
1826 pSetSize.reset(new Size);
1827 awt::Size size;
1828 if (rProp.Value >>= size)
1829 {
1830 pSetSize->setWidth(o3tl::toTwips(size.Width, o3tl::Length::mm100));
1831 pSetSize->setHeight(o3tl::toTwips(size.Height, o3tl::Length::mm100));
1832 }
1833 else
1834 bWrongArg = true;
1835 }
1836 else if (rProp.Name == UNO_NAME_VERT_ORIENT)
1837 {
1838 if(!pSetVOrient)
1839 {
1840 if(aFormat.GetGraphicOrientation())
1841 pSetVOrient.reset(aFormat.GetGraphicOrientation()->Clone());
1842 else
1843 pSetVOrient.reset(new SwFormatVertOrient);
1844 }
1845 pSetVOrient->PutValue(rProp.Value, MID_VERTORIENT_ORIENT);
1846 }
1847 else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME
1848 && pDocShell) // only on chapter numbering
1849 {
1850 if (pHeadingStyleName)
1851 {
1852 OUString uTmp;
1853 rProp.Value >>= uTmp;
1854 OUString sStyleName;
1856 *pHeadingStyleName = sStyleName;
1857 }
1858 }
1859 else if (rProp.Name == UNO_NAME_BULLET_REL_SIZE)
1860 {
1861 // BulletRelSize - unsupported - only available in Impress
1862 }
1863 else if (rProp.Name == UNO_NAME_BULLET_COLOR)
1864 {
1865 // BulletColor - ignored too
1866 }
1867 else if (rProp.Name == UNO_NAME_GRAPHIC_URL)
1868 {
1869 OUString aURL;
1870 if (rProp.Value >>= aURL)
1871 {
1872 if(!pSetBrush)
1873 {
1874 const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1875 if(pOrigBrush)
1876 pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1877 else
1878 pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1879 }
1880
1882 if (!aGraphic.IsNone())
1883 pSetBrush->SetGraphic(aGraphic);
1884 }
1885 else
1886 bWrongArg = true;
1887 }
1888 else if (rProp.Name == UNO_NAME_LIST_FORMAT)
1889 {
1890 OUString uTmp;
1891 rProp.Value >>= uTmp;
1892 aFormat.SetListFormat(uTmp);
1893 }
1894 else
1895 {
1896 // Invalid property name
1897 SAL_WARN("sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing");
1898 throw uno::RuntimeException("Unknown/incorrect property " + rProp.Name);
1899 }
1900 }
1901 if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
1902 {
1903 if(!pSetBrush && aFormat.GetBrush())
1904 pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
1905
1906 if(pSetBrush)
1907 {
1908 if(!pSetVOrient && aFormat.GetGraphicOrientation())
1909 pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
1910
1911 if(!pSetSize)
1912 {
1913 pSetSize.reset(new Size(aFormat.GetGraphicSize()));
1914 if(!pSetSize->Width() || !pSetSize->Height())
1915 {
1916 const Graphic* pGraphic = pSetBrush->GetGraphic();
1917 if(pGraphic)
1918 *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
1919 }
1920 }
1921 sal_Int16 eOrient = pSetVOrient ?
1922 pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
1923 aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
1924 }
1925 }
1926 if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
1927 && aFormat.GetNumberingType() == NumberingType::BITMAP
1928 && !aFormat.GetCharFormat()
1929 && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
1930 {
1931 OUString tmp;
1933 rCharStyleName = tmp;
1934 }
1935
1936 if(bWrongArg)
1937 throw lang::IllegalArgumentException();
1938}
1939
1940uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
1941{
1942 static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
1943 return aRef;
1944}
1945
1946void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
1947{
1948 SolarMutexGuard aGuard;
1949 std::unique_ptr<SwNumRule> pDocRule;
1950 SwNumRule* pCreatedRule = nullptr;
1951 if(!m_pNumRule)
1952 {
1953 if(m_pDocShell)
1954 {
1955 pDocRule.reset(new SwNumRule(*m_pDocShell->GetDoc()->GetOutlineNumRule()));
1956 }
1957 else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1958 {
1960 }
1961
1962 }
1963 if(!m_pNumRule && !pDocRule && !pCreatedRule)
1964 throw RuntimeException();
1965
1966 if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
1967 {
1968 bool bVal = *o3tl::doAccess<bool>(rValue);
1969 if(!pCreatedRule)
1970 pDocRule ? pDocRule->SetAutoRule(bVal) : m_pNumRule->SetAutoRule(bVal);
1971 }
1972 else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
1973 {
1974 bool bVal = *o3tl::doAccess<bool>(rValue);
1975 pDocRule ? pDocRule->SetContinusNum(bVal) :
1976 pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : m_pNumRule->SetContinusNum(bVal);
1977 }
1978 else if(rPropertyName == UNO_NAME_NAME)
1979 {
1980 throw IllegalArgumentException();
1981 }
1982 else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
1983 {
1984 bool bVal = *o3tl::doAccess<bool>(rValue);
1985 pDocRule ? pDocRule->SetAbsSpaces(bVal) :
1986 pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : m_pNumRule->SetAbsSpaces(bVal);
1987 }
1988 else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
1989 {
1990 bool bVal = *o3tl::doAccess<bool>(rValue);
1991 SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
1992 pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
1993 pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : m_pNumRule->SetRuleType(eNumRuleType);
1994 }
1995 else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
1996 {
1997 throw IllegalArgumentException();
1998 }
1999 else
2000 throw UnknownPropertyException(rPropertyName);
2001
2002 if(pDocRule)
2003 {
2004 assert(m_pDocShell);
2005 m_pDocShell->GetDoc()->SetOutlineNumRule(*pDocRule);
2006 pDocRule.reset();
2007 }
2008 else if(pCreatedRule)
2009 {
2010 pCreatedRule->Validate(*m_pDoc);
2011 }
2012}
2013
2014Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
2015{
2016 Any aRet;
2017 const SwNumRule* pRule = m_pNumRule;
2018 if(!pRule && m_pDocShell)
2019 pRule = m_pDocShell->GetDoc()->GetOutlineNumRule();
2020 else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2022 if(!pRule)
2023 throw RuntimeException();
2024
2025 if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2026 {
2027 aRet <<= pRule->IsAutoRule();
2028 }
2029 else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2030 {
2031 aRet <<= pRule->IsContinusNum();
2032 }
2033 else if(rPropertyName == UNO_NAME_NAME)
2034 aRet <<= pRule->GetName();
2035 else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2036 {
2037 aRet <<= pRule->IsAbsSpaces();
2038 }
2039 else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2040 {
2041 aRet <<= pRule->IsOutlineRule();
2042 }
2043 else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2044 {
2045 OSL_ENSURE( !pRule->GetDefaultListId().isEmpty(),
2046 "<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect." );
2047 aRet <<= pRule->GetDefaultListId();
2048 }
2049 else
2050 throw UnknownPropertyException(rPropertyName);
2051 return aRet;
2052}
2053
2055 const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2056{
2057}
2058
2060 const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2061{
2062}
2063
2065 const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2066{
2067}
2068
2070 const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2071{
2072}
2073
2075{
2076 if(m_pNumRule)
2077 {
2078 OUString aString;
2080 return aString;
2081 }
2082 // consider chapter numbering <SwXNumberingRules>
2083 if ( m_pDocShell )
2084 {
2085 OUString aString;
2088 return aString;
2089 }
2090 return m_sCreatedNumRuleName;
2091}
2092
2093void SwXNumberingRules::setName(const OUString& /*rName*/)
2094{
2095 RuntimeException aExcept;
2096 aExcept.Message = "readonly";
2097 throw aExcept;
2098}
2099
2101{
2102 if(rHint.GetId() == SfxHintId::Dying)
2103 {
2105 delete m_rParent.m_pNumRule;
2106 m_rParent.m_pNumRule = nullptr;
2107 m_rParent.m_pDoc = nullptr;
2108 }
2109}
2110
2112{
2113 return "SwXChapterNumbering";
2114}
2115
2117{
2118 return cppu::supportsService(this, rServiceName);
2119}
2120
2122{
2123 return { "com.sun.star.text.ChapterNumbering", "com.sun.star.text.NumberingRules" };
2124}
2125
2127 SwXNumberingRules(rDocSh)
2128{
2129}
2130
2132{
2133}
2134
2135/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
PropertyValueVector_t aPropertyValues
constexpr auto convertTwipToMm100(N n)
const Any & any
GPOS_AREA
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
bool IsNone() const
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
SfxHintId GetId() const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const OUString & GetName() const
SfxMedium * GetMedium() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) const
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Graphic * GetGraphic(OUString const &referer=OUString()) const
const FontList * GetFontList() const
void SetStart(sal_uInt16 nSet)
tools::Long GetIndentAt() const
void SetAbsLSpace(sal_Int32 nSet)
void SetPositionAndSpaceMode(SvxNumPositionAndSpaceMode ePositionAndSpaceMode)
void SetFirstLineIndent(const tools::Long nFirstLineIndent)
sal_uInt8 GetIncludeUpperLevels() const
const SvxBrushItem * GetBrush() const
void SetBulletFont(const vcl::Font *pFont)
OUString GetListFormat(bool bIncludePrefixSuffix=true) const
sal_Int32 GetFirstLineOffset() const
tools::Long GetFirstLineIndent() const
const std::optional< vcl::Font > & GetBulletFont() const
void SetSuffix(const OUString &rSet)
sal_UCS4 GetBulletChar() const
void SetCharTextDistance(short nSet)
const Size & GetGraphicSize() const
sal_uInt16 GetStart() const
sal_Int32 GetAbsLSpace() const
LabelFollowedBy GetLabelFollowedBy() const
void SetListFormat(const OUString &rPrefix, const OUString &rSuffix, int nLevel)
tools::Long GetListtabPos() const
void SetNumAdjust(SvxAdjust eSet)
SvxAdjust GetNumAdjust() const
void SetIncludeUpperLevels(sal_uInt8 nSet)
void SetIndentAt(const tools::Long nIndentAt)
bool HasListFormat() const
void SetFirstLineOffset(sal_Int32 nSet)
SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const
void SetPrefix(const OUString &rSet)
void SetBulletChar(sal_UCS4 cSet)
const OUString & GetPrefix() const
void SetLabelFollowedBy(const LabelFollowedBy eLabelFollowedBy)
void SetListtabPos(const tools::Long nListtabPos)
const OUString & GetSuffix() const
short GetCharTextDistance() const
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
static void ConvertFromFont(const vcl::Font &rFont, css::awt::FontDescriptor &rDesc)
static void ConvertToFont(const css::awt::FontDescriptor &rDesc, vcl::Font &rFont)
Represents the style of a text portion.
Definition: charfmt.hxx:27
size_t size() const
Definition: charformats.hxx:71
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1154
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
Definition: doc.hxx:194
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:947
const SwFootnoteInfo & GetFootnoteInfo() const
Definition: doc.hxx:638
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
Definition: docnum.cxx:2519
SwNumRule * FindNumRulePtr(const OUString &rName) const
Definition: docnum.cxx:2441
SwNumRule * GetOutlineNumRule() const
Definition: doc.hxx:1032
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:779
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:748
const SwLineNumberInfo & GetLineNumberInfo() const
Definition: lineinfo.cxx:49
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
Definition: docftn.cxx:294
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:649
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:786
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:640
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:432
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
Definition: docftn.cxx:365
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: doc.hxx:807
void SetLineNumberInfo(const SwLineNumberInfo &rInfo)
Definition: lineinfo.cxx:30
bool DelNumRule(const OUString &rName, bool bBroadCast=false)
Definition: docnum.cxx:1053
SwDocShell * GetDocShell()
Definition: doc.hxx:1359
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
Definition: docnum.cxx:2475
void SetOutlineNumRule(const SwNumRule &rRule)
Definition: docnum.cxx:112
void SetPrefix(const OUString &rSet)
Definition: ftninfo.hxx:73
void SetCharFormat(SwCharFormat *)
Definition: docftn.cxx:172
SwCharFormat * GetCurrentCharFormat(const bool bAnchor) const
Definition: docftn.cxx:205
SwPageDesc * GetPageDesc(SwDoc &rDoc) const
Definition: docftn.cxx:105
const OUString & GetPrefix() const
Definition: ftninfo.hxx:70
void ChgPageDesc(SwPageDesc *pDesc)
Definition: docftn.cxx:126
void SetSuffix(const OUString &rSet)
Definition: ftninfo.hxx:74
sal_uInt16 m_nFootnoteOffset
Definition: ftninfo.hxx:47
bool KnowsPageDesc() const
Definition: docftn.cxx:116
const OUString & GetSuffix() const
Definition: ftninfo.hxx:71
SvxNumberType m_aFormat
Definition: ftninfo.hxx:46
void SetFootnoteTextColl(SwTextFormatColl &rColl)
Definition: docftn.cxx:133
SwTextFormatColl * GetFootnoteTextColl() const
Definition: ftninfo.hxx:55
void SetAnchorCharFormat(SwCharFormat *)
Definition: docftn.cxx:195
OUString m_aErgoSum
Definition: ftninfo.hxx:96
SwFootnoteNum m_eNum
Definition: ftninfo.hxx:98
SwFootnotePos m_ePos
Definition: ftninfo.hxx:97
OUString m_aQuoVadis
Definition: ftninfo.hxx:95
Defines the vertical position of a fly frame.
Definition: fmtornt.hxx:37
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: atrfrm.cxx:1391
virtual SwFormatVertOrient * Clone(SfxItemPool *pPool=nullptr) const override
Definition: atrfrm.cxx:1386
bool IsDefault() const
Definition: format.hxx:129
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:139
const OUString & GetName() const
Definition: format.hxx:131
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:39
void SetPaintLineNumbers(bool b)
Definition: lineinfo.hxx:81
void SetPos(LineNumberPosition eP)
Definition: lineinfo.hxx:78
const OUString & GetDivider() const
Definition: lineinfo.hxx:66
void SetDividerCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:69
sal_uInt16 GetCountBy() const
Definition: lineinfo.hxx:74
const SvxNumberType & GetNumType() const
Definition: lineinfo.hxx:63
void SetDivider(const OUString &r)
Definition: lineinfo.hxx:67
bool IsRestartEachPage() const
Definition: lineinfo.hxx:89
void SetCharFormat(SwCharFormat *)
Definition: lineinfo.cxx:109
void SetCountBlankLines(bool b)
Definition: lineinfo.hxx:84
SwCharFormat * GetCharFormat(IDocumentStylePoolAccess &rIDSPA) const
Definition: lineinfo.cxx:99
void SetRestartEachPage(bool b)
Definition: lineinfo.hxx:90
bool IsPaintLineNumbers() const
Definition: lineinfo.hxx:80
bool HasCharFormat() const
Definition: lineinfo.hxx:92
void SetNumType(SvxNumberType aNew)
Definition: lineinfo.hxx:64
void SetCountBy(sal_uInt16 n)
Definition: lineinfo.hxx:75
bool IsCountBlankLines() const
Definition: lineinfo.hxx:83
void SetPosFromLeft(sal_uInt16 n)
Definition: lineinfo.hxx:72
sal_uInt16 GetPosFromLeft() const
Definition: lineinfo.hxx:71
bool IsCountInFlys() const
Definition: lineinfo.hxx:86
sal_uInt16 GetDividerCountBy() const
Definition: lineinfo.hxx:68
void SetCountInFlys(bool b)
Definition: lineinfo.hxx:87
LineNumberPosition GetPos() const
Definition: lineinfo.hxx:77
SwCharFormat * GetCharFormat() const
Definition: numrule.hxx:74
void SetCharFormat(SwCharFormat *)
Definition: number.cxx:281
const SwFormatVertOrient * GetGraphicOrientation() const
Definition: number.cxx:352
virtual void SetGraphicBrush(const SvxBrushItem *pBrushItem, const Size *pSize=nullptr, const sal_Int16 *pOrient=nullptr) override
Definition: number.cxx:319
void SetCharFormatName(const OUString &rSet)
void SetAutoRule(bool bFlag)
Definition: numrule.hxx:230
bool IsAutoRule() const
Definition: numrule.hxx:229
void SetRuleType(SwNumRuleType eNew)
Definition: numrule.hxx:212
void SetAbsSpaces(bool bFlag)
Definition: numrule.hxx:239
bool IsOutlineRule() const
Definition: numrule.hxx:241
bool IsContinusNum() const
Definition: numrule.hxx:235
const OUString & GetDefaultListId() const
Definition: numrule.hxx:194
const SwNumFormat & Get(sal_uInt16 i) const
Definition: number.cxx:87
void Set(sal_uInt16 i, const SwNumFormat *)
Definition: number.cxx:618
const OUString & GetName() const
Definition: numrule.hxx:224
void SetContinusNum(bool bFlag)
Definition: numrule.hxx:236
void Validate(const SwDoc &rDoc)
Definition: number.cxx:1075
bool IsAbsSpaces() const
Definition: numrule.hxx:238
const OUString & GetName() const
Definition: pagedesc.hxx:196
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
Represents the style of a paragraph.
Definition: fmtcol.hxx:59
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:120
void DeleteAssignmentToListLevelOfOutlineStyle()
Definition: fmtcol.cxx:651
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:347
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
Definition: fmtcol.cxx:624
int GetAssignedOutlineStyleLevel() const
Definition: fmtcol.cxx:617
size_t size() const
Definition: docary.hxx:87
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:2111
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2116
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:2121
SwXChapterNumbering(SwDocShell &rDocSh)
Definition: unosett.cxx:2126
virtual ~SwXChapterNumbering() override
Definition: unosett.cxx:2131
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:726
virtual ~SwXEndnoteProperties() override
Definition: unosett.cxx:551
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:82
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:720
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:561
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:708
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:714
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:534
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:529
SwXEndnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:545
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:555
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:635
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:539
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:282
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:517
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:523
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:52
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:276
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:254
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:402
virtual ~SwXFootnoteProperties() override
Definition: unosett.cxx:271
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:505
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:511
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:259
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:249
SwXFootnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:265
virtual ~SwXLineNumberingProperties() override
Definition: unosett.cxx:753
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:963
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:741
SwXLineNumberingProperties(SwDoc *pDoc)
Definition: unosett.cxx:747
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:973
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:731
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:877
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:968
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:112
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:736
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:763
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:978
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:757
virtual void Notify(const SfxHint &) override
Definition: unosett.cxx:2100
Impl(SwXNumberingRules &rParent)
Definition: unosett.cxx:991
SwXNumberingRules & m_rParent
Definition: unosett.cxx:988
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosett.cxx:1003
bool m_bOwnNumRuleCreated
Definition: unosett.hxx:155
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: unosett.cxx:1010
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:1015
virtual OUString SAL_CALL getName() override
Definition: unosett.cxx:2074
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:2059
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2064
virtual ~SwXNumberingRules() override
Definition: unosett.cxx:1086
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2069
virtual sal_Bool SAL_CALL hasElements() override
Definition: unosett.cxx:1201
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unosett.cxx:1196
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:2054
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
Definition: unosett.cxx:1168
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:154
void SetNumberingRuleByIndex(SwNumRule &rNumRule, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, sal_Int32 nIndex)
Definition: unosett.cxx:1447
SwDocShell * m_pDocShell
Definition: unosett.hxx:152
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:1946
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:1025
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:1020
SwNumRule * m_pNumRule
Definition: unosett.hxx:153
virtual void SAL_CALL setName(const OUString &Name_) override
Definition: unosett.cxx:2093
css::uno::Sequence< css::beans::PropertyValue > GetNumberingRuleByIndex(const SwNumRule &rNumRule, sal_Int32 nIndex) const
Definition: unosett.cxx:1220
static bool isInvalidStyle(std::u16string_view rName)
Definition: unosett.cxx:994
OUString m_sNewBulletFontNames[MAXLEVEL]
Definition: unosett.hxx:149
static css::uno::Sequence< css::beans::PropertyValue > GetPropertiesForNumFormat(const SwNumFormat &rFormat, OUString const &rCharFormatName, OUString const *pHeadingStyleName, OUString const &referer)
Definition: unosett.cxx:1283
static void SetPropertiesToNumFormat(SwNumFormat &aFormat, OUString &rCharStyleName, OUString *const pBulletFontName, OUString *const pHeadingStyleName, OUString *const pParagraphStyleName, SwDoc *const pDoc, SwDocShell *const pDocShell, css::uno::Sequence< css::beans::PropertyValue > const &rProperties)
Definition: unosett.cxx:1503
virtual sal_Int32 SAL_CALL getCount() override
Definition: unosett.cxx:1163
OUString m_sNewCharStyleNames[MAXLEVEL]
Definition: unosett.hxx:148
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unosett.hxx:145
OUString m_sCreatedNumRuleName
Definition: unosett.hxx:150
virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const css::uno::Any &Element) override
Definition: unosett.cxx:1095
SwXNumberingRules(SwDocShell &rDocSh)
Definition: unosett.cxx:1060
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:2014
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:1940
const css::uno::Sequence< sal_Int8 > & getSeq() const
css::uno::Type const & get()
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:102
int nCount
URL aURL
float u
sal_Int16 nValue
ITALIC_NONE
WEIGHT_NORMAL
@ FTNNUM_PAGE
Definition: ftninfo.hxx:87
@ FTNNUM_DOC
Definition: ftninfo.hxx:87
@ FTNNUM_CHAPTER
Definition: ftninfo.hxx:87
@ FTNPOS_CHAPTER
Definition: ftninfo.hxx:82
@ FTNPOS_PAGE
Definition: ftninfo.hxx:81
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
sal_Int32 nIndex
#define PROPERTY_NONE
@ LINENUMBER_POS_LEFT
Definition: lineinfo.hxx:31
@ LINENUMBER_POS_RIGHT
Definition: lineinfo.hxx:32
@ LINENUMBER_POS_INSIDE
Definition: lineinfo.hxx:33
@ LINENUMBER_POS_OUTSIDE
Definition: lineinfo.hxx:34
sal_uInt16 nPos
OUString sBulletFontName
#define SAL_WARN(area, stream)
size
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
Definition: number.cxx:1561
constexpr auto toTwips(N number, Length from)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
SwNumRuleType
Definition: numrule.hxx:92
@ OUTLINE_RULE
Definition: numrule.hxx:92
@ NUM_RULE
Definition: numrule.hxx:92
sal_Int16 nId
@ RES_POOLPAGE_STANDARD
Standard page.
Definition: poolfmt.hxx:170
@ RES_POOLCHR_BULLET_LEVEL
Bullets.
Definition: poolfmt.hxx:118
SvxNumType
SVX_NUM_ARABIC
SVX_NUM_BITMAP
SVX_NUM_CHAR_SPECIAL
SvxAdjust
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
Definition: swtypes.cxx:28
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
unsigned char sal_uInt8
#define SAL_MAX_UINT16
unsigned char sal_Bool
#define WID_DEFAULT_LIST_ID
Definition: unomap.hxx:307
#define WID_CONTINUOUS
Definition: unomap.hxx:303
#define WID_RULE_NAME
Definition: unomap.hxx:304
#define WID_IS_AUTOMATIC
Definition: unomap.hxx:302
#define WID_IS_OUTLINE
Definition: unomap.hxx:306
#define WID_IS_ABS_MARGINS
Definition: unomap.hxx:305
#define MID_VERTORIENT_ORIENT
Definition: unomid.h:34
#define UNO_NAME_BULLET_COLOR
Definition: unoprnms.hxx:52
#define UNO_NAME_IS_AUTOMATIC
Definition: unoprnms.hxx:472
#define UNO_NAME_PARAGRAPH_STYLE_NAME
Definition: unoprnms.hxx:834
#define UNO_NAME_NAME
Definition: unoprnms.hxx:81
#define UNO_NAME_INDENT_AT
Definition: unoprnms.hxx:800
#define UNO_NAME_ADJUST
Definition: unoprnms.hxx:477
#define UNO_NAME_LISTTAB_STOP_POSITION
Definition: unoprnms.hxx:798
#define UNO_NAME_START_AT
Definition: unoprnms.hxx:312
#define UNO_NAME_PAGE_STYLE_NAME
Definition: unoprnms.hxx:174
#define UNO_NAME_SEPARATOR_TEXT
Definition: unoprnms.hxx:172
#define UNO_NAME_BULLET_FONT
Definition: unoprnms.hxx:50
#define UNO_NAME_IS_CONTINUOUS_NUMBERING
Definition: unoprnms.hxx:471
#define UNO_NAME_FOOTNOTE_COUNTING
Definition: unoprnms.hxx:260
#define UNO_NAME_LIST_FORMAT
Definition: unoprnms.hxx:86
#define UNO_NAME_BULLET_ID
Definition: unoprnms.hxx:47
#define UNO_NAME_GRAPHIC_SIZE
Definition: unoprnms.hxx:44
#define UNO_NAME_POSITION_END_OF_DOC
Definition: unoprnms.hxx:187
#define UNO_NAME_BEGIN_NOTICE
Definition: unoprnms.hxx:150
#define UNO_NAME_LABEL_FOLLOWED_BY
Definition: unoprnms.hxx:797
#define UNO_NAME_FIRST_LINE_INDENT
Definition: unoprnms.hxx:799
#define UNO_NAME_DEFAULT_LIST_ID
Definition: unoprnms.hxx:806
#define UNO_NAME_INTERVAL
Definition: unoprnms.hxx:279
#define UNO_NAME_SEPARATOR_INTERVAL
Definition: unoprnms.hxx:208
#define UNO_NAME_PARA_STYLE_NAME
Definition: unoprnms.hxx:178
#define UNO_NAME_IS_ON
Definition: unoprnms.hxx:532
#define UNO_NAME_GRAPHIC_BITMAP
Definition: unoprnms.hxx:45
#define UNO_NAME_COUNT_LINES_IN_FRAMES
Definition: unoprnms.hxx:155
#define UNO_NAME_ANCHOR_CHAR_STYLE_NAME
Definition: unoprnms.hxx:83
#define UNO_NAME_LEFT_MARGIN
Definition: unoprnms.hxx:71
#define UNO_NAME_IS_ABSOLUTE_MARGINS
Definition: unoprnms.hxx:473
#define UNO_NAME_GRAPHIC_URL
Definition: unoprnms.hxx:46
#define UNO_NAME_DISTANCE
Definition: unoprnms.hxx:160
#define UNO_NAME_NUMBERING_IS_OUTLINE
Definition: unoprnms.hxx:755
#define UNO_NAME_HEADING_STYLE_NAME
Definition: unoprnms.hxx:462
#define UNO_NAME_POSITION_AND_SPACE_MODE
Definition: unoprnms.hxx:796
#define UNO_NAME_FIRST_LINE_OFFSET
Definition: unoprnms.hxx:416
#define UNO_NAME_END_NOTICE
Definition: unoprnms.hxx:149
#define UNO_NAME_NUMBER_POSITION
Definition: unoprnms.hxx:173
#define UNO_NAME_BULLET_REL_SIZE
Definition: unoprnms.hxx:49
#define UNO_NAME_BULLET_FONT_NAME
Definition: unoprnms.hxx:51
#define UNO_NAME_SYMBOL_TEXT_DISTANCE
Definition: unoprnms.hxx:417
#define UNO_NAME_START_WITH
Definition: unoprnms.hxx:313
#define UNO_NAME_COUNT_EMPTY_LINES
Definition: unoprnms.hxx:247
#define UNO_NAME_VERT_ORIENT
Definition: unoprnms.hxx:335
#define UNO_NAME_RESTART_AT_EACH_PAGE
Definition: unoprnms.hxx:248
#define UNO_NAME_GRAPHIC
Definition: unoprnms.hxx:165
#define WID_END_NOTICE
Definition: unosett.cxx:99
static SwTextFormatColl * lcl_GetParaStyle(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:206
#define WID_SEPARATOR_TEXT
Definition: unosett.cxx:107
#define WID_PREFIX
Definition: unosett.cxx:90
static const SfxItemPropertySet * GetLineNumberingSet()
Definition: unosett.cxx:166
#define WID_SUFFIX
Definition: unosett.cxx:91
#define WID_NUMBERING_TYPE
Definition: unosett.cxx:92
#define WID_PAGE_STYLE
Definition: unosett.cxx:96
#define WID_CHARACTER_STYLE
Definition: unosett.cxx:97
#define WID_RESTART_AT_EACH_PAGE
Definition: unosett.cxx:110
#define WID_START_AT
Definition: unosett.cxx:93
const TranslateId STR_POOLCOLL_HEADLINE_ARY[]
Definition: unosett.cxx:1207
static const SfxItemPropertySet * GetNumberingRulesSet()
Definition: unosett.cxx:151
#define WID_FOOTNOTE_COUNTING
Definition: unosett.cxx:94
#define WID_DISTANCE
Definition: unosett.cxx:105
static SwCharFormat * lcl_getCharFormat(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:186
#define WID_POSITION_END_OF_DOC
Definition: unosett.cxx:98
#define WID_NUMBER_POSITION
Definition: unosett.cxx:104
#define WID_ANCHOR_CHARACTER_STYLE
Definition: unosett.cxx:101
#define WID_COUNT_LINES_IN_FRAMES
Definition: unosett.cxx:109
static const SfxItemPropertySet * GetEndnoteSet()
Definition: unosett.cxx:134
static const SfxItemPropertySet * GetFootnoteSet()
Definition: unosett.cxx:113
#define WID_BEGIN_NOTICE
Definition: unosett.cxx:100
const o3tl::enumarray< SvxAdjust, sal_Int16 > aSvxToUnoAdjust
Definition: unosett.cxx:240
#define WID_NUM_ON
Definition: unosett.cxx:102
#define WID_PARAGRAPH_STYLE
Definition: unosett.cxx:95
#define WID_SEPARATOR_INTERVAL
Definition: unosett.cxx:103
#define WID_INTERVAL
Definition: unosett.cxx:106
#define WID_COUNT_EMPTY_LINES
Definition: unosett.cxx:108
static SwPageDesc * lcl_GetPageDesc(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:222
constexpr OUStringLiteral aInvalidStyle
Definition: unosett.cxx:983
constexpr OUStringLiteral UNO_NAME_NUMBERING_TYPE
constexpr OUStringLiteral UNO_NAME_SUFFIX
constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME
constexpr OUStringLiteral UNO_NAME_PARENT_NUMBERING
constexpr OUStringLiteral UNO_NAME_BULLET_CHAR
constexpr OUStringLiteral UNO_NAME_PREFIX
sal_uInt32 sal_UCS4