35#include <com/sun/star/container/XNameAccess.hpp>
36#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
37#include <com/sun/star/sdbc/SQLException.hpp>
38#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
39#include <com/sun/star/sdb/XColumn.hpp>
46#include <mmaddressblockpage.hrc>
56 :
vcl::OWizardPage(pPage, pWizard,
"modules/swriter/ui/mmaddressblockpage.ui",
"MMAddressBlockPage")
58 , m_xAddressListPB(m_xBuilder->weld_button(
"addresslist"))
59 , m_xCurrentAddressFI(m_xBuilder->weld_label(
"currentaddress"))
60 , m_xStep2(m_xBuilder->weld_container(
"step2"))
61 , m_xStep3(m_xBuilder->weld_container(
"step3"))
62 , m_xStep4(m_xBuilder->weld_container(
"step4"))
63 , m_xSettingsFI(m_xBuilder->weld_label(
"settingsft"))
64 , m_xAddressCB(m_xBuilder->weld_check_button(
"address"))
65 , m_xSettingsPB(m_xBuilder->weld_button(
"settings"))
66 , m_xHideEmptyParagraphsCB(m_xBuilder->weld_check_button(
"hideempty"))
67 , m_xAssignPB(m_xBuilder->weld_button(
"assign"))
68 , m_xDocumentIndexFI(m_xBuilder->weld_label(
"documentindex"))
69 , m_xPrevSetIB(m_xBuilder->weld_button(
"prev"))
70 , m_xNextSetIB(m_xBuilder->weld_button(
"next"))
71 , m_xDifferentlist(m_xBuilder->weld_button(
"differentlist"))
72 , m_xSettings(new
SwAddressPreview(m_xBuilder->weld_scrolled_window(
"settingspreviewwin", true)))
73 , m_xPreview(new
SwAddressPreview(m_xBuilder->weld_scrolled_window(
"addresspreviewwin", true)))
74 , m_xSettingsWIN(new
weld::CustomWeld(*m_xBuilder,
"settingspreview", *m_xSettings))
75 , m_xPreviewWIN(new
weld::CustomWeld(*m_xBuilder,
"addresspreview", *m_xPreview))
140 const uno::Sequence< OUString> aBlocks =
142 for(
const auto& rAddress : aBlocks)
161 if (
RET_OK == aAddrDialog.run())
169 OUString sFilter = aAddrDialog.
GetFilter();
171 InsertDataHdl(
nullptr);
172 GetWizard()->UpdateRoadmap();
173 GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(
MM_GREETINGSPAGE));
176 catch (
const uno::Exception& e)
180 VclMessageType::Warning, VclButtonsType::Ok, e.Message));
196 m_xSettings->Clear();
197 for(
const auto& rAddress : aBlocks)
198 m_xSettings->AddAddress(rAddress);
199 m_xSettings->SelectAddress(0);
200 m_xSettings->Invalidate();
202 InsertDataHdl(
nullptr);
204 GetWizard()->UpdateRoadmap();
205 GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(
MM_GREETINGSPAGE));
211 const sal_uInt16 nSel = m_xSettings->GetSelectedAddress();
213 SwAssignFieldsDialog aDlg(m_pWizard->getDialog(), m_pWizard->GetConfigItem(), aBlocks[nSel],
true);
217 InsertDataHdl(
nullptr);
218 GetWizard()->UpdateRoadmap();
219 GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(
MM_GREETINGSPAGE));
231 m_xStep3->set_sensitive(bSelective);
232 m_xStep4->set_sensitive(bSelective);
237 EnableAddressBlock(rBox.get_sensitive(), rBox.get_active());
240 m_pWizard->UpdateRoadmap();
241 GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(
MM_GREETINGSPAGE));
246 const sal_uInt16 nSel = m_xSettings->GetSelectedAddress();
247 const uno::Sequence< OUString> aBlocks =
248 m_pWizard->GetConfigItem().GetAddressBlocks();
250 m_pWizard->GetConfigItem()));
251 m_pWizard->GetConfigItem().SetCurrentAddressBlockIndex( nSel );
252 GetWizard()->UpdateRoadmap();
253 GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(
MM_GREETINGSPAGE));
291 const sal_uInt16 nSel =
m_xSettings->GetSelectedAddress();
292 const uno::Sequence< OUString> aBlocks =
313 InsertDataHdl(&rButton);
317 :
SfxDialogController(pParent,
"modules/swriter/ui/selectblockdialog.ui",
"SelectBlockDialog")
319 , m_xPreview(new
SwAddressPreview(m_xBuilder->weld_scrolled_window(
"previewwin", true)))
320 , m_xNewPB(m_xBuilder->weld_button(
"new"))
321 , m_xCustomizePB(m_xBuilder->weld_button(
"edit"))
322 , m_xDeletePB(m_xBuilder->weld_button(
"delete"))
323 , m_xNeverRB(m_xBuilder->weld_radio_button(
"never"))
324 , m_xAlwaysRB(m_xBuilder->weld_radio_button(
"always"))
325 , m_xDependentRB(m_xBuilder->weld_radio_button(
"dependent"))
326 , m_xCountryED(m_xBuilder->weld_entry(
"country"))
327 , m_xPreviewWin(new
weld::CustomWeld(*m_xBuilder,
"preview", *m_xPreview))
333 m_xNewPB->connect_clicked(aCustomizeHdl);
351 sal_uInt16 nSelectedAddress)
363 const sal_Int32 nSelect =
static_cast<sal_Int32
>(
m_xPreview->GetSelectedAddress());
367 auto it = aTemp.getArray();
369 it = std::copy_n(std::cbegin(
m_aAddressBlocks), nSelect - 1, std::next(it));
377 bool bIsCountry,
const OUString& rCountry)
386 IncludeHdl_Impl(*pActive);
399 if (m_aAddressBlocks.getLength())
401 const sal_Int32 nSelected =
static_cast<sal_Int32
>(m_xPreview->GetSelectedAddress());
403 if (m_aAddressBlocks.getLength() <= 1)
404 rButton.set_sensitive(
false);
405 m_xPreview->RemoveSelectedAddress();
411 bool bCustomize = &rButton == m_xCustomizePB.get();
419 xDlg->SetAddress(m_aAddressBlocks[m_xPreview->GetSelectedAddress()]);
421 if (
RET_OK != xDlg->run())
424 const OUString sNew = xDlg->GetAddress();
427 m_xPreview->ReplaceSelectedAddress(sNew);
428 m_aAddressBlocks.getArray()[m_xPreview->GetSelectedAddress()] = sNew;
432 m_xPreview->AddAddress(sNew);
433 m_aAddressBlocks.realloc(m_aAddressBlocks.getLength() + 1);
434 const sal_Int32 nSelect = m_aAddressBlocks.getLength() - 1;
435 m_aAddressBlocks.getArray()[nSelect] = sNew;
436 m_xPreview->SelectAddress(o3tl::narrowing<sal_uInt16>(nSelect));
438 m_xDeletePB->set_sensitive(m_aAddressBlocks.getLength() > 1);
443 m_xCountryED->set_sensitive(m_xDependentRB->get_active());
446#define USER_DATA_SALUTATION -1
447#define USER_DATA_PUNCTUATION -2
448#define USER_DATA_TEXT -3
449#define USER_DATA_NONE -4
453 rTest = m_aTextFilter.filter(rTest);
460 "AddressBlockDialog")
461 , m_aTextFilter(
"<>")
462 , m_rConfigItem(rConfig)
464 , m_aSelectionChangedIdle(
"SwCustomizeAddressBlockDialog m_aSelectionChangedIdle")
465 , m_xAddressElementsFT(m_xBuilder->weld_label(
"addressesft"))
466 , m_xAddressElementsLB(m_xBuilder->weld_tree_view(
"addresses"))
467 , m_xInsertFieldIB(m_xBuilder->weld_button(
"toaddr"))
468 , m_xRemoveFieldIB(m_xBuilder->weld_button(
"fromaddr"))
469 , m_xDragFT(m_xBuilder->weld_label(
"addressdestft"))
470 , m_xUpIB(m_xBuilder->weld_button(
"up"))
471 , m_xLeftIB(m_xBuilder->weld_button(
"left"))
472 , m_xRightIB(m_xBuilder->weld_button(
"right"))
473 , m_xDownIB(m_xBuilder->weld_button(
"down"))
474 , m_xFieldFT(m_xBuilder->weld_label(
"customft"))
475 , m_xFieldCB(m_xBuilder->weld_combo_box(
"custom"))
476 , m_xOK(m_xBuilder->weld_button(
"ok"))
477 , m_xPreview(new
SwAddressPreview(m_xBuilder->weld_scrolled_window(
"previewwin", true)))
478 , m_xPreviewWIN(new
weld::CustomWeld(*m_xBuilder,
"addrpreview", *m_xPreview))
480 , m_xDragWIN(new
weld::CustomWeld(*m_xBuilder,
"addressdest", *m_xDragED))
497 for (
auto const& aID : RA_SALUTATION)
499 for (
auto const& aID : RA_PUNCTUATION)
526 for (
size_t i = 0;
i < rHeaders.size(); ++
i)
538 m_xUpIB->connect_clicked(aImgButtonHdl);
539 m_xLeftIB->connect_clicked(aImgButtonHdl);
541 m_xDownIB->connect_clicked(aImgButtonHdl);
547 return m_xDragED->SetCursorLogicPosition(rPosition);
567 sal_Int32 nUserData = rBox.get_selected_id().toInt32();
569 m_xInsertFieldIB->set_sensitive(nUserData >= 0 || !
HasItem(nUserData));
575 UpdateImageButtons_Impl();
580 if (m_xInsertFieldIB.get() == &rButton)
582 int nEntry = m_xAddressElementsLB->get_selected_index();
585 m_xDragED->InsertNewEntry(
"<" + m_xAddressElementsLB->get_text(nEntry) +
">");
588 else if (m_xRemoveFieldIB.get() == &rButton)
590 m_xDragED->RemoveCurrentEntry();
595 if (m_xUpIB.get() == &rButton)
597 else if (m_xLeftIB.get() == &rButton)
599 else if (m_xRightIB.get() == &rButton)
601 m_xDragED->MoveCurrentItem(nMove);
603 UpdateImageButtons_Impl();
609 const OUString sSelected =
m_xDragED->GetCurrentItem();
610 if(!sSelected.isEmpty())
615 if( sEntry == sSelected.subView( 1, sSelected.getLength() - 2 ) )
638 return m_xDragED->GetText().indexOf(Concat2View(
"<" + sEntry +
">")) >= 0;
650 sal_Int32 nSelected = GetSelectedItem_Impl();
652 m_xDragED->SelectCurrentItem();
654 if(m_xFieldCB->get_visible() && (
USER_DATA_NONE != nSelected) && (nSelected < 0))
658 std::vector<OUString>* pVector =
nullptr;
661 sSelect = m_sCurrentSalutation;
662 pVector = &m_aSalutations;
665 sSelect = m_sCurrentPunctuation;
666 pVector = &m_aPunctuations;
669 sSelect = m_sCurrentText;
674 for (
const auto& rItem : *pVector)
675 m_xFieldCB->append_text(rItem);
677 m_xFieldCB->set_entry_text(sSelect);
678 m_xFieldCB->set_sensitive(
true);
679 m_xFieldFT->set_sensitive(
true);
683 m_xFieldCB->set_sensitive(
false);
684 m_xFieldFT->set_sensitive(
false);
687 UpdateImageButtons_Impl();
694 m_aSelectionChangedIdle.Start();
697 m_aSelectionChangedIdle.Stop();
698 SelectionChangedIdleHdl(
nullptr);
705 sal_Int32 nSelected = GetSelectedItem_Impl();
706 const OUString sContent = m_xFieldCB->get_active_text();
709 m_sCurrentSalutation = sContent;
712 m_sCurrentPunctuation = sContent;
715 m_sCurrentText = sContent;
718 UpdateImageButtons_Impl();
719 m_xPreview->SetAddress(GetAddress());
720 EditModifyHdl_Impl(*m_xDragED);
745 OUString sAddress(
m_xDragED->GetAddress());
772struct SwAssignFragment
774 std::unique_ptr<weld::Builder> m_xBuilder;
775 std::unique_ptr<weld::Label>
m_xLabel;
776 std::unique_ptr<weld::ComboBox> m_xComboBox;
777 std::unique_ptr<weld::Label> m_xPreview;
780 : m_xBuilder(
Application::CreateBuilder(pGrid,
"modules/swriter/ui/assignfragment.ui"))
781 ,
m_xLabel(m_xBuilder->weld_label(
"label"))
782 , m_xComboBox(m_xBuilder->weld_combo_box(
"combobox"))
783 , m_xPreview(m_xBuilder->weld_label(
"preview"))
786 m_xLabel->set_grid_top_attach(nLine);
788 m_xComboBox->set_grid_left_attach(1);
789 m_xComboBox->set_grid_top_attach(nLine);
791 m_xPreview->set_grid_left_attach(2);
792 m_xPreview->set_grid_top_attach(nLine);
816 std::unique_ptr<weld::Container> xGrid);
827 std::unique_ptr<weld::Container> xGrid)
828 : m_xVScroll(
std::move(xWindow))
829 , m_xGrid(
std::move(xGrid))
841 uno::Reference< XColumnsSupplier > xColsSupp( rConfigItem.
GetResultSet(), uno::UNO_QUERY);
843 uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() :
nullptr;
844 uno::Sequence< OUString > aFields;
846 aFields = xColAccess->getElementNames();
855 int nLabelWidth(0), nComboBoxWidth(0), nPreviewWidth(0);
858 for (
size_t i = 0;
i < rHeaders.size(); ++
i)
862 const OUString rHeader = rHeaders[
i].first;
867 for (
const OUString& rField : std::as_const(aFields))
881 if (xColAccess.is() && rNewLB.
get_active() > 0 &&
885 uno::Reference< XColumn >
xColumn;
893 catch (
const SQLException&)
901 auto nLineHeight =
m_xGrid->get_preferred_size().Height();
922 auto nMinVisiblePos =
m_xVScroll->vadjustment_get_value();
923 auto nMaxVisiblePos = nMinVisiblePos +
m_xVScroll->vadjustment_get_page_size();
924 if (rRect.
Top() < nMinVisiblePos || rRect.
Bottom() > nMaxVisiblePos)
930 const OUString sColumn = rBox.get_active_text();
932 uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() :
nullptr;
934 if(xColAccess.is() && xColAccess->hasByName(sColumn))
936 uno::Any aCol = xColAccess->getByName(sColumn);
937 uno::Reference< XColumn >
xColumn;
945 catch (
const sdbc::SQLException&)
950 auto aLBIter = std::find_if(m_aFields.begin(), m_aFields.end(), [&rBox](
const SwAssignFragment& rFragment){
951 return &rBox == rFragment.m_xComboBox.get(); });
952 if (aLBIter != m_aFields.end())
954 auto nIndex =
static_cast<sal_Int32
>(std::distance(m_aFields.begin(), aLBIter));
957 m_aModifyHdl.Call(
nullptr);
962 int x,
y, width, height;
963 rBox.get_extents_relative_to(*m_xGrid,
x,
y, width, height);
972 bool bIsAddressBlock)
973 :
SfxDialogController(pParent,
"modules/swriter/ui/assignfieldsdialog.ui",
"AssignFieldsDialog")
983 ,
m_xOK(m_xBuilder->weld_button(
"ok"))
986 m_xBuilder->weld_container(
"FIELDS")))
992 const OUString sMatchesTo(
SwResId(ST_MATCHESTO) );
993 if (!bIsAddressBlock)
1011 uno::Sequence< OUString > aAssignments(
1013 OUString* pAssignments = aAssignments.getArray();
1017 const OUString sSelect = rLBItem.m_xComboBox->get_active_text();
1018 pAssignments[
nIndex] = (
m_sNone != sSelect) ? sSelect : OUString();
1021 return aAssignments;
1049 const EECharAttrib* FindCharAttrib(
int nStartPosition, std::vector<EECharAttrib>& rAttribList)
1051 for (
auto it = rAttribList.rbegin(); it != rAttribList.rend(); ++it)
1053 const auto& rTextAtr = *it;
1054 if (rTextAtr.pAttr->Which() != EE_CHAR_GRABBAG)
1056 if (rTextAtr.nStart <= nStartPosition && rTextAtr.nEnd >= nStartPosition)
1067 : m_pParentDialog(pParent)
1076 auto xRealDropTarget = GetDrawingArea()->get_drop_target();
1077 uno::Reference<css::datatransfer::dnd::XDropTargetListener> xListener(
m_xDropTarget, uno::UNO_QUERY);
1078 xRealDropTarget->removeDropTargetListener(xListener);
1106 if (rCEvt.
GetCommand() == CommandEventId::StartExtTextInput ||
1107 rCEvt.
GetCommand() == CommandEventId::EndExtTextInput ||
1108 rCEvt.
GetCommand() == CommandEventId::ExtTextInput)
1132 sal_Int32 nSequence(0);
1134 const sal_uInt32 nParaCount =
m_xEditEngine->GetParagraphCount();
1135 for(sal_uInt32 nPara = 0; nPara < nParaCount; ++nPara)
1139 if (!sPara.isEmpty() && !sPara.endsWith(
" "))
1141 ESelection aPaM(nPara, sPara.getLength(), nPara, sPara.getLength());
1146 const sal_Int32 nStart = sPara.indexOf(
'<',
nIndex );
1149 const sal_Int32 nEnd = sPara.indexOf(
'>', nStart );
1156 aProtectAttr.
GetGrabBag()[
"Index"] <<= nSequence++;
1157 aSet.
Put(aProtectAttr);
1166 sal_Int32 nLastLen =
m_xEditEngine->GetText(nParaCount - 1).getLength();
1169 int nPara = nParaCount ? nParaCount - 1 : 0;
1170 ESelection aPaM(nPara, nLastLen, nPara, nLastLen);
1183 const sal_uInt32 nPara = aSelection.
nStartPara;
1185 std::vector<EECharAttrib> aAttribList;
1190 if(
nullptr != pAttrib)
1196 pAttrib = FindCharAttrib(
nIndex, aAttribList);
1197 const sal_Int32 nEnd = pAttrib ? pAttrib->
nEnd :
nIndex;
1221 std::vector<EECharAttrib> aAttribList;
1229 const sal_uInt32 nPara = aSelection.
nStartPara;
1242 std::vector<EECharAttrib> aAttribList;
1255 const OUString sCurrentItem =
m_xEditEngine->GetText(aEntrySel);
1267 sal_Int32 nSearchIndex = sPara.lastIndexOf(
'>',
nIndex+1 );
1268 if( nSearchIndex != -1 && nSearchIndex ==
nIndex )
1270 nSearchIndex = sPara.lastIndexOf(
'<',
nIndex );
1271 if( nSearchIndex != -1 )
1300 auto nInsPara = nPara - 1;
1302 ESelection aTemp(nInsPara, nInsPos, nInsPara, nInsPos);
1322 std::vector<EECharAttrib> aAttribList;
1330 if (pBeginAttrib->
nStart)
1344 std::vector<EECharAttrib> aAttribList;
1348 return (pBeginAttrib &&
1357 std::vector<EECharAttrib> aAttribList;
1365 const sal_uInt32 nPara = aSelection.
nStartPara;
1376 std::vector<EECharAttrib> aAttribList;
1384 const sal_uInt32 nPara = aSelection.
nStartPara;
1394 const sal_uInt32 nParaCount =
m_xEditEngine->GetParagraphCount();
1395 for(sal_uInt32 nPara = nParaCount; nPara; --nPara)
1399 if(!sRet.isEmpty() || !sPara.isEmpty())
1401 sRet = sPara + sRet;
1432 class DropTargetListener :
public cppu::WeakImplHelper< css::datatransfer::dnd::XDropTargetListener,
1433 css::datatransfer::dnd::XDropTarget >
1436 css::uno::Reference<css::datatransfer::dnd::XDropTarget> m_xRealDropTarget;
1437 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
m_aListeners;
1441 virtual void SAL_CALL disposing(
const css::lang::EventObject& )
override
1443 m_xRealDropTarget.clear();
1448 virtual void SAL_CALL drop(
const css::datatransfer::dnd::DropTargetDropEvent& dtde )
override
1452 auto aReplacement(dtde);
1454 Point aMousePos(dtde.LocationX, dtde.LocationY);
1460 int nEntry = pTree->get_selected_index();
1463 sal_Int32 nUserData = pTree->get_id(nEntry).toInt32();
1465 if (nUserData >= 0 || !m_pParentDialog->
HasItem(nUserData))
1468 xContainer->CopyString(
"<" + pTree->get_text(nEntry) +
">" );
1471 aReplacement.Transferable = xContainer.get();
1477 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
aListeners(m_aListeners);
1478 for (
auto const& listener : aListeners)
1479 listener->drop(aReplacement);
1485 virtual void SAL_CALL dragEnter(
const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee )
override
1487 auto aReplacement(dtdee);
1489 aReplacement.SupportedDataFlavors.realloc(1);
1492 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
aListeners(m_aListeners);
1493 for (
auto const& listener : aListeners)
1494 listener->dragEnter(aReplacement);
1497 virtual void SAL_CALL dragExit(
const css::datatransfer::dnd::DropTargetEvent& dte )
override
1499 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
aListeners(m_aListeners);
1500 for (
auto const& listener : aListeners)
1501 listener->dragExit( dte );
1504 virtual void SAL_CALL dragOver(
const css::datatransfer::dnd::DropTargetDragEvent& dtde )
override
1506 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
aListeners(m_aListeners);
1507 for (
auto const& listener : aListeners)
1508 listener->dragOver( dtde );
1511 virtual void SAL_CALL dropActionChanged(
const css::datatransfer::dnd::DropTargetDragEvent& dtde )
override
1513 std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>>
aListeners(m_aListeners);
1514 for (
auto const& listener : aListeners)
1515 listener->dropActionChanged( dtde );
1519 virtual void SAL_CALL addDropTargetListener(
const css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>& xListener)
override
1524 virtual void SAL_CALL removeDropTargetListener(
const css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>& xListener)
override
1531 return m_xRealDropTarget->isActive();
1536 m_xRealDropTarget->setActive(active);
1539 virtual sal_Int8 SAL_CALL getDefaultActions()
override
1541 return m_xRealDropTarget->getDefaultActions();
1544 virtual void SAL_CALL setDefaultActions(
sal_Int8 actions)
override
1546 m_xRealDropTarget->setDefaultActions(actions);
1550 DropTargetListener(css::uno::Reference<css::datatransfer::dnd::XDropTarget> xRealDropTarget,
1552 : m_xRealDropTarget(
std::move(xRealDropTarget))
1553 , m_pParentDialog(pParentDialog)
1563 auto xRealDropTarget = GetDrawingArea()->get_drop_target();
1565 xRealDropTarget->addDropTargetListener(pProxy);
1574 m_xEditView->SetCursorLogicPosition(aMousePos,
false,
true);
1577 std::vector<EECharAttrib> aAttribList;
1579 return FindCharAttrib(aSelection.
nStartPos, aAttribList) ==
nullptr;
constexpr OUStringLiteral sPreview
Reference< XExecutableDialog > m_xDialog
virtual void EditViewSelectionChange() override
Link< bool, void > m_aSelectionLink
void RemoveCurrentEntry()
AddressMultiLineEdit(SwCustomizeAddressBlockDialog *pParent)
bool SetCursorLogicPosition(const Point &rPosition)
MoveItemFlags IsCurrentItemMoveable() const
void SetText(const OUString &rStr)
SwCustomizeAddressBlockDialog * m_pParentDialog
void InsertNewEntry(const OUString &rStr)
void MoveCurrentItem(MoveItemFlags nMove)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Link< AddressMultiLineEdit &, void > m_aModifyLink
bool HasCurrentItem() const
OUString GetAddress() const
virtual bool Command(const CommandEvent &rCEvt) override
void InsertNewEntryAtPosition(const OUString &rStr, sal_uLong nPara, sal_uInt16 nIndex)
OUString GetCurrentItem() const
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual ~AddressMultiLineEdit() override
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget() override
virtual bool KeyInput(const KeyEvent &rKEvt) override
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
std::unique_ptr< weld::Container > m_xContainer
CommandEventId GetCommand() const
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetClicks() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const std::map< OUString, css::uno::Any > & GetGrabBag() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static bool GetFormatDataFlavor(SotClipboardFormatId nFormat, css::datatransfer::DataFlavor &rFlavor)
const SwDBData & GetDBData() const
SharedConnection GetConnection() const
css::uno::Reference< css::sdbc::XDataSource > GetSource() const
css::uno::Reference< css::sdbcx::XColumnsSupplier > GetColumnsSupplier() const
OUString GetFilter() const
static OUString FillData(const OUString &rAddress, SwMailMergeConfigItem const &rConfigItem, const css::uno::Sequence< OUString > *pAssignments=nullptr)
std::unique_ptr< weld::Container > m_xGrid
SwMailMergeConfigItem * m_rConfigItem
void Init(SwAssignFieldsDialog *pDialog, SwMailMergeConfigItem &rConfigItem)
Link< LinkParamNone *, void > m_aModifyHdl
DECL_LINK(MatchHdl_Impl, weld::ComboBox &, void)
DECL_LINK(GotFocusHdl_Impl, weld::Widget &, void)
void SetModifyHdl(const Link< LinkParamNone *, void > &rModifyHdl)
std::vector< SwAssignFragment > m_aFields
void MakeVisible(const tools::Rectangle &rRect)
SwAssignFieldsControl(std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Container > xGrid)
std::unique_ptr< weld::ScrolledWindow > m_xVScroll
virtual ~SwAssignFieldsDialog() override
std::unique_ptr< weld::CustomWeld > m_xPreviewWin
css::uno::Sequence< OUString > CreateAssignments()
std::unique_ptr< weld::Label > m_xPreviewFI
std::unique_ptr< weld::Label > m_xMatchTitle
std::unique_ptr< weld::Label > m_xAddressTitle
SwAssignFieldsDialog(weld::Window *pParent, SwMailMergeConfigItem &rConfigItem, OUString aPreview, bool bIsAddressBlock)
void ConnectSizeGroups(int nLabelWidth, int nComboBoxWidth, int nPreviewWidth)
SwMailMergeConfigItem & m_rConfigItem
std::unique_ptr< weld::Label > m_xMatchingFI
std::unique_ptr< SwAddressPreview > m_xPreview
OUString m_rPreviewString
std::unique_ptr< weld::Label > m_xPreviewTitle
std::unique_ptr< SwAssignFieldsControl > m_xFieldsControl
std::unique_ptr< weld::Button > m_xOK
std::unique_ptr< weld::Button > m_xRightIB
std::unique_ptr< weld::CustomWeld > m_xDragWIN
bool HasItem(sal_Int32 nUserData)
std::vector< OUString > m_aSalutations
std::vector< OUString > m_aPunctuations
std::unique_ptr< weld::Label > m_xFieldFT
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
OUString GetAddress() const
sal_Int32 GetSelectedItem_Impl() const
SwCustomizeAddressBlockDialog(weld::Widget *pParent, SwMailMergeConfigItem &rConfig, DialogType)
std::unique_ptr< weld::Button > m_xRemoveFieldIB
void SetAddress(const OUString &rAddress)
std::unique_ptr< weld::TreeView > m_xAddressElementsLB
OUString m_sCurrentPunctuation
void UpdateImageButtons_Impl()
std::unique_ptr< weld::Label > m_xDragFT
OUString m_sCurrentSalutation
std::unique_ptr< weld::Button > m_xOK
std::unique_ptr< weld::Button > m_xInsertFieldIB
std::unique_ptr< AddressMultiLineEdit > m_xDragED
virtual ~SwCustomizeAddressBlockDialog() override
Idle m_aSelectionChangedIdle
std::unique_ptr< weld::Label > m_xAddressElementsFT
std::unique_ptr< weld::Button > m_xUpIB
std::unique_ptr< weld::ComboBox > m_xFieldCB
std::unique_ptr< weld::Button > m_xLeftIB
std::unique_ptr< weld::Button > m_xDownIB
SwMailMergeConfigItem & m_rConfigItem
bool SetCursorLogicPosition(const Point &rPosition)
weld::TreeView * get_drag_source() const
std::unique_ptr< SwAddressPreview > m_xPreview
std::unique_ptr< weld::Button > m_xAssignPB
virtual ~SwMailMergeAddressBlockPage() override
OUString m_sCurrentAddress
SwMailMergeWizard * GetWizard()
std::unique_ptr< weld::CheckButton > m_xAddressCB
std::unique_ptr< SwAddressPreview > m_xSettings
virtual void Activate() override
std::unique_ptr< weld::Container > m_xStep4
std::unique_ptr< weld::Label > m_xSettingsFI
std::unique_ptr< weld::Container > m_xStep3
std::unique_ptr< weld::Button > m_xAddressListPB
std::unique_ptr< SwAddressPreview > m_xPreview
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
std::unique_ptr< weld::Button > m_xSettingsPB
std::unique_ptr< weld::Button > m_xPrevSetIB
SwMailMergeWizard * m_pWizard
std::unique_ptr< weld::Button > m_xDifferentlist
SwMailMergeAddressBlockPage(weld::Container *pPage, SwMailMergeWizard *pWizard)
OUString m_sChangeAddress
std::unique_ptr< weld::CustomWeld > m_xSettingsWIN
virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override
std::unique_ptr< weld::CheckButton > m_xHideEmptyParagraphsCB
std::unique_ptr< weld::Button > m_xNextSetIB
virtual bool canAdvance() const override
void EnableAddressBlock(bool bAll, bool bSelective)
std::unique_ptr< weld::Label > m_xCurrentAddressFI
std::unique_ptr< weld::Label > m_xDocumentIndexFI
void InsertDataHdl(const weld::Button *pButton)
std::unique_ptr< weld::Container > m_xStep2
const SwDBData & GetCurrentDBData() const
sal_Int32 GetResultSetPosition() const
sal_Int32 MoveResultSet(sal_Int32 nTarget)
css::uno::Sequence< OUString > GetAddressBlocks() const
void SetFilter(OUString const &)
bool IsHideEmptyParagraphs() const
void SetCountrySettings(bool bSet, const OUString &sCountry)
void SetCurrentConnection(css::uno::Reference< css::sdbc::XDataSource > const &xSource, const SharedConnection &rConnection, css::uno::Reference< css::sdbcx::XColumnsSupplier > const &xColumnsSupplier, const SwDBData &rDBData)
bool IsIncludeCountry() const
sal_Int32 GetCurrentAddressBlockIndex() const
OUString & GetExcludeCountry() const
bool IsAddressBlock() const
const std::vector< std::pair< OUString, int > > & GetDefaultAddressHeaders() const
void SetAddressBlocks(const css::uno::Sequence< OUString > &rBlocks)
css::uno::Sequence< OUString > GetColumnAssignment(const SwDBData &rDBData) const
css::uno::Reference< css::sdbc::XResultSet > const & GetResultSet() const
bool IsOutputToLetter() const
void SetAddressBlock(bool bSet)
void SetColumnAssignment(const SwDBData &rDBData, const css::uno::Sequence< OUString > &)
void SetHideEmptyParagraphs(bool bSet)
SwMailMergeConfigItem & GetConfigItem()
std::unique_ptr< weld::RadioButton > m_xDependentRB
void SetSettings(bool bIsCountry, const OUString &sCountry)
std::unique_ptr< weld::CustomWeld > m_xPreviewWin
virtual ~SwSelectAddressBlockDialog() override
std::unique_ptr< weld::Entry > m_xCountryED
SwSelectAddressBlockDialog(weld::Window *pParent, SwMailMergeConfigItem &rConfig)
void SetAddressBlocks(const css::uno::Sequence< OUString > &rBlocks, sal_uInt16 nSelected)
std::unique_ptr< weld::Button > m_xNewPB
css::uno::Sequence< OUString > m_aAddressBlocks
bool IsIncludeCountry() const
const css::uno::Sequence< OUString > & GetAddressBlocks()
std::unique_ptr< weld::Button > m_xDeletePB
std::unique_ptr< weld::Button > m_xCustomizePB
std::unique_ptr< weld::RadioButton > m_xAlwaysRB
OUString GetCountry() const
std::unique_ptr< weld::RadioButton > m_xNeverRB
std::unique_ptr< SwAddressPreview > m_xPreview
void SetInvokeHandler(const Link< Timer *, void > &rLink)
std::unique_ptr< EditEngine > m_xEditEngine
std::unique_ptr< EditView > m_xEditView
virtual bool Command(const CommandEvent &rCEvt) override
virtual OutputDevice & EditViewOutputDevice() const override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
css::uno::Reference< css::datatransfer::dnd::XDropTarget > m_xDropTarget
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void EditViewSelectionChange() override
virtual bool KeyInput(const KeyEvent &rKEvt) override
std::unique_ptr< weld::Label > m_xLabel
sal_uInt16 GetCode() const
void enableButtons(WizardButtonFlags _nWizardButtonFlags, bool _bEnable)
virtual Dialog * getDialog() override
virtual OUString get_active_text() const=0
virtual void set_active(int pos)=0
void append_text(const OUString &rStr)
virtual int get_active() const=0
void set_active_text(const OUString &rStr)
void connect_changed(const Link< ComboBox &, void > &rLink)
virtual OutputDevice & get_ref_device()=0
virtual void set_label(const OUString &rText)=0
virtual void set_active(bool active)=0
#define TOOLS_WARN_EXCEPTION(area, stream)
std::vector< Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners
constexpr TypedWhichId< SfxGrabBagItem > EE_CHAR_GRABBAG(EE_CHAR_START+31)
const EnumerationType m_eType
constexpr OUStringLiteral HID_MM_ADDBLOCK_INSERT
constexpr OUStringLiteral HID_MM_ADDBLOCK_PREVIEW
constexpr OUStringLiteral HID_MM_ADDBLOCK_MOVEBUTTONS
constexpr OUStringLiteral HID_MM_ADDBLOCK_REMOVE
constexpr OUStringLiteral HID_MM_ADDBLOCK_DRAG
constexpr OUStringLiteral HID_MM_ADDBLOCK_ELEMENTS
constexpr sal_uInt16 KEY_ESCAPE
#define LINK(Instance, Class, Member)
#define USER_DATA_SALUTATION
IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockHdl_Impl, weld::Toggleable &, rBox, void)
#define USER_DATA_PUNCTUATION
IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, weld::Button &, void)
void setActive(bool bActive)
OString stripEnd(const OString &rIn, char c)
void removeElementAt(css::uno::Sequence< T > &_rSeq, sal_Int32 _nPos)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
const T * HasItem(const ww8::PoolItems &rItems, sal_uInt16 eType)
OUString SwResId(TranslateId aId)