LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ScContentTree Class Reference

#include <content.hxx>

Collaboration diagram for ScContentTree:
[legend]

Public Member Functions

 ScContentTree (std::unique_ptr< weld::TreeView > xTreeView, ScNavigatorDlg *pNavigatorDlg)
 
 ~ScContentTree ()
 
void SetNavigatorDlgFlag (bool isInNavigateDlg)
 
void hide ()
 
void show ()
 
void Refresh (ScContentId nType=ScContentId::ROOT)
 
void ToggleRoot ()
 
void SetRootType (ScContentId nNew)
 
ScContentId GetRootType () const
 
bool ActiveDocChanged ()
 
void ResetManualDoc ()
 
void SetManualDoc (const OUString &rName)
 
void LoadFile (const OUString &rUrl)
 
void SelectDoc (const OUString &rName)
 
void SelectEntryByName (const ScContentId nRoot, std::u16string_view rName)
 
const OUString & GetHiddenTitle () const
 
void ApplyNavigatorSettings ()
 Applies the navigator settings to the listbox. More...
 
void StoreNavigatorSettings ()
 Stores the current listbox state in the navigator settings. More...
 

Private Member Functions

ScDocShellGetManualOrCurrent ()
 
void InitRoot (ScContentId nType)
 
void ClearType (ScContentId nType)
 
void ClearAll ()
 
void InsertContent (ScContentId nType, const OUString &rValue)
 
void GetDrawNames (ScContentId nType)
 
void GetTableNames ()
 
void GetAreaNames ()
 
void GetDbNames ()
 
void GetLinkNames ()
 
void GetGraphicNames ()
 
void GetOleNames ()
 
void GetDrawingNames ()
 
void GetNoteStrings ()
 
bool DrawNamesChanged (ScContentId nType)
 
bool NoteStringsChanged ()
 
ScAddress GetNotePos (sal_uLong nIndex)
 
const ScAreaLinkGetLink (sal_uLong nIndex)
 
void GetEntryIndexes (ScContentId &rnRootIndex, sal_uLong &rnChildIndex, const weld::TreeIter *pEntry) const
 Returns the indexes of the specified listbox entry. More...
 
sal_uLong GetChildIndex (const weld::TreeIter *pEntry) const
 Returns the child index of the specified listbox entry. More...
 
ScDocumentGetSourceDocument ()
 
void freeze ()
 
void thaw ()
 
void LaunchAsyncStoreNavigatorSettings ()
 
 DECL_LINK (ContentDoubleClickHdl, weld::TreeView &, bool)
 
 DECL_LINK (MouseReleaseHdl, const MouseEvent &, bool)
 
 DECL_LINK (KeyInputHdl, const KeyEvent &, bool)
 
 DECL_LINK (AsyncStoreNavigatorSettings, void *, void)
 
 DECL_LINK (CommandHdl, const CommandEvent &, bool)
 
 DECL_LINK (QueryTooltipHdl, const weld::TreeIter &, OUString)
 
 DECL_LINK (DragBeginHdl, bool &, bool)
 

Static Private Member Functions

static bool IsPartOfType (ScContentId nContentType, SdrObjKind nObjIdentifier)
 

Private Attributes

std::unique_ptr< weld::TreeViewm_xTreeView
 
std::unique_ptr< weld::TreeIterm_xScratchIter
 
rtl::Reference< ScLinkTransferObjm_xTransferObj
 
ScNavigatorDlgpParentWindow
 
o3tl::enumarray< ScContentId, std::unique_ptr< weld::TreeIter > > m_aRootNodes
 
ScContentId nRootType
 
OUString aManualDoc
 
bool bHiddenDoc
 
OUString aHiddenName
 
OUString aHiddenTitle
 
ScDocumentpHiddenDocument
 
bool bIsInNavigatorDlg
 
bool m_bFreeze
 
ImplSVEventm_nAsyncMouseReleaseId
 
o3tl::enumarray< ScContentId, sal_uInt16 > pPosList
 

