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

#include <namedefdlg.hxx>

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

Public Member Functions

 ScNameDefDlg (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const ScViewData &rViewData, std::map< OUString, ScRangeName * > &&aRangeMap, const ScAddress &aCursorPos, const bool bUndo)
 
virtual ~ScNameDefDlg () override
 
virtual void SetReference (const ScRange &rRef, ScDocument &rDoc) override
 
virtual bool IsRefInputMode () const override
 
virtual void SetActive () override
 
virtual void Close () override
 
void GetNewData (OUString &rName, OUString &rScope)
 
- Public Member Functions inherited from ScAnyRefDlgController
 ScAnyRefDlgController (SfxBindings *rt1, SfxChildWindow *rt2, weld::Window *rt3, const OUString &rt4, const OUString &rt5)
 
- Public Member Functions inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
 ScRefHdlrControllerImpl (weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *pArg, SfxBindings *pB)
 
 ScRefHdlrControllerImpl (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID)
 
- Public Member Functions inherited from SfxModelessDialogController
virtual ~SfxModelessDialogController () override
 
void Initialize (SfxChildWinInfo const *pInfo)
 
bool IsClosing () const
 
virtual void Close () override
 
virtual void EndDialog (int nResponse) override
 
virtual void Activate () override
 
virtual void Deactivate () override
 
virtual void ChildWinDispose () override
 
virtual void FillInfo (SfxChildWinInfo &) const
 
SfxBindingsGetBindings () const
 
- Public Member Functions inherited from SfxDialogController
 SfxDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId)
 
virtual void Activate ()
 
virtual void Deactivate ()
 
virtual void ChildWinDispose ()
 
virtual void Close ()
 
virtual void EndDialog (int nResponse)
 
virtual bool CloseOnHide () const
 
- Public Member Functions inherited from ScRefHandler
 ScRefHandler (SfxDialogController &rController, SfxBindings *pB, bool bBindRef)
 
virtual ~ScRefHandler () COVERITY_NOEXCEPT_FALSE override
 
virtual void SetReference (const ScRange &rRef, ScDocument &rDoc) override=0
 
virtual void AddRefEntry () override
 
virtual bool IsRefInputMode () const override
 
virtual bool IsTableLocked () const override
 
virtual bool IsDocAllowed (SfxObjectShell *pDocSh) const override
 
virtual void ShowReference (const OUString &rStr) override
 
virtual void HideReference (bool bDoneRefMode=true) override
 
virtual void ToggleCollapsed (formula::RefEdit *pEdit, formula::RefButton *pButton) override
 
virtual void ReleaseFocus (formula::RefEdit *pEdit) override
 
virtual void ViewShellChanged () override
 
void SwitchToDocument ()
 
virtual void SetActive () override=0
 
bool EnterRefMode ()
 
bool LeaveRefMode ()
 
bool CanInputDone (bool bForced)
 

Protected Member Functions

virtual void RefInputDone (bool bForced=false) override
 
- Protected Member Functions inherited from SfxModelessDialogController
 SfxModelessDialogController (SfxBindings *, SfxChildWindow *pChildWin, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID)
 
- Protected Member Functions inherited from ScRefHandler
void disposeRefHandler ()
 
bool DoClose (sal_uInt16 nId)
 
void SetDispatcherLock (bool bLock)
 
