[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig filter/source include/filter
Caolán McNamara
caolanm at redhat.com
Sun Mar 4 20:48:39 UTC 2018
cui/source/options/optinet2.cxx | 27 ++++----
cui/source/options/optinet2.hxx | 2
cui/source/options/securityoptions.cxx | 96 +++++++++++++------------------
cui/source/options/securityoptions.hxx | 60 ++++++++++---------
cui/uiconfig/ui/securityoptionsdialog.ui | 26 +++++---
filter/source/msfilter/msdffimp.cxx | 9 ++
filter/source/msfilter/svdfppt.cxx | 19 ++++++
include/filter/msfilter/msdffimp.hxx | 2
include/filter/msfilter/svdfppt.hxx | 1
9 files changed, 134 insertions(+), 108 deletions(-)
New commits:
commit 8e9e26066333f287476a8ed7b354acceac9f2879
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Mar 4 17:05:19 2018 +0000
weld Security Options Dialog
Change-Id: I0975ce9e096283d060ba5486aedc0d6cb3086f9d
Reviewed-on: https://gerrit.libreoffice.org/50747
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 99ddbae652e8..0118938f53b5 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -559,7 +559,6 @@ IMPL_STATIC_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Control&, rControl, void )
SvxSecurityTabPage::SvxSecurityTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptSecurityPage", "cui/ui/optsecuritypage.ui", &rSet)
, mpSecOptions(new SvtSecurityOptions)
- , mpSecOptDlg(nullptr)
, mpCertPathDlg(nullptr)
{
get(m_pSecurityOptionsPB, "options");
@@ -611,7 +610,7 @@ void SvxSecurityTabPage::dispose()
delete mpSecOptions;
mpSecOptions = nullptr;
mpCertPathDlg.disposeAndClear();
- mpSecOptDlg.clear();
+ m_xSecOptDlg.reset();
m_pSecurityOptionsPB.clear();
m_pSavePasswordsCB.clear();
m_pShowConnectionsPB.clear();
@@ -630,9 +629,9 @@ void SvxSecurityTabPage::dispose()
IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl, Button*, void)
{
- if ( !mpSecOptDlg )
- mpSecOptDlg = VclPtr<svx::SecurityOptionsDialog>::Create( this, mpSecOptions );
- mpSecOptDlg->Execute();
+ if (!m_xSecOptDlg)
+ m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld(), mpSecOptions));
+ m_xSecOptDlg->run();
}
IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl, Button*, void)
@@ -898,16 +897,16 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
{
bool bModified = false;
- if ( mpSecOptDlg )
+ if (m_xSecOptDlg)
{
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, mpSecOptDlg->IsSaveOrSendDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSigning, mpSecOptDlg->IsSignDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnPrint, mpSecOptDlg->IsPrintDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, mpSecOptDlg->IsCreatePdfChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, mpSecOptDlg->IsRemovePersInfoChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, mpSecOptDlg->IsRecommPasswdChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, mpSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, mpSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, m_xSecOptDlg->IsSaveOrSendDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSigning, m_xSecOptDlg->IsSignDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnPrint, m_xSecOptDlg->IsPrintDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, m_xSecOptDlg->IsCreatePdfChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, m_xSecOptDlg->IsRemovePersInfoChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, m_xSecOptDlg->IsRecommPasswdChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, m_xSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
}
return bModified;
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 634975e91f6b..cd402a4513bd 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -127,7 +127,7 @@ private:
VclPtr<PushButton> m_pTSAURLsPB;
SvtSecurityOptions* mpSecOptions;
- VclPtr<svx::SecurityOptionsDialog> mpSecOptDlg;
+ std::unique_ptr<svx::SecurityOptionsDialog> m_xSecOptDlg;
VclPtr<CertPathDialog> mpCertPathDlg;
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index 8bf3c66d0a39..ab4b1dd3d5a7 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -18,74 +18,64 @@
*/
#include <unotools/securityoptions.hxx>
+#include <vcl/svapp.hxx>
#include <dialmgr.hxx>
#include "securityoptions.hxx"
namespace
{
- bool enableAndSet( const SvtSecurityOptions& rOptions,
- SvtSecurityOptions::EOption eOption,
- CheckBox& rCheckBox, FixedImage& rFixedImage )
+ bool enableAndSet(const SvtSecurityOptions& rOptions,
+ SvtSecurityOptions::EOption eOption,
+ weld::CheckButton& rCheckBox, weld::Widget& rFixedImage)
{
- bool bEnable = rOptions.IsOptionEnabled( eOption );
- rCheckBox.Enable( bEnable );
- rFixedImage.Show( !bEnable );
- rCheckBox.Check( rOptions.IsOptionSet( eOption ) );
+ bool bEnable = rOptions.IsOptionEnabled(eOption);
+ rCheckBox.set_sensitive(bEnable);
+ rFixedImage.show(!bEnable);
+ rCheckBox.set_active(rOptions.IsOptionSet(eOption));
return bEnable;
}
}
-
namespace svx
{
-
-SecurityOptionsDialog::SecurityOptionsDialog(vcl::Window* pParent, SvtSecurityOptions const * pOptions)
- : ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui")
+SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent, SvtSecurityOptions const * pOptions)
+ : m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/securityoptionsdialog.ui"))
+ , m_xDialog(m_xBuilder->weld_dialog("SecurityOptionsDialog"))
+ , m_xSaveOrSendDocsCB(m_xBuilder->weld_check_button("savesenddocs"))
+ , m_xSaveOrSendDocsImg(m_xBuilder->weld_widget("locksavesenddocs"))
+ , m_xSignDocsCB(m_xBuilder->weld_check_button("whensigning"))
+ , m_xSignDocsImg(m_xBuilder->weld_widget("lockwhensigning"))
+ , m_xPrintDocsCB(m_xBuilder->weld_check_button("whenprinting"))
+ , m_xPrintDocsImg(m_xBuilder->weld_widget("lockwhenprinting"))
+ , m_xCreatePdfCB(m_xBuilder->weld_check_button("whenpdf"))
+ , m_xCreatePdfImg(m_xBuilder->weld_widget("lockwhenpdf"))
+ , m_xRemovePersInfoCB(m_xBuilder->weld_check_button("removepersonal"))
+ , m_xRemovePersInfoImg(m_xBuilder->weld_widget("lockremovepersonal"))
+ , m_xRecommPasswdCB(m_xBuilder->weld_check_button("password"))
+ , m_xRecommPasswdImg(m_xBuilder->weld_widget("lockpassword"))
+ , m_xCtrlHyperlinkCB(m_xBuilder->weld_check_button("ctrlclick"))
+ , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick"))
+ , m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted"))
+ , m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted"))
{
DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
- get(m_pSaveOrSendDocsCB, "savesenddocs");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, *m_pSaveOrSendDocsCB,
- *get<FixedImage>("locksavesenddocs"));
- get(m_pSignDocsCB, "whensigning");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSigning, *m_pSignDocsCB,
- *get<FixedImage>("lockwhensigning"));
- get(m_pPrintDocsCB, "whenprinting");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnPrint, *m_pPrintDocsCB,
- *get<FixedImage>("lockwhenprinting"));
- get(m_pCreatePdfCB, "whenpdf");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, *m_pCreatePdfCB,
- *get<FixedImage>("lockwhenpdf"));
- get(m_pRemovePersInfoCB, "removepersonal");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, *m_pRemovePersInfoCB,
- *get<FixedImage>("lockremovepersonal"));
- get(m_pRecommPasswdCB, "password");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_pRecommPasswdCB,
- *get<FixedImage>("lockpassword"));
- get(m_pCtrlHyperlinkCB, "ctrlclick");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_pCtrlHyperlinkCB,
- *get<FixedImage>("lockctrlclick"));
- get(m_pBlockUntrustedRefererLinksCB, "blockuntrusted");
- enableAndSet(*pOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, *m_pBlockUntrustedRefererLinksCB,
- *get<FixedImage>("lockblockuntrusted"));
-}
-
-SecurityOptionsDialog::~SecurityOptionsDialog()
-{
- disposeOnce();
-}
-
-void SecurityOptionsDialog::dispose()
-{
- m_pSaveOrSendDocsCB.clear();
- m_pSignDocsCB.clear();
- m_pPrintDocsCB.clear();
- m_pCreatePdfCB.clear();
- m_pRemovePersInfoCB.clear();
- m_pRecommPasswdCB.clear();
- m_pCtrlHyperlinkCB.clear();
- m_pBlockUntrustedRefererLinksCB.clear();
- ModalDialog::dispose();
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, *m_xSaveOrSendDocsCB,
+ *m_xSaveOrSendDocsImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSigning, *m_xSignDocsCB,
+ *m_xSignDocsImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnPrint, *m_xPrintDocsCB,
+ *m_xPrintDocsImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, *m_xCreatePdfCB,
+ *m_xCreatePdfImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, *m_xRemovePersInfoCB,
+ *m_xRemovePersInfoImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_xRecommPasswdCB,
+ *m_xRecommPasswdImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_xCtrlHyperlinkCB,
+ *m_xCtrlHyperlinkImg);
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, *m_xBlockUntrustedRefererLinksCB,
+ *m_xBlockUntrustedRefererLinksImg);
}
}
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index 8665416f971b..f88e8164ca2e 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -19,49 +19,53 @@
#ifndef INCLUDED_CUI_SOURCE_OPTIONS_SECURITYOPTIONS_HXX
#define INCLUDED_CUI_SOURCE_OPTIONS_SECURITYOPTIONS_HXX
-#include <vcl/button.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
-
+#include <vcl/weld.hxx>
class SvtSecurityOptions;
-
namespace svx
{
- class SecurityOptionsDialog : public ModalDialog
+ class SecurityOptionsDialog
{
private:
- VclPtr<CheckBox> m_pSaveOrSendDocsCB;
- VclPtr<CheckBox> m_pSignDocsCB;
- VclPtr<CheckBox> m_pPrintDocsCB;
- VclPtr<CheckBox> m_pCreatePdfCB;
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Dialog> m_xDialog;
- VclPtr<CheckBox> m_pRemovePersInfoCB;
- VclPtr<CheckBox> m_pRecommPasswdCB;
- VclPtr<CheckBox> m_pCtrlHyperlinkCB;
- VclPtr<CheckBox> m_pBlockUntrustedRefererLinksCB;
+ std::unique_ptr<weld::CheckButton> m_xSaveOrSendDocsCB;
+ std::unique_ptr<weld::Widget> m_xSaveOrSendDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xSignDocsCB;
+ std::unique_ptr<weld::Widget> m_xSignDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xPrintDocsCB;
+ std::unique_ptr<weld::Widget> m_xPrintDocsImg;
+ std::unique_ptr<weld::CheckButton> m_xCreatePdfCB;
+ std::unique_ptr<weld::Widget> m_xCreatePdfImg;
- public:
- SecurityOptionsDialog( vcl::Window* pParent, SvtSecurityOptions const * pOptions );
- virtual ~SecurityOptionsDialog() override;
- virtual void dispose() override;
+ std::unique_ptr<weld::CheckButton> m_xRemovePersInfoCB;
+ std::unique_ptr<weld::Widget> m_xRemovePersInfoImg;
+ std::unique_ptr<weld::CheckButton> m_xRecommPasswdCB;
+ std::unique_ptr<weld::Widget> m_xRecommPasswdImg;
+ std::unique_ptr<weld::CheckButton> m_xCtrlHyperlinkCB;
+ std::unique_ptr<weld::Widget> m_xCtrlHyperlinkImg;
+ std::unique_ptr<weld::CheckButton> m_xBlockUntrustedRefererLinksCB;
+ std::unique_ptr<weld::Widget> m_xBlockUntrustedRefererLinksImg;
- bool IsSaveOrSendDocsChecked() const { return m_pSaveOrSendDocsCB->IsChecked(); }
- bool IsSignDocsChecked() const { return m_pSignDocsCB->IsChecked(); }
- bool IsPrintDocsChecked() const { return m_pPrintDocsCB->IsChecked(); }
- bool IsCreatePdfChecked() const { return m_pCreatePdfCB->IsChecked(); }
- bool IsRemovePersInfoChecked() const { return m_pRemovePersInfoCB->IsChecked(); }
- bool IsRecommPasswdChecked() const { return m_pRecommPasswdCB->IsChecked(); }
- bool IsCtrlHyperlinkChecked() const { return m_pCtrlHyperlinkCB->IsChecked(); }
- bool IsBlockUntrustedRefererLinksChecked() const { return m_pBlockUntrustedRefererLinksCB->IsChecked(); }
- };
+ public:
+ SecurityOptionsDialog(weld::Window* pParent, SvtSecurityOptions const * pOptions);
+ short run() { return m_xDialog->run(); }
+ bool IsSaveOrSendDocsChecked() const { return m_xSaveOrSendDocsCB->get_active(); }
+ bool IsSignDocsChecked() const { return m_xSignDocsCB->get_active(); }
+ bool IsPrintDocsChecked() const { return m_xPrintDocsCB->get_active(); }
+ bool IsCreatePdfChecked() const { return m_xCreatePdfCB->get_active(); }
+ bool IsRemovePersInfoChecked() const { return m_xRemovePersInfoCB->get_active(); }
+ bool IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); }
+ bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); }
+ bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); }
+ };
}
-
#endif // INCLUDED_CUI_SOURCE_OPTIONS_SECURITYOPTIONS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/securityoptionsdialog.ui b/cui/uiconfig/ui/securityoptionsdialog.ui
index 87642daf616a..2030a527d09a 100644
--- a/cui/uiconfig/ui/securityoptionsdialog.ui
+++ b/cui/uiconfig/ui/securityoptionsdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.2 -->
<interface domain="cui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="SecurityOptionsDialog">
@@ -7,6 +7,9 @@
<property name="border_width">6</property>
<property name="title" translatable="yes" context="securityoptionsdialog|SecurityOptionsDialog">Security Options and Warnings</property>
<property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -166,7 +169,7 @@
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -179,7 +182,7 @@
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -192,7 +195,7 @@
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -205,7 +208,7 @@
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -223,8 +226,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="securityoptionsdialog|label3">Warn if document contains recorded changes, versions, hidden information or notes:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -341,7 +344,7 @@
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -353,7 +356,7 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -365,7 +368,7 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -377,7 +380,7 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="pixbuf">res/lock.png</property>
+ <property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -419,5 +422,8 @@
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>
commit 135d7fe4bbff4183455d32005affcf89228faceb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Mar 4 16:39:15 2018 +0000
ofz#6723 Bad-cast
Change-Id: I5806e1bbc1a03984d411f222e8c01405bc767fc5
Reviewed-on: https://gerrit.libreoffice.org/50744
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 76f67d63f3b6..ec6311454449 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4116,7 +4116,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
insertShapeId(nShapeId, pTmp);
}
else
- SdrObject::Free(pTmp);
+ FreeObj(pClientData, pTmp);
}
}
else if ( aRecHd2.nRecType == DFF_msofbtSpContainer )
@@ -4135,7 +4135,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
insertShapeId(nShapeId, pTmp);
}
else
- SdrObject::Free(pTmp);
+ FreeObj(pClientData, pTmp);
}
}
if (!aRecHd2.SeekToEndOfRecord(rSt))
@@ -5035,6 +5035,11 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
}
}
+void SvxMSDffManager::FreeObj(void* /*pData*/, SdrObject* pObj)
+{
+ SdrObject::Free(pObj);
+}
+
SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
DffObjData& rObjData,
void* pData,
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 09bc2aacdbb7..92380143e9ab 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -715,6 +715,25 @@ sal_uLong DffPropSet::SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos)
return nEndRecPos;
}
+void SdrEscherImport::FreeObj(void* pData, SdrObject* pObj)
+{
+ ProcessData& rData = *static_cast<ProcessData*>(pData);
+ PptSlidePersistEntry& rPersistEntry = rData.rPersistEntry;
+ if (rPersistEntry.xSolverContainer)
+ {
+ for (auto & pPtr : rPersistEntry.xSolverContainer->aCList)
+ {
+ if (pPtr->pAObj == pObj)
+ pPtr->pAObj = nullptr;
+ if (pPtr->pBObj == pObj)
+ pPtr->pBObj = nullptr;
+ if (pPtr->pCObj == pObj)
+ pPtr->pCObj = nullptr;
+ }
+ }
+ SvxMSDffManager::FreeObj(pData, pObj);
+}
+
/* ProcessObject is called from ImplSdPPTImport::ProcessObj to handle all application specific things,
such as the import of text, animation effects, header footer and placeholder.
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 0b64394794ce..0600f7dbdfde 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -498,6 +498,8 @@ protected:
void* pData,
tools::Rectangle& rTextRect,
SdrObject* pObj);
+ virtual void FreeObj(void* pData, SdrObject* pObj);
+
/** Object finalization, used by the Excel filter to correctly
compute the object anchoring after nested objects have been imported.
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index a4b058b581fa..3c18ec37f607 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -483,6 +483,7 @@ public:
void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const;
virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, tools::Rectangle& rTextRect, SdrObject* pObj ) override;
+ virtual void FreeObj(void* pData, SdrObject* pObj) override;
virtual void ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) override;
void ImportHeaderFooterContainer( DffRecordHeader const & rHeader, HeaderFooterEntry& rEntry );
};
More information about the Libreoffice-commits
mailing list