LibreOffice Module sc (master) 1
|
#include <tabcont.hxx>
Public Member Functions | |
ScTabControl (vcl::Window *pParent, ScViewData *pData) | |
virtual void | dispose () override |
virtual | ~ScTabControl () override |
void | UpdateInputContext () |
void | UpdateStatus () |
void | SetSheetLayoutRTL (bool bSheetRTL) |
void | SwitchToPageId (sal_uInt16 nId) |
bool | StartDrag (const CommandEvent &rCEvt, vcl::Region &rRegion) |
Public Member Functions inherited from TabBar | |
TabBar (vcl::Window *pParent, WinBits nWinStyle, bool bSheets=false) | |
virtual | ~TabBar () override |
virtual void | dispose () override |
virtual void | MouseMove (const MouseEvent &rMEvt) override |
virtual void | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual void | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual void | Resize () override |
virtual void | RequestHelp (const HelpEvent &rHEvt) override |
virtual void | StateChanged (StateChangedType nStateChange) override |
virtual void | DataChanged (const DataChangedEvent &rDCEvt) override |
virtual bool | PreNotify (NotifyEvent &rNEvt) override |
virtual void | Select () |
virtual void | DoubleClick () |
void | Split () |
virtual void | ActivatePage () |
virtual bool | DeactivatePage () |
virtual bool | StartRenaming () |
virtual TabBarAllowRenamingReturnCode | AllowRenaming () |
virtual void | EndRenaming () |
virtual void | Mirror () |
virtual void | InsertPage (sal_uInt16 nPageId, const OUString &rText, TabBarPageBits nBits=TabBarPageBits::NONE, sal_uInt16 nPos=TabBar::APPEND) |
void | RemovePage (sal_uInt16 nPageId) |
void | MovePage (sal_uInt16 nPageId, sal_uInt16 nNewPos) |
Color | GetTabBgColor (sal_uInt16 nPageId) const |
void | SetTabBgColor (sal_uInt16 nPageId, const Color &aTabBgColor) |
void | Clear () |
bool | IsPageEnabled (sal_uInt16 nPageId) const |
void | SetPageBits (sal_uInt16 nPageId, TabBarPageBits nBits) |
TabBarPageBits | GetPageBits (sal_uInt16 nPageId) const |
sal_uInt16 | GetPageCount () const |
sal_uInt16 | GetPageId (sal_uInt16 nPos) const |
sal_uInt16 | GetPagePos (sal_uInt16 nPageId) const |
sal_uInt16 | GetCurPagePos () const |
sal_uInt16 | GetPageId (const Point &rPos) const |
tools::Rectangle | GetPageRect (sal_uInt16 nPageId) const |
tools::Rectangle | GetPageArea () const |
void | SetCurPageId (sal_uInt16 nPageId) |
sal_uInt16 | GetCurPageId () const |
void | SetFirstPageId (sal_uInt16 nPageId) |
void | MakeVisible (sal_uInt16 nPageId) |
void | SelectPage (sal_uInt16 nPageId, bool bSelect) |
sal_uInt16 | GetSelectPageCount () const |
bool | IsPageSelected (sal_uInt16 nPageId) const |
void | SetProtectionSymbol (sal_uInt16 nPageId, bool bProtection) |
void | SetMaxPageWidth (tools::Long nMaxWidth) |
void | EnableEditMode () |
bool | StartEditMode (sal_uInt16 nPageId) |
void | EndEditMode (bool bCancel=false) |
void | SetEditText (const OUString &rText) |
const OUString & | GetEditText () const |
bool | IsInEditMode () const |
bool | IsEditModeCanceled () const |
sal_uInt16 | GetEditPageId () const |
void | SetMirrored (bool bMirrored) |
bool | IsMirrored () const |
void | SetEffectiveRTL (bool bRTL) |
bool | IsEffectiveRTL () const |
bool | StartDrag (const CommandEvent &rCEvt, vcl::Region &rRegion) |
sal_uInt16 | ShowDropPos (const Point &rPos) |
void | HideDropPos () |
void | SwitchPage (const Point &rPos) |
void | EndSwitchPage () |
virtual void | SetPageText (sal_uInt16 nPageId, const OUString &rText) |
OUString | GetPageText (sal_uInt16 nPageId) const |
OUString | GetHelpText (sal_uInt16 nPageId) const |
tools::Long | GetSplitSize () const |
void | SetStyle (WinBits nStyle) |
WinBits | GetStyle () const |
void | SetScrollAlwaysEnabled (bool bScrollAlwaysEnabled) |
Size | CalcWindowSizePixel () const |
void | SetSelectHdl (const Link< TabBar *, void > &rLink) |
void | SetSplitHdl (const Link< TabBar *, void > &rLink) |
void | SetScrollAreaContextHdl (const Link< const CommandEvent &, void > &rLink) |
void | SetAddButtonEnabled (bool bAddButtonEnabled) |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () override |
Protected Member Functions | |
virtual void | Select () override |
virtual void | Command (const CommandEvent &rCEvt) override |
virtual void | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual void | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual sal_Int8 | AcceptDrop (const AcceptDropEvent &rEvt) override |
virtual sal_Int8 | ExecuteDrop (const ExecuteDropEvent &rEvt) override |
virtual void | StartDrag (sal_Int8 nAction, const Point &rPosPixel) override |
virtual bool | StartRenaming () override |
virtual TabBarAllowRenamingReturnCode | AllowRenaming () override |
virtual void | EndRenaming () override |
virtual void | Mirror () override |
virtual void | AddTabClick () override |
Protected Member Functions inherited from TabBar | |
virtual void | AddTabClick () |
OUString | GetAuxiliaryText (sal_uInt16 nPageId) const |
void | SetAuxiliaryText (sal_uInt16 nPageId, const OUString &rText) |
Private Member Functions | |
void | DoDrag () |
sal_uInt16 | GetMaxId () const |
SCTAB | GetPrivatDropPos (const Point &rPos) |
DECL_LINK (ShowPageList, const CommandEvent &, void) | |
Private Attributes | |
ScViewData * | pViewData |
sal_uInt16 | nMouseClickPageId |
sal_uInt16 | nSelPageIdByMouse |
Last page ID after mouse button down/up. More... | |
bool | bErrorShown |
Selected page ID, if selected with mouse. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from TabBar | |
static const sal_uInt16 | APPEND |
static const sal_uInt16 | PAGE_NOT_FOUND |
Definition at line 31 of file tabcont.hxx.
ScTabControl::ScTabControl | ( | vcl::Window * | pParent, |
ScViewData * | pData | ||
) |
Definition at line 42 of file tabcont.cxx.
References TabBar::EnableEditMode(), ScViewData::GetDocument(), ScDocument::GetName(), ScDocument::GetTabBgColor(), ScDocument::GetTableCount(), ScViewData::GetTabNo(), ScViewData::GetView(), i, TabBar::InsertPage(), ScDocument::IsDefaultTabBgColor(), ScDocument::IsScenario(), ScDocument::IsTabProtected(), ScDocument::IsVisible(), LINK, nCount, pData, pViewData, SC_TABBAR_DEFWIDTH, TabBar::SetCurPageId(), TabBar::SetProtectionSymbol(), TabBar::SetScrollAlwaysEnabled(), TabBar::SetScrollAreaContextHdl(), TabBar::SetSplitHdl(), TabBar::SetTabBgColor(), UpdateInputContext(), WB_3DLOOK, WB_DRAG, WB_MINSCROLL, WB_MULTISELECT, WB_RANGESELECT, and WB_SCROLL.
|
overridevirtual |
Definition at line 123 of file tabcont.cxx.
|
overrideprotectedvirtual |
Definition at line 571 of file tabcont.cxx.
References TabBar::EndSwitchPage(), ScDocument::GetChangeTrack(), ScViewData::GetDocument(), ScTransferObj::GetDragSourceFlags(), ScTransferObj::GetSourceDocument(), TabBar::HideDropPos(), ScDocument::IsDocEditable(), AcceptDropEvent::maPosPixel, AcceptDropEvent::mbLeaving, AcceptDropEvent::mnAction, ScDragData::pCellTransfer, pViewData, SC_MOD, TabBar::ShowDropPos(), TabBar::SwitchPage(), and Table.
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 225 of file tabcont.cxx.
References TabBar::AddTabClick(), aName, ScDocument::CreateValidTabName(), ScViewData::GetDocument(), ScDocument::GetTableCount(), ScViewData::GetViewShell(), ScModule::InputEnterHandler(), ScViewFunc::InsertTable(), ScDocument::IsDocEditable(), ScModule::IsFormulaMode(), ScModule::IsTableLocked(), pViewData, and SC_MOD.
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 606 of file tabcont.cxx.
References bErrorShown, ScTabView::ErrorMessage(), ScViewData::GetDocShell(), TabBar::GetEditPageId(), TabBar::GetEditText(), ScViewData::GetViewShell(), SfxObjectShell::IsInModalMode(), nId, pViewData, ScViewFunc::RenameTable(), TABBAR_RENAMING_CANCEL, TABBAR_RENAMING_NO, and TABBAR_RENAMING_YES.
|
overrideprotectedvirtual |
Definition at line 444 of file tabcont.cxx.
References ScTabViewShell::DeactivateOle(), SfxDispatcher::ExecutePopup(), CommandEvent::GetCommand(), ScViewData::GetDispatcher(), CommandEvent::GetMousePosPixel(), TabBar::GetPageId(), ScViewData::GetViewShell(), ScModule::IsFormulaMode(), ScModule::IsModalMode(), nId, pViewData, SC_MOD, ScTabViewShell::SetActive(), and SwitchToPageId().
|
private |
|
overridevirtual |
Reimplemented from TabBar.
Definition at line 128 of file tabcont.cxx.
References TabBar::dispose().
|
private |
Definition at line 484 of file tabcont.cxx.
References ScDocument::CopyToClip(), DND_ACTION_COPYMOVE, DND_ACTION_LINK, SfxObjectShell::FillTransferableObjectDescriptor(), ScViewData::GetActiveWin(), ScViewData::GetCurX(), ScViewData::GetCurY(), ScViewData::GetDocShell(), ScDocShell::GetDocument(), ScViewData::GetMarkData(), SfxObjectShell::GetMedium(), ScViewData::GetTabNo(), INetURLObject::GetURLNoPass(), SfxMedium::GetURLObject(), TransferableObjectDescriptor::maDisplayName, ScDocument::MaxCol(), ScDocument::MaxRow(), pViewData, ScMarkData::ResetMark(), SC_MOD, SCDOCMODE_CLIP, ScMarkData::SetMarkArea(), and Table.
Referenced by StartDrag().
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 648 of file tabcont.cxx.
References ScTabView::ActiveGrabFocus(), ScViewData::GetView(), and pViewData.
|
overrideprotectedvirtual |
use table selection from the tab control where dragging was started?
Definition at line 537 of file tabcont.cxx.
References DND_ACTION_COPY, DND_ACTION_MOVE, DND_ACTION_NONE, TabBar::EndSwitchPage(), ScDocument::GetChangeTrack(), ScViewData::GetDocument(), ScTransferObj::GetDragSourceFlags(), GetPrivatDropPos(), ScTransferObj::GetSourceDocument(), ScViewData::GetView(), ScTransferObj::GetVisibleTab(), TabBar::HideDropPos(), ScDocument::IsDocEditable(), lcl_DocShellNr(), ExecuteDropEvent::maPosPixel, ExecuteDropEvent::mnAction, ScViewFunc::MoveTable(), nPos, ScDragData::pCellTransfer, pViewData, SC_MOD, ScTransferObj::SetDragWasInternal(), and Table.
|
private |
Definition at line 135 of file tabcont.cxx.
References TabBar::GetPageCount(), and TabBar::GetPageId().
Referenced by SwitchToPageId(), and UpdateStatus().
Definition at line 144 of file tabcont.cxx.
References ScViewData::GetDocument(), ScDocument::GetTableCount(), i, ScDocument::IsVisible(), nCount, nPos, pViewData, and TabBar::ShowDropPos().
Referenced by ExecuteDrop().
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 654 of file tabcont.cxx.
References tools::Rectangle::Center(), TabBar::GetCurPageId(), TabBar::GetPageRect(), tools::Rectangle::IsEmpty(), TabBar::Mirror(), nSelPageIdByMouse, and TabBar::PAGE_NOT_FOUND.
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 182 of file tabcont.cxx.
References ScTabView::ActiveGrabFocus(), MouseEvent::GetModifier(), TabBar::GetPageId(), MouseEvent::GetPosPixel(), ScViewData::GetView(), ScViewData::GetViewShell(), ScModule::IsFormulaMode(), TabBar::IsInEditMode(), MouseEvent::IsLeft(), ScModule::IsModalMode(), TabBar::MouseButtonDown(), nMouseClickPageId, pViewData, SC_MOD, and ScTabViewShell::SetActive().
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 198 of file tabcont.cxx.
References SfxDispatcher::Execute(), MouseEvent::GetClicks(), SfxViewFrame::GetDispatcher(), TabBar::GetPageId(), MouseEvent::GetPosPixel(), SfxViewShell::GetViewFrame(), ScViewData::GetViewShell(), MouseEvent::IsLeft(), TabBar::MouseButtonUp(), nMouseClickPageId, TabBar::PAGE_NOT_FOUND, and pViewData.
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 245 of file tabcont.cxx.
References ScTabView::DrawMarkListHasChanged(), ScModule::EndReference(), SfxDispatcher::ExecuteList(), ScViewData::GetBindings(), TabBar::GetCurPageId(), ScViewData::GetDispatcher(), ScViewData::GetDocument(), ScViewData::GetMarkData(), ScViewData::GetRefEndX(), ScViewData::GetRefEndY(), ScViewData::GetRefEndZ(), ScViewData::GetRefStartX(), ScViewData::GetRefStartY(), ScViewData::GetRefStartZ(), ScViewData::GetRefType(), ScDocument::GetTableCount(), ScMarkData::GetTableSelect(), ScViewData::GetTabNo(), ScViewData::GetView(), SfxViewShell::GetViewFrame(), ScViewData::GetViewShell(), SfxViewFrame::HasChildWindow(), i, ScModule::InputEnterHandler(), SfxBindings::Invalidate(), ScModule::IsFormulaMode(), SfxDispatcher::IsLocked(), TabBar::IsPageSelected(), ScModule::IsTableLocked(), nCount, nMouseClickPageId, nSelPageIdByMouse, TabBar::PAGE_NOT_FOUND, pViewData, SC_MOD, SC_REFTYPE_REF, TabBar::SelectPage(), ScMarkData::SelectTable(), TabBar::SetCurPageId(), ScModule::SetReference(), and ScTabView::SetTabNo().
Referenced by SwitchToPageId().
void ScTabControl::SetSheetLayoutRTL | ( | bool | bSheetRTL | ) |
Definition at line 411 of file tabcont.cxx.
References nSelPageIdByMouse, TabBar::PAGE_NOT_FOUND, and TabBar::SetEffectiveRTL().
bool TabBar::StartDrag | ( | const CommandEvent & | rCEvt, |
vcl::Region & | rRegion | ||
) |
Definition at line 470 of file tabcont.cxx.
References DoDrag(), ScModule::IsFormulaMode(), ScModule::IsModalMode(), SC_MOD, and TabBar::StartDrag().
|
overrideprotectedvirtual |
Reimplemented from TabBar.
Definition at line 601 of file tabcont.cxx.
References ScViewData::GetDocument(), ScDocument::IsDocEditable(), and pViewData.
void ScTabControl::SwitchToPageId | ( | sal_uInt16 | nId | ) |
Definition at line 417 of file tabcont.cxx.
References GetMaxId(), ScViewData::GetViewShell(), i, comphelper::LibreOfficeKit::isActive(), TabBar::IsPageSelected(), SfxViewShell::libreOfficeKitViewCallback(), nCount, nId, pViewData, Select(), TabBar::SelectPage(), and TabBar::SetCurPageId().
Referenced by Command().
void ScTabControl::UpdateInputContext | ( | ) |
Definition at line 330 of file tabcont.cxx.
References ScViewData::GetDocument(), ScDocument::GetDocumentShell(), TabBar::GetStyle(), SfxObjectShell::IsReadOnly(), pViewData, TabBar::SetStyle(), and WB_INSERTTAB.
Referenced by ScTabControl().
void ScTabControl::UpdateStatus | ( | ) |
Definition at line 341 of file tabcont.cxx.
References TabBar::Clear(), ScViewData::GetDocument(), ScViewData::GetMarkData(), GetMaxId(), ScDocument::GetName(), TabBar::GetPageText(), TabBar::GetTabBgColor(), ScDocument::GetTabBgColor(), ScDocument::GetTableCount(), ScMarkData::GetTableSelect(), ScViewData::GetTabNo(), i, TabBar::InsertPage(), ScViewData::IsActive(), ScDocument::IsDefaultTabBgColor(), TabBar::IsPageSelected(), ScDocument::IsScenario(), ScDocument::IsTabProtected(), ScDocument::IsVisible(), nCount, pViewData, TabBar::SelectPage(), TabBar::SetCurPageId(), TabBar::SetProtectionSymbol(), and TabBar::SetTabBgColor().
|
private |
Selected page ID, if selected with mouse.
Definition at line 37 of file tabcont.hxx.
Referenced by AllowRenaming().
|
private |
Definition at line 35 of file tabcont.hxx.
Referenced by MouseButtonDown(), MouseButtonUp(), and Select().
|
private |
Last page ID after mouse button down/up.
Definition at line 36 of file tabcont.hxx.
Referenced by Mirror(), Select(), and SetSheetLayoutRTL().
|
private |
Definition at line 34 of file tabcont.hxx.
Referenced by AcceptDrop(), AddTabClick(), AllowRenaming(), Command(), DoDrag(), EndRenaming(), ExecuteDrop(), GetPrivatDropPos(), MouseButtonDown(), MouseButtonUp(), ScTabControl(), Select(), StartRenaming(), SwitchToPageId(), UpdateInputContext(), and UpdateStatus().