virtual void RefInputStart (formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
 
virtual void RefInputDone (bool bForced=false) override
 
bool ParseWithNames (ScRangeList &rRanges, std::u16string_view rStr, const ScDocument &pDoc)
 

Private Member Functions

void CancelPushed ()
 
void AddPushed ()
 
bool IsNameValid ()
 
bool IsFormulaValid ()
 
 DECL_LINK (CancelBtnHdl, weld::Button &, void)
 
 DECL_LINK (AddBtnHdl, weld::Button &, void)
 
 DECL_LINK (NameModifyHdl, weld::Entry &, void)
 
 DECL_LINK (AssignGetFocusHdl, formula::RefEdit &, void)
 

Private Attributes

bool mbUndo
 
ScDocumentmrDoc
 
ScDocShellmpDocShell
 
ScAddress maCursorPos
 
OUString maStrInfoDefault
 
const OUString maGlobalNameStr
 
const OUString maErrInvalidNameStr
 
const OUString maErrInvalidNameCellRefStr
 
const OUString maErrNameInUse
 
OUString maName
 
OUString maScope
 
std::map< OUString, ScRangeName * > maRangeMap
 
std::unique_ptr< weld::Entrym_xEdName
 
std::unique_ptr< formula::RefEditm_xEdRange
 
std::unique_ptr< formula::RefButtonm_xRbRange
 
std::unique_ptr< weld::ComboBoxm_xLbScope
 
std::unique_ptr< weld::CheckButtonm_xBtnRowHeader
 
std::unique_ptr< weld::CheckButtonm_xBtnColHeader
 
std::unique_ptr< weld::CheckButtonm_xBtnPrintArea
 
std::unique_ptr< weld::CheckButtonm_xBtnCriteria
 
std::unique_ptr< weld::Buttonm_xBtnAdd
 
std::unique_ptr< weld::Buttonm_xBtnCancel
 
std::unique_ptr< weld::Labelm_xFtInfo
 
std::unique_ptr< weld::Labelm_xFtRange
 

Additional Inherited Members

- Public Types inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
enum  
 
- Static Public Member Functions inherited from ScRefHandler
static bool CanInputStart (const formula::RefEdit *pEdit)
 

Detailed Description

Definition at line 21 of file namedefdlg.hxx.

Constructor & Destructor Documentation

◆ ScNameDefDlg()

ScNameDefDlg::ScNameDefDlg ( SfxBindings pB,
SfxChildWindow pCW,
weld::Window pParent,
const ScViewData rViewData,
std::map< OUString, ScRangeName * > &&  aRangeMap,
const ScAddress aCursorPos,
const bool  bUndo 
)

◆ ~ScNameDefDlg()

ScNameDefDlg::~ScNameDefDlg ( )
overridevirtual

Definition at line 87 of file namedefdlg.cxx.

Member Function Documentation

◆ AddPushed()

void ScNameDefDlg::AddPushed ( )
private

◆ CancelPushed()

void ScNameDefDlg::CancelPushed ( )
private

◆ Close()

void ScNameDefDlg::Close ( )
overridevirtual

Reimplemented from SfxModelessDialogController.

Definition at line 291 of file namedefdlg.cxx.

References ScRefHandler::DoClose().

Referenced by AddPushed().

◆ DECL_LINK() [1/4]

ScNameDefDlg::DECL_LINK ( AddBtnHdl  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [2/4]

ScNameDefDlg::DECL_LINK ( AssignGetFocusHdl  ,
formula::RefEdit ,
void   
)
private

◆ DECL_LINK() [3/4]

ScNameDefDlg::DECL_LINK ( CancelBtnHdl  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [4/4]

ScNameDefDlg::DECL_LINK ( NameModifyHdl  ,
weld::Entry ,
void   
)
private

◆ GetNewData()

void ScNameDefDlg::GetNewData ( OUString &  rName,
OUString &  rScope 
)

Definition at line 262 of file namedefdlg.cxx.

References maName, and maScope.

◆ IsFormulaValid()

bool ScNameDefDlg::IsFormulaValid ( )
private

Definition at line 102 of file namedefdlg.cxx.

References ScCompiler::CompileString(), ScDocument::GetGrammar(), m_xEdRange, maCursorPos, and mrDoc.

Referenced by IsNameValid().

◆ IsNameValid()

bool ScNameDefDlg::IsNameValid ( )
private

◆ IsRefInputMode()

bool ScNameDefDlg::IsRefInputMode ( ) const
overridevirtual

Reimplemented from ScRefHandler.

Definition at line 268 of file namedefdlg.cxx.

References m_xEdRange.

◆ RefInputDone()

void ScNameDefDlg::RefInputDone ( bool  bForced = false)
overrideprotectedvirtual

Reimplemented from ScRefHandler.

Definition at line 273 of file namedefdlg.cxx.

References IsNameValid(), and ScRefHandler::RefInputDone().

Referenced by SetActive().

◆ SetActive()

void ScNameDefDlg::SetActive ( )
overridevirtual

Implements ScRefHandler.

Definition at line 296 of file namedefdlg.cxx.

References m_xEdRange, and RefInputDone().

◆ SetReference()

void ScNameDefDlg::SetReference ( const ScRange rRef,
ScDocument rDoc 
)
overridevirtual

Member Data Documentation

◆ m_xBtnAdd

std::unique_ptr<weld::Button> ScNameDefDlg::m_xBtnAdd
private

Definition at line 53 of file namedefdlg.hxx.

Referenced by IsNameValid(), and ScNameDefDlg().

◆ m_xBtnCancel

std::unique_ptr<weld::Button> ScNameDefDlg::m_xBtnCancel
private

Definition at line 54 of file namedefdlg.hxx.

Referenced by ScNameDefDlg().

◆ m_xBtnColHeader

std::unique_ptr<weld::CheckButton> ScNameDefDlg::m_xBtnColHeader
private

Definition at line 49 of file namedefdlg.hxx.

Referenced by AddPushed().

◆ m_xBtnCriteria

std::unique_ptr<weld::CheckButton> ScNameDefDlg::m_xBtnCriteria
private

Definition at line 51 of file namedefdlg.hxx.

Referenced by AddPushed().

◆ m_xBtnPrintArea

std::unique_ptr<weld::CheckButton> ScNameDefDlg::m_xBtnPrintArea
private

Definition at line 50 of file namedefdlg.hxx.

Referenced by AddPushed().

◆ m_xBtnRowHeader

std::unique_ptr<weld::CheckButton> ScNameDefDlg::m_xBtnRowHeader
private

Definition at line 48 of file namedefdlg.hxx.

Referenced by AddPushed().

◆ m_xEdName

std::unique_ptr<weld::Entry> ScNameDefDlg::m_xEdName
private

Definition at line 41 of file namedefdlg.hxx.

Referenced by AddPushed(), IsNameValid(), and ScNameDefDlg().

◆ m_xEdRange

std::unique_ptr<formula::RefEdit> ScNameDefDlg::m_xEdRange
private

◆ m_xFtInfo

std::unique_ptr<weld::Label> ScNameDefDlg::m_xFtInfo
private

Definition at line 55 of file namedefdlg.hxx.

Referenced by ScNameDefDlg().

◆ m_xFtRange

std::unique_ptr<weld::Label> ScNameDefDlg::m_xFtRange
private

Definition at line 56 of file namedefdlg.hxx.

Referenced by ScNameDefDlg().

◆ m_xLbScope

std::unique_ptr<weld::ComboBox> ScNameDefDlg::m_xLbScope
private

Definition at line 46 of file namedefdlg.hxx.

Referenced by AddPushed(), IsNameValid(), and ScNameDefDlg().

◆ m_xRbRange

std::unique_ptr<formula::RefButton> ScNameDefDlg::m_xRbRange
private

Definition at line 44 of file namedefdlg.hxx.

Referenced by ScNameDefDlg().

◆ maCursorPos

ScAddress ScNameDefDlg::maCursorPos
private

Definition at line 28 of file namedefdlg.hxx.

Referenced by AddPushed(), and IsFormulaValid().

◆ maErrInvalidNameCellRefStr

const OUString ScNameDefDlg::maErrInvalidNameCellRefStr
private

Definition at line 32 of file namedefdlg.hxx.

Referenced by IsNameValid().

◆ maErrInvalidNameStr

const OUString ScNameDefDlg::maErrInvalidNameStr
private

Definition at line 31 of file namedefdlg.hxx.

Referenced by IsNameValid().

◆ maErrNameInUse

const OUString ScNameDefDlg::maErrNameInUse
private

Definition at line 33 of file namedefdlg.hxx.

Referenced by IsNameValid().

◆ maGlobalNameStr

const OUString ScNameDefDlg::maGlobalNameStr
private

Definition at line 30 of file namedefdlg.hxx.

Referenced by AddPushed(), IsNameValid(), and ScNameDefDlg().

◆ maName

OUString ScNameDefDlg::maName
private

Definition at line 36 of file namedefdlg.hxx.

Referenced by AddPushed(), and GetNewData().

◆ maRangeMap

std::map<OUString, ScRangeName*> ScNameDefDlg::maRangeMap
private

Definition at line 39 of file namedefdlg.hxx.

Referenced by AddPushed(), and IsNameValid().

◆ maScope

OUString ScNameDefDlg::maScope
private

Definition at line 37 of file namedefdlg.hxx.

Referenced by AddPushed(), and GetNewData().

◆ maStrInfoDefault

OUString ScNameDefDlg::maStrInfoDefault
private

Definition at line 29 of file namedefdlg.hxx.

Referenced by IsNameValid(), and ScNameDefDlg().

◆ mbUndo

bool ScNameDefDlg::mbUndo
private

Definition at line 24 of file namedefdlg.hxx.

Referenced by AddPushed(), and CancelPushed().

◆ mpDocShell

ScDocShell* ScNameDefDlg::mpDocShell
private

Definition at line 26 of file namedefdlg.hxx.

Referenced by AddPushed().

◆ mrDoc

ScDocument& ScNameDefDlg::mrDoc
private

Definition at line 25 of file namedefdlg.hxx.

Referenced by AddPushed(), IsFormulaValid(), IsNameValid(), and ScNameDefDlg().


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