23#include <osl/diagnose.h>
28#include <rtl/ustrbuf.hxx>
87 bool IsUsed()
const override
93 auto pUser(
dynamic_cast<svl::StyleSheetUser*
>(pListener));
94 bResult = pUser && pUser->isUsedByModel();
101 if (rHint.
GetId() == SfxHintId::DataChanged)
106 bool SetParent(
const OUString& rName)
override
110 auto pStyle = m_pPool->Find(rName, nFamily);
111 pSet->SetParent(pStyle ? &pStyle->GetItemSet() :
nullptr);
134 return new EEStyleSheet(rName, *
this, eFamily, nMask);
143 auto nId = pHint->GetId();
144 auto pDocStyleSheet = pHint->GetStyleSheet();
145 auto pExtendedHint =
dynamic_cast<const SfxStyleSheetModifiedHint*
>(&rHint);
146 const OUString
aName = pExtendedHint ? pExtendedHint->GetOldName() : pDocStyleSheet->GetName();
151 if (nId == SfxHintId::StyleSheetModified)
153 pStyleSheet->SetName(pDocStyleSheet->GetName());
154 UpdateStyleHierarchyFrom(pStyleSheet, pDocStyleSheet);
157 else if (nId == SfxHintId::StyleSheetErased)
166 if (
auto pDocStyleSheet = pStyleSheet ?
nullptr :
m_pOwner->Find(rName, eFamily))
168 pStyleSheet = &
Make(pDocStyleSheet->GetName(), pDocStyleSheet->GetFamily());
169 UpdateStyleHierarchyFrom(pStyleSheet, pDocStyleSheet);
177 FillItemSet(pStyleSheet, pDocStyleSheet);
180 const OUString aParent = pDocStyleSheet->
GetParent();
181 const OUString aFollow = pDocStyleSheet->
GetFollow();
195 auto pCol =
static_cast<SwDocStyleSheet*
>(pSourceSheet)->GetCollection();
197 std::optional<SvxLRSpaceItem> oLRSpaceItem;
199 for (
auto pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem())
201 if (aIter.GetItemState(
false) != SfxItemState::SET)
204 auto nWhich = pItem->Which();
205 auto nSlotId = rPool.GetSlotId(nWhich);
206 auto nNewWhich = rPool.GetSecondaryPool()->GetWhich(nSlotId);
207 if (nNewWhich != nSlotId)
208 rItemSet.Put(pItem->CloneSetWhich(nNewWhich));
212 oLRSpaceItem.emplace(EE_PARA_LRSPACE);
215 (*oLRSpaceItem).SetAutoFirst(pFirstLineItem->IsAutoFirst());
220 oLRSpaceItem.emplace(EE_PARA_LRSPACE);
226 oLRSpaceItem.emplace(EE_PARA_LRSPACE);
231 auto pBrushItem =
static_cast<const SvxBrushItem*
>(pItem);
236 rItemSet.Put(*oLRSpaceItem);
240class SwImplShellAction
243 std::unique_ptr<CurrShell> m_pCurrSh;
245 explicit SwImplShellAction(
SwDoc& rDoc );
246 ~SwImplShellAction() COVERITY_NOEXCEPT_FALSE;
247 SwImplShellAction(const SwImplShellAction&) = delete;
248 SwImplShellAction& operator=(const SwImplShellAction&) = delete;
253SwImplShellAction::SwImplShellAction(
SwDoc& rDoc )
255 if( rDoc.GetDocShell() )
256 m_pSh = rDoc.GetDocShell()->GetWrtShell();
262 m_pCurrSh.reset(
new CurrShell( m_pSh ) );
267SwImplShellAction::~SwImplShellAction() COVERITY_NOEXCEPT_FALSE
279 const OUString& rName,
281 bool bCreate =
true )
284 if (!rName.isEmpty())
287 if( !pFormat && rName ==
SwResId(STR_POOLCHR_STANDARD))
293 if( !pFormat && bCreate )
304 pStyle->SetPhysical(
true);
306 if(
p && !
p->IsDefault() )
307 pStyle->PresetParent(
p->GetName() );
309 pStyle->PresetParent( OUString() );
312 pStyle->SetPhysical(
false);
320 const OUString& rName,
322 bool bCreate =
true )
326 if (!rName.isEmpty())
329 if( !pColl && bCreate )
341 pStyle->SetPhysical(
true);
345 pStyle->PresetParent( OUString() );
348 pStyle->PresetFollow(rNext.
GetName());
351 pStyle->SetPhysical(
false);
358 const OUString& rName,
360 bool bCreate =
true )
363 if( !rName.isEmpty() )
366 if( !pFormat && bCreate )
378 pStyle->SetPhysical(
true);
382 pStyle->PresetParent( OUString() );
385 pStyle->SetPhysical(
false);
392 const OUString& rName,
394 bool bCreate =
true )
398 if (!rName.isEmpty())
401 if( !pDesc && bCreate )
413 pStyle->SetPhysical(
true);
417 pStyle->PresetParent( OUString() );
420 pStyle->SetPhysical(
false);
426 const OUString& rName,
428 bool bCreate =
true )
432 if (!rName.isEmpty())
435 if( !pRule && bCreate )
447 pStyle->SetPhysical(
true);
448 pStyle->PresetParent( OUString() );
451 pStyle->SetPhysical(
false);
460 if (!rName.isEmpty())
463 if (!pFormat && bCreate)
474 pStyle->SetPhysical(
true);
475 pStyle->PresetParent(OUString());
478 pStyle->SetPhysical(
false);
491 for (
size_t i=0;
i < rTableStyles.
size() && !pFormat; ++
i)
494 for (
size_t nBoxFormat=0; nBoxFormat < aTableTemplateMap.size() && !pFormat; ++nBoxFormat)
496 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
498 OUString sBoxFormatName;
501 if (rName == sBoxFormatName)
502 pFormat = &rBoxFormat;
521 const OUString& rName)
525 UniqueHash::const_iterator it = maUnique.find(std::pair<SfxStyleFamily,OUString>{eFam, rName});
526 if (it != maUnique.end())
528 sal_uInt32 nIdx = it->second;
529 assert (nIdx < maImpl.size());
530 assert (maImpl.size() == maUnique.size());
540 for (
size_t i = 0;
i < maImpl.size();
i++)
541 maUnique[maImpl[
i]] =
i;
542 assert (maImpl.size() == maUnique.size());
546 const OUString& rName)
548 sal_uInt32 nTmpPos = FindName( eFam, rName );
550 maImpl.erase(maImpl.begin() + nTmpPos);
554 assert (maImpl.size() == maUnique.size());
560 UniqueHash::const_iterator it = maUnique.find(std::pair<SfxStyleFamily,OUString>{eFam, rStr});
561 if (it != maUnique.end())
564 maUnique.emplace(std::pair<SfxStyleFamily,OUString>{eFam, rStr},
static_cast<sal_uInt32
>(maImpl.size()));
565 maImpl.push_back(std::pair<SfxStyleFamily,OUString>{eFam, rStr});
574 m_pCharFormat(nullptr),
576 m_pFrameFormat(nullptr),
579 m_pTableFormat(nullptr),
580 m_pBoxFormat(nullptr),
590 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
591 SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
592 SID_ATTR_PAGE_HEADERSET, SID_ATTR_PAGE_FOOTERSET,
593 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL,
596 SID_COLOR_TABLE, SID_PATTERN_LIST,
597 SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION,
598 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
599 SID_SWREGISTER_MODE, SID_SWREGISTER_MODE,
600 SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
601 SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
602 SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
603 SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
633 case SfxStyleFamily::Char:
641 case SfxStyleFamily::Para:
649 case SfxStyleFamily::Pseudo:
677 case SfxStyleFamily::Char:
682 case SfxStyleFamily::Para:
687 case SfxStyleFamily::Pseudo:
708 case SfxStyleFamily::Char:
717 case SfxStyleFamily::Para:
726 case SfxStyleFamily::Frame:
735 case SfxStyleFamily::Page:
746 case SfxStyleFamily::Pseudo:
757 case SfxStyleFamily::Table:
760 if ( pTableAutoFormat )
789 case SfxStyleFamily::Char:
791 bRet = pFormat && pFormat->
IsHidden( );
794 case SfxStyleFamily::Para:
796 bRet = pFormat && pFormat->
IsHidden( );
799 case SfxStyleFamily::Frame:
801 bRet = pFormat && pFormat->
IsHidden( );
804 case SfxStyleFamily::Page:
807 bRet = pPgDesc && pPgDesc->
IsHidden( );
810 case SfxStyleFamily::Pseudo:
816 case SfxStyleFamily::Table:
819 bRet = pTableAutoFormat && pTableAutoFormat->
IsHidden( );
838 case SfxStyleFamily::Char:
843 case SfxStyleFamily::Para:
848 case SfxStyleFamily::Frame:
853 case SfxStyleFamily::Page:
854 case SfxStyleFamily::Pseudo:
857 static const OUString
sEmpty;
867 if(
i && USHRT_MAX !=
i )
873 if(
p && !
p->IsDefault() )
895 SwImplShellAction aTmpSh(
m_rDoc);
898 case SfxStyleFamily::Para:
910 case SfxStyleFamily::Char:
943 case SfxStyleFamily::Para :
944 case SfxStyleFamily::Page :
return true;
945 case SfxStyleFamily::Frame:
946 case SfxStyleFamily::Char :
947 case SfxStyleFamily::Pseudo:
return false;
949 OSL_ENSURE(
false,
"unknown style family");
960 case SfxStyleFamily::Char :
961 case SfxStyleFamily::Para :
962 case SfxStyleFamily::Frame: bRet =
true;
974 case SfxStyleFamily::Para :
975 case SfxStyleFamily::Char :
976 case SfxStyleFamily::Frame: bRet =
true;
988 static constexpr OUStringLiteral sPlus(
u" + ");
989 if ( SfxStyleFamily::Page ==
nFamily )
995 OUStringBuffer aDesc;
1001 switch ( pItem->Which() )
1004 case SID_ATTR_PAGE_SIZE:
1005 case SID_ATTR_PAGE_MAXSIZE:
1006 case SID_ATTR_PAGE_PAPERBIN:
1007 case SID_ATTR_BORDER_INNER:
1011 OUString aItemPresentation;
1014 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
1016 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
1017 aDesc.append(sPlus);
1018 aDesc.append(aItemPresentation);
1024 return aDesc.makeStringAndClear();
1027 if ( SfxStyleFamily::Frame ==
nFamily || SfxStyleFamily::Para ==
nFamily || SfxStyleFamily::Char ==
nFamily )
1033 OUStringBuffer aDesc;
1037 bool bHasWesternFontPrefix =
false;
1038 bool bHasCJKFontPrefix =
false;
1039 bool bHasCTLFontPrefix =
false;
1051 switch ( pItem->Which() )
1053 case SID_ATTR_AUTO_STYLE_UPDATE:
1058 OUString aItemPresentation;
1061 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
1063 bool bIsDefault =
false;
1064 switch ( pItem->Which() )
1069 bIsDefault = (drawing::FillStyle_SOLID == eFillStyle);
1075 bIsDefault = (drawing::FillStyle_GRADIENT == eFillStyle);
1081 bIsDefault = (drawing::FillStyle_HATCH == eFillStyle);
1087 bIsDefault = (drawing::FillStyle_BITMAP == eFillStyle);
1093 bIsDefault = !bUseFloatTransparence;
1099 bIsDefault = bUseFloatTransparence;
1103 case SID_ATTR_PARA_PAGENUM:
1104 sPageNum = aItemPresentation;
1106 case SID_ATTR_PARA_MODEL:
1107 sModel = aItemPresentation;
1110 sBreak = aItemPresentation;
1119 if(!bHasCJKFontPrefix)
1121 aItemPresentation =
SwResId(STR_CJK_FONT) + aItemPresentation;
1122 bHasCJKFontPrefix =
true;
1132 if(!bHasCTLFontPrefix)
1134 aItemPresentation =
SwResId(STR_CTL_FONT) + aItemPresentation;
1135 bHasCTLFontPrefix =
true;
1143 if(!bHasWesternFontPrefix)
1145 aItemPresentation =
SwResId(STR_WESTERN_FONT) + aItemPresentation;
1146 bHasWesternFontPrefix =
true;
1154 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
1155 aDesc.append(sPlus);
1156 aDesc.append(aItemPresentation);
1166 if (!aDesc.isEmpty())
1167 aDesc.append(sPlus);
1169 if (sPageNum !=
"0")
1171 aDesc.append(sPlus +
SwResId(STR_PAGEOFFSET) + sPageNum);
1174 else if (!sBreak.isEmpty())
1176 if (!aDesc.isEmpty())
1177 aDesc.append(sPlus);
1178 aDesc.append(sBreak);
1180 return aDesc.makeStringAndClear();
1183 if( SfxStyleFamily::Pseudo ==
nFamily )
1194 if( rStr.isEmpty() )
1208 case SfxStyleFamily::Char :
1222 case SfxStyleFamily::Para :
1224 OSL_ENSURE(
m_pColl,
"Collection missing!");
1236 case SfxStyleFamily::Frame:
1250 case SfxStyleFamily::Page :
1251 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1258 const OUString aOldName(aPageDesc.
GetName());
1271 case SfxStyleFamily::Pseudo:
1278 if (!aOldName.isEmpty())
1280 if ( aOldName != rStr &&
1302 OSL_ENSURE(
false,
"unknown style family");
1318 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
1321 case SfxStyleFamily::Char :
1323 if(
nullptr != ( pFormat =
m_pCharFormat ) && !rStr.isEmpty() )
1327 case SfxStyleFamily::Para :
1328 OSL_ENSURE(
m_pColl,
"Collection missing!");
1329 if(
nullptr != ( pFormat =
m_pColl ) && !rStr.isEmpty() )
1333 case SfxStyleFamily::Frame:
1339 case SfxStyleFamily::Page:
1340 case SfxStyleFamily::Pseudo:
1343 OSL_ENSURE(
false,
"unknown style family");
1351 SwImplShellAction aTmp(
m_rDoc );
1372 SwImplShellAction aTmpSh(
m_rDoc );
1375 case SfxStyleFamily::Para :
1377 OSL_ENSURE(
m_pColl,
"Collection missing!");
1388 case SfxStyleFamily::Page :
1390 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1393 const SwPageDesc* pFollowDesc = !rStr.isEmpty()
1407 case SfxStyleFamily::Char:
1408 case SfxStyleFamily::Frame:
1409 case SfxStyleFamily::Pseudo:
1412 OSL_ENSURE(
false,
"unknown style family");
1423 std::vector<SfxItemSet const*> sets;
1427 sets.push_back(pParent);
1430 pRet.emplace(*sets.back());
1432 for (
auto iter = sets.rbegin(); iter != sets.rend(); ++iter)
1440 if (SfxStyleFamily::Page ==
nFamily || SfxStyleFamily::Pseudo ==
nFamily || SfxStyleFamily::Table ==
nFamily)
1442 SAL_WARN(
"sw.ui",
"GetItemSetForPreview not implemented for page or number or table style");
1443 return std::optional<SfxItemSet>();
1451 std::optional<SfxItemSet> pRet;
1465 std::optional<SfxItemSet> pRet;
1468 case SfxStyleFamily::Char:
1471 case SfxStyleFamily::Para:
1474 case SfxStyleFamily::Frame:
1493 case SfxStyleFamily::Char:
1494 case SfxStyleFamily::Para:
1495 case SfxStyleFamily::Frame:
1503 aBoxInfo.
SetValid( SvxBoxInfoItemValidFlags::DISABLE );
1505 if(
nFamily == SfxStyleFamily::Char )
1514 else if (
nFamily == SfxStyleFamily::Para )
1516 OSL_ENSURE(
m_pColl,
"Where's Collection");
1547 case SfxStyleFamily::Page :
1555 OSL_ENSURE(
m_pDesc,
"No PageDescriptor");
1560 case SfxStyleFamily::Pseudo:
1569 OSL_ENSURE(
false,
"unknown style family");
1579 if (
nFamily != SfxStyleFamily::Para )
1584 OSL_ENSURE(
m_pColl,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
1590 "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect." );
1592 if (sNumRule.isEmpty())
1601 if (indents & ::sw::ListLevelIndents::FirstLine)
1617 const bool bResetIndentAttrsAtParagraphStyle )
1623 SwImplShellAction aTmpSh(
m_rDoc );
1625 OSL_ENSURE( &
rSet != &
m_aCoreSet,
"SetItemSet with own Set is not allowed" );
1635 std::vector<sal_uInt16> aWhichIdsToReset;
1636 std::unique_ptr<SwPageDesc> pNewDsc;
1637 size_t nPgDscPos = 0;
1641 case SfxStyleFamily::Char :
1648 case SfxStyleFamily::Para :
1650 OSL_ENSURE(
m_pColl,
"Where's Collection");
1665 const OUString sStyle = pCondItem->
GetStyle(
i );
1666 if (sStyle.isEmpty())
1678 else if( pCondItem && !
m_pColl->HasWriterListeners() )
1695 const OUString sStyle = pCondItem->
GetStyle(
i );
1696 if (sStyle.isEmpty())
1702 pCmds[
i ].nCnd, pCmds[
i ].nSubCond ) );
1709 if ( bResetIndentAttrsAtParagraphStyle &&
1716 if ( bResetIndentAttrsAtParagraphStyle &&
1731 if (!sNumRule.isEmpty())
1737 if( USHRT_MAX != nPoolId )
1751 case SfxStyleSearchBits::SwText:
1754 case SfxStyleSearchBits::SwChapter:
1757 case SfxStyleSearchBits::SwList:
1760 case SfxStyleSearchBits::SwIndex:
1763 case SfxStyleSearchBits::SwExtra:
1766 case SfxStyleSearchBits::SwHtml:
1774 case SfxStyleFamily::Frame:
1786 case SfxStyleFamily::Page :
1788 OSL_ENSURE(
m_pDesc,
"Where's PageDescriptor");
1798 pFormat = &pNewDsc->GetMaster();
1803 case SfxStyleFamily::Pseudo:
1813 case SfxItemState::SET:
1822 case SfxItemState::DONTCARE:
1838 OSL_ENSURE(
false,
"unknown style family");
1862 if(SfxStyleFamily::Frame ==
nFamily)
1907 case SfxStyleFamily::Char:
1910 for(
auto const& rChar: rTable)
1912 rArr.push_back(rChar);
1916 case SfxStyleFamily::Para:
1919 for(
auto const& rPara : rTable)
1925 case SfxStyleFamily::Frame:
1929 rArr.push_back(rFrame);
1934 case SfxStyleFamily::Page:
1943 case SfxStyleFamily::Pseudo:
1946 for(
auto const& rPseudo: rTable)
1958 return std::find( rArr.begin(), rArr.end(),
p ) != rArr.end();
1966 case SfxStyleFamily::Char:
1968 std::deque<sal_uInt16> aDelArr;
1970 for(
n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1973 aDelArr.push_front(
n );
1975 for(
auto const& rDelArr: aDelArr)
1980 case SfxStyleFamily::Para :
1982 std::deque<sal_uInt16> aDelArr;
1984 for(
n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1987 aDelArr.push_front(
n );
1989 for(
auto const& rDelArr: aDelArr)
1994 case SfxStyleFamily::Frame:
1996 std::deque<SwFrameFormat*> aDelArr;
2000 aDelArr.push_front( rFrame );
2002 for(
auto const& rDelArr: aDelArr)
2007 case SfxStyleFamily::Page:
2009 std::deque<size_t> aDelArr;
2013 aDelArr.push_front(
n );
2015 for(
auto const& rDelArr: aDelArr )
2020 case SfxStyleFamily::Pseudo:
2022 std::deque<SwNumRule*> aDelArr;
2024 for(
auto const& rPseudo: rTable)
2027 aDelArr.push_front( rPseudo );
2029 for(
auto const& rDelArr: aDelArr)
2039 FillStyleType const eFType, std::optional<SfxItemSet> *
const o_ppFlatSet)
2042 sal_uInt16 nPoolId = USHRT_MAX;
2046 bool bDeleteInfo =
false;
2048 std::vector<void*> aDelArr;
2053 case SfxStyleFamily::Char:
2068 if( !bCreate && !pFormat )
2091 case SfxStyleFamily::Para:
2117 bRet =
nullptr !=
m_pColl || USHRT_MAX != nPoolId;
2124 case SfxStyleFamily::Frame:
2135 if( !bCreate && !pFormat )
2144 case SfxStyleFamily::Page:
2147 if( bFillOnlyInfo && !
m_pDesc )
2168 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2170 bRet =
nullptr !=
m_pDesc || USHRT_MAX != nPoolId;
2175 case SfxStyleFamily::Pseudo:
2199 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2201 bRet =
nullptr !=
m_pNumRule || USHRT_MAX != nPoolId;
2207 case SfxStyleFamily::Table:
2213 case SfxStyleFamily::Cell:
2220 if( SfxStyleFamily::Char ==
nFamily ||
2221 SfxStyleFamily::Para ==
nFamily ||
2222 SfxStyleFamily::Frame ==
nFamily )
2229 _nMask |= SfxStyleSearchBits::ReadOnly;
2231 _nMask |= SfxStyleSearchBits::UserDefined;
2235 case COLL_TEXT_BITS: _nMask |= SfxStyleSearchBits::SwText;
break;
2236 case COLL_DOC_BITS : _nMask |= SfxStyleSearchBits::SwChapter;
break;
2240 case COLL_HTML_BITS: _nMask |= SfxStyleSearchBits::SwHtml;
break;
2256 _nMask |= SfxStyleSearchBits::SwCondColl;
2260 assert(o_ppFlatSet);
2267 if( bDeleteInfo && bFillOnlyInfo )
2284 case SfxStyleFamily::Char :
2292 case SfxStyleFamily::Para :
2297 if(
nMask & SfxStyleSearchBits::SwCondColl )
2304 case SfxStyleFamily::Frame:
2311 case SfxStyleFamily::Page :
2319 case SfxStyleFamily::Pseudo:
2329 if(
aName.isEmpty() )
2338 case SfxStyleFamily::Table:
2339 if (
aName.isEmpty())
2386 OSL_ENSURE(
m_pNumRule,
"Where is the NumRule");
2394 assert(
m_pTableFormat &&
"SwDocStyleSheet table style, SwTableAutoFormat not found");
2404 this->aName = rName;
2439 const sw::BroadcastingModify* pMod;
2443 case SfxStyleFamily::Para : pMod =
m_pColl;
break;
2445 case SfxStyleFamily::Page : pMod =
m_pDesc;
break;
2447 case SfxStyleFamily::Pseudo:
2450 case SfxStyleFamily::Table:
2454 OSL_ENSURE(
false,
"unknown style family");
2462 SfxStyleSearchBits::Used);
2474 sal_uInt16 nPoolId = 0;
2475 unsigned char nFileId = UCHAR_MAX;
2477 rFile =
"swrhlppi.hlp";
2479 const SwFormat* pTmpFormat =
nullptr;
2482 case SfxStyleFamily::Char :
2487 return USHRT_MAX ==
nId ? 0 :
nId;
2492 case SfxStyleFamily::Para:
2497 return USHRT_MAX ==
nId ? 0 :
nId;
2502 case SfxStyleFamily::Frame:
2507 return USHRT_MAX ==
nId ? 0 :
nId;
2512 case SfxStyleFamily::Page:
2517 return USHRT_MAX ==
nId ? 0 :
nId;
2525 case SfxStyleFamily::Pseudo:
2530 return USHRT_MAX ==
nId ? 0 :
nId;
2539 OSL_ENSURE(
false,
"unknown style family");
2550 if( UCHAR_MAX != nFileId )
2564 if( USHRT_MAX ==
nId )
2573 sal_uInt16 nHId =
static_cast< sal_uInt16
>(
nId);
2578 case SfxStyleFamily::Char : pTmpFormat =
m_pCharFormat;
break;
2579 case SfxStyleFamily::Para : pTmpFormat =
m_pColl;
break;
2581 case SfxStyleFamily::Page :
2586 case SfxStyleFamily::Pseudo:
2592 OSL_ENSURE(
false,
"unknown style family");
2606 , mxEEStyleSheetPool(new EEStyleSheetPool(this))
2633 OSL_ENSURE(
false ,
"Create in SW-Stylesheet-Pool not possible" );
2640 OSL_ENSURE(
false,
"Create in SW-Stylesheet-Pool not possible" );
2646 return std::make_unique<SwStyleSheetIterator>(*
this, eFam, _nMask);
2660 bool bBroadcast =
true;
2661 SwImplShellAction aTmpSh(
m_rDoc );
2665 case SfxStyleFamily::Char:
2672 case SfxStyleFamily::Para:
2679 case SfxStyleFamily::Frame:
2686 case SfxStyleFamily::Page :
2692 case SfxStyleFamily::Pseudo:
2700 case SfxStyleFamily::Table:
2707 OSL_ENSURE(
false,
"unknown style family");
2722 if( SfxStyleSearchBits::All == nSMask )
2723 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined | SfxStyleSearchBits::Used;
2725 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2726 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2727 if( nSMask == SfxStyleSearchBits::Auto )
2728 nSMask = SfxStyleSearchBits::SwHtml;
2731 const bool bSearchUsed = (
n != SfxStyleSearchBits::All &&
n & SfxStyleSearchBits::Used );
2732 const sw::BroadcastingModify* pMod =
nullptr;
2743 case SfxStyleFamily::Char:
2747 case SfxStyleFamily::Para:
2751 case SfxStyleFamily::Frame:
2755 case SfxStyleFamily::Page:
2759 case SfxStyleFamily::Pseudo:
2764 (( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2772 case SfxStyleFamily::Table:
2773 case SfxStyleFamily::Cell:
2776 OSL_ENSURE(
false,
"unknown style family");
2781 if( pMod && !bSearchUsed )
2783 const sal_uInt16
nId = SfxStyleFamily::Page == eFam
2784 ?
static_cast<const SwPageDesc*
>(pMod)->GetPoolFormatId()
2785 :
static_cast<const SwFormat*
>(pMod)->GetPoolFormatId();
2787 if( ( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2824 auto const & rEntry =
m_aLst[ nIdx ];
2825 mxStyleSheet->PresetNameAndFamily( rEntry.first, rEntry.second );
2846 bool bSearchHidden(
nMask & SfxStyleSearchBits::Hidden );
2847 bool bOnlyHidden =
nMask == SfxStyleSearchBits::Hidden;
2850 bool bAll = ( nSrchMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2856 for(
size_t i = 0;
i < nArrLen;
i++ )
2860 const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(*pFormat));
2864 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2873 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2891 ?
SwResId(STR_POOLCHR_STANDARD)
2900 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2914 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2926 if( SfxStyleSearchBits::AllVisible == ( nSMask & SfxStyleSearchBits::AllVisible ) )
2927 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined |
2928 SfxStyleSearchBits::Used;
2930 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2931 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2932 if( nSMask == SfxStyleSearchBits::Auto )
2933 nSMask = SfxStyleSearchBits::SwHtml;
2937 for(
size_t i = 0;
i < nArrLen;
i++ )
2945 if ( nSMask == SfxStyleSearchBits::Hidden && !pColl->
IsHidden( ) )
2948 if( !(bIsSearchUsed && bUsed ))
2952 if (tmpMask == SfxStyleSearchBits::UserDefined)
2956 else if (tmpMask == SfxStyleSearchBits::SwText)
2960 else if (tmpMask == SfxStyleSearchBits::SwChapter)
2964 else if (tmpMask == SfxStyleSearchBits::SwList)
2968 else if (tmpMask == SfxStyleSearchBits::SwIndex)
2972 else if (tmpMask == SfxStyleSearchBits::SwExtra)
2976 else if (tmpMask == (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined)
2977 || tmpMask == SfxStyleSearchBits::SwHtml)
2984 bool bContinue =
true;
3008 else if (tmpMask == SfxStyleSearchBits::SwCondColl)
3022 bAll = ( nSMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
3023 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwText )
3026 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwChapter )
3029 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwList )
3032 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwIndex )
3035 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwExtra )
3038 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwCondColl )
3040 if( !bIsSearchUsed ||
3046 (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwHtml ||
3048 (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined) )
3055 static sal_uInt16 aPoolIds[] = {
3073 sal_uInt16* pPoolIds = aPoolIds;
3092 for(
size_t i = 0;
i < nArrLen;
i++ )
3096 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(*pFormat));
3100 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
3106 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3132 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(rDesc));
3135 if ( ( !bSearchHidden && rDesc.
IsHidden() ) ||
3143 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rDesc.
IsHidden( ) )
3157 for(
auto const& rNum: rNumTable)
3162 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rRule.
IsHidden( ) )
3165 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rRule));
3168 if( ( !bSearchHidden && rRule.
IsHidden() ) ||
3188 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3192 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rTableStyle));
3195 if(nSrchMask == SfxStyleSearchBits::Hidden && !rTableStyle.
IsHidden())
3198 if( (!bSearchHidden && rTableStyle.
IsHidden() ) ||
3217 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3220 for(
size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
3222 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
3224 OUString sBoxFormatName;
3232 for(
size_t i = 0;
i < rCellStyles.
size(); ++
i)
3233 m_aLst.
Append( SfxStyleFamily::Cell, rCellStyles[
i].GetName() );
3251 mxIterSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3275 mxStyleSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3287 bool bTestUsed,
bool bTestHidden,
bool bOnlyHidden,
3292 for (
const auto &
i : rList)
3294 bool bHidden =
false;
3302 bHidden = pFormat && pFormat->
IsHidden( );
3309 bHidden = pFormat && pFormat->
IsHidden( );
3316 bHidden = pFormat && pFormat->
IsHidden( );
3323 bHidden = pPgDesc && pPgDesc->
IsHidden( );
3329 bUsed = pRule && rDoc.
IsUsed(*pRule);
3330 bHidden = pRule && pRule->
IsHidden( );
3334 OSL_ENSURE(
false,
"unknown PoolFormat-Id" );
3337 bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) );
3338 if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) )
3347 return aIter.
Find(rName) !=
nullptr;
3370 if( pStyleSheetHint &&
3371 SfxHintId::StyleSheetErased == pStyleSheetHint->
GetId() )
constexpr OUStringLiteral sModel
#define COND_COMMAND_COUNT
const OUString & GetValue() const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void SetEnableSetModified(bool bEnableSetModified)=0
virtual void ResetModified()=0
virtual void SetModified()=0
Must be called manually at changes of format.
virtual bool IsModified() const =0
Changes of document?
virtual bool IsEnableSetModified() const =0
virtual bool IsPoolTextCollUsed(sal_uInt16 nId) const =0
Check whether this "auto-collection" is used in document.
virtual SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)=0
Return required automatic format.
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
virtual bool IsPoolPageDescUsed(sal_uInt16 nId) const =0
virtual bool IsPoolFormatUsed(sal_uInt16 nId) const =0
virtual SwNumRule * GetNumRuleFromPool(sal_uInt16 nId)=0
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
XBitmapListRef GetBitmapList() const
XGradientListRef GetGradientList() const
XPatternListRef GetPatternList() const
XColorListRef GetColorList() const
XHatchListRef GetHatchList() const
void ForAllListeners(std::function< bool(SfxListener *)> f) const
void Broadcast(const SfxHint &rHint)
const SfxPoolItem * GetCurItem() const
sal_uInt16 GetCurPos() const
const SfxPoolItem * NextItem()
virtual bool GetPresentation(const SfxPoolItem &rItem, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
void SetParent(const SfxItemSet *pNew)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxItemSet * GetParent() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
SfxStyleSheetIterator * GetCachedIterator()
virtual void Remove(SfxStyleSheetBase *)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SfxStyleSearchBits GetMask() const
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual const OUString & GetParent() const
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual const OUString & GetFollow() const
virtual bool SetParent(const OUString &)
virtual SfxItemSet & GetItemSet()
virtual bool IsUsed() const
virtual bool SetFollow(const OUString &)
SfxStyleSheetBasePool * m_pPool
void SetMask(SfxStyleSearchBits mask)
virtual OUString GetDescription(MapUnit eMetric)
SfxStyleSheetBase * GetStyleSheet() const
virtual SfxStyleSheetBase * Find(const OUString &rStr)
SfxStyleFamily nSearchFamily
SfxStyleFamily GetSearchFamily() const
const SfxStyleSheetBasePool * pBasePool
virtual rtl::Reference< SfxStyleSheetBase > Create(const OUString &, SfxStyleFamily, SfxStyleSearchBits mask) override
SfxStyleSheet(const OUString &, const SfxStyleSheetBasePool &, SfxStyleFamily, SfxStyleSearchBits)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual bool SetParent(const OUString &) override
static bool IsCTLFontEnabled()
void SetMinDist(bool bNew)
void SetDefDist(sal_uInt16 nNew)
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
void SetTextFirstLineOffsetValue(const short nValue)
tools::Long GetRight() const
tools::Long GetTextLeft() const
SwBoxAutoFormat * GetBoxFormat(std::u16string_view sName) const
If found returns a ptr to a BoxFormat. If not found returns nullptr.
void RegisterToFormat(SwFormat &)
OUString GetStyle(sal_uInt16 nPos) const
static const CommandStruct * GetCmds()
void InsertCondition(const SwCollCondition &rCond)
SwDocStyleSheetPool(SwDoc &, bool bOrganizer)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
rtl::Reference< SfxStyleSheetPool > mxEEStyleSheetPool
virtual void Remove(SfxStyleSheetBase *pStyle) override
virtual rtl::Reference< SfxStyleSheetBase > Create(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask) override
virtual ~SwDocStyleSheetPool() override
rtl::Reference< SwDocStyleSheet > mxStyleSheet
bool m_bOrganizer
Organizer.
void InvalidateIterator()
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) override
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true) override
virtual bool IsUsed() const override
SwTextFormatColl * m_pColl
void SetPhysical(bool bPhys)
void SetLink(const OUString &rStr)
virtual std::optional< SfxItemSet > GetItemSetForPreview() override
const SwNumRule * m_pNumRule
virtual SfxItemSet & GetItemSet() override
virtual bool SetParent(const OUString &rStr) override
const SwNumRule * GetNumRule()
virtual bool SetFollow(const OUString &rStr) override
virtual sal_uLong GetHelpId(OUString &rFile) override
SAL_DLLPRIVATE void Create()
Make empty shell a real StyleSheet (Core).
void SetGrabBagItem(const css::uno::Any &rVal)
SwFrameFormat * GetFrameFormat()
SwCharFormat * m_pCharFormat
SwTableAutoFormat * m_pTableFormat
virtual bool HasParentSupport() const override
virtual void SetHelpId(const OUString &r, sal_uLong nId) override
void PresetFollow(const OUString &rName)
virtual bool HasFollowSupport() const override
void PresetParent(const OUString &rName)
SwCharFormat * GetCharFormat()
const OUString & GetLink() const
void SetItemSet(const SfxItemSet &rSet, const bool bBroadcast=true, const bool bResetIndentAttrsAtParagraphStyle=false)
add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value false, which indicates that...
SwFrameFormat * m_pFrameFormat
virtual bool IsHidden() const override
void PresetNameAndFamily(SfxStyleFamily eFamily, const OUString &rName)
virtual const OUString & GetParent() const override
SAL_DLLPRIVATE bool FillStyleSheet(FillStyleType eFType, std::optional< SfxItemSet > *o_ppFlatSet=nullptr)
virtual OUString GetDescription(MapUnit eUnit) override
void SetNumRule(const SwNumRule &rRule)
void GetGrabBagItem(css::uno::Any &rVal) const
virtual void SetHidden(bool bHidden) override
const SwPageDesc * m_pDesc
SwDocStyleSheet(SwDoc &rDoc, SwDocStyleSheetPool &rPool)
SwTextFormatColl * GetCollection()
const SwBoxAutoFormat * m_pBoxFormat
virtual ~SwDocStyleSheet() override
virtual OUString GetUsedBy() override
SwTableAutoFormat * GetTableFormat()
FillStyleType
Fill StyleSheet with data.
virtual const OUString & GetFollow() const override
void MergeIndentAttrsOfListStyle(SfxItemSet &rSet)
new method for paragraph styles to merge indent attributes of applied list style into the given item ...
const SwPageDesc * GetPageDesc()
virtual bool HasClearParentSupport() const override
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId,...
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
const OUString * GetDocPattern(size_t nPos) const
SwConditionTextFormatColl * MakeCondTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
size_t SetDocPattern(const OUString &rPatternName)
void DelCharFormat(size_t nFormat, bool bBroadcast=false)
Delete the formats.
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
IDocumentState const & getIDocumentState() const
const SwCharFormat * GetDfltCharFormat() const
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
void ChgFormat(SwFormat &rFormat, const SfxItemSet &rSet)
void PreDelPageDesc(SwPageDesc const *pDel)
All descriptors whose Follow point to the to-be-deleted have to be adapted.
bool IsUsed(const sw::BroadcastingModify &) const
void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet &rSet)
const SwCellStyleTable & GetCellStyles() const
SwNumRule * FindNumRulePtr(const OUString &rName) const
size_t GetPageDescCnt() const
const SwNumRuleTable & GetNumRuleTable() const
void RenameFormat(SwFormat &rFormat, const OUString &sNewName, bool bBroadcast=false)
const sw::FrameFormats< SwFrameFormat * > * GetFrameFormats() const
SwCharFormat * FindCharFormatByName(const OUString &rName) const
const SwCharFormats * GetCharFormats() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
void ResetAttrAtFormat(const std::vector< sal_uInt16 > &rIds, SwFormat &rChangedFormat)
SwEditShell const * GetEditShell() const
bool RenameNumRule(const OUString &aOldName, const OUString &aNewName, bool bBroadcast=false)
void ChgNumRuleFormats(const SwNumRule &rRule)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const SwTextFormatColls * GetTextFormatColls() const
std::unique_ptr< SwTableAutoFormat > DelTableStyle(const OUString &rName, bool bBroadcast=false)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
void DelTextFormatColl(size_t nFormat, bool bBroadcast=false)
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
bool DelNumRule(const OUString &rName, bool bBroadCast=false)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
const SwFrameFormat * GetDfltFrameFormat() const
void DelPageDesc(const OUString &rName, bool bBroadcast=false)
SwTableAutoFormatTable & GetTableStyles()
Return the available table styles.
const SwPageDesc & GetPageDesc(const size_t i) const
bool HasTableStyles() const
Counts table styles without triggering lazy-load of them.
IDocumentListsAccess const & getIDocumentListsAccess() const
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
SwFrameFormat * FindFrameFormatByName(const OUString &rName) const
SwTableAutoFormat * MakeTableStyle(const OUString &rName, bool bBroadcast=false)
void StartAllAction()
For all views of this document.
void SetAutoRule(bool bFlag)
sal_uInt8 GetPoolHlpFileId() const
void SetSvxRule(const SvxNumRule &, SwDoc *pDoc)
void SetHidden(bool bValue)
void SetName(const OUString &rNm, IDocumentListsAccess &rDocListAccess)
const SwNumFormat & Get(sal_uInt16 i) const
const OUString & GetName() const
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat IDs.
SvxNumRule MakeSvxNumRule() const
void GetGrabBagItem(css::uno::Any &rVal) const
void SetGrabBagItem(const css::uno::Any &rVal)
OUString MakeParagraphStyleListString() const
sal_uInt16 GetPoolHelpId() const
Query and set Help-IDs for document styles.
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
sal_uInt16 GetPoolHelpId() const
const OUString & GetName() const
void SetFollow(const SwPageDesc *pNew)
sal_uInt8 GetPoolHlpFileId() const
bool SetName(const OUString &rNewName)
const SwPageDesc * GetFollow() const
void SetHidden(bool const bValue)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetChrFormatUINameArray()
static const std::vector< OUString > & GetExtraUINameArray()
static const std::vector< OUString > & GetHTMLUINameArray()
static const std::vector< OUString > & GetListsUINameArray()
static const std::vector< OUString > & GetPageDescUINameArray()
static const std::vector< OUString > & GetNumRuleUINameArray()
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetHTMLChrFormatUINameArray()
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetFrameFormatUINameArray()
static const std::vector< OUString > & GetTextUINameArray()
static const std::vector< OUString > & GetRegisterUINameArray()
static const std::vector< OUString > & GetDocUINameArray()
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
virtual SfxStyleSheetBase * Find(const OUString &rStr) override
rtl::Reference< SwDocStyleSheet > mxIterSheet
virtual SfxStyleSheetBase * First() override
SwStyleSheetIterator(SwDocStyleSheetPool &rBase, SfxStyleFamily eFam, SfxStyleSearchBits n)
bool IsUsedInComments(const OUString &rName) const
void InvalidateIterator()
rtl::Reference< SwDocStyleSheet > mxStyleSheet
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
virtual ~SwStyleSheetIterator() override
virtual SfxStyleSheetBase * operator[](sal_Int32 nIdx) override
virtual sal_Int32 Count() override
void AppendStyleList(const std::vector< OUString > &rLst, bool bUsed, bool bTestHidden, bool bOnlyHidden, SwGetPoolIdFromName nSection, SfxStyleFamily eFamily)
virtual SfxStyleSheetBase * Next() override
Represents the style of a paragraph.
void SetLinkedCharFormat(SwCharFormat *pLink)
bool IsAssignedToListLevelOfOutlineStyle() const
void DeleteAssignmentToListLevelOfOutlineStyle()
SwTextFormatColl & GetNextTextFormatColl() const
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
void SetNextTextFormatColl(SwTextFormatColl &rNext)
Inline implementations.
::sw::ListLevelIndents AreListLevelIndentsApplicable() const
int GetAssignedOutlineStyleLevel() const
const SwCharFormat * GetLinkedCharFormat() const
void push_back(Value const &rVal)
Used by the UI to modify the document model.
#define FN_KEEP_ASPECT_RATIO
#define FN_PARAM_FTN_INFO
static SwTableAutoFormat * lcl_FindTableStyle(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static SwTextFormatColl * lcl_FindParaFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static SwCharFormat * lcl_FindCharFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static const SwBoxAutoFormat * lcl_FindCellStyle(SwDoc &rDoc, std::u16string_view rName, SwDocStyleSheet *pStyle)
static bool lcl_Contains(const std::vector< void * > &rArr, const void *p)
static const SwPageDesc * lcl_FindPageDesc(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static SwFrameFormat * lcl_FindFrameFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static void lcl_SaveStyles(SfxStyleFamily nFamily, std::vector< void * > &rArr, SwDoc &rDoc)
static const SwNumRule * lcl_FindNumRule(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
static void lcl_SwFormatToFlatItemSet(SwFormat const *const pFormat, std::optional< SfxItemSet > &pRet)
static void lcl_DeleteInfoStyles(SfxStyleFamily nFamily, std::vector< void * > const &rArr, SwDoc &rDoc)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_BKGCOLOR(EE_CHAR_START+32)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr sal_uInt16 RES_UNKNOWNATR_END(160)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
ContentProvider * m_pOwner
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...
const sal_uInt16 COLL_DOC_BITS
@ RES_POOLCOLL_HEADLINE5
Heading 5.
@ RES_POOLCOLL_TEXT
Text body.
@ RES_POOLCOLL_STANDARD
Standard.
@ RES_POOLCOLL_HEADLINE6
Heading 6.
@ RES_POOLCOLL_TEXT_BEGIN
@ RES_POOLCOLL_TABLE
Subgroup table.
@ RES_POOLCOLL_HEADLINE_BASE
Subgroup headings.
@ RES_POOLCOLL_SEND_ADDRESS
Sender.
@ RES_POOLCOLL_HEADLINE2
Heading 2.
@ RES_POOLCOLL_HEADLINE4
Heading 4.
@ RES_POOLCOLL_FOOTNOTE
Footnotes.
@ RES_POOLCOLL_HEADLINE1
Heading 1.
@ RES_POOLCOLL_TABLE_HDLN
Table of Contents - heading.
@ RES_POOLCOLL_HEADLINE3
Heading 3.
@ RES_POOLCOLL_ENDNOTE
Endnotes.
@ RES_POOLCHR_INET_VISIT
Internet visited.
@ RES_POOLCHR_FOOTNOTE
Footnote.
@ RES_POOLCHR_ENDNOTE
Endnote.
@ RES_POOLCHR_INET_NORMAL
Internet normal.
@ RES_POOLCHR_HTML_BEGIN
HTML-styles.
const sal_uInt16 POOLGRP_NOCOLLID
POOLCOLL-IDs: +-—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ !User! Range ! 0 ! Offset ! +-—+—+—+—+—+—+—+—+—+—+—+...
const sal_uInt16 COLL_GET_RANGE_BITS
const sal_uInt16 COLL_REGISTER_BITS
const sal_uInt16 COLL_TEXT_BITS
const sal_uInt16 USER_FMT
POLLCOLL-groups:
bool IsPoolUserFormat(sal_uInt16 nId)
const sal_uInt16 COLL_HTML_BITS
const sal_uInt16 COLL_LISTS_BITS
const sal_uInt16 COLL_EXTRA_BITS
bool IsInvalidItem(const SfxPoolItem *pItem)
OUString SwResId(TranslateId aId)
constexpr SwTwips MIN_BORDER_DIST
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)