Detailed Description

Definition at line 43 of file content.hxx.

Constructor & Destructor Documentation

◆ ScContentTree()

ScContentTree::ScContentTree ( std::unique_ptr< weld::TreeView xTreeView,
ScNavigatorDlg pNavigatorDlg 
)

◆ ~ScContentTree()

ScContentTree::~ScContentTree ( )

Definition at line 157 of file content.cxx.

References m_nAsyncMouseReleaseId, and Application::RemoveUserEvent().

Member Function Documentation

◆ ActiveDocChanged()

bool ScContentTree::ActiveDocChanged ( )

◆ ApplyNavigatorSettings()

void ScContentTree::ApplyNavigatorSettings ( )

◆ ClearAll()

void ScContentTree::ClearAll ( )
private

Definition at line 199 of file content.cxx.

References freeze(), i, InitRoot(), LAST, m_bFreeze, m_xTreeView, and thaw().

Referenced by ClearType().

◆ ClearType()

void ScContentTree::ClearType ( ScContentId  nType)
private

Definition at line 216 of file content.cxx.

References ClearAll(), InitRoot(), m_aRootNodes, m_xTreeView, nType, and ROOT.

Referenced by Refresh().

◆ DECL_LINK() [1/7]

ScContentTree::DECL_LINK ( AsyncStoreNavigatorSettings  ,
void *  ,
void   
)
private

◆ DECL_LINK() [2/7]

ScContentTree::DECL_LINK ( CommandHdl  ,
const CommandEvent ,
bool   
)
private

◆ DECL_LINK() [3/7]

ScContentTree::DECL_LINK ( ContentDoubleClickHdl  ,
weld::TreeView ,
bool   
)
private

◆ DECL_LINK() [4/7]

ScContentTree::DECL_LINK ( DragBeginHdl  ,
bool &  ,
bool   
)
private

◆ DECL_LINK() [5/7]

ScContentTree::DECL_LINK ( KeyInputHdl  ,
const KeyEvent ,
bool   
)
private

◆ DECL_LINK() [6/7]

ScContentTree::DECL_LINK ( MouseReleaseHdl  ,
const MouseEvent ,
bool   
)
private

◆ DECL_LINK() [7/7]

ScContentTree::DECL_LINK ( QueryTooltipHdl  ,
const weld::TreeIter ,
OUString   
)
private

◆ DrawNamesChanged()

bool ScContentTree::DrawNamesChanged ( ScContentId  nType)
private

◆ freeze()

void ScContentTree::freeze ( )
inlineprivate

Definition at line 100 of file content.hxx.

References m_bFreeze, and m_xTreeView.

Referenced by ClearAll(), and Refresh().

◆ GetAreaNames()

void ScContentTree::GetAreaNames ( )
private

◆ GetChildIndex()

sal_uLong ScContentTree::GetChildIndex ( const weld::TreeIter pEntry) const
private

Returns the child index of the specified listbox entry.

Parameters
pEntryThe entry to examine or NULL for the selected entry.
Returns
Index of the entry inside its root or SC_CONTENT_NOCHILD if entry is root.

Definition at line 293 of file content.cxx.

References GetEntryIndexes().

◆ GetDbNames()

void ScContentTree::GetDbNames ( )
private

◆ GetDrawingNames()

void ScContentTree::GetDrawingNames ( )
private

Definition at line 887 of file content.cxx.

References DRAWING, and GetDrawNames().

Referenced by Refresh().

◆ GetDrawNames()

void ScContentTree::GetDrawNames ( ScContentId  nType)
private

◆ GetEntryIndexes()

void ScContentTree::GetEntryIndexes ( ScContentId rnRootIndex,
sal_uLong rnChildIndex,
const weld::TreeIter pEntry 
) const
private

Returns the indexes of the specified listbox entry.

Parameters
rnRootIndexRoot index of specified entry is returned.
rnChildIndexIndex of the entry inside its root is returned (or SC_CONTENT_NOCHILD if entry is root).
pEntryThe entry to examine.

Definition at line 246 of file content.cxx.

References i, LAST, m_aRootNodes, m_xTreeView, ROOT, SC_CONTENT_NOCHILD, and UL.

Referenced by GetChildIndex(), and StoreNavigatorSettings().

◆ GetGraphicNames()

void ScContentTree::GetGraphicNames ( )
private

Definition at line 877 of file content.cxx.

References GetDrawNames(), and GRAPHIC.

Referenced by Refresh().

◆ GetHiddenTitle()

const OUString & ScContentTree::GetHiddenTitle ( ) const
inline

Definition at line 153 of file content.hxx.

References aHiddenTitle.

◆ GetLink()

const ScAreaLink * ScContentTree::GetLink ( sal_uLong  nIndex)
private

◆ GetLinkNames()

void ScContentTree::GetLinkNames ( )
private

◆ GetManualOrCurrent()

ScDocShell * ScContentTree::GetManualOrCurrent ( )
private

◆ GetNotePos()

ScAddress ScContentTree::GetNotePos ( sal_uLong  nIndex)
private

Definition at line 967 of file content.cxx.

References ScDocument::GetNotePosition(), GetSourceDocument(), and nIndex.

◆ GetNoteStrings()

void ScContentTree::GetNoteStrings ( )
private

◆ GetOleNames()

void ScContentTree::GetOleNames ( )
private

Definition at line 882 of file content.cxx.

References GetDrawNames(), and OLEOBJECT.

Referenced by Refresh().

◆ GetRootType()

ScContentId ScContentTree::GetRootType ( ) const
inline

Definition at line 142 of file content.hxx.

References nRootType.

◆ GetSourceDocument()

ScDocument * ScContentTree::GetSourceDocument ( )
private

◆ GetTableNames()

void ScContentTree::GetTableNames ( )
private

◆ hide()

void ScContentTree::hide ( )
inline

Definition at line 128 of file content.hxx.

References m_xTreeView.

◆ InitRoot()

void ScContentTree::InitRoot ( ScContentId  nType)
private

◆ InsertContent()

void ScContentTree::InsertContent ( ScContentId  nType,
const OUString &  rValue 
)
private

Definition at line 232 of file content.cxx.

References m_aRootNodes, m_xScratchIter, m_xTreeView, and nType.

Referenced by GetAreaNames(), GetDbNames(), GetLinkNames(), and GetTableNames().

◆ IsPartOfType()

bool ScContentTree::IsPartOfType ( ScContentId  nContentType,
SdrObjKind  nObjIdentifier 
)
staticprivate

Definition at line 796 of file content.cxx.

References DRAWING, GRAPHIC, and OLEOBJECT.

Referenced by DrawNamesChanged(), and GetDrawNames().

◆ LaunchAsyncStoreNavigatorSettings()

void ScContentTree::LaunchAsyncStoreNavigatorSettings ( )
private

Definition at line 400 of file content.cxx.

References LINK, m_nAsyncMouseReleaseId, and Application::PostUserEvent().

◆ LoadFile()

void ScContentTree::LoadFile ( const OUString &  rUrl)

◆ NoteStringsChanged()

bool ScContentTree::NoteStringsChanged ( )
private

◆ Refresh()

void ScContentTree::Refresh ( ScContentId  nType = ScContentId::ROOT)

◆ ResetManualDoc()

void ScContentTree::ResetManualDoc ( )

Definition at line 1416 of file content.cxx.

References ActiveDocChanged(), aManualDoc, and bHiddenDoc.

Referenced by SelectDoc().

◆ SelectDoc()

void ScContentTree::SelectDoc ( const OUString &  rName)

◆ SelectEntryByName()

void ScContentTree::SelectEntryByName ( const ScContentId  nRoot,
std::u16string_view  rName 
)

Definition at line 1519 of file content.cxx.

References m_aRootNodes, m_xTreeView, and StoreNavigatorSettings().

◆ SetManualDoc()

void ScContentTree::SetManualDoc ( const OUString &  rName)

