LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static 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 ObjectFresh (ScContentId nType, const weld::TreeIter *pEntry=nullptr)
 
void SetNavigatorDlgFlag (bool isInNavigateDlg)
 
void set_selection_mode (SelectionMode eMode)
 
void set_size_request (int nWidth, int nHeight)
 
void hide ()
 
void show ()
 
void Refresh (ScContentId nType=ScContentId::ROOT)
 
void ToggleRoot ()
 
void SetRootType (ScContentId nNew)
 
ScContentId GetRootType () const
 
void ActiveDocChanged ()
 
void ResetManualDoc ()
 
void SetManualDoc (const OUString &rName)
 
void LoadFile (const OUString &rUrl)
 
void SelectDoc (const OUString &rName)
 
void SelectEntryByName (const ScContentId nRoot, const OUString &rName)
 
const OUString & GetHiddenTitle () const
 
void ApplyNavigatorSettings (bool bRestoreScrollPos=false, int nScrollPos=0)
 Applies the navigator settings to the listbox. More...
 
void StoreNavigatorSettings () const
 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, sal_uInt16 nObjIdentifier)
 

Private Attributes

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

Static Private Attributes

static bool bIsInDrag = false
 

Detailed Description

Definition at line 43 of file content.hxx.

Constructor & Destructor Documentation

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

Member Function Documentation

void ScContentTree::ActiveDocChanged ( )
void ScContentTree::ApplyNavigatorSettings ( bool  bRestoreScrollPos = false,
int  nScrollPos = 0 
)
void ScContentTree::ClearAll ( )
private

Definition at line 193 of file content.cxx.

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

Referenced by ClearType().

void ScContentTree::ClearType ( ScContentId  nType)
private

Definition at line 210 of file content.cxx.

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

Referenced by ObjectFresh(), and Refresh().

ScContentTree::DECL_LINK ( ContentDoubleClickHdl  ,
weld::TreeView ,
bool   
)
private
ScContentTree::DECL_LINK ( MouseReleaseHdl  ,
const MouseEvent ,
bool   
)
private
ScContentTree::DECL_LINK ( KeyInputHdl  ,
const KeyEvent ,
bool   
)
private
ScContentTree::DECL_LINK ( AsyncStoreNavigatorSettings  ,
void ,
void   
)
private
ScContentTree::DECL_LINK ( CommandHdl  ,
const CommandEvent ,
bool   
)
private
ScContentTree::DECL_LINK ( QueryTooltipHdl  ,
const weld::TreeIter ,
OUString   
)
private
ScContentTree::DECL_LINK ( DragBeginHdl  ,
bool &  ,
bool   
)
private
bool ScContentTree::DrawNamesChanged ( ScContentId  nType)
private
void ScContentTree::freeze ( )
inlineprivate

Definition at line 103 of file content.hxx.

Referenced by ClearAll(), ObjectFresh(), and Refresh().

void ScContentTree::GetAreaNames ( )
private
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 287 of file content.cxx.

References GetEntryIndexes().

void ScContentTree::GetDbNames ( )
private
void ScContentTree::GetDrawingNames ( )
private

Definition at line 920 of file content.cxx.

References DRAWING, and GetDrawNames().

Referenced by Refresh().

void ScContentTree::GetDrawNames ( ScContentId  nType)
private
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 240 of file content.cxx.

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

Referenced by GetChildIndex(), and StoreNavigatorSettings().

void ScContentTree::GetGraphicNames ( )
private

Definition at line 910 of file content.cxx.

References GetDrawNames(), and GRAPHIC.

Referenced by Refresh().

const OUString& ScContentTree::GetHiddenTitle ( ) const
inline

Definition at line 165 of file content.hxx.

References aHiddenTitle.

const ScAreaLink * ScContentTree::GetLink ( sal_uLong  nIndex)
private
void ScContentTree::GetLinkNames ( )
private
ScDocShell * ScContentTree::GetManualOrCurrent ( )
private
ScAddress ScContentTree::GetNotePos ( sal_uLong  nIndex)
private

Definition at line 999 of file content.cxx.

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

void ScContentTree::GetNoteStrings ( )
private
void ScContentTree::GetOleNames ( )
private

Definition at line 915 of file content.cxx.

References GetDrawNames(), and OLEOBJECT.

Referenced by Refresh().

ScContentId ScContentTree::GetRootType ( ) const
inline

Definition at line 156 of file content.hxx.

References nRootType.

ScDocument * ScContentTree::GetSourceDocument ( )
private
void ScContentTree::GetTableNames ( )
private
void ScContentTree::hide ( )
inline

Definition at line 142 of file content.hxx.

void ScContentTree::InitRoot ( ScContentId  nType)
private
void ScContentTree::InsertContent ( ScContentId  nType,
const OUString &  rValue 
)
private
bool ScContentTree::IsPartOfType ( ScContentId  nContentType,
sal_uInt16  nObjIdentifier 
)
staticprivate

Definition at line 836 of file content.cxx.

References DRAWING, GRAPHIC, OBJ_GRAF, OBJ_OLE2, and OLEOBJECT.

Referenced by DrawNamesChanged(), and GetDrawNames().

void ScContentTree::LaunchAsyncStoreNavigatorSettings ( )
private

Definition at line 388 of file content.cxx.

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

void ScContentTree::LoadFile ( const OUString &  rUrl)
bool ScContentTree::NoteStringsChanged ( )
private
void ScContentTree::ObjectFresh ( ScContentId  nType,
const weld::TreeIter pEntry = nullptr 
)
void ScContentTree::Refresh ( ScContentId  nType = ScContentId::ROOT)
void ScContentTree::ResetManualDoc ( )

Definition at line 1451 of file content.cxx.

References ActiveDocChanged(), aManualDoc, and bHiddenDoc.

Referenced by SelectDoc().

void ScContentTree::SelectDoc ( const OUString &  rName)
void ScContentTree::SelectEntryByName ( const ScContentId  nRoot,
const OUString &  rName 
)

Definition at line 1546 of file content.cxx.

References m_aRootNodes, m_xTreeView, and StoreNavigatorSettings().

void ScContentTree::set_selection_mode ( SelectionMode  eMode)
inline

Definition at line 132 of file content.hxx.

void ScContentTree::set_size_request ( int  nWidth,
int  nHeight 
)
inline

Definition at line 137 of file content.hxx.

void ScContentTree::SetManualDoc ( const OUString &  rName)

Definition at line 1488 of file content.cxx.

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

Referenced by SelectDoc().

void ScContentTree::SetNavigatorDlgFlag ( bool  isInNavigateDlg)
inline

Definition at line 130 of file content.hxx.

void ScContentTree::SetRootType ( ScContentId  nNew)

Definition at line 1411 of file content.cxx.

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

Referenced by ToggleRoot().

void ScContentTree::show ( )
inline

Definition at line 147 of file content.hxx.

void ScContentTree::StoreNavigatorSettings ( ) const
void ScContentTree::thaw ( )
inlineprivate

Definition at line 109 of file content.hxx.

Referenced by ClearAll(), ObjectFresh(), and Refresh().

void ScContentTree::ToggleRoot ( )

Definition at line 1423 of file content.cxx.

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

Member Data Documentation

OUString ScContentTree::aHiddenName
private

Definition at line 53 of file content.hxx.

Referenced by LoadFile(), and SelectDoc().

OUString ScContentTree::aHiddenTitle
private

Definition at line 54 of file content.hxx.

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

OUString ScContentTree::aManualDoc
private

Definition at line 51 of file content.hxx.

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

bool ScContentTree::bHiddenDoc
private
bool ScContentTree::bIsInDrag = false
staticprivate

Definition at line 63 of file content.hxx.

bool ScContentTree::bisInNavigatoeDlg
private

Definition at line 56 of file content.hxx.

Referenced by GetDrawNames().

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

Definition at line 57 of file content.hxx.

Referenced by ClearAll().

ImplSVEvent* ScContentTree::m_nAsyncMouseReleaseId
private

Definition at line 59 of file content.hxx.

Referenced by LaunchAsyncStoreNavigatorSettings(), and ~ScContentTree().

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

Definition at line 46 of file content.hxx.

Referenced by GetDrawNames(), and InsertContent().

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

Definition at line 47 of file content.hxx.

Referenced by ScContentTree().

std::unique_ptr<weld::TreeView> ScContentTree::m_xTreeView
private
ScContentId ScContentTree::nRootType
private
ScDocument* ScContentTree::pHiddenDocument
private

Definition at line 55 of file content.hxx.

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

VclPtr<ScNavigatorDlg> ScContentTree::pParentWindow
private

Definition at line 48 of file content.hxx.

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

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

Definition at line 61 of file content.hxx.

Referenced by InitRoot(), and ScContentTree().

OUString ScContentTree::sKeyString
private

Definition at line 58 of file content.hxx.

Referenced by ObjectFresh().


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