23 #include <osl/diagnose.h>
28 #include <rtl/ustrbuf.hxx>
35 #include <drawdoc.hxx>
55 #include <strings.hrc>
80 class SwImplShellAction
83 std::unique_ptr<CurrShell> m_pCurrSh;
85 explicit SwImplShellAction(
SwDoc& rDoc );
86 ~SwImplShellAction() COVERITY_NOEXCEPT_FALSE;
87 SwImplShellAction(const SwImplShellAction&) = delete;
88 SwImplShellAction& operator=(const SwImplShellAction&) = delete;
93 SwImplShellAction::SwImplShellAction(
SwDoc& rDoc )
95 if( rDoc.GetDocShell() )
96 m_pSh = rDoc.GetDocShell()->GetWrtShell();
102 m_pCurrSh.reset(
new CurrShell( m_pSh ) );
107 SwImplShellAction::~SwImplShellAction() COVERITY_NOEXCEPT_FALSE
119 const OUString& rName,
121 bool bCreate =
true )
124 if (!rName.isEmpty())
127 if( !pFormat && rName ==
SwResId(STR_POOLCHR_STANDARD))
133 if( !pFormat && bCreate )
144 pStyle->SetPhysical(
true);
147 pStyle->PresetParent( p->
GetName() );
149 pStyle->PresetParent( OUString() );
152 pStyle->SetPhysical(
false);
160 const OUString& rName,
162 bool bCreate =
true )
166 if (!rName.isEmpty())
169 if( !pColl && bCreate )
181 pStyle->SetPhysical(
true);
185 pStyle->PresetParent( OUString() );
188 pStyle->PresetFollow(rNext.
GetName());
191 pStyle->SetPhysical(
false);
198 const OUString& rName,
200 bool bCreate =
true )
203 if( !rName.isEmpty() )
206 if( !pFormat && bCreate )
218 pStyle->SetPhysical(
true);
222 pStyle->PresetParent( OUString() );
225 pStyle->SetPhysical(
false);
232 const OUString& rName,
234 bool bCreate =
true )
238 if (!rName.isEmpty())
241 if( !pDesc && bCreate )
253 pStyle->SetPhysical(
true);
257 pStyle->PresetParent( OUString() );
260 pStyle->SetPhysical(
false);
266 const OUString& rName,
268 bool bCreate =
true )
272 if (!rName.isEmpty())
275 if( !pRule && bCreate )
287 pStyle->SetPhysical(
true);
288 pStyle->PresetParent( OUString() );
291 pStyle->SetPhysical(
false);
300 if (!rName.isEmpty())
303 if (!pFormat && bCreate)
314 pStyle->SetPhysical(
true);
315 pStyle->PresetParent(OUString());
318 pStyle->SetPhysical(
false);
331 for (
size_t i=0;
i < rTableStyles.
size() && !pFormat; ++
i)
334 for (
size_t nBoxFormat=0; nBoxFormat < aTableTemplateMap.size() && !pFormat; ++nBoxFormat)
336 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
338 OUString sBoxFormatName;
341 if (rName == sBoxFormatName)
342 pFormat = &rBoxFormat;
361 const OUString& rName)
365 UniqueHash::const_iterator it = maUnique.find(std::pair<SfxStyleFamily,OUString>{eFam, rName});
366 if (it != maUnique.end())
368 sal_uInt32 nIdx = it->second;
369 assert (nIdx < maImpl.size());
370 assert (maImpl.size() == maUnique.size());
380 for (
size_t i = 0;
i < maImpl.size();
i++)
381 maUnique[maImpl[
i]] =
i;
382 assert (maImpl.size() == maUnique.size());
386 const OUString& rName)
388 sal_uInt32 nTmpPos = FindName( eFam, rName );
389 if( nTmpPos < maImpl.size() )
390 maImpl.erase(maImpl.begin() + nTmpPos);
394 assert (maImpl.size() == maUnique.size());
400 UniqueHash::const_iterator it = maUnique.find(std::pair<SfxStyleFamily,OUString>{eFam, rStr});
401 if (it != maUnique.end())
404 maUnique.emplace(std::pair<SfxStyleFamily,OUString>{eFam, rStr},
static_cast<sal_uInt32
>(maImpl.size()));
405 maImpl.push_back(std::pair<SfxStyleFamily,OUString>{eFam, rStr});
414 m_pCharFormat(nullptr),
416 m_pFrameFormat(nullptr),
419 m_pTableFormat(nullptr),
420 m_pBoxFormat(nullptr),
430 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
431 SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
432 SID_ATTR_PAGE_HEADERSET, SID_ATTR_PAGE_FOOTERSET,
433 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL,
436 SID_COLOR_TABLE, SID_PATTERN_LIST,
437 SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION,
438 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
439 SID_SWREGISTER_MODE, SID_SWREGISTER_MODE,
440 SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
441 SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
442 SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
443 SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
473 case SfxStyleFamily::Char:
481 case SfxStyleFamily::Para:
489 case SfxStyleFamily::Pseudo:
518 case SfxStyleFamily::Char:
523 case SfxStyleFamily::Para:
528 case SfxStyleFamily::Pseudo:
549 case SfxStyleFamily::Char:
558 case SfxStyleFamily::Para:
567 case SfxStyleFamily::Frame:
576 case SfxStyleFamily::Page:
587 case SfxStyleFamily::Pseudo:
598 case SfxStyleFamily::Table:
601 if ( pTableAutoFormat )
631 case SfxStyleFamily::Char:
633 bRet = pFormat && pFormat->
IsHidden( );
636 case SfxStyleFamily::Para:
638 bRet = pFormat && pFormat->
IsHidden( );
641 case SfxStyleFamily::Frame:
643 bRet = pFormat && pFormat->
IsHidden( );
646 case SfxStyleFamily::Page:
649 bRet = pPgDesc && pPgDesc->
IsHidden( );
652 case SfxStyleFamily::Pseudo:
658 case SfxStyleFamily::Table:
661 bRet = pTableAutoFormat && pTableAutoFormat->
IsHidden( );
680 case SfxStyleFamily::Char:
685 case SfxStyleFamily::Para:
690 case SfxStyleFamily::Frame:
695 case SfxStyleFamily::Page:
696 case SfxStyleFamily::Pseudo:
699 static const OUString
sEmpty;
709 if( i && USHRT_MAX != i )
737 SwImplShellAction aTmpSh(
m_rDoc);
740 case SfxStyleFamily::Para:
752 case SfxStyleFamily::Char:
785 case SfxStyleFamily::Para :
786 case SfxStyleFamily::Page :
return true;
787 case SfxStyleFamily::Frame:
788 case SfxStyleFamily::Char :
789 case SfxStyleFamily::Pseudo:
return false;
791 OSL_ENSURE(
false,
"unknown style family");
802 case SfxStyleFamily::Char :
803 case SfxStyleFamily::Para :
804 case SfxStyleFamily::Frame: bRet =
true;
816 case SfxStyleFamily::Para :
817 case SfxStyleFamily::Char :
818 case SfxStyleFamily::Frame: bRet =
true;
830 static const OUStringLiteral sPlus(
u" + ");
831 if ( SfxStyleFamily::Page ==
nFamily )
837 OUStringBuffer aDesc;
843 switch ( pItem->Which() )
846 case SID_ATTR_PAGE_SIZE:
847 case SID_ATTR_PAGE_MAXSIZE:
848 case SID_ATTR_PAGE_PAPERBIN:
849 case SID_ATTR_BORDER_INNER:
853 OUString aItemPresentation;
856 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
858 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
860 aDesc.append(aItemPresentation);
866 return aDesc.makeStringAndClear();
869 if ( SfxStyleFamily::Frame ==
nFamily || SfxStyleFamily::Para ==
nFamily || SfxStyleFamily::Char ==
nFamily )
875 OUStringBuffer aDesc;
879 bool bHasWesternFontPrefix =
false;
880 bool bHasCJKFontPrefix =
false;
881 bool bHasCTLFontPrefix =
false;
893 switch ( pItem->Which() )
895 case SID_ATTR_AUTO_STYLE_UPDATE:
900 OUString aItemPresentation;
903 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
905 bool bIsDefault =
false;
906 switch ( pItem->Which() )
911 bIsDefault = (drawing::FillStyle_SOLID ==
eFillStyle);
917 bIsDefault = (drawing::FillStyle_GRADIENT ==
eFillStyle);
923 bIsDefault = (drawing::FillStyle_HATCH ==
eFillStyle);
929 bIsDefault = (drawing::FillStyle_BITMAP ==
eFillStyle);
935 bIsDefault = !bUseFloatTransparence;
941 bIsDefault = bUseFloatTransparence;
945 case SID_ATTR_PARA_PAGENUM:
946 sPageNum = aItemPresentation;
948 case SID_ATTR_PARA_MODEL:
949 sModel = aItemPresentation;
952 sBreak = aItemPresentation;
961 if(!bHasCJKFontPrefix)
963 aItemPresentation =
SwResId(STR_CJK_FONT) + aItemPresentation;
964 bHasCJKFontPrefix =
true;
974 if(!bHasCTLFontPrefix)
976 aItemPresentation =
SwResId(STR_CTL_FONT) + aItemPresentation;
977 bHasCTLFontPrefix =
true;
985 if(!bHasWesternFontPrefix)
987 aItemPresentation =
SwResId(STR_WESTERN_FONT) + aItemPresentation;
988 bHasWesternFontPrefix =
true;
996 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
998 aDesc.append(aItemPresentation);
1006 if (!sModel.isEmpty())
1008 if (!aDesc.isEmpty())
1009 aDesc.append(sPlus);
1010 aDesc.append(
SwResId(STR_PAGEBREAK) + sPlus + sModel);
1011 if (sPageNum !=
"0")
1013 aDesc.append(sPlus +
SwResId(STR_PAGEOFFSET) + sPageNum);
1016 else if (!sBreak.isEmpty())
1018 if (!aDesc.isEmpty())
1019 aDesc.append(sPlus);
1020 aDesc.append(sBreak);
1022 return aDesc.makeStringAndClear();
1025 if( SfxStyleFamily::Pseudo ==
nFamily )
1036 if( rStr.isEmpty() )
1050 case SfxStyleFamily::Char :
1064 case SfxStyleFamily::Para :
1066 OSL_ENSURE(
m_pColl,
"Collection missing!");
1078 case SfxStyleFamily::Frame:
1092 case SfxStyleFamily::Page :
1093 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1100 const OUString aOldName(aPageDesc.
GetName());
1113 case SfxStyleFamily::Pseudo:
1120 if (!aOldName.isEmpty())
1122 if ( aOldName != rStr &&
1144 OSL_ENSURE(
false,
"unknown style family");
1161 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
1164 case SfxStyleFamily::Char :
1166 if(
nullptr != ( pFormat =
m_pCharFormat ) && !rStr.isEmpty() )
1170 case SfxStyleFamily::Para :
1171 OSL_ENSURE(
m_pColl,
"Collection missing!");
1172 if(
nullptr != ( pFormat =
m_pColl ) && !rStr.isEmpty() )
1176 case SfxStyleFamily::Frame:
1182 case SfxStyleFamily::Page:
1183 case SfxStyleFamily::Pseudo:
1186 OSL_ENSURE(
false,
"unknown style family");
1194 SwImplShellAction aTmp(
m_rDoc );
1215 SwImplShellAction aTmpSh(
m_rDoc );
1218 case SfxStyleFamily::Para :
1220 OSL_ENSURE(
m_pColl,
"Collection missing!");
1231 case SfxStyleFamily::Page :
1233 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1236 const SwPageDesc* pFollowDesc = !rStr.isEmpty()
1250 case SfxStyleFamily::Char:
1251 case SfxStyleFamily::Frame:
1252 case SfxStyleFamily::Pseudo:
1255 OSL_ENSURE(
false,
"unknown style family");
1266 std::vector<SfxItemSet const*> sets;
1270 sets.push_back(pParent);
1273 pRet.emplace(*sets.back());
1275 for (
auto iter = sets.rbegin(); iter != sets.rend(); ++iter)
1283 if (SfxStyleFamily::Page ==
nFamily || SfxStyleFamily::Pseudo ==
nFamily || SfxStyleFamily::Table ==
nFamily)
1285 SAL_WARN(
"sw.ui",
"GetItemSetForPreview not implemented for page or number or table style");
1286 return std::optional<SfxItemSet>();
1294 std::optional<SfxItemSet> pRet;
1308 std::optional<SfxItemSet> pRet;
1311 case SfxStyleFamily::Char:
1314 case SfxStyleFamily::Para:
1317 case SfxStyleFamily::Frame:
1336 case SfxStyleFamily::Char:
1337 case SfxStyleFamily::Para:
1338 case SfxStyleFamily::Frame:
1346 aBoxInfo.
SetValid( SvxBoxInfoItemValidFlags::DISABLE );
1348 if(
nFamily == SfxStyleFamily::Char )
1357 else if (
nFamily == SfxStyleFamily::Para )
1359 OSL_ENSURE(
m_pColl,
"Where's Collection");
1390 case SfxStyleFamily::Page :
1398 OSL_ENSURE(
m_pDesc,
"No PageDescriptor");
1403 case SfxStyleFamily::Pseudo:
1412 OSL_ENSURE(
false,
"unknown style family");
1422 if (
nFamily != SfxStyleFamily::Para )
1427 OSL_ENSURE(
m_pColl,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
1432 "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect." );
1434 if (sNumRule.isEmpty())
1453 const bool bResetIndentAttrsAtParagraphStyle )
1459 SwImplShellAction aTmpSh(
m_rDoc );
1461 OSL_ENSURE( &rSet != &
m_aCoreSet,
"SetItemSet with own Set is not allowed" );
1471 std::unique_ptr<SwPageDesc> pNewDsc;
1472 size_t nPgDscPos = 0;
1476 case SfxStyleFamily::Char :
1483 case SfxStyleFamily::Para :
1485 OSL_ENSURE(
m_pColl,
"Where's Collection");
1500 const OUString sStyle = pCondItem->
GetStyle(
i );
1501 if (sStyle.isEmpty())
1530 const OUString sStyle = pCondItem->
GetStyle(
i );
1531 if (sStyle.isEmpty())
1537 pCmds[
i ].nCnd, pCmds[
i ].nSubCond ) );
1544 if ( bResetIndentAttrsAtParagraphStyle &&
1559 if (!sNumRule.isEmpty())
1565 if( USHRT_MAX != nPoolId )
1579 case SfxStyleSearchBits::SwText:
1582 case SfxStyleSearchBits::SwChapter:
1585 case SfxStyleSearchBits::SwList:
1588 case SfxStyleSearchBits::SwIndex:
1591 case SfxStyleSearchBits::SwExtra:
1594 case SfxStyleSearchBits::SwHtml:
1602 case SfxStyleFamily::Frame:
1614 case SfxStyleFamily::Page :
1616 OSL_ENSURE(
m_pDesc,
"Where's PageDescriptor");
1626 pFormat = &pNewDsc->GetMaster();
1631 case SfxStyleFamily::Pseudo:
1639 switch( rSet.
GetItemState( SID_ATTR_NUMBERING_RULE,
false, &pItem ))
1641 case SfxItemState::SET:
1650 case SfxItemState::DONTCARE:
1666 OSL_ENSURE(
false,
"unknown style family");
1669 if( pFormat && rSet.
Count())
1688 if(SfxStyleFamily::Frame ==
nFamily)
1729 case SfxStyleFamily::Char:
1732 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1734 rArr.push_back( rTable[
n ] );
1738 case SfxStyleFamily::Para:
1741 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1747 case SfxStyleFamily::Frame:
1750 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1757 case SfxStyleFamily::Page:
1766 case SfxStyleFamily::Pseudo:
1769 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1781 return std::find( rArr.begin(), rArr.end(), p ) != rArr.end();
1789 case SfxStyleFamily::Char:
1791 std::deque<sal_uInt16> aDelArr;
1793 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1796 aDelArr.push_front( n );
1798 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1803 case SfxStyleFamily::Para :
1805 std::deque<sal_uInt16> aDelArr;
1807 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1810 aDelArr.push_front( n );
1812 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1817 case SfxStyleFamily::Frame:
1819 std::deque<SwFrameFormat*> aDelArr;
1821 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1824 aDelArr.push_front( rTable[ n ] );
1826 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1831 case SfxStyleFamily::Page:
1833 std::deque<size_t> aDelArr;
1837 aDelArr.push_front( n );
1839 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1844 case SfxStyleFamily::Pseudo:
1846 std::deque<SwNumRule*> aDelArr;
1848 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1851 aDelArr.push_front( rTable[ n ] );
1853 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1863 FillStyleType const eFType, std::optional<SfxItemSet> *
const o_ppFlatSet)
1866 sal_uInt16 nPoolId = USHRT_MAX;
1870 bool bDeleteInfo =
false;
1872 std::vector<void*> aDelArr;
1877 case SfxStyleFamily::Char:
1892 if( !bCreate && !pFormat )
1915 case SfxStyleFamily::Para:
1935 m_aLink = pCharFormat->GetName();
1941 bRet =
nullptr !=
m_pColl || USHRT_MAX != nPoolId;
1948 case SfxStyleFamily::Frame:
1959 if( !bCreate && !pFormat )
1968 case SfxStyleFamily::Page:
1971 if( bFillOnlyInfo && !
m_pDesc )
1990 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
1992 bRet =
nullptr !=
m_pDesc || USHRT_MAX != nPoolId;
1997 case SfxStyleFamily::Pseudo:
2019 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2021 bRet =
nullptr !=
m_pNumRule || USHRT_MAX != nPoolId;
2027 case SfxStyleFamily::Table:
2033 case SfxStyleFamily::Cell:
2040 if( SfxStyleFamily::Char ==
nFamily ||
2041 SfxStyleFamily::Para ==
nFamily ||
2042 SfxStyleFamily::Frame ==
nFamily )
2049 _nMask |= SfxStyleSearchBits::ReadOnly;
2051 _nMask |= SfxStyleSearchBits::UserDefined;
2055 case COLL_TEXT_BITS: _nMask |= SfxStyleSearchBits::SwText;
break;
2056 case COLL_DOC_BITS : _nMask |= SfxStyleSearchBits::SwChapter;
break;
2060 case COLL_HTML_BITS: _nMask |= SfxStyleSearchBits::SwHtml;
break;
2074 _nMask |= SfxStyleSearchBits::SwCondColl;
2078 assert(o_ppFlatSet);
2085 if( bDeleteInfo && bFillOnlyInfo )
2102 case SfxStyleFamily::Char :
2110 case SfxStyleFamily::Para :
2115 if(
nMask & SfxStyleSearchBits::SwCondColl )
2122 case SfxStyleFamily::Frame:
2129 case SfxStyleFamily::Page :
2137 case SfxStyleFamily::Pseudo:
2146 pRule->SetAutoRule(
false );
2147 if(
aName.isEmpty() )
2156 case SfxStyleFamily::Table:
2157 if (
aName.isEmpty())
2204 OSL_ENSURE(
m_pNumRule,
"Where is the NumRule");
2212 assert(
m_pTableFormat &&
"SwDocStyleSheet table style, SwTableAutoFormat not found");
2222 this->
aName = rName;
2261 case SfxStyleFamily::Para : pMod =
m_pColl;
break;
2263 case SfxStyleFamily::Page : pMod =
m_pDesc;
break;
2265 case SfxStyleFamily::Pseudo:
2268 case SfxStyleFamily::Table:
2272 OSL_ENSURE(
false,
"unknown style family");
2286 sal_uInt16 nPoolId = 0;
2287 unsigned char nFileId = UCHAR_MAX;
2289 rFile =
"swrhlppi.hlp";
2291 const SwFormat* pTmpFormat =
nullptr;
2294 case SfxStyleFamily::Char :
2299 return USHRT_MAX == nId ? 0 : nId;
2304 case SfxStyleFamily::Para:
2309 return USHRT_MAX == nId ? 0 : nId;
2314 case SfxStyleFamily::Frame:
2319 return USHRT_MAX == nId ? 0 : nId;
2324 case SfxStyleFamily::Page:
2329 return USHRT_MAX == nId ? 0 : nId;
2337 case SfxStyleFamily::Pseudo:
2342 return USHRT_MAX == nId ? 0 : nId;
2351 OSL_ENSURE(
false,
"unknown style family");
2362 if( UCHAR_MAX != nFileId )
2376 if( USHRT_MAX == nId )
2385 sal_uInt16 nHId =
static_cast< sal_uInt16
>(nId);
2390 case SfxStyleFamily::Char : pTmpFormat =
m_pCharFormat;
break;
2391 case SfxStyleFamily::Para : pTmpFormat =
m_pColl;
break;
2393 case SfxStyleFamily::Page :
2398 case SfxStyleFamily::Pseudo:
2404 OSL_ENSURE(
false,
"unknown style family");
2444 OSL_ENSURE(
false ,
"Create in SW-Stylesheet-Pool not possible" );
2451 OSL_ENSURE(
false,
"Create in SW-Stylesheet-Pool not possible" );
2457 return std::make_unique<SwStyleSheetIterator>(*
this, eFam, _nMask);
2470 bool bBroadcast =
true;
2471 SwImplShellAction aTmpSh(
m_rDoc );
2475 case SfxStyleFamily::Char:
2482 case SfxStyleFamily::Para:
2489 case SfxStyleFamily::Frame:
2496 case SfxStyleFamily::Page :
2502 case SfxStyleFamily::Pseudo:
2510 case SfxStyleFamily::Table:
2517 OSL_ENSURE(
false,
"unknown style family");
2526 const OUString &rStyle,
const OUString &rParent )
2528 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
2531 case SfxStyleFamily::Char :
2536 case SfxStyleFamily::Para :
2541 case SfxStyleFamily::Frame:
2546 case SfxStyleFamily::Page:
2547 case SfxStyleFamily::Pseudo:
2551 OSL_ENSURE(
false,
"unknown style family");
2559 SwImplShellAction aTmpSh(
m_rDoc );
2568 if( SfxStyleFamily::Para == eFam )
2569 mxStyleSheet->PresetFollow( static_cast<SwTextFormatColl*>(pFormat)->
2570 GetNextTextFormatColl().
GetName() );
2588 if( SfxStyleSearchBits::All == nSMask )
2589 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined | SfxStyleSearchBits::Used;
2591 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2592 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2593 if( nSMask == SfxStyleSearchBits::Auto )
2594 nSMask = SfxStyleSearchBits::SwHtml;
2597 const bool bSearchUsed = ( n != SfxStyleSearchBits::All && n & SfxStyleSearchBits::Used );
2609 case SfxStyleFamily::Char:
2613 case SfxStyleFamily::Para:
2617 case SfxStyleFamily::Frame:
2621 case SfxStyleFamily::Page:
2625 case SfxStyleFamily::Pseudo:
2630 (( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2638 case SfxStyleFamily::Table:
2639 case SfxStyleFamily::Cell:
2642 OSL_ENSURE(
false,
"unknown style family");
2647 if( pMod && !bSearchUsed )
2649 const sal_uInt16
nId = SfxStyleFamily::Page == eFam
2650 ?
static_cast<const SwPageDesc*
>(pMod)->GetPoolFormatId()
2651 :
static_cast<const SwFormat*
>(pMod)->GetPoolFormatId();
2653 if( ( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2691 auto const & rEntry =
m_aLst[ nIdx ];
2692 mxStyleSheet->PresetNameAndFamily( rEntry.first, rEntry.second );
2713 bool bSearchHidden(
nMask & SfxStyleSearchBits::Hidden );
2714 bool bOnlyHidden =
nMask == SfxStyleSearchBits::Hidden;
2717 bool bAll = ( nSrchMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2723 for(
size_t i = 0;
i < nArrLen;
i++ )
2727 const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(*pFormat));
2731 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2740 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2758 ?
SwResId(STR_POOLCHR_STANDARD)
2767 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2781 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2782 SwGetPoolIdFromName::ChrFmt, SfxStyleFamily::Char);
2793 if( SfxStyleSearchBits::AllVisible == ( nSMask & SfxStyleSearchBits::AllVisible ) )
2794 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined |
2795 SfxStyleSearchBits::Used;
2797 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2798 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2799 if( nSMask == SfxStyleSearchBits::Auto )
2800 nSMask = SfxStyleSearchBits::SwHtml;
2804 for(
size_t i = 0;
i < nArrLen;
i++ )
2808 const bool bUsed = bOrganizer || rDoc.
IsUsed(*pColl);
2812 if ( nSMask == SfxStyleSearchBits::Hidden && !pColl->
IsHidden( ) )
2815 if( !(bIsSearchUsed && bUsed ))
2819 if (tmpMask == SfxStyleSearchBits::UserDefined)
2823 else if (tmpMask == SfxStyleSearchBits::SwText)
2827 else if (tmpMask == SfxStyleSearchBits::SwChapter)
2831 else if (tmpMask == SfxStyleSearchBits::SwList)
2835 else if (tmpMask == SfxStyleSearchBits::SwIndex)
2839 else if (tmpMask == SfxStyleSearchBits::SwExtra)
2843 else if (tmpMask == (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined)
2844 || tmpMask == SfxStyleSearchBits::SwHtml)
2851 bool bContinue =
true;
2875 else if (tmpMask == SfxStyleSearchBits::SwCondColl)
2889 bAll = ( nSMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2890 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwText )
2893 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwChapter )
2896 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwList )
2899 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwIndex )
2902 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwExtra )
2905 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwCondColl )
2907 if( !bIsSearchUsed ||
2913 (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwHtml ||
2914 (nSMask & ~SfxStyleSearchBits::Used) ==
2915 (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined) )
2918 bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, SfxStyleFamily::Para ) ;
2922 static sal_uInt16 aPoolIds[] = {
2940 sal_uInt16* pPoolIds = aPoolIds;
2959 for(
size_t i = 0;
i < nArrLen;
i++ )
2963 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(*pFormat));
2967 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2973 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2995 for(
size_t i = 0;
i < nCount; ++
i)
2999 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(rDesc));
3002 if ( ( !bSearchHidden && rDesc.
IsHidden() ) ||
3003 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3010 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rDesc.
IsHidden( ) )
3024 for(
size_t i = 0;
i < rNumTable.
size(); ++
i)
3029 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rRule.
IsHidden( ) )
3032 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rRule));
3035 if( ( !bSearchHidden && rRule.
IsHidden() ) ||
3036 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3055 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3059 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rTableStyle));
3062 if(nSrchMask == SfxStyleSearchBits::Hidden && !rTableStyle.
IsHidden())
3065 if( (!bSearchHidden && rTableStyle.
IsHidden() ) ||
3066 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3084 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3087 for(
size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
3089 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
3091 OUString sBoxFormatName;
3099 for(
size_t i = 0;
i < rCellStyles.
size(); ++
i)
3100 m_aLst.
Append( SfxStyleFamily::Cell, rCellStyles[
i].GetName() );
3118 mxIterSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3142 mxStyleSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3154 bool bTestUsed,
bool bTestHidden,
bool bOnlyHidden,
3159 for (
const auto &
i : rList)
3161 bool bHidden =
false;
3169 bHidden = pFormat && pFormat->
IsHidden( );
3176 bHidden = pFormat && pFormat->
IsHidden( );
3183 bHidden = pFormat && pFormat->
IsHidden( );
3190 bHidden = pPgDesc && pPgDesc->
IsHidden( );
3196 bUsed = pRule && rDoc.
IsUsed(*pRule);
3197 bHidden = pRule && pRule->
IsHidden( );
3201 OSL_ENSURE(
false,
"unknown PoolFormat-Id" );
3204 bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) );
3205 if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) )
3230 if( pStyleSheetHint &&
3231 SfxHintId::StyleSheetErased == pStyleSheetHint->
GetId() )
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual OUString GetDescription(MapUnit eUnit) override
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
const OUString & GetLink() const
void SetLinkedCharFormat(SwCharFormat &rLink)
virtual bool IsUsed() const override
bool IsUsed(const sw::BroadcastingModify &) const
const sal_uInt16 COLL_LISTS_BITS
constexpr SwTwips MIN_BORDER_DIST
SwStyleSheetIterator(SwDocStyleSheetPool &rBase, SfxStyleFamily eFam, SfxStyleSearchBits n)
int GetAssignedOutlineStyleLevel() const
const sal_uInt16 COLL_DOC_BITS
virtual SfxItemSet & GetItemSet() override
Represents the style of a paragraph.
virtual bool GetPresentation(const SfxPoolItem &rItem, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
bool m_bOrganizer
Organizer.
static const std::vector< OUString > & GetListsUINameArray()
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
static SwTextFormatColl * lcl_FindParaFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
virtual bool IsPoolFormatUsed(sal_uInt16 nId) const =0
void SetDefDist(sal_uInt16 nNew)
SwTableAutoFormat * GetTableFormat()
virtual void SetHelpId(const OUString &r, sal_uLong nId) override
void SetNumRule(const SwNumRule &rRule)
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
static bool lcl_Contains(const std::vector< void * > &rArr, const void *p)
virtual SfxStyleSheetBase * First() override
static const std::vector< OUString > & GetFrameFormatUINameArray()
const sal_uInt16 COLL_GET_RANGE_BITS
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
void DelPageDesc(const OUString &rName, bool bBroadcast=false)
void SetMinDist(bool bNew)
static const std::vector< OUString > & GetHTMLUINameArray()
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
virtual void SetModified()=0
Must be called manually at changes of format.
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
virtual rtl::Reference< SfxStyleSheetBase > Create(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask) override
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
virtual bool HasParentSupport() const override
OUString MakeParagraphStyleListString() const
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat IDs.
void InvalidateIterator()
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
const sal_uInt16 COLL_HTML_BITS
void GetGrabBagItem(css::uno::Any &rVal) const
constexpr sal_uInt16 RES_FRMATR_END(133)
void GetGrabBagItem(css::uno::Any &rVal) const
virtual bool SetFollow(const OUString &rStr) override
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
sal_uInt16 GetPoolParent(sal_uInt16 nId)
Query defined parent of a POOL-ID Returns 0 if standard USHRT_MAX if no parent the parent in all othe...
bool IsPoolUserFormat(sal_uInt16 nId)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
virtual bool HasFollowSupport() const override
virtual const OUString & GetFollow() const override
const OUString & GetName() const
virtual void SetHidden(bool bHidden) override
void RenameFormat(SwFormat &rFormat, const OUString &sNewName, bool bBroadcast=false)
sal_uInt16 GetPoolHelpId() const
Query and set Help-IDs for document styles.
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
void SetHidden(bool bValue)
IDocumentUndoRedo & GetIDocumentUndoRedo()
static void lcl_SaveStyles(SfxStyleFamily nFamily, std::vector< void * > &rArr, SwDoc &rDoc)
static SwCharFormat * lcl_FindCharFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
bool IsCTLFontEnabled() const
SfxStyleFamily GetFamily() const
virtual SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)=0
Return required automatic format.
const SwCellStyleTable & GetCellStyles() const
bool HasWriterListeners() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
SfxStyleSearchBits GetMask() const
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
static const std::vector< OUString > & GetPageDescUINameArray()
static const CommandStruct * GetCmds()
void SetFollow(const SwPageDesc *pNew)
SwFrameFormat * FindFrameFormatByName(const OUString &rName) const
void PresetNameAndFamily(SfxStyleFamily eFamily, const OUString &rName)
XPatternListRef GetPatternList() const
const OUString & GetName() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocStyleSheetPool(SwDoc &, bool bOrganizer)
void DelCharFormat(size_t nFormat, bool bBroadcast=false)
Delete the formats.
Used by the UI to modify the document model.
OUString SwResId(TranslateId aId)
static const std::vector< OUString > & GetDocUINameArray()
SfxStyleFamily nSearchFamily
SfxStyleSheetBase * GetStyleSheet() const
virtual SfxStyleSheetBase * operator[](sal_Int32 nIdx) override
void SetGrabBagItem(const css::uno::Any &rVal)
const SfxPoolItem * NextItem()
bool IsAssignedToListLevelOfOutlineStyle() const
void SetMask(SfxStyleSearchBits mask)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const SwCharFormat * GetDfltCharFormat() const
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
const OUString & GetName() const
virtual ~SwDocStyleSheetPool() override
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
rtl::Reference< SwDocStyleSheet > mxIterSheet
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void SetNextTextFormatColl(SwTextFormatColl &rNext)
Inline implementations.
virtual SfxStyleSheetBase * Next() override
const SwCharFormat * GetLinkedCharFormat() const
SwFrameFormat * GetFrameFormat()
#define FN_PARAM_FTN_INFO
virtual bool SetFollow(const OUString &)
virtual void DoUndo(bool const bDoUndo)=0
Enable/Disable Undo.
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
virtual const OUString & GetParent() const override
const SwPageDesc * GetPageDesc()
virtual OUString GetName() const override
const sal_uInt16 COLL_REGISTER_BITS
bool RenameNumRule(const OUString &aOldName, const OUString &aNewName, bool bBroadcast=false)
virtual bool IsEnableSetModified() const =0
SwCharFormat * GetCharFormat()
const sal_uInt16 POOLGRP_NOCOLLID
POOLCOLL-IDs: +-—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ !User! Range ! 0 ! Offset ! +-—+—+...
virtual bool DoesUndo() const =0
Is Undo enabled?
virtual bool SetParent(SfxStyleFamily eFam, const OUString &rStyle, const OUString &rParent) override
void PresetParent(const OUString &rName)
static void lcl_DeleteInfoStyles(SfxStyleFamily nFamily, std::vector< void * > const &rArr, SwDoc &rDoc)
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
SvxNumRule MakeSvxNumRule() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
SwTableAutoFormat * m_pTableFormat
void DelTextFormatColl(size_t nFormat, bool bBroadcast=false)
static SwTableAutoFormat * lcl_FindTableStyle(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
Table of Contents - heading.
virtual SfxStyleSheetBase * Find(const OUString &rStr) override
SwNumRule * FindNumRulePtr(const OUString &rName) const
virtual sal_uLong GetHelpId(OUString &rFile) override
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SwBoxAutoFormat * GetBoxFormat(std::u16string_view sName) const
If found returns a ptr to a BoxFormat. If not found returns nullptr.
constexpr OUStringLiteral sModel
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
SwCharFormat * m_pCharFormat
const SfxItemSet * GetParent() const
void InsertCondition(const SwCollCondition &rCond)
void Broadcast(const SfxHint &rHint)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
virtual bool IsPoolPageDescUsed(sal_uInt16 nId) const =0
static SwFrameFormat * lcl_FindFrameFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
#define FN_KEEP_ASPECT_RATIO
size_t SetDocPattern(const OUString &rPatternName)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
virtual bool IsModified() const =0
Changes of document?
const SwPageDesc & GetPageDesc(const size_t i) const
SwEditShell const * GetEditShell() const
static const SwNumRule * lcl_FindNumRule(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
virtual bool IsPoolTextCollUsed(sal_uInt16 nId) const =0
Check whether this "auto-collection" is used in document.
void SetGrabBagItem(const css::uno::Any &rVal)
SfxStyleSheetBasePool * m_pPool
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
const OUString & GetValue() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
size_t GetPageDescCnt() const
XGradientListRef GetGradientList() const
void MergeIndentAttrsOfListStyle(SfxItemSet &rSet)
new method for paragraph styles to merge indent attributes of applied list style into the given item ...
void AddRule(SwUndoArg eWhat, const OUString &rWith)
virtual bool SetParent(const OUString &rStr) override
#define COND_COMMAND_COUNT
IDocumentState const & getIDocumentState() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
const SwNumRule * GetNumRule()
void PresetFollow(const OUString &rName)
sal_uInt8 GetPoolHlpFileId() const
const OUString * GetDocPattern(size_t nPos) const
void SetItemSet(const SfxItemSet &rSet, const bool bResetIndentAttrsAtParagraphStyle=false)
add optional parameter , default value false, which indicates that...
SwDocStyleSheet(SwDoc &rDoc, SwDocStyleSheetPool &rPool)
void DeleteAssignmentToListLevelOfOutlineStyle()
constexpr sal_uInt16 RES_UNKNOWNATR_END(154)
void SetHidden(bool const bValue)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const
void SetPhysical(bool bPhys)
SwFrameFormat * m_pFrameFormat
SAL_DLLPRIVATE void Create()
Make empty shell a real StyleSheet (Core).
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
std::unique_ptr< SwTableAutoFormat > DelTableStyle(const OUString &rName, bool bBroadcast=false)
void ResetAttrAtFormat(const sal_uInt16 nWhichId, SwFormat &rChangedFormat)
const SwBoxAutoFormat * m_pBoxFormat
void push_back(Value const &rVal)
const SwPageDesc * GetFollow() const
const SwFrameFormat * GetDfltFrameFormat() const
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
FillStyleType
Fill StyleSheet with data.
void SetParent(const SfxItemSet *pNew)
virtual SwNumRule * GetNumRuleFromPool(sal_uInt16 nId)=0
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
const SwNumRule * m_pNumRule
sal_uInt16 GetCurPos() const
SvtBroadcaster & GetNotifier()
static const std::vector< OUString > & GetNumRuleUINameArray()
virtual ~SwStyleSheetIterator() override
SwTableAutoFormatTable & GetTableStyles()
Return the available table styles.
const SwNumFormat & Get(sal_uInt16 i) const
const sal_uInt16 USER_FMT
POLLCOLL-groups:
SwCharFormat * FindCharFormatByName(const OUString &rName) const
static const SwPageDesc * lcl_FindPageDesc(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static const std::vector< OUString > & GetHTMLChrFormatUINameArray()
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId, -HlpId can be prevented.
void Broadcast(const SfxHint &rHint)
static const std::vector< OUString > & GetChrFormatUINameArray()
void AppendStyleList(const std::vector< OUString > &rLst, bool bUsed, bool bTestHidden, bool bOnlyHidden, SwGetPoolIdFromName nSection, SfxStyleFamily eFamily)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
static const std::vector< OUString > & GetExtraUINameArray()
XHatchListRef GetHatchList() const
SwTextFormatColl * GetCollection()
const SwCharFormats * GetCharFormats() const
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
const SwPageDesc * m_pDesc
bool AreListLevelIndentsApplicable() const
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
static const SwBoxAutoFormat * lcl_FindCellStyle(SwDoc &rDoc, std::u16string_view rName, SwDocStyleSheet *pStyle)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) override
#define SAL_WARN_IF(condition, area, stream)
virtual bool IsHidden() const override
SwTextFormatColl * m_pColl
const SwTextFormatColls * GetTextFormatColls() const
virtual ~SwDocStyleSheet() override
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
SwConditionTextFormatColl * MakeCondTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
rtl::Reference< SwDocStyleSheet > mxStyleSheet
const SwNumRuleTable & GetNumRuleTable() const
SAL_DLLPRIVATE bool FillStyleSheet(FillStyleType eFType, std::optional< SfxItemSet > *o_ppFlatSet=nullptr)
SfxStyleSheetIterator * GetCachedIterator()
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
static const std::vector< OUString > & GetRegisterUINameArray()
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
void SetSvxRule(const SvxNumRule &, SwDoc *pDoc)
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
virtual bool HasClearParentSupport() const override
sal_uInt16 GetPoolHelpId() const
void SetLink(const OUString &rStr)
bool SetName(const OUString &rNewName)
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
OUString GetStyle(sal_uInt16 nPos) const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
constexpr sal_uInt16 RES_CHRATR_END(46)
void ChgFormat(SwFormat &rFormat, const SfxItemSet &rSet)
XBitmapListRef GetBitmapList() const
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
virtual sal_Int32 Count() override
sal_uInt8 GetPoolHlpFileId() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
virtual void SetEnableSetModified(bool bEnableSetModified)=0
void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet &rSet)
#define SAL_WARN(area, stream)
bool HasTableStyles() const
Counts table styles without triggering lazy-load of them.
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
static void lcl_SwFormatToFlatItemSet(SwFormat const *const pFormat, std::optional< SfxItemSet > &pRet)
const sal_uInt16 COLL_TEXT_BITS
XColorListRef GetColorList() const
bool DelNumRule(const OUString &rName, bool bBroadCast=false)
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true) override
const SwFrameFormats * GetFrameFormats() const
bool IsInvalidItem(const SfxPoolItem *pItem)
void PreDelPageDesc(SwPageDesc const *pDel)
All descriptors whose Follow point to the to-be-deleted have to be adapted.
void StartAllAction()
For all views of this document.
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
IDocumentListsAccess const & getIDocumentListsAccess() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
virtual OUString GetUsedBy() override
static const std::vector< OUString > & GetTextUINameArray()
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
SfxStyleSheetBasePool * pBasePool
void RegisterToFormat(SwFormat &)
SwTableAutoFormat * MakeTableStyle(const OUString &rName, bool bBroadcast=false)
rtl::Reference< SwDocStyleSheet > mxStyleSheet
void InvalidateIterator()
const SfxPoolItem * GetCurItem() const
SwTextFormatColl & GetNextTextFormatColl() const
const sal_uInt16 COLL_EXTRA_BITS
virtual OUString GetDescription(MapUnit eMetric)
void ChgNumRuleFormats(const SwNumRule &rRule)
bool m_bDetectedRangeSegmentation false
virtual void ResetModified()=0
virtual std::optional< SfxItemSet > GetItemSetForPreview() override
virtual void Remove(SfxStyleSheetBase *pStyle) override