LibreOffice Module sw (master)  1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SwContentTree Class Referencefinal

TreeListBox for content indicator. More...

#include <conttree.hxx>

Inheritance diagram for SwContentTree:
[legend]
Collaboration diagram for SwContentTree:
[legend]

Public Member Functions

 SwContentTree (std::unique_ptr< weld::TreeView > xTreeView, SwNavigationPI *pDialog)
 
 ~SwContentTree ()
 
SdrObjectGetDrawingObjectsByContent (const SwContent *pCnt)
 
void ToggleToRoot ()
 Switch the display to Root. More...
 
void SetRootType (ContentTypeId nType)
 
void Display (bool bActiveView)
 Show the file. More...
 
void clear ()
 In the clear the content types have to be deleted, also. More...
 
void SetHiddenShell (SwWrtShell *pSh)
 After a file is dropped on the Navigator, the new shell will be set. More...
 
void ShowHiddenShell ()
 
void ShowActualView ()
 
void SetActiveShell (SwWrtShell *pSh)
 Document change - set new Shell. More...
 
void SetConstantShell (SwWrtShell *pSh)
 Set an open view as active. More...
 
SwWrtShellGetWrtShell ()
 
bool IsInDrag () const
 
sal_uInt8 GetOutlineLevel () const
 
void SetOutlineLevel (sal_uInt8 nSet)
 
void ExecCommand (const OString &rCmd, bool bModifier)
 Execute commands of the Navigator. More...
 
void ShowTree ()
 
void HideTree ()
 
bool IsConstantView () const
 
bool IsActiveView () const
 
bool IsHiddenView () const
 
const SwWrtShellGetActiveWrtShell () const
 
SwWrtShellGetHiddenWrtShell ()
 
void Select ()
 
bool RequestingChildren (const weld::TreeIter &rParent)
 
virtual void Notify (SfxBroadcaster &rBC, SfxHint const &rHint) override
 
sal_Int8 AcceptDrop (const AcceptDropEvent &rEvt)
 
sal_Int8 ExecuteDrop (const ExecuteDropEvent &rEvt)
 
bool IsDropFormatSupported (SotClipboardFormatId nFormat)
 
void set_accessible_name (const OUString &rName)
 
void grab_focus ()
 
OUString get_selected_text () const
 
int count_selected_rows () const
 
void set_selection_mode (SelectionMode eMode)
 
weld::TreeViewget_widget ()
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 

Private Types

enum  State {
  State::ACTIVE,
  State::CONSTANT,
  State::HIDDEN
}
 

Private Member Functions

void FindActiveTypeAndRemoveUserData ()
 Before any data will be deleted, the last active entry has to be found. More...
 
void insert (const weld::TreeIter *pParent, const OUString &rStr, const OUString &rId, bool bChildrenOnDemand, weld::TreeIter *pRet)
 
void remove (const weld::TreeIter &rIter)
 
SwNavigationPIGetParentWindow ()
 
bool FillTransferData (TransferDataContainer &rTransfer, sal_Int8 &rDragMode)
 
bool HasContentChanged ()
 Check if the displayed content is valid. More...
 
size_t GetAbsPos (const weld::TreeIter &rIter)
 
void EditEntry (const weld::TreeIter &rEntry, EditEntryMode nMode)
 
void GotoContent (const SwContent *pCnt)
 
void ExecuteContextMenuAction (const OString &rSelectedPopupEntry)
 
void DeleteOutlineSelections ()
 
size_t GetEntryCount () const
 
size_t GetChildCount (const weld::TreeIter &rParent) const
 
std::unique_ptr< weld::TreeIterGetEntryAtAbsPos (size_t nAbsPos) const
 
void Expand (const weld::TreeIter &rParent, std::vector< std::unique_ptr< weld::TreeIter >> *pNodesToExpand)
 
void MoveOutline (SwOutlineNodes::size_type nTargetPos)
 
void UpdateLastSelType ()
 
 DECL_LINK (ExpandHdl, const weld::TreeIter &, bool)
 Expand - Remember the state for content types. More...
 
 DECL_LINK (CollapseHdl, const weld::TreeIter &, bool)
 Collapse - Remember the state for content types. More...
 
 DECL_LINK (ContentDoubleClickHdl, weld::TreeView &, bool)
 
 DECL_LINK (SelectHdl, weld::TreeView &, void)
 
 DECL_LINK (FocusHdl, weld::Widget &, void)
 
 DECL_LINK (KeyInputHdl, const KeyEvent &, bool)
 
 DECL_LINK (CommandHdl, const CommandEvent &, bool)
 
 DECL_LINK (QueryTooltipHdl, const weld::TreeIter &, OUString)
 
 DECL_LINK (DragBeginHdl, bool &, bool)
 
 DECL_LINK (TimerUpdate, Timer *, void)
 

