summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-12-01 13:26:42 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2016-12-04 09:00:35 +0000
commit7afedc48aed8a31aa0f376e7e4505e48ddd3a99f (patch)
tree106aa3cbc8178c528564fce48ee430806f44f03a
parent755d4756b9b105c035986ffb184630e62a47a2ba (diff)
use proper message passing
Change-Id: Ibeb0aff07aec223f274932f2b3a492e58db09a02 Reviewed-on: https://gerrit.libreoffice.org/31488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r--sw/inc/frmfmt.hxx3
-rw-r--r--sw/source/core/draw/dcontact.cxx3
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
3 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 12df535e55bf..a0110c67a6d4 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -238,7 +238,8 @@ namespace sw
{
enum class DrawFrameFormatHintId {
DYING,
- PREPPASTING
+ PREPPASTING,
+ PAGE_OUT_OF_BOUNDS
};
struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint
{
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 06287d02b3f1..672cf984f6a8 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1539,6 +1539,9 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
case sw::DrawFrameFormatHintId::PREPPASTING:
MoveObjToVisibleLayer(GetMaster());
break;
+ case sw::DrawFrameFormatHintId::PAGE_OUT_OF_BOUNDS:
+ DisconnectFromLayout();
+ break;
default:
SAL_WARN("sw.core", "unhandled DrawFrameFormatHintId");
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index e39fc6ae0de4..9083b2ed5f1a 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -961,11 +961,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr )
if( sal_uInt16(nNewPage) > nMaxPage )
{
if ( RES_DRAWFRMFMT == pFormat->Which() )
- {
- SwContact *pCon = pFormat->FindContactObj();
- if( pCon )
- static_cast<SwDrawContact*>(pCon)->DisconnectFromLayout();
- }
+ pFormat->CallSwClientNotify(sw::DrawFrameFormatHint(sw::DrawFrameFormatHintId::PAGE_OUT_OF_BOUNDS));
else
pFormat->DelFrames();
bTmpAssert = true;