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_cui.hxx"
26
27 #include <tools/urlobj.hxx>
28 #include <vcl/msgbox.hxx>
29 #include <vcl/help.hxx>
30 #include <sfx2/sfxsids.hrc>
31 #define _ANIMATION
32 #include "macroass.hxx"
33 #include <svtools/imaprect.hxx>
34 #include <svtools/imapcirc.hxx>
35 #include <svtools/imappoly.hxx>
36 #include <svl/urlbmk.hxx>
37 #include <svx/xoutbmp.hxx>
38 #include <dialmgr.hxx>
39 #include <cuires.hrc>
40 #include <cuiimapdlg.hrc>
41 #include <cuiimapwnd.hxx>
42 #include <svx/svdpage.hxx>
43 #include <svx/svdorect.hxx>
44 #include <svx/svdocirc.hxx>
45 #include <svx/svdopath.hxx>
46 #include <svx/xfltrit.hxx>
47 #include <svx/svdpagv.hxx>
48 #include <svl/urihelper.hxx>
49 #include <svx/xfillit.hxx>
50 #include <svx/xlineit.hxx>
51
52 #include <sot/formats.hxx>
53
54 #define TRANSCOL Color( COL_WHITE )
55
56 /*************************************************************************
57 |*
58 |* URLDlg
59 |*
60 \************************************************************************/
61
URLDlg(Window * pWindow,const String & rURL,const String & rAlternativeText,const String & rDescription,const String & rTarget,const String & rName,TargetList & rTargetList)62 URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeText, const String& rDescription, const String& rTarget, const String& rName, TargetList& rTargetList )
63 : ModalDialog( pWindow, CUI_RES( RID_SVXDLG_IMAPURL ) )
64 , maFtURL( this, CUI_RES( FT_URL1 ) )
65 , maEdtURL( this, CUI_RES( EDT_URL ) )
66 , maFtTarget( this, CUI_RES( FT_TARGET ) )
67 , maCbbTargets( this, CUI_RES( CBB_TARGETS ) )
68 , maFtName( this, CUI_RES( FT_NAME ) )
69 , maEdtName( this, CUI_RES( EDT_NAME ) )
70 , maFtAlternativeText( this, CUI_RES( FT_URLDESCRIPTION ) )
71 , maEdtAlternativeText( this, CUI_RES( EDT_URLDESCRIPTION ) )
72 , maFtDescription( this, CUI_RES( FT_DESCRIPTION ) )
73 , maEdtDescription( this, CUI_RES( EDT_DESCRIPTION ) )
74 , maFlURL( this, CUI_RES( FL_URL ) )
75 , maBtnHelp( this, CUI_RES( BTN_HELP1 ) )
76 , maBtnOk( this, CUI_RES( BTN_OK1 ) )
77 , maBtnCancel( this, CUI_RES( BTN_CANCEL1 ) )
78 {
79 FreeResource();
80
81 maEdtURL.SetText( rURL );
82 maEdtAlternativeText.SetText( rAlternativeText );
83 maEdtDescription.SetText( rDescription );
84 maEdtName.SetText( rName );
85
86 for( String* pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() )
87 maCbbTargets.InsertEntry( *pStr );
88
89 if( !rTarget.Len() )
90 maCbbTargets.SetText( String::CreateFromAscii( "_self" ) );
91 else
92 maCbbTargets.SetText( rTarget );
93 }
94