xref: /trunk/main/sc/source/ui/drawfunc/oleobjsh.cxx (revision 31bbceb0f9d64c0c2c3b22a794a1666c1f33396e)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_sc.hxx"
24 
25 //------------------------------------------------------------------
26 
27 #include <editeng/eeitem.hxx>
28 #include <svx/fontwork.hxx>
29 //CHINA001 #include <svx/labdlg.hxx>
30 #include <svl/srchitem.hxx>
31 #include <svx/tabarea.hxx>
32 #include <svx/tabline.hxx>
33 //CHINA001 #include <svx/transfrm.hxx>
34 #include <sfx2/app.hxx>
35 #include <sfx2/objface.hxx>
36 #include <sfx2/request.hxx>
37 #include <svl/whiter.hxx>
38 #include <vcl/msgbox.hxx>
39 
40 #include "oleobjsh.hxx"
41 #include "drwlayer.hxx"
42 #include "sc.hrc"
43 #include "viewdata.hxx"
44 #include "document.hxx"
45 #include "docpool.hxx"
46 #include "drawview.hxx"
47 #include "scresid.hxx"
48 #include <svx/svdobj.hxx>
49 #include <sfx2/sidebar/EnumContext.hxx>
50 
51 #define ScOleObjectShell
52 #include "scslots.hxx"
53 
54 
55 SFX_IMPL_INTERFACE(ScOleObjectShell, ScDrawShell, ScResId(SCSTR_OLEOBJECTSHELL) )
56 {
57     SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
58                                 ScResId(RID_DRAW_OBJECTBAR) );
59     SFX_POPUPMENU_REGISTRATION( ScResId(RID_POPUP_OLE) );
60 }
61 
62 TYPEINIT1( ScOleObjectShell, ScDrawShell );
63 
64 ScOleObjectShell::ScOleObjectShell(ScViewData* pData) :
65     ScDrawShell(pData)
66 {
67     SetHelpId(HID_SCSHELL_OLEOBJECTSH);
68     SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("OleObject")));
69     SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OLE));
70 }
71 
72 ScOleObjectShell::~ScOleObjectShell()
73 {
74 }
75 
76 
77 void ScOleObjectShell::HandleSelectionChange (void)
78 {
79     // Do not call the implementation in the base class. Let
80     // Activate()/Deactivate() handle context switches.
81 }
82