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 "scitems.hxx"
21 #include <svx/imapdlg.hxx>
22 #include <svx/srchdlg.hxx>
23 #include <svl/srchitem.hxx>
24 #include <sfx2/templdlg.hxx>
25 #include <sfx2/objface.hxx>
26 #include <sfx2/viewfrm.hxx>
27 #include <sfx2/bindings.hxx>
28 #include <sfx2/app.hxx>
29 #include <sfx2/infobar.hxx>
30 #include <sfx2/sidebar/SidebarChildWindow.hxx>
32 #include "cellvalue.hxx"
33 #include "docoptio.hxx"
35 #include "tabvwsh.hxx"
37 #include "reffact.hxx"
38 #include "scresid.hxx"
39 #include "dwfunctr.hxx"
41 #include "spelldialog.hxx"
42 #include <searchresults.hxx>
44 #include <sfx2/request.hxx>
45 // needed for -fsanitize=function visibility of typeinfo for functions of
46 // type void(SfxShell*,SfxRequest&) defined in scslots.hxx
47 #define ScTabViewShell
48 #include "scslots.hxx"
50 TYPEINIT2(ScTabViewShell
,SfxViewShell
,SfxListener
);
52 SFX_IMPL_INTERFACE(ScTabViewShell
, SfxViewShell
)
54 void ScTabViewShell::InitInterface_Impl()
56 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS
| SFX_VISIBILITY_STANDARD
| SFX_VISIBILITY_FULLSCREEN
| SFX_VISIBILITY_SERVER
,
59 GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS
);
60 GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
62 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR
, true);
64 GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
65 GetStaticInterface()->RegisterChildWindow(ScNameDlgWrapper::GetChildWindowId());
66 GetStaticInterface()->RegisterChildWindow(ScNameDefDlgWrapper::GetChildWindowId());
67 GetStaticInterface()->RegisterChildWindow(ScSolverDlgWrapper::GetChildWindowId());
68 GetStaticInterface()->RegisterChildWindow(ScOptSolverDlgWrapper::GetChildWindowId());
69 GetStaticInterface()->RegisterChildWindow(ScXMLSourceDlgWrapper::GetChildWindowId());
70 GetStaticInterface()->RegisterChildWindow(ScPivotLayoutWrapper::GetChildWindowId());
71 GetStaticInterface()->RegisterChildWindow(ScTabOpDlgWrapper::GetChildWindowId());
72 GetStaticInterface()->RegisterChildWindow(ScFilterDlgWrapper::GetChildWindowId());
73 GetStaticInterface()->RegisterChildWindow(ScSpecialFilterDlgWrapper::GetChildWindowId());
74 GetStaticInterface()->RegisterChildWindow(ScDbNameDlgWrapper::GetChildWindowId());
75 GetStaticInterface()->RegisterChildWindow(ScConsolidateDlgWrapper::GetChildWindowId());
76 GetStaticInterface()->RegisterChildWindow(ScPrintAreasDlgWrapper::GetChildWindowId());
77 GetStaticInterface()->RegisterChildWindow(ScColRowNameRangesDlgWrapper::GetChildWindowId());
78 GetStaticInterface()->RegisterChildWindow(ScFormulaDlgWrapper::GetChildWindowId());
79 GetStaticInterface()->RegisterChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
80 GetStaticInterface()->RegisterChildWindow(ScFunctionChildWindow::GetChildWindowId());
81 GetStaticInterface()->RegisterChildWindow(ScFormulaDlgWrapper::GetChildWindowId());
82 GetStaticInterface()->RegisterChildWindow(ScAcceptChgDlgWrapper::GetChildWindowId());
83 GetStaticInterface()->RegisterChildWindow(ScHighlightChgDlgWrapper::GetChildWindowId());
84 GetStaticInterface()->RegisterChildWindow(ScSimpleRefDlgWrapper::GetChildWindowId());
85 GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
86 GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG
);
87 GetStaticInterface()->RegisterChildWindow(ScSpellDialogChildWindow::GetChildWindowId());
88 GetStaticInterface()->RegisterChildWindow(ScValidityRefChildWin::GetChildWindowId());
89 GetStaticInterface()->RegisterChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
91 GetStaticInterface()->RegisterChildWindow(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
92 GetStaticInterface()->RegisterChildWindow(ScSamplingDialogWrapper::GetChildWindowId());
93 GetStaticInterface()->RegisterChildWindow(ScDescriptiveStatisticsDialogWrapper::GetChildWindowId());
94 GetStaticInterface()->RegisterChildWindow(ScAnalysisOfVarianceDialogWrapper::GetChildWindowId());
95 GetStaticInterface()->RegisterChildWindow(ScCorrelationDialogWrapper::GetChildWindowId());
96 GetStaticInterface()->RegisterChildWindow(ScCovarianceDialogWrapper::GetChildWindowId());
97 GetStaticInterface()->RegisterChildWindow(ScExponentialSmoothingDialogWrapper::GetChildWindowId());
98 GetStaticInterface()->RegisterChildWindow(ScMovingAverageDialogWrapper::GetChildWindowId());
99 GetStaticInterface()->RegisterChildWindow(ScTTestDialogWrapper::GetChildWindowId());
100 GetStaticInterface()->RegisterChildWindow(ScFTestDialogWrapper::GetChildWindowId());
101 GetStaticInterface()->RegisterChildWindow(ScZTestDialogWrapper::GetChildWindowId());
102 GetStaticInterface()->RegisterChildWindow(ScChiSquareTestDialogWrapper::GetChildWindowId());
103 GetStaticInterface()->RegisterChildWindow(ScCondFormatDlgWrapper::GetChildWindowId());
106 SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell
, "Default" )
108 SFX_VIEW_REGISTRATION(ScDocShell
);
111 OUString
ScTabViewShell::GetFormula(ScAddress
& rAddress
)
114 ScDocument
* pDoc
= GetViewData().GetDocument();
115 ScRefCellValue aCell
;
116 aCell
.assign(*pDoc
, rAddress
);
117 if (!aCell
.isEmpty() && aCell
.meType
== CELLTYPE_FORMULA
)
119 sFormula
= aCell
.mpString
->getString();
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */