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 <vcl/font.hxx>
54 #include <editeng/flstitem.hxx>
55 #include <vcl/metric.hxx>
56 #include <vcl/graph.hxx>
57 #include <vcl/GraphicLoader.hxx>
58 #include <sfx2/docfile.hxx>
59 #include <svtools/ctrltool.hxx>
60 #include <vcl/svapp.hxx>
61 #include <editeng/unofdesc.hxx>
62 #include <fmtornt.hxx>
63 #include <SwStyleNameMapper.hxx>
64 #include <com/sun/star/text/PositionAndSpaceMode.hpp>
65 #include <com/sun/star/text/LabelFollow.hpp>
66 #include <numrule.hxx>
68 #include <comphelper/sequence.hxx>
71 #include <svl/itemprop.hxx>
72 #include <svl/listener.hxx>
73 #include <paratr.hxx>
74 #include <sal/log.hxx>
75 #include <numeric>
76 
77 using namespace ::com::sun::star;
78 using namespace ::com::sun::star::uno;
79 using namespace ::com::sun::star::lang;
80 using namespace ::com::sun::star::beans;
81 using namespace ::com::sun::star::text;
82 using namespace ::com::sun::star::style;
83 
84 
85 namespace
86 {
87  SvtBroadcaster& GetPageDescNotifier(SwDoc* pDoc)
88  {
90  }
91 }
92 // Constants for the css::text::ColumnSeparatorStyle
93 #define API_COL_LINE_NONE 0
94 #define API_COL_LINE_SOLID 1
95 #define API_COL_LINE_DOTTED 2
96 #define API_COL_LINE_DASHED 3
97 
98 #define WID_PREFIX 0
99 #define WID_SUFFIX 1
100 #define WID_NUMBERING_TYPE 2
101 #define WID_START_AT 3
102 #define WID_FOOTNOTE_COUNTING 4
103 #define WID_PARAGRAPH_STYLE 5
104 #define WID_PAGE_STYLE 6
105 #define WID_CHARACTER_STYLE 7
106 #define WID_POSITION_END_OF_DOC 8
107 #define WID_END_NOTICE 9
108 #define WID_BEGIN_NOTICE 10
109 #define WID_ANCHOR_CHARACTER_STYLE 11
110 #define WID_NUM_ON 12
111 #define WID_SEPARATOR_INTERVAL 13
112 #define WID_NUMBER_POSITION 14
113 #define WID_DISTANCE 15
114 #define WID_INTERVAL 16
115 #define WID_SEPARATOR_TEXT 17
116 #define WID_COUNT_EMPTY_LINES 18
117 #define WID_COUNT_LINES_IN_FRAMES 19
118 #define WID_RESTART_AT_EACH_PAGE 20
119 
120 
122 {
123  static const SfxItemPropertyMapEntry aFootnoteMap_Impl[] =
124  {
137  { OUString(), 0, css::uno::Type(), 0, 0 }
138  };
139  static const SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl);
140  return &aFootnoteSet_Impl;
141 }
142 
144 {
145  static const SfxItemPropertyMapEntry aEndnoteMap_Impl[] =
146  {
155  { OUString(), 0, css::uno::Type(), 0, 0 }
156  };
157  static const SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl);
158  return &aEndnoteSet_Impl;
159 }
160 
162 {
163  static const SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] =
164  {
168  { OUString(UNO_NAME_NAME), WID_RULE_NAME , ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
170  { OUString(UNO_NAME_DEFAULT_LIST_ID), WID_DEFAULT_LIST_ID, ::cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
171  { OUString(), 0, css::uno::Type(), 0, 0 }
172  };
173  static const SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl );
174  return &aNumberingRulesSet_Impl;
175 }
176 
178 {
179  static const SfxItemPropertyMapEntry aLineNumberingMap_Impl[] =
180  {
192  { OUString(), 0, css::uno::Type(), 0, 0 }
193  };
194  static const SfxItemPropertySet aLineNumberingSet_Impl(aLineNumberingMap_Impl);
195  return &aLineNumberingSet_Impl;
196 }
197 
198 static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
199 {
200  SwCharFormat* pRet = nullptr;
201  OUString uTmp;
202  aValue >>= uTmp;
203  OUString sCharFormat;
205  if (sCharFormat != SwResId(STR_POOLCHR_STANDARD))
206  {
207  pRet = pDoc->FindCharFormatByName( sCharFormat );
208  }
209  if(!pRet)
210  {
212  if(USHRT_MAX != nId)
214  }
215  return pRet;
216 }
217 
218 static SwTextFormatColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
219 {
220  OUString uTmp;
221  aValue >>= uTmp;
222  OUString sParaStyle;
224  SwTextFormatColl* pRet = pDoc->FindTextFormatCollByName( sParaStyle );
225  if( !pRet )
226  {
228  if( USHRT_MAX != nId )
229  pRet = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId );
230  }
231  return pRet;
232 }
233 
234 static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
235 {
236  OUString uTmp;
237  aValue >>= uTmp;
238  OUString sPageDesc;
240  SwPageDesc* pRet = pDoc->FindPageDesc( sPageDesc );
241  if(!pRet)
242  {
244  if(USHRT_MAX != nId)
245  pRet = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nId );
246  }
247  return pRet;
248 }
249 
250 // Numbering
252 {
253  text::HoriOrientation::LEFT, //3
254  text::HoriOrientation::RIGHT, //1
255  USHRT_MAX,
256  text::HoriOrientation::CENTER, //2
257  USHRT_MAX,
258  USHRT_MAX
259 };
260 
261 const unsigned short aUnoToSvxAdjust[] =
262 {
263  USHRT_MAX,
264  static_cast<unsigned short>(SvxAdjust::Right), // 1
265  static_cast<unsigned short>(SvxAdjust::Center), // 3
266  static_cast<unsigned short>(SvxAdjust::Left), // 0
267  USHRT_MAX,
268  USHRT_MAX
269 };
270 
272 {
273  return "SwXFootnoteProperties";
274 }
275 
277 {
278  return cppu::supportsService(this, rServiceName);
279 }
280 
282 {
283  Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
284  return aRet;
285 }
286 
288  m_pDoc(pDc),
289  m_pPropertySet(GetFootnoteSet())
290 {
291 }
292 
294 {
295 
296 }
297 
298 uno::Reference< beans::XPropertySetInfo > SwXFootnoteProperties::getPropertySetInfo()
299 {
300  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
301  return aRef;
302 }
303 
304 void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
305 {
306  SolarMutexGuard aGuard;
307  if(!m_pDoc)
308  throw uno::RuntimeException();
309 
310  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
311  if(!pEntry)
312  throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
313 
314  if ( pEntry->nFlags & PropertyAttribute::READONLY)
315  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
316  SwFootnoteInfo aFootnoteInfo(m_pDoc->GetFootnoteInfo());
317  switch(pEntry->nWID)
318  {
319  case WID_PREFIX:
320  {
321  OUString uTmp;
322  aValue >>= uTmp;
323  aFootnoteInfo.SetPrefix(uTmp);
324  }
325  break;
326  case WID_SUFFIX:
327  {
328  OUString uTmp;
329  aValue >>= uTmp;
330  aFootnoteInfo.SetSuffix(uTmp);
331  }
332  break;
333  case WID_NUMBERING_TYPE:
334  {
335  sal_Int16 nTmp = 0;
336  aValue >>= nTmp;
337  if(!(nTmp >= 0 &&
338  (nTmp <= SVX_NUM_ARABIC ||
339  nTmp > SVX_NUM_BITMAP)))
340  throw lang::IllegalArgumentException();
341 
342  aFootnoteInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
343 
344  }
345  break;
346  case WID_START_AT:
347  {
348  sal_Int16 nTmp = 0;
349  aValue >>= nTmp;
350  aFootnoteInfo.m_nFootnoteOffset = nTmp;
351  }
352  break;
354  {
355  sal_Int16 nTmp = 0;
356  aValue >>= nTmp;
357  switch(nTmp)
358  {
359  case FootnoteNumbering::PER_PAGE:
360  aFootnoteInfo.m_eNum = FTNNUM_PAGE;
361  break;
362  case FootnoteNumbering::PER_CHAPTER:
363  aFootnoteInfo.m_eNum = FTNNUM_CHAPTER;
364  break;
365  case FootnoteNumbering::PER_DOCUMENT:
366  aFootnoteInfo.m_eNum = FTNNUM_DOC;
367  break;
368  }
369  }
370  break;
371  case WID_PARAGRAPH_STYLE:
372  {
373  SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
374  if(pColl)
375  aFootnoteInfo.SetFootnoteTextColl(*pColl);
376  }
377  break;
378  case WID_PAGE_STYLE:
379  {
381  if(pDesc)
382  aFootnoteInfo.ChgPageDesc( pDesc );
383  }
384  break;
386  case WID_CHARACTER_STYLE:
387  {
388  SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
389  if(pFormat)
390  {
391  if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
392  aFootnoteInfo.SetAnchorCharFormat(pFormat);
393  else
394  aFootnoteInfo.SetCharFormat(pFormat);
395  }
396  }
397  break;
399  {
400  bool bVal = *o3tl::doAccess<bool>(aValue);
401  aFootnoteInfo.m_ePos = bVal ? FTNPOS_CHAPTER : FTNPOS_PAGE;
402  }
403  break;
404  case WID_END_NOTICE:
405  {
406  OUString uTmp;
407  aValue >>= uTmp;
408  aFootnoteInfo.m_aQuoVadis = uTmp;
409  }
410  break;
411  case WID_BEGIN_NOTICE:
412  {
413  OUString uTmp;
414  aValue >>= uTmp;
415  aFootnoteInfo.m_aErgoSum = uTmp;
416  }
417  break;
418  }
419  m_pDoc->SetFootnoteInfo(aFootnoteInfo);
420 
421 
422 }
423 
424 uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
425 {
426  SolarMutexGuard aGuard;
427  uno::Any aRet;
428  if(!m_pDoc)
429  throw uno::RuntimeException();
430 
431  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
432  if(!pEntry)
433  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
434 
435  const SwFootnoteInfo& rFootnoteInfo = m_pDoc->GetFootnoteInfo();
436  switch(pEntry->nWID)
437  {
438  case WID_PREFIX:
439  {
440  aRet <<= rFootnoteInfo.GetPrefix();
441  }
442  break;
443  case WID_SUFFIX:
444  {
445  aRet <<= rFootnoteInfo.GetSuffix();
446  }
447  break;
448  case WID_NUMBERING_TYPE :
449  {
450  aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_aFormat.GetNumberingType());
451  }
452  break;
453  case WID_START_AT:
454  aRet <<= static_cast<sal_Int16>(rFootnoteInfo.m_nFootnoteOffset);
455  break;
456  case WID_FOOTNOTE_COUNTING :
457  {
458  sal_Int16 nRet = 0;
459  switch(rFootnoteInfo.m_eNum)
460  {
461  case FTNNUM_PAGE:
462  nRet = FootnoteNumbering::PER_PAGE;
463  break;
464  case FTNNUM_CHAPTER:
465  nRet = FootnoteNumbering::PER_CHAPTER;
466  break;
467  case FTNNUM_DOC:
468  nRet = FootnoteNumbering::PER_DOCUMENT;
469  break;
470  }
471  aRet <<= nRet;
472  }
473  break;
474  case WID_PARAGRAPH_STYLE :
475  {
476  SwTextFormatColl* pColl = rFootnoteInfo.GetFootnoteTextColl();
477  OUString aString;
478  if(pColl)
479  aString = pColl->GetName();
481  aRet <<= aString;
482  }
483  break;
484  case WID_PAGE_STYLE :
485  {
486  OUString aString;
487  if( rFootnoteInfo.KnowsPageDesc() )
488  {
490  rFootnoteInfo.GetPageDesc( *m_pDoc )->GetName(),
491  aString,
493  }
494  aRet <<= aString;
495  }
496  break;
498  case WID_CHARACTER_STYLE:
499  {
500  OUString aString;
501  const SwCharFormat* pCharFormat = rFootnoteInfo.GetCurrentCharFormat(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE);
502  if( pCharFormat )
503  {
505  pCharFormat->GetName(),
506  aString,
508  }
509  aRet <<= aString;
510  }
511  break;
513  aRet <<= FTNPOS_CHAPTER == rFootnoteInfo.m_ePos;
514  break;
515  case WID_END_NOTICE :
516  aRet <<= rFootnoteInfo.m_aQuoVadis;
517  break;
518  case WID_BEGIN_NOTICE :
519  aRet <<= rFootnoteInfo.m_aErgoSum;
520  break;
521  }
522 
523 
524  return aRet;
525 }
526 
528  const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
529 {
530  OSL_FAIL("not implemented");
531 }
532 
534  const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
535 {
536  OSL_FAIL("not implemented");
537 }
538 
540  const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
541 {
542  OSL_FAIL("not implemented");
543 }
544 
546  const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
547 {
548  OSL_FAIL("not implemented");
549 }
550 
552 {
553  return "SwXEndnoteProperties";
554 }
555 
556 sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName)
557 {
558  return cppu::supportsService(this, rServiceName);
559 }
560 
562 {
563  Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" };
564  return aRet;
565 }
566 
568  m_pDoc(pDc),
569  m_pPropertySet(GetEndnoteSet())
570 {
571 }
572 
574 {
575 }
576 
577 uno::Reference< beans::XPropertySetInfo > SwXEndnoteProperties::getPropertySetInfo()
578 {
579  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
580  return aRef;
581 }
582 
583 void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
584 {
585  SolarMutexGuard aGuard;
586  if(m_pDoc)
587  {
588  const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap().getByName( rPropertyName );
589  if(!pEntry)
590  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
591 
592  if ( pEntry->nFlags & PropertyAttribute::READONLY)
593  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
594  SwEndNoteInfo aEndInfo(m_pDoc->GetEndNoteInfo());
595  switch(pEntry->nWID)
596  {
597  case WID_PREFIX:
598  {
599  OUString uTmp;
600  aValue >>= uTmp;
601  aEndInfo.SetPrefix(uTmp);
602  }
603  break;
604  case WID_SUFFIX:
605  {
606  OUString uTmp;
607  aValue >>= uTmp;
608  aEndInfo.SetSuffix(uTmp);
609  }
610  break;
611  case WID_NUMBERING_TYPE :
612  {
613  sal_Int16 nTmp = 0;
614  aValue >>= nTmp;
615  aEndInfo.m_aFormat.SetNumberingType(static_cast<SvxNumType>(nTmp));
616  }
617  break;
618  case WID_START_AT:
619  {
620  sal_Int16 nTmp = 0;
621  aValue >>= nTmp;
622  aEndInfo.m_nFootnoteOffset = nTmp;
623  }
624  break;
625  case WID_PARAGRAPH_STYLE :
626  {
627  SwTextFormatColl* pColl = lcl_GetParaStyle(m_pDoc, aValue);
628  if(pColl)
629  aEndInfo.SetFootnoteTextColl(*pColl);
630  }
631  break;
632  case WID_PAGE_STYLE :
633  {
635  if(pDesc)
636  aEndInfo.ChgPageDesc( pDesc );
637  }
638  break;
640  case WID_CHARACTER_STYLE :
641  {
642  SwCharFormat* pFormat = lcl_getCharFormat(m_pDoc, aValue);
643  if(pFormat)
644  {
645  if(pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE)
646  aEndInfo.SetAnchorCharFormat(pFormat);
647  else
648  aEndInfo.SetCharFormat(pFormat);
649  }
650  }
651  break;
652  }
653  m_pDoc->SetEndNoteInfo(aEndInfo);
654 
655  }
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 static 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  //BulletId
1415  nINT16 = rFormat.GetBulletChar();
1416  aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
1417 
1418  const vcl::Font* pFont = rFormat.GetBulletFont();
1419 
1420  //BulletChar
1421  aUString = OUString(rFormat.GetBulletChar());
1422  aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
1423 
1424  //BulletFontName
1425  aUString = pFont ? pFont->GetStyleName() : OUString();
1426  aPropertyValues.push_back(comphelper::makePropertyValue("BulletFontName", aUString));
1427 
1428  //BulletFont
1429  if(pFont)
1430  {
1431  awt::FontDescriptor aDesc;
1432  SvxUnoFontDescriptor::ConvertFromFont( *pFont, aDesc );
1433  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc));
1434  }
1435  }
1436  if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
1437  {
1438  const SvxBrushItem* pBrush = rFormat.GetBrush();
1439  const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
1440  if (pGraphic)
1441  {
1442  //GraphicBitmap
1443  uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
1444  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBitmap));
1445  }
1446 
1447  Size aSize = rFormat.GetGraphicSize();
1448  // #i101131#
1449  // adjust conversion due to type mismatch between <Size> and <awt::Size>
1450  awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
1451  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_SIZE, aAwtSize));
1452 
1453  const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
1454  if(pOrient)
1455  {
1456  uno::Any any;
1457  pOrient->QueryValue(any);
1458  aPropertyValues.emplace_back(
1459  UNO_NAME_VERT_ORIENT, -1, any, PropertyState_DIRECT_VALUE);
1460  }
1461  }
1462  }
1463  else
1464  {
1465  aUString = *pHeadingStyleName;
1466  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_HEADING_STYLE_NAME, aUString));
1467  }
1468 
1469  return ::comphelper::containerToSequence(aPropertyValues);
1470 }
1471 
1473  SwNumRule& rNumRule,
1474  const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
1475 {
1476  SolarMutexGuard aGuard;
1477  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1478 
1479  SwNumFormat aFormat(rNumRule.Get( static_cast<sal_uInt16>(nIndex) ));
1480 
1481  OUString sHeadingStyleName;
1482  OUString sParagraphStyleName;
1483 
1485  &m_sNewBulletFontNames[nIndex],
1486  &sHeadingStyleName, &sParagraphStyleName,
1487  m_pDoc, rProperties);
1488 
1489 
1490  if (m_pDoc && !sParagraphStyleName.isEmpty())
1491  {
1492  const SwTextFormatColls* pColls = m_pDoc->GetTextFormatColls();
1493  const size_t nCount = pColls->size();
1494  for (size_t k = 0; k < nCount; ++k)
1495  {
1496  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1497  if (rTextColl.GetName() == sParagraphStyleName)
1498  rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
1499  }
1500  }
1501 
1502  if (!sHeadingStyleName.isEmpty())
1503  {
1506  const size_t nCount = pColls->size();
1507  for (size_t k = 0; k < nCount; ++k)
1508  {
1509  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1510  if (rTextColl.IsDefault())
1511  continue;
1512  if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
1513  rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
1514  rTextColl.GetName() != sHeadingStyleName)
1515  {
1517  }
1518  else if (rTextColl.GetName() == sHeadingStyleName)
1519  {
1520  rTextColl.AssignToListLevelOfOutlineStyle( nIndex );
1521  }
1522  }
1523  }
1524 
1525  rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFormat);
1526 }
1527 
1529  SwNumFormat & aFormat,
1530  OUString & rCharStyleName, OUString *const pBulletFontName,
1531  OUString *const pHeadingStyleName,
1532  OUString *const pParagraphStyleName,
1533  SwDoc *const pDoc,
1534  const uno::Sequence<beans::PropertyValue>& rProperties)
1535 {
1536  bool bWrongArg = false;
1537  std::unique_ptr<SvxBrushItem> pSetBrush;
1538  std::unique_ptr<Size> pSetSize;
1539  std::unique_ptr<SwFormatVertOrient> pSetVOrient;
1540  bool bCharStyleNameSet = false;
1541 
1542  for (const beans::PropertyValue& rProp : rProperties)
1543  {
1544  if (rProp.Name == UNO_NAME_ADJUST)
1545  {
1546  sal_Int16 nValue = text::HoriOrientation::NONE;
1547  rProp.Value >>= nValue;
1548  if (nValue > text::HoriOrientation::NONE &&
1549  nValue <= text::HoriOrientation::LEFT &&
1550  USHRT_MAX != aUnoToSvxAdjust[nValue])
1551  {
1552  aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
1553  }
1554  else
1555  bWrongArg = true;
1556  }
1557  else if (rProp.Name == UNO_NAME_PARENT_NUMBERING)
1558  {
1559  sal_Int16 nSet = 0;
1560  rProp.Value >>= nSet;
1561  if(nSet >= 0 && MAXLEVEL >= nSet)
1562  aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
1563  }
1564  else if (rProp.Name == UNO_NAME_PREFIX)
1565  {
1566  OUString uTmp;
1567  rProp.Value >>= uTmp;
1568  aFormat.SetPrefix(uTmp);
1569  }
1570  else if (rProp.Name == UNO_NAME_SUFFIX)
1571  {
1572  OUString uTmp;
1573  rProp.Value >>= uTmp;
1574  aFormat.SetSuffix(uTmp);
1575  }
1576  else if (rProp.Name == UNO_NAME_CHAR_STYLE_NAME)
1577  {
1578  bCharStyleNameSet = true;
1579  OUString uTmp;
1580  rProp.Value >>= uTmp;
1581  OUString sCharFormatName;
1583  if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
1584  {
1585  rCharStyleName = aInvalidStyle;
1586  aFormat.SetCharFormat(nullptr);
1587  }
1588  else if(pDoc)
1589  {
1590  const SwCharFormats* pFormats = pDoc->GetCharFormats();
1591  const size_t nChCount = pFormats->size();
1592 
1593  SwCharFormat* pCharFormat = nullptr;
1594  if (!sCharFormatName.isEmpty())
1595  {
1596  for(size_t j = 0; j< nChCount; ++j)
1597  {
1598  SwCharFormat* pTmp = (*pFormats)[j];
1599  if(pTmp->GetName() == sCharFormatName)
1600  {
1601  pCharFormat = pTmp;
1602  break;
1603  }
1604  }
1605  if(!pCharFormat)
1606  {
1607 
1608  SfxStyleSheetBase* pBase;
1610  pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
1611  if(!pBase)
1612  pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
1613  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1614  }
1615  }
1616  aFormat.SetCharFormat( pCharFormat );
1617  // #i51842#
1618  // If the character format has been found its name should not be in the
1619  // char style names array
1620  rCharStyleName.clear();
1621  }
1622  else
1623  rCharStyleName = sCharFormatName;
1624  }
1625  else if (rProp.Name == UNO_NAME_START_WITH)
1626  {
1627  sal_Int16 nVal = 0;
1628  rProp.Value >>= nVal;
1629  aFormat.SetStart(nVal);
1630  }
1631  else if (rProp.Name == UNO_NAME_LEFT_MARGIN)
1632  {
1633  sal_Int32 nValue = 0;
1634  rProp.Value >>= nValue;
1635  // #i23727# nValue can be negative
1636  aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
1637  }
1638  else if (rProp.Name == UNO_NAME_SYMBOL_TEXT_DISTANCE)
1639  {
1640  sal_Int32 nValue = 0;
1641  rProp.Value >>= nValue;
1642  if (nValue >= 0)
1643  aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
1644  else
1645  bWrongArg = true;
1646  }
1647  else if (rProp.Name == UNO_NAME_FIRST_LINE_OFFSET)
1648  {
1649  sal_Int32 nValue = 0;
1650  rProp.Value >>= nValue;
1651  // #i23727# nValue can be positive
1652  nValue = convertMm100ToTwip(nValue);
1653  aFormat.SetFirstLineOffset(nValue);
1654  }
1655  else if (rProp.Name == UNO_NAME_POSITION_AND_SPACE_MODE)
1656  {
1657  sal_Int16 nValue = 0;
1658  rProp.Value >>= nValue;
1659  if ( nValue == 0 )
1660  {
1662  }
1663  else if ( nValue == 1 )
1664  {
1666  }
1667  else
1668  {
1669  bWrongArg = true;
1670  }
1671  }
1672  else if (rProp.Name == UNO_NAME_LABEL_FOLLOWED_BY)
1673  {
1674  sal_Int16 nValue = 0;
1675  rProp.Value >>= nValue;
1676  if ( nValue == LabelFollow::LISTTAB )
1677  {
1679  }
1680  else if ( nValue == LabelFollow::SPACE )
1681  {
1683  }
1684  else if ( nValue == LabelFollow::NOTHING )
1685  {
1687  }
1688  else if ( nValue == LabelFollow::NEWLINE )
1689  {
1691  }
1692  else
1693  {
1694  bWrongArg = true;
1695  }
1696  }
1697  else if (rProp.Name == UNO_NAME_LISTTAB_STOP_POSITION)
1698  {
1699  sal_Int32 nValue = 0;
1700  rProp.Value >>= nValue;
1701  nValue = convertMm100ToTwip(nValue);
1702  if ( nValue >= 0 )
1703  {
1704  aFormat.SetListtabPos( nValue );
1705  }
1706  else
1707  {
1708  bWrongArg = true;
1709  }
1710  }
1711  else if (rProp.Name == UNO_NAME_FIRST_LINE_INDENT)
1712  {
1713  sal_Int32 nValue = 0;
1714  rProp.Value >>= nValue;
1715  nValue = convertMm100ToTwip(nValue);
1716  aFormat.SetFirstLineIndent( nValue );
1717  }
1718  else if (rProp.Name == UNO_NAME_INDENT_AT)
1719  {
1720  sal_Int32 nValue = 0;
1721  rProp.Value >>= nValue;
1722  nValue = convertMm100ToTwip(nValue);
1723  aFormat.SetIndentAt( nValue );
1724  }
1725  else if (rProp.Name == UNO_NAME_NUMBERING_TYPE)
1726  {
1727  sal_Int16 nSet = 0;
1728  rProp.Value >>= nSet;
1729  if(nSet >= 0)
1730  aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
1731  else
1732  bWrongArg = true;
1733  }
1734  else if (rProp.Name == UNO_NAME_PARAGRAPH_STYLE_NAME)
1735  {
1736  if (pParagraphStyleName)
1737  {
1738  OUString uTmp;
1739  rProp.Value >>= uTmp;
1740  OUString sStyleName;
1742  *pParagraphStyleName = sStyleName;
1743  }
1744  }
1745  else if (rProp.Name == UNO_NAME_BULLET_ID)
1746  {
1747  sal_Int16 nSet = 0;
1748  if( rProp.Value >>= nSet )
1749  aFormat.SetBulletChar(nSet);
1750  else
1751  bWrongArg = true;
1752  }
1753  else if (rProp.Name == UNO_NAME_BULLET_FONT)
1754  {
1755  awt::FontDescriptor desc;
1756  if (rProp.Value >>= desc)
1757  {
1758  // #i93725#
1759  // do not accept "empty" font
1760  if (!desc.Name.isEmpty())
1761  {
1762  vcl::Font aFont;
1764  aFormat.SetBulletFont(&aFont);
1765  }
1766  }
1767  else
1768  bWrongArg = true;
1769  }
1770  else if (rProp.Name == UNO_NAME_BULLET_FONT_NAME)
1771  {
1772  OUString sBulletFontName;
1773  rProp.Value >>= sBulletFontName;
1774  SwDocShell* pLclDocShell = pDoc->GetDocShell();
1775  if( !sBulletFontName.isEmpty() && pLclDocShell )
1776  {
1777  const SvxFontListItem* pFontListItem =
1778  static_cast<const SvxFontListItem* >(pLclDocShell
1779  ->GetItem( SID_ATTR_CHAR_FONTLIST ));
1780  const FontList* pList = pFontListItem->GetFontList();
1781  FontMetric aFontMetric = pList->Get(
1782  sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
1783  vcl::Font aFont(aFontMetric);
1784  aFormat.SetBulletFont(&aFont);
1785  }
1786  else if (pBulletFontName)
1787  *pBulletFontName = sBulletFontName;
1788  }
1789  else if (rProp.Name == UNO_NAME_BULLET_CHAR)
1790  {
1791  OUString aChar;
1792  rProp.Value >>= aChar;
1793  if(aChar.getLength() == 1)
1794  {
1795  aFormat.SetBulletChar(aChar.toChar());
1796  }
1797  else if(aChar.isEmpty())
1798  {
1799  // If w:lvlText's value is null - set bullet char to zero
1800  aFormat.SetBulletChar(u'\0');
1801  }
1802  else
1803  {
1804  bWrongArg = true;
1805  }
1806  }
1807  else if (rProp.Name == UNO_NAME_GRAPHIC)
1808  {
1809  uno::Reference<graphic::XGraphic> xGraphic;
1810  if (rProp.Value >>= xGraphic)
1811  {
1812  if (!pSetBrush)
1813  {
1814  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1815  if(pOrigBrush)
1816  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1817  else
1818  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1819  }
1820  Graphic aGraphic(xGraphic);
1821  pSetBrush->SetGraphic(aGraphic);
1822  }
1823  else
1824  bWrongArg = true;
1825  }
1826  else if (rProp.Name == UNO_NAME_GRAPHIC_BITMAP)
1827  {
1828  uno::Reference<awt::XBitmap> xBitmap;
1829  if (rProp.Value >>= xBitmap)
1830  {
1831  if(!pSetBrush)
1832  {
1833  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1834  if(pOrigBrush)
1835  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1836  else
1837  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1838  }
1839 
1840  uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
1841  Graphic aGraphic(xGraphic);
1842  pSetBrush->SetGraphic(aGraphic);
1843  }
1844  else
1845  bWrongArg = true;
1846  }
1847  else if (rProp.Name == UNO_NAME_GRAPHIC_SIZE)
1848  {
1849  if(!pSetSize)
1850  pSetSize.reset(new Size);
1851  awt::Size size;
1852  if (rProp.Value >>= size)
1853  {
1854  size.Width = convertMm100ToTwip(size.Width);
1855  size.Height = convertMm100ToTwip(size.Height);
1856  pSetSize->setWidth( size.Width );
1857  pSetSize->setHeight( size.Height );
1858  }
1859  else
1860  bWrongArg = true;
1861  }
1862  else if (rProp.Name == UNO_NAME_VERT_ORIENT)
1863  {
1864  if(!pSetVOrient)
1865  {
1866  if(aFormat.GetGraphicOrientation())
1867  pSetVOrient.reset(aFormat.GetGraphicOrientation()->Clone());
1868  else
1869  pSetVOrient.reset(new SwFormatVertOrient);
1870  }
1871  pSetVOrient->PutValue(rProp.Value, MID_VERTORIENT_ORIENT);
1872  }
1873  else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME)
1874  {
1875  if (pHeadingStyleName)
1876  {
1877  OUString uTmp;
1878  rProp.Value >>= uTmp;
1879  OUString sStyleName;
1881  *pHeadingStyleName = sStyleName;
1882  }
1883  }
1884  else if (rProp.Name == UNO_NAME_BULLET_REL_SIZE)
1885  {
1886  // BulletRelSize - unsupported - only available in Impress
1887  }
1888  else if (rProp.Name == UNO_NAME_BULLET_COLOR)
1889  {
1890  // BulletColor - ignored too
1891  }
1892  else if (rProp.Name == UNO_NAME_GRAPHIC_URL)
1893  {
1894  OUString aURL;
1895  if (rProp.Value >>= aURL)
1896  {
1897  if(!pSetBrush)
1898  {
1899  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1900  if(pOrigBrush)
1901  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1902  else
1903  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1904  }
1905 
1906  Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
1907  if (!aGraphic.IsNone())
1908  pSetBrush->SetGraphic(aGraphic);
1909  }
1910  else
1911  bWrongArg = true;
1912  }
1913  else if (rProp.Name == UNO_NAME_LIST_FORMAT)
1914  {
1915  OUString uTmp;
1916  rProp.Value >>= uTmp;
1917  aFormat.SetListFormat(uTmp);
1918  }
1919  else
1920  {
1921  // Invalid property name
1922  SAL_WARN("sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing");
1923  throw uno::RuntimeException("Unknown/incorrect property " + rProp.Name);
1924  }
1925  }
1926  if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
1927  {
1928  if(!pSetBrush && aFormat.GetBrush())
1929  pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
1930 
1931  if(pSetBrush)
1932  {
1933  if(!pSetVOrient && aFormat.GetGraphicOrientation())
1934  pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
1935 
1936  if(!pSetSize)
1937  {
1938  pSetSize.reset(new Size(aFormat.GetGraphicSize()));
1939  if(!pSetSize->Width() || !pSetSize->Height())
1940  {
1941  const Graphic* pGraphic = pSetBrush->GetGraphic();
1942  if(pGraphic)
1943  *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
1944  }
1945  }
1946  sal_Int16 eOrient = pSetVOrient ?
1947  pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
1948  aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
1949  }
1950  }
1951  if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
1952  && aFormat.GetNumberingType() == NumberingType::BITMAP
1953  && !aFormat.GetCharFormat()
1954  && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
1955  {
1956  OUString tmp;
1958  rCharStyleName = tmp;
1959  }
1960 
1961  if(bWrongArg)
1962  throw lang::IllegalArgumentException();
1963 }
1964 
1965 uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
1966 {
1967  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
1968  return aRef;
1969 }
1970 
1971 void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
1972 {
1973  SolarMutexGuard aGuard;
1974  std::unique_ptr<SwNumRule> pDocRule;
1975  SwNumRule* pCreatedRule = nullptr;
1976  if(!m_pNumRule)
1977  {
1978  if(m_pDocShell)
1979  {
1980  pDocRule.reset(new SwNumRule(*m_pDocShell->GetDoc()->GetOutlineNumRule()));
1981  }
1982  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1983  {
1984  pCreatedRule = m_pDoc->FindNumRulePtr(m_sCreatedNumRuleName);
1985  }
1986 
1987  }
1988  if(!m_pNumRule && !pDocRule && !pCreatedRule)
1989  throw RuntimeException();
1990 
1991  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
1992  {
1993  bool bVal = *o3tl::doAccess<bool>(rValue);
1994  if(!pCreatedRule)
1995  pDocRule ? pDocRule->SetAutoRule(bVal) : m_pNumRule->SetAutoRule(bVal);
1996  }
1997  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
1998  {
1999  bool bVal = *o3tl::doAccess<bool>(rValue);
2000  pDocRule ? pDocRule->SetContinusNum(bVal) :
2001  pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : m_pNumRule->SetContinusNum(bVal);
2002  }
2003  else if(rPropertyName == UNO_NAME_NAME)
2004  {
2005  throw IllegalArgumentException();
2006  }
2007  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2008  {
2009  bool bVal = *o3tl::doAccess<bool>(rValue);
2010  pDocRule ? pDocRule->SetAbsSpaces(bVal) :
2011  pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : m_pNumRule->SetAbsSpaces(bVal);
2012  }
2013  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2014  {
2015  bool bVal = *o3tl::doAccess<bool>(rValue);
2016  SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
2017  pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
2018  pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : m_pNumRule->SetRuleType(eNumRuleType);
2019  }
2020  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2021  {
2022  throw IllegalArgumentException();
2023  }
2024  else
2025  throw UnknownPropertyException(rPropertyName);
2026 
2027  if(pDocRule)
2028  {
2030  m_pDocShell->GetDoc()->SetOutlineNumRule(*pDocRule);
2031  pDocRule.reset();
2032  }
2033  else if(pCreatedRule)
2034  {
2035  pCreatedRule->Validate();
2036  }
2037 }
2038 
2039 Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
2040 {
2041  Any aRet;
2042  const SwNumRule* pRule = m_pNumRule;
2043  if(!pRule && m_pDocShell)
2044  pRule = m_pDocShell->GetDoc()->GetOutlineNumRule();
2045  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2047  if(!pRule)
2048  throw RuntimeException();
2049 
2050  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2051  {
2052  aRet <<= pRule->IsAutoRule();
2053  }
2054  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2055  {
2056  aRet <<= pRule->IsContinusNum();
2057  }
2058  else if(rPropertyName == UNO_NAME_NAME)
2059  aRet <<= pRule->GetName();
2060  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2061  {
2062  aRet <<= pRule->IsAbsSpaces();
2063  }
2064  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2065  {
2066  aRet <<= pRule->IsOutlineRule();
2067  }
2068  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2069  {
2070  OSL_ENSURE( !pRule->GetDefaultListId().isEmpty(),
2071  "<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect." );
2072  aRet <<= pRule->GetDefaultListId();
2073  }
2074  else
2075  throw UnknownPropertyException(rPropertyName);
2076  return aRet;
2077 }
2078 
2080  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2081 {
2082 }
2083 
2085  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2086 {
2087 }
2088 
2090  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2091 {
2092 }
2093 
2095  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2096 {
2097 }
2098 
2100 {
2101  if(m_pNumRule)
2102  {
2103  OUString aString;
2105  return aString;
2106  }
2107  // consider chapter numbering <SwXNumberingRules>
2108  if ( m_pDocShell )
2109  {
2110  OUString aString;
2112  aString, SwGetPoolIdFromName::NumRule );
2113  return aString;
2114  }
2115  return m_sCreatedNumRuleName;
2116 }
2117 
2118 void SwXNumberingRules::setName(const OUString& /*rName*/)
2119 {
2120  RuntimeException aExcept;
2121  aExcept.Message = "readonly";
2122  throw aExcept;
2123 }
2124 
2126 {
2127  if(rHint.GetId() == SfxHintId::Dying)
2128  {
2130  delete m_rParent.m_pNumRule;
2131  m_rParent.m_pNumRule = nullptr;
2132  m_rParent.m_pDoc = nullptr;
2133  }
2134 }
2135 
2137 {
2138  return "SwXChapterNumbering";
2139 }
2140 
2141 sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName)
2142 {
2143  return cppu::supportsService(this, rServiceName);
2144 }
2145 
2147 {
2148  return { "com.sun.star.text.ChapterNumbering", "com.sun.star.text.NumberingRules" };
2149 }
2150 
2152  SwXNumberingRules(rDocSh)
2153 {
2154 }
2155 
2157 {
2158 }
2159 
2161 {
2162  return "SwXTextColumns";
2163 }
2164 
2165 sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName)
2166 {
2167  return cppu::supportsService(this, rServiceName);
2168 }
2169 
2171 {
2172  Sequence<OUString> aRet { "com.sun.star.text.TextColumns" };
2173  return aRet;
2174 }
2175 
2177  m_nReference(0),
2178  m_bIsAutomaticWidth(true),
2179  m_nAutoDistance(0),
2180  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)),
2181  m_nSepLineWidth(0),
2182  m_nSepLineColor(0), //black
2183  m_nSepLineHeightRelative(100),//full height
2184  m_nSepLineVertAlign(style::VerticalAlignment_MIDDLE),
2185  m_bSepLineIsOn(false),
2186  m_nSepLineStyle(API_COL_LINE_NONE) // None
2187 {
2188 }
2189 
2191  m_nReference(0),
2192  m_aTextColumns(rFormatCol.GetNumCols()),
2193  m_bIsAutomaticWidth(rFormatCol.IsOrtho()),
2194  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
2195 {
2196  const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth();
2198  USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : static_cast<sal_Int32>(nItemGutterWidth)
2199  : 0;
2201 
2202  TextColumn* pColumns = m_aTextColumns.getArray();
2203  const SwColumns& rCols = rFormatCol.GetColumns();
2204  for(sal_Int32 i = 0; i < m_aTextColumns.getLength(); ++i)
2205  {
2206  const SwColumn* pCol = &rCols[i];
2207 
2208  pColumns[i].Width = pCol->GetWishWidth();
2209  m_nReference += pColumns[i].Width;
2210  pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft ());
2211  pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight());
2212  }
2213  if(!m_aTextColumns.hasElements())
2214  m_nReference = USHRT_MAX;
2215 
2216  m_nSepLineWidth = rFormatCol.GetLineWidth();
2217  m_nSepLineColor = rFormatCol.GetLineColor();
2218  m_nSepLineHeightRelative = rFormatCol.GetLineHeight();
2219  m_bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE;
2220  sal_Int8 nStyle = API_COL_LINE_NONE;
2221  switch (rFormatCol.GetLineStyle())
2222  {
2223  case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
2224  case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
2225  case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
2226  default: break;
2227  }
2228  m_nSepLineStyle = nStyle;
2229  switch(rFormatCol.GetLineAdj())
2230  {
2231  case COLADJ_TOP: m_nSepLineVertAlign = style::VerticalAlignment_TOP; break;
2232  case COLADJ_BOTTOM: m_nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break;
2233  case COLADJ_CENTER:
2234  case COLADJ_NONE: m_nSepLineVertAlign = style::VerticalAlignment_MIDDLE;
2235  }
2236 }
2237 
2239 {
2240 }
2241 
2243 {
2244  SolarMutexGuard aGuard;
2245  return m_nReference;
2246 }
2247 
2249 {
2250  SolarMutexGuard aGuard;
2251  return static_cast< sal_Int16>( m_aTextColumns.getLength() );
2252 }
2253 
2254 void SwXTextColumns::setColumnCount(sal_Int16 nColumns)
2255 {
2256  SolarMutexGuard aGuard;
2257  if(nColumns <= 0)
2258  throw uno::RuntimeException();
2259  m_bIsAutomaticWidth = true;
2260  m_aTextColumns.realloc(nColumns);
2261  TextColumn* pCols = m_aTextColumns.getArray();
2263  sal_Int32 nWidth = m_nReference / nColumns;
2264  sal_Int32 nDiff = m_nReference - nWidth * nColumns;
2265  sal_Int32 nDist = m_nAutoDistance / 2;
2266  for(sal_Int16 i = 0; i < nColumns; i++)
2267  {
2268  pCols[i].Width = nWidth;
2269  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2270  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2271  }
2272  pCols[nColumns - 1].Width += nDiff;
2273 }
2274 
2275 uno::Sequence< TextColumn > SwXTextColumns::getColumns()
2276 {
2277  SolarMutexGuard aGuard;
2278  return m_aTextColumns;
2279 }
2280 
2281 void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
2282 {
2283  SolarMutexGuard aGuard;
2284  sal_Int32 nReferenceTemp = std::accumulate(rColumns.begin(), rColumns.end(), sal_Int32(0),
2285  [](const sal_Int32 nSum, const TextColumn& rCol) { return nSum + rCol.Width; });
2286  m_bIsAutomaticWidth = false;
2287  m_nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp;
2288  m_aTextColumns = rColumns;
2289 }
2290 
2291 uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( )
2292 {
2293  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
2294  return aRef;
2295 }
2296 
2297 void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
2298 {
2299  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2300  if (!pEntry)
2301  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2302  if ( pEntry->nFlags & PropertyAttribute::READONLY)
2303  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2304 
2305  switch(pEntry->nWID)
2306  {
2307  case WID_TXTCOL_LINE_WIDTH:
2308  {
2309  sal_Int32 nTmp = 0;
2310  aValue >>= nTmp;
2311  if(nTmp < 0)
2312  throw IllegalArgumentException();
2314  }
2315  break;
2316  case WID_TXTCOL_LINE_COLOR:
2317  aValue >>= m_nSepLineColor;
2318  break;
2319  case WID_TXTCOL_LINE_STYLE:
2320  {
2321  aValue >>= m_nSepLineStyle;
2322  }
2323  break;
2325  {
2326  sal_Int8 nTmp = 0;
2327  aValue >>= nTmp;
2328  if(nTmp < 0)
2329  throw IllegalArgumentException();
2330  m_nSepLineHeightRelative = nTmp;
2331  }
2332  break;
2333  case WID_TXTCOL_LINE_ALIGN:
2334  {
2335  style::VerticalAlignment eAlign;
2336  if(!(aValue >>= eAlign) )
2337  {
2338  sal_Int8 nTmp = 0;
2339  if (! ( aValue >>= nTmp ) )
2340  throw IllegalArgumentException();
2341  m_nSepLineVertAlign = static_cast<style::VerticalAlignment>(nTmp);
2342  }
2343  else
2344  m_nSepLineVertAlign = eAlign;
2345  }
2346  break;
2347  case WID_TXTCOL_LINE_IS_ON:
2348  m_bSepLineIsOn = *o3tl::doAccess<bool>(aValue);
2349  break;
2351  {
2352  sal_Int32 nTmp = 0;
2353  aValue >>= nTmp;
2354  if(nTmp < 0 || nTmp >= m_nReference)
2355  throw IllegalArgumentException();
2356  m_nAutoDistance = nTmp;
2357  sal_Int32 nColumns = m_aTextColumns.getLength();
2358  TextColumn* pCols = m_aTextColumns.getArray();
2359  sal_Int32 nDist = m_nAutoDistance / 2;
2360  for(sal_Int32 i = 0; i < nColumns; i++)
2361  {
2362  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2363  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2364  }
2365  }
2366  break;
2367  }
2368 }
2369 
2370 Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
2371 {
2372  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2373  if (!pEntry)
2374  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2375 
2376  Any aRet;
2377  switch(pEntry->nWID)
2378  {
2379  case WID_TXTCOL_LINE_WIDTH:
2380  aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(m_nSepLineWidth));
2381  break;
2382  case WID_TXTCOL_LINE_COLOR:
2383  aRet <<= m_nSepLineColor;
2384  break;
2385  case WID_TXTCOL_LINE_STYLE:
2386  aRet <<= m_nSepLineStyle;
2387  break;
2389  aRet <<= m_nSepLineHeightRelative;
2390  break;
2391  case WID_TXTCOL_LINE_ALIGN:
2392  aRet <<= m_nSepLineVertAlign;
2393  break;
2394  case WID_TXTCOL_LINE_IS_ON:
2395  aRet <<= m_bSepLineIsOn;
2396  break;
2398  aRet <<= m_bIsAutomaticWidth;
2399  break;
2401  aRet <<= m_nAutoDistance;
2402  break;
2403  }
2404  return aRet;
2405 }
2406 
2408  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2409 {
2410 }
2411 
2413  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2414 {
2415 }
2416 
2418  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2419 {
2420 }
2421 
2423  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2424 {
2425 }
2426 
2427 namespace
2428 {
2429  class theSwXTextColumnsUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXTextColumnsUnoTunnelId > {};
2430 }
2431 
2432 const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId()
2433 {
2434  return theSwXTextColumnsUnoTunnelId::get().getSeq();
2435 }
2436 
2437 sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId )
2438 {
2439  if( isUnoTunnelId<SwXTextColumns>(rId) )
2440  {
2441  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
2442  }
2443  return 0;
2444 }
2445 
2446 /* 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:2412
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:312
SvxNumType GetNumberingType() const
long Width() const
#define UNO_NAME_CHARACTER_FORMAT_NONE
Definition: unoprnms.hxx:336
SwXFootnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:287
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:2160
static SwTextFormatColl * lcl_GetParaStyle(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:218
URL aURL
virtual ~SwXTextColumns() override
Definition: unosett.cxx:2238
void SetLabelFollowedBy(const LabelFollowedBy eLabelFollowedBy)
#define UNO_NAME_POSITION_AND_SPACE_MODE
Definition: unoprnms.hxx:788
int GetAssignedOutlineStyleLevel() const
Definition: fmtcol.cxx:587
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:281
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:117
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:2281
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
Definition: docftn.cxx:290
long GetFirstLineIndent() const
bool IsDefault() const
Definition: format.hxx:109
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:271
#define WID_TXTCOL_LINE_STYLE
Definition: unomap.hxx:315
static const char aInvalidStyle[]
Definition: unosett.cxx:1006
SwDocShell * GetDocShell()
Definition: doc.hxx:1348
void SetAutoRule(bool bFlag)
Definition: numrule.hxx:228
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:424
const OUString & GetStyleName() const
const OUString & GetSuffix() const
Definition: ftninfo.hxx:71
bool IsNone() const
#define WID_NUM_ON
Definition: unosett.cxx:110
#define WID_PREFIX
Definition: unosett.cxx:98
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
sal_uInt16 GetCountBy() const
Definition: lineinfo.hxx:74
long Height() const
#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:105
sal_uInt16 char char * pDesc
const SvxBrushItem * GetBrush() const
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: doc.hxx:796
#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:111
#define WID_PAGE_STYLE
Definition: unosett.cxx:104
#define UNO_NAME_START_AT
Definition: unoprnms.hxx:305
void SetPrefix(const OUString &rSet)
#define UNO_NAME_INDENT_AT
Definition: unoprnms.hxx:792
const OUString & GetDefaultListId() const
Definition: numrule.hxx:192
#define UNO_NAME_NUMBERING_TYPE
Definition: unoprnms.hxx:278
#define UNO_NAME_PARA_STYLE_NAME
Definition: unoprnms.hxx:171
bool IsAutoRule() const
Definition: numrule.hxx:227
#define WID_SEPARATOR_TEXT
Definition: unosett.cxx:115
#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:2079
virtual ~SwXFootnoteProperties() override
Definition: unosett.cxx:293
Definition: doc.hxx:184
void SetContinusNum(bool bFlag)
Definition: numrule.hxx:234
SwXEndnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:567
#define UNO_NAME_NUMBER_POSITION
Definition: unoprnms.hxx:166
sal_Int16 nId
sal_uInt8 GetIncludeUpperLevels() const
SwNumRuleType
Definition: numrule.hxx:91
#define API_COL_LINE_SOLID
Definition: unosett.cxx:94
const OUString & GetName() const
Definition: numrule.hxx:222
#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:2493
#define WID_PARAGRAPH_STYLE
Definition: unosett.cxx:103
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:2146
#define UNO_NAME_VERT_ORIENT
Definition: unoprnms.hxx:328
const Color & GetLineColor() const
Definition: fmtclds.hxx:118
#define WID_IS_AUTOMATIC
Definition: unomap.hxx:300
#define WID_NUMBERING_TYPE
Definition: unosett.cxx:100
#define UNO_NAME_GRAPHIC
Definition: unoprnms.hxx:159
#define UNO_NAME_PARAGRAPH_STYLE_NAME
Definition: unoprnms.hxx:825
void SetIncludeUpperLevels(sal_uInt8 nSet)
#define UNO_NAME_LABEL_FOLLOWED_BY
Definition: unoprnms.hxx:789
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:329
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:2084
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void SetAbsSpaces(bool bFlag)
Definition: numrule.hxx:237
SfxHintId GetId() const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
#define UNO_NAME_FIRST_LINE_INDENT
Definition: unoprnms.hxx:791
bool HasListFormat() const
SvxBorderLineStyle GetLineStyle() const
Definition: fmtclds.hxx:116
const OUString & GetName() const
Definition: pagedesc.hxx:187
SwTextFormatColl * GetFootnoteTextColl() const
Definition: ftninfo.hxx:55
#define WID_TXTCOL_LINE_WIDTH
Definition: unomap.hxx:308
void SetListFormat(const OUString &rSet)
#define WID_TXTCOL_LINE_COLOR
Definition: unomap.hxx:309
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:577
SwDoc * m_pDoc
Definition: docbm.cxx:1190
#define UNO_NAME_PREFIX
Definition: unoprnms.hxx:79
#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:2407
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:545
#define UNO_NAME_START_WITH
Definition: unoprnms.hxx:306
#define API_COL_LINE_NONE
Definition: unosett.cxx:93
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:108
#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:583
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: atrfrm.cxx:1287
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:425
static const SfxItemPropertySet * GetFootnoteSet()
Definition: unosett.cxx:121
#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:2089
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:96
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:2254
#define WID_IS_OUTLINE
Definition: unomap.hxx:304
Impl(SwXNumberingRules &rParent)
Definition: unosett.cxx:1014
const Graphic * GetGraphic(OUString const &referer=OUString()) const
#define WID_SUFFIX
Definition: unosett.cxx:99
const OUString & GetPrefix() const
void SetNumberingRuleByIndex(SwNumRule &rNumRule, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, sal_Int32 nIndex)
Definition: unosett.cxx:1472
#define UNO_NAME_IS_ABSOLUTE_MARGINS
Definition: unoprnms.hxx:467
const OUString & GetSuffix() const
virtual void Notify(const SfxHint &) override
Definition: unosett.cxx:2125
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:102
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:821
void SetFirstLineIndent(const long nFirstLineIndent)
#define UNO_NAME_NUMBERING_IS_OUTLINE
Definition: unoprnms.hxx:747
virtual ~SwXChapterNumbering() override
Definition: unosett.cxx:2156
css::style::VerticalAlignment m_nSepLineVertAlign
Definition: unosett.hxx:261
bool IsContinusNum() const
Definition: numrule.hxx:233
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unosett.cxx:533
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:2437
SwCharFormat * GetCharFormat() const
Definition: numrule.hxx:73
static const SfxItemPropertySet * GetNumberingRulesSet()
Definition: unosett.cxx:161
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
const SwFormatVertOrient * GetGraphicOrientation() const
Definition: number.cxx:341
virtual void SAL_CALL setName(const OUString &Name_) override
Definition: unosett.cxx:2118
sal_uInt16 GetPosFromLeft() const
Definition: lineinfo.hxx:71
SwFootnoteNum m_eNum
Definition: ftninfo.hxx:97
SwNumRule * FindNumRulePtr(const OUString &rName) const
Definition: docnum.cxx:2415
static SwCharFormat * lcl_getCharFormat(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:198
#define UNO_NAME_ANCHOR_CHAR_STYLE_NAME
Definition: unoprnms.hxx:77
void SetListtabPos(const long nListtabPos)
bool m_bIsAutomaticWidth
Definition: unosett.hxx:252
OUString m_sNewCharStyleNames[MAXLEVEL]
Definition: unosett.hxx:147
void SetIndentAt(const long nIndentAt)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:304
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:1971
LabelFollowedBy GetLabelFollowedBy() const
virtual SwFormatVertOrient * Clone(SfxItemPool *pPool=nullptr) const override
Definition: atrfrm.cxx:1282
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:314
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:2422
#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:900
bool HasCharFormat() const
Definition: lineinfo.hxx:92
SwXChapterNumbering(SwDocShell &rDocSh)
Definition: unosett.cxx:2151
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:2099
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
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1142
WEIGHT_NORMAL
#define UNO_NAME_DEFAULT_LIST_ID
Definition: unoprnms.hxx:798
float u
size_t size() const
Definition: docary.hxx:84
unsigned char sal_Bool
void SetBulletChar(sal_Unicode cSet)
const SfxItemPropertyMap & getPropertyMap() const
void SetRuleType(SwNumRuleType eNew)
Definition: numrule.hxx:210
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:527
SvxNumberType m_aFormat
Definition: ftninfo.hxx:46
size
void DeleteAssignmentToListLevelOfOutlineStyle()
Definition: fmtcol.cxx:621
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:561
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:551
OUString sBulletFontName
OUString SwResId(const char *pId)
Definition: swmodule.cxx:178
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:113
GPOS_AREA
static const SfxItemPropertySet * GetLineNumberingSet()
Definition: unosett.cxx:177
void SetCharTextDistance(short nSet)
SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2141
#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:311
#define UNO_NAME_INTERVAL
Definition: unoprnms.hxx:272
#define UNO_NAME_PARENT_NUMBERING
Definition: unoprnms.hxx:81
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosett.cxx:2432
void SetOutlineNumRule(const SwNumRule &rRule)
Definition: docnum.cxx:113
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2094
< 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:2136
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
Definition: fmtcol.cxx:594
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:2297
#define WID_TXTCOL_IS_AUTOMATIC
Definition: unomap.hxx:313
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:51
static void ConvertFromFont(const vcl::Font &rFont, css::awt::FontDescriptor &rDesc)
long GetIndentAt() const
const OUString & GetListFormat() const
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:93
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:2417
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:78
virtual sal_Int32 SAL_CALL getReferenceValue() override
Definition: unosett.cxx:2242
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:768
virtual css::uno::Sequence< css::text::TextColumn > SAL_CALL getColumns() override
Definition: unosett.cxx:2275
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
Definition: docftn.cxx:363
#define API_COL_LINE_DOTTED
Definition: unosett.cxx:95
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unosett.cxx:1223
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:1965
#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:539
void Set(sal_uInt16 i, const SwNumFormat *)
Definition: number.cxx:588
sal_uInt16 GetWishWidth() const
Definition: fmtclds.hxx:50
void Validate()
Definition: number.cxx:1021
#define WID_NUMBER_POSITION
Definition: unosett.cxx:112
void SetCharFormat(SwCharFormat *)
Definition: number.cxx:272
#define WID_TXTCOL_LINE_REL_HGT
Definition: unomap.hxx:310
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:735
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
#define UNO_NAME_BULLET_CHAR
Definition: unoprnms.hxx:47
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
Definition: number.cxx:1441
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:775
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:298
void SetFirstLineOffset(sal_Int32 nSet)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
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:1528
#define WID_START_AT
Definition: unosett.cxx:101
#define WID_ANCHOR_CHARACTER_STYLE
Definition: unosett.cxx:109
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:143
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:615
SwCharFormat * GetCharFormat(IDocumentStylePoolAccess &rIDSPA) const
Definition: lineinfo.cxx:99
#define UNO_NAME_SUFFIX
Definition: unoprnms.hxx:78
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:2170
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:2291
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:2449
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2165
virtual sal_Int16 SAL_CALL getColumnCount() override
Definition: unosett.cxx:2248
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:2039
#define UNO_NAME_SYMBOL_TEXT_DISTANCE
Definition: unoprnms.hxx:411
void SetSuffix(const OUString &rSet)
long GetListtabPos() const
sal_Int32 GetFirstLineOffset() const
static SwPageDesc * lcl_GetPageDesc(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:234
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
SwNumRule * m_pNumRule
Definition: unosett.hxx:152
sal_Unicode GetBulletChar() const
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:94
virtual void SetGraphicBrush(const SvxBrushItem *pBrushItem, const Size *pSize=nullptr, const sal_Int16 *pOrient=nullptr) override
Definition: number.cxx:308
#define WID_INTERVAL
Definition: unosett.cxx:114
#define UNO_NAME_COUNT_EMPTY_LINES
Definition: unoprnms.hxx:240
const unsigned short aUnoToSvxAdjust[]
Definition: unosett.cxx:261
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:276
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unosett.cxx:2370
bool IsAbsSpaces() const
Definition: numrule.hxx:236
#define SAL_WARN(area, stream)
SwFootnotePos m_ePos
Definition: ftninfo.hxx:96
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:106
#define WID_CONTINUOUS
Definition: unomap.hxx:301
#define WID_COUNT_EMPTY_LINES
Definition: unosett.cxx:116
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:1045
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
#define UNO_NAME_CHAR_STYLE_NAME
Definition: unoprnms.hxx:76
sal_Int8 m_nSepLineHeightRelative
Definition: unosett.hxx:260
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
#define WID_RESTART_AT_EACH_PAGE
Definition: unosett.cxx:118
Standard page.
Definition: poolfmt.hxx:171
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:556
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:624
#define WID_IS_ABS_MARGINS
Definition: unomap.hxx:303
#define UNO_NAME_LISTTAB_STOP_POSITION
Definition: unoprnms.hxx:790
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:626
bool IsOutlineRule() const
Definition: numrule.hxx:239
OUString m_aErgoSum
Definition: ftninfo.hxx:95
#define WID_DEFAULT_LIST_ID
Definition: unomap.hxx:305
#define UNO_NAME_NAME
Definition: unoprnms.hxx:75
sal_uInt16 nPos
SwDocShell * m_pDocShell
Definition: unosett.hxx:151
#define WID_END_NOTICE
Definition: unosett.cxx:107
sal_Int16 nValue
SwNumRule * GetOutlineNumRule() const
Definition: doc.hxx:1021
SwColLineAdj GetLineAdj() const
Definition: fmtclds.hxx:120
#define WID_RULE_NAME
Definition: unomap.hxx:302
virtual ~SwXEndnoteProperties() override
Definition: unosett.cxx:573
OUString m_sCreatedNumRuleName
Definition: unosett.hxx:149
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
Definition: swtypes.cxx:28
SfxMedium * GetMedium() const