Kaydet (Commit) 29eac0e4 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#100313 OutputDevice::isDisposed doesn't work anymore

since

commit 51fe4d63
Author: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
Date:   Tue May 3 00:34:05 2016 +0300

    tdf#97527 vcl: reference-count Menu

    Change-Id: Ia12434fede69ad247ed67691517437a9ada31acd
Signed-off-by: 's avatarmelikeyurtoglu <aysemelikeyurtoglu@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/24596

which created a base-class VclReferenceBase for OutputDevice and
Menu and so moved isDisposed from OutputDevice to VclReferenceBase,
but *duplicated* the mbDisposed in VclReferenceBase so the
bit set by disposeOnce in OutputDevice was a different bit to the
bit returned by isDisposed from VclReferenceBase.

Which meant that the fix of...

commit 26c32cfe
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Fri Nov 27 16:10:10 2015 +0000

    Resolves: rhbz#1283426 using vdevs based on now dead physical devs is unsafe

no longer worked.

Finish moving the mbDisposed to VclReferenceBase to fix this

Change-Id: I9bc1ba3d03f3aae7c3f58eb277176d9521bdb05d
üst 7c983445
......@@ -418,7 +418,6 @@ private:
mutable bool mbTextSpecial : 1;
mutable bool mbRefPoint : 1;
mutable bool mbEnableRTL : 1;
mutable bool mbDisposed : 1;
/** @name Initialization and accessor functions
*/
......@@ -426,14 +425,9 @@ private:
protected:
OutputDevice();
public:
virtual ~OutputDevice();
protected:
virtual void dispose() override;
public:
void disposeOnce();
public:
/** Get the graphic context that the output device uses to draw on.
......
......@@ -137,28 +137,6 @@ OutputDevice::OutputDevice() :
// #i75163#
mpOutDevData->mpViewTransform = nullptr;
mpOutDevData->mpInverseViewTransform = nullptr;
mbDisposed = false;
}
OutputDevice::~OutputDevice()
{
disposeOnce();
}
void OutputDevice::disposeOnce()
{
if ( mbDisposed )
return;
mbDisposed = true;
// catch badness where our OutputDevice sub-class was not
// wrapped safely in a VclPtr cosily.
// FIXME: as/when we make our destructors all protected,
// we should introduce this assert:
// assert( mnRefCnt > 0 );
dispose();
}
void OutputDevice::dispose()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment