xref: /aoo41x/main/sc/source/ui/view/tabvwsh.cxx (revision 4d7c9de0)
1b3f79822SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3b3f79822SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4b3f79822SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5b3f79822SAndrew Rist  * distributed with this work for additional information
6b3f79822SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7b3f79822SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8b3f79822SAndrew Rist  * "License"); you may not use this file except in compliance
9b3f79822SAndrew Rist  * with the License.  You may obtain a copy of the License at
10b3f79822SAndrew Rist  *
11b3f79822SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12b3f79822SAndrew Rist  *
13b3f79822SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14b3f79822SAndrew Rist  * software distributed under the License is distributed on an
15b3f79822SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16b3f79822SAndrew Rist  * KIND, either express or implied.  See the License for the
17b3f79822SAndrew Rist  * specific language governing permissions and limitations
18b3f79822SAndrew Rist  * under the License.
19b3f79822SAndrew Rist  *
20b3f79822SAndrew Rist  *************************************************************/
21b3f79822SAndrew Rist 
22b3f79822SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sc.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir //------------------------------------------------------------------
30cdf0e10cSrcweir // INCLUDE ---------------------------------------------------------------
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include "scitems.hxx"
33cdf0e10cSrcweir #include <svx/galbrws.hxx>
34cdf0e10cSrcweir #include <svx/imapdlg.hxx>
35cdf0e10cSrcweir #include <svl/srchitem.hxx>
36cdf0e10cSrcweir #include <sfx2/templdlg.hxx>
37cdf0e10cSrcweir #include <sfx2/objface.hxx>
38cdf0e10cSrcweir #include <sfx2/viewfrm.hxx>
39cdf0e10cSrcweir #include <sfx2/bindings.hxx>
40cdf0e10cSrcweir #include <sfx2/app.hxx>
417a32b0c8SAndre Fischer #include <sfx2/sidebar/SidebarChildWindow.hxx>
42cdf0e10cSrcweir #include <avmedia/mediaplayer.hxx>
43cdf0e10cSrcweir 
44*0deba7fbSSteve Yin #include "cell.hxx"
45*0deba7fbSSteve Yin #include "docoptio.hxx"
46*0deba7fbSSteve Yin 
47cdf0e10cSrcweir #include "tabvwsh.hxx"
48cdf0e10cSrcweir #include "docsh.hxx"
49cdf0e10cSrcweir #include "reffact.hxx"
50cdf0e10cSrcweir #include "scresid.hxx"
51cdf0e10cSrcweir #include "dwfunctr.hxx"
52cdf0e10cSrcweir #include "sc.hrc"       // -> SID_TOOL_xxx
53cdf0e10cSrcweir #include "drawattr.hxx" // -> SvxDrawToolItem
54cdf0e10cSrcweir #include "spelldialog.hxx"
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 
57cdf0e10cSrcweir #define ScTabViewShell
58cdf0e10cSrcweir #include "scslots.hxx"
59cdf0e10cSrcweir 
60cdf0e10cSrcweir TYPEINIT2(ScTabViewShell,SfxViewShell,SfxListener);
61cdf0e10cSrcweir 
SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId (SCSTR_TABVIEWSHELL))62cdf0e10cSrcweir SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
63cdf0e10cSrcweir {
64cdf0e10cSrcweir 	SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS  | SFX_VISIBILITY_STANDARD |
65cdf0e10cSrcweir 								SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
66cdf0e10cSrcweir 								ScResId(RID_OBJECTBAR_TOOLS) );
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(FID_INPUTLINE_STATUS);
69cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
70cdf0e10cSrcweir 	SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
717a32b0c8SAndre Fischer 	SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
72cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScNameDlgWrapper::GetChildWindowId());
73cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScSolverDlgWrapper::GetChildWindowId());
74cdf0e10cSrcweir     SFX_CHILDWINDOW_REGISTRATION(ScOptSolverDlgWrapper::GetChildWindowId());
75cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScPivotLayoutWrapper::GetChildWindowId());
76cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScTabOpDlgWrapper::GetChildWindowId());
77cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScFilterDlgWrapper::GetChildWindowId());
78cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScSpecialFilterDlgWrapper::GetChildWindowId());
79cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScDbNameDlgWrapper::GetChildWindowId());
80cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScConsolidateDlgWrapper::GetChildWindowId());
81cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScPrintAreasDlgWrapper::GetChildWindowId());
82cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScCondFormatDlgWrapper::GetChildWindowId());
83cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScColRowNameRangesDlgWrapper::GetChildWindowId());
84cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScFormulaDlgWrapper::GetChildWindowId());
85cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(SvxIMapDlgChildWindow::GetChildWindowId());
86cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScFunctionChildWindow::GetChildWindowId());
87cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScFormulaDlgWrapper::GetChildWindowId());
88cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScAcceptChgDlgWrapper::GetChildWindowId());
89cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScHighlightChgDlgWrapper::GetChildWindowId());
90cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScSimpleRefDlgWrapper::GetChildWindowId());
91cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(SID_SEARCH_DLG);
92cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(SID_HYPERLINK_DIALOG);
93cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(GalleryChildWindow::GetChildWindowId());
94cdf0e10cSrcweir     SFX_CHILDWINDOW_REGISTRATION(ScSpellDialogChildWindow::GetChildWindowId());
95cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION( ::avmedia::MediaPlayer::GetChildWindowId() );
96cdf0e10cSrcweir 	SFX_CHILDWINDOW_REGISTRATION(ScValidityRefChildWin::GetChildWindowId());
97cdf0e10cSrcweir }
98cdf0e10cSrcweir 
99cdf0e10cSrcweir SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
100cdf0e10cSrcweir {
101cdf0e10cSrcweir 	SFX_VIEW_REGISTRATION(ScDocShell);
102cdf0e10cSrcweir }
103cdf0e10cSrcweir 
104cdf0e10cSrcweir //------------------------------------------------------------------
105cdf0e10cSrcweir 
IMPL_LINK(ScTabViewShell,HtmlOptionsHdl,void *,EMPTYARG)106cdf0e10cSrcweir IMPL_LINK( ScTabViewShell, HtmlOptionsHdl, void*, EMPTYARG )
107cdf0e10cSrcweir {
108cdf0e10cSrcweir 	// Invalidierung, falls blinkender Text erlaubt/verboten wurde
109cdf0e10cSrcweir     GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
110cdf0e10cSrcweir     return 0;
111cdf0e10cSrcweir }
112*0deba7fbSSteve Yin 
GetFormula(ScAddress & rAddress)113*0deba7fbSSteve Yin rtl::OUString ScTabViewShell::GetFormula(ScAddress& rAddress)
114*0deba7fbSSteve Yin {
115*0deba7fbSSteve Yin 	String sFormula;
116*0deba7fbSSteve Yin 	ScDocument* pDoc = GetViewData()->GetDocument();
117*0deba7fbSSteve Yin 	ScBaseCell* pCell = pDoc->GetCell(rAddress);
118*0deba7fbSSteve Yin 	if (pCell && pCell->GetCellType()==CELLTYPE_FORMULA)
119*0deba7fbSSteve Yin 	{
120*0deba7fbSSteve Yin 		static_cast<ScFormulaCell*>(pCell)->GetFormula(sFormula);
121*0deba7fbSSteve Yin 	}
122*0deba7fbSSteve Yin 	return sFormula;
123*0deba7fbSSteve Yin }
124*0deba7fbSSteve Yin 
125*0deba7fbSSteve Yin 
126*0deba7fbSSteve Yin 
127