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