Private Attributes

std::unique_ptr< weld::TreeViewm_xTreeView
 
std::unique_ptr< weld::TreeIterm_xScratchIter
 
SwContentTreeDropTarget m_aDropTargetHelper
 
VclPtr< SwNavigationPIm_xDialog
 
OUString m_sSpace
 
AutoTimer m_aUpdTimer
 
o3tl::enumarray< ContentTypeId, std::unique_ptr< SwContentType > > m_aActiveContentArr
 
o3tl::enumarray< ContentTypeId, std::unique_ptr< SwContentType > > m_aHiddenContentArr
 
OUString m_aContextStrings [CONTEXT_COUNT+1]
 
OUString m_sInvisible
 
SwWrtShellm_pHiddenShell
 
SwWrtShellm_pActiveShell
 
SwNavigationConfigm_pConfig
 
std::map< void *, bool > mOutLineNodeMap
 
sal_Int32 m_nActiveBlock
 
sal_Int32 m_nHiddenBlock
 
size_t m_nEntryCount
 
ContentTypeId m_nRootType
 
ContentTypeId m_nLastSelType
 
sal_uInt8 m_nOutlineLevel
 
sal_uInt32 m_nOutlineTracking = 1
 
enum SwContentTree::State m_eState
 
bool m_bIsRoot:1
 
bool m_bIsIdleClear:1
 
bool m_bIsLastReadOnly:1
 
bool m_bIsOutlineMoveable:1
 
bool m_bViewHasChanged:1
 
std::vector< std::unique_ptr< weld::TreeIter > > m_aDndOutlinesSelected
 
bool m_bIsInPromoteDemote = false
 

Detailed Description

TreeListBox for content indicator.

Definition at line 84 of file conttree.hxx.

Member Enumeration Documentation

enum SwContentTree::State
strongprivate
Enumerator
ACTIVE 
CONSTANT 
HIDDEN 

Definition at line 113 of file conttree.hxx.

Constructor & Destructor Documentation

SwContentTree::SwContentTree ( std::unique_ptr< weld::TreeView xTreeView,
SwNavigationPI pDialog 
)
SwContentTree::~SwContentTree ( )

Member Function Documentation

sal_Int8 SwContentTree::AcceptDrop ( const AcceptDropEvent rEvt)
void SwContentTree::clear ( )

In the clear the content types have to be deleted, also.

Definition at line 2040 of file content.cxx.

References m_nEntryCount, and m_xTreeView.

Referenced by Display(), SetActiveShell(), and ~SwContentTree().

int SwContentTree::count_selected_rows ( ) const
inline

Definition at line 256 of file conttree.hxx.

SwContentTree::DECL_LINK ( ExpandHdl  ,
const weld::TreeIter ,
bool   
)
private

Expand - Remember the state for content types.

SwContentTree::DECL_LINK ( CollapseHdl  ,
const weld::TreeIter ,
bool   
)
private

Collapse - Remember the state for content types.

SwContentTree::DECL_LINK ( ContentDoubleClickHdl  ,
weld::TreeView ,
bool   
)
private
SwContentTree::DECL_LINK ( SelectHdl  ,
weld::TreeView ,
void   
)
private
SwContentTree::DECL_LINK ( FocusHdl  ,
weld::Widget ,
void   
)
private
SwContentTree::DECL_LINK ( KeyInputHdl  ,
const KeyEvent ,
bool   
)
private
SwContentTree::DECL_LINK ( CommandHdl  ,
const CommandEvent ,
bool   
)
private
SwContentTree::DECL_LINK ( QueryTooltipHdl  ,
const weld::TreeIter ,
OUString   
)
private
SwContentTree::DECL_LINK ( DragBeginHdl  ,
bool &  ,
bool   
)
private
SwContentTree::DECL_LINK ( TimerUpdate  ,
Timer ,
void   
)
private
void SwContentTree::DeleteOutlineSelections ( )
private
void SwContentTree::Display ( bool  bActiveView)
void SwContentTree::EditEntry ( const weld::TreeIter rEntry,
EditEntryMode  nMode 
)
private

Definition at line 3638 of file content.cxx.

References SwRewriter::AddRule(), Any, SwRewriter::Apply(), assert(), SwPostItMgr::AssureStdModeAtShell(), BOOKMARK, SwAbstractDialogFactory::Create(), SwAbstractDialogFactory::CreateSwRenameXNamedDlg(), DELETE, IDocumentMarkAccess::deleteMark(), DeleteOutlineSelections(), SwFEShell::DeleteRow(), SwEditShell::DeleteTOX(), SwWrtShell::DelRight(), DRAWOBJECT, EDIT, SwCursorShell::EndAction(), SwEditShell::EndUndo(), SfxDispatcher::Execute(), SfxDispatcher::ExecuteList(), IDocumentMarkAccess::findMark(), FN_EDIT_FIELD, FN_EDIT_REGION, FN_FORMAT_FRAME_DLG, FN_FORMAT_GRAFIC_DLG, FN_FORMAT_TABLE_DLG, FN_INSERT_BOOKMARK, FN_INSERT_MULTI_TOX, FN_NAME_SHAPE, FN_POSTIT, FN_TABLE_SELECT_ALL, FRAME, IDocumentSettingAccess::get(), SfxObjectShell::GetBaseModel(), SfxViewFrame::GetDispatcher(), GetDispatcher(), SwView::GetDocShell(), GetFrameWeld(), SwViewShell::getIDocumentMarkAccess(), SwViewShell::getIDocumentSettingAccess(), SwContent::GetName(), SwContent::GetParent(), GetParentWindow(), SwView::GetPostItMgr(), SwTOXBase::GetTOXName(), SwContentType::GetType(), SwWrtShell::GetView(), SfxViewShell::GetViewFrame(), GotoContent(), grab_focus(), GRAPHIC, INDEX, m_aUpdTimer, m_bViewHasChanged, m_pActiveShell, m_xTreeView, nType, OLE, OUTLINE, POSTIT, PROTECT_BOOKMARKS, REFERENCE, REGION, RENAME, RMV_IDX, SwPostItMgr::SetActiveSidebarWin(), SwCursorShell::StartAction(), SwEditShell::StartUndo(), SwResId(), TABLE, UndoArg1, UndoArg2, UndoArg3, UNPROTECT_TABLE, UPD_IDX, SwNavigationPI::UpdateListBox(), URLFIELD, and xModel.

Referenced by ExecuteContextMenuAction().

void SwContentTree::ExecCommand ( const OString &  rCmd,
bool  bModifier 
)
void SwContentTree::ExecuteContextMenuAction ( const OString &  rSelectedPopupEntry)
private
sal_Int8 SwContentTree::ExecuteDrop ( const ExecuteDropEvent rEvt)
void SwContentTree::Expand ( const weld::TreeIter rParent,
std::vector< std::unique_ptr< weld::TreeIter >> *  pNodesToExpand 
)
private
bool SwContentTree::FillTransferData ( TransferDataContainer rTransfer,
sal_Int8 rDragMode 
)
private
void SwContentTree::FindActiveTypeAndRemoveUserData ( )
private

Before any data will be deleted, the last active entry has to be found.

After this the UserData will be deleted

Definition at line 2451 of file content.cxx.

References m_xTreeView, and UpdateLastSelType().

Referenced by SetActiveShell(), SetConstantShell(), SetHiddenShell(), and ToggleToRoot().

OUString SwContentTree::get_selected_text ( ) const
inline

Definition at line 251 of file conttree.hxx.

weld::TreeView& SwContentTree::get_widget ( )
inline

Definition at line 266 of file conttree.hxx.

References m_xTreeView.

Referenced by SwContentTreeDropTarget::AcceptDrop().

size_t SwContentTree::GetAbsPos ( const weld::TreeIter rIter)
private

Definition at line 1769 of file content.cxx.

References weld::GetAbsPos(), and m_xTreeView.

Referenced by Display(), and ExecCommand().

const SwWrtShell* SwContentTree::GetActiveWrtShell ( ) const
inline

Definition at line 223 of file conttree.hxx.

References m_pActiveShell.

size_t SwContentTree::GetChildCount ( const weld::TreeIter rParent) const
private

Definition at line 1779 of file content.cxx.

References m_xTreeView.

Referenced by HasContentChanged().

SdrObject * SwContentTree::GetDrawingObjectsByContent ( const SwContent pCnt)
std::unique_ptr< weld::TreeIter > SwContentTree::GetEntryAtAbsPos ( size_t  nAbsPos) const
private

Definition at line 1802 of file content.cxx.

References m_xTreeView.

Referenced by ExecCommand().

size_t SwContentTree::GetEntryCount ( ) const
private

Definition at line 1774 of file content.cxx.

References m_nEntryCount.

Referenced by Display(), and ExecCommand().

SwWrtShell* SwContentTree::GetHiddenWrtShell ( )
inline

Definition at line 224 of file conttree.hxx.

References m_pHiddenShell.

sal_uInt8 SwContentTree::GetOutlineLevel ( ) const
inline

Definition at line 210 of file conttree.hxx.

References m_nOutlineLevel.

Referenced by ExecCommand(), HasContentChanged(), and RequestingChildren().

SwNavigationPI * SwContentTree::GetParentWindow ( )
private
SwWrtShell* SwContentTree::GetWrtShell ( )
inline
void SwContentTree::GotoContent ( const SwContent pCnt)
private
void SwContentTree::grab_focus ( )
inline

Definition at line 246 of file conttree.hxx.

Referenced by EditEntry().

bool SwContentTree::HasContentChanged ( )
private
void SwContentTree::HideTree ( )

Definition at line 2886 of file content.cxx.

References m_aUpdTimer, m_xTreeView, and Task::Stop().

void SwContentTree::insert ( const weld::TreeIter pParent,
const OUString &  rStr,
const OUString &  rId,
bool  bChildrenOnDemand,
weld::TreeIter pRet 
)
private

Definition at line 1408 of file content.cxx.

References m_nEntryCount, and m_xTreeView.

Referenced by Display(), and RequestingChildren().

bool SwContentTree::IsActiveView ( ) const
inline

Definition at line 220 of file conttree.hxx.

References ACTIVE, and m_eState.

bool SwContentTree::IsConstantView ( ) const
inline

Definition at line 219 of file conttree.hxx.

References CONSTANT, and m_eState.

bool SwContentTree::IsDropFormatSupported ( SotClipboardFormatId  nFormat)
inline

Definition at line 236 of file conttree.hxx.

References DropTargetHelper::IsDropFormatSupported().

bool SwContentTree::IsHiddenView ( ) const
inline

Definition at line 221 of file conttree.hxx.

References HIDDEN, and m_eState.

bool SwContentTree::IsInDrag ( ) const

Definition at line 995 of file content.cxx.

References m_xTreeView.

Referenced by AcceptDrop(), and ExecuteDrop().

void SwContentTree::MoveOutline ( SwOutlineNodes::size_type  nTargetPos)
private
void SwContentTree::Notify ( SfxBroadcaster rBC,
SfxHint const &  rHint 
)
overridevirtual
void SwContentTree::remove ( const weld::TreeIter rIter)
private

Definition at line 1415 of file content.cxx.

References m_nEntryCount, m_xTreeView, and void().

bool SwContentTree::RequestingChildren ( const weld::TreeIter rParent)
void SwContentTree::Select ( )
void SwContentTree::set_accessible_name ( const OUString &  rName)
inline

Definition at line 241 of file conttree.hxx.

void SwContentTree::set_selection_mode ( SelectionMode  eMode)
inline

Definition at line 261 of file conttree.hxx.

void SwContentTree::SetActiveShell ( SwWrtShell pSh)
void SwContentTree::SetConstantShell ( SwWrtShell pSh)
void SwContentTree::SetHiddenShell ( SwWrtShell pSh)

After a file is dropped on the Navigator, the new shell will be set.

Definition at line 2463 of file content.cxx.

References Display(), FindActiveTypeAndRemoveUserData(), GetParentWindow(), HIDDEN, i, m_aHiddenContentArr, m_eState, m_pHiddenShell, and SwNavigationPI::UpdateListBox().

void SwContentTree::SetOutlineLevel ( sal_uInt8  nSet)
void SwContentTree::SetRootType ( ContentTypeId  nType)

Definition at line 3618 of file content.cxx.

References m_bIsRoot, m_nRootType, m_pConfig, and SwNavigationConfig::SetRootType().

void SwContentTree::ShowActualView ( )
void SwContentTree::ShowHiddenShell ( )

Definition at line 3563 of file content.cxx.

References Display(), HIDDEN, m_eState, and m_pHiddenShell.

void SwContentTree::ShowTree ( )

Definition at line 2880 of file content.cxx.

References m_aUpdTimer, m_xTreeView, and Timer::Start().

void SwContentTree::ToggleToRoot ( )
void SwContentTree::UpdateLastSelType ( )
private

