xref: /aoo41x/main/cui/source/dialogs/cuiimapwnd.cxx (revision 2ee96f1c)
1*2ee96f1cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2ee96f1cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2ee96f1cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2ee96f1cSAndrew Rist  * distributed with this work for additional information
6*2ee96f1cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2ee96f1cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2ee96f1cSAndrew Rist  * "License"); you may not use this file except in compliance
9*2ee96f1cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2ee96f1cSAndrew Rist  *
11*2ee96f1cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2ee96f1cSAndrew Rist  *
13*2ee96f1cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2ee96f1cSAndrew Rist  * software distributed under the License is distributed on an
15*2ee96f1cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2ee96f1cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*2ee96f1cSAndrew Rist  * specific language governing permissions and limitations
18*2ee96f1cSAndrew Rist  * under the License.
19*2ee96f1cSAndrew Rist  *
20*2ee96f1cSAndrew Rist  *************************************************************/
21*2ee96f1cSAndrew Rist 
22*2ee96f1cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_cui.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <tools/urlobj.hxx>
28cdf0e10cSrcweir #include <vcl/msgbox.hxx>
29cdf0e10cSrcweir #include <vcl/help.hxx>
30cdf0e10cSrcweir #include <sfx2/sfxsids.hrc>
31cdf0e10cSrcweir #define _ANIMATION
32cdf0e10cSrcweir #include "macroass.hxx"
33cdf0e10cSrcweir #include <svtools/imaprect.hxx>
34cdf0e10cSrcweir #include <svtools/imapcirc.hxx>
35cdf0e10cSrcweir #include <svtools/imappoly.hxx>
36cdf0e10cSrcweir #include <svl/urlbmk.hxx>
37cdf0e10cSrcweir #include <svx/xoutbmp.hxx>
38cdf0e10cSrcweir #include <dialmgr.hxx>
39cdf0e10cSrcweir #include <cuires.hrc>
40cdf0e10cSrcweir #include <cuiimapdlg.hrc>
41cdf0e10cSrcweir #include <cuiimapwnd.hxx>
42cdf0e10cSrcweir #include <svx/svdpage.hxx>
43cdf0e10cSrcweir #include <svx/svdorect.hxx>
44cdf0e10cSrcweir #include <svx/svdocirc.hxx>
45cdf0e10cSrcweir #include <svx/svdopath.hxx>
46cdf0e10cSrcweir #include <svx/xfltrit.hxx>
47cdf0e10cSrcweir #include <svx/svdpagv.hxx>
48cdf0e10cSrcweir #include <svl/urihelper.hxx>
49cdf0e10cSrcweir #include <svx/xfillit.hxx>
50cdf0e10cSrcweir #include <svx/xlineit.hxx>
51cdf0e10cSrcweir 
52cdf0e10cSrcweir #include <sot/formats.hxx>
53cdf0e10cSrcweir 
54cdf0e10cSrcweir #define TRANSCOL Color( COL_WHITE )
55cdf0e10cSrcweir 
56cdf0e10cSrcweir /*************************************************************************
57cdf0e10cSrcweir |*
58cdf0e10cSrcweir |*	URLDlg
59cdf0e10cSrcweir |*
60cdf0e10cSrcweir \************************************************************************/
61cdf0e10cSrcweir 
URLDlg(Window * pWindow,const String & rURL,const String & rAlternativeText,const String & rDescription,const String & rTarget,const String & rName,TargetList & rTargetList)62cdf0e10cSrcweir URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeText, const String& rDescription, const String& rTarget, const String& rName, TargetList& rTargetList )
63cdf0e10cSrcweir : ModalDialog( pWindow, CUI_RES( RID_SVXDLG_IMAPURL ) )
64cdf0e10cSrcweir , maFtURL( this, CUI_RES( FT_URL1 ) )
65cdf0e10cSrcweir , maEdtURL( this, CUI_RES( EDT_URL ) )
66cdf0e10cSrcweir , maFtTarget( this, CUI_RES( FT_TARGET ) )
67cdf0e10cSrcweir , maCbbTargets( this, CUI_RES( CBB_TARGETS ) )
68cdf0e10cSrcweir , maFtName( this, CUI_RES( FT_NAME ) )
69cdf0e10cSrcweir , maEdtName( this, CUI_RES( EDT_NAME ) )
70cdf0e10cSrcweir , maFtAlternativeText( this, CUI_RES( FT_URLDESCRIPTION ) )
71cdf0e10cSrcweir , maEdtAlternativeText( this, CUI_RES( EDT_URLDESCRIPTION ) )
72cdf0e10cSrcweir , maFtDescription( this, CUI_RES( FT_DESCRIPTION ) )
73cdf0e10cSrcweir , maEdtDescription( this, CUI_RES( EDT_DESCRIPTION ) )
74cdf0e10cSrcweir , maFlURL( this, CUI_RES( FL_URL ) )
75cdf0e10cSrcweir , maBtnHelp( this, CUI_RES( BTN_HELP1 ) )
76cdf0e10cSrcweir , maBtnOk( this, CUI_RES( BTN_OK1 ) )
77cdf0e10cSrcweir , maBtnCancel( this, CUI_RES( BTN_CANCEL1 ) )
78cdf0e10cSrcweir {
79cdf0e10cSrcweir 	FreeResource();
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	maEdtURL.SetText( rURL );
82cdf0e10cSrcweir 	maEdtAlternativeText.SetText( rAlternativeText );
83cdf0e10cSrcweir 	maEdtDescription.SetText( rDescription );
84cdf0e10cSrcweir 	maEdtName.SetText( rName );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 	for( String* pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() )
87cdf0e10cSrcweir 		maCbbTargets.InsertEntry( *pStr );
88cdf0e10cSrcweir 
89cdf0e10cSrcweir 	if( !rTarget.Len() )
90cdf0e10cSrcweir 		maCbbTargets.SetText( String::CreateFromAscii( "_self" ) );
91cdf0e10cSrcweir 	else
92cdf0e10cSrcweir 		maCbbTargets.SetText( rTarget );
93cdf0e10cSrcweir }
94