23#include <osl/thread.h>
66#include <com/sun/star/text/XTextSectionsSupplier.hpp>
67#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
68#include <com/sun/star/text/XTextTablesSupplier.hpp>
69#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
70#include <com/sun/star/text/XDocumentIndex.hpp>
71#include <com/sun/star/text/XBookmarksSupplier.hpp>
72#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
73#include <com/sun/star/text/XTextFramesSupplier.hpp>
74#include <com/sun/star/ui/XSidebarProvider.hpp>
75#include <com/sun/star/ui/XDecks.hpp>
76#include <com/sun/star/ui/XDeck.hpp>
77#include <com/sun/star/ui/XPanels.hpp>
78#include <com/sun/star/ui/XPanel.hpp>
90#include <bitmaps.hlst>
138const sal_uInt32 TOGGLE_OUTLINE_CONTENT_VISIBILITY = 1512;
139const sal_uInt32 HIDE_OUTLINE_CONTENT_VISIBILITY = 1513;
140const sal_uInt32 SHOW_OUTLINE_CONTENT_VISIBILITY = 1514;
142constexpr char NAVI_BOOKMARK_DELIM =
'\x01';
147 :
public o3tl::sorted_vector<std::unique_ptr<SwContent>, o3tl::less_uniqueptr_to<SwContent>,
148 o3tl::find_partialorder_ptrequals>
154 std::map<OUString, std::map<void*, bool>> lcl_DocOutLineExpandStateMap;
158 return weld::fromId<const SwTypeNumber*>(rTreeView.
get_id(rEntry))->GetTypeId() ==
CTYPE_CNT;
163 return weld::fromId<const SwTypeNumber*>(rTreeView.
get_id(rEntry))->GetTypeId() ==
CTYPE_CTT;
168 return weld::fromId<const SwOutlineContent*>(rTreeView.
get_id(rEntry))->GetOutlineLevel() < nLevel;
187 bool lcl_IsUiVisibleBookmark(const ::sw::mark::IMark* pMark)
248 STR_CONTENT_TYPE_OUTLINE,
249 STR_CONTENT_TYPE_TABLE,
250 STR_CONTENT_TYPE_FRAME,
251 STR_CONTENT_TYPE_GRAPHIC,
252 STR_CONTENT_TYPE_OLE,
253 STR_CONTENT_TYPE_BOOKMARK,
254 STR_CONTENT_TYPE_REGION,
255 STR_CONTENT_TYPE_URLFIELD,
256 STR_CONTENT_TYPE_REFERENCE,
257 STR_CONTENT_TYPE_INDEX,
258 STR_CONTENT_TYPE_POSTIT,
259 STR_CONTENT_TYPE_DRAWOBJECT,
260 STR_CONTENT_TYPE_TEXTFIELD,
261 STR_CONTENT_TYPE_FOOTNOTE,
262 STR_CONTENT_TYPE_ENDNOTE
267 STR_CONTENT_TYPE_SINGLE_OUTLINE,
268 STR_CONTENT_TYPE_SINGLE_TABLE,
269 STR_CONTENT_TYPE_SINGLE_FRAME,
270 STR_CONTENT_TYPE_SINGLE_GRAPHIC,
271 STR_CONTENT_TYPE_SINGLE_OLE,
272 STR_CONTENT_TYPE_SINGLE_BOOKMARK,
273 STR_CONTENT_TYPE_SINGLE_REGION,
274 STR_CONTENT_TYPE_SINGLE_URLFIELD,
275 STR_CONTENT_TYPE_SINGLE_REFERENCE,
276 STR_CONTENT_TYPE_SINGLE_INDEX,
277 STR_CONTENT_TYPE_SINGLE_POSTIT,
278 STR_CONTENT_TYPE_SINGLE_DRAWOBJECT,
279 STR_CONTENT_TYPE_SINGLE_TEXTFIELD,
280 STR_CONTENT_TYPE_SINGLE_FOOTNOTE,
281 STR_CONTENT_TYPE_SINGLE_ENDNOTE
286 bool checkVisibilityChanged(
290 if(rSwContentArrA.
size() != rSwContentArrB.
size())
295 for(
size_t a(0);
a < rSwContentArrA.
size();
a++)
297 if(rSwContentArrA[a]->IsInvisible() != rSwContentArrB[a]->IsInvisible())
306sal_Int32 getYPos(
const SwNode& rNode)
316 if (
SwNode* pAnchorNode = pFlyFormat->GetAnchor().GetAnchorNode())
318 return getYPos(*pAnchorNode);
322 return sal_Int32(nIndex);
332 m_nContentType(
nType),
333 m_nOutlineLevel(nLevel),
415 if(nIndex < m_pMember->
size())
428 std::unique_ptr<SwContentArr> pOldMember;
429 size_t nOldMemberCount = 0;
433 nOldMemberCount = pOldMember->size();
435 *pbContentChanged =
false;
447 double nOutlinesInFramesIndexAdjustment = 0.00001;
449 const size_t nOutlineCount = rOutlineNodes.
size();
451 for (
size_t i = 0;
i < nOutlineCount; ++
i)
453 SwTextNode* pNode = rOutlineNodes[
i]->GetTextNode();
460 nYPos += nOutlinesInFramesIndexAdjustment;
461 nOutlinesInFramesIndexAdjustment += 0.00001;
467 auto pCnt(std::make_unique<SwOutlineContent>(
this, aEntry,
i, nLevel,
476 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
477 if (pOldMember->size() !=
m_pMember->size())
479 *pbContentChanged =
true;
482 for (
size_t i = 0;
i < pOldMember->size();
i++)
487 *pbContentChanged =
true;
502 if (rTableFormat.GetInfo(aGetHt))
511 nYPos = getYPos(*pTable->GetTableNode());
513 auto pCnt = std::make_unique<SwContent>(
this, rTableFormat.
GetName(), nYPos);
515 pCnt->SetInvisible();
525 *pbContentChanged = checkVisibilityChanged(
566 m_pMember->insert(std::unique_ptr<SwContent>(pCnt));
575 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
576 *pbContentChanged = checkVisibilityChanged(
590 if(lcl_IsUiVisibleBookmark(*ppBookmark))
592 const OUString& rBkmName = (*ppBookmark)->GetName();
594 auto pCnt(std::make_unique<SwContent>(
this, rBkmName,
603 std::vector<SwTextField*>
aArr;
606 const size_t nSize = rFieldTypes.size();
607 for (
size_t i = 0;
i < nSize; ++
i)
612 std::vector<SwFormatField*> vFields;
616 if (
SwTextField* pTextField = pFormatField->GetTextField())
621 aArr.emplace_back(pTextField);
628 bool bHasEntryInFly =
false;
631 std::stable_sort(
aArr.begin(),
aArr.end(),
633 SwPosition aPos(a->GetTextNode(), a->GetStart());
634 SwPosition bPos(b->GetTextNode(), b->GetStart());
635 return aPos < bPos;});
642 if (nEndOfExtrasIndex >= pTextField->GetTextNode().GetIndex())
646 if (pTextField->GetTextNode().GetFlyFormat())
648 bHasEntryInFly =
true;
659 std::stable_sort(
aArr.begin(),
aArr.end(),
661 SwTextNode& aTextNode = a->GetTextNode();
662 SwTextNode& bTextNode = b->GetTextNode();
663 SwPosition aPos(aTextNode, a->GetStart());
664 SwPosition bPos(bTextNode, b->GetStart());
666 if (nEndOfExtrasIndex >= aTextNode.GetIndex())
667 if (auto pFlyFormat = aTextNode.GetFlyFormat())
668 if (const SwPosition* pPos = pFlyFormat->GetAnchor().GetContentAnchor())
670 if (nEndOfExtrasIndex >= bTextNode.GetIndex())
671 if (auto pFlyFormat = bTextNode.GetFlyFormat())
672 if (const SwPosition* pPos = pFlyFormat->GetAnchor().GetContentAnchor())
674 return aPos < bPos;});
677 std::vector<OUString> aDocumentStatisticsSubTypesList;
681 const SwField* pField = pTextField->GetFormatField().GetField();
683 if (!sExpandField.isEmpty())
684 sExpandField =
u" - " + sExpandField;
688 if (aDocumentStatisticsSubTypesList.empty())
690 aDocumentStatisticsSubTypesList);
692 if (pField->
GetSubType() < aDocumentStatisticsSubTypesList.size())
693 sSubType =
u" - " + aDocumentStatisticsSubTypesList[pField->
GetSubType()];
704 OUString sExpandedTextOfReferencedTextNode =
707 if (sExpandedTextOfReferencedTextNode.getLength() > 80)
709 sExpandedTextOfReferencedTextNode = OUString::Concat(
710 sExpandedTextOfReferencedTextNode.subView(0, 80)) +
u"...";
713 + sExpandedTextOfReferencedTextNode + sExpandField;
717 OUString sFieldSubTypeOrName;
720 sFieldSubTypeOrName =
SwResId(STR_FLDREF_FOOTNOTE);
722 sFieldSubTypeOrName =
SwResId(STR_FLDREF_ENDNOTE);
732 auto pCnt(std::make_unique<SwTextFieldContent>(
this, sText,
733 &pTextField->GetFormatField(),
736 pCnt->SetInvisible();
746 if (rFootnoteIdxs.
size() == 0)
752 if ((!pTextFootnote->GetFootnote().IsEndNote()
754 || (pTextFootnote->GetFootnote().IsEndNote()
758 const OUString& sText
761 +
" " + lcl_GetFootnoteText(*pTextFootnote);
762 auto pCnt(std::make_unique<SwTextFootnoteContent>(
763 this, sText, pTextFootnote, ++
nPos));
765 pCnt->SetInvisible();
793 pParentFormat = pParentFormat->
GetParent();
796 std::unique_ptr<SwContent> pCnt(
new SwRegionContent(
this, sSectionName,
799 pCnt->SetInvisible();
809 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
810 *pbContentChanged = checkVisibilityChanged(
819 std::vector<OUString> aRefMarks;
823 for (
const auto& rRefMark : aRefMarks)
825 m_pMember->insert(std::make_unique<SwContent>(
this, rRefMark,
840 r.rINetAttr.GetINetFormat().GetValue(),
850 bool bHasEntryInFly =
false;
851 std::vector<SwGetINetAttr*> aStableSortINetAttrsArray;
855 aStableSortINetAttrsArray.emplace_back(&r);
858 if (nEndOfExtrasIndex >= r.rINetAttr.GetTextNode().GetIndex())
862 if (r.rINetAttr.GetTextNode().GetFlyFormat())
863 bHasEntryInFly =
true;
868 std::stable_sort(aStableSortINetAttrsArray.begin(), aStableSortINetAttrsArray.end(),
870 SwPosition aSwPos(a->rINetAttr.GetTextNode(),
871 a->rINetAttr.GetStart());
872 SwPosition bSwPos(b->rINetAttr.GetTextNode(),
873 b->rINetAttr.GetStart());
874 return aSwPos < bSwPos;});
880 std::stable_sort(aStableSortINetAttrsArray.begin(), aStableSortINetAttrsArray.end(),
882 const SwTextNode& aTextNode = a->rINetAttr.GetTextNode();
883 const SwTextNode& bTextNode = b->rINetAttr.GetTextNode();
884 SwPosition aPos(aTextNode, a->rINetAttr.GetStart());
885 SwPosition bPos(bTextNode, b->rINetAttr.GetStart());
887 if (nEndOfExtrasIndex >= aTextNode.GetIndex())
888 if (auto pFlyFormat = aTextNode.GetFlyFormat())
889 if (const SwPosition* pPos = pFlyFormat->GetAnchor().GetContentAnchor())
891 if (nEndOfExtrasIndex >= bTextNode.GetIndex())
892 if (auto pFlyFormat = bTextNode.GetFlyFormat())
893 if (const SwPosition* pPos = pFlyFormat->GetAnchor().GetContentAnchor())
895 return aPos < bPos;});
898 SwGetINetAttrs::size_type
n = 0;
899 for (
auto p : aStableSortINetAttrsArray)
901 auto pCnt = std::make_unique<SwURLFieldContent>(
this,
p->sText,
913 for ( sal_uInt16 nTox = 0; nTox <
nCount; nTox++ )
924 m_pMember->insert( std::unique_ptr<SwContent>(pCnt) );
928 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
929 if (!*pbContentChanged && nOldMemberCount >
nPos &&
931 *pbContentChanged =
true;
946 if (pFormatField->GetTextField() && pFormatField->IsFieldInDoc())
948 OUString sEntry = pFormatField->GetField()->GetPar2();
955 if (!pFormatField->GetTextField()->GetTextNode().getLayoutFrame(
957 pCnt->SetInvisible();
960 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
961 if (!*pbContentChanged &&
963 (*pOldMember)[nYPos]->IsInvisible() != pCnt->IsInvisible())
964 *pbContentChanged =
true;
986 if (!pTemp->
GetName().isEmpty())
992 auto pCnt(std::make_unique<SwContent>(
this, pTemp->
GetName(), nYPos));
994 pCnt->SetInvisible();
1005 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
1006 *pbContentChanged = checkVisibilityChanged(
1018 assert(pbContentChanged &&
"pbContentChanged is always set if pOldMember is");
1020 *pbContentChanged =
true;
1030 IDX_STR_OUTLINE_LEVEL = 0,
1031 IDX_STR_DRAGMODE = 1,
1032 IDX_STR_HYPERLINK = 2,
1033 IDX_STR_LINK_REGION = 3,
1034 IDX_STR_COPY_REGION = 4,
1035 IDX_STR_DISPLAY = 5,
1036 IDX_STR_ACTIVE_VIEW = 6,
1039 IDX_STR_INACTIVE = 9,
1040 IDX_STR_EDIT_ENTRY = 10,
1041 IDX_STR_DELETE_ENTRY = 11,
1042 IDX_STR_SEND_OUTLINE_TO_CLIPBOARD_ENTRY = 12,
1043 IDX_STR_OUTLINE_TRACKING = 13,
1044 IDX_STR_OUTLINE_TRACKING_DEFAULT = 14,
1045 IDX_STR_OUTLINE_TRACKING_FOCUS = 15,
1046 IDX_STR_OUTLINE_TRACKING_OFF = 16
1065 STR_SEND_OUTLINE_TO_CLIPBOARD_ENTRY,
1066 STR_OUTLINE_TRACKING,
1067 STR_OUTLINE_TRACKING_DEFAULT,
1068 STR_OUTLINE_TRACKING_FOCUS,
1069 STR_OUTLINE_TRACKING_OFF
1073 : m_xTreeView(
std::move(xTreeView))
1074 , m_aDropTargetHelper(*this)
1075 , m_pDialog(pDialog)
1076 , m_sSpace(OUString(
" "))
1077 , m_aUpdTimer(
"SwContentTree m_aUpdTimer")
1078 , m_aOverlayObjectDelayTimer(
"SwContentTree m_aOverlayObjectDelayTimer")
1079 , m_sInvisible(
SwResId(STR_INVISIBLE))
1080 , m_pHiddenShell(nullptr)
1081 , m_pActiveShell(nullptr)
1082 , m_pConfig(
SW_MOD()->GetNavigationConfig())
1091 , m_bIsIdleClear(false)
1092 , m_bIsLastReadOnly(false)
1093 , m_bIsOutlineMoveable(true)
1094 , m_bViewHasChanged(false)
1130 if (lcl_DocOutLineExpandStateMap.find(sDocTitle) != lcl_DocOutLineExpandStateMap.end())
1154 m_bSelectTo = rMEvt.IsShift() && (m_pConfig->IsNavigateOnSelect() || rMEvt.GetClicks() == 2);
1162 if (std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
1163 m_xTreeView->get_dest_row_at_pos(rMEvt.GetPosPixel(), xEntry.get(),
false,
false) &&
1164 !rMEvt.IsLeaveWindow())
1166 if (!m_xOverlayCompareEntry)
1167 m_xOverlayCompareEntry.reset(m_xTreeView->make_iterator().release());
1168 else if (m_xTreeView->iter_compare(*xEntry, *m_xOverlayCompareEntry) == 0)
1170 m_xTreeView->copy_iterator(*xEntry, *m_xOverlayCompareEntry);
1171 BringEntryToAttention(*xEntry);
1175 if (m_xOverlayCompareEntry)
1176 m_xOverlayCompareEntry.reset();
1177 m_aOverlayObjectDelayTimer.Stop();
1178 if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
1180 m_xOverlayObject->getOverlayManager()->remove(*m_xOverlayObject);
1181 m_xOverlayObject.reset();
1190 rUnsetDragIcon =
true;
1192 bool bDisallow =
true;
1195 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
1196 bool bEntry = m_xTreeView->get_selected(xEntry.get());
1197 if (!bEntry || lcl_IsContentType(*xEntry, *m_xTreeView))
1205 if (FillTransferData(*xContainer, nDragMode))
1211 m_aDndOutlinesSelected.clear();
1213 std::unique_ptr<weld::TreeIter> xScratch(m_xTreeView->make_iterator());
1218 m_xTreeView->copy_iterator(*xEntry, *xScratch);
1219 if (!m_xTreeView->iter_previous_sibling(*xScratch))
1221 if (!m_xTreeView->is_selected(*xScratch))
1223 m_xTreeView->copy_iterator(*xScratch, *xEntry);
1228 m_aDndOutlinesSelected.push_back(m_xTreeView->make_iterator(xEntry.get()));
1230 while (m_xTreeView->iter_next_sibling(*xEntry) && m_xTreeView->is_selected(*xEntry));
1235 m_xTreeView->enable_drag_source(xContainer, nDragMode);
1240 : DropTargetHelper(rTreeView.get_widget().get_drop_target())
1241 , m_rTreeView(rTreeView)
1281 void* key =
nullptr;
1299 std::unique_ptr<weld::TreeIter> xDropEntry(
m_xTreeView->make_iterator());
1305 if (xDropEntry && lcl_IsContent(*xDropEntry, *
m_xTreeView))
1307 assert(
dynamic_cast<SwContent*
>(weld::fromId<SwTypeNumber*>(
m_xTreeView->get_id(*xDropEntry))));
1309 assert(pOutlineContent);
1317 std::unique_ptr<weld::TreeIter> xChildEntry(
m_xTreeView->make_iterator(xDropEntry.get()));
1318 bool bChildEntry =
m_xTreeView->iter_children(*xChildEntry);
1321 m_xTreeView->copy_iterator(*xChildEntry, *xDropEntry);
1322 bChildEntry =
m_xTreeView->iter_next_sibling(*xChildEntry);
1334 else if (!lcl_IsContent(*xDropEntry, *
m_xTreeView))
1342 nTargetPos = weld::fromId<SwOutlineContent*>(
m_xTreeView->get_id(*xDropEntry))->GetOutlinePos();
1348 std::unique_ptr<weld::TreeIter> xNext(
m_xTreeView->make_iterator(xDropEntry.get()));
1353 nTargetPos = weld::fromId<SwOutlineContent*>(
m_xTreeView->get_id(*xNext))->GetOutlinePos() - 1;
1378 std::unique_ptr<weld::TreeIter> xChild(rContentTree.
make_iterator(&rEntry));
1385 if (!IsAllExpanded(rContentTree, *xChild))
1395 bool bExpand = !IsAllExpanded(rContentTree, rEntry);
1411 rPop.
set_label(OUString::number(800), IsAllExpanded(rContentTree, rEntry) ?
SwResId(STR_COLLAPSEALL) :
SwResId(STR_EXPANDALL));
1419 rPop.
set_sensitive(OUString::number(TOGGLE_OUTLINE_CONTENT_VISIBILITY),
false);
1420 rPop.
set_sensitive(OUString::number(HIDE_OUTLINE_CONTENT_VISIBILITY),
false);
1421 rPop.
set_sensitive(OUString::number(SHOW_OUTLINE_CONTENT_VISIBILITY),
false);
1427 bool bIsRoot = lcl_IsContentType(rEntry, rContentTree);
1431 if (pSh->GetViewOptions()->IsTreatSubOutlineLevelsAsContent())
1434 rPop.
set_sensitive(OUString::number(TOGGLE_OUTLINE_CONTENT_VISIBILITY),
true);
1446 if (nOutlinePos >= rOutlineNodes.
size())
1452 bool bHasContent(
false);
1453 size_t nPos = nOutlinePos;
1456 if (rOutlineNodes.
size() >
nPos + 1)
1457 pEndNd = rOutlineNodes[
nPos + 1];
1461 if (rNodes.
GoNext(&aIdx) != pEndNd)
1467 while (++
nPos < rOutlineNodes.
size() &&
1470 pSttNd = rOutlineNodes[
nPos];
1472 if (rOutlineNodes.
size() >
nPos + 1)
1473 pEndNd = rOutlineNodes[
nPos + 1];
1477 if (rNodes.
GoNext(&aIdx) != pEndNd)
1494 size_t nPos = nOutlinePos;
1499 if (!bIsRoot && rOutlineNodes.
size() >
nPos + 1)
1500 pEndNd = rOutlineNodes[
nPos + 1];
1503 if (rNodes.
GoNext(&aIdx) != pEndNd)
1509 bool bHasUnfolded(!bHasFolded);
1511 while ((++nPos < pThis->GetWrtShell()->getIDocumentOutlineNodesAccess()->getOutlineNodesCount()) &&
1517 if (rOutlineNodes.
size() >
nPos + 1)
1518 pEndNd = rOutlineNodes[
nPos + 1];
1521 if (rNodes.
GoNext(&aIdx) == pEndNd)
1527 bHasUnfolded =
true;
1529 if (bHasFolded && bHasUnfolded)
1533 rPop.
set_sensitive(OUString::number(HIDE_OUTLINE_CONTENT_VISIBILITY), bHasUnfolded);
1534 rPop.
set_sensitive(OUString::number(SHOW_OUTLINE_CONTENT_VISIBILITY), bHasFolded);
1537 rPop.
set_sensitive(OUString::number(TOGGLE_OUTLINE_CONTENT_VISIBILITY), !bIsRoot);
1542 if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
1548 if (std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
1549 rCEvt.IsMouseEvent() && m_xTreeView->get_dest_row_at_pos(
1550 rCEvt.GetMousePosPixel(), xEntry.get(),
false))
1553 if (!m_xTreeView->is_selected(*xEntry))
1554 m_xTreeView->set_cursor(*xEntry);
1556 else if (m_xTreeView->is_selected(0))
1557 m_xTreeView->set_cursor(0);
1560 std::unique_ptr<weld::Builder> xBuilder(
Application::CreateBuilder(m_xTreeView.get(),
"modules/swriter/ui/navigatorcontextmenu.ui"));
1561 std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu(
"navmenu");
1563 bool bOutline(
false);
1564 std::unique_ptr<weld::Menu> xSubPop1 = xBuilder->weld_menu(
"outlinelevel");
1565 std::unique_ptr<weld::Menu> xSubPop2 = xBuilder->weld_menu(
"dragmodemenu");
1566 std::unique_ptr<weld::Menu> xSubPop3 = xBuilder->weld_menu(
"displaymenu");
1567 std::unique_ptr<weld::Menu> xSubPopOutlineTracking = xBuilder->weld_menu(
"outlinetracking");
1569 std::unique_ptr<weld::Menu> xSubPopOutlineContent = xBuilder->weld_menu(
"outlinecontent");
1571 xSubPopOutlineContent->append(OUString::number(TOGGLE_OUTLINE_CONTENT_VISIBILITY),
1572 SwResId(STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE));
1573 xSubPopOutlineContent->append(OUString::number(HIDE_OUTLINE_CONTENT_VISIBILITY),
1574 SwResId(STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL));
1575 xSubPopOutlineContent->append(OUString::number(SHOW_OUTLINE_CONTENT_VISIBILITY),
1576 SwResId(STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL));
1578 for(
int i = 1;
i <= 3; ++
i)
1579 xSubPopOutlineTracking->append_radio(OUString::number(
i + 10), m_aContextStrings[IDX_STR_OUTLINE_TRACKING +
i]);
1580 xSubPopOutlineTracking->set_active(OUString::number(10 + m_nOutlineTracking),
true);
1583 xSubPop1->append_radio(OUString::number(
i + 100), OUString::number(
i));
1584 xSubPop1->set_active(OUString::number(100 + m_nOutlineLevel),
true);
1586 for (
int i=0;
i < 3; ++
i)
1587 xSubPop2->append_radio(OUString::number(
i + 201), m_aContextStrings[IDX_STR_HYPERLINK +
i]);
1588 xSubPop2->set_active(OUString::number(201 +
static_cast<int>(GetParentWindow()->GetRegionDropMode())),
true);
1592 sal_uInt16
nId = 301;
1597 m_aContextStrings[pView ==
GetActiveView() ? IDX_STR_ACTIVE :
1598 IDX_STR_INACTIVE] +
")";
1599 xSubPop3->append_radio(OUString::number(
nId), sInsert);
1600 if (State::CONSTANT == m_eState && m_pActiveShell == &pView->GetWrtShell())
1601 xSubPop3->set_active(OUString::number(
nId),
true);
1605 xSubPop3->append_radio(OUString::number(
nId++), m_aContextStrings[IDX_STR_ACTIVE_VIEW]);
1608 OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle() +
1610 m_aContextStrings[IDX_STR_HIDDEN] +
1612 xSubPop3->append_radio(OUString::number(
nId), sHiddenEntry);
1614 if (State::ACTIVE == m_eState)
1615 xSubPop3->set_active(OUString::number(--
nId),
true);
1617 xSubPop3->set_active(OUString::number(
nId),
true);
1620 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
1621 if (!m_xTreeView->get_selected(xEntry.get()))
1624 bool bRemoveGotoEntry =
false;
1625 if (
State::HIDDEN == m_eState || !xEntry || !lcl_IsContent(*xEntry, *m_xTreeView) ||
1626 weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry))->IsInvisible())
1627 bRemoveGotoEntry =
true;
1629 bool bRemovePostItEntries =
true;
1630 bool bRemoveIndexEntries =
true;
1631 bool bRemoveCopyEntry =
true;
1632 bool bRemoveEditEntry =
true;
1633 bool bRemoveUnprotectEntry =
true;
1634 bool bRemoveDeleteChapterEntry =
true,
1635 bRemoveDeleteTableEntry =
true,
1636 bRemoveDeleteFrameEntry =
true,
1637 bRemoveDeleteImageEntry =
true,
1638 bRemoveDeleteOLEObjectEntry =
true,
1639 bRemoveDeleteBookmarkEntry =
true,
1640 bRemoveDeleteHyperlinkEntry =
true,
1641 bRemoveDeleteReferenceEntry =
true,
1642 bRemoveDeleteIndexEntry=
true,
1643 bRemoveDeleteCommentEntry =
true,
1644 bRemoveDeleteDrawingObjectEntry =
true,
1645 bRemoveDeleteFieldEntry =
true;
1646 bool bRemoveRenameEntry =
true;
1647 bool bRemoveSelectEntry =
true;
1648 bool bRemoveToggleExpandEntry =
true;
1649 bool bRemoveChapterEntries =
true;
1650 bool bRemoveSendOutlineEntry =
true;
1652 bool bRemoveTableTracking =
true;
1653 bool bRemoveSectionTracking =
true;
1654 bool bRemoveFrameTracking =
true;
1655 bool bRemoveImageTracking =
true;
1656 bool bRemoveOLEobjectTracking =
true;
1657 bool bRemoveBookmarkTracking =
true;
1658 bool bRemoveHyperlinkTracking =
true;
1659 bool bRemoveReferenceTracking =
true;
1660 bool bRemoveIndexTracking =
true;
1661 bool bRemoveCommentTracking =
true;
1662 bool bRemoveDrawingObjectTracking =
true;
1663 bool bRemoveFieldTracking =
true;
1664 bool bRemoveFootnoteTracking =
true;
1665 bool bRemoveEndnoteTracking =
true;
1667 bool bRemoveSortEntry =
true;
1672 if (lcl_IsContentType(*xEntry, *m_xTreeView))
1673 pType = weld::fromId<SwContentType*>(m_xTreeView->get_id(*xEntry));
1675 pType = weld::fromId<SwContent*>(
1676 m_xTreeView->get_id(*xEntry))->GetParent();
1682 bRemoveSortEntry =
false;
1687 switch (nContentType)
1690 aIdent =
"tabletracking";
1691 bRemoveTableTracking =
false;
1694 aIdent =
"sectiontracking";
1695 bRemoveSectionTracking =
false;
1698 aIdent =
"frametracking";
1699 bRemoveFrameTracking =
false;
1702 aIdent =
"imagetracking";
1703 bRemoveImageTracking =
false;
1706 aIdent =
"oleobjecttracking";
1707 bRemoveOLEobjectTracking =
false;
1710 aIdent =
"bookmarktracking";
1711 bRemoveBookmarkTracking =
false;
1714 aIdent =
"hyperlinktracking";
1715 bRemoveHyperlinkTracking =
false;
1718 aIdent =
"referencetracking";
1719 bRemoveReferenceTracking =
false;
1722 aIdent =
"indextracking";
1723 bRemoveIndexTracking =
false;
1726 aIdent =
"commenttracking";
1727 bRemoveCommentTracking =
false;
1730 aIdent =
"drawingobjecttracking";
1731 bRemoveDrawingObjectTracking =
false;
1734 aIdent =
"fieldtracking";
1735 bRemoveFieldTracking =
false;
1738 aIdent =
"footnotetracking";
1739 bRemoveFootnoteTracking =
false;
1742 aIdent =
"endnotetracking";
1743 bRemoveEndnoteTracking =
false;
1747 if (!aIdent.isEmpty())
1748 xPop->set_active(aIdent, mTrackContentType[nContentType]);
1753 && lcl_IsContent(*xEntry, *m_xTreeView))
1755 const bool bReadonly = m_pActiveShell->GetView().GetDocShell()->IsReadOnly();
1756 const bool bVisible = !weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry))->IsInvisible();
1757 const bool bProtected = weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry))->IsProtect();
1760 const bool bEditable = pType->
IsEditable() &&
1764 const bool bRenamable = bEditable && !bReadonly &&
1776 switch (nContentType)
1779 bRemoveDeleteChapterEntry =
false;
1782 bRemoveDeleteTableEntry =
false;
1785 bRemoveDeleteFrameEntry =
false;
1788 bRemoveDeleteImageEntry =
false;
1791 bRemoveDeleteOLEObjectEntry =
false;
1794 bRemoveDeleteBookmarkEntry =
false;
1797 bRemoveDeleteHyperlinkEntry =
false;
1800 bRemoveDeleteReferenceEntry =
false;
1803 bRemoveDeleteIndexEntry =
false;
1806 bRemoveDeleteCommentEntry =
false;
1809 bRemoveDeleteDrawingObjectEntry =
false;
1812 bRemoveDeleteFieldEntry =
false;
1819 void* pUserData = weld::fromId<void*>(m_xTreeView->get_id(*xEntry));
1823 bRemoveGotoEntry =
true;
1832 bRemoveSelectEntry =
false;
1833 bRemoveChapterEntries =
false;
1835 bRemoveCopyEntry =
false;
1837 else if (!bReadonly && bEditable)
1841 bRemoveIndexEntries =
false;
1843 const SwTOXBase* pBase = weld::fromId<SwTOXBaseContent*>(m_xTreeView->get_id(*xEntry))->GetTOXBase();
1845 bRemoveEditEntry =
false;
1851 bRemoveSelectEntry =
false;
1852 bRemoveEditEntry =
false;
1853 bRemoveUnprotectEntry =
false;
1855 OUString sTableName = weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry))->GetName();
1856 bool bProt = m_pActiveShell->HasTableAnyProtection( &sTableName, &bFull );
1857 xPop->set_sensitive(OUString::number(403), !bFull);
1858 xPop->set_sensitive(OUString::number(404), bProt);
1862 bRemoveSelectEntry =
false;
1863 bRemoveEditEntry =
false;
1866 bRemoveEditEntry =
false;
1869 bRemoveRenameEntry =
false;
1874 if (lcl_IsContentType(*xEntry, *m_xTreeView))
1875 pType = weld::fromId<SwContentType*>(m_xTreeView->get_id(*xEntry));
1877 pType = weld::fromId<SwContent*>(
1878 m_xTreeView->get_id(*xEntry))->GetParent();
1887 *xSubPopOutlineContent);
1888 bRemoveSendOutlineEntry =
false;
1895 !m_pActiveShell->GetView().GetDocShell()->IsReadOnly() &&
1897 bRemovePostItEntries =
false;
1902 if (bRemoveToggleExpandEntry)
1903 xPop->remove(OUString::number(800));
1905 if (bRemoveGotoEntry)
1906 xPop->remove(OUString::number(900));
1908 if (bRemoveSelectEntry)
1909 xPop->remove(OUString::number(805));
1911 if (bRemoveChapterEntries)
1913 xPop->remove(OUString::number(801));
1914 xPop->remove(OUString::number(802));
1915 xPop->remove(OUString::number(803));
1916 xPop->remove(OUString::number(804));
1919 if (bRemoveSendOutlineEntry)
1920 xPop->remove(OUString::number(700));
1922 if (bRemovePostItEntries)
1924 xPop->remove(OUString::number(600));
1925 xPop->remove(OUString::number(601));
1926 xPop->remove(OUString::number(602));
1929 if (bRemoveDeleteChapterEntry)
1930 xPop->remove(
"deletechapter");
1931 if (bRemoveDeleteTableEntry)
1932 xPop->remove(
"deletetable");
1933 if (bRemoveDeleteFrameEntry)
1934 xPop->remove(
"deleteframe");
1935 if (bRemoveDeleteImageEntry)
1936 xPop->remove(
"deleteimage");
1937 if (bRemoveDeleteOLEObjectEntry)
1938 xPop->remove(
"deleteoleobject");
1939 if (bRemoveDeleteBookmarkEntry)
1940 xPop->remove(
"deletebookmark");
1941 if (bRemoveDeleteHyperlinkEntry)
1942 xPop->remove(
"deletehyperlink");
1943 if (bRemoveDeleteReferenceEntry)
1944 xPop->remove(
"deletereference");
1945 if (bRemoveDeleteIndexEntry)
1946 xPop->remove(
"deleteindex");
1947 if (bRemoveDeleteCommentEntry)
1948 xPop->remove(
"deletecomment");
1949 if (bRemoveDeleteDrawingObjectEntry)
1950 xPop->remove(
"deletedrawingobject");
1951 if (bRemoveDeleteFieldEntry)
1952 xPop->remove(
"deletefield");
1954 bool bRemoveDeleteEntry =
1955 bRemoveDeleteChapterEntry &&
1956 bRemoveDeleteTableEntry &&
1957 bRemoveDeleteFrameEntry &&
1958 bRemoveDeleteImageEntry &&
1959 bRemoveDeleteOLEObjectEntry &&
1960 bRemoveDeleteBookmarkEntry &&
1961 bRemoveDeleteHyperlinkEntry &&
1962 bRemoveDeleteReferenceEntry &&
1963 bRemoveDeleteIndexEntry &&
1964 bRemoveDeleteCommentEntry &&
1965 bRemoveDeleteDrawingObjectEntry &&
1966 bRemoveDeleteFieldEntry;
1968 if (bRemoveRenameEntry)
1969 xPop->remove(OUString::number(502));
1971 if (bRemoveIndexEntries)
1973 xPop->remove(OUString::number(401));
1974 xPop->remove(OUString::number(402));
1975 xPop->remove(OUString::number(405));
1978 if (bRemoveUnprotectEntry)
1979 xPop->remove(OUString::number(404));
1981 if (bRemoveEditEntry)
1982 xPop->remove(OUString::number(403));
1984 if (bRemoveToggleExpandEntry &&
1985 bRemoveSendOutlineEntry)
1986 xPop->remove(
"separator1");
1988 if (bRemoveCopyEntry)
1989 xPop->remove(
"copy");
1991 if (bRemoveGotoEntry &&
1993 bRemoveSelectEntry &&
1994 bRemoveDeleteEntry &&
1995 bRemoveChapterEntries &&
1996 bRemovePostItEntries &&
1997 bRemoveRenameEntry &&
1998 bRemoveIndexEntries &&
1999 bRemoveUnprotectEntry &&
2001 xPop->remove(
"separator2");
2006 xPop->remove(OUString::number(1));
2010 xSubPopOutlineTracking.reset();
2011 xPop->remove(OUString::number(4));
2014 !m_pActiveShell->GetViewOptions()->IsShowOutlineContentVisibilityButton() ||
2015 m_pActiveShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount() == 0)
2017 xSubPopOutlineContent.reset();
2018 xPop->remove(OUString::number(5));
2019 xPop->remove(
"separator3");
2022 if (bRemoveTableTracking)
2023 xPop->remove(
"tabletracking");
2024 if (bRemoveSectionTracking)
2025 xPop->remove(
"sectiontracking");
2026 if (bRemoveFrameTracking)
2027 xPop->remove(
"frametracking");
2028 if (bRemoveImageTracking)
2029 xPop->remove(
"imagetracking");
2030 if (bRemoveOLEobjectTracking)
2031 xPop->remove(
"oleobjecttracking");
2032 if (bRemoveBookmarkTracking)
2033 xPop->remove(
"bookmarktracking");
2034 if (bRemoveHyperlinkTracking)
2035 xPop->remove(
"hyperlinktracking");
2036 if (bRemoveReferenceTracking)
2037 xPop->remove(
"referencetracking");
2038 if (bRemoveIndexTracking)
2039 xPop->remove(
"indextracking");
2040 if (bRemoveCommentTracking)
2041 xPop->remove(
"commenttracking");
2042 if (bRemoveDrawingObjectTracking)
2043 xPop->remove(
"drawingobjecttracking");
2044 if (bRemoveFieldTracking)
2045 xPop->remove(
"fieldtracking");
2046 if (bRemoveFootnoteTracking)
2047 xPop->remove(
"footnotetracking");
2048 if (bRemoveEndnoteTracking)
2049 xPop->remove(
"endnotetracking");
2050 if (bRemoveSortEntry)
2051 xPop->remove(
"sort");
2053 bool bSetSensitiveCollapseAllCategories =
false;
2054 if (!m_bIsRoot && xEntry)
2056 bool bEntry = m_xTreeView->get_iter_first(*xEntry);
2059 if (m_xTreeView->get_row_expanded(*xEntry))
2061 bSetSensitiveCollapseAllCategories =
true;
2064 bEntry = m_xTreeView->iter_next_sibling(*xEntry);
2067 xPop->set_sensitive(
"collapseallcategories", bSetSensitiveCollapseAllCategories);
2069 OUString sCommand = xPop->popup_at_rect(m_xTreeView.get(),
tools::Rectangle(rCEvt.GetMousePosPixel(),
Size(1,1)));
2070 if (!sCommand.isEmpty())
2071 ExecuteContextMenuAction(sCommand);
2082 std::unique_ptr<weld::TreeIter> xChild =
m_xTreeView->make_iterator();
2089 OUString sEntry = pCnt->
GetName();
2090 if (sEntry.isEmpty())
2093 insert(&rParent, sEntry,
sId,
false, xChild.get());
2095 if (bGraphic && !
static_cast<const SwGraphicContent*
>(pCnt)->GetLink().isEmpty())
2096 m_xTreeView->set_image(*xChild, RID_BMP_NAVI_GRAPHIC_LINK);
2107 m_xTreeView->insert(pParent, -1, &rStr, &rId,
nullptr,
nullptr, bChildrenOnDemand, pRet);
2115 std::unique_ptr<weld::TreeIter> xChild =
m_xTreeView->make_iterator(&rIter);
2133 std::unique_ptr<weld::TreeIter> xChild =
m_xTreeView->make_iterator();
2142 std::vector<std::unique_ptr<weld::TreeIter>> aParentCandidates;
2149 OUString sEntry = pCnt->
GetName();
2150 if(sEntry.isEmpty())
2154 auto lambda = [nLevel,
this](
const std::unique_ptr<weld::TreeIter>& entry)
2156 return lcl_IsLowerOutlineContent(*entry, *
m_xTreeView, nLevel);
2161 auto aFind = std::find_if(aParentCandidates.rbegin(), aParentCandidates.rend(), lambda);
2162 if (aFind != aParentCandidates.rend())
2163 insert(aFind->get(), sEntry,
sId,
false, xChild.get());
2165 insert(&rParent, sEntry,
sId,
false, xChild.get());
2170 aParentCandidates.erase(std::remove_if(aParentCandidates.begin(), aParentCandidates.end(),
2171 std::not_fn(lambda)), aParentCandidates.end());
2174 aParentCandidates.emplace_back(
m_xTreeView->make_iterator(xChild.get()));
2232 const sal_Int32 nOr = 1 <<
static_cast<int>(pCntType->
GetType());
2242 std::map< void*, bool > aCurrOutLineNodeMap;
2247 pNodesToExpand->emplace_back(
m_xTreeView->make_iterator(&rParent));
2248 if (bParentHasChild)
2250 std::unique_ptr<weld::TreeIter> xChild(
m_xTreeView->make_iterator(&rParent));
2252 while (bChild && lcl_IsContent(*xChild, *
m_xTreeView))
2257 auto const nPos = weld::fromId<SwOutlineContent*>(
m_xTreeView->get_id(*xChild))->GetOutlinePos();
2259 aCurrOutLineNodeMap.emplace( key,
false );
2263 aCurrOutLineNodeMap[key] =
true;
2266 pNodesToExpand->emplace_back(
m_xTreeView->make_iterator(xChild.get()));
2267 m_xTreeView->set_children_on_demand(*xChild,
false);
2284 auto const nPos = weld::fromId<SwOutlineContent*>(
m_xTreeView->get_id(rParent))->GetOutlinePos();
2293 pNodesToExpand->emplace_back(
m_xTreeView->make_iterator(&rParent));
2298 Expand(rParent,
nullptr);
2304 if (!m_xTreeView->iter_has_child(rParent) || m_xTreeView->get_children_on_demand(rParent))
2307 if (lcl_IsContentType(rParent, *m_xTreeView))
2312 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator(&rParent));
2313 if (m_xTreeView->iter_children(*xEntry))
2317 m_xTreeView->collapse_row(*xEntry);
2319 while (m_xTreeView->iter_next(*xEntry));
2323 SwContentType* pCntType = weld::fromId<SwContentType*>(m_xTreeView->get_id(rParent));
2324 const sal_Int32 nAnd = ~(1 <<
static_cast<int>(pCntType->
GetType()));
2327 m_nActiveBlock &= nAnd;
2328 m_pConfig->SetActiveBlock(m_nActiveBlock);
2331 m_nHiddenBlock &= nAnd;
2333 else if (lcl_IsContent(rParent, *m_xTreeView))
2336 assert(
dynamic_cast<SwOutlineContent*
>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(rParent))));
2337 auto const nPos = weld::fromId<SwOutlineContent*>(m_xTreeView->get_id(rParent))->GetOutlinePos();
2339 mOutLineNodeMap[key] =
false;
2348 if (m_nRowActivateEventId)
2352 m_nRowActivateEventId
2355 bool bConsumed =
false;
2357 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
2358 if (m_xTreeView->get_cursor(xEntry.get()) && lcl_IsContent(*xEntry, *m_xTreeView) &&
2361 SwContent* pCnt = weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry));
2362 assert(pCnt &&
"no UserData");
2375 m_nRowActivateEventId =
nullptr;
2377 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
2378 bool bEntry = m_xTreeView->get_cursor(xEntry.get());
2380 OSL_ENSURE(bEntry,
"no current entry!");
2383 if (lcl_IsContentType(*xEntry, *m_xTreeView) && !m_xTreeView->iter_has_child(*xEntry))
2385 RequestingChildren(*xEntry);
2386 m_xTreeView->set_children_on_demand(*xEntry,
false);
2388 else if (!lcl_IsContentType(*xEntry, *m_xTreeView) && (
State::HIDDEN != m_eState))
2390 assert(
dynamic_cast<SwContent*
>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(*xEntry))));
2391 SwContent* pCnt = weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry));
2392 assert(pCnt &&
"no UserData");
2395 if (State::CONSTANT == m_eState)
2397 m_pActiveShell->GetView().GetViewFrame().GetWindow().ToTop();
2415 sResId = RID_BMP_NAVI_OUTLINE;
2418 sResId = RID_BMP_NAVI_TABLE;
2421 sResId = RID_BMP_NAVI_FRAME;
2424 sResId = RID_BMP_NAVI_GRAPHIC;
2427 sResId = RID_BMP_NAVI_OLE;
2430 sResId = RID_BMP_NAVI_BOOKMARK;
2433 sResId = RID_BMP_NAVI_REGION;
2436 sResId = RID_BMP_NAVI_URLFIELD;
2439 sResId = RID_BMP_NAVI_REFERENCE;
2442 sResId = RID_BMP_NAVI_INDEX;
2445 sResId = RID_BMP_NAVI_POSTIT;
2448 sResId = RID_BMP_NAVI_DRAWOBJECT;
2451 sResId = RID_BMP_NAVI_TEXTFIELD;
2454 sResId = RID_BMP_NAVI_FOOTNOTE;
2457 sResId = RID_BMP_NAVI_ENDNOTE;
2460 SAL_WARN(
"sw.ui",
"ContentTypeId::UNKNOWN has no bitmap preview");
2483 std::unique_ptr<weld::TreeIter> xParent(
m_xTreeView->make_iterator(&rParent));
2486 auto nRefDepth =
m_xTreeView->get_iter_depth(*xParent);
2487 auto nActDepth = nRefDepth;
2493 nActDepth =
m_xTreeView->get_iter_depth(*xParent);
2495 }
while(xParent && nRefDepth < nActDepth);
2503 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
2507 while (nAbsPos && xEntry)
2520 std::unique_ptr<weld::TreeIter> xOldSelEntry(
m_xTreeView->make_iterator());
2521 if (!
m_xTreeView->get_selected(xOldSelEntry.get()))
2522 xOldSelEntry.reset();
2523 OUString sOldSelEntryId;
2524 size_t nEntryRelPos = 0;
2526 sal_Int32 nOldScrollPos = 0;
2530 sOldSelEntryId =
m_xTreeView->get_id(*xOldSelEntry);
2531 nOldScrollPos =
m_xTreeView->vadjustment_get_value();
2532 std::unique_ptr<weld::TreeIter> xParentEntry =
m_xTreeView->make_iterator(xOldSelEntry.get());
2533 while (
m_xTreeView->get_iter_depth(*xParentEntry))
2558 bool bDisable = pShell ==
nullptr ||
bReadOnly;
2569 std::unique_ptr<weld::TreeIter> xEntry =
m_xTreeView->make_iterator();
2570 std::unique_ptr<weld::TreeIter> xCntTypeEntry;
2571 std::vector<std::unique_ptr<weld::TreeIter>> aNodesToExpand;
2579 std::unique_ptr<SwContentType>& rpContentT = bActive ?
2585 OUString aImage(GetImageIdForContentTypeId(nCntType));
2586 bool bChOnDemand = 0 != rpContentT->GetMemberCount();
2588 insert(
nullptr, rpContentT->GetName(),
sId, bChOnDemand, xEntry.get());
2594 xCntTypeEntry =
m_xTreeView->make_iterator(xEntry.get());
2599 if (nExpandOptions & (1 <<
static_cast<int>(nCntType)))
2602 Expand(*xEntry, &aNodesToExpand);
2603 m_xTreeView->set_children_on_demand(*xEntry,
false);
2610 for (
const auto& rNode : aNodesToExpand)
2618 std::unique_ptr<SwContentType>& rpRootContentT = bActive ?
2623 OUString aImage(GetImageIdForContentTypeId(
m_nRootType));
2626 insert(
nullptr, rpRootContentT->GetName(),
sId, bChOnDemand, xEntry.get());
2629 xCntTypeEntry =
m_xTreeView->make_iterator(xEntry.get());
2636 Expand(*xEntry, &aNodesToExpand);
2637 m_xTreeView->set_children_on_demand(*xEntry,
false);
2647 for (
const auto& rNode : aNodesToExpand)
2659 std::unique_ptr<weld::TreeIter> xSelEntry =
m_xTreeView->make_iterator(xCntTypeEntry.get());
2662 std::unique_ptr<weld::TreeIter> xIter(
m_xTreeView->make_iterator(xCntTypeEntry.get()));
2663 std::unique_ptr<weld::TreeIter> xTemp(
m_xTreeView->make_iterator(xIter.get()));
2668 if (
m_xTreeView->get_id(*xIter) == sOldSelEntryId ||
nPos == nEntryRelPos)
2677 xSelEntry = std::move(xTemp);
2687 m_xTreeView->vadjustment_set_value(nOldScrollPos);
2704 OSL_ENSURE(pWrtShell,
"no Shell!");
2706 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
2707 bool bEntry =
m_xTreeView->get_cursor(xEntry.get());
2708 if (!bEntry || lcl_IsContentType(*xEntry, *
m_xTreeView) || !pWrtShell)
2716 bool bOutline =
false;
2717 OUString sOutlineText;
2723 OSL_ENSURE(nPos < pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount(),
2724 "outlinecnt changed");
2736 for(
int nLevel = 0;
2741 sEntry += OUString::number( nVal - pOutlRule->
Get(nLevel).
GetStart() ) +
".";
2773 if(!sEntry.isEmpty())
2806 sUrl +=
"#" + sEntry;
2807 if(!rToken.isEmpty())
2820 sEntry = sOutlineText;
2826 aBmk.
Copy( rTransfer );
2844 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
2845 bool bEntry =
m_xTreeView->get_cursor(xEntry.get());
2852 pCntType = weld::fromId<SwContentType*>(
m_xTreeView->get_id(*xEntry));
2857 pCntType = weld::fromId<SwContent*>(
m_xTreeView->get_id(*xEntry))->GetParent();
2863 m_xTreeView->set_selection_mode(SelectionMode::Multiple);
2870 m_xTreeView->set_selection_mode(SelectionMode::Single);
2894 bool bContentChanged =
false;
2920 std::unique_ptr<weld::TreeIter> xRootEntry(
m_xTreeView->make_iterator());
2932 if (bContentChanged)
2941 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator(xRootEntry.get()));
2942 for (
size_t j = 0; j < nChildCount; ++j)
2946 SAL_WARN(
"sw.ui",
"unexpected missing entry");
2958 OUString sEntryText =
m_xTreeView->get_text(*xEntry);
2959 if (sEntryText != pCnt->
GetName() &&
2973 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
2976 auto lcl_nextContentTypeEntry = [
this, &xEntry](){
2982 for (
bool bEntry =
m_xTreeView->get_iter_first(*xEntry); bEntry;
2983 bEntry = lcl_nextContentTypeEntry())
2994 bContentChanged =
true;
2999 if (bContentChanged)
3008 if (bContentChanged)
3017 bContentChanged =
true;
3021 for(
size_t j = 0; j < nChildCount; ++j)
3025 SAL_WARN(
"sw.ui",
"unexpected missing entry");
3026 bContentChanged =
true;
3034 OUString sEntryText =
m_xTreeView->get_text(*xEntry);
3035 if( sEntryText != pCnt->
GetName() &&
3038 bContentChanged =
true;
3046 bool bRemoveChildren =
false;
3049 if (nOldChildCount != nNewChildCount)
3051 bRemoveChildren =
true;
3055 std::unique_ptr<weld::TreeIter> xChild(
m_xTreeView->make_iterator(xEntry.get()));
3057 for (
size_t j = 0; j < nOldChildCount; ++j)
3062 OUString sEntryText =
m_xTreeView->get_text(*xChild);
3063 if( sEntryText != pCnt->
GetName() &&
3066 bRemoveChildren =
true;
3071 if (bRemoveChildren)
3073 std::unique_ptr<weld::TreeIter> xRemove(
m_xTreeView->make_iterator(xEntry.get()));
3079 m_xTreeView->set_children_on_demand(*xEntry, nNewChildCount != 0);
3082 else if((nCntCount != 0)
3085 bContentChanged =
true;
3091 return bContentChanged;
3096 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
3101 void* pId = weld::fromId<void*>(
m_xTreeView->get_id(*xEntry));
3102 if (pId && lcl_IsContentType(*xEntry, *
m_xTreeView))
3160 m_xTreeView->set_direction(rFrameDir.GetValue() == SvxFrameDirection::Horizontal_RL_TB);
3206 switch (rHint.
GetId())
3208 case SfxHintId::SwNavigatorUpdateTracking:
3211 case SfxHintId::SwNavigatorSelectOutlinesWithSelections:
3217 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
3218 if (xEntry &&
m_xTreeView->get_selected(xEntry.get()))
3225 case SfxHintId::DocChanged:
3232 case SfxHintId::ModeChanged:
3240 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
3262 const bool bUp = rCmd ==
u"chapterup";
3263 const bool bUpDown = bUp || rCmd ==
u"chapterdown";
3264 const bool bLeft = rCmd ==
u"promote";
3265 const bool bLeftRight = bLeft || rCmd ==
u"demote";
3266 if (!bUpDown && !bLeftRight)
3281 std::vector<SwTextNode*> selectedOutlineNodes;
3282 std::vector<std::unique_ptr<weld::TreeIter>> selected;
3291 if ((bLeftRight || bOutlineWithChildren) && !selected.empty())
3293 std::unique_ptr<weld::TreeIter> xParent(m_xTreeView->make_iterator(&rEntry));
3294 for (bool bParent = m_xTreeView->iter_parent(*xParent); bParent; bParent = m_xTreeView->iter_parent(*xParent))
3296 if (m_xTreeView->iter_compare(*selected.back(), *xParent) == 0)
3302 selected.emplace_back(
m_xTreeView->make_iterator(&rEntry));
3308 = weld::fromId<SwOutlineContent*>(
m_xTreeView->get_id(rEntry))->GetOutlinePos();
3309 if (
nPos < nOutlineNdsSize)
3314 selectedOutlineNodes.push_back(pNode->
GetTextNode());
3320 if (!selected.size())
3323 if (bUpDown && !bUp)
3325 std::reverse(selected.begin(), selected.end());
3328 m_bIgnoreDocChange =
true;
3331 bool bStartedAction =
false;
3337 SwNodeOffset nEndOfExtrasIndex = rNodes.GetEndOfExtras().GetIndex();
3340 if (rOutlineNodes[nPos]->GetIndex() > nEndOfExtrasIndex)
3342 nFirstRegularDocContentOutlineNodePos =
nPos;
3347 for (
auto const& pCurrentEntry : selected)
3349 nActPos = weld::fromId<SwOutlineContent*>(
3350 m_xTreeView->get_id(*pCurrentEntry))->GetOutlinePos();
3360 if (!bStartedAction)
3364 bStartedAction =
true;
3374 if ((nDir == -1 && nActPos > 0) || (nDir == 1 && nActPos < nOutlineNdsSize - 1))
3379 int nActPosOutlineLevel =
3380 rOutlineNodes[nActPos]->GetTextNode()->GetAttrOutlineLevel();
3385 int nPosOutlineLevel = -1;
3386 while (++nPos < nOutlineNdsSize)
3389 rOutlineNodes[
nPos]->GetTextNode()->GetAttrOutlineLevel();
3391 if (nPosOutlineLevel <= nActPosOutlineLevel)
3394 if (!bOutlineWithChildren)
3397 if (nPosOutlineLevel >= nActPosOutlineLevel)
3400 while (++nPos < nOutlineNdsSize)
3403 rOutlineNodes[
nPos]->GetTextNode()->GetAttrOutlineLevel();
3405 if (nPosOutlineLevel <= nActPosOutlineLevel)
3414 while (nPos && --nPos >= nFirstRegularDocContentOutlineNodePos)
3416 int nPosOutlineLevel =
3417 rOutlineNodes[
nPos]->GetTextNode()->GetAttrOutlineLevel();
3419 if (nPosOutlineLevel == nActPosOutlineLevel)
3422 if (nPosOutlineLevel < nActPosOutlineLevel)
3447 const int nActLevel = rOutlNds[nActPos]->GetTextNode()->GetAttrOutlineLevel();
3454 int nLevel = rOutlNds[
nPos]->GetTextNode()->GetAttrOutlineLevel();
3460 }
while (bOutlineWithChildren && ++nPos < rOutlNds.
size() &&
3461 rOutlNds[nPos]->GetTextNode()->GetAttrOutlineLevel() > nActLevel);
3474 pShell->SwCursorShell::GotoOutline(nPos);
3476 }
while (bOutlineWithChildren && ++nPos < rOutlNds.
size() &&
3477 rOutlNds[nPos]->GetTextNode()->GetAttrOutlineLevel() > nActLevel);
3496 auto nOldScrollPos = m_xTreeView->vadjustment_get_value();
3499 m_xTreeView->unselect_all();
3501 m_xTreeView->vadjustment_set_value(nOldScrollPos);
3507 for (
SwTextNode* pNode : selectedOutlineNodes)
3509 m_xTreeView->all_foreach([
this, &rOutlineNds, pNode](
weld::TreeIter& rEntry){
3510 if (lcl_IsContentType(rEntry, *m_xTreeView))
3513 m_xTreeView->get_id(rEntry))->GetOutlinePos();
3514 if (pNode == rOutlineNds[nPos]->GetTextNode())
3516 std::unique_ptr<weld::TreeIter> xParent(m_xTreeView->make_iterator(&rEntry));
3517 if (m_xTreeView->iter_parent(*xParent)
3518 && !m_xTreeView->get_row_expanded(*xParent))
3520 m_xTreeView->expand_row(*xParent);
3522 m_xTreeView->select(rEntry);
3531 m_pActiveShell->GetView().GetEditWin().GrabFocus();
3532 m_bIgnoreDocChange =
false;
3537 m_bIgnoreDocChange =
false;
3564 std::unique_ptr<weld::TreeIter> xIter(rContentTree.
make_iterator());
3569 void* pUserData = weld::fromId<void*>(rContentTree.
get_id(*xIter));
3587 const void*
p =
nullptr;
3588 while (rContentTree.
iter_next(*xIter) && lcl_IsContent(*xIter, rContentTree))
3590 void* pUserData = weld::fromId<void*>(rContentTree.
get_id(*xIter));
3628 std::unique_ptr<weld::TreeIter> xFirstSelected(rContentTree.
make_iterator());
3630 xFirstSelected.reset();
3632 rContentTree.
iter_compare(*xIter, *xFirstSelected) != 0)
3648 std::u16string_view rContentTypeName, std::u16string_view rName)
3654 std::unique_ptr<weld::TreeIter> xIter(rContentTree.
make_iterator());
3656 while (bFoundEntry && rContentTypeName != rContentTree.
get_text(*xIter))
3663 while (rContentTree.
iter_next(*xIter) && lcl_IsContent(*xIter, rContentTree))
3665 if (rName == rContentTree.
get_text(*xIter))
3668 std::unique_ptr<weld::TreeIter> xFirstSelected(rContentTree.
make_iterator());
3670 xFirstSelected.reset();
3672 rContentTree.
iter_compare(*xIter, *xFirstSelected) != 0)
3689 std::unique_ptr<weld::TreeIter> xIter(rContentTree.
make_iterator());
3691 while (bFoundEntry &&
SwResId(STR_CONTENT_TYPE_DRAWOBJECT) != rContentTree.
get_text(*xIter))
3697 while (rContentTree.
iter_next(*xIter) && lcl_IsContent(*xIter, rContentTree))
3699 if (rName == rContentTree.
get_text(*xIter))
3703 rContentTree.
select(*xIter);
3716 if (!m_xTreeView->is_visible())
3722 SwView* pView = GetParentWindow()->GetCreateView();
3725 if(pActShell && pActShell->
GetWin() &&
3726 (pActShell->
GetWin()->
HasFocus() || m_bDocHasChanged || m_bViewHasChanged) &&
3729 if (m_bDocHasChanged || m_bViewHasChanged)
3731 if (State::CONSTANT == m_eState && !lcl_FindShell(m_pActiveShell))
3733 SetActiveShell(pActShell);
3734 GetParentWindow()->UpdateListBox();
3736 if (State::ACTIVE == m_eState && pActShell != GetWrtShell())
3738 SetActiveShell(pActShell);
3740 else if ((State::ACTIVE == m_eState || (State::CONSTANT == m_eState && pActShell == GetWrtShell())) &&
3741 HasContentChanged())
3743 FindActiveTypeAndRemoveUserData();
3748 m_bIsIdleClear =
false;
3749 m_bDocHasChanged =
false;
3750 m_bViewHasChanged =
false;
3752 else if (!pView && State::ACTIVE == m_eState && !m_bIsIdleClear)
3756 SetActiveShell(
nullptr);
3759 m_bIsIdleClear =
true;
3796 OUString aContentTypeName;
3801 aContentTypeName =
SwResId(STR_CONTENT_TYPE_GRAPHIC);
3807 aContentTypeName =
SwResId(STR_CONTENT_TYPE_FRAME);
3813 aContentTypeName =
SwResId(STR_CONTENT_TYPE_OLE);
3815 if (!aContentTypeName.isEmpty())
3843 if (!
aName.isEmpty())
3859 && aContentAtPos.pFndTextAttr &&
3863 if (!aContentAtPos.pFndTextAttr->GetFootnote().IsEndNote())
3867 aContentAtPos.pFndTextAttr);
3871 aContentAtPos.pFndTextAttr);
3884 OUString sBookmarkName;
3888 if (lcl_IsUiVisibleBookmark(*ppBookmark) &&
3889 *pCursorPoint >= (*ppBookmark)->GetMarkStart() &&
3890 *pCursorPoint <= (*ppBookmark)->GetMarkEnd())
3892 sBookmarkName = (*ppBookmark)->GetName();
3898 else if (!sBookmarkName.isEmpty() &&
3899 *pCursorPoint < (*ppBookmark)->GetMarkStart())
3910 if (!sBookmarkName.isEmpty())
3914 SwResId(STR_CONTENT_TYPE_BOOKMARK),
3923 aContentAtPos.pFndTextAttr &&
3928 const SwFormatRefMark& rRefMark = aContentAtPos.pFndTextAttr->GetRefMark();
3941 static_txtattr_cast<const SwTextINetFormat*>(aContentAtPos.pFndTextAttr))
3943 if (
const SwTextNode* pTextNode = pTextINetFormat->GetpTextNode())
3963 aContentAtPos.pFndTextAttr);
3997 pTOX->GetTOXName());
4007 pSection->GetSectionName());
4015 m_xTreeView->get_selected_text() == pSection->GetSectionName())
4031 std::unique_ptr<weld::TreeIter> xFirstEntry(
m_xTreeView->make_iterator());
4037 if (lcl_IsContent(rEntry, *
m_xTreeView) && weld::fromId<SwContent*>(
4038 m_xTreeView->get_id(rEntry))->GetParent()->GetType() ==
4041 if (weld::fromId<SwOutlineContent*>(
4042 m_xTreeView->get_id(rEntry))->GetOutlinePos() == nActPos)
4044 std::unique_ptr<weld::TreeIter> xFirstSelected(
4045 m_xTreeView->make_iterator());
4046 if (!m_xTreeView->get_selected(xFirstSelected.get()))
4047 xFirstSelected.reset();
4049 if (m_xTreeView->count_selected_rows() != 1 || !xFirstSelected ||
4050 m_xTreeView->iter_compare(rEntry, *xFirstSelected) != 0)
4052 if (m_nOutlineTracking == 2)
4055 std::unique_ptr<weld::TreeIter> xChildEntry(
4056 m_xTreeView->make_iterator());
4057 if (m_xTreeView->get_iter_first(*xChildEntry) &&
4058 m_xTreeView->iter_children(*xChildEntry))
4062 if (weld::fromId<SwContent*>(
4063 m_xTreeView->get_id(*xChildEntry))->
4064 GetParent()->GetType() == ContentTypeId::OUTLINE)
4065 m_xTreeView->collapse_row(*xChildEntry);
4069 while (m_xTreeView->iter_next(*xChildEntry));
4073 m_xTreeView->set_cursor(rEntry);
4077 std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator(&rEntry));
4078 for (int i = 0; i < 2; i++)
4080 if (m_xTreeView->get_iter_depth(*xIter) == 0)
4082 if (!m_xTreeView->iter_previous(*xIter))
4084 while (!weld::IsEntryVisible(*m_xTreeView, *xIter))
4085 m_xTreeView->iter_parent(*xIter);
4090 const bool bRowExpanded = m_xTreeView->get_row_expanded(*xIter);
4091 m_xTreeView->scroll_to_row(*xIter);
4093 m_xTreeView->collapse_row(*xIter);
4102 weld::fromId<SwContentType*>(
4113 if (m_xTreeView->count_selected_rows() > 0)
4115 m_xTreeView->unselect_all();
4116 m_xTreeView->set_cursor(-1);
4126 std::vector<SwOutlineNodes::size_type> aOutlinePositions;
4137 }
while (pCursor && pCursor != pFirstCursor);
4139 if (aOutlinePositions.empty())
4143 aOutlinePositions.erase(std::unique(aOutlinePositions.begin(), aOutlinePositions.end()),
4144 aOutlinePositions.end());
4148 for (
auto nOutlinePosition : aOutlinePositions)
4152 weld::fromId<SwContent*>(
4153 m_xTreeView->get_id(rEntry))->GetParent()->GetType() ==
4156 if (weld::fromId<SwOutlineContent*>(
4157 m_xTreeView->get_id(rEntry))->GetOutlinePos() ==
4160 std::unique_ptr<weld::TreeIter> xParent =
4161 m_xTreeView->make_iterator(&rEntry);
4162 if (m_xTreeView->iter_parent(*xParent) &&
4163 !m_xTreeView->get_row_expanded(*xParent))
4164 m_xTreeView->expand_row(*xParent);
4165 m_xTreeView->select(rEntry);
4187 bool bFirstMove =
true;
4201 nPrevTargetPosOrOffset = nSourcePos - nTargetPos;
4203 nPrevTargetPosOrOffset = nSourcePos + 1;
4205 else if (nSourcePos < nTargetPos)
4209 nPrevSourcePos = nSourcePos;
4210 nPrevTargetPosOrOffset = nTargetPos;
4219 nTargetPos = nSourcePos - nPrevTargetPosOrOffset;
4221 else if (nSourcePos < nTargetPos)
4224 nSourcePos = nPrevSourcePos;
4225 nTargetPos = nPrevTargetPosOrOffset;
4241 SwView* pActView = GetParentWindow()->GetCreateView();
4245 if (State::CONSTANT == m_eState && !lcl_FindShell(m_pActiveShell))
4247 SetActiveShell(pActShell);
4250 if (State::ACTIVE == m_eState && pActShell != GetWrtShell())
4251 SetActiveShell(pActShell);
4253 else if ((State::ACTIVE == m_eState || (State::CONSTANT == m_eState && pActShell == GetWrtShell())) &&
4256 if (HasContentChanged())
4258 m_bDocHasChanged =
false;
4261 else if (State::ACTIVE == m_eState)
4267 bool bConsumed =
true;
4272 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4273 if (m_xTreeView->get_selected(xEntry.get()))
4274 ExpandOrCollapseAll(*m_xTreeView, *xEntry);
4278 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4279 if (m_xTreeView->get_selected(xEntry.get()))
4285 GetParentWindow()->ToggleTree();
4292 if (lcl_IsContentType(*xEntry, *m_xTreeView))
4294 m_xTreeView->get_row_expanded(*xEntry) ? m_xTreeView->collapse_row(*xEntry)
4295 : m_xTreeView->expand_row(*xEntry);
4298 ContentDoubleClickHdl(*m_xTreeView);
4302 ContentDoubleClickHdl(*m_xTreeView);
4309 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4310 if (m_xTreeView->get_selected(xEntry.get()) && lcl_IsContent(*xEntry, *m_xTreeView))
4312 assert(
dynamic_cast<SwContent*
>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(*xEntry))));
4313 if (weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry))->GetParent()->IsDeletable() &&
4314 !m_pActiveShell->GetView().GetDocShell()->IsReadOnly())
4324 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4325 if (m_xTreeView->get_cursor(xEntry.get()))
4329 if (State::CONSTANT == m_eState)
4331 m_pActiveShell->GetView().GetViewFrame().GetWindow().ToTop();
4334 SwContent* pCnt =
dynamic_cast<SwContent*
>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(*xEntry)));
4338 SdrView* pDrawView = m_pActiveShell->GetDrawView();
4346 bool hasObjectMarked =
false;
4364 case SdrObjKind::Group:
4365 case SdrObjKind::Text:
4366 case SdrObjKind::Line:
4367 case SdrObjKind::Rectangle:
4368 case SdrObjKind::CircleOrEllipse:
4369 case SdrObjKind::CircleSection:
4370 case SdrObjKind::CircleArc:
4371 case SdrObjKind::CircleCut:
4372 case SdrObjKind::Polygon:
4373 case SdrObjKind::PolyLine:
4374 case SdrObjKind::PathLine:
4375 case SdrObjKind::PathFill:
4376 case SdrObjKind::FreehandLine:
4377 case SdrObjKind::FreehandFill:
4378 case SdrObjKind::PathPoly:
4379 case SdrObjKind::PathPolyLine:
4380 case SdrObjKind::Caption:
4381 case SdrObjKind::CustomShape:
4383 hasObjectMarked =
true;
4391 pDrawView->
MarkObj(pTemp, pPV,
true);
4397 if ( !hasObjectMarked )
4407 m_bViewHasChanged =
true;
4413 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4414 if (m_xTreeView->get_cursor(xEntry.get()))
4416 SwContent* pCnt =
dynamic_cast<SwContent*
>(weld::fromId<SwTypeNumber*>(m_xTreeView->get_id(*xEntry)));
4421 m_xTreeView->unselect_all();
4427 ExecCommand(
u"promote", !aCode.
IsShift());
4429 ExecCommand(
u"demote", !aCode.
IsShift());
4431 ExecCommand(
u"chapterup", !aCode.
IsShift());
4433 ExecCommand(
u"chapterdown", !aCode.
IsShift());
4435 CopyOutlineSelections();
4454 bool bContent =
false;
4455 void* pUserData = weld::fromId<void*>(m_xTreeView->get_id(rEntry));
4456 if (lcl_IsContentType(rEntry, *m_xTreeView))
4464 nType =
static_cast<SwContent*
>(pUserData)->GetParent()->GetType();
4499 if (
nullptr != (pSect = pFormat->
GetSection()) &&
4507 sEntry =
SwResId(STR_REGION_DEFNAME) +
": " + sEntry +
"\n" +
4508 SwResId(FLD_STAT_WORD) +
": " + OUString::number(aDocStat.
nWord) +
"\n" +
4509 SwResId(FLD_STAT_CHAR) +
": " + OUString::number(aDocStat.
nChar);
4523 SwResId(STR_CONTENT_FOOTNOTE);
4528 if(
static_cast<SwContent*
>(pUserData)->IsInvisible())
4530 if(!sEntry.isEmpty())
4532 sEntry += m_sInvisible;
4537 size_t nMemberCount =
static_cast<SwContentType*
>(pUserData)->GetMemberCount();
4538 sEntry = OUString::number(nMemberCount) +
" " +
4549 if (rSelectedPopupEntry ==
"copy")
4554 if (rSelectedPopupEntry ==
"collapseallcategories")
4556 std::unique_ptr<weld::TreeIter> xEntry =
m_xTreeView->make_iterator();
4557 bool bEntry =
m_xTreeView->get_iter_first(*xEntry);
4567 std::map<OUString, ContentTypeId> mPopupEntryToContentTypeId
4585 if (mPopupEntryToContentTypeId.count(rSelectedPopupEntry))
4587 ContentTypeId eCntTypeId = mPopupEntryToContentTypeId[rSelectedPopupEntry];
4593 std::unique_ptr<weld::TreeIter> xFirst(
m_xTreeView->make_iterator());
4597 if (rSelectedPopupEntry ==
"sort")
4600 const OUString& rId(
m_xTreeView->get_id(*xFirst));
4602 pCntType = weld::fromId<SwContentType*>(rId);
4604 pCntType =
const_cast<SwContentType*
>(weld::fromId<SwContent*>(rId)->GetParent());
4610 else if (rSelectedPopupEntry ==
"deletechapter" ||
4611 rSelectedPopupEntry ==
"deletetable" ||
4612 rSelectedPopupEntry ==
"deleteframe" ||
4613 rSelectedPopupEntry ==
"deleteimage" ||
4614 rSelectedPopupEntry ==
"deleteoleobject" ||
4615 rSelectedPopupEntry ==
"deletebookmark" ||
4616 rSelectedPopupEntry ==
"deletehyperlink" ||
4617 rSelectedPopupEntry ==
"deletereference" ||
4618 rSelectedPopupEntry ==
"deleteindex" ||
4619 rSelectedPopupEntry ==
"deletecomment" ||
4620 rSelectedPopupEntry ==
"deletedrawingobject" ||
4621 rSelectedPopupEntry ==
"deletefield")
4627 auto nSelectedPopupEntry = rSelectedPopupEntry.toUInt32();
4628 switch (nSelectedPopupEntry)
4630 case TOGGLE_OUTLINE_CONTENT_VISIBILITY:
4631 case HIDE_OUTLINE_CONTENT_VISIBILITY:
4632 case SHOW_OUTLINE_CONTENT_VISIBILITY:
4639 if (nSelectedPopupEntry == TOGGLE_OUTLINE_CONTENT_VISIBILITY)
4657 bool bShow(nSelectedPopupEntry == SHOW_OUTLINE_CONTENT_VISIBILITY);
4662 }
while (++
nPos < nOutlineNodesCount
4680 nSelectedPopupEntry -= 10;
4695 nSelectedPopupEntry -= 100;
4806 if(nSelectedPopupEntry > 300 && nSelectedPopupEntry < 400)
4808 nSelectedPopupEntry -= 300;
4812 nSelectedPopupEntry --;
4813 if(nSelectedPopupEntry == 0)
4820 if(nSelectedPopupEntry)
4824 Display(nSelectedPopupEntry == 1);
4843 nChapters += m_xTreeView->iter_n_children(rEntry);
4881 rpContentT->FillMemberList();
4918 if (m_pConfig->IsNavigateOnSelect())
4920 ContentDoubleClickHdl(*m_xTreeView);
4927 std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
4928 if (!m_xTreeView->get_selected(xEntry.get()))
4930 while (m_xTreeView->get_iter_depth(*xEntry))
4931 m_xTreeView->iter_parent(*xEntry);
4932 m_pDialog->SelectNavigateByContentType(m_xTreeView->get_text(*xEntry));
4938 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
4942 bool bEnable =
false;
4943 std::unique_ptr<weld::TreeIter> xParentEntry(
m_xTreeView->make_iterator(xEntry.get()));
4944 bool bParentEntry =
m_xTreeView->iter_parent(*xParentEntry);
4945 while (bParentEntry && (!lcl_IsContentType(*xParentEntry, *
m_xTreeView)))
4946 bParentEntry =
m_xTreeView->iter_parent(*xParentEntry);
4951 else if (bParentEntry)
4978 if (rEntry.isEmpty())
4981 OUStringBuffer aEntry(rEntry);
4982 for (sal_Int32
i = 0;
i < rEntry.getLength(); ++
i)
4983 if(aEntry[
i] == 10 || aEntry[
i] == 13)
4986 return aEntry.makeStringAndClear();
4994 sal_uInt16 nSlot = 0;
4999 uno::Reference< container::XNameAccess > xNameAccess, xSecond, xThird;
5013 GetDoc()->UnProtectCells( pCnt->
GetName());
5018 OUString sTable =
SwResId(STR_TABLE_NAME);
5023 sTable = aRewriterTableName.
Apply(sTable);
5036 uno::Reference< text::XTextTablesSupplier > xTables(
xModel, uno::UNO_QUERY);
5037 xNameAccess = xTables->getTextTables();
5051 uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(
xModel, uno::UNO_QUERY);
5052 xNameAccess = xGraphics->getGraphicObjects();
5053 uno::Reference< text::XTextFramesSupplier > xFrames(
xModel, uno::UNO_QUERY);
5054 xSecond = xFrames->getTextFrames();
5055 uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(
xModel, uno::UNO_QUERY);
5056 xThird = xObjs->getEmbeddedObjects();
5071 uno::Reference< text::XTextFramesSupplier > xFrames(
xModel, uno::UNO_QUERY);
5072 uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(
xModel, uno::UNO_QUERY);
5075 xNameAccess = xFrames->getTextFrames();
5076 xSecond = xObjs->getEmbeddedObjects();
5080 xNameAccess = xObjs->getEmbeddedObjects();
5081 xSecond = xFrames->getTextFrames();
5083 uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(
xModel, uno::UNO_QUERY);
5084 xThird = xGraphics->getGraphicObjects();
5100 uno::Reference< text::XBookmarksSupplier > xBkms(
xModel, uno::UNO_QUERY);
5101 xNameAccess = xBkms->getBookmarks();
5117 uno::Reference< text::XTextSectionsSupplier > xSects(
xModel, uno::UNO_QUERY);
5118 xNameAccess = xSects->getTextSections();
5126 nSlot = SID_REMOVE_HYPERLINK;
5128 nSlot = SID_EDIT_HYPERLINK;
5134 const OUString& rName = pCnt->
GetName();
5139 const auto pFormatRefMark =
static_cast<const SwFormatRefMark*
>(pItem);
5140 if (!pFormatRefMark)
5142 const SwTextRefMark* pTextRef = pFormatRefMark->GetTextRefMark();
5172 pPostItMgr->SetActiveSidebarWin(
nullptr);
5173 rView.GetEditWin().GrabFocus();
5191 SfxCallMode::ASYNCHRON, { &aPtrItem });
5206 Reference< XDocumentIndexesSupplier > xIndexes(
xModel, UNO_QUERY);
5207 Reference< XIndexAccess> xIdxAcc(xIndexes->getDocumentIndexes());
5208 Reference< XNameAccess >xLocalNameAccess(xIdxAcc, UNO_QUERY);
5210 xNameAccess = xLocalNameAccess;
5211 else if(xLocalNameAccess.is() && xLocalNameAccess->hasByName(pBase->
GetTOXName()))
5213 Any aIdx = xLocalNameAccess->getByName(pBase->
GetTOXName());
5214 Reference< XDocumentIndex> xIdx;
5246 else if(xNameAccess.is())
5249 uno::Reference< uno::XInterface > xTmp;
5251 uno::Reference< container::XNamed > xNamed(xTmp, uno::UNO_QUERY);
5255 pDlg->SetAlternativeAccess( xSecond, xThird);
5257 OUString sForbiddenChars;
5260 sForbiddenChars =
"/\\@:*?\";,.#";
5264 sForbiddenChars =
" .<>";
5266 pDlg->SetForbiddenChars(sForbiddenChars);
5284 if (pSdrView->IsTextEdit())
5292 Point aPt(LONG_MIN, LONG_MIN);
5353 std::optional<std::unique_ptr<SwPosition>> oPosition;
5401 Reference<frame::XController2>
xController(
xModel->getCurrentController(), uno::UNO_QUERY);
5405 Reference<ui::XSidebarProvider> xSidebarProvider =
xController->getSidebar();
5406 if ( !xSidebarProvider.is() )
5409 Reference<ui::XDecks> xDecks = xSidebarProvider->getDecks();
5413 Reference<ui::XDeck> xDeck ( xDecks->getByName(
"NavigatorDeck"), uno::UNO_QUERY);
5417 Reference<ui::XPanels> xPanels = xDeck->getPanels();
5418 if ( !xPanels.is() )
5421 if (xPanels->hasByName(
"SwNavigatorPanel"))
5423 Reference<ui::XPanel> xPanel ( xPanels->getByName(
"SwNavigatorPanel"), uno::UNO_QUERY);
5424 if ( !xPanel.is() || !xPanel->getTitle().isEmpty() )
5427 xPanel->setTitle( pCnt->
GetName() );
5538 m_aUrl(
std::move( aUrl )),
5539 m_aDescription(
std::move(aDesc)),
5540 m_nDocSh(reinterpret_cast<sal_IntPtr>(pDocSh)),
5541 m_nDefaultDrag( nDragType )
5547 rtl_TextEncoding eSysCSet = osl_getThreadTextEncoding();
5551 OString::number(
static_cast<int>(
m_nDefaultDrag)) + OStringChar(NAVI_BOOKMARK_DELIM) +
5559 bool bRet = rData.
GetString( SotClipboardFormatId::SONLK, sStr );
5563 m_aUrl = sStr.getToken(0, NAVI_BOOKMARK_DELIM,
nPos );
5567 if (!rsDesc.isEmpty())
5580 std::unique_ptr<weld::TreeIter> xIter(
m_xTreeView->make_iterator());
5585 if (
m_xTreeView->get_text(*xIter) == rContentTypeName)
5596 m_aOverlayObjectDelayTimer.Stop();
5597 if (m_xOverlayObject)
5604 pPaintWindow->GetOverlayManager();
5605 xOverlayManager->add(*m_xOverlayObject);
5616 if (aRanges.empty())
5622 Color(), std::move(aRanges),
true));
5685 std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
5694 std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
5708 std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
5717 std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
5733 std::vector<const SwNode*> aNodesArr(
5740 std::vector<const SwNode*> aNodesArr;
5747 if (!pTableFormat->GetInfo(aGetHt))
5768 std::vector<OUString> aNames;
5774 aNames.push_back(pMember->
GetName());
5780 std::vector<const SwNode*> aNodesArr;
5782 const size_t nSize = rFormats.
size();
5800 aNodesArr.push_back(pNode);
5814 std::vector<const SwTextAttr*> aTextAttrArr;
5818 if (
const auto pRefMark =
dynamic_cast<const SwFormatRefMark*
>(pItem))
5823 aTextAttrArr.push_back(pTextRef);
5830 std::vector<const SwTextAttr*> aTextAttrArr;
5836 if (pPostItContent && !pPostItContent->
IsInvisible())
5838 if (
const SwTextAttr* pTextAttr = pFormatField->GetTextField())
5839 aTextAttrArr.push_back(pTextAttr);
5848 if (
const SdrPage* pPage = pModel->GetPage(0))
5850 if (
const size_t nCount = pPage->GetObjCount())
5852 std::vector<const SdrObject*> aSdrObjectArr;
5858 aSdrObjectArr.push_back(
pObject);
5867 std::vector<const SwTextAttr*> aTextAttrArr;
5873 if (pTextFieldCnt && !pTextFieldCnt->
IsInvisible())
5875 if (
const SwTextAttr* pTextAttr = pFormatField->GetTextField())
5876 aTextAttrArr.push_back(pTextAttr);
5882 std::vector<const SwTextAttr*> aTextAttrArr;
5888 if (pTextFootnoteCnt && !pTextFootnoteCnt->
IsInvisible())
5890 aTextAttrArr.push_back(pTextAttr);
5900 std::vector<basegfx::B2DRange>& aRanges)
5902 if (pStartFrame && pEndFrame)
5905 pStartFrame->
GetCharRect(aStartCharRect, aStartPos);
5908 if (aStartCharRect.
Top() == aEndCharRect.
Top())
5911 aRanges.emplace_back(aStartCharRect.
Left(), aStartCharRect.
Top(),
5912 aEndCharRect.
Right() + 1, aEndCharRect.
Bottom() + 1);
5918 aRanges.emplace_back(aStartCharRect.
Left(), aStartCharRect.
Top(),
5920 if (aStartCharRect.
Bottom() + 1 != aEndCharRect.
Top())
5921 aRanges.emplace_back(aFrameRect.
Left(), aStartCharRect.
Bottom() + 1,
5922 aFrameRect.
Right(), aEndCharRect.
Top() + 1);
5923 aRanges.emplace_back(aFrameRect.
Left(), aEndCharRect.
Top() + 1,
5924 aEndCharRect.
Right() + 1, aEndCharRect.
Bottom() + 1);
5931 std::vector<basegfx::B2DRange> aRanges;
5936 SwRect aFrameRect = pFrameFormat->FindLayoutRect();
5938 aRanges.emplace_back(aFrameRect.
Left(), aFrameRect.
Top(), aFrameRect.
Right(),
5946 std::vector<basegfx::B2DRange> aRanges;
5948 for (
const auto& rName : rNames)
5953 SwPosition aMarkStart = (*ppBkmk)->GetMarkStart();
5955 if (!pMarkStartTextNode)
5959 if (!pMarkStartFrame)
5961 SwPosition aMarkEnd = (*ppBkmk)->GetMarkEnd();
5963 if (!pMarkEndTextNode)
5970 if (aMarkStart == aMarkEnd)
5984 std::vector<basegfx::B2DRange> aRanges;
5985 for (
const auto* pNode : rNodes)
5995 aRanges.emplace_back(rFrameRect.
Left(), rFrameRect.
Top(), rFrameRect.
Right(),
5999 SwFlowFrame *pFollow = SwFlowFrame::CastFlowFrame(pFrame)->GetFollow();
6002 pFrame = &pFollow->GetFrame();
6010 std::vector<basegfx::B2DRange> aRanges;
6011 for (
const auto& r : rINetAttrsArr)
6017 auto nStart = r.rINetAttr.GetStart();
6018 auto nEnd = r.rINetAttr.GetAnyEnd();
6019 SwPosition aStartPos(rTextNode, nStart), aEndPos(rTextNode, nEnd);
6028 std::vector<basegfx::B2DRange> aRanges;
6033 const SwTextRefMark* pTextRefMark =
p->GetRefMark().GetTextRefMark();
6040 auto nStart =
p->GetStart();
6041 auto nEnd =
p->GetAnyEnd();
6042 SwPosition aStartPos(rTextNode, nStart), aEndPos(rTextNode, nEnd);
6051 std::vector<basegfx::B2DRange> aRanges;
6056 const SwTextField* pTextField =
p->GetFormatField().GetTextField();
6066 const ::sw::mark::IMark* pAnnotationMark = pTextAnnotationField->
GetAnnotationMark();
6067 const SwPosition aMarkStart = pAnnotationMark ? pAnnotationMark->GetMarkStart()
6069 const SwPosition aMarkEnd = pAnnotationMark ? pAnnotationMark->GetMarkEnd()
6075 if (!pMarkStartFrame || !pMarkEndFrame)
6085 std::vector<basegfx::B2DRange> aRanges;
6090 const SwTextFootnote* pTextFootnote =
p->GetFootnote().GetTextFootnote();
6097 auto nStart =
p->GetStart();
6098 auto nEnd = nStart + 1;
6099 SwPosition aStartPos(rTextNode, nStart), aEndPos(rTextNode, nEnd);
6108 std::vector<basegfx::B2DRange> aRanges;
6123 std::vector<basegfx::B2DRange> aRanges;
6124 std::shared_ptr<SwPaM> pPamForTextField;
6129 const SwTextField* pTextField =
p->GetFormatField().GetTextField();
6136 if (!pPamForTextField)
6138 SwPosition aStartPos(*pPamForTextField->GetMark());
6139 SwPosition aEndPos(*pPamForTextField->GetPoint());
constexpr OUStringLiteral sFrameName
static bool GetLayoutRTL()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual bool IsVisibleLayerId(SdrLayerID _nLayerId) const =0
method to determine, if a layer ID belongs to the visible ones.
virtual const SwFieldTypes * GetFieldTypes() const =0
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getBookmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
virtual const_iterator_t findBookmark(const OUString &rMark) const =0
Finds a bookmark by name.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
virtual SwTextNode * getOutlineNode(const tSortedOutlineNodeList::size_type nIdx) const =0
virtual tSortedOutlineNodeList::size_type getOutlineNodesCount() const =0
virtual OUString getOutlineText(const tSortedOutlineNodeList::size_type nIdx, SwRootFrame const *pLayout, const bool bWithNumber=true, const bool bWithSpacesForLevel=false, const bool bWithFootnote=true) const =0
virtual int getOutlineLevel(const tSortedOutlineNodeList::size_type nIdx) const =0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString GetURLNoMark(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool Paste(const TransferableDataHelper &rData, const OUString &rsDesc)
void Copy(TransferDataContainer &rData) const
RegionMode m_nDefaultDrag
constexpr tools::Long getY() const
bool IsObjMarked(SdrObject const *pObj) const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
size_t GetMarkedObjectCount() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual const OUString & GetName() const
virtual SdrObjKind GetObjIdentifier() const
virtual SdrLayerID GetLayer() const
virtual const tools::Rectangle & GetLogicRect() const
SdrPageView * GetSdrPageView() const
bool Execute(sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr, SfxCallMode nCall=SfxCallMode::SLOT)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
const OUString & GetEventName() const
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
const INetURLObject & GetURLObject() const
SfxMedium * GetMedium() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
const css::uno::Reference< css::frame::XController2 > & GetController() const
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
SfxViewFrame & GetViewFrame() const
virtual VclPtr< AbstractSwRenameXNamedDlg > CreateSwRenameXNamedDlg(weld::Widget *pParent, css::uno::Reference< css::container::XNamed > &xNamed, css::uno::Reference< css::container::XNameAccess > &xNameAccess)=0
static SwAbstractDialogFactory * Create()
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
SwContentTreeDropTarget(SwContentTree &rTreeView)
SwContentTree & m_rTreeView
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
TreeListBox for content indicator.
sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
void BringTypesWithFlowFramesToAttention(const std::vector< const SwNode * > &rNodes)
SwOutlineNodes::size_type m_nLastGotoContentWasOutlinePos
void SetOutlineTracking(sal_uInt8 nSet)
void BringURLFieldsToAttention(const SwGetINetAttrs &rINetAttrsArr)
void BringTextFieldsToAttention(std::vector< const SwTextAttr * > &rTextAttrsArr)
std::map< void *, bool > mOutLineNodeMap
void GotoContent(const SwContent *pCnt)
weld::TreeView & get_widget()
void SelectContentType(std::u16string_view rContentTypeName)
size_t GetEntryCount() const
SwNavigationPI * GetParentWindow()
void ExecCommand(std::u16string_view rCmd, bool bModifier)
Execute commands of the Navigator.
std::unique_ptr< weld::TreeIter > GetEntryAtAbsPos(size_t nAbsPos) const
void BringFootnotesToAttention(std::vector< const SwTextAttr * > &rTextAttrsArr)
void insert(const weld::TreeIter *pParent, const OUString &rStr, const OUString &rId, bool bChildrenOnDemand, weld::TreeIter *pRet)
void FindActiveTypeAndRemoveUserData()
Before any data will be deleted, the last active entry has to be found.
void ToggleToRoot()
Switch the display to Root.
void remove(const weld::TreeIter &rIter)
void BringFramesToAttention(const std::vector< const SwFrameFormat * > &rFrameFormats)
void SelectOutlinesWithSelection()
o3tl::enumarray< ContentTypeId, std::unique_ptr< SwContentType > > m_aHiddenContentArr
std::unique_ptr< sdr::overlay::OverlayObject > m_xOverlayObject
sal_uInt8 GetOutlineLevel() const
AutoTimer m_aOverlayObjectDelayTimer
std::vector< std::unique_ptr< weld::TreeIter > > m_aDndOutlinesSelected
bool m_bIsOutlineMoveable
sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
void SetConstantShell(SwWrtShell *pSh)
Set an open view as active.
bool RequestingChildren(const weld::TreeIter &rParent)
size_t GetAbsPos(const weld::TreeIter &rIter)
void MoveOutline(SwOutlineNodes::size_type nTargetPos)
virtual void Notify(SfxBroadcaster &rBC, SfxHint const &rHint) override
void Display(bool bActiveView)
Show the file.
void SetContentTypeTracking(ContentTypeId eCntTypeId, bool bSet)
bool FillTransferData(TransferDataContainer &rTransfer, sal_Int8 &rDragMode)
ContentTypeId m_nLastSelType
void SetHiddenShell(SwWrtShell *pSh)
After a file is dropped on the Navigator, the new shell will be set.
const SwWrtShell * GetActiveWrtShell() const
void Expand(const weld::TreeIter &rParent, std::vector< std::unique_ptr< weld::TreeIter > > *pNodesToExpand)
void EditEntry(const weld::TreeIter &rEntry, EditEntryMode nMode)
OUString m_aContextStrings[CONTEXT_COUNT+1]
void OverlayObject(std::vector< basegfx::B2DRange > &&aRanges={})
o3tl::enumarray< ContentTypeId, std::unique_ptr< SwContentType > > m_aActiveContentArr
void BringEntryToAttention(const weld::TreeIter &rEntry)
enum SwContentTree::State m_eState
bool HasContentChanged()
Check if the displayed content is valid.
SwWrtShell * m_pHiddenShell
void BringPostItFieldsToAttention(std::vector< const SwTextAttr * > &rTextAttrsArr)
ContentTypeId m_nRootType
SwNavigationConfig * m_pConfig
sal_uInt8 m_nOutlineLevel
void clear()
In the clear the content types have to be deleted, also.
SwWrtShell * GetWrtShell()
void DeleteOutlineSelections()
void SetActiveShell(SwWrtShell *pSh)
Document change - set new Shell.
size_t GetChildCount(const weld::TreeIter &rParent) const
o3tl::enumarray< ContentTypeId, bool > mTrackContentType
void BringReferencesToAttention(std::vector< const SwTextAttr * > &rTextAttrsArr)
SwWrtShell * m_pActiveShell
SwContentTree(std::unique_ptr< weld::TreeView > xTreeView, SwNavigationPI *pDialog)
void SetOutlineLevel(sal_uInt8 nSet)
void BringDrawingObjectsToAttention(std::vector< const SdrObject * > &rDrawingObjectsArr)
std::unique_ptr< weld::TreeView > m_xTreeView
void CopyOutlineSelections()
void SetRootType(ContentTypeId nType)
SwNavigationPI * m_pDialog
SdrObject * GetDrawingObjectsByContent(const SwContent *pCnt)
void InsertContent(const weld::TreeIter &rParent)
void BringBookmarksToAttention(const std::vector< OUString > &rNames)
void ExecuteContextMenuAction(const OUString &rSelectedPopupEntry)
sal_uInt8 m_nOutlineTracking
Content type, knows it's contents and the WrtShell.
void FillMemberList(bool *pbContentChanged=nullptr)
Fill the List of contents.
sal_uInt8 m_nOutlineLevel
void SetSortType(bool bAlphabetic)
virtual ~SwContentType() override
ContentTypeId GetType() const
SwContentType(SwWrtShell *pParent, ContentTypeId nType, sal_uInt8 nLevel)
std::unique_ptr< SwContentArr > m_pMember
size_t GetMemberCount() const
const OUString & GetTypeToken() const
const SwContent * GetMember(size_t nIndex)
Deliver content, for that if necessary fill the list.
ContentTypeId m_nContentType
static OUString RemoveNewline(const OUString &)
const OUString & GetName() const
const SwContentType * GetParent() const
SwContent(const SwContentType *pCnt, OUString aName, double nYPos)
virtual bool IsProtect() const
SAL_DLLPRIVATE void UpdateCursor(sal_uInt16 eFlags=SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE, bool bIdleEnd=false)
void Push()
store a copy of the current cursor on the cursor stack
bool IsReadOnlyAvailable() const
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
bool GotoPrevTOXBase(const OUString *=nullptr)
jump to previous index
Point & GetCursorDocPos() const
bool IsCursorVisible() const
virtual SwCursor & GetCurrentShellCursor() override
Return the current shell cursor.
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
void MakeOutlineSel(SwOutlineNodes::size_type nSttPos, SwOutlineNodes::size_type nEndPos, bool bWithChildren, bool bKillPams=true)
void EndAction(const bool bIdleEnd=false)
SwOutlineNodes::size_type GetOutlinePos(sal_uInt8 nLevel=UCHAR_MAX, SwPaM *pPaM=nullptr)
search "outline position" before previous outline node at given level
bool GetContentAtPos(const Point &rPt, SwContentAtPos &rContentAtPos, bool bSetCursor=false, SwRect *pFieldRect=nullptr)
void EndCursorMove(const bool bIdleEnd=false)
SwSectionFormats & GetSections()
static void CountWords(const SwPaM &rPaM, SwDocStat &rStat)
const sw::TableFrameFormats * GetTableFrameFormats() const
void DeleteFormatRefMark(const SwFormatRefMark *pFormatRefMark)
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
const SwFlyFrameFormat * FindFlyByName(const OUString &rName, SwNodeType nNdTyp=SwNodeType::NONE) const
SwFootnoteIdxs & GetFootnoteIdxs()
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
const SwAttrPool & GetAttrPool() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocShell * GetDocShell()
bool IsInHeaderFooter(const SwNode &) const
const SwDoc & GetDoc() const
void GetINetAttrs(SwGetINetAttrs &rArr, bool bIncludeInToxContent=true)
const SwTOXBase * GetCurTOX() const
Get current listing before or at the Cursor.
void StartAllAction()
For all views of this document.
size_t GetTableFrameFormatCount(bool bUsed=false) const
TABLE.
size_t GetSectionFormatCount() const
sal_uInt16 GetTOXCount() const
void GetGrfNms(OUString *pGrfName, OUString *pFltName, const SwFlyFrameFormat *=nullptr) const
Returns the name and the filter name of a graphic if the pointer is on a graphic.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
SwFrameFormat * GetTableFormat()
bool IsOutlineCopyable(SwOutlineNodes::size_type nIdx) const
const SwSection * GetCurrSection() const
const SwTOXBase * GetTOX(sal_uInt16 nPos) const
const SwNumRule * GetOutlineNumRule() const
sal_uInt16 GetRefMarks(std::vector< OUString > *=nullptr) const
get the names of all references in a Doc
bool IsProtectedOutlinePara() const
static bool IsTOXBaseReadonly(const SwTOXBase &rTOXBase)
const SwSectionFormat & GetSectionFormat(size_t nFormat) const
bool OutlineUpDown(short nOffset=1)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
bool IsOutlineMovable(SwOutlineNodes::size_type nIdx) const
May an outline be moved or copied? Check whether it's in text body, not in table, and not read-only (...
bool MoveOutlinePara(SwOutlineNodes::difference_type nOffset)
bool DeleteTOX(const SwTOXBase &rTOXBase, bool bDelNodes)
void SetTOXBaseReadonly(const SwTOXBase &rTOXBase, bool bReadonly)
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
const SwView & GetView() const
std::vector< SwFrameFormat const * > GetFlyFrameFormats(FlyCntType eType, bool bIgnoreTextBoxes)
OUString GetFlyName() const
bool IsFrameSelected() const
size_t GetFlyCount(FlyCntType eType, bool bIgnoreTextBoxes=false) const
Iterate over flys - for Basic-collections.
bool DeleteRow(bool bCompleteTable=false)
void EndTextEdit()
Deletes object if required.
size_t IsObjSelected() const
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position).
const SwPageDesc & GetPageDesc(size_t i) const
void GetSubTypes(SwFieldTypesEnum nId, std::vector< OUString > &rToFill)
Instances of SwFields and those derived from it occur 0 to n times.
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Base class of all fields.
SwFieldTypesEnum GetTypeId() const
virtual sal_uInt16 GetSubType() const
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
virtual OUString GetFieldName() const
get name or content
virtual OUString GetDescription() const
const SwNodeIndex * GetContentIdx() const
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
bool IsRefToNumItemCrossRefBookmark() const
bool IsRefToHeadingCrossRefBookmark() const
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
virtual ~SwGraphicContent() override
static SwView * GetNextView(SwView const *)
static SwView * GetFirstView()
void SetContentTypeTrack(ContentTypeId eCntTypeId, const bool bSet)
void SetActiveBlock(sal_Int32 nSet)
void SetOutlineTracking(sal_Int32 nSet)
void SetRootType(ContentTypeId nSet)
sal_Int32 GetActiveBlock() const
void SetOutlineLevel(sal_Int32 nSet)
sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
RegionMode GetRegionDropMode() const
void MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget)
std::unique_ptr< weld::Toolbar > m_xContent5ToolBox
static OUString CleanEntry(const OUString &rEntry)
void SetRegionDropMode(RegionMode nNewMode)
std::unique_ptr< weld::Toolbar > m_xContent6ToolBox
Marks a node in the document model.
SwNodeOffset GetIndex() const
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset nIdx)
Base class of the Writer document model elements.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwEndNode * EndOfSectionNode() const
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
SwContentNode * GoNext(SwNodeIndex *) const
const SwNumFormat & Get(sal_uInt16 i) const
SwOutlineNodes::size_type GetOutlinePos() const
static constexpr auto npos
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
const SwPosition * GetPoint() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
SwFrameFormat & GetMaster()
virtual bool IsProtect() const override
const SwFormatField * m_pField
const SwFormatField * GetPostIt() const
void Delete(const OUString &aAuthor)
const_iterator begin() const
void Hide(std::u16string_view rAuthor)
std::vector< std::unique_ptr< SwSidebarItem > >::const_iterator const_iterator
void SetActiveSidebarWin(sw::annotation::SwAnnotationWin *p)
const_iterator end() const
void AssureStdModeAtShell()
Of course Writer needs its own rectangles.
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Left(const tools::Long nLeft)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
OUString Apply(const OUString &rStr) const
A section node represents the start of a section on the UI, i.e.
bool IsHiddenFlag() const
const OUString & GetSectionName() const
SectionType GetType() const
virtual ~SwTOXBaseContent() override
const OUString & GetTOXName() const
virtual bool IsVisible() const
bool IsTOXBaseInReadonly() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableNode * GetTableNode() const
static SwTable * FindTable(SwFrameFormat const *const pFormat)
::sw::mark::IMark * GetAnnotationMark() const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SwFormatFootnote & GetFootnote() const
const SwFormatField * GetFormatField() const
virtual bool IsProtect() const override
const SwFormatField * m_pFormatField
SwTextNode & GetTextNode() const
static void DeleteTextField(const SwTextField &rTextField)
static void GetPamForTextField(const SwTextField &rTextField, std::shared_ptr< SwPaM > &rPamForTextField)
Represents the visualization of a paragraph.
virtual bool GetCharRect(SwRect &rRect, const SwPosition &rPos, SwCursorMoveState *pCMS=nullptr, bool bAllowFarAway=true) const override
Returns the view rectangle for the rPos model position.
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
SwTextNode is a paragraph in the document model.
virtual sal_Int32 Len() const override
SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const *pLayout=nullptr, SwListRedlineType eRedline=SwListRedlineType::SHOW) const
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
int GetAttrOutlineLevel() const
Returns outline level of this text node.
void SetAttrOutlineContentVisible(bool bVisible)
const SwTextNode & GetTextNode() const
const SwTextINetFormat * GetINetAttr() const
const SwTextINetFormat * m_pINetAttr
virtual bool IsProtect() const override
std::vector< SwSectionFormat * >::size_type size_type
bool IsViewLocked() const
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
const SwNodes & GetNodes() const
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
SwRootFrame * GetLayout() const
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
const IDocumentOutlineNodes * getIDocumentOutlineNodesAccess() const
const SfxItemPool & GetAttrPool() const
SwWrtShell & GetWrtShell() const
virtual SdrView * GetDrawView() const override
const tools::Rectangle & GetVisArea() const
SwPostItMgr * GetPostItMgr()
SwWrtShell * GetWrtShellPtr() const
SwDocShell * GetDocShell()
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
Used by the UI to modify the document model.
bool IsSelFrameMode() const
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
void GotoFormatField(const SwFormatField &rField)
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
bool GotoNextTOXBase(const OUString *pName=nullptr)
bool GotoDrawingObject(std::u16string_view rName)
bool IsOutlineContentVisible(const size_t nPos)
bool GetAttrOutlineContentVisible(const size_t nPos) const
bool GotoPage(sal_uInt16 nPage, bool bRecord)
void GotoMark(const ::sw::mark::IMark *const pMark)
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
bool GotoINetAttr(const SwTextINetFormat &rAttr)
SelectionType GetSelectionType() const
bool GotoTable(const OUString &rName)
void GotoFootnoteAnchor(const SwTextFootnote &rTextFootnote)
bool GotoRegion(std::u16string_view rName)
void GotoOutline(SwOutlineNodes::size_type nIdx)
bool DelRight(bool isReplaceHeuristic=false)
bool HasSelection() const
virtual void DrawSelChanged() override
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType=0, sal_uInt16 nSeqNo=0)
void InvalidateOutlineContentVisibility()
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const SwView & GetView() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
void CopyINetBookmark(const INetBookmark &rBkmk)
void CopyByteString(SotClipboardFormatId nFormatId, const OString &rStr)
bool GetString(SotClipboardFormatId nFormat, OUString &rStr) const
const Value & back() const
std::vector< Value >::difference_type difference_type
const_iterator begin() const
const_iterator end() const
std::vector< Value >::size_type size_type
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
virtual void KeyInput(const KeyEvent &rKEvt)
virtual void scroll_to_row(int row)=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const=0
virtual bool get_selected(TreeIter *pIter) const=0
virtual void expand_row(const TreeIter &rIter)=0
virtual bool get_row_expanded(const TreeIter &rIter) const=0
virtual OUString get_text(int row, int col=-1) const=0
virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter *pResult, bool bDnDMode, bool bAutoScroll=true)=0
virtual bool get_iter_first(TreeIter &rIter) const=0
virtual bool is_selected(int pos) const=0
virtual bool iter_next_sibling(TreeIter &rIter) const=0
virtual void select(int pos)=0
virtual bool iter_next(TreeIter &rIter) const=0
virtual int iter_compare(const TreeIter &a, const TreeIter &b) const=0
virtual void collapse_row(const TreeIter &rIter)=0
virtual bool iter_children(TreeIter &rIter) const=0
virtual bool get_children_on_demand(const TreeIter &rIter) const=0
virtual bool iter_has_child(const TreeIter &rIter) const=0
virtual void set_cursor(int pos)=0
virtual int get_iter_depth(const TreeIter &rIter) const=0
virtual int count_selected_rows() const=0
virtual OUString get_id(int pos) const=0
#define FN_OUTLINE_TO_CLIPBOARD
#define FN_FORMAT_FRAME_DLG
#define FN_FORMAT_FOOTNOTE_DLG
#define FN_FORMAT_GRAFIC_DLG
#define FN_FORMAT_TABLE_DLG
#define FN_TABLE_SELECT_ALL
#define FN_INSERT_MULTI_TOX
IMPL_LINK(SwContentTree, MousePressHdl, const MouseEvent &, rMEvt, bool)
IMPL_LINK_NOARG(SwContentTree, ContentDoubleClickHdl, weld::TreeView &, bool)
static void * lcl_GetOutlineKey(SwContentTree &rTree, SwOutlineContent const *pContent)
static void lcl_SetOutlineContentEntriesSensitivities(SwContentTree *pThis, const weld::TreeView &rContentTree, const weld::TreeIter &rEntry, weld::Menu &rPop)
static void lcl_SelectByContentTypeAndName(SwContentTree *pThis, weld::TreeView &rContentTree, std::u16string_view rContentTypeName, std::u16string_view rName)
const TranslateId STR_CONTEXT_ARY[]
static void lcl_CalcOverlayRanges(const SwTextFrame *pStartFrame, const SwTextFrame *pEndFrame, const SwPosition &aStartPos, const SwPosition &aEndPos, std::vector< basegfx::B2DRange > &aRanges)
static void lcl_AssureStdModeAtShell(SwWrtShell *pWrtShell)
static void lcl_SelectDrawObjectByName(weld::TreeView &rContentTree, std::u16string_view rName)
static bool lcl_InsertExpandCollapseAllItem(const weld::TreeView &rContentTree, const weld::TreeIter &rEntry, weld::Menu &rPop)
static void lcl_SelectByContentTypeAndAddress(SwContentTree *pThis, weld::TreeView &rContentTree, ContentTypeId nType, const void *ptr)
const TranslateId STR_CONTENT_TYPE_SINGLE_ARY[]
const TranslateId STR_CONTENT_TYPE_ARY[]
virtual OUString GetName() const override
virtual OUString GetURL() const override
std::vector< SwGetINetAttr > SwGetINetAttrs
EmbeddedObjectRef * pObject
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
constexpr OUStringLiteral HID_NAVIGATOR_TREELIST
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_C
constexpr sal_uInt16 KEY_SHIFT
constexpr sal_uInt16 KEY_MULTIPLY
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
tools::Long tSwNumTreeNumber
std::vector< tSwNumTreeNumber > tNumberVector
SfxDispatcher * GetDispatcher()
OString stripStart(const OString &rIn, char c)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
sal_Int64 toInt64(std::u16string_view str, sal_Int16 radix=10)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
size_t GetAbsPos(const weld::TreeView &rTreeView, const weld::TreeIter &rIter)
OUString toId(const void *pValue)
SwMoveFnCollection const & fnRegionEnd
SwMoveFnCollection const & fnTableStart
SwMoveFnCollection const & fnRegionStart
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
For querying the INet-attributes for Navigator.
Marks a position in the document model.
sal_Int32 GetContentIndex() const
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
Reference< XController > xController
Reference< XModel > xModel
OUString SwResId(TranslateId aId)
const sal_Unicode cMarkSeparator
constexpr sal_uInt8 MAXLEVEL
#define DND_ACTION_COPYMOVE
bool GotoCurrRegionAndSkip(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
bool GotoCurrTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)