20#include <com/sun/star/beans/PropertyValue.hpp>
55const sal_uInt16
nMagic = sal_uInt16(0x1977);
135 , m_nSlideDuration(15)
137 , m_bContentPage(true)
141 , m_bSlideSound(true)
142 , m_bHiddenSlides(false)
152 , m_bUseAttribs(true)
238 RTL_TEXTENCODING_UTF8);
245 RTL_TEXTENCODING_UTF8);
249 RTL_TEXTENCODING_UTF8);
251 RTL_TEXTENCODING_UTF8);
253 RTL_TEXTENCODING_UTF8);
255 RTL_TEXTENCODING_UTF8);
271 RTL_TEXTENCODING_UTF8);
273 RTL_TEXTENCODING_UTF8);
294 RTL_TEXTENCODING_UTF8);
301 RTL_TEXTENCODING_UTF8);
304 RTL_TEXTENCODING_UTF8);
306 RTL_TEXTENCODING_UTF8);
308 RTL_TEXTENCODING_UTF8);
310 RTL_TEXTENCODING_UTF8);
325 RTL_TEXTENCODING_UTF8);
327 RTL_TEXTENCODING_UTF8);
344 std::unique_ptr<weld::Entry> m_xEdit;
345 std::unique_ptr<weld::Button> m_xBtnOK;
348 SdDesignNameDlg(
weld::Window* pWindow,
const OUString& aName );
349 OUString GetDesignName()
const;
358 : GenericDialogController(pWindow,
"modules/simpress/ui/publishingdialog.ui",
"PublishingDialog")
359 , m_xPage1_Designs(m_xBuilder->weld_tree_view(
"designsTreeview"))
360 , m_xPage2_Standard_FB(m_xBuilder->weld_image(
"standardFBImage"))
361 , m_xPage2_Frames_FB(m_xBuilder->weld_image(
"framesFBImage"))
362 , m_xPage2_Kiosk_FB(m_xBuilder->weld_image(
"kioskFBImage"))
363 , m_xPage2_WebCast_FB(m_xBuilder->weld_image(
"webCastFBImage"))
364 , m_xPage4_Misc(m_xBuilder->weld_text_view(
"miscTextview"))
366 , m_xLastPageButton(m_xBuilder->weld_button(
"lastPageButton"))
367 , m_xNextPageButton(m_xBuilder->weld_button(
"nextPageButton"))
368 , m_xFinishButton(m_xBuilder->weld_button(
"finishButton"))
370 , m_bButtonsDirty(true)
371 , m_bDesignListDirty(false)
538 m_xFormatter->SetExtFormat(ExtTimeFieldFormat::LongDuration);
663 std::vector< PropertyValue > aProps;
665 PropertyValue aValue;
668 aValue.Name =
"PublishMode";
682 aValue.Value <<=
static_cast<sal_Int32
>(ePublishMode);
683 aProps.push_back( aValue );
685 aValue.Name =
"IsExportContentsPage";
687 aProps.push_back( aValue );
691 aValue.Name =
"IsExportNotes";
693 aProps.push_back( aValue );
698 aValue.Name =
"WebCastScriptLanguage";
700 aValue.Value <<= OUString(
"asp" );
702 aValue.Value <<= OUString(
"perl" );
703 aProps.push_back( aValue );
705 aValue.Name =
"WebCastCGIURL";
707 aProps.push_back( aValue );
709 aValue.Name =
"WebCastTargetURL";
711 aProps.push_back( aValue );
713 aValue.Name =
"IndexURL";
715 aProps.push_back( aValue );
719 aValue.Name =
"KioskSlideDuration";
720 aValue.Value <<=
static_cast<sal_uInt32
>(
m_xFormatter->GetTime().GetMSFromTime()) / 1000;
721 aProps.push_back( aValue );
723 aValue.Name =
"KioskEndless";
725 aProps.push_back( aValue );
730 aValue.Name =
"Width";
739 aValue.Value <<= nTmpWidth;
740 aProps.push_back( aValue );
742 aValue.Name =
"Compression";
744 aProps.push_back( aValue );
746 aValue.Name =
"Format";
754 aValue.Value <<= nFormat;
755 aProps.push_back( aValue );
757 aValue.Name =
"SlideSound";
759 aProps.push_back( aValue );
761 aValue.Name =
"HiddenSlides";
763 aProps.push_back( aValue );
766 aValue.Name =
"Author";
768 aProps.push_back( aValue );
770 aValue.Name =
"EMail";
772 aProps.push_back( aValue );
779 aValue.Name =
"HomepageURL";
781 aProps.push_back( aValue );
783 aValue.Name =
"UserText";
785 aProps.push_back( aValue );
789 aValue.Name =
"EnableDownload";
791 aProps.push_back( aValue );
797 aValue.Name =
"UseButtonSet";
798 aValue.Value <<=
static_cast<sal_Int32
>(
m_xPage5_Buttons->GetSelectedItemId() - 1);
799 aProps.push_back( aValue );
805 aValue.Name =
"BackColor";
807 aProps.push_back( aValue );
809 aValue.Name =
"TextColor";
811 aProps.push_back( aValue );
813 aValue.Name =
"LinkColor";
815 aProps.push_back( aValue );
817 aValue.Name =
"VLinkColor";
819 aProps.push_back( aValue );
821 aValue.Name =
"ALinkColor";
823 aProps.push_back( aValue );
828 aValue.Name =
"IsUseDocumentColors";
829 aValue.Value <<=
true;
830 aProps.push_back( aValue );
839 if (!rButton.get_active())
842 if (m_xPage1_NewDesign->get_active())
844 m_xPage1_NewDesign->set_active(
true);
845 m_xPage1_OldDesign->set_active(
false);
846 m_xPage1_Designs->set_sensitive(
false);
847 m_xPage1_DelDesign->set_sensitive(
false);
851 SetDesign(&aDefault);
855 m_xPage1_NewDesign->set_active(
false);
856 m_xPage1_Designs->set_sensitive(
true);
857 m_xPage1_DelDesign->set_sensitive(
true);
859 if (m_xPage1_Designs->get_selected_index() == -1)
860 m_xPage1_Designs->select(0);
862 const sal_Int32
nPos = m_xPage1_Designs->get_selected_index();
863 m_pDesign = &m_aDesignList[
nPos];
864 DBG_ASSERT(m_pDesign,
"No Design? That's not allowed (CL)");
867 SetDesign(m_pDesign);
874 const sal_Int32
nPos = m_xPage1_Designs->get_selected_index();
875 m_pDesign = &m_aDesignList[
nPos];
876 DBG_ASSERT(m_pDesign,
"No Design? That's not allowed (CL)");
879 SetDesign(m_pDesign);
887 const sal_Int32
nPos = m_xPage1_Designs->get_selected_index();
889 std::vector<SdPublishingDesign>::iterator iter = m_aDesignList.begin()+
nPos;
891 DBG_ASSERT(iter != m_aDesignList.end(),
"No Design? That's not allowed (CL)");
893 m_xPage1_Designs->remove(
nPos);
895 if(m_pDesign == &(*iter))
896 DesignHdl(*m_xPage1_NewDesign);
898 m_aDesignList.erase(iter);
900 m_bDesignListDirty =
true;
908 if (!rButton.get_active())
911 bool bASP = m_xPage2_ASP->get_active();
912 m_xPage2_ASP->set_sensitive( bASP );
913 m_xPage2_PERL->set_sensitive( !bASP );
920 if (!rButton.get_active())
923 m_xPage3_Png->set_sensitive(m_xPage3_Png->get_active());
924 m_xPage3_Gif->set_sensitive(m_xPage3_Gif->get_active());
925 m_xPage3_Jpg->set_sensitive(m_xPage3_Jpg->get_active());
926 m_xPage3_Quality->set_sensitive(m_xPage3_Jpg->get_active());
932 if (!rButton.get_active())
941 if(m_xPage2_Content->get_active())
943 if(!aAssistentFunc.IsEnabled(4))
945 aAssistentFunc.EnablePage(4);
951 if(aAssistentFunc.IsEnabled(4))
953 aAssistentFunc.DisablePage(4);
962 if (!rButton.get_active())
964 m_xPage3_Resolution_1->set_sensitive(m_xPage3_Resolution_1->get_active());
965 m_xPage3_Resolution_2->set_sensitive(m_xPage3_Resolution_2->get_active());
966 m_xPage3_Resolution_3->set_sensitive(m_xPage3_Resolution_3->get_active());
967 m_xPage3_Resolution_4->set_sensitive(m_xPage3_Resolution_4->get_active());
974 m_xPage5_TextOnly->set_active(
false);
982 if (&rButton == m_xPage6_Back.get())
988 else if (&rButton == m_xPage6_Text.get())
994 else if (&rButton == m_xPage6_Link.get())
1000 else if (&rButton == m_xPage6_VLink.get())
1006 else if (&rButton == m_xPage6_ALink.get())
1013 m_xPage6_User->set_active(
true);
1014 m_xPage6_Preview->SetColors( m_aBackColor, m_aTextColor, m_aLinkColor,
1015 m_aVLinkColor, m_aALinkColor );
1016 m_xPage6_Preview->Invalidate();
1021 if (!rButton.get_active())
1031 GetDesign(&aDesign);
1035 if(m_xPage1_OldDesign->get_active() && m_pDesign)
1038 if(!(aDesign == *m_pDesign))
1044 if(!(aDefaultDesign == aDesign))
1052 aName = m_pDesign->m_aDesignName;
1061 if (aDlg.run() ==
RET_OK)
1065 auto iter = std::find_if(m_aDesignList.begin(), m_aDesignList.end(),
1066 [&aDesign](
const SdPublishingDesign& rDesign) { return rDesign.m_aDesignName == aDesign.m_aDesignName; });
1068 if (iter != m_aDesignList.end())
1071 VclMessageType::Error, VclButtonsType::YesNo,
1072 SdResId(STR_PUBDLG_SAMENAME)));
1073 bRetry = xErrorBox->run() ==
RET_NO;
1076 m_aDesignList.erase(iter);
1081 m_aDesignList.push_back(aDesign);
1082 m_bDesignListDirty =
true;
1089 if(m_bDesignListDirty)
1235 const int nButtonCount = 8;
1248 std::vector< OUString > aButtonNames;
1250 aButtonNames.push_back( OUString::createFromAscii(
p ) );
1256 for(
int nSet = 0; nSet < nSetCount; ++nSet )
1258 if(
m_xButtonSet->getPreview( nSet, aButtonNames, aImage ) )
1273 aAssistentFunc.NextPage();
1425 aAssistentFunc.PreviousPage();
1435 aURL.Append(
u"designs.sod" );
1441 bool bOk = pIStm && ( pIStm->GetError() ==
ERRCODE_NONE);
1462 sal_uInt16 nDesigns(0);
1466 const size_t nMaxRecords = pStream->
remainingSize() /
sizeof(sal_uInt16);
1467 if (nDesigns > nMaxRecords)
1469 SAL_WARN(
"sd",
"Parsing error: " << nMaxRecords <<
1470 " max possible entries, but " << nDesigns <<
" claimed, truncating");
1471 nDesigns = nMaxRecords;
1474 for( sal_uInt16
nIndex = 0;
1479 *pStream >> aDesign;
1489 aURL.Append(
u"designs.sod" );
1501 SdIOCompat aIO(*pStream, StreamMode::WRITE, 0);
1503 sal_uInt16 nDesigns =
static_cast<sal_uInt16
>(
m_aDesignList.size());
1506 for( sal_uInt16
nIndex = 0;
1519SdDesignNameDlg::SdDesignNameDlg(
weld::Window* pWindow,
const OUString& rName)
1520 : GenericDialogController(pWindow,
"modules/sdraw/ui/namedesign.ui",
"NameDesignDialog")
1521 , m_xEdit(m_xBuilder->weld_entry(
"entry"))
1522 , m_xBtnOK(m_xBuilder->weld_button(
"ok"))
1524 m_xEdit->connect_changed(
LINK(
this, SdDesignNameDlg, ModifyHdl ));
1525 m_xEdit->set_text(rName);
1526 m_xBtnOK->set_sensitive(!rName.isEmpty());
1529OUString SdDesignNameDlg::GetDesignName()
const
1531 return m_xEdit->get_text();
1536 m_xBtnOK->set_sensitive(!m_xEdit->get_text().isEmpty());
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void EnablePage(int nPage)
int GetCurrentPage() const
bool InsertControl(int nDestPage, weld::Widget *pUsedControl)
adds a control to the specified page
bool GotoPage(const int nPageToGo)
void DisablePage(int nPage)
sal_Int32 ReadInt32(const OUString &rKey, sal_Int32 nDefault)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
Size GetSizePixel() const
PublishingScript m_eScript
PublishingFormat m_eFormat
friend SvStream & operator>>(SvStream &rIn, SdPublishingDesign &rDesign)
sal_uInt32 m_nSlideDuration
friend SvStream & WriteSdPublishingDesign(SvStream &rOut, const SdPublishingDesign &rDesign)
bool operator==(const SdPublishingDesign &rDesign) const
std::unique_ptr< weld::CheckButton > m_xPage2_Endless
std::unique_ptr< weld::CheckButton > m_xPage3_HiddenSlides
std::unique_ptr< weld::RadioButton > m_xPage2_ChgDefault
std::unique_ptr< weld::Container > m_xPage2Frame4
std::unique_ptr< weld::RadioButton > m_xPage2_PERL
SdPublishingDlg(weld::Window *pWindow, DocumentType eDocType)
std::unique_ptr< weld::ComboBox > m_xPage3_Quality
std::unique_ptr< weld::RadioButton > m_xPage2_ChgAuto
std::unique_ptr< weld::Label > m_xPage2_CGI_txt
std::unique_ptr< weld::Label > m_xPage2_Duration_txt
std::unique_ptr< weld::Label > m_xPage2_Title_Html
std::unique_ptr< weld::RadioButton > m_xPage3_Jpg
std::unique_ptr< weld::Button > m_xFinishButton
std::unique_ptr< weld::RadioButton > m_xPage3_Resolution_1
std::unique_ptr< weld::Label > m_xPage4_Email_txt
std::unique_ptr< weld::Label > m_xPage4_WWW_txt
std::unique_ptr< weld::Label > m_xPage1_Desc
std::unique_ptr< weld::Label > m_xPage4_Title1
std::unique_ptr< weld::CustomWeld > m_xPage5_ButtonsWnd
std::unique_ptr< weld::RadioButton > m_xPage1_OldDesign
std::unique_ptr< weld::Label > m_xPage1_Title
std::unique_ptr< weld::Container > m_xPage4
std::unique_ptr< weld::Entry > m_xPage4_Author
std::unique_ptr< weld::TimeFormatter > m_xFormatter
std::unique_ptr< weld::Button > m_xNextPageButton
std::unique_ptr< weld::Container > m_xPage1
std::unique_ptr< weld::TreeView > m_xPage1_Designs
std::unique_ptr< weld::Entry > m_xPage2_URL
std::unique_ptr< weld::Button > m_xPage6_Text
std::unique_ptr< weld::RadioButton > m_xPage2_WebCast
std::unique_ptr< weld::CheckButton > m_xPage4_Download
std::unique_ptr< weld::Button > m_xLastPageButton
std::unique_ptr< weld::CheckButton > m_xPage3_SldSound
std::unique_ptr< weld::RadioButton > m_xPage6_DocColors
std::unique_ptr< weld::FormattedSpinButton > m_xPage2_Duration
std::unique_ptr< weld::Container > m_xPage6
std::unique_ptr< weld::Entry > m_xPage2_CGI
std::unique_ptr< weld::Image > m_xPage2_WebCast_FB
std::unique_ptr< weld::RadioButton > m_xPage6_Default
std::unique_ptr< weld::Label > m_xPage4_Title2
std::unique_ptr< weld::Label > m_xPage3_Title3
std::unique_ptr< weld::Container > m_xPage3
std::unique_ptr< weld::Container > m_xPage2Frame3
void GetDesign(SdPublishingDesign *pDesign)
std::unique_ptr< weld::Container > m_xPage5
std::unique_ptr< weld::RadioButton > m_xPage1_NewDesign
std::unique_ptr< weld::RadioButton > m_xPage2_Kiosk
std::unique_ptr< weld::RadioButton > m_xPage3_Gif
std::unique_ptr< ValueSet > m_xPage5_Buttons
std::unique_ptr< weld::Label > m_xPage3_Quality_txt
std::unique_ptr< weld::Button > m_xPage6_ALink
std::unique_ptr< weld::RadioButton > m_xPage3_Png
std::unique_ptr< weld::TextView > m_xPage4_Misc
std::unique_ptr< weld::RadioButton > m_xPage2_SingleDocument
std::unique_ptr< weld::Container > m_xPage2
std::unique_ptr< weld::Entry > m_xPage4_Email
std::unique_ptr< weld::CheckButton > m_xPage5_TextOnly
std::unique_ptr< weld::Label > m_xPage5_Title
std::unique_ptr< weld::Label > m_xPage2_Index_txt
std::unique_ptr< weld::Label > m_xPage2_Title_Kiosk
std::unique_ptr< weld::CustomWeld > m_xPage6_PreviewWnd
std::unique_ptr< ButtonSet > m_xButtonSet
void GetParameterSequence(css::uno::Sequence< css::beans::PropertyValue > &rParams)
std::unique_ptr< weld::Label > m_xPage6_Title
std::unique_ptr< weld::RadioButton > m_xPage3_Resolution_4
std::unique_ptr< weld::RadioButton > m_xPage6_User
std::unique_ptr< weld::Label > m_xPage2_URL_txt
std::unique_ptr< weld::RadioButton > m_xPage3_Resolution_3
std::unique_ptr< weld::Container > m_xPage2Frame2
std::unique_ptr< weld::Entry > m_xPage4_WWW
std::unique_ptr< weld::CheckButton > m_xPage2_Notes
std::unique_ptr< weld::Image > m_xPage2_Frames_FB
std::unique_ptr< weld::Button > m_xPage1_DelDesign
std::unique_ptr< weld::Label > m_xPage2_Title_WebCast
std::unique_ptr< weld::RadioButton > m_xPage2_Frames
std::unique_ptr< weld::RadioButton > m_xPage2_ASP
std::unique_ptr< weld::Image > m_xPage2_Kiosk_FB
std::unique_ptr< weld::Label > m_xPage2_Title
virtual ~SdPublishingDlg() override
void SetDesign(SdPublishingDesign const *pDesign)
std::unique_ptr< weld::Entry > m_xPage2_Index
void LoadPreviewButtons()
loads the html buttons from the button sets, creates a preview and fills the itemset for page 5
std::unique_ptr< weld::RadioButton > m_xPage2_Standard
std::unique_ptr< SdHtmlAttrPreview > m_xPage6_Preview
std::unique_ptr< weld::RadioButton > m_xPage3_Resolution_2
std::unique_ptr< weld::Button > m_xPage6_Link
std::unique_ptr< weld::Button > m_xPage6_VLink
std::unique_ptr< weld::Image > m_xPage2_Standard_FB
std::vector< SdPublishingDesign > m_aDesignList
std::unique_ptr< weld::Label > m_xPage4_Author_txt
std::unique_ptr< weld::Button > m_xPage6_Back
std::unique_ptr< weld::Label > m_xPage3_Title2
std::unique_ptr< weld::Label > m_xPage3_Title1
std::unique_ptr< weld::CheckButton > m_xPage2_Content
void Close(bool bInDestruction=false)
SvStream * GetOutStream()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetColor() const
short Execute(weld::Window *pParent)
void SetColor(const Color &rColor)
SvStream & ReadCharAsBool(bool &rBool)
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & WriteBool(bool b)
SvStream & WriteInt16(sal_Int16 nInt16)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
OUString GetFirstName() const
OUString GetEmail() const
OUString GetLastName() const
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
std::shared_ptr< weld::Dialog > m_xDialog
std::unique_ptr< weld::Builder > m_xBuilder
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_ASSERT(sCon, aError)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE6
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE1
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE5
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE3
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE2
constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE4
const char *const pButtonNames[]
#define PUB_HIGHRES_WIDTH
@ PUBLISH_SINGLE_DOCUMENT
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr rtl::OUStringConstExpr aPageHelpIds[NOOFPAGES]
IMPL_LINK_NOARG(SdPublishingDlg, DesignSelectHdl, weld::TreeView &, void)
IMPL_LINK(SdPublishingDlg, DesignHdl, weld::Toggleable &, rButton, void)
static SvStream & operator>>(SvStream &rIn, SdPublishingDesign &rDesign)
constexpr OUStringLiteral KEY_QUALITY
static SvStream & WriteSdPublishingDesign(SvStream &rOut, const SdPublishingDesign &rDesign)
OUString SdResId(TranslateId aId)
OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
#define STR_HTMLEXP_DEFAULT_EXTENSION