LibreOffice Module sw (master) 1
createaddresslistdialog.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 <sal/config.h>
21
22#include <cstddef>
23
24#include <osl/diagnose.h>
25#include <swtypes.hxx>
28#include <mmconfigitem.hxx>
29#include <vcl/svapp.hxx>
31#include <sfx2/docfile.hxx>
32#include <rtl/textenc.h>
33#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
34#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
35#include <tools/urlobj.hxx>
36#include <o3tl/string_view.hxx>
37#include <strings.hrc>
38#include <map>
39
40using namespace ::com::sun::star;
41using namespace ::com::sun::star::ui::dialogs;
42
43namespace {
44
45struct SwAddressFragment
46{
47 std::unique_ptr<weld::Builder> m_xBuilder;
48 std::unique_ptr<weld::Label> m_xLabel;
49 std::unique_ptr<weld::Entry> m_xEntry;
50 weld::Container* m_pGrid;
51
52 SwAddressFragment(weld::Container* pGrid, int nLine)
53 : m_xBuilder(Application::CreateBuilder(pGrid, "modules/swriter/ui/addressfragment.ui"))
54 , m_xLabel(m_xBuilder->weld_label("label"))
55 , m_xEntry(m_xBuilder->weld_entry("entry"))
56 , m_pGrid(pGrid)
57 {
58 m_xLabel->set_grid_left_attach(0);
59 m_xLabel->set_grid_top_attach(nLine);
60
61 m_xEntry->set_grid_left_attach(1);
62 m_xEntry->set_grid_top_attach(nLine);
63 }
64
65 ~SwAddressFragment()
66 {
67 m_pGrid->move(m_xEntry.get(), nullptr);
68 m_pGrid->move(m_xLabel.get(), nullptr);
69 }
70};
71
72}
73
75{
76 std::map<weld::Entry*, sal_Int32> m_aEditLines;
77
80
82
83 std::unique_ptr<weld::ScrolledWindow> m_xScrollBar;
84 std::unique_ptr<weld::Container> m_xWindow;
85 std::vector<std::unique_ptr<SwAddressFragment>> m_aLines;
86
87 DECL_LINK(GotFocusHdl_Impl, weld::Widget&, void);
88 DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
89
90 void MakeVisible(const tools::Rectangle& aRect);
91
92public:
94
95 void SetData(SwCSVData& rDBData);
96
97 void SetCurrentDataSet(sal_uInt32 nSet);
98 void CurrentDataSetInvalidated() { m_nCurrentDataSet = std::numeric_limits<sal_uInt32>::max(); }
99 sal_uInt32 GetCurrentDataSet() const { return m_nCurrentDataSet; }
100 void SetCursorTo(std::size_t nElement);
101};
102
104 : m_pData(nullptr)
105 , m_nCurrentDataSet(0)
106 , m_bNoDataSet(true)
107 , m_xScrollBar(rBuilder.weld_scrolled_window("scrollwin"))
108 , m_xWindow(rBuilder.weld_container("CONTAINER"))
109{
110}
111
113{
114 m_pData = &rDBData;
115 //when the address data is updated then remove the controls and build again
116 if (!m_aLines.empty())
117 {
118 m_aLines.clear();
119 m_bNoDataSet = true;
120 }
121
122 Link<weld::Widget&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
123 Link<weld::Entry&,void> aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
124 sal_Int32 nLines = 0;
125 for (const auto& rHeader : m_pData->aDBColumnHeaders)
126 {
127 m_aLines.emplace_back(new SwAddressFragment(m_xWindow.get(), nLines));
128
129 // when we have one line, measure it to get the line height to use as
130 // the basis for overall size request
131 if (nLines == 0)
132 {
133 auto nLineHeight = m_xWindow->get_preferred_size().Height();
134 m_xScrollBar->set_size_request(m_xScrollBar->get_approximate_digit_width() * 65,
135 nLineHeight * 10);
136 }
137
138 weld::Label* pNewFT = m_aLines.back()->m_xLabel.get();
139 weld::Entry* pNewED = m_aLines.back()->m_xEntry.get();
140 //set nLines a position identifier - used in the ModifyHdl
141 m_aEditLines[pNewED] = nLines;
142 pNewED->connect_focus_in(aFocusLink);
143 pNewED->connect_changed(aEditModifyLink);
144
145 pNewFT->set_label(rHeader);
146
147 nLines++;
148 }
149}
150
152{
153 if(!(m_bNoDataSet || m_nCurrentDataSet != nSet))
154 return;
155
156 m_bNoDataSet = false;
157 m_nCurrentDataSet = nSet;
158 OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
159 if(m_pData->aDBData.size() > m_nCurrentDataSet)
160 {
161 sal_uInt32 nIndex = 0;
162 for(auto& rLine : m_aLines)
163 {
164 OSL_ENSURE(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
165 "number of columns doesn't match number of Edits");
166 rLine->m_xEntry->set_text(m_pData->aDBData[m_nCurrentDataSet][nIndex]);
167 ++nIndex;
168 }
169 }
170}
171
172IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, weld::Widget&, rEdit, void)
173{
174 int x, y, width, height;
175 rEdit.get_extents_relative_to(*m_xWindow, x, y, width, height);
176 // the container has a border of 3 in the .ui
177 tools::Rectangle aRect(Point(x - 3, y - 3), Size(width + 6, height + 6));
178 MakeVisible(aRect);
179}
180
182{
183 //determine range of visible positions
184 auto nMinVisiblePos = m_xScrollBar->vadjustment_get_value();
185 auto nMaxVisiblePos = nMinVisiblePos + m_xScrollBar->vadjustment_get_page_size();
186 if (rRect.Top() < nMinVisiblePos || rRect.Bottom() > nMaxVisiblePos)
187 m_xScrollBar->vadjustment_set_value(rRect.Top());
188}
189
190// copy data changes into database
191IMPL_LINK(SwAddressControl_Impl, EditModifyHdl_Impl, weld::Entry&, rEdit, void)
192{
193 //get the data element number of the current set
194 sal_Int32 nIndex = m_aEditLines[&rEdit];
195 //get the index of the set
196 OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
197 if (m_pData->aDBData.size() > m_nCurrentDataSet)
198 {
199 m_pData->aDBData[m_nCurrentDataSet][nIndex] = rEdit.get_text();
200 }
201}
202
203void SwAddressControl_Impl::SetCursorTo(std::size_t nElement)
204{
205 if (nElement < m_aLines.size())
206 {
207 weld::Entry* pEdit = m_aLines[nElement]->m_xEntry.get();
208 pEdit->grab_focus();
209 }
210
211}
212
214 weld::Window* pParent, const OUString& rURL, SwMailMergeConfigItem const & rConfig)
215 : SfxDialogController(pParent, "modules/swriter/ui/createaddresslist.ui", "CreateAddressList")
216 , m_sAddressListFilterName(SwResId(ST_FILTERNAME))
217 , m_sURL(rURL)
218 , m_pCSVData(new SwCSVData)
219 , m_xAddressControl(new SwAddressControl_Impl(*m_xBuilder))
220 , m_xNewPB(m_xBuilder->weld_button("NEW"))
221 , m_xDeletePB(m_xBuilder->weld_button("DELETE"))
222 , m_xFindPB(m_xBuilder->weld_button("FIND"))
223 , m_xCustomizePB(m_xBuilder->weld_button("CUSTOMIZE"))
224 , m_xStartPB(m_xBuilder->weld_button("START"))
225 , m_xPrevPB(m_xBuilder->weld_button("PREV"))
226 , m_xSetNoED(m_xBuilder->weld_entry("SETNOED"))
227 , m_xSetNoNF(m_xBuilder->weld_spin_button("SETNOSB"))
228 , m_xNextPB(m_xBuilder->weld_button("NEXT"))
229 , m_xEndPB(m_xBuilder->weld_button("END"))
230 , m_xOK(m_xBuilder->weld_button("ok"))
231{
232 m_xSetNoNF->set_min(1);
233
234 m_xNewPB->connect_clicked(LINK(this, SwCreateAddressListDialog, NewHdl_Impl));
235 m_xDeletePB->connect_clicked(LINK(this, SwCreateAddressListDialog, DeleteHdl_Impl));
236 m_xFindPB->connect_clicked(LINK(this, SwCreateAddressListDialog, FindHdl_Impl));
237 m_xCustomizePB->connect_clicked(LINK(this, SwCreateAddressListDialog, CustomizeHdl_Impl));
238 m_xOK->connect_clicked(LINK(this, SwCreateAddressListDialog, OkHdl_Impl));
239
240 Link<weld::Button&,void> aLk = LINK(this, SwCreateAddressListDialog, DBCursorHdl_Impl);
241 m_xStartPB->connect_clicked(aLk);
242 m_xPrevPB->connect_clicked(aLk);
243 m_xSetNoED->connect_changed(LINK(this, SwCreateAddressListDialog, DBNumCursorHdl_Impl));
244 m_xSetNoED->connect_focus_out(LINK(this, SwCreateAddressListDialog, RefreshNum_Impl));
245 m_xNextPB->connect_clicked(aLk);
246 m_xEndPB->connect_clicked(aLk);
247
248 if (!m_sURL.isEmpty())
249 {
250 //file exists, has to be loaded here
251 SfxMedium aMedium( m_sURL, StreamMode::READ );
252 SvStream* pStream = aMedium.GetInStream();
253 if(pStream)
254 {
255 pStream->SetLineDelimiter( LINEEND_LF );
256 pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
257
258 OUString sLine;
259 bool bRead = pStream->ReadByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
260
261 if(bRead && !sLine.isEmpty())
262 {
263 sal_Int32 nIndex = 0;
264 do
265 {
266 const std::u16string_view sHeader = o3tl::getToken(sLine, 0, '\t', nIndex );
267 OSL_ENSURE(sHeader.size() > 2 &&
268 o3tl::starts_with(sHeader, u"\"") && o3tl::ends_with(sHeader, u"\""),
269 "Wrong format of header");
270 if(sHeader.size() > 2)
271 {
272 m_pCSVData->aDBColumnHeaders.push_back( OUString(sHeader.substr(1, sHeader.size() -2)));
273 }
274 }
275 while (nIndex > 0);
276 }
277 while(pStream->ReadByteStringLine( sLine, RTL_TEXTENCODING_UTF8 ))
278 {
279 std::vector<OUString> aNewData;
280 //analyze data line
281 sal_Int32 nIndex = { sLine.isEmpty() ? -1 : 0 };
282 while (nIndex >= 0)
283 {
284 const OUString sData = sLine.getToken( 0, '\t', nIndex );
285 OSL_ENSURE( sData.startsWith("\"") && sData.endsWith("\""),
286 "Wrong format of line");
287 if(sData.getLength() >= 2)
288 aNewData.push_back(sData.copy(1, sData.getLength() - 2));
289 else
290 aNewData.push_back(sData);
291 }
292 m_pCSVData->aDBData.push_back( aNewData );
293 }
294 }
295 }
296 else
297 {
298 //database has to be created
299 const std::vector<std::pair<OUString, int>>& rAddressHeader = rConfig.GetDefaultAddressHeaders();
300 const sal_uInt32 nCount = rAddressHeader.size();
301 for(sal_uInt32 nHeader = 0; nHeader < nCount; ++nHeader)
302 m_pCSVData->aDBColumnHeaders.push_back(rAddressHeader[nHeader].first);
303 std::vector<OUString> aNewData;
304 aNewData.insert(aNewData.begin(), nCount, OUString());
305 m_pCSVData->aDBData.push_back(aNewData);
306 }
307 //now fill the address control
308 m_xAddressControl->SetData(*m_pCSVData);
309 m_xAddressControl->SetCurrentDataSet(0);
310 m_xSetNoNF->set_max(m_pCSVData->aDBData.size());
311
312 m_xSetNoNF->set_value(1);
313 RefreshNum_Impl(*m_xSetNoED);
314
316}
317
319{
320}
321
323{
324 sal_uInt32 nCurrent = m_xAddressControl->GetCurrentDataSet();
325 std::vector<OUString> aNewData;
326 aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), OUString());
327 m_pCSVData->aDBData.insert(m_pCSVData->aDBData.begin() + ++nCurrent, aNewData);
328 m_xSetNoNF->set_max(m_pCSVData->aDBData.size());
329 //the NumericField start at 1
330 m_xSetNoNF->set_value(nCurrent + 1);
331 RefreshNum_Impl(*m_xSetNoED);
332 //the address control starts at 0
333 m_xAddressControl->SetCurrentDataSet(nCurrent);
334 UpdateButtons();
335}
336
338{
339 sal_uInt32 nCurrent = m_xAddressControl->GetCurrentDataSet();
340 if (m_pCSVData->aDBData.size() > 1)
341 {
342 m_pCSVData->aDBData.erase(m_pCSVData->aDBData.begin() + nCurrent);
343 if (nCurrent)
344 --nCurrent;
345 }
346 else
347 {
348 // if only one set is available then clear the data
349 m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), OUString());
350 m_xDeletePB->set_sensitive(false);
351 }
352 m_xAddressControl->CurrentDataSetInvalidated();
353 m_xAddressControl->SetCurrentDataSet(nCurrent);
354 m_xSetNoNF->set_max(m_pCSVData->aDBData.size());
355 UpdateButtons();
356}
357
359{
360 if (!m_xFindDlg)
361 {
362 m_xFindDlg.reset(new SwFindEntryDialog(this));
363 weld::ComboBox& rColumnBox = m_xFindDlg->GetFieldsListBox();
364 for(const auto& rHeader : m_pCSVData->aDBColumnHeaders)
365 rColumnBox.append_text(rHeader);
366 rColumnBox.set_active(0);
367 m_xFindDlg->show();
368 }
369 else
370 m_xFindDlg->set_visible(!m_xFindDlg->get_visible());
371}
372
374{
375 SwCustomizeAddressListDialog aDlg(m_xDialog.get(), *m_pCSVData);
376 if (aDlg.run() == RET_OK)
377 {
378 m_pCSVData = aDlg.ReleaseNewData();
379 m_xAddressControl->SetData(*m_pCSVData);
380 m_xAddressControl->SetCurrentDataSet(m_xAddressControl->GetCurrentDataSet());
381 }
382
383 //update find dialog
384 if (m_xFindDlg)
385 {
386 weld::ComboBox& rColumnBox = m_xFindDlg->GetFieldsListBox();
387 rColumnBox.clear();
388 for(const auto& rHeader : m_pCSVData->aDBColumnHeaders)
389 rColumnBox.append_text(rHeader);
390 }
391}
392
393namespace
394{
395
396void lcl_WriteValues(const std::vector<OUString> *pFields, SvStream* pStream)
397{
398 OUStringBuffer sLine;
399 const std::vector< OUString >::const_iterator aBegin = pFields->begin();
400 const std::vector< OUString >::const_iterator aEnd = pFields->end();
401 for(std::vector< OUString >::const_iterator aIter = aBegin; aIter != aEnd; ++aIter)
402 {
403 if (aIter==aBegin)
404 {
405 sLine.append("\"" + *aIter + "\"");
406 }
407 else
408 {
409 sLine.append("\t\"" + *aIter + "\"");
410 }
411 }
412 pStream->WriteByteStringLine( sLine.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
413}
414
415}
416
418{
419 if(m_sURL.isEmpty())
420 {
421 sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_SIMPLE,
422 FileDialogFlags::NONE, m_xDialog.get());
424 uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
425 xFP->appendFilter( m_sAddressListFilterName, "*.csv" );
426 xFP->setCurrentFilter( m_sAddressListFilterName ) ;
427
428 if( ERRCODE_NONE == aDlgHelper.Execute() )
429 {
430 m_sURL = xFP->getSelectedFiles().getConstArray()[0];
431 INetURLObject aResult( m_sURL );
432 aResult.setExtension(u"csv");
434 }
435 }
436 if(m_sURL.isEmpty())
437 return;
438
439 SfxMedium aMedium( m_sURL, StreamMode::READWRITE|StreamMode::TRUNC );
440 SvStream* pStream = aMedium.GetOutStream();
441 pStream->SetLineDelimiter( LINEEND_LF );
442 pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
443
444 lcl_WriteValues(&(m_pCSVData->aDBColumnHeaders), pStream);
445
446 for(const auto& rData : m_pCSVData->aDBData)
447 {
448 lcl_WriteValues(&rData, pStream);
449 }
450 aMedium.Commit();
451 m_xDialog->response(RET_OK);
452}
453
454IMPL_LINK(SwCreateAddressListDialog, DBCursorHdl_Impl, weld::Button&, rButton, void)
455{
456 int nValue = m_xSetNoNF->get_value();
457
458 if (&rButton == m_xStartPB.get())
459 nValue = 1;
460 else if (&rButton == m_xPrevPB.get())
461 {
462 if (nValue > 1)
463 --nValue;
464 }
465 else if (&rButton == m_xNextPB.get())
466 {
467 if (nValue < m_xSetNoNF->get_max())
468 ++nValue;
469 }
470 else //m_aEndPB
471 nValue = m_xSetNoNF->get_max();
472 if (nValue != m_xSetNoNF->get_value())
473 {
474 m_xSetNoNF->set_value(nValue);
475 RefreshNum_Impl(*m_xSetNoED);
476 DBNumCursor();
477 }
478}
479
481{
482 m_xSetNoNF->set_text(m_xSetNoED->get_text());
483 DBNumCursor();
484}
485
487{
488 m_xSetNoED->set_text(OUString::number(m_xSetNoNF->get_value()));
489}
490
492{
493 m_xAddressControl->SetCurrentDataSet(m_xSetNoNF->get_value() - 1);
495}
496
498{
499 sal_uInt32 nCurrent = static_cast< sal_uInt32 >(m_xSetNoNF->get_value() );
500 sal_uInt32 nSize = static_cast<sal_uInt32>(m_pCSVData->aDBData.size());
501 m_xStartPB->set_sensitive(nCurrent != 1);
502 m_xPrevPB->set_sensitive(nCurrent != 1);
503 m_xNextPB->set_sensitive(nCurrent != nSize);
504 m_xEndPB->set_sensitive(nCurrent != nSize);
505 m_xDeletePB->set_sensitive(nSize > 0);
506}
507
508void SwCreateAddressListDialog::Find(const OUString& rSearch, sal_Int32 nColumn)
509{
510 const OUString sSearch = rSearch.toAsciiLowerCase();
511 sal_uInt32 nCurrent = m_xAddressControl->GetCurrentDataSet();
512 //search forward
513 bool bFound = false;
514 sal_uInt32 nStart = nCurrent + 1;
515 sal_uInt32 nEnd = m_pCSVData->aDBData.size();
516 std::size_t nElement = 0;
517 sal_uInt32 nPos = 0;
518 for(short nTemp = 0; nTemp < 2 && !bFound; nTemp++)
519 {
520 for(nPos = nStart; nPos < nEnd; ++nPos)
521 {
522 std::vector< OUString> const & aData = m_pCSVData->aDBData[nPos];
523 if(nColumn >=0)
524 bFound = -1 != aData[static_cast<sal_uInt32>(nColumn)].toAsciiLowerCase().indexOf(sSearch);
525 else
526 {
527 for( nElement = 0; nElement < aData.size(); ++nElement)
528 {
529 bFound = -1 != aData[nElement].toAsciiLowerCase().indexOf(sSearch);
530 if(bFound)
531 {
532 nColumn = nElement; //TODO: std::size_t -> sal_Int32!
533 break;
534 }
535 }
536 }
537 if(bFound)
538 break;
539 }
540 nStart = 0;
541 nEnd = nCurrent + 1;
542 }
543 if(bFound)
544 {
545 m_xAddressControl->SetCurrentDataSet(nPos);
546 m_xSetNoNF->set_value( nPos + 1 );
547 RefreshNum_Impl(*m_xSetNoED);
549 m_xAddressControl->SetCursorTo(nElement);
550 }
551}
552
554 : GenericDialogController(pParent->getDialog(), "modules/swriter/ui/findentrydialog.ui", "FindEntryDialog")
555 , m_pParent(pParent)
556 , m_xFindED(m_xBuilder->weld_entry("entry"))
557 , m_xFindOnlyCB(m_xBuilder->weld_check_button("findin"))
558 , m_xFindOnlyLB(m_xBuilder->weld_combo_box("area"))
559 , m_xFindPB(m_xBuilder->weld_button("find"))
560 , m_xCancel(m_xBuilder->weld_button("cancel"))
561{
562 m_xFindPB->connect_clicked(LINK(this, SwFindEntryDialog, FindHdl_Impl));
563 m_xFindED->connect_changed(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl));
564 m_xCancel->connect_clicked(LINK(this, SwFindEntryDialog, CloseHdl_Impl));
565}
566
568{
569}
570
572{
573 sal_Int32 nColumn = -1;
574 if (m_xFindOnlyCB->get_active())
575 nColumn = m_xFindOnlyLB->get_active();
576 m_pParent->Find(m_xFindED->get_text(), nColumn);
577}
578
580{
581 m_xFindPB->set_sensitive(!m_xFindED->get_text().isEmpty());
582}
583
585{
586 m_xDialog->hide();
587}
588
589/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool setExtension(std::u16string_view rTheExtension, sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
SvStream * GetOutStream()
SvStream * GetInStream()
bool Commit()
bool WriteByteStringLine(std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
bool ReadByteStringLine(OUString &rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead=0xFFFE)
void SetLineDelimiter(LineEnd eLineEnd)
void SetStreamCharSet(rtl_TextEncoding eCharSet)
SwAddressControl_Impl(weld::Builder &rBuilder)
std::unique_ptr< weld::Container > m_xWindow
std::unique_ptr< weld::ScrolledWindow > m_xScrollBar
void SetCursorTo(std::size_t nElement)
void MakeVisible(const tools::Rectangle &aRect)
void SetData(SwCSVData &rDBData)
sal_uInt32 GetCurrentDataSet() const
void SetCurrentDataSet(sal_uInt32 nSet)
std::vector< std::unique_ptr< SwAddressFragment > > m_aLines
std::map< weld::Entry *, sal_Int32 > m_aEditLines
DECL_LINK(GotFocusHdl_Impl, weld::Widget &, void)
DECL_LINK(EditModifyHdl_Impl, weld::Entry &, void)
std::unique_ptr< weld::Button > m_xFindPB
std::unique_ptr< weld::Button > m_xOK
void Find(const OUString &rSearch, sal_Int32 nColumn)
std::unique_ptr< weld::SpinButton > m_xSetNoNF
std::unique_ptr< weld::Button > m_xNewPB
virtual ~SwCreateAddressListDialog() override
std::unique_ptr< weld::Button > m_xDeletePB
SwCreateAddressListDialog(weld::Window *pParent, const OUString &rURL, SwMailMergeConfigItem const &rConfig)
std::unique_ptr< SwCSVData > m_pCSVData
std::unique_ptr< weld::Button > m_xNextPB
std::unique_ptr< SwAddressControl_Impl > m_xAddressControl
std::unique_ptr< weld::Button > m_xStartPB
std::unique_ptr< weld::Button > m_xEndPB
std::unique_ptr< weld::Entry > m_xSetNoED
std::unique_ptr< weld::Button > m_xPrevPB
std::unique_ptr< weld::Button > m_xCustomizePB
std::unique_ptr< SwCSVData > ReleaseNewData()
virtual ~SwFindEntryDialog() override
std::unique_ptr< weld::Button > m_xCancel
SwFindEntryDialog(SwCreateAddressListDialog *pParent)
std::unique_ptr< weld::Button > m_xFindPB
std::unique_ptr< weld::Entry > m_xFindED
const std::vector< std::pair< OUString, int > > & GetDefaultAddressHeaders() const
std::unique_ptr< weld::Label > m_xLabel
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & GetFilePicker() const
void SetContext(Context _eNewContext)
constexpr tools::Long Top() const
constexpr tools::Long Bottom() const
virtual void clear()=0
virtual void set_active(int pos)=0
void append_text(const OUString &rStr)
virtual void move(weld::Widget *pWidget, weld::Container *pNewParent)=0
virtual void connect_changed(const Link< Entry &, void > &rLink)
virtual void set_label(const OUString &rText)=0
virtual void grab_focus()=0
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl, weld::Button &, void)
IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, weld::Widget &, rEdit, void)
int nCount
OUString m_sURL
float u
float y
float x
#define ERRCODE_NONE
FmFilterData * m_pData
sal_Int16 nValue
sal_Int32 nIndex
LINEEND_LF
sal_uInt16 nPos
const ContentProperties & rData
constexpr OUStringLiteral aData
Definition: ww8scan.hxx:48
size
constexpr bool ends_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
std::vector< OUString > aDBColumnHeaders
std::vector< std::vector< OUString > > aDBData
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
RET_OK