LibreOffice Module sc (master) 1
tabvwsh.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <svx/imapdlg.hxx>
21#include <svx/srchdlg.hxx>
22#include <sfx2/objface.hxx>
23#include <sfx2/viewfrm.hxx>
24#include <sfx2/infobar.hxx>
27#include <sfx2/viewfac.hxx>
28
29#include <cellvalue.hxx>
30
31#include <tabvwsh.hxx>
32#include <docsh.hxx>
33#include <reffact.hxx>
34#include <sc.hrc>
35#include <spelldialog.hxx>
36#include <formulacell.hxx>
37#include <searchresults.hxx>
38
39 // needed for -fsanitize=function visibility of typeinfo for functions of
40 // type void(SfxShell*,SfxRequest&) defined in scslots.hxx
41#define ShellClass_ScTabViewShell
42#include <scslots.hxx>
43
44
46
47void ScTabViewShell::InitInterface_Impl()
48{
49 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
50 SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
51 ToolbarId::Objectbar_Tools);
52
53 GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
54 GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
55
56 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
57
58 GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
59 GetStaticInterface()->RegisterChildWindow(DevelopmentToolChildWindow::GetChildWindowId());
60 GetStaticInterface()->RegisterChildWindow(ScNameDlgWrapper::GetChildWindowId());
61 GetStaticInterface()->RegisterChildWindow(ScNameDefDlgWrapper::GetChildWindowId());
62 GetStaticInterface()->RegisterChildWindow(ScSolverDlgWrapper::GetChildWindowId());
63 GetStaticInterface()->RegisterChildWindow(ScOptSolverDlgWrapper::GetChildWindowId());
64 GetStaticInterface()->RegisterChildWindow(ScXMLSourceDlgWrapper::GetChildWindowId());
65 GetStaticInterface()->RegisterChildWindow(ScPivotLayoutWrapper::GetChildWindowId());
66 GetStaticInterface()->RegisterChildWindow(ScTabOpDlgWrapper::GetChildWindowId());
67 GetStaticInterface()->RegisterChildWindow(ScFilterDlgWrapper::GetChildWindowId());
68 GetStaticInterface()->RegisterChildWindow(ScSpecialFilterDlgWrapper::GetChildWindowId());
69 GetStaticInterface()->RegisterChildWindow(ScDbNameDlgWrapper::GetChildWindowId());
70 GetStaticInterface()->RegisterChildWindow(ScConsolidateDlgWrapper::GetChildWindowId());
71 GetStaticInterface()->RegisterChildWindow(ScPrintAreasDlgWrapper::GetChildWindowId());
72 GetStaticInterface()->RegisterChildWindow(ScColRowNameRangesDlgWrapper::GetChildWindowId());
73 GetStaticInterface()->RegisterChildWindow(ScFormulaDlgWrapper::GetChildWindowId());
74 GetStaticInterface()->RegisterChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
75 GetStaticInterface()->RegisterChildWindow(ScFormulaDlgWrapper::GetChildWindowId());
76 GetStaticInterface()->RegisterChildWindow(ScAcceptChgDlgWrapper::GetChildWindowId());
77 GetStaticInterface()->RegisterChildWindow(ScHighlightChgDlgWrapper::GetChildWindowId());
78 GetStaticInterface()->RegisterChildWindow(ScSimpleRefDlgWrapper::GetChildWindowId());
79 GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
80 GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG);
81 GetStaticInterface()->RegisterChildWindow(ScSpellDialogChildWindow::GetChildWindowId());
82 GetStaticInterface()->RegisterChildWindow(ScValidityRefChildWin::GetChildWindowId());
83 GetStaticInterface()->RegisterChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
84
85 GetStaticInterface()->RegisterChildWindow(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
86 GetStaticInterface()->RegisterChildWindow(ScSamplingDialogWrapper::GetChildWindowId());
87 GetStaticInterface()->RegisterChildWindow(ScDescriptiveStatisticsDialogWrapper::GetChildWindowId());
88 GetStaticInterface()->RegisterChildWindow(ScAnalysisOfVarianceDialogWrapper::GetChildWindowId());
89 GetStaticInterface()->RegisterChildWindow(ScCorrelationDialogWrapper::GetChildWindowId());
90 GetStaticInterface()->RegisterChildWindow(ScCovarianceDialogWrapper::GetChildWindowId());
91 GetStaticInterface()->RegisterChildWindow(ScExponentialSmoothingDialogWrapper::GetChildWindowId());
92 GetStaticInterface()->RegisterChildWindow(ScMovingAverageDialogWrapper::GetChildWindowId());
93 GetStaticInterface()->RegisterChildWindow(ScRegressionDialogWrapper::GetChildWindowId());
94 GetStaticInterface()->RegisterChildWindow(ScTTestDialogWrapper::GetChildWindowId());
95 GetStaticInterface()->RegisterChildWindow(ScFTestDialogWrapper::GetChildWindowId());
96 GetStaticInterface()->RegisterChildWindow(ScZTestDialogWrapper::GetChildWindowId());
97 GetStaticInterface()->RegisterChildWindow(ScChiSquareTestDialogWrapper::GetChildWindowId());
98 GetStaticInterface()->RegisterChildWindow(ScFourierAnalysisDialogWrapper::GetChildWindowId());
99 GetStaticInterface()->RegisterChildWindow(ScCondFormatDlgWrapper::GetChildWindowId());
100 GetStaticInterface()->RegisterChildWindow(sc::SparklineDialogWrapper::GetChildWindowId());
101 GetStaticInterface()->RegisterChildWindow(sc::SparklineDataRangeDialogWrapper::GetChildWindowId());
102}
103
105{
107}
108
109OUString ScTabViewShell::GetFormula(const ScAddress& rAddress)
110{
112 ScRefCellValue aCell(rDoc, rAddress);
113 if (!aCell.isEmpty() && aCell.getType() == CELLTYPE_FORMULA)
114 {
115 return aCell.getFormula()->GetFormula();
116 }
117 return OUString();
118}
119
120/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString GetFormula(const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT, const ScInterpreterContext *pContext=nullptr) const
OUString GetFormula(const ScAddress &rAddress)
Definition: tabvwsh.cxx:109
ScViewData & GetViewData()
Definition: tabview.hxx:335
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
@ CELLTYPE_FORMULA
Definition: global.hxx:275
#define SFX_OBJECTBAR_TOOLS
#define SFX_IMPL_INTERFACE(Class, SuperClass)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
ScFormulaCell * getFormula() const
Definition: cellvalue.hxx:137
bool isEmpty() const
Definition: cellvalue.cxx:667
CellType getType() const
Definition: cellvalue.hxx:133
SFX_IMPL_NAMED_VIEWFACTORY(ScTabViewShell, "Default")
Definition: tabvwsh.cxx:104
#define SFX_VIEW_REGISTRATION(DocClass)