1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <tools/urlobj.hxx>
21 #include <vcl/msgbox.hxx>
22 #include <vcl/help.hxx>
23 #include <sfx2/sfxsids.hrc>
24 #include "macroass.hxx"
25 #include <svtools/imaprect.hxx>
26 #include <svtools/imapcirc.hxx>
27 #include <svtools/imappoly.hxx>
28 #include <svl/urlbmk.hxx>
29 #include <svx/xoutbmp.hxx>
30 #include <dialmgr.hxx>
32 #include <cuiimapwnd.hxx>
33 #include <svx/svdpage.hxx>
34 #include <svx/svdorect.hxx>
35 #include <svx/svdocirc.hxx>
36 #include <svx/svdopath.hxx>
37 #include <svx/xfltrit.hxx>
38 #include <svx/svdpagv.hxx>
39 #include <svl/urihelper.hxx>
40 #include <svx/xfillit.hxx>
41 #include <svx/xlineit.hxx>
43 #include <sot/formats.hxx>
45 /*************************************************************************
49 \************************************************************************/
51 URLDlg::URLDlg( vcl::Window
* pWindow
, const OUString
& rURL
, const OUString
& rAlternativeText
, const OUString
& rDescription
, const OUString
& rTarget
, const OUString
& rName
, TargetList
& rTargetList
)
52 : ModalDialog(pWindow
, "IMapDialog", "cui/ui/cuiimapdlg.ui")
54 get(m_pEdtURL
, "urlentry");
55 get(m_pCbbTargets
, "frameCB");
56 get(m_pEdtName
, "nameentry");
57 get(m_pEdtAlternativeText
, "textentry");
58 get(m_pEdtDescription
, "descTV");
59 m_pEdtDescription
->set_height_request(m_pEdtDescription
->GetTextHeight() * 5);
60 m_pEdtDescription
->set_width_request(m_pEdtDescription
->approximate_char_width() * 60);
62 m_pEdtURL
->SetText( rURL
);
63 m_pEdtAlternativeText
->SetText( rAlternativeText
);
64 m_pEdtDescription
->SetText( rDescription
);
65 m_pEdtName
->SetText( rName
);
67 for( size_t i
= 0, n
= rTargetList
.size(); i
< n
; ++i
)
68 m_pCbbTargets
->InsertEntry( rTargetList
[ i
] );
70 if( rTarget
.isEmpty() )
71 m_pCbbTargets
->SetText( "_self");
73 m_pCbbTargets
->SetText( rTarget
);
81 void URLDlg::dispose()
84 m_pCbbTargets
.clear();
86 m_pEdtAlternativeText
.clear();
87 m_pEdtDescription
.clear();
88 ModalDialog::dispose();
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */