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  //char style name
1338 
1339  aUString.clear();
1340  SwStyleNameMapper::FillProgName( rCharFormatName, aUString, SwGetPoolIdFromName::ChrFmt);
1341  aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
1342 
1343  //startvalue
1344  nINT16 = rFormat.GetStart();
1345  aPropertyValues.push_back(comphelper::makePropertyValue("StartWith", nINT16));
1346 
1348  {
1349  //leftmargin
1350  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetAbsLSpace());
1351  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LEFT_MARGIN, nINT32));
1352 
1353  //chartextoffset
1354  nINT32 = convertTwipToMm100(rFormat.GetCharTextDistance());
1355  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_SYMBOL_TEXT_DISTANCE, nINT32));
1356 
1357  //firstlineoffset
1358  nINT32 = convertTwipToMm100(rFormat.GetFirstLineOffset());
1359  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_OFFSET, nINT32));
1360  }
1361 
1362  // PositionAndSpaceMode
1363  nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
1365  {
1366  nINT16 = PositionAndSpaceMode::LABEL_ALIGNMENT;
1367  }
1368  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_POSITION_AND_SPACE_MODE, nINT16));
1369 
1371  {
1372  // LabelFollowedBy
1373  nINT16 = LabelFollow::LISTTAB;
1374  if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
1375  {
1376  nINT16 = LabelFollow::SPACE;
1377  }
1378  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
1379  {
1380  nINT16 = LabelFollow::NOTHING;
1381  }
1382  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NEWLINE )
1383  {
1384  nINT16 = LabelFollow::NEWLINE;
1385  }
1386  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LABEL_FOLLOWED_BY, nINT16));
1387 
1388  // ListtabStopPosition
1389  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetListtabPos());
1390  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LISTTAB_STOP_POSITION, nINT32));
1391 
1392  // FirstLineIndent
1393  nINT32 = convertTwipToMm100(rFormat.GetFirstLineIndent());
1394  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_INDENT, nINT32));
1395 
1396  // IndentAt
1397  nINT32 = convertTwipToMm100(rFormat.GetIndentAt());
1398  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_INDENT_AT, nINT32));
1399  }
1400 
1401  //numberingtype
1402  nINT16 = rFormat.GetNumberingType();
1403  aPropertyValues.push_back(comphelper::makePropertyValue("NumberingType", nINT16));
1404 
1405  if(!bChapterNum)
1406  {
1407  if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
1408  {
1409  //BulletId
1410  nINT16 = rFormat.GetBulletChar();
1411  aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
1412 
1413  const vcl::Font* pFont = rFormat.GetBulletFont();
1414 
1415  //BulletChar
1416  aUString = OUString(rFormat.GetBulletChar());
1417  aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
1418 
1419  //BulletFontName
1420  aUString = pFont ? pFont->GetStyleName() : OUString();
1421  aPropertyValues.push_back(comphelper::makePropertyValue("BulletFontName", aUString));
1422 
1423  //BulletFont
1424  if(pFont)
1425  {
1426  awt::FontDescriptor aDesc;
1427  SvxUnoFontDescriptor::ConvertFromFont( *pFont, aDesc );
1428  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc));
1429  }
1430  }
1431  if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
1432  {
1433  const SvxBrushItem* pBrush = rFormat.GetBrush();
1434  const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
1435  if (pGraphic)
1436  {
1437  //GraphicBitmap
1438  uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
1439  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBitmap));
1440  }
1441 
1442  Size aSize = rFormat.GetGraphicSize();
1443  // #i101131#
1444  // adjust conversion due to type mismatch between <Size> and <awt::Size>
1445  awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
1446  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_SIZE, aAwtSize));
1447 
1448  const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
1449  if(pOrient)
1450  {
1451  uno::Any any;
1452  pOrient->QueryValue(any);
1453  aPropertyValues.emplace_back(
1454  UNO_NAME_VERT_ORIENT, -1, any, PropertyState_DIRECT_VALUE);
1455  }
1456  }
1457  }
1458  else
1459  {
1460  aUString = *pHeadingStyleName;
1461  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_HEADING_STYLE_NAME, aUString));
1462  }
1463 
1464  return ::comphelper::containerToSequence(aPropertyValues);
1465 }
1466 
1467 static PropertyValue const* lcl_FindProperty(
1468  const char* cName, std::vector<PropertyValue const*> const& rPropertyValues)
1469 {
1470  const OUString sCmp = OUString::createFromAscii(cName);
1471  for(const PropertyValue* pTemp : rPropertyValues)
1472  {
1473  if (sCmp == pTemp->Name)
1474  return pTemp;
1475  }
1476  return nullptr;
1477 }
1478 
1480  SwNumRule& rNumRule,
1481  const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
1482 {
1483  SolarMutexGuard aGuard;
1484  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1485 
1486  SwNumFormat aFormat(rNumRule.Get( static_cast<sal_uInt16>(nIndex) ));
1487 
1488  OUString sHeadingStyleName;
1489  OUString sParagraphStyleName;
1490 
1492  &m_sNewBulletFontNames[nIndex],
1493  &sHeadingStyleName, &sParagraphStyleName,
1494  m_pDoc, m_pDocShell, rProperties);
1495 
1496 
1497  if (m_pDoc && !sParagraphStyleName.isEmpty())
1498  {
1499  const SwTextFormatColls* pColls = m_pDoc->GetTextFormatColls();
1500  const size_t nCount = pColls->size();
1501  for (size_t k = 0; k < nCount; ++k)
1502  {
1503  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1504  if (rTextColl.GetName() == sParagraphStyleName)
1505  rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
1506  }
1507  }
1508 
1509  if (!sHeadingStyleName.isEmpty())
1510  {
1511  assert(m_pDocShell);
1513  const size_t nCount = pColls->size();
1514  for (size_t k = 0; k < nCount; ++k)
1515  {
1516  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1517  if (rTextColl.IsDefault())
1518  continue;
1519  if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
1520  rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
1521  rTextColl.GetName() != sHeadingStyleName)
1522  {
1524  }
1525  else if (rTextColl.GetName() == sHeadingStyleName)
1526  {
1527  rTextColl.AssignToListLevelOfOutlineStyle( nIndex );
1528  }
1529  }
1530  }
1531 
1532  rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFormat);
1533 }
1534 
1536  SwNumFormat & aFormat,
1537  OUString & rCharStyleName, OUString *const pBulletFontName,
1538  OUString *const pHeadingStyleName,
1539  OUString *const pParagraphStyleName,
1540  SwDoc *const pDoc, SwDocShell *const pDocShell,
1541  const uno::Sequence<beans::PropertyValue>& rProperties)
1542 {
1543  // the order of the names is important!
1544  static const char* aNumPropertyNames[] =
1545  {
1546  UNO_NAME_ADJUST, // 0
1548  UNO_NAME_PREFIX, // 2
1549  UNO_NAME_SUFFIX, // 3
1551  UNO_NAME_START_WITH, // 5
1552  UNO_NAME_LEFT_MARGIN, // 6
1559  UNO_NAME_INDENT_AT, // 13
1562  // these are not in chapter numbering
1563  UNO_NAME_BULLET_ID, // 16
1564  UNO_NAME_BULLET_FONT, // 17
1566  UNO_NAME_BULLET_CHAR, // 19
1567  UNO_NAME_GRAPHIC, // 20
1569  UNO_NAME_GRAPHIC_SIZE, // 22
1570  UNO_NAME_VERT_ORIENT, // 23
1571  // these are only in chapter numbering
1573  // these two are accepted but ignored for some reason
1575  UNO_NAME_BULLET_COLOR, // 26
1576  UNO_NAME_GRAPHIC_URL // 27
1577  };
1578 
1579  enum {
1580  NotInChapterFirst = 16,
1581  NotInChapterLast = 23,
1582  InChapterFirst = 24,
1583  InChapterLast = 24
1584  };
1585 
1586  std::vector<PropertyValue const*> aPropertyValues;
1587  bool bExcept = false;
1588  for(const beans::PropertyValue& rProp : rProperties)
1589  {
1590  bExcept = true;
1591  for(size_t j = 0; j < SAL_N_ELEMENTS( aNumPropertyNames ); j++)
1592  {
1593  if (pDocShell &&
1594  j >= static_cast<size_t>(NotInChapterFirst) &&
1595  j <= static_cast<size_t>(NotInChapterLast))
1596  continue;
1597  if (!pDocShell &&
1598  j >= static_cast<size_t>(InChapterFirst) &&
1599  j <= static_cast<size_t>(InChapterLast))
1600  continue;
1601  if (rProp.Name.equalsAscii(aNumPropertyNames[j]))
1602  {
1603  bExcept = false;
1604  break;
1605  }
1606  }
1607  SAL_WARN_IF( bExcept, "sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing" );
1608  aPropertyValues.push_back(& rProp);
1609  if(bExcept)
1610  break;
1611  }
1612 
1613  bool bWrongArg = false;
1614  if(!bExcept)
1615  {
1616  std::unique_ptr<SvxBrushItem> pSetBrush;
1617  std::unique_ptr<Size> pSetSize;
1618  std::unique_ptr<SwFormatVertOrient> pSetVOrient;
1619  bool bCharStyleNameSet = false;
1620 
1621  for (size_t i = 0; i < SAL_N_ELEMENTS(aNumPropertyNames) && !bWrongArg; ++i)
1622  {
1623  PropertyValue const*const pProp(
1624  lcl_FindProperty(aNumPropertyNames[i], aPropertyValues));
1625  if (!pProp)
1626  continue;
1627  switch(i)
1628  {
1629  case 0: //"Adjust"
1630  {
1631  sal_Int16 nValue = text::HoriOrientation::NONE;
1632  pProp->Value >>= nValue;
1633  if (nValue > text::HoriOrientation::NONE &&
1634  nValue <= text::HoriOrientation::LEFT &&
1635  USHRT_MAX != aUnoToSvxAdjust[nValue])
1636  {
1637  aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
1638  }
1639  else
1640  bWrongArg = true;
1641  }
1642  break;
1643  case 1: //"ParentNumbering",
1644  {
1645  sal_Int16 nSet = 0;
1646  pProp->Value >>= nSet;
1647  if(nSet >= 0 && MAXLEVEL >= nSet)
1648  aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
1649  }
1650  break;
1651  case 2: //"Prefix",
1652  {
1653  OUString uTmp;
1654  pProp->Value >>= uTmp;
1655  aFormat.SetPrefix(uTmp);
1656  }
1657  break;
1658  case 3: //"Suffix",
1659  {
1660  OUString uTmp;
1661  pProp->Value >>= uTmp;
1662  aFormat.SetSuffix(uTmp);
1663  }
1664  break;
1665  case 4: //"CharStyleName",
1666  {
1667  bCharStyleNameSet = true;
1668  OUString uTmp;
1669  pProp->Value >>= uTmp;
1670  OUString sCharFormatName;
1672  if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
1673  {
1674  rCharStyleName = aInvalidStyle;
1675  aFormat.SetCharFormat(nullptr);
1676  }
1677  else if(pDocShell || pDoc)
1678  {
1679  SwDoc* pLocalDoc = pDoc ? pDoc : pDocShell->GetDoc();
1680  const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
1681  const size_t nChCount = pFormats->size();
1682 
1683  SwCharFormat* pCharFormat = nullptr;
1684  if (!sCharFormatName.isEmpty())
1685  {
1686  for(size_t j = 0; j< nChCount; ++j)
1687  {
1688  SwCharFormat* pTmp = (*pFormats)[j];
1689  if(pTmp->GetName() == sCharFormatName)
1690  {
1691  pCharFormat = pTmp;
1692  break;
1693  }
1694  }
1695  if(!pCharFormat)
1696  {
1697 
1698  SfxStyleSheetBase* pBase;
1699  SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
1700  pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
1701  if(!pBase)
1702  pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
1703  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1704  }
1705  }
1706  aFormat.SetCharFormat( pCharFormat );
1707  // #i51842#
1708  // If the character format has been found its name should not be in the
1709  // char style names array
1710  rCharStyleName.clear();
1711  }
1712  else
1713  rCharStyleName = sCharFormatName;
1714  }
1715  break;
1716  case 5: //"StartWith",
1717  {
1718  sal_Int16 nVal = 0;
1719  pProp->Value >>= nVal;
1720  aFormat.SetStart(nVal);
1721  }
1722  break;
1723  case 6: //UNO_NAME_LEFT_MARGIN,
1724  {
1725  sal_Int32 nValue = 0;
1726  pProp->Value >>= nValue;
1727  // #i23727# nValue can be negative
1728  aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
1729  }
1730  break;
1731  case 7: //UNO_NAME_SYMBOL_TEXT_DISTANCE,
1732  {
1733  sal_Int32 nValue = 0;
1734  pProp->Value >>= nValue;
1735  if(nValue >= 0)
1736  aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
1737  else
1738  bWrongArg = true;
1739  }
1740  break;
1741  case 8: //UNO_NAME_FIRST_LINE_OFFSET,
1742  {
1743  sal_Int32 nValue = 0;
1744  pProp->Value >>= nValue;
1745  // #i23727# nValue can be positive
1746  nValue = convertMm100ToTwip(nValue);
1747  aFormat.SetFirstLineOffset(nValue);
1748  }
1749  break;
1750  case 9: // UNO_NAME_POSITION_AND_SPACE_MODE
1751  {
1752  sal_Int16 nValue = 0;
1753  pProp->Value >>= nValue;
1754  if ( nValue == 0 )
1755  {
1757  }
1758  else if ( nValue == 1 )
1759  {
1761  }
1762  else
1763  {
1764  bWrongArg = true;
1765  }
1766  }
1767  break;
1768  case 10: // UNO_NAME_LABEL_FOLLOWED_BY
1769  {
1770  sal_Int16 nValue = 0;
1771  pProp->Value >>= nValue;
1772  if ( nValue == LabelFollow::LISTTAB )
1773  {
1775  }
1776  else if ( nValue == LabelFollow::SPACE )
1777  {
1779  }
1780  else if ( nValue == LabelFollow::NOTHING )
1781  {
1783  }
1784  else if ( nValue == LabelFollow::NEWLINE )
1785  {
1787  }
1788  else
1789  {
1790  bWrongArg = true;
1791  }
1792  }
1793  break;
1794  case 11: // UNO_NAME_LISTTAB_STOP_POSITION
1795  {
1796  sal_Int32 nValue = 0;
1797  pProp->Value >>= nValue;
1798  nValue = convertMm100ToTwip(nValue);
1799  if ( nValue >= 0 )
1800  {
1801  aFormat.SetListtabPos( nValue );
1802  }
1803  else
1804  {
1805  bWrongArg = true;
1806  }
1807  }
1808  break;
1809  case 12: // UNO_NAME_FIRST_LINE_INDENT
1810  {
1811  sal_Int32 nValue = 0;
1812  pProp->Value >>= nValue;
1813  nValue = convertMm100ToTwip(nValue);
1814  aFormat.SetFirstLineIndent( nValue );
1815  }
1816  break;
1817  case 13: // UNO_NAME_INDENT_AT
1818  {
1819  sal_Int32 nValue = 0;
1820  pProp->Value >>= nValue;
1821  nValue = convertMm100ToTwip(nValue);
1822  aFormat.SetIndentAt( nValue );
1823  }
1824  break;
1825  case 14: //"NumberingType"
1826  {
1827  sal_Int16 nSet = 0;
1828  pProp->Value >>= nSet;
1829  if(nSet >= 0)
1830  aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
1831  else
1832  bWrongArg = true;
1833  }
1834  break;
1835  case 15: //"ParagraphStyleName"
1836  {
1837  if (pParagraphStyleName)
1838  {
1839  OUString uTmp;
1840  pProp->Value >>= uTmp;
1841  OUString sStyleName;
1843  *pParagraphStyleName = sStyleName;
1844  }
1845  }
1846  break;
1847  case 16: //"BulletId",
1848  {
1849  assert( !pDocShell );
1850  sal_Int16 nSet = 0;
1851  if( pProp->Value >>= nSet )
1852  aFormat.SetBulletChar(nSet);
1853  else
1854  bWrongArg = true;
1855  }
1856  break;
1857  case 17: //UNO_NAME_BULLET_FONT,
1858  {
1859  assert( !pDocShell );
1860  awt::FontDescriptor desc;
1861  if (pProp->Value >>= desc)
1862  {
1863  // #i93725#
1864  // do not accept "empty" font
1865  if (!desc.Name.isEmpty())
1866  {
1867  vcl::Font aFont;
1869  aFormat.SetBulletFont(&aFont);
1870  }
1871  }
1872  else
1873  bWrongArg = true;
1874  }
1875  break;
1876  case 18: //"BulletFontName",
1877  {
1878  assert( !pDocShell );
1879  OUString sBulletFontName;
1880  pProp->Value >>= sBulletFontName;
1881  SwDocShell* pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
1882  if( !sBulletFontName.isEmpty() && pLclDocShell )
1883  {
1884  const SvxFontListItem* pFontListItem =
1885  static_cast<const SvxFontListItem* >(pLclDocShell
1886  ->GetItem( SID_ATTR_CHAR_FONTLIST ));
1887  const FontList* pList = pFontListItem->GetFontList();
1888  FontMetric aFontMetric = pList->Get(
1889  sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
1890  vcl::Font aFont(aFontMetric);
1891  aFormat.SetBulletFont(&aFont);
1892  }
1893  else if (pBulletFontName)
1894  *pBulletFontName = sBulletFontName;
1895  }
1896  break;
1897  case 19: //"BulletChar",
1898  {
1899  assert( !pDocShell );
1900  OUString aChar;
1901  pProp->Value >>= aChar;
1902  if(aChar.getLength() == 1)
1903  {
1904  aFormat.SetBulletChar(aChar.toChar());
1905  }
1906  else if(aChar.isEmpty())
1907  {
1908  // If w:lvlText's value is null - set bullet char to zero
1909  aFormat.SetBulletChar(u'\0');
1910  }
1911  else
1912  {
1913  bWrongArg = true;
1914  }
1915  }
1916  break;
1917  case 20: //UNO_NAME_GRAPHIC,
1918  {
1919  assert( !pDocShell );
1920  uno::Reference<graphic::XGraphic> xGraphic;
1921  if (pProp->Value >>= xGraphic)
1922  {
1923  if (!pSetBrush)
1924  {
1925  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1926  if(pOrigBrush)
1927  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1928  else
1929  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1930  }
1931  Graphic aGraphic(xGraphic);
1932  pSetBrush->SetGraphic(aGraphic);
1933  }
1934  else
1935  bWrongArg = true;
1936  }
1937  break;
1938  case 21: //UNO_NAME_GRAPHIC_BITMAP,
1939  {
1940  assert( !pDocShell );
1941  uno::Reference<awt::XBitmap> xBitmap;
1942  if (pProp->Value >>= xBitmap)
1943  {
1944  if(!pSetBrush)
1945  {
1946  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1947  if(pOrigBrush)
1948  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1949  else
1950  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1951  }
1952 
1953  uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
1954  Graphic aGraphic(xGraphic);
1955  pSetBrush->SetGraphic(aGraphic);
1956  }
1957  else
1958  bWrongArg = true;
1959  }
1960  break;
1961  case 22: //UNO_NAME_GRAPHIC_SIZE,
1962  {
1963  assert( !pDocShell );
1964  if(!pSetSize)
1965  pSetSize.reset(new Size);
1966  awt::Size size;
1967  if (pProp->Value >>= size)
1968  {
1969  size.Width = convertMm100ToTwip(size.Width);
1970  size.Height = convertMm100ToTwip(size.Height);
1971  pSetSize->setWidth( size.Width );
1972  pSetSize->setHeight( size.Height );
1973  }
1974  else
1975  bWrongArg = true;
1976  }
1977  break;
1978  case 23: //VertOrient
1979  {
1980  assert( !pDocShell );
1981  if(!pSetVOrient)
1982  {
1983  if(aFormat.GetGraphicOrientation())
1984  pSetVOrient.reset(aFormat.GetGraphicOrientation()->Clone());
1985  else
1986  pSetVOrient.reset(new SwFormatVertOrient);
1987  }
1988  pSetVOrient->PutValue(pProp->Value, MID_VERTORIENT_ORIENT);
1989  }
1990  break;
1991  case 24: //"HeadingStyleName"
1992  {
1993  if (pHeadingStyleName)
1994  {
1995  OUString uTmp;
1996  pProp->Value >>= uTmp;
1997  OUString sStyleName;
1999  *pHeadingStyleName = sStyleName;
2000  }
2001  }
2002  break;
2003  case 25: // BulletRelSize - unsupported - only available in Impress
2004  break;
2005  case 26: // BulletColor - ignored too
2006  break;
2007  case 27: // UNO_NAME_GRAPHIC_URL
2008  {
2009  assert( !pDocShell );
2010  OUString aURL;
2011  if (pProp->Value >>= aURL)
2012  {
2013  if(!pSetBrush)
2014  {
2015  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
2016  if(pOrigBrush)
2017  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
2018  else
2019  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
2020  }
2021 
2022  Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
2023  if (!aGraphic.IsNone())
2024  pSetBrush->SetGraphic(aGraphic);
2025  }
2026  else
2027  bWrongArg = true;
2028  }
2029  break;
2030  }
2031  }
2032  if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
2033  {
2034  if(!pSetBrush && aFormat.GetBrush())
2035  pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
2036 
2037  if(pSetBrush)
2038  {
2039  if(!pSetVOrient && aFormat.GetGraphicOrientation())
2040  pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
2041 
2042  if(!pSetSize)
2043  {
2044  pSetSize.reset(new Size(aFormat.GetGraphicSize()));
2045  if(!pSetSize->Width() || !pSetSize->Height())
2046  {
2047  const Graphic* pGraphic = pSetBrush->GetGraphic();
2048  if(pGraphic)
2049  *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
2050  }
2051  }
2052  sal_Int16 eOrient = pSetVOrient ?
2053  pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
2054  aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
2055  }
2056  }
2057  if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
2058  && aFormat.GetNumberingType() == NumberingType::BITMAP
2059  && !aFormat.GetCharFormat()
2060  && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
2061  {
2062  OUString tmp;
2064  rCharStyleName = tmp;
2065  }
2066  }
2067 
2068  if(bWrongArg)
2069  throw lang::IllegalArgumentException();
2070  else if(bExcept)
2071  throw uno::RuntimeException();
2072 }
2073 
2074 uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
2075 {
2076  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
2077  return aRef;
2078 }
2079 
2080 void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
2081 {
2082  SolarMutexGuard aGuard;
2083  std::unique_ptr<SwNumRule> pDocRule;
2084  SwNumRule* pCreatedRule = nullptr;
2085  if(!m_pNumRule)
2086  {
2087  if(m_pDocShell)
2088  {
2089  pDocRule.reset(new SwNumRule(*m_pDocShell->GetDoc()->GetOutlineNumRule()));
2090  }
2091  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2092  {
2093  pCreatedRule = m_pDoc->FindNumRulePtr(m_sCreatedNumRuleName);
2094  }
2095 
2096  }
2097  if(!m_pNumRule && !pDocRule && !pCreatedRule)
2098  throw RuntimeException();
2099 
2100  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2101  {
2102  bool bVal = *o3tl::doAccess<bool>(rValue);
2103  if(!pCreatedRule)
2104  pDocRule ? pDocRule->SetAutoRule(bVal) : m_pNumRule->SetAutoRule(bVal);
2105  }
2106  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2107  {
2108  bool bVal = *o3tl::doAccess<bool>(rValue);
2109  pDocRule ? pDocRule->SetContinusNum(bVal) :
2110  pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : m_pNumRule->SetContinusNum(bVal);
2111  }
2112  else if(rPropertyName == UNO_NAME_NAME)
2113  {
2114  throw IllegalArgumentException();
2115  }
2116  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2117  {
2118  bool bVal = *o3tl::doAccess<bool>(rValue);
2119  pDocRule ? pDocRule->SetAbsSpaces(bVal) :
2120  pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : m_pNumRule->SetAbsSpaces(bVal);
2121  }
2122  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2123  {
2124  bool bVal = *o3tl::doAccess<bool>(rValue);
2125  SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
2126  pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
2127  pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : m_pNumRule->SetRuleType(eNumRuleType);
2128  }
2129  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2130  {
2131  throw IllegalArgumentException();
2132  }
2133  else
2134  throw UnknownPropertyException(rPropertyName);
2135 
2136  if(pDocRule)
2137  {
2138  assert(m_pDocShell);
2139  m_pDocShell->GetDoc()->SetOutlineNumRule(*pDocRule);
2140  pDocRule.reset();
2141  }
2142  else if(pCreatedRule)
2143  {
2144  pCreatedRule->Validate();
2145  }
2146 }
2147 
2148 Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
2149 {
2150  Any aRet;
2151  const SwNumRule* pRule = m_pNumRule;
2152  if(!pRule && m_pDocShell)
2153  pRule = m_pDocShell->GetDoc()->GetOutlineNumRule();
2154  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2156  if(!pRule)
2157  throw RuntimeException();
2158 
2159  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2160  {
2161  aRet <<= pRule->IsAutoRule();
2162  }
2163  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2164  {
2165  aRet <<= pRule->IsContinusNum();
2166  }
2167  else if(rPropertyName == UNO_NAME_NAME)
2168  aRet <<= pRule->GetName();
2169  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2170  {
2171  aRet <<= pRule->IsAbsSpaces();
2172  }
2173  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2174  {
2175  aRet <<= pRule->IsOutlineRule();
2176  }
2177  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2178  {
2179  OSL_ENSURE( !pRule->GetDefaultListId().isEmpty(),
2180  "<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect." );
2181  aRet <<= pRule->GetDefaultListId();
2182  }
2183  else
2184  throw UnknownPropertyException(rPropertyName);
2185  return aRet;
2186 }
2187 
2189  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2190 {
2191 }
2192 
2194  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2195 {
2196 }
2197 
2199  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2200 {
2201 }
2202 
2204  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2205 {
2206 }
2207 
2209 {
2210  if(m_pNumRule)
2211  {
2212  OUString aString;
2214  return aString;
2215  }
2216  // consider chapter numbering <SwXNumberingRules>
2217  if ( m_pDocShell )
2218  {
2219  OUString aString;
2221  aString, SwGetPoolIdFromName::NumRule );
2222  return aString;
2223  }
2224  return m_sCreatedNumRuleName;
2225 }
2226 
2227 void SwXNumberingRules::setName(const OUString& /*rName*/)
2228 {
2229  RuntimeException aExcept;
2230  aExcept.Message = "readonly";
2231  throw aExcept;
2232 }
2233 
2235 {
2236  if(rHint.GetId() == SfxHintId::Dying)
2237  {
2239  delete m_rParent.m_pNumRule;
2240  m_rParent.m_pNumRule = nullptr;
2241  m_rParent.m_pDoc = nullptr;
2242  }
2243 }
2244 
2246 {
2247  return "SwXChapterNumbering";
2248 }
2249 
2250 sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName)
2251 {
2252  return cppu::supportsService(this, rServiceName);
2253 }
2254 
2256 {
2257  return { "com.sun.star.text.ChapterNumbering", "com.sun.star.text.NumberingRules" };
2258 }
2259 
2261  SwXNumberingRules(rDocSh)
2262 {
2263 }
2264 
2266 {
2267 }
2268 
2270 {
2271  return "SwXTextColumns";
2272 }
2273 
2274 sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName)
2275 {
2276  return cppu::supportsService(this, rServiceName);
2277 }
2278 
2280 {
2281  Sequence<OUString> aRet { "com.sun.star.text.TextColumns" };
2282  return aRet;
2283 }
2284 
2286  m_nReference(0),
2287  m_bIsAutomaticWidth(true),
2288  m_nAutoDistance(0),
2289  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)),
2290  m_nSepLineWidth(0),
2291  m_nSepLineColor(0), //black
2292  m_nSepLineHeightRelative(100),//full height
2293  m_nSepLineVertAlign(style::VerticalAlignment_MIDDLE),
2294  m_bSepLineIsOn(false),
2295  m_nSepLineStyle(API_COL_LINE_NONE) // None
2296 {
2297 }
2298 
2300  m_nReference(0),
2301  m_aTextColumns(rFormatCol.GetNumCols()),
2302  m_bIsAutomaticWidth(rFormatCol.IsOrtho()),
2303  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
2304 {
2305  const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth();
2307  USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : static_cast<sal_Int32>(nItemGutterWidth)
2308  : 0;
2310 
2311  TextColumn* pColumns = m_aTextColumns.getArray();
2312  const SwColumns& rCols = rFormatCol.GetColumns();
2313  for(sal_Int32 i = 0; i < m_aTextColumns.getLength(); ++i)
2314  {
2315  const SwColumn* pCol = &rCols[i];
2316 
2317  pColumns[i].Width = pCol->GetWishWidth();
2318  m_nReference += pColumns[i].Width;
2319  pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft ());
2320  pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight());
2321  }
2322  if(!m_aTextColumns.hasElements())
2323  m_nReference = USHRT_MAX;
2324 
2325  m_nSepLineWidth = rFormatCol.GetLineWidth();
2326  m_nSepLineColor = rFormatCol.GetLineColor();
2327  m_nSepLineHeightRelative = rFormatCol.GetLineHeight();
2328  m_bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE;
2329  sal_Int8 nStyle = API_COL_LINE_NONE;
2330  switch (rFormatCol.GetLineStyle())
2331  {
2332  case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
2333  case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
2334  case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
2335  default: break;
2336  }
2337  m_nSepLineStyle = nStyle;
2338  switch(rFormatCol.GetLineAdj())
2339  {
2340  case COLADJ_TOP: m_nSepLineVertAlign = style::VerticalAlignment_TOP; break;
2341  case COLADJ_BOTTOM: m_nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break;
2342  case COLADJ_CENTER:
2343  case COLADJ_NONE: m_nSepLineVertAlign = style::VerticalAlignment_MIDDLE;
2344  }
2345 }
2346 
2348 {
2349 }
2350 
2352 {
2353  SolarMutexGuard aGuard;
2354  return m_nReference;
2355 }
2356 
2358 {
2359  SolarMutexGuard aGuard;
2360  return static_cast< sal_Int16>( m_aTextColumns.getLength() );
2361 }
2362 
2363 void SwXTextColumns::setColumnCount(sal_Int16 nColumns)
2364 {
2365  SolarMutexGuard aGuard;
2366  if(nColumns <= 0)
2367  throw uno::RuntimeException();
2368  m_bIsAutomaticWidth = true;
2369  m_aTextColumns.realloc(nColumns);
2370  TextColumn* pCols = m_aTextColumns.getArray();
2372  sal_Int32 nWidth = m_nReference / nColumns;
2373  sal_Int32 nDiff = m_nReference - nWidth * nColumns;
2374  sal_Int32 nDist = m_nAutoDistance / 2;
2375  for(sal_Int16 i = 0; i < nColumns; i++)
2376  {
2377  pCols[i].Width = nWidth;
2378  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2379  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2380  }
2381  pCols[nColumns - 1].Width += nDiff;
2382 }
2383 
2384 uno::Sequence< TextColumn > SwXTextColumns::getColumns()
2385 {
2386  SolarMutexGuard aGuard;
2387  return m_aTextColumns;
2388 }
2389 
2390 void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
2391 {
2392  SolarMutexGuard aGuard;
2393  sal_Int32 nReferenceTemp = std::accumulate(rColumns.begin(), rColumns.end(), sal_Int32(0),
2394  [](const sal_Int32 nSum, const TextColumn& rCol) { return nSum + rCol.Width; });
2395  m_bIsAutomaticWidth = false;
2396  m_nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp;
2397  m_aTextColumns = rColumns;
2398 }
2399 
2400 uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( )
2401 {
2402  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
2403  return aRef;
2404 }
2405 
2406 void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
2407 {
2408  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2409  if (!pEntry)
2410  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2411  if ( pEntry->nFlags & PropertyAttribute::READONLY)
2412  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2413 
2414  switch(pEntry->nWID)
2415  {
2416  case WID_TXTCOL_LINE_WIDTH:
2417  {
2418  sal_Int32 nTmp = 0;
2419  aValue >>= nTmp;
2420  if(nTmp < 0)
2421  throw IllegalArgumentException();
2423  }
2424  break;
2425  case WID_TXTCOL_LINE_COLOR:
2426  aValue >>= m_nSepLineColor;
2427  break;
2428  case WID_TXTCOL_LINE_STYLE:
2429  {
2430  aValue >>= m_nSepLineStyle;
2431  }
2432  break;
2434  {
2435  sal_Int8 nTmp = 0;
2436  aValue >>= nTmp;
2437  if(nTmp < 0)
2438  throw IllegalArgumentException();
2439  m_nSepLineHeightRelative = nTmp;
2440  }
2441  break;
2442  case WID_TXTCOL_LINE_ALIGN:
2443  {
2444  style::VerticalAlignment eAlign;
2445  if(!(aValue >>= eAlign) )
2446  {
2447  sal_Int8 nTmp = 0;
2448  if (! ( aValue >>= nTmp ) )
2449  throw IllegalArgumentException();
2450  m_nSepLineVertAlign = static_cast<style::VerticalAlignment>(nTmp);
2451  }
2452  else
2453  m_nSepLineVertAlign = eAlign;
2454  }
2455  break;
2456  case WID_TXTCOL_LINE_IS_ON:
2457  m_bSepLineIsOn = *o3tl::doAccess<bool>(aValue);
2458  break;
2460  {
2461  sal_Int32 nTmp = 0;
2462  aValue >>= nTmp;
2463  if(nTmp < 0 || nTmp >= m_nReference)
2464  throw IllegalArgumentException();
2465  m_nAutoDistance = nTmp;
2466  sal_Int32 nColumns = m_aTextColumns.getLength();
2467  TextColumn* pCols = m_aTextColumns.getArray();
2468  sal_Int32 nDist = m_nAutoDistance / 2;
2469  for(sal_Int32 i = 0; i < nColumns; i++)
2470  {
2471  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2472  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2473  }
2474  }
2475  break;
2476  }
2477 }
2478 
2479 Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
2480 {
2481  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2482  if (!pEntry)
2483  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2484 
2485  Any aRet;
2486  switch(pEntry->nWID)
2487  {
2488  case WID_TXTCOL_LINE_WIDTH:
2489  aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(m_nSepLineWidth));
2490  break;
2491  case WID_TXTCOL_LINE_COLOR:
2492  aRet <<= m_nSepLineColor;
2493  break;
2494  case WID_TXTCOL_LINE_STYLE:
2495  aRet <<= m_nSepLineStyle;
2496  break;
2498  aRet <<= m_nSepLineHeightRelative;
2499  break;
2500  case WID_TXTCOL_LINE_ALIGN:
2501  aRet <<= m_nSepLineVertAlign;
2502  break;
2503  case WID_TXTCOL_LINE_IS_ON:
2504  aRet <<= m_bSepLineIsOn;
2505  break;
2507  aRet <<= m_bIsAutomaticWidth;
2508  break;
2510  aRet <<= m_nAutoDistance;
2511  break;
2512  }
2513  return aRet;
2514 }
2515 
2517  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2518 {
2519 }
2520 
2522  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2523 {
2524 }
2525 
2527  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2528 {
2529 }
2530 
2532  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2533 {
2534 }
2535 
2536 namespace
2537 {
2538  class theSwXTextColumnsUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXTextColumnsUnoTunnelId > {};
2539 }
2540 
2541 const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId()
2542 {
2543  return theSwXTextColumnsUnoTunnelId::get().getSeq();
2544 }
2545 
2546 sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId )
2547 {
2548  if( isUnoTunnelId<SwXTextColumns>(rId) )
2549  {
2550  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
2551  }
2552  return 0;
2553 }
2554 
2555 /* 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:2521
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:335
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:2269
static SwTextFormatColl * lcl_GetParaStyle(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:218
URL aURL
virtual ~SwXTextColumns() override
Definition: unosett.cxx:2347
void SetLabelFollowedBy(const LabelFollowedBy eLabelFollowedBy)
#define UNO_NAME_POSITION_AND_SPACE_MODE
Definition: unoprnms.hxx:787
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:2390
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:1350
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:798
#define UNO_NAME_FIRST_LINE_OFFSET
Definition: unoprnms.hxx:409
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:304
void SetPrefix(const OUString &rSet)
#define UNO_NAME_INDENT_AT
Definition: unoprnms.hxx:791
const OUString & GetDefaultListId() const
Definition: numrule.hxx:192
#define UNO_NAME_NUMBERING_TYPE
Definition: unoprnms.hxx:277
#define UNO_NAME_PARA_STYLE_NAME
Definition: unoprnms.hxx:170
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:179
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:2188
virtual ~SwXFootnoteProperties() override
Definition: unosett.cxx:293
Definition: doc.hxx:186
void SetContinusNum(bool bFlag)
Definition: numrule.hxx:234
SwXEndnoteProperties(SwDoc *pDoc)
Definition: unosett.cxx:567
#define UNO_NAME_NUMBER_POSITION
Definition: unoprnms.hxx:165
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:143
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:2255
#define UNO_NAME_VERT_ORIENT
Definition: unoprnms.hxx:327
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:158
#define UNO_NAME_PARAGRAPH_STYLE_NAME
Definition: unoprnms.hxx:824
void SetIncludeUpperLevels(sal_uInt8 nSet)
#define UNO_NAME_LABEL_FOLLOWED_BY
Definition: unoprnms.hxx:788
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:2193
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:790
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
#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:1192
#define UNO_NAME_PREFIX
Definition: unoprnms.hxx:79
#define UNO_NAME_IS_CONTINUOUS_NUMBERING
Definition: unoprnms.hxx:464
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:2516
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:305
#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
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:1282
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:2198
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:2363
#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:1479
#define UNO_NAME_IS_ABSOLUTE_MARGINS
Definition: unoprnms.hxx:466
const OUString & GetSuffix() const
virtual void Notify(const SfxHint &) override
Definition: unosett.cxx:2234
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:455
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:822
void SetFirstLineIndent(const long nFirstLineIndent)
#define SAL_N_ELEMENTS(arr)
#define UNO_NAME_NUMBERING_IS_OUTLINE
Definition: unoprnms.hxx:746
virtual ~SwXChapterNumbering() override
Definition: unosett.cxx:2265
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
#define RES_BACKGROUND
Definition: hintids.hxx:305
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:2546
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:340
virtual void SAL_CALL setName(const OUString &Name_) override
Definition: unosett.cxx:2227
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:2080
LabelFollowedBy GetLabelFollowedBy() const
virtual SwFormatVertOrient * Clone(SfxItemPool *pPool=nullptr) const override
Definition: atrfrm.cxx:1277
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:2531
#define UNO_NAME_DISTANCE
Definition: unoprnms.hxx:153
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:895
bool HasCharFormat() const
Definition: lineinfo.hxx:92
SwXChapterNumbering(SwDocShell &rDocSh)
Definition: unosett.cxx:2260
const Any & any
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:1052
#define UNO_NAME_FOOTNOTE_COUNTING
Definition: unoprnms.hxx:252
const vcl::Font * GetBulletFont() const
#define PROPERTY_MAP_TEXT_COLUMS
Definition: unomap.hxx:61
virtual OUString SAL_CALL getName() override
Definition: unosett.cxx:2208
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unosett.cxx:731
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1123
WEIGHT_NORMAL
#define UNO_NAME_DEFAULT_LIST_ID
Definition: unoprnms.hxx:797
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
static PropertyValue const * lcl_FindProperty(const char *cName, std::vector< PropertyValue const * > const &rPropertyValues)
Definition: unosett.cxx:1467
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
static void SetPropertiesToNumFormat(SwNumFormat &aFormat, OUString &rCharStyleName, OUString *const pBulletFontName, OUString *const pHeadingStyleName, OUString *const pParagraphStyleName, SwDoc *const pDoc, SwDocShell *const pDocShell, css::uno::Sequence< css::beans::PropertyValue > const &rProperties)
Definition: unosett.cxx:1535
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2250
#define UNO_NAME_SEPARATOR_INTERVAL
Definition: unoprnms.hxx:200
const SfxItemPropertySimpleEntry * getByName(const OUString &rName) const
#define WID_TXTCOL_LINE_ALIGN
Definition: unomap.hxx:311
#define UNO_NAME_INTERVAL
Definition: unoprnms.hxx:271
#define UNO_NAME_PARENT_NUMBERING
Definition: unoprnms.hxx:80
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: unosett.cxx:2541
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:2203
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
#define UNO_NAME_ADJUST
Definition: unoprnms.hxx:470
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:142
virtual OUString SAL_CALL getImplementationName() override
Definition: unosett.cxx:2245
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:148
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:2406
#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
SvtBroadcaster & GetNotifier()
Definition: calbck.hxx:93
SwXLineNumberingProperties(SwDoc *pDoc)
Definition: unosett.cxx:770
#define UNO_NAME_SEPARATOR_TEXT
Definition: unoprnms.hxx:164
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unosett.cxx:2526
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:77
virtual sal_Int32 SAL_CALL getReferenceValue() override
Definition: unosett.cxx:2351
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:770
virtual css::uno::Sequence< css::text::TextColumn > SAL_CALL getColumns() override
Definition: unosett.cxx:2384
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:2074
#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:585
sal_uInt16 GetWishWidth() const
Definition: fmtclds.hxx:50
void Validate()
Definition: number.cxx:981
#define WID_NUMBER_POSITION
Definition: unosett.cxx:112
void SetCharFormat(SwCharFormat *)
Definition: number.cxx:271
#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)
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:737
#define UNO_NAME_BULLET_CHAR
Definition: unoprnms.hxx:47
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
Definition: number.cxx:1402
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
#define SAL_WARN_IF(condition, area, stream)
bool IsPaintLineNumbers() const
Definition: lineinfo.hxx:80
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:777
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unosett.cxx:786
#define MID_VERTORIENT_ORIENT
Definition: unomid.h:34
const SfxItemPropertySet * m_pPropertySet
Definition: unosett.hxx:153
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:298
void SetFirstLineOffset(sal_Int32 nSet)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
#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:525
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:2279
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:2400
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:89
#define UNO_NAME_IS_AUTOMATIC
Definition: unoprnms.hxx:465
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:2274
virtual sal_Int16 SAL_CALL getColumnCount() override
Definition: unosett.cxx:2357
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:2148
#define UNO_NAME_SYMBOL_TEXT_DISTANCE
Definition: unoprnms.hxx:410
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
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:307
#define WID_INTERVAL
Definition: unosett.cxx:114
#define UNO_NAME_COUNT_EMPTY_LINES
Definition: unoprnms.hxx:239
const unsigned short aUnoToSvxAdjust[]
Definition: unosett.cxx:261
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
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:2479
bool IsAbsSpaces() const
Definition: numrule.hxx:236
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
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
#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:240
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:166
const SwFootnoteInfo & GetFootnoteInfo() const
Definition: doc.hxx:626
#define WID_IS_ABS_MARGINS
Definition: unomap.hxx:303
#define UNO_NAME_LISTTAB_STOP_POSITION
Definition: unoprnms.hxx:789
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:628
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:1023
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