1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
25 #include <sfx2/sidebar/SidebarChildWindow.hxx>
26 #include <sfx2/devtools/DevelopmentToolChildWindow.hxx>
27 #include <sfx2/viewfac.hxx>
29 #include <cellvalue.hxx>
31 #include <tabvwsh.hxx>
33 #include <reffact.hxx>
35 #include <spelldialog.hxx>
36 #include <formulacell.hxx>
37 #include <searchresults.hxx>
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>
45 SFX_IMPL_INTERFACE(ScTabViewShell
, SfxViewShell
)
47 void ScTabViewShell::InitInterface_Impl()
49 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS
,
50 SfxVisibilityFlags::Standard
| SfxVisibilityFlags::FullScreen
| SfxVisibilityFlags::Server
,
51 ToolbarId::Objectbar_Tools
);
53 GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS
);
54 GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
56 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR
, true);
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 GetStaticInterface()->RegisterChildWindow(sc::ConditionalFormatEasyDialogWrapper::GetChildWindowId());
86 GetStaticInterface()->RegisterChildWindow(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
87 GetStaticInterface()->RegisterChildWindow(ScSamplingDialogWrapper::GetChildWindowId());
88 GetStaticInterface()->RegisterChildWindow(ScDescriptiveStatisticsDialogWrapper::GetChildWindowId());
89 GetStaticInterface()->RegisterChildWindow(ScAnalysisOfVarianceDialogWrapper::GetChildWindowId());
90 GetStaticInterface()->RegisterChildWindow(ScCorrelationDialogWrapper::GetChildWindowId());
91 GetStaticInterface()->RegisterChildWindow(ScCovarianceDialogWrapper::GetChildWindowId());
92 GetStaticInterface()->RegisterChildWindow(ScExponentialSmoothingDialogWrapper::GetChildWindowId());
93 GetStaticInterface()->RegisterChildWindow(ScMovingAverageDialogWrapper::GetChildWindowId());
94 GetStaticInterface()->RegisterChildWindow(ScRegressionDialogWrapper::GetChildWindowId());
95 GetStaticInterface()->RegisterChildWindow(ScTTestDialogWrapper::GetChildWindowId());
96 GetStaticInterface()->RegisterChildWindow(ScFTestDialogWrapper::GetChildWindowId());
97 GetStaticInterface()->RegisterChildWindow(ScZTestDialogWrapper::GetChildWindowId());
98 GetStaticInterface()->RegisterChildWindow(ScChiSquareTestDialogWrapper::GetChildWindowId());
99 GetStaticInterface()->RegisterChildWindow(ScFourierAnalysisDialogWrapper::GetChildWindowId());
100 GetStaticInterface()->RegisterChildWindow(ScCondFormatDlgWrapper::GetChildWindowId());
101 GetStaticInterface()->RegisterChildWindow(sc::SparklineDialogWrapper::GetChildWindowId());
102 GetStaticInterface()->RegisterChildWindow(sc::SparklineDataRangeDialogWrapper::GetChildWindowId());
105 SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell
, "Default" )
107 SFX_VIEW_REGISTRATION(ScDocShell
);
110 OUString
ScTabViewShell::GetFormula(const ScAddress
& rAddress
)
112 ScDocument
& rDoc
= GetViewData().GetDocument();
113 ScRefCellValue
aCell(rDoc
, rAddress
);
114 if (!aCell
.isEmpty() && aCell
.getType() == CELLTYPE_FORMULA
)
116 return aCell
.getFormula()->GetFormula();
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */