LibreOffice Module sc (master) 1
|
#include <anyrefdg.hxx>
Public Member Functions | |
ScFormulaReferenceHelper (IAnyRefDialog *_pDlg, SfxBindings *_pBindings) | |
~ScFormulaReferenceHelper () COVERITY_NOEXCEPT_FALSE | |
void | dispose () |
void | ShowSimpleReference (std::u16string_view rStr) |
void | ShowFormulaReference (const OUString &rStr) |
bool | ParseWithNames (ScRangeList &rRanges, std::u16string_view rStr, const ScDocument &rDoc) |
void | Init () |
void | ShowReference (const OUString &rStr) |
void | ReleaseFocus (formula::RefEdit *pEdit) |
void | HideReference (bool bDoneRefMode=true) |
void | RefInputStart (formula::RefEdit *pEdit, formula::RefButton *pButton) |
void | RefInputDone (bool bForced) |
void | ToggleCollapsed (formula::RefEdit *pEdit, formula::RefButton *pButton) |
void | SetDialog (weld::Dialog *pDialog) |
void | DoClose (sal_uInt16 nId) |
void | SetDispatcherLock (bool bLock) |
bool | CanInputDone (bool bForced) const |
Static Public Member Functions | |
static void | EnableSpreadsheets (bool bFlag=true) |
static void | ViewShellChanged () |
static void | enableInput (bool _bInput) |
static bool | CanInputStart (const formula::RefEdit *pEdit) |
Private Member Functions | |
DECL_LINK (ActivateHdl, weld::Widget &, bool) | |
Private Attributes | |
IAnyRefDialog * | m_pDlg |
::std::unique_ptr< ScCompiler > | m_pRefComp |
formula::RefEdit * | m_pRefEdit |
formula::RefButton * | m_pRefBtn |
weld::Dialog * | m_pDialog |
SfxBindings * | m_pBindings |
SCTAB | m_nRefTab |
OUString | m_sOldDialogText |
bool | m_bEnableColorRef |
bool | m_bHighlightRef |
Definition at line 34 of file anyrefdg.hxx.
ScFormulaReferenceHelper::ScFormulaReferenceHelper | ( | IAnyRefDialog * | _pDlg, |
SfxBindings * | _pBindings | ||
) |
Definition at line 47 of file anyrefdg.cxx.
References ScInputOptions::GetRangeFinder(), m_bEnableColorRef, and SC_MOD.
ScFormulaReferenceHelper::~ScFormulaReferenceHelper | ( | ) |
Definition at line 60 of file anyrefdg.cxx.
References dispose().
|
inline |
Definition at line 78 of file anyrefdg.hxx.
References m_pRefBtn, and m_pRefEdit.
Referenced by ScRefHandler::CanInputDone(), and RefInputDone().
|
inlinestatic |
Definition at line 77 of file anyrefdg.hxx.
Referenced by ScRefHandler::CanInputStart().
|
private |
void ScFormulaReferenceHelper::dispose | ( | void | ) |
Definition at line 65 of file anyrefdg.cxx.
References enableInput(), HideReference(), m_pDialog, ScInputHandler::ResetDelayTimer(), and SC_MOD.
Referenced by ScRefHandler::disposeRefHandler(), ScFormulaDlg::~ScFormulaDlg(), and ~ScFormulaReferenceHelper().
void ScFormulaReferenceHelper::DoClose | ( | sal_uInt16 | nId | ) |
here and in dtor ?
Definition at line 419 of file anyrefdg.cxx.
References SfxViewFrame::Current(), vcl::Window::Enable(), ScTabViewShell::GetActiveViewShell(), SfxViewFrame::GetChildWindow(), SfxBindings::GetDispatcher(), SfxDispatcher::GetFrame(), SfxChildWindow::GetWindow(), SfxViewFrame::HasChildWindow(), m_pBindings, nId, SC_MOD, SetDispatcherLock(), SfxGetpApp(), and ScTabViewShell::UpdateInputHandler().
Referenced by ScFormulaDlg::doClose(), and ScRefHandler::DoClose().
|
static |
Definition at line 78 of file anyrefdg.cxx.
References vcl::Window::EnableInput(), ScTabView::EnableRefInput(), SfxViewFrame::GetFirst(), SfxObjectShell::GetFirst(), SfxViewFrame::GetFrame(), SfxObjectShell::GetNext(), SfxViewFrame::GetNext(), vcl::Window::GetParent(), SfxShell::GetViewShell(), SfxViewShell::GetWindow(), SfxFrame::IsInPlace(), and p.
Referenced by dispose(), ScRefHandler::EnterRefMode(), ScFormulaDlg::ScFormulaDlg(), and ViewShellChanged().
|
static |
Definition at line 502 of file anyrefdg.cxx.
References vcl::Window::EnableInput(), ScTabView::EnableRefInput(), SfxViewFrame::GetFirst(), SfxObjectShell::GetFirst(), SfxViewFrame::GetFrame(), SfxObjectShell::GetNext(), SfxViewFrame::GetNext(), vcl::Window::GetParent(), SfxShell::GetViewShell(), SfxViewShell::GetWindow(), SfxFrame::IsInPlace(), and p.
Referenced by ScRefHandler::EnterRefMode(), ScFormulaDlg::ScFormulaDlg(), and ViewShellChanged().
void ScFormulaReferenceHelper::HideReference | ( | bool | bDoneRefMode = true | ) |
Definition at line 233 of file anyrefdg.cxx.
References ScTabView::ClearHighlightRanges(), ScTabView::DoneRefMode(), ScDocShell::GetViewData(), ScViewData::GetViewShell(), comphelper::LibreOfficeKit::isActive(), m_bEnableColorRef, m_bHighlightRef, and ScInputHandler::SendReferenceMarks().
Referenced by dispose(), ScRefHandler::HideReference(), and ScFormulaDlg::HideReference().
void ScFormulaReferenceHelper::Init | ( | void | ) |
use pScViewShell?
Definition at line 314 of file anyrefdg.cxx.
References ScViewData::GetCurX(), ScViewData::GetCurY(), ScViewData::GetDocument(), ScDocument::GetGrammar(), ScViewData::GetTabNo(), ScDocShell::GetViewData(), m_nRefTab, and m_pRefComp.
Referenced by ScRefHandler::EnterRefMode(), and ScFormulaDlg::ScFormulaDlg().
bool ScFormulaReferenceHelper::ParseWithNames | ( | ScRangeList & | rRanges, |
std::u16string_view | rStr, | ||
const ScDocument & | rDoc | ||
) |
Definition at line 141 of file anyrefdg.cxx.
References ScRange::aEnd, ScRange::aStart, ScDocument::GetAddressConvention(), o3tl::getToken(), m_nRefTab, ScRangeUtil::MakeRangeFromName(), ScRange::ParseAny(), ScRangeList::push_back(), ScRangeList::RemoveAll(), RUTL_NAMES, ScAddress::SetTab(), ScAddress::Tab(), TAB2_3D, TAB_3D, VALID, and ZERO.
Referenced by ScRefHandler::ParseWithNames(), ReleaseFocus(), and ShowSimpleReference().
void ScFormulaReferenceHelper::RefInputDone | ( | bool | bForced | ) |
Definition at line 341 of file anyrefdg.cxx.
References CanInputDone(), m_pDialog, m_pRefBtn, m_pRefEdit, m_sOldDialogText, weld::Window::set_title(), formula::RefButton::SetActivateHdl(), formula::RefEdit::SetActivateHdl(), formula::RefButton::SetStartImage(), and weld::Dialog::undo_collapse().
Referenced by ScRefHandler::RefInputDone(), and ScFormulaDlg::RefInputDone().
void ScFormulaReferenceHelper::RefInputStart | ( | formula::RefEdit * | pEdit, |
formula::RefButton * | pButton | ||
) |
Definition at line 368 of file anyrefdg.cxx.
References weld::Dialog::collapse(), weld::Window::get_title(), formula::RefEdit::GetLabelWidgetForShrinkMode(), formula::RefButton::GetWidget(), formula::RefEdit::GetWidget(), LINK, m_pDialog, m_pRefBtn, m_pRefEdit, m_sOldDialogText, weld::Window::set_title(), formula::RefButton::SetActivateHdl(), formula::RefEdit::SetActivateHdl(), formula::RefButton::SetEndImage(), and comphelper::string::stripEnd().
Referenced by ScRefHandler::RefInputStart(), and ScFormulaDlg::RefInputStart().
void ScFormulaReferenceHelper::ReleaseFocus | ( | formula::RefEdit * | pEdit | ) |
Definition at line 281 of file anyrefdg.cxx.
References ScTabView::ActiveGrabFocus(), ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScRangeList::empty(), ScRangeList::front(), ScTabViewShell::GetActiveViewShell(), ScViewData::GetDocument(), formula::RefEdit::GetText(), ScTabView::GetViewData(), m_pDlg, m_pRefEdit, ScTabView::MoveCursorAbs(), ParseWithNames(), ScAddress::Row(), SC_FOLLOW_JUMP, ScTabView::SetTabNo(), and ScAddress::Tab().
Referenced by ScRefHandler::ReleaseFocus(), and ScFormulaDlg::ReleaseFocus().
|
inline |
Definition at line 68 of file anyrefdg.hxx.
References m_pDialog.
Referenced by ScFormulaDlg::ScFormulaDlg(), and ScRefHandler::ScRefHandler().
void ScFormulaReferenceHelper::SetDispatcherLock | ( | bool | bLock | ) |
Definition at line 456 of file anyrefdg.cxx.
References SfxViewFrame::Current(), SfxViewFrame::GetDispatcher(), SfxBindings::GetDispatcher(), SfxViewFrame::GetFirst(), SfxObjectShell::GetFirst(), SfxObjectShell::GetNext(), SfxViewFrame::GetNext(), comphelper::LibreOfficeKit::isActive(), SfxDispatcher::Lock(), and m_pBindings.
Referenced by ScFormulaDlg::dispatch(), DoClose(), ScRefHandler::EnterRefMode(), ScFormulaDlg::ScFormulaDlg(), ScRefHandler::SetDispatcherLock(), and ScFormulaDlg::setDispatcherLock().
void ScFormulaReferenceHelper::ShowFormulaReference | ( | const OUString & | rStr | ) |
Definition at line 176 of file anyrefdg.cxx.
References ScTabView::AddHighlightRange(), ScRange::aEnd, ScRange::aStart, ScTabView::ClearHighlightRanges(), ScTabView::DoneRefMode(), ScRangeFindList::GetColorName(), ScViewData::GetCurX(), ScViewData::GetCurY(), ScViewData::GetDocument(), formula::FormulaToken::GetDoubleRef(), formula::FormulaTokenArrayPlainIterator::GetNextReference(), formula::FormulaToken::GetSingleRef(), ScViewData::GetTabNo(), formula::FormulaToken::GetType(), ScDocShell::GetViewData(), ScTabView::GetViewData(), ScViewData::GetViewShell(), m_bEnableColorRef, m_bHighlightRef, m_pRefComp, nIndex, formula::svDoubleRef, formula::svSingleRef, ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
Referenced by ShowReference().
void ScFormulaReferenceHelper::ShowReference | ( | const OUString & | rStr | ) |
Definition at line 261 of file anyrefdg.cxx.
References comphelper::string::indexOfAny(), m_bEnableColorRef, ShowFormulaReference(), ShowSimpleReference(), and u.
Referenced by ScFormulaDlg::ShowReference(), and ScRefHandler::ShowReference().
void ScFormulaReferenceHelper::ShowSimpleReference | ( | std::u16string_view | rStr | ) |
Definition at line 112 of file anyrefdg.cxx.
References ScTabView::AddHighlightRange(), ScTabView::ClearHighlightRanges(), ScTabView::DoneRefMode(), ScRangeFindList::GetColorName(), ScViewData::GetDocument(), ScDocShell::GetViewData(), ScViewData::GetViewShell(), i, m_bEnableColorRef, m_bHighlightRef, ParseWithNames(), and ScRangeList::size().
Referenced by ShowReference().
void ScFormulaReferenceHelper::ToggleCollapsed | ( | formula::RefEdit * | pEdit, |
formula::RefButton * | pButton | ||
) |
Definition at line 399 of file anyrefdg.cxx.
References formula::RefEdit::GrabFocus(), m_pDlg, and m_pRefEdit.
Referenced by ScRefHandler::ToggleCollapsed(), and ScFormulaDlg::ToggleCollapsed().
|
static |
Definition at line 496 of file anyrefdg.cxx.
References enableInput(), and EnableSpreadsheets().
Referenced by ScRefHandler::ViewShellChanged(), and ScFormulaDlg::ViewShellChanged().
|
private |
Definition at line 46 of file anyrefdg.hxx.
Referenced by HideReference(), ScFormulaReferenceHelper(), ShowFormulaReference(), ShowReference(), and ShowSimpleReference().
|
private |
Definition at line 47 of file anyrefdg.hxx.
Referenced by HideReference(), ShowFormulaReference(), and ShowSimpleReference().
|
private |
Definition at line 42 of file anyrefdg.hxx.
Referenced by Init(), and ParseWithNames().
|
private |
Definition at line 41 of file anyrefdg.hxx.
Referenced by DoClose(), and SetDispatcherLock().
|
private |
Definition at line 40 of file anyrefdg.hxx.
Referenced by dispose(), RefInputDone(), RefInputStart(), and SetDialog().
|
private |
Definition at line 36 of file anyrefdg.hxx.
Referenced by ReleaseFocus(), and ToggleCollapsed().
|
private |
Definition at line 39 of file anyrefdg.hxx.
Referenced by CanInputDone(), RefInputDone(), and RefInputStart().
|
private |
Definition at line 37 of file anyrefdg.hxx.
Referenced by Init(), and ShowFormulaReference().
|
private |
Definition at line 38 of file anyrefdg.hxx.
Referenced by CanInputDone(), RefInputDone(), RefInputStart(), ReleaseFocus(), and ToggleCollapsed().
|
private |
Definition at line 44 of file anyrefdg.hxx.
Referenced by RefInputDone(), and RefInputStart().