sal_uIntPtr->VclPtr<OutputDevice> in XParaPortionList
who knows we had to hide a pointer behind an integer type, but it's been this way since forever Change-Id: I9738e1137752cc8226877e2cf0291967b45dbf0e Reviewed-on: https://gerrit.libreoffice.org/46480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -98,7 +98,7 @@ XParaPortionList::XParaPortionList(
|
|||||||
OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY) :
|
OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY) :
|
||||||
aRefMapMode(pRefDev->GetMapMode()), nStretchX(_nStretchX), nStretchY(_nStretchY)
|
aRefMapMode(pRefDev->GetMapMode()), nStretchX(_nStretchX), nStretchY(_nStretchY)
|
||||||
{
|
{
|
||||||
nRefDevPtr = reinterpret_cast<sal_uIntPtr>(pRefDev);
|
nRefDevPtr = pRefDev;
|
||||||
nPaperWidth = nPW;
|
nPaperWidth = nPW;
|
||||||
eRefDevType = pRefDev->GetOutDevType();
|
eRefDevType = pRefDev->GetOutDevType();
|
||||||
}
|
}
|
||||||
|
@@ -96,7 +96,7 @@ class XParaPortionList
|
|||||||
typedef std::vector<std::unique_ptr<XParaPortion> > ListType;
|
typedef std::vector<std::unique_ptr<XParaPortion> > ListType;
|
||||||
ListType maList;
|
ListType maList;
|
||||||
|
|
||||||
sal_uIntPtr nRefDevPtr;
|
VclPtr<OutputDevice> nRefDevPtr;
|
||||||
OutDevType eRefDevType;
|
OutDevType eRefDevType;
|
||||||
MapMode aRefMapMode;
|
MapMode aRefMapMode;
|
||||||
sal_uInt16 nStretchX;
|
sal_uInt16 nStretchX;
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
void push_back(XParaPortion* p);
|
void push_back(XParaPortion* p);
|
||||||
const XParaPortion& operator[](size_t i) const;
|
const XParaPortion& operator[](size_t i) const;
|
||||||
|
|
||||||
sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; }
|
OutputDevice* GetRefDevPtr() const { return nRefDevPtr; }
|
||||||
sal_uLong GetPaperWidth() const { return nPaperWidth; }
|
sal_uLong GetPaperWidth() const { return nPaperWidth; }
|
||||||
OutDevType GetRefDevType() const { return eRefDevType; }
|
OutDevType GetRefDevType() const { return eRefDevType; }
|
||||||
const MapMode& GetRefMapMode() const { return aRefMapMode; }
|
const MapMode& GetRefMapMode() const { return aRefMapMode; }
|
||||||
|
@@ -1186,7 +1186,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
|
|||||||
&& ( pPortionInfo->GetStretchX() == nStretchX )
|
&& ( pPortionInfo->GetStretchX() == nStretchX )
|
||||||
&& ( pPortionInfo->GetStretchY() == nStretchY ) )
|
&& ( pPortionInfo->GetStretchY() == nStretchY ) )
|
||||||
{
|
{
|
||||||
if ( ( pPortionInfo->GetRefDevPtr() == reinterpret_cast<sal_uIntPtr>(GetRefDevice()) ) ||
|
if ( ( pPortionInfo->GetRefDevPtr() == GetRefDevice() ) ||
|
||||||
( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
|
( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
|
||||||
( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
|
( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
|
||||||
bUsePortionInfo = true;
|
bUsePortionInfo = true;
|
||||||
|
Reference in New Issue
Block a user