Definition at line 2435 of file content.cxx.

References assert(), m_nLastSelType, m_xTreeView, and nId.

Referenced by Display(), and FindActiveTypeAndRemoveUserData().

Member Data Documentation

o3tl::enumarray<ContentTypeId,std::unique_ptr<SwContentType> > SwContentTree::m_aActiveContentArr
private
OUString SwContentTree::m_aContextStrings[CONTEXT_COUNT+1]
private

Definition at line 95 of file conttree.hxx.

Referenced by SwContentTree().

std::vector<std::unique_ptr<weld::TreeIter> > SwContentTree::m_aDndOutlinesSelected
private

Definition at line 122 of file conttree.hxx.

Referenced by MoveOutline().

SwContentTreeDropTarget SwContentTree::m_aDropTargetHelper
private

Definition at line 88 of file conttree.hxx.

o3tl::enumarray<ContentTypeId,std::unique_ptr<SwContentType> > SwContentTree::m_aHiddenContentArr
private

Definition at line 94 of file conttree.hxx.

Referenced by Display(), SetHiddenShell(), SetOutlineLevel(), and SwContentTree().

AutoTimer SwContentTree::m_aUpdTimer
private
bool SwContentTree::m_bIsIdleClear
private

Definition at line 116 of file conttree.hxx.

bool SwContentTree::m_bIsInPromoteDemote = false
private

Definition at line 124 of file conttree.hxx.

Referenced by Display(), ExecCommand(), and Notify().

bool SwContentTree::m_bIsLastReadOnly
private

Definition at line 117 of file conttree.hxx.

Referenced by Display(), Notify(), and Select().

bool SwContentTree::m_bIsOutlineMoveable
private

Definition at line 118 of file conttree.hxx.

Referenced by AcceptDrop(), and FillTransferData().

bool SwContentTree::m_bIsRoot
private
bool SwContentTree::m_bViewHasChanged
private

Definition at line 119 of file conttree.hxx.

Referenced by EditEntry(), ExecuteContextMenuAction(), and Notify().

enum SwContentTree::State SwContentTree::m_eState
private
sal_Int32 SwContentTree::m_nActiveBlock
private

Definition at line 104 of file conttree.hxx.

Referenced by Display(), Expand(), and SwContentTree().

size_t SwContentTree::m_nEntryCount
private

Definition at line 106 of file conttree.hxx.

Referenced by clear(), GetEntryCount(), insert(), and remove().

sal_Int32 SwContentTree::m_nHiddenBlock
private

Definition at line 105 of file conttree.hxx.

Referenced by Display(), and Expand().

ContentTypeId SwContentTree::m_nLastSelType
private

Definition at line 108 of file conttree.hxx.

Referenced by Display(), and UpdateLastSelType().

sal_uInt8 SwContentTree::m_nOutlineLevel
private
sal_uInt32 SwContentTree::m_nOutlineTracking = 1
private

Definition at line 111 of file conttree.hxx.

Referenced by ExecuteContextMenuAction().

ContentTypeId SwContentTree::m_nRootType
private
SwWrtShell* SwContentTree::m_pActiveShell
private
SwNavigationConfig* SwContentTree::m_pConfig
private

Definition at line 100 of file conttree.hxx.

Referenced by Expand(), SetOutlineLevel(), SetRootType(), SwContentTree(), and ToggleToRoot().

SwWrtShell* SwContentTree::m_pHiddenShell
private

Definition at line 98 of file conttree.hxx.

Referenced by GetHiddenWrtShell(), SetHiddenShell(), and ShowHiddenShell().

OUString SwContentTree::m_sInvisible
private

Definition at line 96 of file conttree.hxx.

OUString SwContentTree::m_sSpace
private

Definition at line 90 of file conttree.hxx.

Referenced by Display(), HasContentChanged(), and RequestingChildren().

VclPtr<SwNavigationPI> SwContentTree::m_xDialog
private

Definition at line 89 of file conttree.hxx.

Referenced by GetParentWindow(), SwContentTree(), and ~SwContentTree().

std::unique_ptr<weld::TreeIter> SwContentTree::m_xScratchIter
private

Definition at line 87 of file conttree.hxx.

std::unique_ptr<weld::TreeView> SwContentTree::m_xTreeView
private
std::map< void*, bool > SwContentTree::mOutLineNodeMap
private

Definition at line 102 of file conttree.hxx.

Referenced by ExecuteDrop(), and Expand().


The documentation for this class was generated from the following files: