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 "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 "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 "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( isUnoTunnelId<SwXNumberingRules>(rId) )
1044  {
1045  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
1046  }
1047  return 0;
1048 }
1049 
1051 {
1052  return "SwXNumberingRules";
1053 }
1054 
1055 sal_Bool SwXNumberingRules::supportsService(const OUString& rServiceName)
1056 {
1057  return cppu::supportsService(this, rServiceName);
1058 }
1059 
1061 {
1062  Sequence<OUString> aRet { "com.sun.star.text.NumberingRules" };
1063  return aRet;
1064 }
1065 
1067  m_pImpl(new SwXNumberingRules::Impl(*this)),
1068  m_pDoc(doc),
1069  m_pDocShell(nullptr),
1070  m_pNumRule(new SwNumRule(rRule)),
1071  m_pPropertySet(GetNumberingRulesSet()),
1072  m_bOwnNumRuleCreated(true)
1073 {
1074  // first organize the document - it is dependent on the set character formats
1075  // if no format is set, it should work as well
1076  for( sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1077  {
1078  SwNumFormat rFormat(m_pNumRule->Get(i));
1079  SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1080  if(pCharFormat)
1081  {
1082  m_pDoc = pCharFormat->GetDoc();
1083  break;
1084  }
1085  }
1086  if(m_pDoc)
1087  m_pImpl->StartListening(GetPageDescNotifier(m_pDoc));
1088  for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
1089  {
1092  }
1093 }
1094 
1096  m_pImpl(new SwXNumberingRules::Impl(*this)),
1097  m_pDoc(nullptr),
1098  m_pDocShell(&rDocSh),
1099  m_pNumRule(nullptr),
1100  m_pPropertySet(GetNumberingRulesSet()),
1101  m_bOwnNumRuleCreated(false)
1102 {
1103  m_pImpl->StartListening(GetPageDescNotifier(m_pDocShell->GetDoc()));
1104 }
1105 
1107  m_pImpl(new SwXNumberingRules::Impl(*this)),
1108  m_pDoc(&rDoc),
1109  m_pDocShell(nullptr),
1110  m_pNumRule(nullptr),
1111  m_pPropertySet(GetNumberingRulesSet()),
1112  m_bOwnNumRuleCreated(false)
1113 {
1114  m_pImpl->StartListening(GetPageDescNotifier(&rDoc));
1116  rDoc.MakeNumRule( m_sCreatedNumRuleName, nullptr, false,
1117  // #i89178#
1119 }
1120 
1122 {
1123  SolarMutexGuard aGuard;
1124  if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1126  if( m_bOwnNumRuleCreated )
1127  delete m_pNumRule;
1128 }
1129 
1130 void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement)
1131 {
1132  SolarMutexGuard aGuard;
1133  if(nIndex < 0 || MAXLEVEL <= nIndex)
1134  throw lang::IndexOutOfBoundsException();
1135 
1136  auto rProperties = o3tl::tryAccess<uno::Sequence<beans::PropertyValue>>(
1137  rElement);
1138  if(!rProperties)
1139  throw lang::IllegalArgumentException();
1140  SwNumRule* pRule = nullptr;
1141  if(m_pNumRule)
1143  *rProperties, nIndex);
1144  else if(m_pDocShell)
1145  {
1146  // #i87650# - correction of cws warnings:
1147  SwNumRule aNumRule( *(m_pDocShell->GetDoc()->GetOutlineNumRule()) );
1149  *rProperties, nIndex);
1150  // set character format if needed
1151  const SwCharFormats* pFormats = m_pDocShell->GetDoc()->GetCharFormats();
1152  const size_t nChCount = pFormats->size();
1153  for(sal_uInt16 i = 0; i < MAXLEVEL;i++)
1154  {
1155  SwNumFormat aFormat(aNumRule.Get( i ));
1156  if (!m_sNewCharStyleNames[i].isEmpty() &&
1158  (!aFormat.GetCharFormat() || aFormat.GetCharFormat()->GetName()!= m_sNewCharStyleNames[i]))
1159  {
1160  SwCharFormat* pCharFormat = nullptr;
1161  for(size_t j = 0; j< nChCount; ++j)
1162  {
1163  SwCharFormat* pTmp = (*pFormats)[j];
1164  if(pTmp->GetName() == m_sNewCharStyleNames[i])
1165  {
1166  pCharFormat = pTmp;
1167  break;
1168  }
1169  }
1170  if(!pCharFormat)
1171  {
1172  SfxStyleSheetBase* pBase;
1174  SfxStyleFamily::Char);
1175  if(!pBase)
1176  pBase = &m_pDocShell->GetStyleSheetPool()->Make(m_sNewCharStyleNames[i], SfxStyleFamily::Char);
1177  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1178 
1179  }
1180  aFormat.SetCharFormat( pCharFormat );
1181  aNumRule.Set( i, aFormat );
1182  }
1183  }
1184  m_pDocShell->GetDoc()->SetOutlineNumRule( aNumRule );
1185  }
1186  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty() &&
1187  nullptr != (pRule = m_pDoc->FindNumRulePtr( m_sCreatedNumRuleName )))
1188  {
1190  *rProperties, nIndex);
1191 
1192  pRule->Validate();
1193  }
1194  else
1195  throw uno::RuntimeException();
1196 }
1197 
1199 {
1200  return MAXLEVEL;
1201 }
1202 
1204 {
1205  SolarMutexGuard aGuard;
1206  if(nIndex < 0 || MAXLEVEL <= nIndex)
1207  throw lang::IndexOutOfBoundsException();
1208 
1209  uno::Any aVal;
1210  const SwNumRule* pRule = m_pNumRule;
1211  if(!pRule && m_pDoc && !m_sCreatedNumRuleName.isEmpty())
1213  if(pRule)
1214  {
1215  uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1216  *pRule, nIndex);
1217  aVal <<= aRet;
1218 
1219  }
1220  else if(m_pDocShell)
1221  {
1222  uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
1223  *m_pDocShell->GetDoc()->GetOutlineNumRule(), nIndex);
1224  aVal <<= aRet;
1225  }
1226  else
1227  throw uno::RuntimeException();
1228  return aVal;
1229 }
1230 
1232 {
1234 }
1235 
1237 {
1238  return true;
1239 }
1240 
1241 static const char* STR_POOLCOLL_HEADLINE_ARY[]
1243  STR_POOLCOLL_HEADLINE1,
1244  STR_POOLCOLL_HEADLINE2,
1245  STR_POOLCOLL_HEADLINE3,
1246  STR_POOLCOLL_HEADLINE4,
1247  STR_POOLCOLL_HEADLINE5,
1248  STR_POOLCOLL_HEADLINE6,
1249  STR_POOLCOLL_HEADLINE7,
1250  STR_POOLCOLL_HEADLINE8,
1251  STR_POOLCOLL_HEADLINE9,
1252  STR_POOLCOLL_HEADLINE10
1253 };
1254 
1255 uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
1256  const SwNumRule& rNumRule, sal_Int32 nIndex) const
1257 {
1258  SolarMutexGuard aGuard;
1259  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1260 
1261  const SwNumFormat& rFormat = rNumRule.Get( static_cast<sal_uInt16>(nIndex) );
1262 
1263  SwCharFormat* pCharFormat = rFormat.GetCharFormat();
1264  OUString CharStyleName;
1265  if (pCharFormat)
1266  CharStyleName = pCharFormat->GetName();
1267 
1268  // Whether or not a style is present: the array entry overwrites this string
1269  if (!m_sNewCharStyleNames[nIndex].isEmpty() &&
1271  {
1272  CharStyleName = m_sNewCharStyleNames[nIndex];
1273  }
1274 
1275  OUString aUString;
1276  if (m_pDocShell) // -> Chapter Numbering
1277  {
1278  // template name
1279  OUString sValue(SwResId(STR_POOLCOLL_HEADLINE_ARY[nIndex]));
1281  const size_t nCount = pColls->size();
1282  for(size_t i = 0; i < nCount; ++i)
1283  {
1284  SwTextFormatColl &rTextColl = *pColls->operator[](i);
1285  if(rTextColl.IsDefault())
1286  continue;
1287 
1288  const sal_Int16 nOutLevel = rTextColl.IsAssignedToListLevelOfOutlineStyle()
1289  ? static_cast<sal_Int16>(rTextColl.GetAssignedOutlineStyleLevel())
1290  : MAXLEVEL;
1291  if ( nOutLevel == nIndex )
1292  {
1293  sValue = rTextColl.GetName();
1294  break; // the style for the level in question has been found
1295  }
1296  else if( sValue==rTextColl.GetName() )
1297  {
1298  // if the default for the level is existing, but its
1299  // level is different, then it cannot be the default.
1300  sValue.clear();
1301  }
1302  }
1304  }
1305 
1306  OUString referer;
1307  if (m_pDoc != nullptr) {
1308  auto const sh = m_pDoc->GetPersist();
1309  if (sh != nullptr && sh->HasName()) {
1310  referer = sh->GetMedium()->GetName();
1311  }
1312  }
1314  rFormat, CharStyleName, m_pDocShell ? & aUString : nullptr, referer);
1315 
1316 }
1317 
1318 uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
1319  const SwNumFormat& rFormat, OUString const& rCharFormatName,
1320  OUString const*const pHeadingStyleName, OUString const & referer)
1321 {
1322  bool bChapterNum = pHeadingStyleName != nullptr;
1323 
1324  std::vector<PropertyValue> aPropertyValues;
1325  aPropertyValues.reserve(32);
1326  //fill all properties into the array
1327 
1328  //adjust
1329  SvxAdjust eAdj = rFormat.GetNumAdjust();
1330  sal_Int16 nINT16 = aSvxToUnoAdjust[eAdj];
1331  aPropertyValues.push_back(comphelper::makePropertyValue("Adjust", nINT16));
1332 
1333  //parentnumbering
1334  nINT16 = rFormat.GetIncludeUpperLevels();
1335  aPropertyValues.push_back(comphelper::makePropertyValue("ParentNumbering", nINT16));
1336 
1337  //prefix
1338  OUString aUString = rFormat.GetPrefix();
1339  aPropertyValues.push_back(comphelper::makePropertyValue("Prefix", aUString));
1340 
1341  //suffix
1342  aUString = rFormat.GetSuffix();
1343  aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", aUString));
1344 
1345  //char style name
1346 
1347  aUString.clear();
1348  SwStyleNameMapper::FillProgName( rCharFormatName, aUString, SwGetPoolIdFromName::ChrFmt);
1349  aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
1350 
1351  //startvalue
1352  nINT16 = rFormat.GetStart();
1353  aPropertyValues.push_back(comphelper::makePropertyValue("StartWith", nINT16));
1354 
1356  {
1357  //leftmargin
1358  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetAbsLSpace());
1359  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LEFT_MARGIN, nINT32));
1360 
1361  //chartextoffset
1362  nINT32 = convertTwipToMm100(rFormat.GetCharTextDistance());
1363  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_SYMBOL_TEXT_DISTANCE, nINT32));
1364 
1365  //firstlineoffset
1366  nINT32 = convertTwipToMm100(rFormat.GetFirstLineOffset());
1367  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_OFFSET, nINT32));
1368  }
1369 
1370  // PositionAndSpaceMode
1371  nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
1373  {
1374  nINT16 = PositionAndSpaceMode::LABEL_ALIGNMENT;
1375  }
1376  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_POSITION_AND_SPACE_MODE, nINT16));
1377 
1379  {
1380  // LabelFollowedBy
1381  nINT16 = LabelFollow::LISTTAB;
1382  if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
1383  {
1384  nINT16 = LabelFollow::SPACE;
1385  }
1386  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NOTHING )
1387  {
1388  nINT16 = LabelFollow::NOTHING;
1389  }
1390  else if ( rFormat.GetLabelFollowedBy() == SvxNumberFormat::NEWLINE )
1391  {
1392  nINT16 = LabelFollow::NEWLINE;
1393  }
1394  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LABEL_FOLLOWED_BY, nINT16));
1395 
1396  // ListtabStopPosition
1397  sal_Int32 nINT32 = convertTwipToMm100(rFormat.GetListtabPos());
1398  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_LISTTAB_STOP_POSITION, nINT32));
1399 
1400  // FirstLineIndent
1401  nINT32 = convertTwipToMm100(rFormat.GetFirstLineIndent());
1402  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_FIRST_LINE_INDENT, nINT32));
1403 
1404  // IndentAt
1405  nINT32 = convertTwipToMm100(rFormat.GetIndentAt());
1406  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_INDENT_AT, nINT32));
1407  }
1408 
1409  //numberingtype
1410  nINT16 = rFormat.GetNumberingType();
1411  aPropertyValues.push_back(comphelper::makePropertyValue("NumberingType", nINT16));
1412 
1413  if(!bChapterNum)
1414  {
1415  if(SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
1416  {
1417  //BulletId
1418  nINT16 = rFormat.GetBulletChar();
1419  aPropertyValues.push_back(comphelper::makePropertyValue("BulletId", nINT16));
1420 
1421  const vcl::Font* pFont = rFormat.GetBulletFont();
1422 
1423  //BulletChar
1424  aUString = OUString(rFormat.GetBulletChar());
1425  aPropertyValues.push_back(comphelper::makePropertyValue("BulletChar", aUString));
1426 
1427  //BulletFontName
1428  aUString = pFont ? pFont->GetStyleName() : OUString();
1429  aPropertyValues.push_back(comphelper::makePropertyValue("BulletFontName", aUString));
1430 
1431  //BulletFont
1432  if(pFont)
1433  {
1434  awt::FontDescriptor aDesc;
1435  SvxUnoFontDescriptor::ConvertFromFont( *pFont, aDesc );
1436  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_BULLET_FONT, aDesc));
1437  }
1438  }
1439  if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
1440  {
1441  const SvxBrushItem* pBrush = rFormat.GetBrush();
1442  const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
1443  if (pGraphic)
1444  {
1445  //GraphicBitmap
1446  uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
1447  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBitmap));
1448  }
1449 
1450  Size aSize = rFormat.GetGraphicSize();
1451  // #i101131#
1452  // adjust conversion due to type mismatch between <Size> and <awt::Size>
1453  awt::Size aAwtSize(convertTwipToMm100(aSize.Width()), convertTwipToMm100(aSize.Height()));
1454  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_SIZE, aAwtSize));
1455 
1456  const SwFormatVertOrient* pOrient = rFormat.GetGraphicOrientation();
1457  if(pOrient)
1458  {
1459  uno::Any any;
1460  pOrient->QueryValue(any);
1461  aPropertyValues.emplace_back(
1462  UNO_NAME_VERT_ORIENT, -1, any, PropertyState_DIRECT_VALUE);
1463  }
1464  }
1465  }
1466  else
1467  {
1468  aUString = *pHeadingStyleName;
1469  aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_HEADING_STYLE_NAME, aUString));
1470  }
1471 
1472  return ::comphelper::containerToSequence(aPropertyValues);
1473 }
1474 
1475 static PropertyValue const* lcl_FindProperty(
1476  const char* cName, std::vector<PropertyValue const*> const& rPropertyValues)
1477 {
1478  const OUString sCmp = OUString::createFromAscii(cName);
1479  for(const PropertyValue* pTemp : rPropertyValues)
1480  {
1481  if (sCmp == pTemp->Name)
1482  return pTemp;
1483  }
1484  return nullptr;
1485 }
1486 
1488  SwNumRule& rNumRule,
1489  const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
1490 {
1491  SolarMutexGuard aGuard;
1492  OSL_ENSURE( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
1493 
1494  SwNumFormat aFormat(rNumRule.Get( static_cast<sal_uInt16>(nIndex) ));
1495 
1496  OUString sHeadingStyleName;
1497  OUString sParagraphStyleName;
1498 
1500  &m_sNewBulletFontNames[nIndex],
1501  &sHeadingStyleName, &sParagraphStyleName,
1502  m_pDoc, m_pDocShell, rProperties);
1503 
1504 
1505  if (m_pDoc && !sParagraphStyleName.isEmpty())
1506  {
1507  const SwTextFormatColls* pColls = m_pDoc->GetTextFormatColls();
1508  const size_t nCount = pColls->size();
1509  for (size_t k = 0; k < nCount; ++k)
1510  {
1511  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1512  if (rTextColl.GetName() == sParagraphStyleName)
1513  rTextColl.SetFormatAttr( SwNumRuleItem( rNumRule.GetName()));
1514  }
1515  }
1516 
1517  if (!sHeadingStyleName.isEmpty())
1518  {
1519  assert(m_pDocShell);
1521  const size_t nCount = pColls->size();
1522  for (size_t k = 0; k < nCount; ++k)
1523  {
1524  SwTextFormatColl &rTextColl = *((*pColls)[k]);
1525  if (rTextColl.IsDefault())
1526  continue;
1527  if (rTextColl.IsAssignedToListLevelOfOutlineStyle() &&
1528  rTextColl.GetAssignedOutlineStyleLevel() == nIndex &&
1529  rTextColl.GetName() != sHeadingStyleName)
1530  {
1532  }
1533  else if (rTextColl.GetName() == sHeadingStyleName)
1534  {
1535  rTextColl.AssignToListLevelOfOutlineStyle( nIndex );
1536  }
1537  }
1538  }
1539 
1540  rNumRule.Set(static_cast<sal_uInt16>(nIndex), aFormat);
1541 }
1542 
1544  SwNumFormat & aFormat,
1545  OUString & rCharStyleName, OUString *const pBulletFontName,
1546  OUString *const pHeadingStyleName,
1547  OUString *const pParagraphStyleName,
1548  SwDoc *const pDoc, SwDocShell *const pDocShell,
1549  const uno::Sequence<beans::PropertyValue>& rProperties)
1550 {
1551  // the order of the names is important!
1552  static const char* aNumPropertyNames[] =
1553  {
1554  UNO_NAME_ADJUST, // 0
1556  UNO_NAME_PREFIX, // 2
1557  UNO_NAME_SUFFIX, // 3
1559  UNO_NAME_START_WITH, // 5
1560  UNO_NAME_LEFT_MARGIN, // 6
1567  UNO_NAME_INDENT_AT, // 13
1570  // these are not in chapter numbering
1571  UNO_NAME_BULLET_ID, // 16
1572  UNO_NAME_BULLET_FONT, // 17
1574  UNO_NAME_BULLET_CHAR, // 19
1575  UNO_NAME_GRAPHIC, // 20
1577  UNO_NAME_GRAPHIC_SIZE, // 22
1578  UNO_NAME_VERT_ORIENT, // 23
1579  // these are only in chapter numbering
1581  // these two are accepted but ignored for some reason
1583  UNO_NAME_BULLET_COLOR, // 26
1584  UNO_NAME_GRAPHIC_URL // 27
1585  };
1586 
1587  enum {
1588  NotInChapterFirst = 16,
1589  NotInChapterLast = 23,
1590  InChapterFirst = 24,
1591  InChapterLast = 24
1592  };
1593 
1594  std::vector<PropertyValue const*> aPropertyValues;
1595  bool bExcept = false;
1596  for(const beans::PropertyValue& rProp : rProperties)
1597  {
1598  bExcept = true;
1599  for(size_t j = 0; j < SAL_N_ELEMENTS( aNumPropertyNames ); j++)
1600  {
1601  if (pDocShell &&
1602  j >= static_cast<size_t>(NotInChapterFirst) &&
1603  j <= static_cast<size_t>(NotInChapterLast))
1604  continue;
1605  if (!pDocShell &&
1606  j >= static_cast<size_t>(InChapterFirst) &&
1607  j <= static_cast<size_t>(InChapterLast))
1608  continue;
1609  if (rProp.Name.equalsAscii(aNumPropertyNames[j]))
1610  {
1611  bExcept = false;
1612  break;
1613  }
1614  }
1615  SAL_WARN_IF( bExcept, "sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing" );
1616  aPropertyValues.push_back(& rProp);
1617  if(bExcept)
1618  break;
1619  }
1620 
1621  bool bWrongArg = false;
1622  if(!bExcept)
1623  {
1624  std::unique_ptr<SvxBrushItem> pSetBrush;
1625  std::unique_ptr<Size> pSetSize;
1626  std::unique_ptr<SwFormatVertOrient> pSetVOrient;
1627  bool bCharStyleNameSet = false;
1628 
1629  for (size_t i = 0; i < SAL_N_ELEMENTS(aNumPropertyNames) && !bWrongArg; ++i)
1630  {
1631  PropertyValue const*const pProp(
1632  lcl_FindProperty(aNumPropertyNames[i], aPropertyValues));
1633  if (!pProp)
1634  continue;
1635  switch(i)
1636  {
1637  case 0: //"Adjust"
1638  {
1639  sal_Int16 nValue = text::HoriOrientation::NONE;
1640  pProp->Value >>= nValue;
1641  if (nValue > text::HoriOrientation::NONE &&
1642  nValue <= text::HoriOrientation::LEFT &&
1643  USHRT_MAX != aUnoToSvxAdjust[nValue])
1644  {
1645  aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
1646  }
1647  else
1648  bWrongArg = true;
1649  }
1650  break;
1651  case 1: //"ParentNumbering",
1652  {
1653  sal_Int16 nSet = 0;
1654  pProp->Value >>= nSet;
1655  if(nSet >= 0 && MAXLEVEL >= nSet)
1656  aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
1657  }
1658  break;
1659  case 2: //"Prefix",
1660  {
1661  OUString uTmp;
1662  pProp->Value >>= uTmp;
1663  aFormat.SetPrefix(uTmp);
1664  }
1665  break;
1666  case 3: //"Suffix",
1667  {
1668  OUString uTmp;
1669  pProp->Value >>= uTmp;
1670  aFormat.SetSuffix(uTmp);
1671  }
1672  break;
1673  case 4: //"CharStyleName",
1674  {
1675  bCharStyleNameSet = true;
1676  OUString uTmp;
1677  pProp->Value >>= uTmp;
1678  OUString sCharFormatName;
1680  if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
1681  {
1682  rCharStyleName = aInvalidStyle;
1683  aFormat.SetCharFormat(nullptr);
1684  }
1685  else if(pDocShell || pDoc)
1686  {
1687  SwDoc* pLocalDoc = pDoc ? pDoc : pDocShell->GetDoc();
1688  const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
1689  const size_t nChCount = pFormats->size();
1690 
1691  SwCharFormat* pCharFormat = nullptr;
1692  if (!sCharFormatName.isEmpty())
1693  {
1694  for(size_t j = 0; j< nChCount; ++j)
1695  {
1696  SwCharFormat* pTmp = (*pFormats)[j];
1697  if(pTmp->GetName() == sCharFormatName)
1698  {
1699  pCharFormat = pTmp;
1700  break;
1701  }
1702  }
1703  if(!pCharFormat)
1704  {
1705 
1706  SfxStyleSheetBase* pBase;
1707  SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
1708  pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
1709  if(!pBase)
1710  pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
1711  pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
1712  }
1713  }
1714  aFormat.SetCharFormat( pCharFormat );
1715  // #i51842#
1716  // If the character format has been found its name should not be in the
1717  // char style names array
1718  rCharStyleName.clear();
1719  }
1720  else
1721  rCharStyleName = sCharFormatName;
1722  }
1723  break;
1724  case 5: //"StartWith",
1725  {
1726  sal_Int16 nVal = 0;
1727  pProp->Value >>= nVal;
1728  aFormat.SetStart(nVal);
1729  }
1730  break;
1731  case 6: //UNO_NAME_LEFT_MARGIN,
1732  {
1733  sal_Int32 nValue = 0;
1734  pProp->Value >>= nValue;
1735  // #i23727# nValue can be negative
1736  aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
1737  }
1738  break;
1739  case 7: //UNO_NAME_SYMBOL_TEXT_DISTANCE,
1740  {
1741  sal_Int32 nValue = 0;
1742  pProp->Value >>= nValue;
1743  if(nValue >= 0)
1744  aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
1745  else
1746  bWrongArg = true;
1747  }
1748  break;
1749  case 8: //UNO_NAME_FIRST_LINE_OFFSET,
1750  {
1751  sal_Int32 nValue = 0;
1752  pProp->Value >>= nValue;
1753  // #i23727# nValue can be positive
1754  nValue = convertMm100ToTwip(nValue);
1755  aFormat.SetFirstLineOffset(nValue);
1756  }
1757  break;
1758  case 9: // UNO_NAME_POSITION_AND_SPACE_MODE
1759  {
1760  sal_Int16 nValue = 0;
1761  pProp->Value >>= nValue;
1762  if ( nValue == 0 )
1763  {
1765  }
1766  else if ( nValue == 1 )
1767  {
1769  }
1770  else
1771  {
1772  bWrongArg = true;
1773  }
1774  }
1775  break;
1776  case 10: // UNO_NAME_LABEL_FOLLOWED_BY
1777  {
1778  sal_Int16 nValue = 0;
1779  pProp->Value >>= nValue;
1780  if ( nValue == LabelFollow::LISTTAB )
1781  {
1783  }
1784  else if ( nValue == LabelFollow::SPACE )
1785  {
1787  }
1788  else if ( nValue == LabelFollow::NOTHING )
1789  {
1791  }
1792  else if ( nValue == LabelFollow::NEWLINE )
1793  {
1795  }
1796  else
1797  {
1798  bWrongArg = true;
1799  }
1800  }
1801  break;
1802  case 11: // UNO_NAME_LISTTAB_STOP_POSITION
1803  {
1804  sal_Int32 nValue = 0;
1805  pProp->Value >>= nValue;
1806  nValue = convertMm100ToTwip(nValue);
1807  if ( nValue >= 0 )
1808  {
1809  aFormat.SetListtabPos( nValue );
1810  }
1811  else
1812  {
1813  bWrongArg = true;
1814  }
1815  }
1816  break;
1817  case 12: // UNO_NAME_FIRST_LINE_INDENT
1818  {
1819  sal_Int32 nValue = 0;
1820  pProp->Value >>= nValue;
1821  nValue = convertMm100ToTwip(nValue);
1822  aFormat.SetFirstLineIndent( nValue );
1823  }
1824  break;
1825  case 13: // UNO_NAME_INDENT_AT
1826  {
1827  sal_Int32 nValue = 0;
1828  pProp->Value >>= nValue;
1829  nValue = convertMm100ToTwip(nValue);
1830  aFormat.SetIndentAt( nValue );
1831  }
1832  break;
1833  case 14: //"NumberingType"
1834  {
1835  sal_Int16 nSet = 0;
1836  pProp->Value >>= nSet;
1837  if(nSet >= 0)
1838  aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
1839  else
1840  bWrongArg = true;
1841  }
1842  break;
1843  case 15: //"ParagraphStyleName"
1844  {
1845  if (pParagraphStyleName)
1846  {
1847  OUString uTmp;
1848  pProp->Value >>= uTmp;
1849  OUString sStyleName;
1851  *pParagraphStyleName = sStyleName;
1852  }
1853  }
1854  break;
1855  case 16: //"BulletId",
1856  {
1857  assert( !pDocShell );
1858  sal_Int16 nSet = 0;
1859  if( pProp->Value >>= nSet )
1860  aFormat.SetBulletChar(nSet);
1861  else
1862  bWrongArg = true;
1863  }
1864  break;
1865  case 17: //UNO_NAME_BULLET_FONT,
1866  {
1867  assert( !pDocShell );
1868  awt::FontDescriptor desc;
1869  if (pProp->Value >>= desc)
1870  {
1871  // #i93725#
1872  // do not accept "empty" font
1873  if (!desc.Name.isEmpty())
1874  {
1875  vcl::Font aFont;
1877  aFormat.SetBulletFont(&aFont);
1878  }
1879  }
1880  else
1881  bWrongArg = true;
1882  }
1883  break;
1884  case 18: //"BulletFontName",
1885  {
1886  assert( !pDocShell );
1887  OUString sBulletFontName;
1888  pProp->Value >>= sBulletFontName;
1889  SwDocShell* pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
1890  if( !sBulletFontName.isEmpty() && pLclDocShell )
1891  {
1892  const SvxFontListItem* pFontListItem =
1893  static_cast<const SvxFontListItem* >(pLclDocShell
1894  ->GetItem( SID_ATTR_CHAR_FONTLIST ));
1895  const FontList* pList = pFontListItem->GetFontList();
1896  FontMetric aFontMetric = pList->Get(
1897  sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
1898  vcl::Font aFont(aFontMetric);
1899  aFormat.SetBulletFont(&aFont);
1900  }
1901  else if (pBulletFontName)
1902  *pBulletFontName = sBulletFontName;
1903  }
1904  break;
1905  case 19: //"BulletChar",
1906  {
1907  assert( !pDocShell );
1908  OUString aChar;
1909  pProp->Value >>= aChar;
1910  if(aChar.getLength() == 1)
1911  {
1912  aFormat.SetBulletChar(aChar.toChar());
1913  }
1914  else if(aChar.isEmpty())
1915  {
1916  // If w:lvlText's value is null - set bullet char to zero
1917  aFormat.SetBulletChar(u'\0');
1918  }
1919  else
1920  {
1921  bWrongArg = true;
1922  }
1923  }
1924  break;
1925  case 20: //UNO_NAME_GRAPHIC,
1926  {
1927  assert( !pDocShell );
1928  uno::Reference<graphic::XGraphic> xGraphic;
1929  if (pProp->Value >>= xGraphic)
1930  {
1931  if (!pSetBrush)
1932  {
1933  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1934  if(pOrigBrush)
1935  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1936  else
1937  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1938  }
1939  Graphic aGraphic(xGraphic);
1940  pSetBrush->SetGraphic(aGraphic);
1941  }
1942  else
1943  bWrongArg = true;
1944  }
1945  break;
1946  case 21: //UNO_NAME_GRAPHIC_BITMAP,
1947  {
1948  assert( !pDocShell );
1949  uno::Reference<awt::XBitmap> xBitmap;
1950  if (pProp->Value >>= xBitmap)
1951  {
1952  if(!pSetBrush)
1953  {
1954  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
1955  if(pOrigBrush)
1956  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
1957  else
1958  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
1959  }
1960 
1961  uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
1962  Graphic aGraphic(xGraphic);
1963  pSetBrush->SetGraphic(aGraphic);
1964  }
1965  else
1966  bWrongArg = true;
1967  }
1968  break;
1969  case 22: //UNO_NAME_GRAPHIC_SIZE,
1970  {
1971  assert( !pDocShell );
1972  if(!pSetSize)
1973  pSetSize.reset(new Size);
1974  awt::Size size;
1975  if (pProp->Value >>= size)
1976  {
1977  size.Width = convertMm100ToTwip(size.Width);
1978  size.Height = convertMm100ToTwip(size.Height);
1979  pSetSize->setWidth( size.Width );
1980  pSetSize->setHeight( size.Height );
1981  }
1982  else
1983  bWrongArg = true;
1984  }
1985  break;
1986  case 23: //VertOrient
1987  {
1988  assert( !pDocShell );
1989  if(!pSetVOrient)
1990  {
1991  if(aFormat.GetGraphicOrientation())
1992  pSetVOrient.reset( static_cast<SwFormatVertOrient*>(aFormat.GetGraphicOrientation()->Clone()) );
1993  else
1994  pSetVOrient.reset(new SwFormatVertOrient);
1995  }
1996  pSetVOrient->PutValue(pProp->Value, MID_VERTORIENT_ORIENT);
1997  }
1998  break;
1999  case 24: //"HeadingStyleName"
2000  {
2001  if (pHeadingStyleName)
2002  {
2003  OUString uTmp;
2004  pProp->Value >>= uTmp;
2005  OUString sStyleName;
2007  *pHeadingStyleName = sStyleName;
2008  }
2009  }
2010  break;
2011  case 25: // BulletRelSize - unsupported - only available in Impress
2012  break;
2013  case 26: // BulletColor - ignored too
2014  break;
2015  case 27: // UNO_NAME_GRAPHIC_URL
2016  {
2017  assert( !pDocShell );
2018  OUString aURL;
2019  if (pProp->Value >>= aURL)
2020  {
2021  if(!pSetBrush)
2022  {
2023  const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
2024  if(pOrigBrush)
2025  pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
2026  else
2027  pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
2028  }
2029 
2030  Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
2031  if (!aGraphic.IsNone())
2032  pSetBrush->SetGraphic(aGraphic);
2033  }
2034  else
2035  bWrongArg = true;
2036  }
2037  break;
2038  }
2039  }
2040  if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
2041  {
2042  if(!pSetBrush && aFormat.GetBrush())
2043  pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
2044 
2045  if(pSetBrush)
2046  {
2047  if(!pSetVOrient && aFormat.GetGraphicOrientation())
2048  pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
2049 
2050  if(!pSetSize)
2051  {
2052  pSetSize.reset(new Size(aFormat.GetGraphicSize()));
2053  if(!pSetSize->Width() || !pSetSize->Height())
2054  {
2055  const Graphic* pGraphic = pSetBrush->GetGraphic();
2056  if(pGraphic)
2057  *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
2058  }
2059  }
2060  sal_Int16 eOrient = pSetVOrient ?
2061  pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
2062  aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
2063  }
2064  }
2065  if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
2066  && aFormat.GetNumberingType() == NumberingType::BITMAP
2067  && !aFormat.GetCharFormat()
2068  && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
2069  {
2070  OUString tmp;
2072  rCharStyleName = tmp;
2073  }
2074  }
2075 
2076  if(bWrongArg)
2077  throw lang::IllegalArgumentException();
2078  else if(bExcept)
2079  throw uno::RuntimeException();
2080 }
2081 
2082 uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
2083 {
2084  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
2085  return aRef;
2086 }
2087 
2088 void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
2089 {
2090  SolarMutexGuard aGuard;
2091  std::unique_ptr<SwNumRule> pDocRule;
2092  SwNumRule* pCreatedRule = nullptr;
2093  if(!m_pNumRule)
2094  {
2095  if(m_pDocShell)
2096  {
2097  pDocRule.reset(new SwNumRule(*m_pDocShell->GetDoc()->GetOutlineNumRule()));
2098  }
2099  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2100  {
2101  pCreatedRule = m_pDoc->FindNumRulePtr(m_sCreatedNumRuleName);
2102  }
2103 
2104  }
2105  if(!m_pNumRule && !pDocRule && !pCreatedRule)
2106  throw RuntimeException();
2107 
2108  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2109  {
2110  bool bVal = *o3tl::doAccess<bool>(rValue);
2111  if(!pCreatedRule)
2112  pDocRule ? pDocRule->SetAutoRule(bVal) : m_pNumRule->SetAutoRule(bVal);
2113  }
2114  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2115  {
2116  bool bVal = *o3tl::doAccess<bool>(rValue);
2117  pDocRule ? pDocRule->SetContinusNum(bVal) :
2118  pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : m_pNumRule->SetContinusNum(bVal);
2119  }
2120  else if(rPropertyName == UNO_NAME_NAME)
2121  {
2122  throw IllegalArgumentException();
2123  }
2124  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2125  {
2126  bool bVal = *o3tl::doAccess<bool>(rValue);
2127  pDocRule ? pDocRule->SetAbsSpaces(bVal) :
2128  pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : m_pNumRule->SetAbsSpaces(bVal);
2129  }
2130  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2131  {
2132  bool bVal = *o3tl::doAccess<bool>(rValue);
2133  SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
2134  pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
2135  pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : m_pNumRule->SetRuleType(eNumRuleType);
2136  }
2137  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2138  {
2139  throw IllegalArgumentException();
2140  }
2141  else
2142  throw UnknownPropertyException();
2143 
2144  if(pDocRule)
2145  {
2146  assert(m_pDocShell);
2147  m_pDocShell->GetDoc()->SetOutlineNumRule(*pDocRule);
2148  pDocRule.reset();
2149  }
2150  else if(pCreatedRule)
2151  {
2152  pCreatedRule->Validate();
2153  }
2154 }
2155 
2156 Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
2157 {
2158  Any aRet;
2159  const SwNumRule* pRule = m_pNumRule;
2160  if(!pRule && m_pDocShell)
2161  pRule = m_pDocShell->GetDoc()->GetOutlineNumRule();
2162  else if(m_pDoc && !m_sCreatedNumRuleName.isEmpty())
2164  if(!pRule)
2165  throw RuntimeException();
2166 
2167  if(rPropertyName == UNO_NAME_IS_AUTOMATIC)
2168  {
2169  aRet <<= pRule->IsAutoRule();
2170  }
2171  else if(rPropertyName == UNO_NAME_IS_CONTINUOUS_NUMBERING)
2172  {
2173  aRet <<= pRule->IsContinusNum();
2174  }
2175  else if(rPropertyName == UNO_NAME_NAME)
2176  aRet <<= pRule->GetName();
2177  else if(rPropertyName == UNO_NAME_IS_ABSOLUTE_MARGINS)
2178  {
2179  aRet <<= pRule->IsAbsSpaces();
2180  }
2181  else if(rPropertyName == UNO_NAME_NUMBERING_IS_OUTLINE)
2182  {
2183  aRet <<= pRule->IsOutlineRule();
2184  }
2185  else if(rPropertyName == UNO_NAME_DEFAULT_LIST_ID)
2186  {
2187  OSL_ENSURE( !pRule->GetDefaultListId().isEmpty(),
2188  "<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect." );
2189  aRet <<= pRule->GetDefaultListId();
2190  }
2191  else
2192  throw UnknownPropertyException();
2193  return aRet;
2194 }
2195 
2197  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2198 {
2199 }
2200 
2202  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2203 {
2204 }
2205 
2207  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2208 {
2209 }
2210 
2212  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2213 {
2214 }
2215 
2217 {
2218  if(m_pNumRule)
2219  {
2220  OUString aString;
2222  return aString;
2223  }
2224  // consider chapter numbering <SwXNumberingRules>
2225  if ( m_pDocShell )
2226  {
2227  OUString aString;
2229  aString, SwGetPoolIdFromName::NumRule );
2230  return aString;
2231  }
2232  return m_sCreatedNumRuleName;
2233 }
2234 
2235 void SwXNumberingRules::setName(const OUString& /*rName*/)
2236 {
2237  RuntimeException aExcept;
2238  aExcept.Message = "readonly";
2239  throw aExcept;
2240 }
2241 
2243 {
2244  if(rHint.GetId() == SfxHintId::Dying)
2245  {
2247  delete m_rParent.m_pNumRule;
2248  m_rParent.m_pNumRule = nullptr;
2249  m_rParent.m_pDoc = nullptr;
2250  }
2251 }
2252 
2254 {
2255  return "SwXChapterNumbering";
2256 }
2257 
2258 sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName)
2259 {
2260  return cppu::supportsService(this, rServiceName);
2261 }
2262 
2264 {
2265  return { "com.sun.star.text.ChapterNumbering", "com.sun.star.text.NumberingRules" };
2266 }
2267 
2269  SwXNumberingRules(rDocSh)
2270 {
2271 }
2272 
2274 {
2275 }
2276 
2278 {
2279  return "SwXTextColumns";
2280 }
2281 
2282 sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName)
2283 {
2284  return cppu::supportsService(this, rServiceName);
2285 }
2286 
2288 {
2289  Sequence<OUString> aRet { "com.sun.star.text.TextColumns" };
2290  return aRet;
2291 }
2292 
2294  m_nReference(0),
2295  m_bIsAutomaticWidth(true),
2296  m_nAutoDistance(0),
2297  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS)),
2298  m_nSepLineWidth(0),
2299  m_nSepLineColor(0), //black
2300  m_nSepLineHeightRelative(100),//full height
2301  m_nSepLineVertAlign(style::VerticalAlignment_MIDDLE),
2302  m_bSepLineIsOn(false),
2303  m_nSepLineStyle(API_COL_LINE_NONE) // None
2304 {
2305 }
2306 
2308  m_nReference(0),
2309  m_aTextColumns(rFormatCol.GetNumCols()),
2310  m_bIsAutomaticWidth(rFormatCol.IsOrtho()),
2311  m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
2312 {
2313  const sal_uInt16 nItemGutterWidth = rFormatCol.GetGutterWidth();
2315  USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : static_cast<sal_Int32>(nItemGutterWidth)
2316  : 0;
2318 
2319  TextColumn* pColumns = m_aTextColumns.getArray();
2320  const SwColumns& rCols = rFormatCol.GetColumns();
2321  for(sal_Int32 i = 0; i < m_aTextColumns.getLength(); ++i)
2322  {
2323  const SwColumn* pCol = &rCols[i];
2324 
2325  pColumns[i].Width = pCol->GetWishWidth();
2326  m_nReference += pColumns[i].Width;
2327  pColumns[i].LeftMargin = convertTwipToMm100(pCol->GetLeft ());
2328  pColumns[i].RightMargin = convertTwipToMm100(pCol->GetRight());
2329  }
2330  if(!m_aTextColumns.hasElements())
2331  m_nReference = USHRT_MAX;
2332 
2333  m_nSepLineWidth = rFormatCol.GetLineWidth();
2334  m_nSepLineColor = rFormatCol.GetLineColor();
2335  m_nSepLineHeightRelative = rFormatCol.GetLineHeight();
2336  m_bSepLineIsOn = rFormatCol.GetLineAdj() != COLADJ_NONE;
2337  sal_Int8 nStyle = API_COL_LINE_NONE;
2338  switch (rFormatCol.GetLineStyle())
2339  {
2340  case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
2341  case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
2342  case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
2343  default: break;
2344  }
2345  m_nSepLineStyle = nStyle;
2346  switch(rFormatCol.GetLineAdj())
2347  {
2348  case COLADJ_TOP: m_nSepLineVertAlign = style::VerticalAlignment_TOP; break;
2349  case COLADJ_BOTTOM: m_nSepLineVertAlign = style::VerticalAlignment_BOTTOM; break;
2350  case COLADJ_CENTER:
2351  case COLADJ_NONE: m_nSepLineVertAlign = style::VerticalAlignment_MIDDLE;
2352  }
2353 }
2354 
2356 {
2357 }
2358 
2360 {
2361  SolarMutexGuard aGuard;
2362  return m_nReference;
2363 }
2364 
2366 {
2367  SolarMutexGuard aGuard;
2368  return static_cast< sal_Int16>( m_aTextColumns.getLength() );
2369 }
2370 
2371 void SwXTextColumns::setColumnCount(sal_Int16 nColumns)
2372 {
2373  SolarMutexGuard aGuard;
2374  if(nColumns <= 0)
2375  throw uno::RuntimeException();
2376  m_bIsAutomaticWidth = true;
2377  m_aTextColumns.realloc(nColumns);
2378  TextColumn* pCols = m_aTextColumns.getArray();
2380  sal_Int32 nWidth = m_nReference / nColumns;
2381  sal_Int32 nDiff = m_nReference - nWidth * nColumns;
2382  sal_Int32 nDist = m_nAutoDistance / 2;
2383  for(sal_Int16 i = 0; i < nColumns; i++)
2384  {
2385  pCols[i].Width = nWidth;
2386  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2387  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2388  }
2389  pCols[nColumns - 1].Width += nDiff;
2390 }
2391 
2392 uno::Sequence< TextColumn > SwXTextColumns::getColumns()
2393 {
2394  SolarMutexGuard aGuard;
2395  return m_aTextColumns;
2396 }
2397 
2398 void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
2399 {
2400  SolarMutexGuard aGuard;
2401  sal_Int32 nReferenceTemp = std::accumulate(rColumns.begin(), rColumns.end(), sal_Int32(0),
2402  [](const sal_Int32 nSum, const TextColumn& rCol) { return nSum + rCol.Width; });
2403  m_bIsAutomaticWidth = false;
2404  m_nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp;
2405  m_aTextColumns = rColumns;
2406 }
2407 
2408 uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( )
2409 {
2410  static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
2411  return aRef;
2412 }
2413 
2414 void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
2415 {
2416  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2417  if (!pEntry)
2418  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2419  if ( pEntry->nFlags & PropertyAttribute::READONLY)
2420  throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2421 
2422  switch(pEntry->nWID)
2423  {
2424  case WID_TXTCOL_LINE_WIDTH:
2425  {
2426  sal_Int32 nTmp = 0;
2427  aValue >>= nTmp;
2428  if(nTmp < 0)
2429  throw IllegalArgumentException();
2431  }
2432  break;
2433  case WID_TXTCOL_LINE_COLOR:
2434  aValue >>= m_nSepLineColor;
2435  break;
2436  case WID_TXTCOL_LINE_STYLE:
2437  {
2438  aValue >>= m_nSepLineStyle;
2439  }
2440  break;
2442  {
2443  sal_Int8 nTmp = 0;
2444  aValue >>= nTmp;
2445  if(nTmp < 0)
2446  throw IllegalArgumentException();
2447  m_nSepLineHeightRelative = nTmp;
2448  }
2449  break;
2450  case WID_TXTCOL_LINE_ALIGN:
2451  {
2452  style::VerticalAlignment eAlign;
2453  if(!(aValue >>= eAlign) )
2454  {
2455  sal_Int8 nTmp = 0;
2456  if (! ( aValue >>= nTmp ) )
2457  throw IllegalArgumentException();
2458  m_nSepLineVertAlign = static_cast<style::VerticalAlignment>(nTmp);
2459  }
2460  else
2461  m_nSepLineVertAlign = eAlign;
2462  }
2463  break;
2464  case WID_TXTCOL_LINE_IS_ON:
2465  m_bSepLineIsOn = *o3tl::doAccess<bool>(aValue);
2466  break;
2468  {
2469  sal_Int32 nTmp = 0;
2470  aValue >>= nTmp;
2471  if(nTmp < 0 || nTmp >= m_nReference)
2472  throw IllegalArgumentException();
2473  m_nAutoDistance = nTmp;
2474  sal_Int32 nColumns = m_aTextColumns.getLength();
2475  TextColumn* pCols = m_aTextColumns.getArray();
2476  sal_Int32 nDist = m_nAutoDistance / 2;
2477  for(sal_Int32 i = 0; i < nColumns; i++)
2478  {
2479  pCols[i].LeftMargin = i == 0 ? 0 : nDist;
2480  pCols[i].RightMargin = i == nColumns - 1 ? 0 : nDist;
2481  }
2482  }
2483  break;
2484  }
2485 }
2486 
2487 Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
2488 {
2489  const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
2490  if (!pEntry)
2491  throw UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
2492 
2493  Any aRet;
2494  switch(pEntry->nWID)
2495  {
2496  case WID_TXTCOL_LINE_WIDTH:
2497  aRet <<= static_cast < sal_Int32 >(convertTwipToMm100(m_nSepLineWidth));
2498  break;
2499  case WID_TXTCOL_LINE_COLOR:
2500  aRet <<= m_nSepLineColor;
2501  break;
2502  case WID_TXTCOL_LINE_STYLE:
2503  aRet <<= m_nSepLineStyle;
2504  break;
2506  aRet <<= m_nSepLineHeightRelative;
2507  break;
2508  case WID_TXTCOL_LINE_ALIGN:
2509  aRet <<= m_nSepLineVertAlign;
2510  break;
2511  case WID_TXTCOL_LINE_IS_ON:
2512  aRet <<= m_bSepLineIsOn;
2513  break;
2515  aRet <<= m_bIsAutomaticWidth;
2516  break;
2518  aRet <<= m_nAutoDistance;
2519  break;
2520  }
2521  return aRet;
2522 }
2523 
2525  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2526 {
2527 }
2528 
2530  const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
2531 {
2532 }
2533 
2535  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2536 {
2537 }
2538 
2540  const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
2541 {
2542 }
2543 
2544 namespace
2545 {
2546  class theSwXTextColumnsUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXTextColumnsUnoTunnelId > {};
2547 }
2548 
2549 const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId()
2550 {
2551  return theSwXTextColumnsUnoTunnelId::get().getSeq();
2552 }
2553 
2554 sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId )
2555 {
2556  if( isUnoTunnelId<SwXTextColumns>(rId) )
2557  {
2558  return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
2559  }
2560  return 0;
2561 }
2562 
2563 /* 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:2529
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:2277
static SwTextFormatColl * lcl_GetParaStyle(SwDoc *pDoc, const uno::Any &aValue)
Definition: unosett.cxx:226
virtual ~SwXTextColumns() override
Definition: unosett.cxx:2355
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:1050
#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:2398
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:1341
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:795
#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:2196
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:1055
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:2263
#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:2201
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:2524
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:1121
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
Definition: unosett.cxx:1203
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:2206
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:1130
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:2371
#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:1487
#define UNO_NAME_IS_ABSOLUTE_MARGINS
Definition: unoprnms.hxx:474
const OUString & GetSuffix() const
virtual void Notify(const SfxHint &) override
Definition: unosett.cxx:2242
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:2273
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:2554
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:2235
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:2088
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:2539
#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:2268
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unosett.cxx:1060
#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:2216
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:1475
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:1318
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:1543
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unosett.cxx:2258
#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:2549
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:2211
< 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:2253
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:2414
#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:2534
virtual sal_Int32 SAL_CALL getCount() override
Definition: unosett.cxx:1198
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:2359
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:767
virtual css::uno::Sequence< css::text::TextColumn > SAL_CALL getColumns() override
Definition: unosett.cxx:2392
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:1231
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unosett.cxx:2082
#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:1236
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:733
#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:774
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:2287
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:2408
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:2282
virtual sal_Int16 SAL_CALL getColumnCount() override
Definition: unosett.cxx:2365
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:2156
#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:2487
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:1255
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:1242
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:1095
#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:623
#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:625
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:1014
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:28
SfxMedium * GetMedium() const