54 #include <rtl/tencinfo.h>
58 #include <osl/file.hxx>
59 #include <com/sun/star/frame/XStorable.hpp>
60 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
61 #include <com/sun/star/sdb/XColumn.hpp>
62 #include <com/sun/star/task/ErrorCodeIOException.hpp>
73 #include <strings.hrc>
82 #define MM_DOCTYPE_OOO 1
83 #define MM_DOCTYPE_PDF 2
84 #define MM_DOCTYPE_WORD 3
85 #define MM_DOCTYPE_HTML 4
86 #define MM_DOCTYPE_TEXT 5
107 if (rxColAccess->hasByName(rColumn))
109 Any aCol = rxColAccess->getByName(rColumn);
110 Reference< sdb::XColumn >
xColumn;
113 sRet = xColumn->getString();
116 catch (
const uno::Exception&)
157 SwSaveWarningBox_Impl(
weld::Window* pParent,
const OUString& rFileName);
159 OUString GetFileName()
const
161 return m_xEdit->get_text();
167 bool bIsEmptyAllowed;
170 SwSendQueryBox_Impl(
weld::Window* pParent,
const OString& rID,
171 const OUString& rUIXMLDescription);
175 m_xEdit->set_text(rSet);
181 return m_xEdit->get_text();
184 void SetIsEmptyTextAllowed(
bool bSet)
186 bIsEmptyAllowed = bSet;
193 SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(
weld::Window* pParent,
const OUString& rFileName)
195 "modules/swriter/ui/alreadyexistsdialog.ui")
197 m_xEdit->set_text(rFileName);
198 m_xEdit->connect_changed(
LINK(
this, SwSaveWarningBox_Impl, ModifyHdl));
201 m_xDialog->set_primary_text(
m_xDialog->get_primary_text().replaceAll(
"%1", aTmp.getName(
212 SwSendQueryBox_Impl::SwSendQueryBox_Impl(
weld::Window* pParent,
const OString& rID,
213 const OUString& rUIXMLDescription)
215 , bIsEmptyAllowed(true)
217 m_xEdit->connect_changed(
LINK(
this, SwSendQueryBox_Impl, ModifyHdl));
223 m_xOKPB->set_sensitive(bIsEmptyAllowed || !
rEdit.
get_text().isEmpty());
230 std::unique_ptr<weld::Entry> m_xCCED;
231 std::unique_ptr<weld::Entry> m_xBCCED;
236 , m_xCCED(m_xBuilder->weld_entry(
"cc"))
237 , m_xBCCED(m_xBuilder->weld_entry(
"bcc"))
241 OUString GetCC()
const {
return m_xCCED->get_text();}
242 void SetCC(
const OUString& rSet) {m_xCCED->set_text(rSet);}
244 OUString GetBCC()
const {
return m_xBCCED->get_text();}
245 void SetBCC(
const OUString& rSet) {m_xBCCED->set_text(rSet);}
251 :
SfxDialogController(pParent,
"modules/swriter/ui/mmresultsavedialog.ui",
"MMResultSaveDialog")
252 , m_bCancelSaving(
false)
253 , m_xSaveAsOneRB(m_xBuilder->weld_radio_button(
"singlerb"))
254 , m_xSaveIndividualRB(m_xBuilder->weld_radio_button(
"individualrb"))
255 , m_xFromRB(m_xBuilder->weld_check_button(
"fromrb"))
256 , m_xFromNF(m_xBuilder->weld_spin_button(
"from"))
257 , m_xToFT(m_xBuilder->weld_label(
"toft"))
258 , m_xToNF(m_xBuilder->weld_spin_button(
"to"))
270 sal_Int32
nCount = xConfigItem->GetMergedDocumentCount();
283 :
SfxDialogController(pParent,
"modules/swriter/ui/mmresultprintdialog.ui",
"MMResultPrintDialog")
284 , m_xPrinterFT(m_xBuilder->weld_label(
"printerft"))
285 , m_xPrinterLB(m_xBuilder->weld_combo_box(
"printers"))
286 , m_xPrinterSettingsPB(m_xBuilder->weld_button(
"printersettings"))
287 , m_xPrintAllRB(m_xBuilder->weld_radio_button(
"printallrb"))
288 , m_xFromRB(m_xBuilder->weld_radio_button(
"fromrb"))
289 , m_xFromNF(m_xBuilder->weld_spin_button(
"from"))
290 , m_xToFT(m_xBuilder->weld_label(
"toft"))
291 , m_xToNF(m_xBuilder->weld_spin_button(
"to"))
315 :
SfxDialogController(pParent,
"modules/swriter/ui/mmresultemaildialog.ui",
"MMResultEmailDialog")
316 , m_sConfigureMail(
SwResId(ST_CONFIGUREMAIL))
317 , m_xMailToFT(m_xBuilder->weld_label(
"mailtoft"))
318 , m_xMailToLB(m_xBuilder->weld_combo_box(
"mailto"))
319 , m_xCopyToPB(m_xBuilder->weld_button(
"copyto"))
320 , m_xSubjectFT(m_xBuilder->weld_label(
"subjectft"))
321 , m_xSubjectED(m_xBuilder->weld_entry(
"subject"))
322 , m_xSendAsFT(m_xBuilder->weld_label(
"sendasft"))
323 , m_xSendAsLB(m_xBuilder->weld_combo_box(
"sendas"))
324 , m_xSendAsPB(m_xBuilder->weld_button(
"sendassettings"))
325 , m_xAttachmentGroup(m_xBuilder->weld_widget(
"attachgroup"))
326 , m_xAttachmentED(m_xBuilder->weld_entry(
"attach"))
327 , m_xPasswordFT(m_xBuilder->weld_label(
"passwordft"))
328 , m_xPasswordLB(m_xBuilder->weld_combo_box(
"password"))
329 , m_xPasswordCB(m_xBuilder->weld_check_button(
"passwordcb"))
330 , m_xSendAllRB(m_xBuilder->weld_radio_button(
"sendallrb"))
331 , m_xFromRB(m_xBuilder->weld_radio_button(
"fromrb"))
332 , m_xFromNF(m_xBuilder->weld_spin_button(
"from"))
333 , m_xToFT(m_xBuilder->weld_label(
"toft"))
334 , m_xToNF(m_xBuilder->weld_spin_button(
"to"))
367 unsigned int nCount = rPrinters.size();
368 bool bMergePrinterExists =
false;
370 for (
unsigned int i = 0;
i < nCount; ++
i)
373 if( !bMergePrinterExists && rPrinters[i] == xConfigItem->GetSelectedPrinter() )
374 bMergePrinterExists =
true;
378 if(!bMergePrinterExists)
385 m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter());
389 sal_Int32
count = xConfigItem->GetMergedDocumentCount();
401 SwView* pSourceView = xConfigItem->GetSourceView();
402 OSL_ENSURE(pSourceView,
"no source view exists");
422 uno::Reference< sdbcx::XColumnsSupplier > xColsSupp(xConfigItem->GetResultSet(), uno::UNO_QUERY);
424 uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() :
nullptr;
425 uno::Sequence< OUString > aFields;
427 aFields = xColAccess->getElementNames();
432 for (
const OUString& rField : std::as_const(aFields))
442 const std::vector<std::pair<OUString, int>>& rHeaders = xConfigItem->GetDefaultAddressHeaders();
443 OUString sEMailColumn = rHeaders[MM_PART_E_MAIL].first;
444 Sequence< OUString> aAssignment = xConfigItem->GetColumnAssignment(xConfigItem->GetCurrentDBData());
445 if (aAssignment.getLength() > MM_PART_E_MAIL && !aAssignment[MM_PART_E_MAIL].isEmpty())
446 sEMailColumn = aAssignment[MM_PART_E_MAIL];
454 const sal_Int32
nCount = xConfigItem->GetMergedDocumentCount();
462 bool bEnableFromTo = m_xFromRB->get_active();
463 m_xFromNF->set_sensitive(bEnableFromTo);
464 m_xToFT->set_sensitive(bEnableFromTo);
465 m_xToNF->set_sensitive(bEnableFromTo);
470 bool bEnable = m_xPasswordCB->get_active();
472 m_xPasswordFT->set_sensitive(bEnable);
473 m_xPasswordLB->set_sensitive(bEnable);
478 bool bEnableFromTo = m_xFromRB->get_active();
479 m_xFromNF->set_sensitive(bEnableFromTo);
480 m_xToFT->set_sensitive(bEnableFromTo);
481 m_xToNF->set_sensitive(bEnableFromTo);
486 bool bEnableFromTo = m_xFromRB->get_active();
487 m_xFromNF->set_sensitive(bEnableFromTo);
488 m_xToFT->set_sensitive(bEnableFromTo);
489 m_xToNF->set_sensitive(bEnableFromTo);
499 m_sCC = aDlg.GetCC() ;
500 m_sBCC = aDlg.GetBCC();
509 assert( pTargetView );
526 assert( pTargetView );
557 const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
558 sal_uInt32 nBegin = 0;
559 sal_uInt32 nEnd = nDocumentCount;
561 if (m_xFromRB->get_active())
563 nBegin =
static_cast<sal_Int32
>(m_xFromNF->get_value() - 1);
564 nEnd =
static_cast<sal_Int32
>(m_xToNF->get_value());
565 if (nEnd > nDocumentCount)
566 nEnd = nDocumentCount;
569 xConfigItem->SetBeginEnd(nBegin, nEnd);
571 if (!xConfigItem->GetTargetView())
574 SwView* pTargetView = xConfigItem->GetTargetView();
585 if (m_xSaveAsOneRB->get_active())
589 uno::Reference< frame::XStorable > xStore( pTargetView->
GetDocShell()->
GetModel(), uno::UNO_QUERY);
593 xStore->storeToURL( sPath, aValues );
595 catch (
const task::ErrorCodeIOException& rErrorEx)
597 nErrorCode =
ErrCode(rErrorEx.ErrCode);
616 SwDocShell::Factory().GetFilterContainer() );
618 uno::Sequence< beans::PropertyValue > aValues(1);
619 beans::PropertyValue*
pValues = aValues.getArray();
620 pValues[0].Name =
"FilterName";
621 pValues[0].Value <<= pSfxFlt->GetFilterName();
623 uno::Reference< frame::XStorable > xStore( pTargetView->
GetDocShell()->
GetModel(), uno::UNO_QUERY);
627 xStore->storeToURL( sTargetTempURL, aValues );
629 catch (
const task::ErrorCodeIOException& rErrorEx)
631 nErrorCode =
ErrCode(rErrorEx.ErrCode);
643 SwView* pSourceView = xConfigItem->GetSourceView();
644 auto xSaveMonitor = std::make_shared<SaveMonitor>(
m_xDialog.get());
646 xSaveMonitor->m_xPrinter->set_label(
INetURLObject( sPath ).getFSysPath( FSysStyle::Detect ) );
647 m_bCancelSaving =
false;
650 m_bCancelSaving =
true;
651 xSaveMonitor.reset();
654 for(sal_uInt32 nDoc = 0; nDoc < nEnd - nBegin && !m_bCancelSaving; ++nDoc)
658 if (sExtension.isEmpty())
660 sExtension = pSfxFlt->GetWildcard().getGlob().getToken(1,
'.');
661 sPath +=
"." + sExtension;
663 OUString sStat =
SwResId(STR_STATSTR_LETTER) +
" " + OUString::number(nDoc + 1);
664 xSaveMonitor->m_xPrintInfo->set_label(sStat);
680 sTargetTempURL, aOpt,
true );
686 pTempView->
GetWrtShell(), documentStartPageNumber(xConfigItem.get(), nDoc,
false),
687 documentEndPageNumber(xConfigItem.get(), nDoc,
false));
691 OUString sCounter =
"_" + OUString::number(nDoc + 1);
692 sOutPath = sOutPath.replaceAt( sOutPath.getLength() - sExtension.getLength() - 1, 0, sCounter);
699 bool bFailed =
false;
702 pValues[0].Value <<= sFilter;
703 uno::Reference< frame::XStorable > xTempStore( xTempDocShell->
GetModel(), uno::UNO_QUERY);
704 xTempStore->storeToURL( sOutPath, aValues );
706 catch (
const uno::Exception&)
713 std::unique_ptr<SwSaveWarningBox_Impl> xWarning(
new SwSaveWarningBox_Impl(
m_xDialog.get(), sOutPath));
714 if (
RET_OK == xWarning->run())
715 sOutPath = xWarning->GetFileName();
732 xSaveMonitor->response(
RET_OK);
733 ::osl::File::remove( sTargetTempURL );
744 if (rBox.get_active() != -1)
750 if ( !m_pTempPrinter )
757 (m_pTempPrinter->GetDriverName() != pInfo->
GetDriver()) )
759 m_pTempPrinter.disposeAndClear();
764 else if( ! m_pTempPrinter )
767 m_xPrinterSettingsPB->set_sensitive(m_pTempPrinter->HasSupport(PrinterSupport::SetupDialog));
770 m_xPrinterSettingsPB->set_sensitive(
false);
772 xConfigItem->SetSelectedPrinter(rBox.get_active_text());
781 const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
782 sal_uInt32 nBegin = 0;
783 sal_uInt32 nEnd = nDocumentCount;
785 if (m_xFromRB->get_active())
787 nBegin =
static_cast<sal_Int32
>(m_xFromNF->get_value() - 1);
788 nEnd =
static_cast<sal_Int32
>(m_xToNF->get_value());
789 if (nEnd > nDocumentCount)
790 nEnd = nDocumentCount;
793 xConfigItem->SetBeginEnd(nBegin, nEnd);
795 if(!xConfigItem->GetTargetView())
798 SwView* pTargetView = xConfigItem->GetTargetView();
803 const bool bIgnoreEmptyPages =
805 const int nStartPage = documentStartPageNumber(xConfigItem.get(), 0, bIgnoreEmptyPages);
806 const int nEndPage = documentEndPageNumber(xConfigItem.get(), nEnd - nBegin - 1, bIgnoreEmptyPages);
808 const OUString sPages(OUString::number(nStartPage) +
"-" + OUString::number(nEndPage));
815 pDocumentPrinter->SetPrinterProps(m_pTempPrinter);
826 pTargetView->
ExecPrint( aProps,
false,
true );
840 auto nDocType = rBox.get_active_id().toUInt32();
843 m_xSendAsPB->set_sensitive(bEnable);
844 m_xAttachmentGroup->set_sensitive(bEnable);
848 OUString sAttach(m_xAttachmentED->get_text());
850 if (!sAttach.isEmpty())
859 m_xAttachmentED->set_text(sAttach);
865 m_xPasswordCB->set_sensitive(
true);
866 m_xPasswordFT->set_sensitive(
true);
867 m_xPasswordLB->set_sensitive(
true);
868 CheckHdl(*m_xPasswordCB);
872 m_xPasswordCB->set_sensitive(
false);
873 m_xPasswordFT->set_sensitive(
false);
874 m_xPasswordLB->set_sensitive(
false);
884 m_sBody = aDlg.GetBody();
895 const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
896 sal_uInt32 nBegin = 0;
897 sal_uInt32 nEnd = nDocumentCount;
899 if (m_xFromRB->get_active())
901 nBegin =
static_cast<sal_Int32
>(m_xFromNF->get_value() - 1);
902 nEnd =
static_cast<sal_Int32
>(m_xToNF->get_value());
903 if (nEnd > nDocumentCount)
904 nEnd = nDocumentCount;
907 xConfigItem->SetBeginEnd(nBegin, nEnd);
909 if (!xConfigItem->GetTargetView())
913 SwView* pTargetView = xConfigItem->GetTargetView();
914 SAL_WARN_IF(!pTargetView,
"sw.ui",
"No TargetView in SwMailMergeConfigItem");
916 if (xConfigItem->GetMailServer().isEmpty() ||
920 VclMessageType::Question, VclButtonsType::YesNo,
923 sal_uInt16 nRet = xQueryBox->run();
926 SwView* pConfigView = pTargetView ? pTargetView : pView;
940 bool bAsBody =
false;
941 rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
943 std::shared_ptr<const SfxFilter> pSfxFlt;
944 auto nDocType = m_xSendAsLB->get_active_id().toUInt32();
954 SfxFilterFlags::EXPORT);
961 SfxFilterFlags::EXPORT);
970 std::shared_ptr<const SfxFilter> pFilter = aIter.First();
973 if( pFilter->GetUserData() ==
FILTER_WW8 && pFilter->CanExport() )
978 pFilter = aIter.Next();
986 eEncoding = RTL_TEXTENCODING_UTF8;
993 "Text (encoded)", SfxFilterFlags::EXPORT);
1005 OUString sMimeType = pSfxFlt->GetMimeType();
1007 if (m_xSubjectED->get_text().isEmpty())
1009 std::unique_ptr<SwSendQueryBox_Impl> xQuery(
new SwSendQueryBox_Impl(
m_xDialog.get(),
"SubjectDialog",
1010 "modules/swriter/ui/subjectdialog.ui"));
1011 xQuery->SetIsEmptyTextAllowed(
true);
1012 xQuery->SetValue(
"");
1013 if(
RET_OK == xQuery->run())
1015 if (!xQuery->GetValue().isEmpty())
1016 m_xSubjectED->set_text(xQuery->GetValue());
1021 if(!bAsBody && m_xAttachmentED->get_text().isEmpty())
1023 std::unique_ptr<SwSendQueryBox_Impl> xQuery(
new SwSendQueryBox_Impl(
m_xDialog.get(),
"AttachNameDialog",
1024 "modules/swriter/ui/attachnamedialog.ui"));
1025 xQuery->SetIsEmptyTextAllowed(
false);
1026 if (
RET_OK == xQuery->run())
1028 OUString sAttach(xQuery->GetValue());
1030 if (2 > nTokenCount)
1036 m_xSendAsLB->get_active_id().toUInt32()));
1037 m_xAttachmentED->set_text(sAttach);
1043 OUString sEMailColumn = m_xMailToLB->get_active_text();
1044 OSL_ENSURE( !sEMailColumn.isEmpty(),
"No email column selected");
1045 Reference< sdbcx::XColumnsSupplier > xColsSupp( xConfigItem->GetResultSet(), UNO_QUERY);
1047 if(sEMailColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn))
1053 OUString sPasswordColumn = m_xPasswordLB->get_active_text();
1054 OSL_ENSURE( !sPasswordColumn.isEmpty(),
"No password column selected");
1055 if(sPasswordColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sPasswordColumn))
1061 OUString sFilterOptions;
1074 sFilterOptions =
"EmbedImages";
1081 SwDocShell::Factory().GetFilterContainer() );
1085 uno::Reference< frame::XStorable > xStore( pTargetView->
GetDocShell()->
GetModel(), uno::UNO_QUERY);
1086 xStore->storeToURL( sTargetTempURL, aValues );
1091 xDlg->StartSend(nEnd - nBegin);
1099 for(sal_uInt32 nDoc = 0; nDoc < nEnd - nBegin; ++nDoc)
1117 sTargetTempURL, aOpt,
true );
1122 pTempView->
GetWrtShell(), documentStartPageNumber(xConfigItem.get(), nDoc,
false),
1123 documentEndPageNumber(xConfigItem.get(), nDoc,
false));
1134 bool withPasswordOptions = m_xPasswordCB->get_active();
1136 sal_Int32 nTarget = xConfigItem->MoveResultSet(rInfo.
nDBRow);
1137 OSL_ENSURE( nTarget == rInfo.
nDBRow,
"row of current document could not be selected");
1140 sal_Int32 nOptionCount = (withFilterOptions && withPasswordOptions) ? 4 : withPasswordOptions ? 3 : withFilterOptions ? 2 : 1;
1142 uno::Sequence< beans::PropertyValue > aFilterValues(nOptionCount);
1143 beans::PropertyValue* pFilterValues = aFilterValues.getArray();
1145 pFilterValues[nOpt].Name =
"FilterName";
1146 pFilterValues[nOpt].Value <<= pSfxFlt->GetFilterName();
1148 if(withFilterOptions)
1151 pFilterValues[nOpt].Name =
"FilterOptions";
1152 pFilterValues[nOpt].Value <<= sFilterOptions;
1155 if(withPasswordOptions)
1158 pFilterValues[nOpt].Name =
"EncryptFile";
1159 pFilterValues[nOpt].Value <<=
true;
1161 pFilterValues[nOpt].Name =
"DocumentOpenPassword";
1162 pFilterValues[nOpt].Value <<= sPassword;
1165 uno::Reference< frame::XStorable > xTempStore( pTempView->
GetDocShell()->
GetModel(), uno::UNO_QUERY);
1166 xTempStore->storeToURL( aName.
GetValue(), aFilterValues );
1170 sal_Int32 nTarget = xConfigItem->MoveResultSet(rInfo.
nDBRow);
1171 OSL_ENSURE( nTarget == rInfo.
nDBRow,
"row of current document could not be selected");
1172 OSL_ENSURE( !sEMailColumn.isEmpty(),
"No email column selected");
1176 OUStringBuffer sBody;
1182 SvStream* pInStream = aMedium.GetInStream();
1187 OSL_FAIL(
"no output file created?");
1190 OStringBuffer sLine;
1191 bool bDone = pInStream->ReadLine( sLine );
1194 sBody.append( OStringToOUString(sLine, eEncoding) );
1196 bDone = pInStream->ReadLine( sLine );
1206 OUString sAttachment(m_xAttachmentED->get_text());
1208 if (2 > nTokenCount)
1213 else if (
o3tl::getToken(sAttachment, nTokenCount - 1,
'.') != sExtension)
1214 sAttachment += sExtension;
1218 if (xConfigItem->IsGreetingLine(
true))
1220 OUString sNameColumn = xConfigItem->GetAssignedColumn(MM_PART_LASTNAME);
1223 if(!sName.isEmpty() && xConfigItem->IsIndividualGreeting(
true))
1225 OUString sGenderColumn = xConfigItem->GetAssignedColumn(MM_PART_GENDER);
1226 const OUString& sFemaleValue = xConfigItem->GetFemaleGenderValue();
1233 xConfigItem->GetGreetings(eGenderType)
1234 [xConfigItem->GetCurrentGreeting(eGenderType)],
1245 sBody.insert(0, sGreeting);
1252 OUString::createFromAscii(rtl_getBestMimeCharsetFromTextEncoding( eEncoding ));
1255 aDesc.
sBodyMimeType =
"text/plain; charset=UTF-8; format=flowed";
1257 aDesc.
sSubject = m_xSubjectED->get_text();
1259 aDesc.
sBCC = m_sBCC;
1260 xDlg->AddDocument( aDesc );
1264 if (!xDlg->getDialog()->get_visible())
1269 xDlg->EnableDestruction();
1270 ::osl::File::remove( sTargetTempURL );
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
SwMMResultPrintDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xFromRB
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
static OUString CreateTempName()
SwMMResultSaveDialog(weld::Window *pParent)
std::unique_ptr< weld::SpinButton > m_xToNF
OUString const & GetMailServer() const
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
OUString GetTitle(sal_uInt16 nMaxLen=0) const
void PastePages(SwFEShell &rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
Paste some pages into another doc - used in mailmerge.
bool SttEndDoc(bool bStt)
OUString const & GetMailAddress() const
void SetMailDisplayName(const OUString &rName)
void SetPageDescs(const bool bNew)
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
OUString GetStandardText(StandardButtonType eButton)
bool IsSecureConnection() const
void SetInServerPassword(const OUString &rPassword)
std::unique_ptr< weld::ComboBox > m_xPasswordLB
void SetMailServer(const OUString &rAddress)
const OUString & GetName() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
std::unique_ptr< weld::SpinButton > m_xToNF
css::uno::Reference< css::frame::XModel3 > GetModel() const
bool EndPrvPg(bool bSelect=false)
std::unique_ptr< weld::SpinButton > m_xFromNF
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
void SetMailReplyTo(bool bSet)
void ReplaceCompatibilityOptions(const SwDoc &rSource)
sal_Int16 GetMailPort() const
bool UCB_DeleteFile(const OUString &rURL)
void SetMailPassword(const OUString &rPassword)
void SetInServerPOP(bool bSet)
std::unique_ptr< weld::Button > m_xOKButton
void SetParaFlags(LineEnd eVal)
bool GotoMark(const ::sw::mark::IMark *const pMark)
virtual SfxObjectShell * GetObjectShell() override
std::unique_ptr< weld::Button > m_xCopyToPB
void SetSMTPAfterPOP(bool bSet)
static void lcl_UpdateEmailSettingsFromGlobalConfig(SwMailMergeConfigItem &rConfigItem)
Replace email server settings in rConfigItem with those set in Writer's global mail merge config sett...
SwWrtShell & GetWrtShell() const
SfxApplication * SfxGetpApp()
void SetTextFormats(const bool bNew)
void WriteUserData(OUString &) const
Used by the UI to modify the document model.
OUString SwResId(TranslateId aId)
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
sw::mark::IMark * startPageInTarget
std::unique_ptr< weld::CheckButton > m_xFromRB
void SetLanguage(LanguageType nVal)
constexpr auto SFX_INTERFACE_NONE
static OUString lcl_GetExtensionForDocType(sal_uLong nDocType)
static weld::Window * GetDefDialogParent()
std::unique_ptr< weld::Button > m_xOKButton
void ReplaceDefaults(const SwDoc &rSource)
SwMMResultEmailDialog(weld::Window *pParent)
SwDocMergeInfo & GetDocumentMergeInfo(sal_uInt32 nDocument)
void SetMailAddress(const OUString &rAddress)
void SetInServerPort(sal_Int16 nSet)
void SetAuthentication(bool bSet)
constexpr OUStringLiteral FILTER_WW8
WinWord 97 filter.
std::unique_ptr< weld::RadioButton > m_xSendAllRB
std::shared_ptr< const SfxFilter > GetFilter4Extension(const OUString &rExt, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
sal_Int16 GetI18NScriptTypeOfLanguage(LanguageType nLang)
std::unique_ptr< weld::Button > m_xOKButton
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
virtual ~SwMMResultEmailDialog() override
bool IsAuthentication() const
SfxItemPool & GetPool() const
OUString const & GetInServerPassword() const
sal_Int16 GetInServerPort() const
sal_uInt32 GetMergedDocumentCount()
SwDoc * GetDoc()
returns Doc. But be careful!
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Dialog implementing the printing of the result document.
std::unique_ptr< weld::ComboBox > m_xPrinterLB
static SW_DLLPUBLIC std::shared_ptr< const SfxFilter > GetFilterOfFormat(std::u16string_view rFormat, const SfxFilterContainer *pCnt=nullptr)
find for an internal format name the corresponding filter entry
#define STR_SW_EVENT_MAIL_MERGE_END
OUString CallSaveAsDialog(weld::Window *pParent, OUString &rFilter)
static bool Reschedule(bool bHandleAllCurrentEvents=false)
#define ERRCODE_IO_GENERAL
void SetSecureConnection(bool bSet)
virtual const SwPrintData & getPrintData() const =0
Returns the PrintData.
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
void Push()
store a copy of the current cursor on the cursor stack
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
void ExecPrint(const css::uno::Sequence< css::beans::PropertyValue > &, bool, bool)
const OUString & GetValue() const
sal_uInt16 GetPageNumSeqNonEmpty()
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
sal_uInt16 GetWhichOfScript(sal_uInt16 nWhich, sal_uInt16 nScript)
void FillInEmailSettings()
std::unique_ptr< weld::Entry > m_xAttachmentED
OUString const & GetMailReplyTo() const
Dialog implementing the sending as email of the result document.
std::unique_ptr< weld::Label > m_xPasswordFT
std::unique_ptr< weld::Button > m_xOKButton
std::unique_ptr< weld::Button > m_xSendAsPB
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
std::unique_ptr< weld::CheckButton > m_xPasswordCB
bool IsInServerPOP() const
void SetInServerName(const OUString &rServer)
SfxViewShell * GetViewShell() const
virtual sal_uInt16 SetPrinter(SfxPrinter *pNew, SfxPrinterChangeFlags nDiff=SFX_PRINTER_ALL) override
SwDocShell * GetDocShell()
virtual OUString get_text() const =0
constexpr T & temporary(T &&x)
static const std::vector< OUString > & GetPrinterQueues()
std::unique_ptr< weld::ComboBox > m_xSendAsLB
OUString const & GetMailDisplayName() const
ErrCode LoadStylesFromFile(const OUString &rURL, SwgReaderOption &rOpt, bool bUnoCall)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static std::shared_ptr< SwMailMergeConfigItem > PerformMailMerge(SwView const *pView)
OUString const & GetInServerUserName() const
const PropertyValue * pValues
void GotoMark(const ::sw::mark::IMark *const pMark)
void SetMailUserName(const OUString &rName)
const OUString & GetPrinterName() const
#define SAL_WARN_IF(condition, area, stream)
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
#define STR_SW_EVENT_MAIL_MERGE
void SetBody(const OUString &rBody)
bool IsPrintEmptyPages() const
Dialog implementing the saving as of the result document.
#define ERRCTX_SFX_SAVEASDOC
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
LanguageType GetAppLanguage()
static VclPtr< reference_type > Create(Arg &&...arg)
void SetStreamCharSet(rtl_TextEncoding eCharSet)
Reference< XExecutableDialog > m_xDialog
void SetMailPort(sal_Int16 nSet)
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
static void ProcessEventsToIdle()
static const QueueInfo * GetQueueInfo(const OUString &rPrinterName, bool bStatusUpdate)
std::unique_ptr< weld::ComboBox > m_xMailToLB
std::unique_ptr< weld::Button > m_xPrinterSettingsPB
static OUString GetEventName(sal_Int32 nId)
std::unique_ptr< weld::SpinButton > m_xFromNF
std::unique_ptr< weld::SpinButton > m_xToNF
IMPL_LINK_NOARG(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, weld::Toggleable &, void)
bool IsSMTPAfterPOP() const
static OUString lcl_GetColumnValueOf(const OUString &rColumn, Reference< container::XNameAccess > const &rxColAccess)
IMPL_LINK(SwSaveWarningBox_Impl, ModifyHdl, weld::Entry &, rEdit, void)
void SetInServerUserName(const OUString &rName)
void ReplaceDocumentProperties(const SwDoc &rSource, bool mailMerge=false)
Replace document properties with those from rSource.
bool CheckMailAddress(const OUString &rMailAddress)
void FillInPrinterSettings()
bool Pop(PopMode)
delete cursor
virtual ~SwMMResultSaveDialog() override
const OUString & GetDriver() const
std::unique_ptr< weld::SpinButton > m_xFromNF
constexpr OUStringLiteral FILTER_XML
XML filter.
std::unique_ptr< weld::RadioButton > m_xSaveIndividualRB
OUString const & GetMailPassword() const
bool IsMailReplyTo() const
void SetFrameFormats(const bool bNew)
OUString const & GetName() const
std::unique_ptr< weld::RadioButton > m_xPrintAllRB
static OUString FillData(const OUString &rAddress, SwMailMergeConfigItem const &rConfigItem, const css::uno::Sequence< OUString > *pAssignments=nullptr)
virtual ~SwMMResultPrintDialog() override
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
OUString const & GetMailUserName() const
void SetMerge(const bool bNew)
void SetNumRules(const bool bNew)
OUString getExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
OUString const & GetInServerName() const
std::unique_ptr< weld::RadioButton > m_xFromRB
void EndAction(const bool bIdleEnd=false)
bool m_bDetectedRangeSegmentation false
virtual void SetValue(tools::Long nNew) override
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
std::unique_ptr< weld::RadioButton > m_xSaveAsOneRB
SfxMedium * GetMedium() const