Definition at line 1461 of file content.cxx.

References aManualDoc, bHiddenDoc, ScNavigatorDlg::GetDocNames(), pParentWindow, and Refresh().

Referenced by SelectDoc().

◆ SetNavigatorDlgFlag()

void ScContentTree::SetNavigatorDlgFlag ( bool  isInNavigateDlg)
inline

Definition at line 126 of file content.hxx.

References bIsInNavigatorDlg.

◆ SetRootType()

void ScContentTree::SetRootType ( ScContentId  nNew)

Definition at line 1376 of file content.cxx.

References nRootType, Refresh(), SC_MOD, and ScNavipiCfg::SetRootType().

Referenced by ToggleRoot().

◆ show()

void ScContentTree::show ( )
inline

Definition at line 133 of file content.hxx.

References m_xTreeView.

◆ StoreNavigatorSettings()

void ScContentTree::StoreNavigatorSettings ( )

◆ thaw()

void ScContentTree::thaw ( )
inlineprivate

Definition at line 106 of file content.hxx.

References m_bFreeze, and m_xTreeView.

Referenced by ClearAll(), and Refresh().

◆ ToggleRoot()

void ScContentTree::ToggleRoot ( )

Definition at line 1388 of file content.cxx.

References i, LAST, m_aRootNodes, m_xTreeView, nRootType, ROOT, and SetRootType().

Member Data Documentation

◆ aHiddenName

OUString ScContentTree::aHiddenName
private

Definition at line 53 of file content.hxx.

Referenced by LoadFile(), and SelectDoc().

◆ aHiddenTitle

OUString ScContentTree::aHiddenTitle
private

Definition at line 54 of file content.hxx.

Referenced by ActiveDocChanged(), GetHiddenTitle(), LoadFile(), and SelectDoc().

◆ aManualDoc

OUString ScContentTree::aManualDoc
private

Definition at line 51 of file content.hxx.

Referenced by ActiveDocChanged(), GetManualOrCurrent(), ResetManualDoc(), and SetManualDoc().

◆ bHiddenDoc

bool ScContentTree::bHiddenDoc
private

◆ bIsInNavigatorDlg

bool ScContentTree::bIsInNavigatorDlg
private

Definition at line 56 of file content.hxx.

Referenced by GetDrawNames(), and SetNavigatorDlgFlag().

◆ m_aRootNodes

o3tl::enumarray<ScContentId, std::unique_ptr<weld::TreeIter> > ScContentTree::m_aRootNodes
private

◆ m_bFreeze

bool ScContentTree::m_bFreeze
private

Definition at line 57 of file content.hxx.

Referenced by ClearAll(), freeze(), and thaw().

◆ m_nAsyncMouseReleaseId

ImplSVEvent* ScContentTree::m_nAsyncMouseReleaseId
private

◆ m_xScratchIter

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

Definition at line 46 of file content.hxx.

Referenced by GetNoteStrings(), and InsertContent().

◆ m_xTransferObj

rtl::Reference<ScLinkTransferObj> ScContentTree::m_xTransferObj
private

Definition at line 47 of file content.hxx.

Referenced by ScContentTree().

◆ m_xTreeView

std::unique_ptr<weld::TreeView> ScContentTree::m_xTreeView
private

◆ nRootType

ScContentId ScContentTree::nRootType
private

◆ pHiddenDocument

ScDocument* ScContentTree::pHiddenDocument
private

Definition at line 55 of file content.hxx.

Referenced by GetSourceDocument(), LoadFile(), and Refresh().

◆ pParentWindow

ScNavigatorDlg* ScContentTree::pParentWindow
private

Definition at line 48 of file content.hxx.

Referenced by ActiveDocChanged(), LoadFile(), SelectDoc(), and SetManualDoc().

◆ pPosList

o3tl::enumarray<ScContentId, sal_uInt16> ScContentTree::pPosList
private

Definition at line 60 of file content.hxx.

Referenced by InitRoot(), and ScContentTree().


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