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