xref: /aoo41x/main/sc/source/ui/view/imapwrap.cxx (revision b3f79822)
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 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26 
27 
28 
29 // INCLUDE ---------------------------------------------------------------
30 
31 #include <svx/imapdlg.hxx>
32 #include <sfx2/viewfrm.hxx>
33 
34 
ScIMapChildWindowId()35 sal_uInt16 ScIMapChildWindowId()
36 {
37 	return SvxIMapDlgChildWindow::GetChildWindowId();
38 }
39 
ScGetIMapDlg()40 SvxIMapDlg* ScGetIMapDlg()
41 {
42 	//!	pass view frame here and in SVXIMAPDLG()
43 
44 	SfxViewFrame* pViewFrm = SfxViewFrame::Current();
45 	if( pViewFrm && pViewFrm->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
46 		return SVXIMAPDLG();
47 	else
48 		return NULL;
49 }
50 
ScIMapDlgSet(const Graphic & rGraphic,const ImageMap * pImageMap,const TargetList * pTargetList,void * pEditingObj)51 void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap,
52 					const TargetList* pTargetList, void* pEditingObj )
53 {
54 	SvxIMapDlgChildWindow::UpdateIMapDlg( rGraphic, pImageMap, pTargetList, pEditingObj );
55 }
56 
ScIMapDlgGetObj(SvxIMapDlg * pDlg)57 const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg )
58 {
59 	if ( pDlg )
60 		return pDlg->GetEditingObject();
61 	else
62 		return NULL;
63 }
64 
ScIMapDlgGetMap(SvxIMapDlg * pDlg)65 const ImageMap&	ScIMapDlgGetMap( SvxIMapDlg* pDlg )
66 {
67 	return pDlg->GetImageMap();
68 }
69 
70 
71 
72 
73