summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/impedit4.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-23 14:01:24 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-24 14:42:26 +0200
commit6217cfd414ee86b160313c0a71b7d62e1eb3db14 (patch)
tree1471e49de2c68a0cc4d0f42bfb37dc8bffb883bf /editeng/source/editeng/impedit4.cxx
parenta27d9845935149005342c74736a961068e6bf242 (diff)
Introduce OutputDevice type OUTDEV_PDF
Originally I thought mpPDFWriter can be used to create PDF from any OutputDevice, but it's actually just set for the internal VirtualDevice of the PDF writer. So this gets rid of all the special mpPDFWriter and GetPDFWriter() handling and replaces it with checks for OUTDEV_PDF. But since ImplPDFWriter used to be a OUTDEV_VIRDEV, this also introduces OutputDevice::IsVirtual(), which now replaces most of the direct OUTDEV_VIRDEV checks. Change-Id: I11824143b6b8833ecc81119762448cbdf1145dbc Reviewed-on: https://gerrit.libreoffice.org/62257 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'editeng/source/editeng/impedit4.cxx')
-rw-r--r--editeng/source/editeng/impedit4.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 64bc7443014e..4be47ec63d4a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1178,9 +1178,8 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
&& ( pPortionInfo->GetStretchX() == nStretchX )
&& ( pPortionInfo->GetStretchY() == nStretchY ) )
{
- if ( ( pPortionInfo->GetRefDevPtr() == GetRefDevice() ) ||
- ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
- ( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
+ if ( (pPortionInfo->GetRefDevPtr() == GetRefDevice()) ||
+ (pPortionInfo->RefDevIsVirtual() && GetRefDevice()->IsVirtual()) )
bUsePortionInfo = true;
}