23#include <osl/diagnose.h>
28#include <rtl/ustrbuf.hxx>
80class 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;
93SwImplShellAction::SwImplShellAction(
SwDoc& rDoc )
95 if( rDoc.GetDocShell() )
96 m_pSh = rDoc.GetDocShell()->GetWrtShell();
102 m_pCurrSh.reset(
new CurrShell( m_pSh ) );
107SwImplShellAction::~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);
146 if(
p && !
p->IsDefault() )
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 );
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:
517 case SfxStyleFamily::Char:
522 case SfxStyleFamily::Para:
527 case SfxStyleFamily::Pseudo:
548 case SfxStyleFamily::Char:
557 case SfxStyleFamily::Para:
566 case SfxStyleFamily::Frame:
575 case SfxStyleFamily::Page:
586 case SfxStyleFamily::Pseudo:
597 case SfxStyleFamily::Table:
600 if ( pTableAutoFormat )
629 case SfxStyleFamily::Char:
631 bRet = pFormat && pFormat->
IsHidden( );
634 case SfxStyleFamily::Para:
636 bRet = pFormat && pFormat->
IsHidden( );
639 case SfxStyleFamily::Frame:
641 bRet = pFormat && pFormat->
IsHidden( );
644 case SfxStyleFamily::Page:
647 bRet = pPgDesc && pPgDesc->
IsHidden( );
650 case SfxStyleFamily::Pseudo:
656 case SfxStyleFamily::Table:
659 bRet = pTableAutoFormat && pTableAutoFormat->
IsHidden( );
678 case SfxStyleFamily::Char:
683 case SfxStyleFamily::Para:
688 case SfxStyleFamily::Frame:
693 case SfxStyleFamily::Page:
694 case SfxStyleFamily::Pseudo:
697 static const OUString
sEmpty;
707 if(
i && USHRT_MAX !=
i )
713 if(
p && !
p->IsDefault() )
735 SwImplShellAction aTmpSh(
m_rDoc);
738 case SfxStyleFamily::Para:
750 case SfxStyleFamily::Char:
783 case SfxStyleFamily::Para :
784 case SfxStyleFamily::Page :
return true;
785 case SfxStyleFamily::Frame:
786 case SfxStyleFamily::Char :
787 case SfxStyleFamily::Pseudo:
return false;
789 OSL_ENSURE(
false,
"unknown style family");
800 case SfxStyleFamily::Char :
801 case SfxStyleFamily::Para :
802 case SfxStyleFamily::Frame: bRet =
true;
814 case SfxStyleFamily::Para :
815 case SfxStyleFamily::Char :
816 case SfxStyleFamily::Frame: bRet =
true;
828 static const OUStringLiteral sPlus(
u" + ");
829 if ( SfxStyleFamily::Page ==
nFamily )
835 OUStringBuffer aDesc;
841 switch ( pItem->Which() )
844 case SID_ATTR_PAGE_SIZE:
845 case SID_ATTR_PAGE_MAXSIZE:
846 case SID_ATTR_PAGE_PAPERBIN:
847 case SID_ATTR_BORDER_INNER:
851 OUString aItemPresentation;
854 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
856 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
858 aDesc.append(aItemPresentation);
864 return aDesc.makeStringAndClear();
867 if ( SfxStyleFamily::Frame ==
nFamily || SfxStyleFamily::Para ==
nFamily || SfxStyleFamily::Char ==
nFamily )
873 OUStringBuffer aDesc;
877 bool bHasWesternFontPrefix =
false;
878 bool bHasCJKFontPrefix =
false;
879 bool bHasCTLFontPrefix =
false;
891 switch ( pItem->Which() )
893 case SID_ATTR_AUTO_STYLE_UPDATE:
898 OUString aItemPresentation;
901 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
903 bool bIsDefault =
false;
904 switch ( pItem->Which() )
909 bIsDefault = (drawing::FillStyle_SOLID == eFillStyle);
915 bIsDefault = (drawing::FillStyle_GRADIENT == eFillStyle);
921 bIsDefault = (drawing::FillStyle_HATCH == eFillStyle);
927 bIsDefault = (drawing::FillStyle_BITMAP == eFillStyle);
933 bIsDefault = !bUseFloatTransparence;
939 bIsDefault = bUseFloatTransparence;
943 case SID_ATTR_PARA_PAGENUM:
944 sPageNum = aItemPresentation;
946 case SID_ATTR_PARA_MODEL:
947 sModel = aItemPresentation;
950 sBreak = aItemPresentation;
959 if(!bHasCJKFontPrefix)
961 aItemPresentation =
SwResId(STR_CJK_FONT) + aItemPresentation;
962 bHasCJKFontPrefix =
true;
972 if(!bHasCTLFontPrefix)
974 aItemPresentation =
SwResId(STR_CTL_FONT) + aItemPresentation;
975 bHasCTLFontPrefix =
true;
983 if(!bHasWesternFontPrefix)
985 aItemPresentation =
SwResId(STR_WESTERN_FONT) + aItemPresentation;
986 bHasWesternFontPrefix =
true;
994 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
996 aDesc.append(aItemPresentation);
1006 if (!aDesc.isEmpty())
1007 aDesc.append(sPlus);
1009 if (sPageNum !=
"0")
1011 aDesc.append(sPlus +
SwResId(STR_PAGEOFFSET) + sPageNum);
1014 else if (!sBreak.isEmpty())
1016 if (!aDesc.isEmpty())
1017 aDesc.append(sPlus);
1018 aDesc.append(sBreak);
1020 return aDesc.makeStringAndClear();
1023 if( SfxStyleFamily::Pseudo ==
nFamily )
1034 if( rStr.isEmpty() )
1048 case SfxStyleFamily::Char :
1062 case SfxStyleFamily::Para :
1064 OSL_ENSURE(
m_pColl,
"Collection missing!");
1076 case SfxStyleFamily::Frame:
1090 case SfxStyleFamily::Page :
1091 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1098 const OUString aOldName(aPageDesc.
GetName());
1111 case SfxStyleFamily::Pseudo:
1118 if (!aOldName.isEmpty())
1120 if ( aOldName != rStr &&
1142 OSL_ENSURE(
false,
"unknown style family");
1158 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
1161 case SfxStyleFamily::Char :
1163 if(
nullptr != ( pFormat =
m_pCharFormat ) && !rStr.isEmpty() )
1167 case SfxStyleFamily::Para :
1168 OSL_ENSURE(
m_pColl,
"Collection missing!");
1169 if(
nullptr != ( pFormat =
m_pColl ) && !rStr.isEmpty() )
1173 case SfxStyleFamily::Frame:
1179 case SfxStyleFamily::Page:
1180 case SfxStyleFamily::Pseudo:
1183 OSL_ENSURE(
false,
"unknown style family");
1191 SwImplShellAction aTmp(
m_rDoc );
1212 SwImplShellAction aTmpSh(
m_rDoc );
1215 case SfxStyleFamily::Para :
1217 OSL_ENSURE(
m_pColl,
"Collection missing!");
1228 case SfxStyleFamily::Page :
1230 OSL_ENSURE(
m_pDesc,
"PageDesc missing!");
1233 const SwPageDesc* pFollowDesc = !rStr.isEmpty()
1247 case SfxStyleFamily::Char:
1248 case SfxStyleFamily::Frame:
1249 case SfxStyleFamily::Pseudo:
1252 OSL_ENSURE(
false,
"unknown style family");
1263 std::vector<SfxItemSet const*> sets;
1267 sets.push_back(pParent);
1270 pRet.emplace(*sets.back());
1272 for (
auto iter = sets.rbegin(); iter != sets.rend(); ++iter)
1280 if (SfxStyleFamily::Page ==
nFamily || SfxStyleFamily::Pseudo ==
nFamily || SfxStyleFamily::Table ==
nFamily)
1282 SAL_WARN(
"sw.ui",
"GetItemSetForPreview not implemented for page or number or table style");
1283 return std::optional<SfxItemSet>();
1291 std::optional<SfxItemSet> pRet;
1305 std::optional<SfxItemSet> pRet;
1308 case SfxStyleFamily::Char:
1311 case SfxStyleFamily::Para:
1314 case SfxStyleFamily::Frame:
1333 case SfxStyleFamily::Char:
1334 case SfxStyleFamily::Para:
1335 case SfxStyleFamily::Frame:
1343 aBoxInfo.
SetValid( SvxBoxInfoItemValidFlags::DISABLE );
1345 if(
nFamily == SfxStyleFamily::Char )
1354 else if (
nFamily == SfxStyleFamily::Para )
1356 OSL_ENSURE(
m_pColl,
"Where's Collection");
1387 case SfxStyleFamily::Page :
1395 OSL_ENSURE(
m_pDesc,
"No PageDescriptor");
1400 case SfxStyleFamily::Pseudo:
1409 OSL_ENSURE(
false,
"unknown style family");
1419 if (
nFamily != SfxStyleFamily::Para )
1424 OSL_ENSURE(
m_pColl,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
1430 "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect." );
1432 if (sNumRule.isEmpty())
1441 if (indents & ::sw::ListLevelIndents::FirstLine)
1457 const bool bResetIndentAttrsAtParagraphStyle )
1463 SwImplShellAction aTmpSh(
m_rDoc );
1465 OSL_ENSURE( &
rSet != &
m_aCoreSet,
"SetItemSet with own Set is not allowed" );
1475 std::unique_ptr<SwPageDesc> pNewDsc;
1476 size_t nPgDscPos = 0;
1480 case SfxStyleFamily::Char :
1487 case SfxStyleFamily::Para :
1489 OSL_ENSURE(
m_pColl,
"Where's Collection");
1504 const OUString sStyle = pCondItem->
GetStyle(
i );
1505 if (sStyle.isEmpty())
1517 else if( pCondItem && !
m_pColl->HasWriterListeners() )
1534 const OUString sStyle = pCondItem->
GetStyle(
i );
1535 if (sStyle.isEmpty())
1541 pCmds[
i ].nCnd, pCmds[
i ].nSubCond ) );
1548 if ( bResetIndentAttrsAtParagraphStyle &&
1555 if ( bResetIndentAttrsAtParagraphStyle &&
1570 if (!sNumRule.isEmpty())
1576 if( USHRT_MAX != nPoolId )
1590 case SfxStyleSearchBits::SwText:
1593 case SfxStyleSearchBits::SwChapter:
1596 case SfxStyleSearchBits::SwList:
1599 case SfxStyleSearchBits::SwIndex:
1602 case SfxStyleSearchBits::SwExtra:
1605 case SfxStyleSearchBits::SwHtml:
1613 case SfxStyleFamily::Frame:
1625 case SfxStyleFamily::Page :
1627 OSL_ENSURE(
m_pDesc,
"Where's PageDescriptor");
1637 pFormat = &pNewDsc->GetMaster();
1642 case SfxStyleFamily::Pseudo:
1652 case SfxItemState::SET:
1661 case SfxItemState::DONTCARE:
1677 OSL_ENSURE(
false,
"unknown style family");
1699 if(SfxStyleFamily::Frame ==
nFamily)
1740 case SfxStyleFamily::Char:
1743 for(
auto const& rChar: rTable)
1745 rArr.push_back(rChar);
1749 case SfxStyleFamily::Para:
1752 for(
auto const& rPara : rTable)
1758 case SfxStyleFamily::Frame:
1761 for(
auto const& rFrame: rTable)
1768 case SfxStyleFamily::Page:
1777 case SfxStyleFamily::Pseudo:
1780 for(
auto const& rPseudo: rTable)
1792 return std::find( rArr.begin(), rArr.end(),
p ) != rArr.end();
1800 case SfxStyleFamily::Char:
1802 std::deque<sal_uInt16> aDelArr;
1804 for(
n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1807 aDelArr.push_front(
n );
1809 for(
auto const& rDelArr: aDelArr)
1814 case SfxStyleFamily::Para :
1816 std::deque<sal_uInt16> aDelArr;
1818 for(
n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1821 aDelArr.push_front(
n );
1823 for(
auto const& rDelArr: aDelArr)
1828 case SfxStyleFamily::Frame:
1830 std::deque<SwFrameFormat*> aDelArr;
1832 for(
auto const& rFrame: rTable )
1835 aDelArr.push_front( rFrame );
1837 for(
auto const& rDelArr: aDelArr)
1842 case SfxStyleFamily::Page:
1844 std::deque<size_t> aDelArr;
1848 aDelArr.push_front(
n );
1850 for(
auto const& rDelArr: aDelArr )
1855 case SfxStyleFamily::Pseudo:
1857 std::deque<SwNumRule*> aDelArr;
1859 for(
auto const& rPseudo: rTable)
1862 aDelArr.push_front( rPseudo );
1864 for(
auto const& rDelArr: aDelArr)
1874 FillStyleType const eFType, std::optional<SfxItemSet> *
const o_ppFlatSet)
1877 sal_uInt16 nPoolId = USHRT_MAX;
1881 bool bDeleteInfo =
false;
1883 std::vector<void*> aDelArr;
1888 case SfxStyleFamily::Char:
1903 if( !bCreate && !pFormat )
1926 case SfxStyleFamily::Para:
1952 bRet =
nullptr !=
m_pColl || USHRT_MAX != nPoolId;
1959 case SfxStyleFamily::Frame:
1970 if( !bCreate && !pFormat )
1979 case SfxStyleFamily::Page:
1982 if( bFillOnlyInfo && !
m_pDesc )
2003 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2005 bRet =
nullptr !=
m_pDesc || USHRT_MAX != nPoolId;
2010 case SfxStyleFamily::Pseudo:
2034 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2036 bRet =
nullptr !=
m_pNumRule || USHRT_MAX != nPoolId;
2042 case SfxStyleFamily::Table:
2048 case SfxStyleFamily::Cell:
2055 if( SfxStyleFamily::Char ==
nFamily ||
2056 SfxStyleFamily::Para ==
nFamily ||
2057 SfxStyleFamily::Frame ==
nFamily )
2064 _nMask |= SfxStyleSearchBits::ReadOnly;
2066 _nMask |= SfxStyleSearchBits::UserDefined;
2070 case COLL_TEXT_BITS: _nMask |= SfxStyleSearchBits::SwText;
break;
2071 case COLL_DOC_BITS : _nMask |= SfxStyleSearchBits::SwChapter;
break;
2075 case COLL_HTML_BITS: _nMask |= SfxStyleSearchBits::SwHtml;
break;
2091 _nMask |= SfxStyleSearchBits::SwCondColl;
2095 assert(o_ppFlatSet);
2102 if( bDeleteInfo && bFillOnlyInfo )
2119 case SfxStyleFamily::Char :
2127 case SfxStyleFamily::Para :
2132 if(
nMask & SfxStyleSearchBits::SwCondColl )
2139 case SfxStyleFamily::Frame:
2146 case SfxStyleFamily::Page :
2154 case SfxStyleFamily::Pseudo:
2164 if(
aName.isEmpty() )
2173 case SfxStyleFamily::Table:
2174 if (
aName.isEmpty())
2221 OSL_ENSURE(
m_pNumRule,
"Where is the NumRule");
2229 assert(
m_pTableFormat &&
"SwDocStyleSheet table style, SwTableAutoFormat not found");
2239 this->
aName = rName;
2274 const sw::BroadcastingModify* pMod;
2278 case SfxStyleFamily::Para : pMod =
m_pColl;
break;
2280 case SfxStyleFamily::Page : pMod =
m_pDesc;
break;
2282 case SfxStyleFamily::Pseudo:
2285 case SfxStyleFamily::Table:
2289 OSL_ENSURE(
false,
"unknown style family");
2303 sal_uInt16 nPoolId = 0;
2304 unsigned char nFileId = UCHAR_MAX;
2306 rFile =
"swrhlppi.hlp";
2308 const SwFormat* pTmpFormat =
nullptr;
2311 case SfxStyleFamily::Char :
2316 return USHRT_MAX ==
nId ? 0 :
nId;
2321 case SfxStyleFamily::Para:
2326 return USHRT_MAX ==
nId ? 0 :
nId;
2331 case SfxStyleFamily::Frame:
2336 return USHRT_MAX ==
nId ? 0 :
nId;
2341 case SfxStyleFamily::Page:
2346 return USHRT_MAX ==
nId ? 0 :
nId;
2354 case SfxStyleFamily::Pseudo:
2359 return USHRT_MAX ==
nId ? 0 :
nId;
2368 OSL_ENSURE(
false,
"unknown style family");
2379 if( UCHAR_MAX != nFileId )
2393 if( USHRT_MAX ==
nId )
2402 sal_uInt16 nHId =
static_cast< sal_uInt16
>(
nId);
2407 case SfxStyleFamily::Char : pTmpFormat =
m_pCharFormat;
break;
2408 case SfxStyleFamily::Para : pTmpFormat =
m_pColl;
break;
2410 case SfxStyleFamily::Page :
2415 case SfxStyleFamily::Pseudo:
2421 OSL_ENSURE(
false,
"unknown style family");
2461 OSL_ENSURE(
false ,
"Create in SW-Stylesheet-Pool not possible" );
2468 OSL_ENSURE(
false,
"Create in SW-Stylesheet-Pool not possible" );
2474 return std::make_unique<SwStyleSheetIterator>(*
this, eFam, _nMask);
2487 bool bBroadcast =
true;
2488 SwImplShellAction aTmpSh(
m_rDoc );
2492 case SfxStyleFamily::Char:
2499 case SfxStyleFamily::Para:
2506 case SfxStyleFamily::Frame:
2513 case SfxStyleFamily::Page :
2519 case SfxStyleFamily::Pseudo:
2527 case SfxStyleFamily::Table:
2534 OSL_ENSURE(
false,
"unknown style family");
2543 const OUString &rStyle,
const OUString &rParent )
2545 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
2548 case SfxStyleFamily::Char :
2553 case SfxStyleFamily::Para :
2558 case SfxStyleFamily::Frame:
2563 case SfxStyleFamily::Page:
2564 case SfxStyleFamily::Pseudo:
2568 OSL_ENSURE(
false,
"unknown style family");
2576 SwImplShellAction aTmpSh(
m_rDoc );
2585 if( SfxStyleFamily::Para == eFam )
2587 GetNextTextFormatColl().
GetName() );
2605 if( SfxStyleSearchBits::All == nSMask )
2606 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined | SfxStyleSearchBits::Used;
2608 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2609 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2610 if( nSMask == SfxStyleSearchBits::Auto )
2611 nSMask = SfxStyleSearchBits::SwHtml;
2614 const bool bSearchUsed = (
n != SfxStyleSearchBits::All &&
n & SfxStyleSearchBits::Used );
2615 const sw::BroadcastingModify* pMod =
nullptr;
2626 case SfxStyleFamily::Char:
2630 case SfxStyleFamily::Para:
2634 case SfxStyleFamily::Frame:
2638 case SfxStyleFamily::Page:
2642 case SfxStyleFamily::Pseudo:
2647 (( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2655 case SfxStyleFamily::Table:
2656 case SfxStyleFamily::Cell:
2659 OSL_ENSURE(
false,
"unknown style family");
2664 if( pMod && !bSearchUsed )
2666 const sal_uInt16
nId = SfxStyleFamily::Page == eFam
2667 ?
static_cast<const SwPageDesc*
>(pMod)->GetPoolFormatId()
2668 :
static_cast<const SwFormat*
>(pMod)->GetPoolFormatId();
2670 if( ( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2707 auto const & rEntry =
m_aLst[ nIdx ];
2708 mxStyleSheet->PresetNameAndFamily( rEntry.first, rEntry.second );
2729 bool bSearchHidden(
nMask & SfxStyleSearchBits::Hidden );
2730 bool bOnlyHidden =
nMask == SfxStyleSearchBits::Hidden;
2733 bool bAll = ( nSrchMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2739 for(
size_t i = 0;
i < nArrLen;
i++ )
2743 const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(*pFormat));
2747 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2756 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2774 ?
SwResId(STR_POOLCHR_STANDARD)
2783 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2797 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2809 if( SfxStyleSearchBits::AllVisible == ( nSMask & SfxStyleSearchBits::AllVisible ) )
2810 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined |
2811 SfxStyleSearchBits::Used;
2813 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2814 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2815 if( nSMask == SfxStyleSearchBits::Auto )
2816 nSMask = SfxStyleSearchBits::SwHtml;
2820 for(
size_t i = 0;
i < nArrLen;
i++ )
2824 const bool bUsed = bOrganizer || rDoc.
IsUsed(*pColl);
2828 if ( nSMask == SfxStyleSearchBits::Hidden && !pColl->
IsHidden( ) )
2831 if( !(bIsSearchUsed && bUsed ))
2835 if (tmpMask == SfxStyleSearchBits::UserDefined)
2839 else if (tmpMask == SfxStyleSearchBits::SwText)
2843 else if (tmpMask == SfxStyleSearchBits::SwChapter)
2847 else if (tmpMask == SfxStyleSearchBits::SwList)
2851 else if (tmpMask == SfxStyleSearchBits::SwIndex)
2855 else if (tmpMask == SfxStyleSearchBits::SwExtra)
2859 else if (tmpMask == (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined)
2860 || tmpMask == SfxStyleSearchBits::SwHtml)
2867 bool bContinue =
true;
2891 else if (tmpMask == SfxStyleSearchBits::SwCondColl)
2905 bAll = ( nSMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2906 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwText )
2909 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwChapter )
2912 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwList )
2915 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwIndex )
2918 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwExtra )
2921 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwCondColl )
2923 if( !bIsSearchUsed ||
2929 (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwHtml ||
2931 (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined) )
2938 static sal_uInt16 aPoolIds[] = {
2956 sal_uInt16* pPoolIds = aPoolIds;
2975 for(
size_t i = 0;
i < nArrLen;
i++ )
2979 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(*pFormat));
2983 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2989 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3015 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(rDesc));
3018 if ( ( !bSearchHidden && rDesc.
IsHidden() ) ||
3026 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rDesc.
IsHidden( ) )
3040 for(
auto const& rNum: rNumTable)
3045 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rRule.
IsHidden( ) )
3048 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rRule));
3051 if( ( !bSearchHidden && rRule.
IsHidden() ) ||
3071 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3075 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rTableStyle));
3078 if(nSrchMask == SfxStyleSearchBits::Hidden && !rTableStyle.
IsHidden())
3081 if( (!bSearchHidden && rTableStyle.
IsHidden() ) ||
3100 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3103 for(
size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
3105 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
3107 OUString sBoxFormatName;
3115 for(
size_t i = 0;
i < rCellStyles.
size(); ++
i)
3116 m_aLst.
Append( SfxStyleFamily::Cell, rCellStyles[
i].GetName() );
3134 mxIterSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3158 mxStyleSheet->PresetNameAndFamily(rEntry.first, rEntry.second);
3170 bool bTestUsed,
bool bTestHidden,
bool bOnlyHidden,
3175 for (
const auto &
i : rList)
3177 bool bHidden =
false;
3185 bHidden = pFormat && pFormat->
IsHidden( );
3192 bHidden = pFormat && pFormat->
IsHidden( );
3199 bHidden = pFormat && pFormat->
IsHidden( );
3206 bHidden = pPgDesc && pPgDesc->
IsHidden( );
3212 bUsed = pRule && rDoc.
IsUsed(*pRule);
3213 bHidden = pRule && pRule->
IsHidden( );
3217 OSL_ENSURE(
false,
"unknown PoolFormat-Id" );
3220 bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) );
3221 if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) )
3246 if( pStyleSheetHint &&
3247 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 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()
SfxStyleSearchBits GetMask() const
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual bool SetFollow(const OUString &)
SfxStyleSheetBasePool * m_pPool
void SetMask(SfxStyleSearchBits mask)
virtual OUString GetDescription(MapUnit eMetric)
SfxStyleSheetBase * GetStyleSheet() const
SfxStyleFamily nSearchFamily
const SfxStyleSheetBasePool * pBasePool
bool IsCTLFontEnabled() const
void SetMinDist(bool bNew)
void SetDefDist(sal_uInt16 nNew)
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
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 * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) const override
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
virtual bool SetParent(SfxStyleFamily eFam, const OUString &rStyle, const OUString &rParent) override
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 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
void SetItemSet(const SfxItemSet &rSet, const bool bResetIndentAttrsAtParagraphStyle=false)
add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value false, which indicates that...
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
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)
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)
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 &)
const SwFrameFormats * GetFrameFormats() const
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)
void ResetAttrAtFormat(const sal_uInt16 nWhichId, SwFormat &rChangedFormat)
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)
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
virtual OUString GetName() const override
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< 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< 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< 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()
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)