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/help.hxx>
22 #include <sfx2/sfxsids.hrc>
23 #include <macroass.hxx>
24 #include <vcl/imaprect.hxx>
25 #include <vcl/imapcirc.hxx>
26 #include <vcl/imappoly.hxx>
27 #include <svl/urlbmk.hxx>
28 #include <svx/xoutbmp.hxx>
29 #include <cuiimapwnd.hxx>
30 #include <svx/svdpage.hxx>
31 #include <svx/svdorect.hxx>
32 #include <svx/svdocirc.hxx>
33 #include <svx/svdopath.hxx>
34 #include <svx/xfltrit.hxx>
35 #include <svx/svdpagv.hxx>
36 #include <svl/urihelper.hxx>
38 #include <sot/formats.hxx>
40 /*************************************************************************
44 \************************************************************************/
46 URLDlg::URLDlg(weld::Widget
* pWindow
, const OUString
& rURL
, const OUString
& rAlternativeText
,
47 const OUString
& rDescription
, const OUString
& rTarget
, const OUString
& rName
,
48 TargetList
& rTargetList
)
49 : GenericDialogController(pWindow
, "cui/ui/cuiimapdlg.ui", "IMapDialog")
50 , m_xEdtURL(m_xBuilder
->weld_entry("urlentry"))
51 , m_xCbbTargets(m_xBuilder
->weld_combo_box("frameCB"))
52 , m_xEdtName(m_xBuilder
->weld_entry("nameentry"))
53 , m_xEdtAlternativeText(m_xBuilder
->weld_entry("textentry"))
54 , m_xEdtDescription(m_xBuilder
->weld_text_view("descTV"))
56 m_xEdtDescription
->set_size_request(m_xEdtDescription
->get_approximate_digit_width() * 51,
57 m_xEdtDescription
->get_height_rows(5));
59 m_xEdtURL
->set_text( rURL
);
60 m_xEdtAlternativeText
->set_text( rAlternativeText
);
61 m_xEdtDescription
->set_text( rDescription
);
62 m_xEdtName
->set_text( rName
);
64 for (const OUString
& a
: rTargetList
)
65 m_xCbbTargets
->append_text(a
);
67 if (rTarget
.isEmpty())
68 m_xCbbTargets
->set_entry_text("_self");
70 m_xCbbTargets
->set_entry_text(rTarget
);
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */