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 <unostyle.hxx>
29 #include <unosett.hxx>
30 #include <unoprnms.hxx>
31 #include <ftninfo.hxx>
32 #include <doc.hxx>
33 #include <pagedesc.hxx>
35 #include <charfmt.hxx>
36 #include <lineinfo.hxx>
37 #include <docsh.hxx>
38 #include <docary.hxx>
39 #include <docstyle.hxx>
40 #include <fmtclds.hxx>
41 #include <editeng/brushitem.hxx>
42 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
43 #include <com/sun/star/text/FootnoteNumbering.hpp>
44 #include <com/sun/star/text/HoriOrientation.hpp>
45 #include <com/sun/star/style/LineNumberPosition.hpp>
46 #include <com/sun/star/awt/FontDescriptor.hpp>
47 #include <com/sun/star/awt/XBitmap.hpp>
48 #include <com/sun/star/graphic/XGraphic.hpp>
49 #include <com/sun/star/beans/PropertyAttribute.hpp>
50 #include <com/sun/star/style/VerticalAlignment.hpp>
51 #include <o3tl/any.hxx>
52 #include <o3tl/enumarray.hxx>
53 #include <tools/UnitConversion.hxx>
54 #include <vcl/font.hxx>
55 #include <editeng/flstitem.hxx>
56 #include <vcl/metric.hxx>
57 #include <vcl/graph.hxx>
58 #include <vcl/GraphicLoader.hxx>
59 #include <sfx2/docfile.hxx>
60 #include <svtools/ctrltool.hxx>
61 #include <vcl/svapp.hxx>
62 #include <editeng/unofdesc.hxx>
63 #include <fmtornt.hxx>
64 #include <SwStyleNameMapper.hxx>
65 #include <com/sun/star/text/PositionAndSpaceMode.hpp>
66 #include <com/sun/star/text/LabelFollow.hpp>
67 #include <numrule.hxx>
69 #include <comphelper/sequence.hxx>
72 #include <svl/itemprop.hxx>
73 #include <svl/listener.hxx>
74 #include <paratr.hxx>
75 #include <sal/log.hxx>
76 #include <numeric>
77 
78 using namespace ::com::sun::star;
79 using namespace ::com::sun::star::uno;
80 using namespace ::com::sun::star::lang;
81 using namespace ::com::sun::star::beans;
82 using namespace ::com::sun::star::text;
83 using namespace ::com::sun::star::style;
84 
85 
86 namespace
87 {
88  SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc)
89  {
91  }
92 }
93 // Constants for the css::text::ColumnSeparatorStyle
94 #define API_COL_LINE_NONE 0
95 #define API_COL_LINE_SOLID 1
96 #define API_COL_LINE_DOTTED 2
97 #define API_COL_LINE_DASHED 3
98 
99 #define WID_PREFIX 0
100 #define WID_SUFFIX 1
101 #define WID_NUMBERING_TYPE 2
102 #define WID_START_AT 3
103 #define WID_FOOTNOTE_COUNTING 4
104 #define WID_PARAGRAPH_STYLE 5
105 #define WID_PAGE_STYLE 6
106 #define WID_CHARACTER_STYLE 7
107 #define WID_POSITION_END_OF_DOC 8
108 #define WID_END_NOTICE 9
109 #define WID_BEGIN_NOTICE 10
110 #define WID_ANCHOR_CHARACTER_STYLE 11
111 #define WID_NUM_ON 12
112 #define WID_SEPARATOR_INTERVAL 13
113 #define WID_NUMBER_POSITION 14
114 #define WID_DISTANCE 15
115 #define WID_INTERVAL 16
116 #define WID_SEPARATOR_TEXT 17
117 #define WID_COUNT_EMPTY_LINES 18
118 #define WID_COUNT_LINES_IN_FRAMES 19
119 #define WID_RESTART_AT_EACH_PAGE 20
120 
121 
123 {
124  static const SfxItemPropertyMapEntry aFootnoteMap_Impl[] =
125  {
138  { u"", 0, css::uno::Type(), 0, 0 }
139  };
140  static const SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl);
141  return &aFootnoteSet_Impl;
142 }
143 
145 {
146  static const SfxItemPropertyMapEntry aEndnoteMap_Impl[] =
147  {
156  { u"", 0, css::uno::Type(), 0, 0 }
157  };
158  static const SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl);
159  return &aEndnoteSet_Impl;
160 }
161 
163 {
164  static const SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] =
165  {
169  { u"" UNO_NAME_NAME, WID_RULE_NAME , ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
171  { u"" UNO_NAME_DEFAULT_LIST_ID, WID_DEFAULT_LIST_ID, ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
172  { u"", 0, css::uno::Type(), 0, 0 }
173  };
174  static const SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl );
175  return &aNumberingRulesSet_Impl;
176 }
177 
179 {
180  static const SfxItemPropertyMapEntry aLineNumberingMap_Impl[] =
181  {
193  { u"", 0, css::uno::Type(), 0, 0 }
194  };
195  static const SfxItemPropertySet aLineNumberingSet_Impl(aLineNumberingMap_Impl);
196  return &aLineNumberingSet_Impl;
197 }
198 
199 static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
200 {
201  SwCharFormat* pRet = nullptr;
202  OUString uTmp;
203  aValue >>= uTmp;
204  OUString sCharFormat;
206  if (sCharFormat != SwResId(STR_POOLCHR_STANDARD))
207  {
208  pRet = pDoc->FindCharFormatByName( sCharFormat );
209  }
210  if(!pRet)
211  {
213  if(USHRT_MAX != nId)
215  }
216  return pRet;
217 }
218 
219 static SwTextFormatColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
220 {
221  OUString uTmp;
222  aValue >>= uTmp;
223  OUString sParaStyle;
225  SwTextFormatColl* pRet = pDoc->FindTextFormatCollByName( sParaStyle );
226  if( !pRet )
227  {
229  if( USHRT_MAX != nId )
230  pRet = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId );
231  }
232  return pRet;
233 }
234 
235 static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
236 {
237  OUString uTmp;
238  aValue >>= uTmp;
239  OUString sPageDesc;
241  SwPageDesc* pRet = pDoc->FindPageDesc( sPageDesc );
242  if(!pRet)
243  {
245  if(USHRT_MAX != nId)
246  pRet = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nId );
247  }
248  return pRet;
249 }
250 
251 // Numbering
253 {
254  text::HoriOrientation::LEFT, //3
255  text::HoriOrientation::RIGHT, //1
256  USHRT_MAX,
257  text::HoriOrientation::CENTER, //2
258  USHRT_MAX,
259  USHRT_MAX
260 };
261 
262 const unsigned short aUnoToSvxAdjust[] =
263 {
264  USHRT_MAX,
265  static_cast<unsigned short>(SvxAdjust::Right), // 1
266  static_cast<unsigned short>(SvxAdjust::Center), // 3
267  static_cast<unsigned short>(SvxAdjust::Left), // 0
268  USHRT_MAX,
269  USHRT_MAX
270 };
271 
273 {
274  return "SwXFootnoteProperties";
275 }
276 
278 {
279  return cppu::supportsService(this, rServiceName);
280 }
281 
283 {
284  Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
285  return aRet;
286 }
287 
289  m_pDoc(pDc),
290  m_pPropertySet(GetFootnoteSet())
291 {
292 }
293 
295 {
296 
297 }
298 
299 uno::Reference< beans::XPropertySetInfo > SwXFootnoteProperties::getPropertySetInfo()
300 {
301  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
302  return aRef;
303 }
304 
305 void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
306 {
307  SolarMutexGuard aGuard;
308  if(!m_pDoc)
309  throw uno::RuntimeException();
310 
311  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
312  if(!pEntry)
313  throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
314 
315  if ( pEntry->nFlags & PropertyAttribute::READONLY)
316  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
317  SwFootnoteInfo aFootnoteInfo(m_pDoc->GetFootnoteInfo());
318  switch(pEntry->nWID)
319  {
320  case WID_PREFIX:
321  {
322  OUString uTmp;
323  aValue >>= uTmp;
324  aFootnoteInfo.SetPrefix(uTmp);
325  }
326  break;
327  case WID_SUFFIX:
328  {
329  OUString uTmp;
330  aValue >>= uTmp;
331  aFootnoteInfo.SetSuffix(uTmp);
332  }
333  break;
334  case WID_NUMBERING_TYPE:
335  {
336  sal_Int16 nTmp = 0;
337  aValue >>= nTmp;
338  if(!(nTmp >= 0 &&
339  (nTmp <= SVX_NUM_ARABIC ||
340  nTmp > SVX_NUM_BITMAP)))
341  throw lang::IllegalArgumentException();
342 
343  aFootnoteInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
344 
345  }
346  break;
347  case WID_START_AT:
348  {
349  sal_Int16 nTmp = 0;
350  aValue >>= nTmp;
351  aFootnoteInfo.m_nFootnoteOffset = nTmp;
352  }
353  break;
355  {
356  sal_Int16 nTmp = 0;
357  aValue >>= nTmp;
358  switch(nTmp)
359  {
360  case FootnoteNumbering::PER_PAGE:
361  aFootnoteInfo.m_eNum = FTNNUM_PAGE;
362  break;
363  case FootnoteNumbering::PER_CHAPTER:
364  aFootnoteInfo.m_eNum = FTNNUM_CHAPTER;
365  break;
366  case FootnoteNumbering::PER_DOCUMENT:
367  aFootnoteInfo.m_eNum = FTNNUM_DOC;
368  break;
369  }
370  }
371  break;
372  case WID_PARAGRAPH_STYLE:
373  {
374  SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
375  if(pColl)
376  aFootnoteInfo.SetFootnoteTextColl(*pColl);
377  }
378  break;
379  case WID_PAGE_STYLE:
380  {
382  if(pDesc)
383  aFootnoteInfo.ChgPageDesc( pDesc );
384  }
385  break;
387  case WID_CHARACTER_STYLE:
388  {
389  SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
390  if(pFormat)
391  {
392  if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
393  aFootnoteInfo.SetAnchorCharFormat(pFormat);
394  else
395  aFootnoteInfo.SetCharFormat(pFormat);
396  }
397  }
398  break;
400  {
401  bool bVal = *o3tl::doAccess<bool>(aValue);
402  aFootnoteInfo.m_ePos = bVal ? FTNPOS_CHAPTER : FTNPOS_PAGE;
403  }
404  break;
405  case WID_END_NOTICE:
406  {
407  OUString uTmp;
408  aValue >>= uTmp;
409  aFootnoteInfo.m_aQuoVadis = uTmp;
410  }
411  break;
412  case WID_BEGIN_NOTICE:
413  {
414  OUString uTmp;
415  aValue >>= uTmp;
416  aFootnoteInfo.m_aErgoSum = uTmp;
417  }
418  break;
419  }
420  m_pDoc->SetFootnoteInfo(aFootnoteInfo);
421 
422 
423 }
424 
425 uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
426 {
427  SolarMutexGuard aGuard;
428  uno::Any aRet;
429  if(!m_pDoc)
430  throw uno::RuntimeException();
431 
432  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
433  if(!pEntry)
434  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
435 
436  const SwFootnoteInfo& rFootnoteInfo = m_pDoc->GetFootnoteInfo();
437  switch(pEntry->nWID)
438  {
439  case WID_PREFIX:
440  {
441  aRet <<= rFootnoteInfo.GetPrefix();
442  }
443  break;
444  case WID_SUFFIX:
445  {
446  aRet <<= rFootnoteInfo.GetSuffix();
447  }
448  break;
449  case WID_NUMBERING_TYPE :
450  {
451  aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_aFormat.GetNumberingType());
452  }
453  break;
454  case WID_START_AT:
455  aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_nFootnoteOffset);
456  break;
457  case WID_FOOTNOTE_COUNTING :
458  {
459  sal_Int16 nRet = 0;
460  switch(rFootnoteInfo.m_eNum)
461  {
462  case FTNNUM_PAGE:
463  nRet = FootnoteNumbering::PER_PAGE;
464  break;
465  case FTNNUM_CHAPTER:
466  nRet = FootnoteNumbering::PER_CHAPTER;
467  break;
468  case FTNNUM_DOC:
469  nRet = FootnoteNumbering::PER_DOCUMENT;
470  break;
471  }
472  aRet <<= nRet;
473  }
474  break;
475  case WID_PARAGRAPH_STYLE :
476  {
477  SwTextFormatColl* pColl = rFootnoteInfo.GetFootnoteTextColl();
478  OUString aString;
479  if(pColl)
480  aString = pColl->GetName();
482  aRet <<= aString;
483  }
484  break;
485  case WID_PAGE_STYLE :
486  {
487  OUString aString;
488  if( rFootnoteInfo.KnowsPageDesc() )
489  {
491  rFootnoteInfo.GetPageDesc( *m_pDoc )->GetName(),
492  aString,
494  }
495  aRet <<= aString;
496  }
497  break;
499  case WID_CHARACTER_STYLE:
500  {
501  OUString aString;
502  const SwCharFormat* pCharFormat = rFootnoteInfo.GetCurrentCharFormat(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE);
503  if( pCharFormat )
504  {
506  pCharFormat->GetName(),
507  aString,
509  }
510  aRet <<= aString;
511  }
512  break;
514  aRet <<= FTNPOS_CHAPTER == rFootnoteInfo.m_ePos;
515  break;
516  case WID_END_NOTICE :
517  aRet <<= rFootnoteInfo.m_aQuoVadis;
518  break;
519  case WID_BEGIN_NOTICE :
520  aRet <<= rFootnoteInfo.m_aErgoSum;
521  break;
522  }
523 
524 
525  return aRet;
526 }
527 
529  const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
530 {
531  OSL_FAIL("not implemented");
532 }
533 
535  const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
536 {
537  OSL_FAIL("not implemented");
538 }
539 
541  const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
542 {
543  OSL_FAIL("not implemented");
544 }
545 
547  const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
548 {
549  OSL_FAIL("not implemented");
550 }
551 
553 {
554  return "SwXEndnoteProperties";
555 }
556 
557 sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName)
558 {
559  return cppu::supportsService(this, rServiceName);
560 }
561 
563 {
564  Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
565  return aRet;
566 }
567 
569  m_pDoc(pDc),
570  m_pPropertySet(GetEndnoteSet())
571 {
572 }
573 
575 {
576 }
577 
578 uno::Reference< beans::XPropertySetInfo > SwXEndnoteProperties::getPropertySetInfo()
579 {
580  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
581  return aRef;
582 }
583 
584 void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
585 {
586  SolarMutexGuard aGuard;
587  if(!m_pDoc)
588  return;
589 
590  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
591  if(!pEntry)
592  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
593 
594  if ( pEntry->nFlags & PropertyAttribute::READONLY)
595  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
596  SwEndNoteInfo aEndInfo(m_pDoc->GetEndNoteInfo());
597  switch(pEntry->nWID)
598  {
599  case WID_PREFIX:
600  {
601  OUString uTmp;
602  aValue >>= uTmp;
603  aEndInfo.SetPrefix(uTmp);
604  }
605  break;
606  case WID_SUFFIX:
607  {
608  OUString uTmp;
609  aValue >>= uTmp;
610  aEndInfo.SetSuffix(uTmp);
611  }
612  break;
613  case WID_NUMBERING_TYPE :
614  {
615  sal_Int16 nTmp = 0;
616  aValue >>= nTmp;
617  aEndInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
618  }
619  break;
620  case WID_START_AT:
621  {
622  sal_Int16 nTmp = 0;
623  aValue >>= nTmp;
624  aEndInfo.m_nFootnoteOffset = nTmp;
625  }
626  break;
627  case WID_PARAGRAPH_STYLE :
628  {
629  SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
630  if(pColl)
631  aEndInfo.SetFootnoteTextColl(*pColl);
632  }
633  break;
634  case WID_PAGE_STYLE :
635  {
637  if(pDesc)
638  aEndInfo.ChgPageDesc( pDesc );
639  }
640  break;
642  case WID_CHARACTER_STYLE :
643  {
644  SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
645  if(pFormat)
646  {
647  if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
648  aEndInfo.SetAnchorCharFormat(pFormat);
649  else
650  aEndInfo.SetCharFormat(pFormat);
651  }
652  }
653  break;
654  }
655  m_pDoc->SetEndNoteInfo(aEndInfo);
656 }
657 
658 uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
659 {
660  SolarMutexGuard aGuard;
661  uno::Any aRet;
662  if(m_pDoc)
663  {
664  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
665  if(!pEntry)
666  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
667 
668  const SwEndNoteInfo& rEndInfo = m_pDoc->GetEndNoteInfo();
669  switch(pEntry->nWID)
670  {
671  case WID_PREFIX:
672  aRet <<= rEndInfo.GetPrefix();
673  break;
674  case WID_SUFFIX:
675  aRet <<= rEndInfo.GetSuffix();
676  break;
677  case WID_NUMBERING_TYPE :
678  aRet <<= static_cast<sal_Int16>(rEndInfo.m_aFormat.GetNumberingType());
679  break;
680  case WID_START_AT:
681  aRet <<= static_cast<sal_Int16>(rEndInfo.m_nFootnoteOffset);
682  break;
683  case WID_PARAGRAPH_STYLE :
684  {
685  SwTextFormatColl* pColl = rEndInfo.GetFootnoteTextColl();
686  OUString aString;
687  if(pColl)
688  aString = pColl->GetName();
690  aString,
691  aString,
693  aRet <<= aString;
694 
695  }
696  break;
697  case WID_PAGE_STYLE :
698  {
699  OUString aString;
700  if( rEndInfo.KnowsPageDesc() )
701  {
703  rEndInfo.GetPageDesc( *m_pDoc )->GetName(),
704  aString,
706  }
707  aRet <<= aString;
708  }
709  break;
711  case WID_CHARACTER_STYLE:
712  {
713  OUString aString;
714  const SwCharFormat* pCharFormat = rEndInfo.GetCurrentCharFormat( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE );
715  if( pCharFormat )
716  {
718  pCharFormat->GetName(),
719  aString,
721  }
722  aRet <<= aString;
723  }
724  break;
725  }
726 
727  }
728  return aRet;
729 }
730 
732  const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
733 {
734  OSL_FAIL("not implemented");
735 }
736 
737 void SwXEndnoteProperties::removePropertyChangeListener(const OUString& /*PropertyName*/,
738  const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
739 {
740  OSL_FAIL("not implemented");
741 }
742 
743 void SwXEndnoteProperties::addVetoableChangeListener(const OUString& /*PropertyName*/,
744  const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
745 {
746  OSL_FAIL("not implemented");
747 }
748 
749 void SwXEndnoteProperties::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
750 {
751  OSL_FAIL("not implemented");
752 }
753 
755 {
756  return "SwXLineNumberingProperties";
757 }
758 
760 {
761  return cppu::supportsService(this, rServiceName);
762 }
763 
765 {
766  Sequence<OUString> aRet { "com.sun.star.text.LineNumberingProperties" };
767  return aRet;
768 }
769 
771  m_pDoc(pDc),
772  m_pPropertySet(GetLineNumberingSet())
773 {
774 }
775 
777 {
778 }
779 
780 uno::Reference< beans::XPropertySetInfo > SwXLineNumberingProperties::getPropertySetInfo()
781 {
782  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
783  return aRef;
784 }
785 
787  const OUString& rPropertyName, const Any& aValue)
788 {
789  SolarMutexGuard aGuard;
790  if(!m_pDoc)
791  throw uno::RuntimeException();
792 
793  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
794  if(!pEntry)
795  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
796 
797  if ( pEntry->nFlags & PropertyAttribute::READONLY)
798  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
799  SwLineNumberInfo aFontMetric(m_pDoc->GetLineNumberInfo());
800  switch(pEntry->nWID)
801  {
802  case WID_NUM_ON:
803  {
804  bool bVal = *o3tl::doAccess<bool>(aValue);
805  aFontMetric.SetPaintLineNumbers(bVal);
806  }
807  break;
808  case WID_CHARACTER_STYLE :
809  {
810  SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
811  if(pFormat)
812  aFontMetric.SetCharFormat(pFormat);
813  }
814  break;
815  case WID_NUMBERING_TYPE :
816  {
817  SvxNumberType aNumType(aFontMetric.GetNumType());
818  sal_Int16 nTmp = 0;
819  aValue >>= nTmp;
820  aNumType.SetNumberingType(static_cast<SvxNumType>(nTmp));
821  aFontMetric.SetNumType(aNumType);
822  }
823  break;
824  case WID_NUMBER_POSITION :
825  {
826  sal_Int16 nTmp = 0;
827  aValue >>= nTmp;
828  switch(nTmp)
829  {
830  case style::LineNumberPosition::LEFT:
831  aFontMetric.SetPos(LINENUMBER_POS_LEFT);
832  break;
833  case style::LineNumberPosition::RIGHT :
834  aFontMetric.SetPos(LINENUMBER_POS_RIGHT);
835  break;
836  case style::LineNumberPosition::INSIDE:
837  aFontMetric.SetPos(LINENUMBER_POS_INSIDE);
838  break;
839  case style::LineNumberPosition::OUTSIDE:
840  aFontMetric.SetPos(LINENUMBER_POS_OUTSIDE);
841  break;
842  }
843  }
844  break;
845  case WID_DISTANCE :
846  {
847  sal_Int32 nVal = 0;
848  aValue >>= nVal;
849  sal_Int32 nTmp = convertMm100ToTwip(nVal);
850  if (nTmp > SAL_MAX_UINT16)
851  nTmp = SAL_MAX_UINT16;
852  aFontMetric.SetPosFromLeft( static_cast< sal_uInt16 >(nTmp) );
853  }
854  break;
855  case WID_INTERVAL :
856  {
857  sal_Int16 nTmp = 0;
858  aValue >>= nTmp;
859  if( nTmp > 0)
860  aFontMetric.SetCountBy(nTmp);
861  }
862  break;
863  case WID_SEPARATOR_TEXT :
864  {
865  OUString uTmp;
866  aValue >>= uTmp;
867  aFontMetric.SetDivider(uTmp);
868  }
869  break;
871  {
872  sal_Int16 nTmp = 0;
873  aValue >>= nTmp;
874  if( nTmp >= 0)
875  aFontMetric.SetDividerCountBy(nTmp);
876  }
877  break;
878  case WID_COUNT_EMPTY_LINES :
879  {
880  bool bVal = *o3tl::doAccess<bool>(aValue);
881  aFontMetric.SetCountBlankLines(bVal);
882  }
883  break;
885  {
886  bool bVal = *o3tl::doAccess<bool>(aValue);
887  aFontMetric.SetCountInFlys(bVal);
888  }
889  break;
891  {
892  bool bVal = *o3tl::doAccess<bool>(aValue);
893  aFontMetric.SetRestartEachPage(bVal);
894  }
895  break;
896  }
897  m_pDoc->SetLineNumberInfo(aFontMetric);
898 }
899 
900 Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
901 {
902  SolarMutexGuard aGuard;
903  Any aRet;
904  if(!m_pDoc)
905  throw uno::RuntimeException();
906 
907  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
908  if(!pEntry)
909  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
910 
911  const SwLineNumberInfo& rInfo = m_pDoc->GetLineNumberInfo();
912  switch(pEntry->nWID)
913  {
914  case WID_NUM_ON:
915  aRet <<= rInfo.IsPaintLineNumbers();
916  break;
917  case WID_CHARACTER_STYLE :
918  {
919  OUString aString;
920  // return empty string if no char format is set
921  // otherwise it would be created here
922  if(rInfo.HasCharFormat())
923  {
925  rInfo.GetCharFormat(m_pDoc->getIDocumentStylePoolAccess())->GetName(),
926  aString,
928  }
929  aRet <<= aString;
930  }
931  break;
932  case WID_NUMBERING_TYPE :
933  aRet <<= static_cast<sal_Int16>(rInfo.GetNumType().GetNumberingType());
934  break;
935  case WID_NUMBER_POSITION :
936  {
937  sal_Int16 nRet = 0;
938  switch(rInfo.GetPos())
939  {
940  case LINENUMBER_POS_LEFT:
941  nRet = style::LineNumberPosition::LEFT;
942  break;
943  case LINENUMBER_POS_RIGHT :
944  nRet = style::LineNumberPosition::RIGHT ;
945  break;
947  nRet = style::LineNumberPosition::INSIDE ;
948  break;
950  nRet = style::LineNumberPosition::OUTSIDE ;
951  break;
952  }
953  aRet <<= nRet;
954  }
955  break;
956  case WID_DISTANCE :
957  {
958  sal_uInt32 nPos = rInfo.GetPosFromLeft();
959  if(USHRT_MAX == nPos)
960  nPos = 0;
961  aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(nPos));
962  }
963  break;
964  case WID_INTERVAL :
965  aRet <<= static_cast<sal_Int16>(rInfo.GetCountBy());
966  break;
967  case WID_SEPARATOR_TEXT :
968  aRet <<= rInfo.GetDivider();
969  break;
971  aRet <<= static_cast<sal_Int16>(rInfo.GetDividerCountBy());
972  break;
973  case WID_COUNT_EMPTY_LINES :
974  aRet <<= rInfo.IsCountBlankLines();
975  break;
977  aRet <<= rInfo.IsCountInFlys();
978  break;
980  aRet <<= rInfo.IsRestartEachPage();
981  break;
982  }
983  return aRet;
984 }
985 
986 void SwXLineNumberingProperties::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
987 {
988 OSL_FAIL("not implemented");
989 }
990 
991 void SwXLineNumberingProperties::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
992 {
993 OSL_FAIL("not implemented");
994 }
995 
996 void SwXLineNumberingProperties::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
997 {
998 OSL_FAIL("not implemented");
999 }
1000 
1001 void SwXLineNumberingProperties::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
1002 {
1003 OSL_FAIL("not implemented");
1004 }
1005 
1006 const char aInvalidStyle[] = "__XXX___invalid";
1007 
1009  : public SvtListener
1010 {
1012  virtual void Notify(const SfxHint&) override;
1013  public:
1014  explicit Impl(SwXNumberingRules& rParent) : m_rParent(rParent) {}
1015 };
1016 
1017 bool SwXNumberingRules::isInvalidStyle(const OUString &rName)
1018 {
1019  return rName == aInvalidStyle;
1020 }
1021 
1022 namespace
1023 {
1024  class theSwXNumberingRulesUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXNumberingRulesUnoTunnelId > {};
1025 }
1026 
1027 const uno::Sequence< sal_Int8 > & SwXNumberingRules::getUnoTunnelId()
1028 {
1029  return theSwXNumberingRulesUnoTunnelId::get().getSeq();
1030 }
1031 
1032 // return implementation specific data
1033 sal_Int64 SwXNumberingRules::getSomething( const uno::Sequence< sal_Int8 > & rId )
1034 {
1035  if( isUnoTunnelId<SwXNumberingRules>(rId) )
1036  {
1037  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
1038  }
1039  return 0;
1040 }
1041 
1043 {
1044  return "SwXNumberingRules";
1045 }
1046 
1047 sal_Bool SwXNumberingRules::supportsService(const OUString& rServiceName)
1048 {
1049  return cppu::supportsService(this, rServiceName);
1050 }
1051 
1053 {
1054  Sequence<OUString> aRet { "com.sun.star.text.NumberingRules" };
1055  return aRet;
1056 }
1057 
1059  m_pImpl(new SwXNumberingRules::Impl(*this)),
1060  m_pDoc(doc),
1061  m_pDocShell(nullptr),
1062  m_pNumRule(new SwNumRule(rRule)),
1063  m_pPropertySet(GetNumberingRulesSet()),
1064  m_bOwnNumRuleCreated(true)
1065 {
1066  // first organize the document - it is dependent on the set character formats
1067  // if no format is set, it should work as well
1068  for( sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1069  {
1070  SwNumFormat rFormat(m_pNumRule->Get(i));
1071  SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1072  if(pCharFormat)
1073  {
1074  m_pDoc = pCharFormat->GetDoc();
1075  break;
1076  }
1077  }
1078  if(m_pDoc)
1079  m_pImpl->StartListening(GetPageDescNotifier(m_pDoc));
1080  for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1081  {
1084  }
1085 }
1086 
1088  m_pImpl(new SwXNumberingRules::Impl(*this)),
1089  m_pDoc(nullptr),
1090  m_pDocShell(&rDocSh),
1091  m_pNumRule(nullptr),
1092  m_pPropertySet(GetNumberingRulesSet()),
1093  m_bOwnNumRuleCreated(false)
1094 {
1095  m_pImpl->StartListening(GetPageDescNotifier(m_pDocShell->GetDoc()));
1096 }
1097 
1099  m_pImpl(new SwXNumberingRules::Impl(*this)),
1100  m_pDoc(&rDoc),
1101  m_pDocShell(nullptr),
1102  m_pNumRule(nullptr),
1103  m_pPropertySet(GetNumberingRulesSet()),
1104  m_bOwnNumRuleCreated(false)
1105 {
1106  m_pImpl->StartListening(GetPageDescNotifier(&rDoc));
1108  rDoc.MakeNumRule( m_sCreatedNumRuleName, nullptr, false,
1109  // #i89178#
1111 }
1112 
1114 {
1115  SolarMutexGuard aGuard;
1116  if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1118  if( m_bOwnNumRuleCreated )
1119  delete m_pNumRule;
1120 }
1121 
1122 void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement)
1123 {
1124  SolarMutexGuard aGuard;
1125  if(nIndex < 0 || MAXLEVEL <= nIndex)
1126  throw lang::IndexOutOfBoundsException();
1127 
1128  auto rProperties = o3tl::tryAccess<uno::Sequence<beans::PropertyValue>>(
1129  rElement);
1130  if(!rProperties)
1131  throw lang::IllegalArgumentException();
1132  SwNumRule* pRule = nullptr;
1133  if(m_pNumRule)
1135  *rProperties, nIndex);
1136  else if(m_pDocShell)
1137  {
1138  // #i87650# - correction of cws warnings:
1139  SwNumRule aNumRule( *(m_pDocShell->GetDoc()->GetOutlineNumRule()) );
1141  *rProperties, nIndex);
1142  // set character format if needed
1143  const SwCharFormats* pFormats = m_pDocShell->GetDoc()->GetCharFormats();
1144  const size_t nChCount = pFormats->size();
1145  for(sal_uInt16 i = 0; i < MAXLEVEL;i++)
1146  {
1147  SwNumFormat aFormat(aNumRule.Get( i ));
1148  if (!m_sNewCharStyleNames[i].isEmpty() &&
1150  (!aFormat.GetCharFormat() || aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
1151  {
1152  SwCharFormat* pCharFormat = nullptr;
1153  for(size_t j = 0; j< nChCount; ++j)
1154  {
1155  SwCharFormat* pTmp = (*pFormats)[j];
1156  if(pTmp->GetName() == m_sNewCharStyleNames[i])
1157  {
1158  pCharFormat = pTmp;
1159  break;
1160  }
1161  }
1162  if(!pCharFormat)
1163  {
1164  SfxStyleSheetBase* pBase;
1166  SfxStyleFamily::Char);
1167  if(!pBase)
1168  pBase = &m_pDocShell->GetStyleSheetPool()->Make(m_sNewCharStyleNames[i], SfxStyleFamily::Char);
1169  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1170 
1171  }
1172  aFormat.SetCharFormat( pCharFormat );
1173  aNumRule.Set( i, aFormat );
1174  }
1175  }
1176  m_pDocShell->GetDoc()->SetOutlineNumRule( aNumRule );
1177  }
1178  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty() &&
1179  nullptr != (pRule = m_pDoc->FindNumRulePtr( m_sCreatedNumRuleName )))
1180  {
1182  *rProperties, nIndex);
1183 
1184  pRule->Validate();
1185  }
1186  else
1187  throw uno::RuntimeException();
1188 }
1189 
1191 {
1192  return MAXLEVEL;
1193 }
1194 
1196 {
1197  SolarMutexGuard aGuard;
1198  if(nIndex < 0 || MAXLEVEL <= nIndex)
1199  throw lang::IndexOutOfBoundsException();
1200 
1201  uno::Any aVal;
1202  const SwNumRule* pRule = m_pNumRule;
1203  if(!pRule && m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1205  if(pRule)
1206  {
1207  uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1208  *pRule, nIndex);
1209  aVal <<= aRet;
1210 
1211  }
1212  else if(m_pDocShell)
1213  {
1214  uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1215  *m_pDocShell->GetDoc()->GetOutlineNumRule(), nIndex);
1216  aVal <<= aRet;
1217  }
1218  else
1219  throw uno::RuntimeException();
1220  return aVal;
1221 }
1222 
1224 {
1226 }
1227 
1229 {
1230  return true;
1231 }
1232 
1233 static const char* STR_POOLCOLL_HEADLINE_ARY[]
1235  STR_POOLCOLL_HEADLINE1,
1236  STR_POOLCOLL_HEADLINE2,
1237  STR_POOLCOLL_HEADLINE3,
1238  STR_POOLCOLL_HEADLINE4,
1239  STR_POOLCOLL_HEADLINE5,
1240  STR_POOLCOLL_HEADLINE6,
1241  STR_POOLCOLL_HEADLINE7,
1242  STR_POOLCOLL_HEADLINE8,
1243  STR_POOLCOLL_HEADLINE9,
1244  STR_POOLCOLL_HEADLINE10
1245 };
1246 
1247 uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
1248  const SwNumRule& rNumRule, sal_Int32 nIndex) const
1249 {
1250  SolarMutexGuard aGuard;
1251  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1252 
1253  const SwNumFormat& rFormat = rNumRule.Get( static_cast<sal_uInt16>(nIndex) );
1254 
1255  SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1256  OUString CharStyleName;
1257  if (pCharFormat)
1258  CharStyleName = pCharFormat->GetName();
1259 
1260  // Whether or not a style is present: the array entry overwrites this string
1261  if (!m_sNewCharStyleNames[nIndex].isEmpty() &&
1263  {
1264  CharStyleName = m_sNewCharStyleNames[nIndex];
1265  }
1266 
1267  OUString aUString;
1268  if (m_pDocShell) // -> Chapter Numbering
1269  {
1270  // template name
1271  OUString sValue(SwResId(STR_POOLCOLL_HEADLINE_ARY[nIndex]));
1273  const size_t nCount = pColls->size();
1274  for(size_t i = 0; i < nCount; ++i)
1275  {
1276  SwTextFormatColl &rTextColl = *pColls->operator[](i);
1277  if(rTextColl.IsDefault())
1278  continue;
1279 
1280  const sal_Int16 nOutLevel = rTextColl.IsAssignedToListLevelOfOutlineStyle()
1281  ? static_cast<sal_Int16>(rTextColl.GetAssignedOutlineStyleLevel())
1282  : MAXLEVEL;
1283  if ( nOutLevel == nIndex )
1284  {
1285  sValue = rTextColl.GetName();
1286  break; // the style for the level in question has been found
1287  }
1288  else if( sValue==rTextColl.GetName() )
1289  {
1290  // if the default for the level is existing, but its
1291  // level is different, then it cannot be the default.
1292  sValue.clear();
1293  }
1294  }
1296  }
1297 
1298  OUString referer;
1299  if (m_pDoc != nullptr) {
1300  auto const sh = m_pDoc->GetPersist();
1301  if (sh != nullptr && sh->HasName()) {
1302  referer = sh->GetMedium()->GetName();
1303  }
1304  }
1306  rFormat, CharStyleName, m_pDocShell ? & aUString : nullptr, referer);
1307 
1308 }
1309 
1310 uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
1311  const SwNumFormat& rFormat, OUString const& rCharFormatName,
1312  OUString const*const pHeadingStyleName, OUString const & referer)
1313 {
1314  bool bChapterNum = pHeadingStyleName != nullptr;
1315 
1316  std::vector<PropertyValue> aPropertyValues;
1317  aPropertyValues.reserve(32);
1318  //fill all properties into the array
1319 
1320  //adjust
1321  SvxAdjust eAdj = rFormat.GetNumAdjust();
1322  sal_Int16 nINT16 = aSvxToUnoAdjust[eAdj];
1323  aPropertyValues.push_back(comphelper::makePropertyValue("Adjust", nINT16));
1324 
1325  //parentnumbering
1326  nINT16 = rFormat.GetIncludeUpperLevels();
1327  aPropertyValues.push_back(comphelper::makePropertyValue("ParentNumbering", nINT16));
1328 
1329  //prefix
1330  OUString aUString = rFormat.GetPrefix();
1331  aPropertyValues.push_back(comphelper::makePropertyValue("Prefix", aUString));
1332 
1333  //suffix
1334  aUString = rFormat.GetSuffix();
1335  aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", aUString));
1336 
1337  //listformat
1338  if (rFormat.HasListFormat())
1339  {
1340  aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", rFormat.GetListFormat()));
1341  }
1342 
1343  //char style name
1344  aUString.clear();
1345  SwStyleNameMapper::FillProgName( rCharFormatName, aUString, SwGetPoolIdFromName::ChrFmt);
1346  aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
1347 
1348  //startvalue
1349  nINT16 = rFormat.GetStart();
1350  aPropertyValues.push_back(comphelper::makePropertyValue("StartWith", nINT16));
1351 
1353  {
1354  //leftmargin
1355  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetAbsLSpace());
1356  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LEFT_MARGIN, nINT32));
1357 
1358  //chartextoffset
1359  nINT32 = convertTwipToMm100(rFormat.GetCharTextDistance());
1360  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_SYMBOL_TEXT_DISTANCE, nINT32));
1361 
1362  //firstlineoffset
1363  nINT32 = convertTwipToMm100(rFormat.GetFirstLineOffset());
1364  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_OFFSET, nINT32));
1365  }
1366 
1367  // PositionAndSpaceMode
1368  nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
1370  {
1371  nINT16 = PositionAndSpaceMode::LABEL_ALIGNMENT;
1372  }
1373  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_POSITION_AND_SPACE_MODE, nINT16));
1374 
1376  {
1377  // LabelFollowedBy
1378  nINT16 = LabelFollow::LISTTAB;
1379  if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
1380  {
1381  nINT16 = LabelFollow::SPACE;
1382  }
1383  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
1384  {
1385  nINT16 = LabelFollow::NOTHING;
1386  }
1387  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NEWLINE )
1388  {
1389  nINT16 = LabelFollow::NEWLINE;
1390  }
1391  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LABEL_FOLLOWED_BY, nINT16));
1392 
1393  // ListtabStopPosition
1394  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetListtabPos());
1395  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LISTTAB_STOP_POSITION, nINT32));
1396 
1397  // FirstLineIndent
1398  nINT32 = convertTwipToMm100(rFormat.GetFirstLineIndent());
1399  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_INDENT, nINT32));
1400 
1401  // IndentAt
1402  nINT32 = convertTwipToMm100(rFormat.GetIndentAt());
1403  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_INDENT_AT, nINT32));
1404  }
1405 
1406  //numberingtype
1407  nINT16 = rFormat.GetNumberingType();
1408  aPropertyValues.push_back(comphelper::makePropertyValue("NumberingType", nINT16));
1409 
1410  if(!bChapterNum)
1411  {
1412  if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
1413  {
1414  sal_UCS4 cBullet = rFormat.GetBulletChar();
1415 
1416  //BulletId
1417  nINT16 = cBullet;
1418  aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
1419 
1420  const vcl::Font* pFont = rFormat.GetBulletFont();
1421 
1422  //BulletChar
1423  aUString = OUString(&cBullet, 1);
1424  aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
1425 
1426  //BulletFontName
1427  aUString = pFont ? pFont->GetStyleName() : OUString();
1428  aPropertyValues.push_back(comphelper::makePropertyValue("BulletFontName", aUString));
1429 
1430  //BulletFont
1431  if(pFont)
1432  {
1433  awt::FontDescriptor aDesc;
1434  SvxUnoFontDescriptor::ConvertFromFont( *pFont, aDesc );
1435  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc));
1436  }
1437  }
1438  if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
1439  {
1440  const SvxBrushItem* pBrush = rFormat.GetBrush();
1441  const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
1442  if (pGraphic)
1443  {
1444  //GraphicBitmap
1445  uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
1446  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBitmap));
1447  }
1448 
1449  Size aSize = rFormat.GetGraphicSize();
1450  // #i101131#
1451  // adjust conversion due to type mismatch between <Size> and <awt::Size>
1452  awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
1453  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_SIZE, aAwtSize));
1454 
1455  const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
1456  if(pOrient)
1457  {
1458  uno::Any any;
1459  pOrient->QueryValue(any);
1460  aPropertyValues.emplace_back(
1461  UNO_NAME_VERT_ORIENT, -1, any, PropertyState_DIRECT_VALUE);
1462  }
1463  }
1464  }
1465  else
1466  {
1467  aUString = *pHeadingStyleName;
1468  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_HEADING_STYLE_NAME, aUString));
1469  }
1470 
1471  return ::comphelper::containerToSequence(aPropertyValues);
1472 }
1473 
1475  SwNumRule& rNumRule,
1476  const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
1477 {
1478  SolarMutexGuard aGuard;
1479  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1480 
1481  SwNumFormat aFormat(rNumRule.Get( static_cast<sal_uInt16>(nIndex) ));
1482 
1483  OUString sHeadingStyleName;
1484  OUString sParagraphStyleName;
1485 
1487  &m_sNewBulletFontNames[nIndex],
1488  &sHeadingStyleName, &sParagraphStyleName,
1489  m_pDoc, rProperties);
1490 
1491 
1492  if (m_pDoc && !sParagraphStyleName.isEmpty())
1493  {
1494  const SwTextFormatColls* pColls = m_pDoc->GetTextFormatColls();
1495  const size_t nCount = pColls->size();
1496  for (size_t k = 0; k < nCount; ++k)
1497  {
1498  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1499  if (rTextColl.GetName() == sParagraphStyleName)
1500  rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
1501  }
1502  }
1503 
1504  if (!sHeadingStyleName.isEmpty())
1505  {
1508  const size_t nCount = pColls->size();
1509  for (size_t k = 0; k < nCount; ++k)
1510  {
1511  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1512  if (rTextColl.IsDefault())
1513  continue;
1514  if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
1515  rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
1516  rTextColl.GetName() != sHeadingStyleName)
1517  {
1519  }
1520  else if (rTextColl.GetName() == sHeadingStyleName)
1521  {
1522  rTextColl.AssignToListLevelOfOutlineStyle( nIndex );
1523  }
1524  }
1525  }
1526 
1527  rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFormat);
1528 }
1529 
1531  SwNumFormat & aFormat,
1532  OUString & rCharStyleName, OUString *const pBulletFontName,
1533  OUString *const pHeadingStyleName,
1534  OUString *const pParagraphStyleName,
1535  SwDoc *const pDoc,
1536  const uno::Sequence<beans::PropertyValue>& rProperties)
1537 {
1538  bool bWrongArg = false;
1539  std::unique_ptr<SvxBrushItem> pSetBrush;
1540  std::unique_ptr<Size> pSetSize;
1541  std::unique_ptr<SwFormatVertOrient> pSetVOrient;
1542  bool bCharStyleNameSet = false;
1543 
1544  for (const beans::PropertyValue& rProp : rProperties)
1545  {
1546  if (rProp.Name == UNO_NAME_ADJUST)
1547  {
1548  sal_Int16 nValue = text::HoriOrientation::NONE;
1549  rProp.Value >>= nValue;
1550  if (nValue > text::HoriOrientation::NONE &&
1551  nValue <= text::HoriOrientation::LEFT &&
1552  USHRT_MAX != aUnoToSvxAdjust[nValue])
1553  {
1554  aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
1555  }
1556  else
1557  bWrongArg = true;
1558  }
1559  else if (rProp.Name == UNO_NAME_PARENT_NUMBERING)
1560  {
1561  sal_Int16 nSet = 0;
1562  rProp.Value >>= nSet;
1563  if(nSet >= 0 && MAXLEVEL >= nSet)
1564  aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
1565  }
1566  else if (rProp.Name == UNO_NAME_PREFIX)
1567  {
1568  OUString uTmp;
1569  rProp.Value >>= uTmp;
1570  aFormat.SetPrefix(uTmp);
1571  }
1572  else if (rProp.Name == UNO_NAME_SUFFIX)
1573  {
1574  OUString uTmp;
1575  rProp.Value >>= uTmp;
1576  aFormat.SetSuffix(uTmp);
1577  }
1578  else if (rProp.Name == UNO_NAME_CHAR_STYLE_NAME)
1579  {
1580  bCharStyleNameSet = true;
1581  OUString uTmp;
1582  rProp.Value >>= uTmp;
1583  OUString sCharFormatName;
1585  if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
1586  {
1587  rCharStyleName = aInvalidStyle;
1588  aFormat.SetCharFormat(nullptr);
1589  }
1590  else if(pDoc)
1591  {
1592  const SwCharFormats* pFormats = pDoc->GetCharFormats();
1593  const size_t nChCount = pFormats->size();
1594 
1595  SwCharFormat* pCharFormat = nullptr;
1596  if (!sCharFormatName.isEmpty())
1597  {
1598  for(size_t j = 0; j< nChCount; ++j)
1599  {
1600  SwCharFormat* pTmp = (*pFormats)[j];
1601  if(pTmp->GetName() == sCharFormatName)
1602  {
1603  pCharFormat = pTmp;
1604  break;
1605  }
1606  }
1607  if(!pCharFormat)
1608  {
1609 
1610  SfxStyleSheetBase* pBase;
1612  pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
1613  if(!pBase)
1614  pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
1615  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1616  }
1617  }
1618  aFormat.SetCharFormat( pCharFormat );
1619  // #i51842#
1620  // If the character format has been found its name should not be in the
1621  // char style names array
1622  rCharStyleName.clear();
1623  }
1624  else
1625  rCharStyleName = sCharFormatName;
1626  }
1627  else if (rProp.Name == UNO_NAME_START_WITH)
1628  {
1629  sal_Int16 nVal = 0;
1630  rProp.Value >>= nVal;
1631  aFormat.SetStart(nVal);
1632  }
1633  else if (rProp.Name == UNO_NAME_LEFT_MARGIN)
1634  {
1635  sal_Int32 nValue = 0;
1636  rProp.Value >>= nValue;
1637  // #i23727# nValue can be negative
1638  aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
1639  }
1640  else if (rProp.Name == UNO_NAME_SYMBOL_TEXT_DISTANCE)
1641  {
1642  sal_Int32 nValue = 0;
1643  rProp.Value >>= nValue;
1644  if (nValue >= 0)
1645  aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
1646  else
1647  bWrongArg = true;
1648  }
1649  else if (rProp.Name == UNO_NAME_FIRST_LINE_OFFSET)
1650  {
1651  sal_Int32 nValue = 0;
1652  rProp.Value >>= nValue;
1653  // #i23727# nValue can be positive
1654  nValue = convertMm100ToTwip(nValue);
1655  aFormat.SetFirstLineOffset(nValue);
1656  }
1657  else if (rProp.Name == UNO_NAME_POSITION_AND_SPACE_MODE)
1658  {
1659  sal_Int16 nValue = 0;
1660  rProp.Value >>= nValue;
1661  if ( nValue == 0 )
1662  {
1664  }
1665  else if ( nValue == 1 )
1666  {
1668  }
1669  else
1670  {
1671  bWrongArg = true;
1672  }
1673  }
1674  else if (rProp.Name == UNO_NAME_LABEL_FOLLOWED_BY)
1675  {
1676  sal_Int16 nValue = 0;
1677  rProp.Value >>= nValue;
1678  if ( nValue == LabelFollow::LISTTAB )
1679  {
1681  }
1682  else if ( nValue == LabelFollow::SPACE )
1683  {
1685  }
1686  else if ( nValue == LabelFollow::NOTHING )
1687  {
1689  }
1690  else if ( nValue == LabelFollow::NEWLINE )
1691  {
1693  }
1694  else
1695  {
1696  bWrongArg = true;
1697  }
1698  }
1699  else if (rProp.Name == UNO_NAME_LISTTAB_STOP_POSITION)
1700  {
1701  sal_Int32 nValue = 0;
1702  rProp.Value >>= nValue;
1703  nValue = convertMm100ToTwip(nValue);
1704  if ( nValue >= 0 )
1705  {
1706  aFormat.SetListtabPos( nValue );
1707  }
1708  else
1709  {
1710  bWrongArg = true;
1711  }
1712  }
1713  else if (rProp.Name == UNO_NAME_FIRST_LINE_INDENT)
1714  {
1715  sal_Int32 nValue = 0;
1716  rProp.Value >>= nValue;
1717  nValue = convertMm100ToTwip(nValue);
1718  aFormat.SetFirstLineIndent( nValue );
1719  }
1720  else if (rProp.Name == UNO_NAME_INDENT_AT)
1721  {
1722  sal_Int32 nValue = 0;
1723  rProp.Value >>= nValue;
1724  nValue = convertMm100ToTwip(nValue);
1725  aFormat.SetIndentAt( nValue );
1726  }
1727  else if (rProp.Name == UNO_NAME_NUMBERING_TYPE)
1728  {
1729  sal_Int16 nSet = 0;
1730  rProp.Value >>= nSet;
1731  if(nSet >= 0)
1732  aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
1733  else
1734  bWrongArg = true;
1735  }
1736  else if (rProp.Name == UNO_NAME_PARAGRAPH_STYLE_NAME)
1737  {
1738  if (pParagraphStyleName)
1739  {
1740  OUString uTmp;
1741  rProp.Value >>= uTmp;
1742  OUString sStyleName;
1744  *pParagraphStyleName = sStyleName;
1745  }
1746  }
1747  else if (rProp.Name == UNO_NAME_BULLET_ID)
1748  {
1749  sal_Int16 nSet = 0;
1750  if( rProp.Value >>= nSet )
1751  aFormat.SetBulletChar(nSet);
1752  else
1753  bWrongArg = true;
1754  }
1755  else if (rProp.Name == UNO_NAME_BULLET_FONT)
1756  {
1757  awt::FontDescriptor desc;
1758  if (rProp.Value >>= desc)
1759  {
1760  // #i93725#
1761  // do not accept "empty" font
1762  if (!desc.Name.isEmpty())
1763  {
1764  vcl::Font aFont;
1766  aFormat.SetBulletFont(&aFont);
1767  }
1768  }
1769  else
1770  bWrongArg = true;
1771  }
1772  else if (rProp.Name == UNO_NAME_BULLET_FONT_NAME)
1773  {
1774  OUString sBulletFontName;
1775  rProp.Value >>= sBulletFontName;
1776  SwDocShell* pLclDocShell = nullptr;
1777  if( !sBulletFontName.isEmpty() && pDoc && (pLclDocShell = pDoc->GetDocShell()) )
1778  {
1779  const SvxFontListItem* pFontListItem =
1780  static_cast<const SvxFontListItem* >(pLclDocShell
1781  ->GetItem( SID_ATTR_CHAR_FONTLIST ));
1782  const FontList* pList = pFontListItem->GetFontList();
1783  FontMetric aFontMetric = pList->Get(
1784  sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
1785  vcl::Font aFont(aFontMetric);
1786  aFormat.SetBulletFont(&aFont);
1787  }
1788  else if (pBulletFontName)
1789  *pBulletFontName = sBulletFontName;
1790  }
1791  else if (rProp.Name == UNO_NAME_BULLET_CHAR)
1792  {
1793  OUString aChar;
1794  rProp.Value >>= aChar;
1795  if (aChar.isEmpty())
1796  {
1797  // If w:lvlText's value is null - set bullet char to zero
1798  aFormat.SetBulletChar(u'\0');
1799  }
1800  else
1801  {
1802  sal_Int32 nIndexUtf16 = 0;
1803  sal_UCS4 cBullet = aChar.iterateCodePoints(&nIndexUtf16);
1804  if (aChar.getLength() == nIndexUtf16)
1805  aFormat.SetBulletChar(cBullet);
1806  else
1807  bWrongArg = true;
1808  }
1809  }
1810  else if (rProp.Name == UNO_NAME_GRAPHIC)
1811  {
1812  uno::Reference<graphic::XGraphic> xGraphic;
1813  if (rProp.Value >>= xGraphic)
1814  {
1815  if (!pSetBrush)
1816  {
1817  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1818  if(pOrigBrush)
1819  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1820  else
1821  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1822  }
1823  Graphic aGraphic(xGraphic);
1824  pSetBrush->SetGraphic(aGraphic);
1825  }
1826  else
1827  bWrongArg = true;
1828  }
1829  else if (rProp.Name == UNO_NAME_GRAPHIC_BITMAP)
1830  {
1831  uno::Reference<awt::XBitmap> xBitmap;
1832  if (rProp.Value >>= xBitmap)
1833  {
1834  if(!pSetBrush)
1835  {
1836  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1837  if(pOrigBrush)
1838  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1839  else
1840  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1841  }
1842 
1843  uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
1844  Graphic aGraphic(xGraphic);
1845  pSetBrush->SetGraphic(aGraphic);
1846  }
1847  else
1848  bWrongArg = true;
1849  }
1850  else if (rProp.Name == UNO_NAME_GRAPHIC_SIZE)
1851  {
1852  if(!pSetSize)
1853  pSetSize.reset(new Size);
1854  awt::Size size;
1855  if (rProp.Value >>= size)
1856  {
1857  size.Width = convertMm100ToTwip(size.Width);
1858  size.Height = convertMm100ToTwip(size.Height);
1859  pSetSize->setWidth( size.Width );
1860  pSetSize->setHeight( size.Height );
1861  }
1862  else
1863  bWrongArg = true;
1864  }
1865  else if (rProp.Name == UNO_NAME_VERT_ORIENT)
1866  {
1867  if(!pSetVOrient)
1868  {
1869  if(aFormat.GetGraphicOrientation())
1870  pSetVOrient.reset(aFormat.GetGraphicOrientation()->Clone());
1871  else
1872  pSetVOrient.reset(new SwFormatVertOrient);
1873  }
1874  pSetVOrient->PutValue(rProp.Value, MID_VERTORIENT_ORIENT);
1875  }
1876  else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME)
1877  {
1878  if (pHeadingStyleName)
1879  {
1880  OUString uTmp;
1881  rProp.Value >>= uTmp;
1882  OUString sStyleName;
1884  *pHeadingStyleName = sStyleName;
1885  }
1886  }
1887  else if (rProp.Name == UNO_NAME_BULLET_REL_SIZE)
1888  {
1889  // BulletRelSize - unsupported - only available in Impress
1890  }
1891  else if (rProp.Name == UNO_NAME_BULLET_COLOR)
1892  {
1893  // BulletColor - ignored too
1894  }
1895  else if (rProp.Name == UNO_NAME_GRAPHIC_URL)
1896  {
1897  OUString aURL;
1898  if (rProp.Value >>= aURL)
1899  {
1900  if(!pSetBrush)
1901  {
1902  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1903  if(pOrigBrush)
1904  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1905  else
1906  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1907  }
1908 
1909  Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
1910  if (!aGraphic.IsNone())
1911  pSetBrush->SetGraphic(aGraphic);
1912  }
1913  else
1914  bWrongArg = true;
1915  }
1916  else if (rProp.Name == UNO_NAME_LIST_FORMAT)
1917  {
1918  OUString uTmp;
1919  rProp.Value >>= uTmp;
1920  aFormat.SetListFormat(uTmp);
1921  }
1922  else
1923  {
1924  // Invalid property name
1925  SAL_WARN("sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing");
1926  throw uno::RuntimeException("Unknown/incorrect property " + rProp.Name);
1927  }
1928  }
1929  if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
1930  {
1931  if(!pSetBrush && aFormat.GetBrush())
1932  pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
1933 
1934  if(pSetBrush)
1935  {
1936  if(!pSetVOrient && aFormat.GetGraphicOrientation())
1937  pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
1938 
1939  if(!pSetSize)
1940  {
1941  pSetSize.reset(new Size(aFormat.GetGraphicSize()));
1942  if(!pSetSize->Width() || !pSetSize->Height())
1943  {
1944  const Graphic* pGraphic = pSetBrush->GetGraphic();
1945  if(pGraphic)
1946  *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
1947  }
1948  }
1949  sal_Int16 eOrient = pSetVOrient ?
1950  pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
1951  aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
1952  }
1953  }
1954  if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
1955  && aFormat.GetNumberingType() == NumberingType::BITMAP
1956  && !aFormat.GetCharFormat()
1957  && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
1958  {
1959  OUString tmp;
1961  rCharStyleName = tmp;
1962  }
1963 
1964  if(bWrongArg)
1965  throw lang::IllegalArgumentException();
1966 }
1967 
1968 uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
1969 {
1970  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
1971  return aRef;
1972 }
1973 
1974 void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
1975 {
1976  SolarMutexGuard aGuard;
1977  std::unique_ptr<SwNumRule> pDocRule;
1978  SwNumRule* pCreatedRule = nullptr;
1979  if(!m_pNumRule)
1980  {
1981  if(m_pDocShell)
1982  {
1983  pDocRule.reset(new SwNumRule(*m_pDocShell->GetDoc()->GetOutlineNumRule()));
1984  }
1985  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1986  {
1987  pCreatedRule = m_pDoc->FindNumRulePtr(m_sCreatedNumRuleName);
1988  }
1989 
1990  }
1991  if(!m_pNumRule && !pDocRule && !pCreatedRule)
1992  throw RuntimeException();
1993 
1994  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
1995  {
1996  bool bVal = *o3tl::doAccess<bool>(rValue);
1997  if(!pCreatedRule)
1998  pDocRule ? pDocRule->SetAutoRule(bVal) : m_pNumRule->SetAutoRule(bVal);
1999  }
2000  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2001  {
2002  bool bVal = *o3tl::doAccess<bool>(rValue);
2003  pDocRule ? pDocRule->SetContinusNum(bVal) :
2004  pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : m_pNumRule->SetContinusNum(bVal);
2005  }
2006  else if(rPropertyName == UNO_NAME_NAME)
2007  {
2008  throw IllegalArgumentException();
2009  }
2010  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2011  {
2012  bool bVal = *o3tl::doAccess<bool>(rValue);
2013  pDocRule ? pDocRule->SetAbsSpaces(bVal) :
2014  pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : m_pNumRule->SetAbsSpaces(bVal);
2015  }
2016  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2017  {
2018  bool bVal = *o3tl::doAccess<bool>(rValue);
2019  SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
2020  pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
2021  pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : m_pNumRule->SetRuleType(eNumRuleType);
2022  }
2023  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2024  {
2025  throw IllegalArgumentException();
2026  }
2027  else
2028  throw UnknownPropertyException(rPropertyName);
2029 
2030  if(pDocRule)
2031  {
2033  m_pDocShell->GetDoc()->SetOutlineNumRule(*pDocRule);
2034  pDocRule.reset();
2035  }
2036  else if(pCreatedRule)
2037  {
2038  pCreatedRule->Validate();
2039  }
2040 }
2041 
2042 Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
2043 {
2044  Any aRet;
2045  const SwNumRule* pRule = m_pNumRule;
2046  if(!pRule && m_pDocShell)
2047  pRule = m_pDocShell->GetDoc()->GetOutlineNumRule();
2048  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2050  if(!pRule)
2051  throw RuntimeException();
2052 
2053  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2054  {
2055  aRet <<= pRule->IsAutoRule();
2056  }
2057  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2058  {
2059  aRet <<= pRule->IsContinusNum();
2060  }
2061  else if(rPropertyName == UNO_NAME_NAME)
2062  aRet <<= pRule->GetName();
2063  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2064  {
2065  aRet <<= pRule->IsAbsSpaces();
2066  }
2067  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2068  {
2069  aRet <<= pRule->IsOutlineRule();
2070  }
2071  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2072  {
2073  OSL_ENSURE( !pRule->GetDefaultListId().isEmpty(),
2074  "<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect." );
2075  aRet <<= pRule->GetDefaultListId();
2076  }
2077  else
2078  throw UnknownPropertyException(rPropertyName);
2079  return aRet;
2080 }
2081 
2083  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2084 {
2085 }
2086 
2088  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2089 {
2090 }
2091 
2093  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2094 {
2095 }
2096 
2098  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2099 {
2100 }
2101 
2103 {
2104  if(m_pNumRule)
2105  {
2106  OUString aString;
2108  return aString;
2109  }
2110  // consider chapter numbering <SwXNumberingRules>
2111  if ( m_pDocShell )
2112  {
2113  OUString aString;
2115  aString, SwGetPoolIdFromName::NumRule );
2116  return aString;
2117  }
2118  return m_sCreatedNumRuleName;
2119 }
2120 
2121 void SwXNumberingRules::setName(const OUString& /*rName*/)
2122 {
2123  RuntimeException aExcept;
2124  aExcept.Message = "readonly";
2125  throw aExcept;
2126 }
2127 
2129 {
2130  if(rHint.GetId() == SfxHintId::Dying)
2131  {
2133  delete m_rParent.m_pNumRule;
2134  m_rParent.m_pNumRule = nullptr;
2135  m_rParent.m_pDoc = nullptr;
2136  }
2137 }
2138 
2140 {
2141  return "SwXChapterNumbering";
2142 }
2143 
2144 sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName)
2145 {
2146  return cppu::supportsService(this, rServiceName);
2147 }
2148 
2150 {
2151  return { "com.sun.star.text.ChapterNumbering", "com.sun.star.text.NumberingRules" };
2152 }
2153 
2155  SwXNumberingRules(rDocSh)
2156 {
2157 }
2158 
2160 {
2161 }
2162 
2164 {
2165  return "SwXTextColumns";
2166 }
2167 
2168 sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName)
2169 {
2170  return cppu::supportsService(this, rServiceName);
2171 }
2172 
2174 {
2175  Sequence<OUString> aRet { "com.sun.star.text.TextColumns" };
2176  return aRet;
2177 }
2178 
2180  m_nReference(0),
2181  m_bIsAutomaticWidth(true),
2182  m_nAutoDistance(0),
2183  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)),
2184  m_nSepLineWidth(0),
2185  m_nSepLineColor(0), //black
2186  m_nSepLineHeightRelative(100),//full height
2187  m_nSepLineVertAlign(style::VerticalAlignment_MIDDLE),
2188  m_bSepLineIsOn(false),
2189  m_nSepLineStyle(API_COL_LINE_NONE) // None
2190 {
2191 }
2192 
2194  m_nReference(0),
2195  m_aTextColumns(rFormatCol.GetNumCols()),
2196  m_bIsAutomaticWidth(rFormatCol.IsOrtho()),
2197  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
2198 {
2199  const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth();
2201  USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : static_cast<sal_Int32>(nItemGutterWidth)
2202  : 0;
2204 
2205  TextColumn* pColumns = m_aTextColumns.getArray();
2206  const SwColumns& rCols = rFormatCol.GetColumns();
2207  for(sal_Int32 i = 0; i < m_aTextColumns.getLength(); ++i)
2208  {
2209  const SwColumn* pCol = &rCols[i];
2210 
2211  pColumns[i].Width = pCol->GetWishWidth();
2212  m_nReference += pColumns[i].Width;
2213  pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft ());
2214  pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight());
2215  }
2216  if(!m_aTextColumns.hasElements())
2217  m_nReference = USHRT_MAX;
2218 
2219  m_nSepLineWidth = rFormatCol.GetLineWidth();
2220  m_nSepLineColor = rFormatCol.GetLineColor();
2221  m_nSepLineHeightRelative = rFormatCol.GetLineHeight();
2222  m_bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE;
2223  sal_Int8 nStyle = API_COL_LINE_NONE;
2224  switch (rFormatCol.GetLineStyle())
2225  {
2226  case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
2227  case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
2228  case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
2229  default: break;
2230  }
2231  m_nSepLineStyle = nStyle;
2232  switch(rFormatCol.GetLineAdj())
2233  {
2234  case COLADJ_TOP: m_nSepLineVertAlign = style::VerticalAlignment_TOP; break;
2235  case COLADJ_BOTTOM: m_nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break;
2236  case COLADJ_CENTER:
2237  case COLADJ_NONE: m_nSepLineVertAlign = style::VerticalAlignment_MIDDLE;
2238  }
2239 }
2240 
2242 {
2243 }
2244 
2246 {
2247  SolarMutexGuard aGuard;
2248  return m_nReference;
2249 }
2250 
2252 {
2253  SolarMutexGuard aGuard;
2254  return static_cast< sal_Int16>( m_aTextColumns.getLength() );
2255 }
2256 
2257 void SwXTextColumns::setColumnCount(sal_Int16 nColumns)
2258 {
2259  SolarMutexGuard aGuard;
2260  if(nColumns <= 0)
2261  throw uno::RuntimeException();
2262  m_bIsAutomaticWidth = true;
2263  m_aTextColumns.realloc(nColumns);
2264  TextColumn* pCols = m_aTextColumns.getArray();
2266  sal_Int32 nWidth = m_nReference / nColumns;
2267  sal_Int32 nDiff = m_nReference - nWidth * nColumns;
2268  sal_Int32 nDist = m_nAutoDistance / 2;
2269  for(sal_Int16 i = 0; i < nColumns; i++)
2270  {
2271  pCols[i].Width = nWidth;
2272  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2273  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2274  }
2275  pCols[nColumns - 1].Width += nDiff;
2276 }
2277 
2278 uno::Sequence< TextColumn > SwXTextColumns::getColumns()
2279 {
2280  SolarMutexGuard aGuard;
2281  return m_aTextColumns;
2282 }
2283 
2284 void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
2285 {
2286  SolarMutexGuard aGuard;
2287  sal_Int32 nReferenceTemp = std::accumulate(rColumns.begin(), rColumns.end(), sal_Int32(0),
2288  [](const sal_Int32 nSum, const TextColumn& rCol) { return nSum + rCol.Width; });
2289  m_bIsAutomaticWidth = false;
2290  m_nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp;
2291  m_aTextColumns = rColumns;
2292 }
2293 
2294 uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( )
2295 {
2296  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
2297  return aRef;
2298 }
2299 
2300 void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
2301 {
2302  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2303  if (!pEntry)
2304  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2305  if ( pEntry->nFlags & PropertyAttribute::READONLY)
2306  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2307 
2308  switch(pEntry->nWID)
2309  {
2310  case WID_TXTCOL_LINE_WIDTH:
2311  {
2312  sal_Int32 nTmp = 0;
2313  aValue >>= nTmp;
2314  if(nTmp < 0)
2315  throw IllegalArgumentException();
2317  }
2318  break;
2319  case WID_TXTCOL_LINE_COLOR:
2320  aValue >>= m_nSepLineColor;
2321  break;
2322  case WID_TXTCOL_LINE_STYLE:
2323  {
2324  aValue >>= m_nSepLineStyle;
2325  }
2326  break;
2328  {
2329  sal_Int8 nTmp = 0;
2330  aValue >>= nTmp;
2331  if(nTmp < 0)
2332  throw IllegalArgumentException();
2333  m_nSepLineHeightRelative = nTmp;
2334  }
2335  break;
2336  case WID_TXTCOL_LINE_ALIGN:
2337  {
2338  style::VerticalAlignment eAlign;
2339  if(!(aValue >>= eAlign) )
2340  {
2341  sal_Int8 nTmp = 0;
2342  if (! ( aValue >>= nTmp ) )
2343  throw IllegalArgumentException();
2344  m_nSepLineVertAlign = static_cast<style::VerticalAlignment>(nTmp);
2345  }
2346  else
2347  m_nSepLineVertAlign = eAlign;
2348  }
2349  break;
2350  case WID_TXTCOL_LINE_IS_ON:
2351  m_bSepLineIsOn = *o3tl::doAccess<bool>(aValue);
2352  break;
2354  {
2355  sal_Int32 nTmp = 0;
2356  aValue >>= nTmp;
2357  if(nTmp < 0 || nTmp >= m_nReference)
2358  throw IllegalArgumentException();
2359  m_nAutoDistance = nTmp;
2360  sal_Int32 nColumns = m_aTextColumns.getLength();
2361  TextColumn* pCols = m_aTextColumns.getArray();
2362  sal_Int32 nDist = m_nAutoDistance / 2;
2363  for(sal_Int32 i = 0; i < nColumns; i++)
2364  {
2365  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2366  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2367  }
2368  }
2369  break;
2370  }
2371 }
2372 
2373 Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
2374 {
2375  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2376  if (!pEntry)
2377  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2378 
2379  Any aRet;
2380  switch(pEntry->nWID)
2381  {
2382  case WID_TXTCOL_LINE_WIDTH:
2383  aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(m_nSepLineWidth));
2384  break;
2385  case WID_TXTCOL_LINE_COLOR:
2386  aRet <<= m_nSepLineColor;
2387  break;
2388  case WID_TXTCOL_LINE_STYLE:
2389  aRet <<= m_nSepLineStyle;
2390  break;
2392  aRet <<= m_nSepLineHeightRelative;
2393  break;
2394  case WID_TXTCOL_LINE_ALIGN:
2395  aRet <<= m_nSepLineVertAlign;
2396  break;
2397  case WID_TXTCOL_LINE_IS_ON:
2398  aRet <<= m_bSepLineIsOn;
2399  break;
2401  aRet <<= m_bIsAutomaticWidth;
2402  break;
2404  aRet <<= m_nAutoDistance;
2405  break;
2406  }
2407  return aRet;
2408 }
2409 
2411  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2412 {
2413 }
2414 
2416  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2417 {
2418 }
2419 
2421  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2422 {
2423 }
2424 
2426  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2427 {
2428 }
2429 
2430 namespace
2431 {
2432  class theSwXTextColumnsUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXTextColumnsUnoTunnelId > {};
2433 }
2434 
2435 const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId()
2436 {
2437  return theSwXTextColumnsUnoTunnelId::get().getSeq();
2438 }
2439 
2440 sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId )
2441 {
2442  if( isUnoTunnelId<SwXTextColumns>(rId) )
2443  {
2444  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
2445  }
2446  return 0;
2447 }
2448 
2449 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:2415
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Color m_nSepLineColor
Definition: unosett.hxx:259
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
#define WID_TXTCOL_LINE_IS_ON
Definition: unomap.hxx:313
SvxNumType GetNumberingType() const
#define UNO_NAME_CHARACTER_FORMAT_NONE
Definition: unoprnms.hxx:336
SwXFootnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:288
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:780
sal_Int32 m_nReference
Definition: unosett.hxx:250
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:2163
static SwTextFormatColl * lcl_GetParaStyle(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:219
tools::Long GetFirstLineIndent() const
URL aURL
virtual ~SwXTextColumns() override
Definition: unosett.cxx:2241
void SetLabelFollowedBy(const LabelFollowedBy eLabelFollowedBy)
#define UNO_NAME_POSITION_AND_SPACE_MODE
Definition: unoprnms.hxx:789
int GetAssignedOutlineStyleLevel() const
Definition: fmtcol.cxx:590
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:282
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:1042
#define WID_COUNT_LINES_IN_FRAMES
Definition: unosett.cxx:118
std::vector< SwColumn > SwColumns
Definition: fmtclds.hxx:57
virtual void SAL_CALL setColumns(const css::uno::Sequence< css::text::TextColumn > &Columns) override
Definition: unosett.cxx:2284
sal_UCS4 GetBulletChar() const
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
Definition: docftn.cxx:295
bool IsDefault() const
Definition: format.hxx:109
sal_uInt32 sal_UCS4
SwCharFormat * GetCurrentCharFormat(const bool bAnchor) const
Definition: docftn.cxx:206
const SwLineNumberInfo & GetLineNumberInfo() const
Definition: lineinfo.cxx:49
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:272
#define WID_TXTCOL_LINE_STYLE
Definition: unomap.hxx:316
const char aInvalidStyle[]
Definition: unosett.cxx:1006
SwDocShell * GetDocShell()
Definition: doc.hxx:1350
void SetAutoRule(bool bFlag)
Definition: numrule.hxx:229
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:425
const OUString & GetStyleName() const
const OUString & GetSuffix() const
Definition: ftninfo.hxx:71
bool IsNone() const
#define WID_NUM_ON
Definition: unosett.cxx:111
#define WID_PREFIX
Definition: unosett.cxx:99
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
sal_uInt16 GetCountBy() const
Definition: lineinfo.hxx:74
#define UNO_NAME_BULLET_ID
Definition: unoprnms.hxx:46
signed char sal_Int8
void SetPositionAndSpaceMode(SvxNumPositionAndSpaceMode ePositionAndSpaceMode)
#define UNO_NAME_GRAPHIC_BITMAP
Definition: unoprnms.hxx:44
#define WID_CHARACTER_STYLE
Definition: unosett.cxx:106
sal_uInt16 char char * pDesc
const SvxBrushItem * GetBrush() const
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: doc.hxx:798
#define UNO_NAME_FIRST_LINE_OFFSET
Definition: unoprnms.hxx:410
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:900
const OUString & GetName() const
#define WID_SEPARATOR_INTERVAL
Definition: unosett.cxx:112
#define WID_PAGE_STYLE
Definition: unosett.cxx:105
#define UNO_NAME_START_AT
Definition: unoprnms.hxx:305
void SetPrefix(const OUString &rSet)
#define UNO_NAME_INDENT_AT
Definition: unoprnms.hxx:793
const OUString & GetDefaultListId() const
Definition: numrule.hxx:193
#define UNO_NAME_PARA_STYLE_NAME
Definition: unoprnms.hxx:171
bool IsAutoRule() const
Definition: numrule.hxx:228
#define WID_SEPARATOR_TEXT
Definition: unosett.cxx:116
#define UNO_NAME_POSITION_END_OF_DOC
Definition: unoprnms.hxx:180
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:2082
virtual ~SwXFootnoteProperties() override
Definition: unosett.cxx:294
Definition: doc.hxx:186
void SetContinusNum(bool bFlag)
Definition: numrule.hxx:235
SwXEndnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:568
#define UNO_NAME_NUMBER_POSITION
Definition: unoprnms.hxx:166
sal_Int16 nId
sal_uInt8 GetIncludeUpperLevels() const
SwNumRuleType
Definition: numrule.hxx:92
tools::Long GetListtabPos() const
#define API_COL_LINE_SOLID
Definition: unosett.cxx:95
const OUString & GetName() const
Definition: numrule.hxx:223
#define UNO_NAME_BEGIN_NOTICE
Definition: unoprnms.hxx:144
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:111
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
Definition: docnum.cxx:2492
#define WID_PARAGRAPH_STYLE
Definition: unosett.cxx:104
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:1047
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:2149
const char UNO_NAME_BULLET_CHAR[]
#define UNO_NAME_VERT_ORIENT
Definition: unoprnms.hxx:328
const Color & GetLineColor() const
Definition: fmtclds.hxx:118
#define WID_IS_AUTOMATIC
Definition: unomap.hxx:301
#define WID_NUMBERING_TYPE
Definition: unosett.cxx:101
#define UNO_NAME_GRAPHIC
Definition: unoprnms.hxx:159
#define UNO_NAME_PARAGRAPH_STYLE_NAME
Definition: unoprnms.hxx:827
void SetIncludeUpperLevels(sal_uInt8 nSet)
#define UNO_NAME_LABEL_FOLLOWED_BY
Definition: unoprnms.hxx:790
sal_Int8 m_nSepLineStyle
Definition: unosett.hxx:263
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:332
bool IsCountBlankLines() const
Definition: lineinfo.hxx:83
bool IsCountInFlys() const
Definition: lineinfo.hxx:86
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:2087
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void SetAbsSpaces(bool bFlag)
Definition: numrule.hxx:238
SfxHintId GetId() const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
#define UNO_NAME_FIRST_LINE_INDENT
Definition: unoprnms.hxx:792
void SetIndentAt(const tools::Long nIndentAt)
bool HasListFormat() const
SvxBorderLineStyle GetLineStyle() const
Definition: fmtclds.hxx:116
const OUString & GetName() const
Definition: pagedesc.hxx:186
SwTextFormatColl * GetFootnoteTextColl() const
Definition: ftninfo.hxx:55
#define WID_TXTCOL_LINE_WIDTH
Definition: unomap.hxx:309
void SetListFormat(const OUString &rSet)
#define WID_TXTCOL_LINE_COLOR
Definition: unomap.hxx:310
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:578
#define UNO_NAME_IS_CONTINUOUS_NUMBERING
Definition: unoprnms.hxx:465
sal_Int32 m_nAutoDistance
Definition: unosett.hxx:253
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:2410
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:546
#define UNO_NAME_START_WITH
Definition: unoprnms.hxx:306
#define API_COL_LINE_NONE
Definition: unosett.cxx:94
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:109
bool IsRestartEachPage() const
Definition: lineinfo.hxx:89
virtual ~SwXNumberingRules() override
Definition: unosett.cxx:1113
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
Definition: unosett.cxx:1195
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: unosett.cxx:1033
#define WID_BEGIN_NOTICE
Definition: unosett.cxx:109
#define SAL_MAX_UINT16
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:584
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: atrfrm.cxx:1320
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:426
static const SfxItemPropertySet * GetFootnoteSet()
Definition: unosett.cxx:122
#define UNO_NAME_GRAPHIC_SIZE
Definition: unoprnms.hxx:43
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2092
const OUString & GetName() const
Definition: format.hxx:111
int nCount
bool m_bOwnNumRuleCreated
Definition: unosett.hxx:154
#define API_COL_LINE_DASHED
Definition: unosett.cxx:97
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SVX_NUM_ARABIC
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:81
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:986
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const css::uno::Any &Element) override
Definition: unosett.cxx:1122
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
short GetCharTextDistance() const
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
virtual void SAL_CALL setColumnCount(sal_Int16 nColumns) override
Definition: unosett.cxx:2257
#define WID_IS_OUTLINE
Definition: unomap.hxx:305
Impl(SwXNumberingRules &rParent)
Definition: unosett.cxx:1014
const Graphic * GetGraphic(OUString const &referer=OUString()) const
const char UNO_NAME_NUMBERING_TYPE[]
#define WID_SUFFIX
Definition: unosett.cxx:100
const OUString & GetPrefix() const
void SetNumberingRuleByIndex(SwNumRule &rNumRule, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, sal_Int32 nIndex)
Definition: unosett.cxx:1474
#define UNO_NAME_IS_ABSOLUTE_MARGINS
Definition: unoprnms.hxx:467
const OUString & GetSuffix() const
const char UNO_NAME_SUFFIX[]
virtual void Notify(const SfxHint &) override
Definition: unosett.cxx:2128
bool KnowsPageDesc() const
Definition: docftn.cxx:117
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:1001
#define UNO_NAME_HEADING_STYLE_NAME
Definition: unoprnms.hxx:456
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
#define WID_FOOTNOTE_COUNTING
Definition: unosett.cxx:103
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:824
#define UNO_NAME_NUMBERING_IS_OUTLINE
Definition: unoprnms.hxx:748
virtual ~SwXChapterNumbering() override
Definition: unosett.cxx:2159
css::style::VerticalAlignment m_nSepLineVertAlign
Definition: unosett.hxx:261
bool IsContinusNum() const
Definition: numrule.hxx:234
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:534
SVX_NUM_BITMAP
void SetNumAdjust(SvxAdjust eSet)
SVX_NUM_CHAR_SPECIAL
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: unosett.cxx:2440
SwCharFormat * GetCharFormat() const
Definition: numrule.hxx:74
static const SfxItemPropertySet * GetNumberingRulesSet()
Definition: unosett.cxx:162
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
const SwFormatVertOrient * GetGraphicOrientation() const
Definition: number.cxx:344
virtual void SAL_CALL setName(const OUString &Name_) override
Definition: unosett.cxx:2121
sal_uInt16 GetPosFromLeft() const
Definition: lineinfo.hxx:71
SwFootnoteNum m_eNum
Definition: ftninfo.hxx:98
SwNumRule * FindNumRulePtr(const OUString &rName) const
Definition: docnum.cxx:2414
static SwCharFormat * lcl_getCharFormat(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:199
#define UNO_NAME_ANCHOR_CHAR_STYLE_NAME
Definition: unoprnms.hxx:77
const char UNO_NAME_PREFIX[]
bool m_bIsAutomaticWidth
Definition: unosett.hxx:252
OUString m_sNewCharStyleNames[MAXLEVEL]
Definition: unosett.hxx:147
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:305
SvxAdjust
int i
const SwColumns & GetColumns() const
Definition: fmtclds.hxx:112
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:1974
LabelFollowedBy GetLabelFollowedBy() const
virtual SwFormatVertOrient * Clone(SfxItemPool *pPool=nullptr) const override
Definition: atrfrm.cxx:1315
OUString m_sNewBulletFontNames[MAXLEVEL]
Definition: unosett.hxx:148
void SetBulletFont(const vcl::Font *pFont)
sal_Int32 GetAbsLSpace() const
#define WID_TXTCOL_AUTO_DISTANCE
Definition: unomap.hxx:315
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:749
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2425
#define UNO_NAME_DISTANCE
Definition: unoprnms.hxx:154
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
#define UNO_NAME_BULLET_FONT
Definition: unoprnms.hxx:49
sal_uInt8 GetLineHeight() const
Definition: fmtclds.hxx:123
sal_uInt16 m_nFootnoteOffset
Definition: ftninfo.hxx:47
sal_uInt16 GetGutterWidth(bool bMin=false) const
Definition: atrfrm.cxx:933
bool HasCharFormat() const
Definition: lineinfo.hxx:92
SwXChapterNumbering(SwDocShell &rDocSh)
Definition: unosett.cxx:2154
const Any & any
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:1052
#define UNO_NAME_FOOTNOTE_COUNTING
Definition: unoprnms.hxx:253
const vcl::Font * GetBulletFont() const
#define PROPERTY_MAP_TEXT_COLUMS
Definition: unomap.hxx:61
virtual OUString SAL_CALL getName() override
Definition: unosett.cxx:2102
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:731
#define UNO_NAME_LIST_FORMAT
Definition: unoprnms.hxx:80
tools::Long Width() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1139
WEIGHT_NORMAL
#define UNO_NAME_DEFAULT_LIST_ID
Definition: unoprnms.hxx:799
float u
size_t size() const
Definition: docary.hxx:84
unsigned char sal_Bool
const SfxItemPropertyMap & getPropertyMap() const
void SetRuleType(SwNumRuleType eNew)
Definition: numrule.hxx:211
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:528
SvxNumberType m_aFormat
Definition: ftninfo.hxx:46
size
void DeleteAssignmentToListLevelOfOutlineStyle()
Definition: fmtcol.cxx:624
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:754
css::uno::Type const & get()
SvxAdjust GetNumAdjust() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:562
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:552
OUString sBulletFontName
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
static css::uno::Sequence< css::beans::PropertyValue > GetPropertiesForNumFormat(const SwNumFormat &rFormat, OUString const &rCharFormatName, OUString const *pHeadingStyleName, OUString const &referer)
Definition: unosett.cxx:1310
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosett.cxx:1027
sal_uInt16 GetStart() const
PropertyValueVector_t aPropertyValues
const SfxItemPropertySet * m_pPropSet
Definition: unosett.hxx:255
ITALIC_NONE
#define WID_DISTANCE
Definition: unosett.cxx:114
GPOS_AREA
static const SfxItemPropertySet * GetLineNumberingSet()
Definition: unosett.cxx:178
void SetCharTextDistance(short nSet)
SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2144
#define UNO_NAME_SEPARATOR_INTERVAL
Definition: unoprnms.hxx:201
const SfxItemPropertySimpleEntry * getByName(const OUString &rName) const
exports com.sun.star. style
#define WID_TXTCOL_LINE_ALIGN
Definition: unomap.hxx:312
#define UNO_NAME_INTERVAL
Definition: unoprnms.hxx:272
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosett.cxx:2435
void SetOutlineNumRule(const SwNumRule &rRule)
Definition: docnum.cxx:114
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2097
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
#define UNO_NAME_ADJUST
Definition: unoprnms.hxx:471
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:743
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:996
#define UNO_NAME_END_NOTICE
Definition: unoprnms.hxx:143
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:2139
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
Definition: fmtcol.cxx:597
void SetBulletChar(sal_UCS4 cSet)
static void ConvertToFont(const css::awt::FontDescriptor &rDesc, vcl::Font &rFont)
#define UNO_NAME_COUNT_LINES_IN_FRAMES
Definition: unoprnms.hxx:149
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:2300
#define WID_TXTCOL_IS_AUTOMATIC
Definition: unomap.hxx:314
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:51
static void ConvertFromFont(const vcl::Font &rFont, css::awt::FontDescriptor &rDesc)
const OUString & GetListFormat() const
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:96
SwXLineNumberingProperties(SwDoc *pDoc)
Definition: unosett.cxx:770
#define UNO_NAME_SEPARATOR_TEXT
Definition: unoprnms.hxx:165
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2420
virtual sal_Int32 SAL_CALL getCount() override
Definition: unosett.cxx:1190
const OUString & GetPrefix() const
Definition: ftninfo.hxx:70
const SwNumFormat & Get(sal_uInt16 i) const
Definition: number.cxx:79
virtual sal_Int32 SAL_CALL getReferenceValue() override
Definition: unosett.cxx:2245
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:770
virtual css::uno::Sequence< css::text::TextColumn > SAL_CALL getColumns() override
Definition: unosett.cxx:2278
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
Definition: docftn.cxx:366
#define API_COL_LINE_DOTTED
Definition: unosett.cxx:96
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unosett.cxx:1223
const char UNO_NAME_CHAR_STYLE_NAME[]
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:1968
#define DEF_GUTTER_WIDTH
Definition: swtypes.hxx:69
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:540
void Set(sal_uInt16 i, const SwNumFormat *)
Definition: number.cxx:591
sal_uInt16 GetWishWidth() const
Definition: fmtclds.hxx:50
void Validate()
Definition: number.cxx:1024
#define WID_NUMBER_POSITION
Definition: unosett.cxx:113
void SetCharFormat(SwCharFormat *)
Definition: number.cxx:273
#define WID_TXTCOL_LINE_REL_HGT
Definition: unomap.hxx:311
const Size & GetGraphicSize() const
virtual sal_Bool SAL_CALL hasElements() override
Definition: unosett.cxx:1228
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:737
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
Definition: number.cxx:1488
SwPageDesc * GetPageDesc(SwDoc &rDoc) const
Definition: docftn.cxx:106
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:764
SwXNumberingRules & m_rParent
Definition: unosett.cxx:1011
#define PROPERTY_NONE
sal_uInt16 GetRight() const
Definition: fmtclds.hxx:52
#define UNO_NAME_LEFT_MARGIN
Definition: unoprnms.hxx:67
bool IsPaintLineNumbers() const
Definition: lineinfo.hxx:80
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:777
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:786
#define MID_VERTORIENT_ORIENT
Definition: unomid.h:34
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:153
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:299
void SetFirstLineOffset(sal_Int32 nSet)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
static void SetPropertiesToNumFormat(SwNumFormat &aFormat, OUString &rCharStyleName, OUString *const pBulletFontName, OUString *const pHeadingStyleName, OUString *const pParagraphStyleName, SwDoc *const pDoc, css::uno::Sequence< css::beans::PropertyValue > const &rProperties)
Definition: unosett.cxx:1530
#define WID_START_AT
Definition: unosett.cxx:102
const char UNO_NAME_PARENT_NUMBERING[]
#define WID_ANCHOR_CHARACTER_STYLE
Definition: unosett.cxx:110
css::uno::Sequence< css::text::TextColumn > m_aTextColumns
Definition: unosett.hxx:251
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
sal_uLong GetLineWidth() const
Definition: fmtclds.hxx:117
virtual ~SwXLineNumberingProperties() override
Definition: unosett.cxx:776
#define UNO_NAME_IS_ON
Definition: unoprnms.hxx:526
LineNumberPosition GetPos() const
Definition: lineinfo.hxx:77
static const SfxItemPropertySet * GetEndnoteSet()
Definition: unosett.cxx:144
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:637
SwCharFormat * GetCharFormat(IDocumentStylePoolAccess &rIDSPA) const
Definition: lineinfo.cxx:99
tools::Long Height() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:2173
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:658
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:2294
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:89
#define UNO_NAME_IS_AUTOMATIC
Definition: unoprnms.hxx:466
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:2448
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2168
virtual sal_Int16 SAL_CALL getColumnCount() override
Definition: unosett.cxx:2251
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:759
#define UNO_NAME_BULLET_FONT_NAME
Definition: unoprnms.hxx:50
ColumnDescriptor.
Definition: fmtclds.hxx:33
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:2042
#define UNO_NAME_SYMBOL_TEXT_DISTANCE
Definition: unoprnms.hxx:411
void SetSuffix(const OUString &rSet)
sal_Int32 GetFirstLineOffset() const
static SwPageDesc * lcl_GetPageDesc(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:235
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
SwNumRule * m_pNumRule
Definition: unosett.hxx:152
void SetStart(sal_uInt16 nSet)
sal_uInt16 GetLeft() const
Definition: fmtclds.hxx:51
void SetLineNumberInfo(const SwLineNumberInfo &rInfo)
Definition: lineinfo.cxx:30
#define UNO_NAME_BULLET_COLOR
Definition: unoprnms.hxx:51
OUString m_aQuoVadis
Definition: ftninfo.hxx:95
virtual void SetGraphicBrush(const SvxBrushItem *pBrushItem, const Size *pSize=nullptr, const sal_Int16 *pOrient=nullptr) override
Definition: number.cxx:311
#define WID_INTERVAL
Definition: unosett.cxx:115
#define UNO_NAME_COUNT_EMPTY_LINES
Definition: unoprnms.hxx:240
const unsigned short aUnoToSvxAdjust[]
Definition: unosett.cxx:262
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:277
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:2373
bool IsAbsSpaces() const
Definition: numrule.hxx:237
#define SAL_WARN(area, stream)
SwFootnotePos m_ePos
Definition: ftninfo.hxx:97
void SetAbsLSpace(sal_Int32 nSet)
#define UNO_NAME_GRAPHIC_URL
Definition: unoprnms.hxx:45
css::uno::Sequence< css::beans::PropertyValue > GetNumberingRuleByIndex(const SwNumRule &rNumRule, sal_Int32 nIndex) const
Definition: unosett.cxx:1247
const OUString & GetDivider() const
Definition: lineinfo.hxx:66
#define WID_POSITION_END_OF_DOC
Definition: unosett.cxx:107
#define WID_CONTINUOUS
Definition: unomap.hxx:302
#define WID_COUNT_EMPTY_LINES
Definition: unosett.cxx:117
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:991
bool DelNumRule(const OUString &rName, bool bBroadCast=false)
Definition: docnum.cxx:1046
const FontList * GetFontList() const
bool m_bSepLineIsOn
Definition: unosett.hxx:262
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unosett.hxx:144
const SvxNumberType & GetNumType() const
Definition: lineinfo.hxx:63
static const char * STR_POOLCOLL_HEADLINE_ARY[]
Definition: unosett.cxx:1234
sal_uInt16 GetDividerCountBy() const
Definition: lineinfo.hxx:68
void SetNumberingType(SvxNumType nSet)
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:737
#define UNO_NAME_BULLET_REL_SIZE
Definition: unoprnms.hxx:48
SwXNumberingRules(SwDocShell &rDocSh)
Definition: unosett.cxx:1087
void SetFirstLineIndent(const tools::Long nFirstLineIndent)
sal_Int8 m_nSepLineHeightRelative
Definition: unosett.hxx:260
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
tools::Long GetIndentAt() const
#define WID_RESTART_AT_EACH_PAGE
Definition: unosett.cxx:119
Standard page.
Definition: poolfmt.hxx:170
static bool isInvalidStyle(const OUString &rName)
Definition: unosett.cxx:1017
#define UNO_NAME_RESTART_AT_EACH_PAGE
Definition: unoprnms.hxx:241
Reference< XGraphic > xGraphic
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:557
sal_Int32 m_nSepLineWidth
Definition: unosett.hxx:258
#define UNO_NAME_PAGE_STYLE_NAME
Definition: unoprnms.hxx:167
const SwFootnoteInfo & GetFootnoteInfo() const
Definition: doc.hxx:626
#define WID_IS_ABS_MARGINS
Definition: unomap.hxx:304
#define UNO_NAME_LISTTAB_STOP_POSITION
Definition: unoprnms.hxx:791
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:628
bool IsOutlineRule() const
Definition: numrule.hxx:240
OUString m_aErgoSum
Definition: ftninfo.hxx:96
#define WID_DEFAULT_LIST_ID
Definition: unomap.hxx:306
#define UNO_NAME_NAME
Definition: unoprnms.hxx:75
sal_uInt16 nPos
SwDocShell * m_pDocShell
Definition: unosett.hxx:151
void SetListtabPos(const tools::Long nListtabPos)
#define WID_END_NOTICE
Definition: unosett.cxx:108
sal_Int16 nValue
SwNumRule * GetOutlineNumRule() const
Definition: doc.hxx:1023
SwColLineAdj GetLineAdj() const
Definition: fmtclds.hxx:120
#define WID_RULE_NAME
Definition: unomap.hxx:303
virtual ~SwXEndnoteProperties() override
Definition: unosett.cxx:574
OUString m_sCreatedNumRuleName
Definition: unosett.hxx:149
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
Definition: swtypes.cxx:28
SfxMedium * GetMedium() const