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