LibreOffice Module cui (master) 1
hltpbase.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <memory>
21#include <sal/config.h>
22
23#include <comphelper/lok.hxx>
24#include <osl/file.hxx>
25#include <sfx2/app.hxx>
26#include <sfx2/event.hxx>
27#include <sfx2/frame.hxx>
28#include <sfx2/viewfrm.hxx>
29#include <sot/formats.hxx>
30#include <sfx2/sfxsids.hrc>
31#include <svl/macitem.hxx>
32#include <ucbhelper/content.hxx>
33#include <cuihyperdlg.hxx>
34#include <hltpbase.hxx>
35#include <macroass.hxx>
36#include <svx/svxdlg.hxx>
37#include <strings.hrc>
38#include <dialmgr.hxx>
39#include <bitmaps.hlst>
40
41using namespace ::ucbhelper;
42
43namespace {
44
45OUString CreateUiNameFromURL( const OUString& aStrURL )
46{
47 OUString aStrUiURL;
48 INetURLObject aURLObj( aStrURL );
49
50 switch(aURLObj.GetProtocol())
51 {
52 case INetProtocol::File:
53 osl::FileBase::getSystemPathFromFileURL(aURLObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aStrUiURL);
54 break;
55 case INetProtocol::Ftp :
56 {
57 //remove password from name
58 INetURLObject aTmpURL(aURLObj);
59 aTmpURL.SetPass(u"");
60 aStrUiURL = aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous );
61 }
62 break;
63 default :
64 {
65 aStrUiURL = aURLObj.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
66 }
67 }
68 if(aStrUiURL.isEmpty())
69 return aStrURL;
70 return aStrUiURL;
71}
72
73}
74
75// ComboBox-Control for URL's with History and Autocompletion
76SvxHyperURLBox::SvxHyperURLBox(std::unique_ptr<weld::ComboBox> xControl)
77 : SvtURLBox(std::move(xControl))
78 , DropTargetHelper(getWidget()->get_drop_target())
79{
80 SetSmartProtocol(INetProtocol::Http);
81}
82
84{
85 return IsDropFormatSupported( SotClipboardFormatId::STRING ) ? DND_ACTION_COPY : DND_ACTION_NONE;
86}
87
89{
90 TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable );
91 OUString aString;
93
94 if( aDataHelper.GetString( SotClipboardFormatId::STRING, aString ) )
95 {
96 set_entry_text(aString);
97 nRet = DND_ACTION_COPY;
98 }
99
100 return nRet;
101}
102
103//# Hyperlink-Dialog: Tabpages-Baseclass #
104
106 SvxHpLinkDlg* pDlg,
107 const OUString& rUIXMLDescription,
108 const OString& rID,
109 const SfxItemSet* pItemSet)
110 : IconChoicePage(pParent, rUIXMLDescription, rID, pItemSet)
111 , mxCbbFrame(xBuilder->weld_combo_box("frame"))
112 , mxLbForm(xBuilder->weld_combo_box("form"))
113 , mxEdIndication(xBuilder->weld_entry("indication"))
114 , mxEdText(xBuilder->weld_entry("name"))
115 , mxBtScript(xBuilder->weld_button("script"))
116 , mxFormLabel(xBuilder->weld_label("form_label"))
117 , mxFrameLabel(xBuilder->weld_label("frame_label"))
118 , mbIsCloseDisabled( false )
119 , mpDialog( pDlg )
120 , mbStdControlsInit( false )
121 , maTimer("cui SvxHyperlinkTabPageBase maTimer")
122{
123 // create bookmark-window
124}
125
127{
128 maTimer.Stop();
129
130 HideMarkWnd();
131}
132
134{
135 return !mbIsCloseDisabled;
136}
137
139{
140 if ( !mbStdControlsInit )
141 {
142 SfxDispatcher* pDispatch = GetDispatcher();
143 SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : nullptr;
144 SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
145 if ( pFrame )
146 {
147 TargetList aList;
149 if( !aList.empty() )
150 {
151 size_t nCount = aList.size();
152 size_t i;
153 for ( i = 0; i < nCount; i++ )
154 {
155 mxCbbFrame->append_text( aList.at( i ) );
156 }
157 }
158 }
159
160 mxBtScript->set_from_icon_name(RID_SVXBMP_SCRIPT);
161
162 mxBtScript->connect_clicked ( LINK ( this, SvxHyperlinkTabPageBase, ClickScriptHdl_Impl ) );
163 }
164
165 mbStdControlsInit = true;
166}
167
168// Move Extra-Window
170{
171 mxMarkWnd->MoveTo(aNewPos);
172}
173
174// Show Extra-Window
176{
177 if (mxMarkWnd)
178 {
179 mxMarkWnd->getDialog()->present();
180 return;
181 }
182
183 weld::Dialog* pDialog = mpDialog->getDialog();
184
185 mxMarkWnd = std::make_shared<SvxHlinkDlgMarkWnd>(pDialog, this);
186
187 // Size of dialog-window in screen pixels
188 Point aDlgPos(pDialog->get_position());
189 Size aDlgSize(pDialog->get_size());
190
191 // Absolute size of the screen
192 ::tools::Rectangle aScreen(pDialog->get_monitor_workarea());
193
194 // Size of Extrawindow
195 Size aExtraWndSize(mxMarkWnd->getDialog()->get_preferred_size());
196
197 // mxMarkWnd is a child of mpDialog, so coordinates for positioning must be relative to mpDialog
198 if( aDlgPos.X()+(1.05*aDlgSize.Width())+aExtraWndSize.Width() > aScreen.Right() )
199 {
200 if( aDlgPos.X() - ( 0.05*aDlgSize.Width() ) - aExtraWndSize.Width() < 0 )
201 {
202 // Pos Extrawindow anywhere
203 MoveToExtraWnd( Point(10,10) ); // very unlikely
204 }
205 else
206 {
207 // Pos Extrawindow on the left side of Dialog
208 MoveToExtraWnd( Point(0,0) - Point( tools::Long(0.05*aDlgSize.Width()), 0 ) - Point( aExtraWndSize.Width(), 0 ) );
209 }
210 }
211 else
212 {
213 // Pos Extrawindow on the right side of Dialog
214 MoveToExtraWnd ( Point( tools::Long(1.05*aDlgSize.getWidth()), 0 ) );
215 }
216
217 // Set size of Extra-Window
218 mxMarkWnd->getDialog()->set_size_request(aExtraWndSize.Width(), aDlgSize.Height());
219
220 weld::DialogController::runAsync(mxMarkWnd, [this](sal_Int32 /*nResult*/) { mxMarkWnd.reset(); } );
221}
222
224{
225 if (mxMarkWnd)
226 {
227 mxMarkWnd->response(RET_CANCEL);
228 mxMarkWnd.reset();
229 }
230}
231
232// Fill Dialogfields
234{
236 {
237 // Frame
238 sal_Int32 nPos = mxCbbFrame->find_text(pHyperlinkItem->GetTargetFrame());
239 if (nPos != -1)
240 mxCbbFrame->set_active(nPos);
241
242 // Form
243 OUString aStrFormText = CuiResId( RID_CUISTR_HYPERDLG_FROM_TEXT );
244
245 OUString aStrFormButton = CuiResId( RID_CUISTR_HYPERDLG_FORM_BUTTON );
246
247 if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE )
248 {
249 mxLbForm->clear();
250 mxLbForm->append_text( aStrFormText );
251 mxLbForm->set_active( 0 );
252 }
253 else
254 {
255 mxLbForm->clear();
256 mxLbForm->append_text( aStrFormText );
257 mxLbForm->append_text( aStrFormButton );
258 mxLbForm->set_active( pHyperlinkItem->GetInsertMode() == HLINK_BUTTON ? 1 : 0 );
259 }
260 }
261 else
262 {
263 mxCbbFrame->hide();
264 mxLbForm->hide();
265 mxFormLabel->hide();
266 mxFrameLabel->hide();
267 }
268
269 // URL
270 mxEdIndication->set_text( pHyperlinkItem->GetName() );
271
272 // Name
273 mxEdText->set_text( pHyperlinkItem->GetIntName() );
274
275 // Script-button
277 {
278 if ( pHyperlinkItem->GetMacroEvents() == HyperDialogEvent::NONE )
279 mxBtScript->set_sensitive(false);
280 else
281 mxBtScript->set_sensitive(true);
282 }
283 else
284 {
285 mxBtScript->hide();
286 }
287}
288
289// Any action to do after apply-button is pressed
291{
292 // default-implementation : do nothing
293}
294
295// This method would be called from bookmark-window to set new mark-string
296void SvxHyperlinkTabPageBase::SetMarkStr ( const OUString& /*aStrMark*/ )
297{
298 // default-implementation : do nothing
299}
300
301// Set initial focus
303{
304 xContainer->grab_focus();
305}
306
307// retrieve dispatcher
309{
310 return mpDialog->GetDispatcher();
311}
312
314{
315 mbIsCloseDisabled = _bDisable;
317 maBusy.incBusy(mpDialog->getDialog());
318 else
319 maBusy.decBusy();
320}
321
322// Click on imagebutton : Script
324{
325 SvxHyperlinkItem *pHyperlinkItem = const_cast<SvxHyperlinkItem*>(
326 GetItemSet().GetItem (SID_HYPERLINK_GETLINK));
327
328 if (!pHyperlinkItem || pHyperlinkItem->GetMacroEvents() == HyperDialogEvent::NONE)
329 return;
330
331 // get macros from itemset
332 const SvxMacroTableDtor* pMacroTbl = pHyperlinkItem->GetMacroTable();
333 SvxMacroItem aItem ( SID_ATTR_MACROITEM );
334 if( pMacroTbl )
335 aItem.SetMacroTable( *pMacroTbl );
336
337 // create empty itemset for macro-dlg
339 aItemSet.Put ( aItem );
340
341 DisableClose( true );
342
343 SfxMacroAssignDlg aDlg(mpDialog->getDialog(), mxDocumentFrame, aItemSet);
344
345 // add events
346 SfxMacroTabPage *pMacroPage = aDlg.GetTabPage();
347
348 if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOverObject )
349 pMacroPage->AddEvent( CuiResId(RID_CUISTR_HYPDLG_MACROACT1),
350 SvMacroItemId::OnMouseOver );
351 if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseClickObject )
352 pMacroPage->AddEvent( CuiResId(RID_CUISTR_HYPDLG_MACROACT2),
353 SvMacroItemId::OnClick);
354 if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOutObject )
355 pMacroPage->AddEvent( CuiResId(RID_CUISTR_HYPDLG_MACROACT3),
356 SvMacroItemId::OnMouseOut);
357 // execute dlg
358 short nRet = aDlg.run();
359 DisableClose( false );
360 if ( RET_OK == nRet )
361 {
362 const SfxItemSet* pOutSet = aDlg.GetOutputItemSet();
363 const SfxPoolItem* pItem;
364 if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem ))
365 {
366 pHyperlinkItem->SetMacroTable( static_cast<const SvxMacroItem*>(pItem)->GetMacroTable() );
367 }
368 }
369}
370
371// Get Macro-Infos
373{
374 const SvxHyperlinkItem *pHyperlinkItem =
375 GetItemSet().GetItem (SID_HYPERLINK_GETLINK);
376
377 return pHyperlinkItem ? pHyperlinkItem->GetMacroEvents() : HyperDialogEvent();
378}
379
381{
382 const SvxHyperlinkItem *pHyperlinkItem =
383 GetItemSet().GetItem (SID_HYPERLINK_GETLINK);
384
385 return const_cast<SvxMacroTableDtor*>(pHyperlinkItem->GetMacroTable());
386}
387
388// try to detect the current protocol that is used in rStrURL
389OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL )
390{
391 OUString aStrScheme;
392
393 INetURLObject aURL( rStrURL );
394 INetProtocol aProtocol = aURL.GetProtocol();
395
396 // our new INetUrlObject now has the ability
397 // to detect if a Url is valid or not :-(
398 if ( aProtocol == INetProtocol::NotValid )
399 {
400 if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTP_SCHEME ) )
401 {
402 aStrScheme = INET_HTTP_SCHEME;
403 }
404 else if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTPS_SCHEME ) )
405 {
406 aStrScheme = INET_HTTPS_SCHEME;
407 }
408 else if ( rStrURL.startsWithIgnoreAsciiCase( INET_FTP_SCHEME ) )
409 {
410 aStrScheme = INET_FTP_SCHEME;
411 }
412 else if ( rStrURL.startsWithIgnoreAsciiCase( INET_MAILTO_SCHEME ) )
413 {
414 aStrScheme = INET_MAILTO_SCHEME;
415 }
416 }
417 else
418 aStrScheme = INetURLObject::GetScheme( aProtocol );
419 return aStrScheme;
420}
421
423 OUString& aStrIntName, OUString& aStrFrame,
424 SvxLinkInsertMode& eMode )
425{
426 aStrIntName = mxEdText->get_text();
427 aStrName = mxEdIndication->get_text();
428 aStrFrame = mxCbbFrame->get_active_text();
429
430 sal_Int32 nPos = mxLbForm->get_active();
431 if (nPos == -1)
432 // This happens when FillStandardDlgFields() hides mpLbForm.
433 nPos = 0;
434 eMode = static_cast<SvxLinkInsertMode>(nPos + 1);
435
436 // Ask dialog whether the current doc is a HTML-doc
437 if (mpDialog->IsHTMLDoc())
438 eMode = static_cast<SvxLinkInsertMode>( sal_uInt16(eMode) | HLINK_HTMLMODE );
439}
440
441// reset dialog-fields
443{
444
445 // Set dialog-fields from create-itemset
446 maStrInitURL.clear();
447
448 const SvxHyperlinkItem *pHyperlinkItem =
449 rItemSet.GetItem (SID_HYPERLINK_GETLINK);
450
451 if ( pHyperlinkItem )
452 {
453 // set dialog-fields
454 FillStandardDlgFields (pHyperlinkItem);
455
456 // set all other fields
457 FillDlgFields ( pHyperlinkItem->GetURL() );
458
459 // Store initial URL
460 maStrInitURL = pHyperlinkItem->GetURL();
461 }
462}
463
464// Fill output-ItemSet
466{
467 OUString aStrURL, aStrName, aStrIntName, aStrFrame;
469
470 GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
471 if ( aStrName.isEmpty() ) //automatically create a visible name if the link is created without name
472 aStrName = CreateUiNameFromURL(aStrURL);
473
476
477 SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame,
478 aStrIntName, eMode, nEvents, pTable );
479 rOut->Put (aItem);
480
481 return true;
482}
483
484// Activate / Deactivate Tabpage
486{
487
488 // Set dialog-fields from input-itemset
489 const SvxHyperlinkItem *pHyperlinkItem =
490 rItemSet.GetItem (SID_HYPERLINK_GETLINK);
491
492 if ( pHyperlinkItem )
493 {
494 // standard-fields
495 FillStandardDlgFields (pHyperlinkItem);
496 }
497
498 // show mark-window if it was open before
499 if ( ShouldOpenMarkWnd () )
500 ShowMarkWnd ();
501}
502
504{
505 // hide mark-wnd
507 HideMarkWnd ();
508
509 // retrieve data of dialog
510 OUString aStrURL, aStrName, aStrIntName, aStrFrame;
512
513 GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
514
517
518 if( _pSet )
519 {
520 SvxHyperlinkItem aItem( SID_HYPERLINK_GETLINK, aStrName, aStrURL, aStrFrame,
521 aStrIntName, eMode, nEvents, pTable );
522 _pSet->Put( aItem );
523 }
524
525 return DeactivateRC::LeavePage;
526}
527
529{
530 return false;
531}
532
534{
535}
536
537/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxApplication * SfxGetpApp()
bool IsDropFormatSupported(SotClipboardFormatId nFormat) const
static OUString GetScheme(INetProtocol eTheScheme)
const SfxItemSet & GetItemSet() const
Definition: iconcdlg.hxx:69
std::unique_ptr< weld::Container > xContainer
Definition: iconcdlg.hxx:54
SfxViewFrame * GetFrame() const
static void GetDefaultTargetList(TargetList &)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxMacroTabPage * GetTabPage()
Definition: macroass.hxx:84
void AddEvent(const OUString &rEventName, SvMacroItemId nEventId)
Definition: macroass.cxx:131
const SfxItemSet * GetOutputItemSet() const
SfxFrame & GetFrame() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
void set_entry_text(const OUString &rStr)
void SetSmartProtocol(INetProtocol eProt)
SfxDispatcher * GetDispatcher() const
bool IsHTMLDoc() const
SvxHyperURLBox(std::unique_ptr< weld::ComboBox > xWidget)
Definition: hltpbase.cxx:76
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: hltpbase.cxx:83
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: hltpbase.cxx:88
HyperDialogEvent GetMacroEvents() const
SvxLinkInsertMode GetInsertMode() const
void SetMacroTable(const SvxMacroTableDtor &rTbl)
const OUString & GetName() const
const OUString & GetURL() const
const OUString & GetIntName() const
const SvxMacroTableDtor * GetMacroTable() const
const OUString & GetTargetFrame() const
Tabpage : Basisclass.
Definition: hltpbase.hxx:47
SfxDispatcher * GetDispatcher() const
Definition: hltpbase.cxx:308
static OUString GetSchemeFromURL(const OUString &rStrURL)
Definition: hltpbase.cxx:389
std::unique_ptr< weld::Button > mxBtScript
Definition: hltpbase.hxx:53
std::unique_ptr< weld::Label > mxFormLabel
Definition: hltpbase.hxx:54
virtual ~SvxHyperlinkTabPageBase() override
Definition: hltpbase.cxx:126
bool IsMarkWndVisible() const
Definition: hltpbase.hxx:116
void DisableClose(bool _bDisable)
Definition: hltpbase.cxx:313
virtual void Reset(const SfxItemSet &) override
Definition: hltpbase.cxx:442
virtual void DoApply()
Definition: hltpbase.cxx:290
std::shared_ptr< SvxHlinkDlgMarkWnd > mxMarkWnd
Definition: hltpbase.hxx:73
virtual void GetCurentItemData(OUString &rStrURL, OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode)=0
std::unique_ptr< weld::Entry > mxEdText
Definition: hltpbase.hxx:52
std::unique_ptr< weld::Entry > mxEdIndication
Definition: hltpbase.hxx:51
std::unique_ptr< weld::Label > mxFrameLabel
Definition: hltpbase.hxx:55
std::unique_ptr< weld::ComboBox > mxLbForm
Definition: hltpbase.hxx:50
void MoveToExtraWnd(Point aNewPos)
Definition: hltpbase.cxx:169
SvxHyperlinkTabPageBase(weld::Container *pParent, SvxHpLinkDlg *pDlg, const OUString &rUIXMLDescription, const OString &rID, const SfxItemSet *pItemSet)
Definition: hltpbase.cxx:105
void FillStandardDlgFields(const SvxHyperlinkItem *pHyperlinkItem)
Definition: hltpbase.cxx:233
virtual bool FillItemSet(SfxItemSet *) override
Definition: hltpbase.cxx:465
virtual bool ShouldOpenMarkWnd()
Definition: hltpbase.cxx:528
SvxHpLinkDlg * mpDialog
Definition: hltpbase.hxx:63
SvxMacroTableDtor * GetMacroTable()
Definition: hltpbase.cxx:380
virtual void ActivatePage(const SfxItemSet &rItemSet) override
Definition: hltpbase.cxx:485
virtual bool QueryClose() override
Definition: hltpbase.cxx:133
std::unique_ptr< weld::ComboBox > mxCbbFrame
Definition: hltpbase.hxx:49
virtual void SetMarkWndShouldOpen(bool bOpen)
Definition: hltpbase.cxx:533
virtual void FillDlgFields(const OUString &rStrURL)=0
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: hltpbase.cxx:503
TopLevelWindowLocker maBusy
Definition: hltpbase.hxx:71
void GetDataFromCommonFields(OUString &aStrName, OUString &aStrIntName, OUString &aStrFrame, SvxLinkInsertMode &eMode)
Definition: hltpbase.cxx:422
HyperDialogEvent GetMacroEvents() const
Definition: hltpbase.cxx:372
virtual void SetMarkStr(const OUString &aStrMark)
Definition: hltpbase.cxx:296
virtual void SetInitFocus()
Definition: hltpbase.cxx:302
void SetMacroTable(const SvxMacroTableDtor &rTbl)
void Stop()
void incBusy(const weld::Widget *pIgnore)
bool GetString(SotClipboardFormatId nFormat, OUString &rStr) const
constexpr tools::Long Right() const
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
virtual Point get_position() const=0
virtual tools::Rectangle get_monitor_workarea() const=0
virtual Size get_size() const=0
OUString CuiResId(TranslateId aKey)
Definition: cuiresmgr.cxx:23
int nCount
URL aURL
HyperDialogEvent
SvxLinkInsertMode
HLINK_HTMLMODE
HLINK_BUTTON
IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button &, void)
Definition: hltpbase.cxx:323
::std::vector< OUString > TargetList
Mode eMode
sal_uInt16 nPos
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
int i
long Long
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
DeactivateRC
#define DND_ACTION_COPY
#define DND_ACTION_NONE
signed char sal_Int8
constexpr OUStringLiteral INET_MAILTO_SCHEME
constexpr OUStringLiteral INET_HTTP_SCHEME
INetProtocol
constexpr OUStringLiteral INET_HTTPS_SCHEME
constexpr OUStringLiteral INET_FTP_SCHEME
RET_OK
RET_CANCEL