diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 22:04:32 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 22:04:32 +0000 |
commit | 6cedad844884f7fe47e587b297b607cef727a0ef (patch) | |
tree | 753f97f45fd1eca487c6079dcc7df418ed52b179 /svx/source/sdr/contact/displayinfo.cxx | |
parent | 55b91120c9747161ec3eee904394485dabb01eab (diff) |
INTEGRATION: CWS aw033 (1.8.14); FILE MERGED
2008/06/03 13:41:11 aw 1.8.14.12: corrections
2008/05/27 14:49:57 aw 1.8.14.11: #i39532# changes DEV300 m12 resync corrections
2008/05/14 14:00:23 aw 1.8.14.10: RESYNC: (1.14-1.15); FILE MERGED
2008/04/16 05:30:44 aw 1.8.14.9: diverse optimisations and fixes for primitives. Support for LazyInvalidation.
2008/01/29 10:27:31 aw 1.8.14.8: updated refresh for ActionChanged(), diverse removals
2008/01/22 12:29:29 aw 1.8.14.7: adaptions and 1st stripping
2007/12/03 16:39:59 aw 1.8.14.6: RESYNC: (1.13-1.14); FILE MERGED
2007/08/13 15:34:32 aw 1.8.14.5: #i39532# changes after resync
2007/08/09 18:45:41 aw 1.8.14.4: RESYNC: (1.12-1.13); FILE MERGED
2006/11/28 19:24:04 aw 1.8.14.3: RESYNC: (1.10-1.12); FILE MERGED
2006/09/26 19:19:49 aw 1.8.14.2: RESYNC: (1.8-1.10); FILE MERGED
2006/05/12 12:46:21 aw 1.8.14.1: code changes for primitive support
Diffstat (limited to 'svx/source/sdr/contact/displayinfo.cxx')
-rw-r--r-- | svx/source/sdr/contact/displayinfo.cxx | 288 |
1 files changed, 41 insertions, 247 deletions
diff --git a/svx/source/sdr/contact/displayinfo.cxx b/svx/source/sdr/contact/displayinfo.cxx index 56a2b8aac496..572de245c71d 100644 --- a/svx/source/sdr/contact/displayinfo.cxx +++ b/svx/source/sdr/contact/displayinfo.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: displayinfo.cxx,v $ - * $Revision: 1.15 $ + * $Revision: 1.16 $ * * This file is part of OpenOffice.org. * @@ -36,6 +36,7 @@ #include <svx/svdobj.hxx> #include <vcl/gdimtf.hxx> #include <svx/svdpagv.hxx> +#include <svx/svdview.hxx> #define ALL_GHOSTED_DRAWMODES (DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT) @@ -45,85 +46,35 @@ namespace sdr { namespace contact { - // This uses Application::AnyInput() and may change mbContinuePaint - // to interrupt the paint - void DisplayInfo::CheckContinuePaint() - { - // #111111# - // INPUT_PAINT and INPUT_TIMER removed again since this leads to - // problems under Linux and Solaris when painting slow objects - // (e.g. bitmaps) - - // #114335# - // INPUT_OTHER removed too, leads to problems with added controls - // from the form layer. -#ifndef SOLARIS - if(Application::AnyInput(INPUT_KEYBOARD)) - { - mbContinuePaint = sal_False; - } -#endif - } - - DisplayInfo::DisplayInfo(SdrPageView* pPageView) - : mpPageView(pPageView), - mpProcessedPage(0L), - mpLastDisplayInfo(0L), - maProcessLayers(sal_True), // init layer info with all bits set to draw everything on default - mpOutputDevice(0L), - mpExtOutputDevice(0L), - mpPaintInfoRec(0L), - mpRootVOC(0L), - mbControlLayerPainting(sal_False), - mbPagePainting(sal_True), - mbGhostedDrawModeActive(sal_False), - mbBufferingAllowed(sal_True), - mbContinuePaint(sal_True), - mbMasterPagePainting(sal_False) + DisplayInfo::DisplayInfo() + : //mpProcessedPage(0), + maProcessLayers(true), // init layer info with all bits set to draw everything on default + maRedrawArea(), + mbControlLayerProcessingActive(false), + mbPageProcessingActive(true), + mbGhostedDrawModeActive(false), + mbSubContentActive(false) { } DisplayInfo::~DisplayInfo() { - SetProcessedPage( 0L ); + //SetProcessedPage(0); } // access to ProcessedPage, write for internal use only. - void DisplayInfo::SetProcessedPage(SdrPage* pNew) - { - if(pNew != mpProcessedPage) - { - mpProcessedPage = pNew; - - if(mpPageView) - { - if( pNew == NULL ) - { - // DisplayInfo needs to be reset at PageView if set since DisplayInfo is no longer valid - if(mpPageView && mpPageView->GetCurrentPaintingDisplayInfo()) - { - DBG_ASSERT( mpPageView->GetCurrentPaintingDisplayInfo() == this, "DisplayInfo::~DisplayInfo() : stack error!" ); - - // restore remembered DisplayInfo to build a stack, or delete - mpPageView->SetCurrentPaintingDisplayInfo(mpLastDisplayInfo); - } - } - else - { - // rescue current - mpLastDisplayInfo = mpPageView->GetCurrentPaintingDisplayInfo(); - - // set at PageView when a page is set - mpPageView->SetCurrentPaintingDisplayInfo(this); - } - } - } - } - - const SdrPage* DisplayInfo::GetProcessedPage() const - { - return mpProcessedPage; - } + //void DisplayInfo::SetProcessedPage(SdrPage* pNew) + //{ + // if(pNew != mpProcessedPage) + // { + // mpProcessedPage = pNew; + // } + //} + + //const SdrPage* DisplayInfo::GetProcessedPage() const + //{ + // return mpProcessedPage; + //} // Access to LayerInfos (which layers to proccess) void DisplayInfo::SetProcessLayers(const SetOfByte& rSet) @@ -136,48 +87,6 @@ namespace sdr return maProcessLayers; } - // access to ExtendedOutputDevice - void DisplayInfo::SetExtendedOutputDevice(XOutputDevice* pExtOut) - { - if(mpExtOutputDevice != pExtOut) - { - mpExtOutputDevice = pExtOut; - } - } - - XOutputDevice* DisplayInfo::GetExtendedOutputDevice() const - { - return mpExtOutputDevice; - } - - // access to PaintInfoRec - void DisplayInfo::SetPaintInfoRec(SdrPaintInfoRec* pInfoRec) - { - if(mpPaintInfoRec != pInfoRec) - { - mpPaintInfoRec = pInfoRec; - } - } - - SdrPaintInfoRec* DisplayInfo::GetPaintInfoRec() const - { - return mpPaintInfoRec; - } - - // access to OutputDevice - void DisplayInfo::SetOutputDevice(OutputDevice* pOutDev) - { - if(mpOutputDevice != pOutDev) - { - mpOutputDevice = pOutDev; - } - } - - OutputDevice* DisplayInfo::GetOutputDevice() const - { - return mpOutputDevice; - } - // access to RedrawArea void DisplayInfo::SetRedrawArea(const Region& rRegion) { @@ -189,172 +98,57 @@ namespace sdr return maRedrawArea; } - // Is OutDev a printer? - sal_Bool DisplayInfo::OutputToPrinter() const - { - if(mpOutputDevice && OUTDEV_PRINTER == mpOutputDevice->GetOutDevType()) - { - return sal_True; - } - - return sal_False; - } - - // Is OutDev a window? - sal_Bool DisplayInfo::OutputToWindow() const - { - if(mpOutputDevice && OUTDEV_WINDOW == mpOutputDevice->GetOutDevType()) - { - return sal_True; - } - - return sal_False; - } - - // Is OutDev a VirtualDevice? - sal_Bool DisplayInfo::OutputToVirtualDevice() const + void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess) { - if(mpOutputDevice && OUTDEV_VIRDEV == mpOutputDevice->GetOutDevType()) + if((bool)mbControlLayerProcessingActive != bDoProcess) { - return sal_True; + mbControlLayerProcessingActive = bDoProcess; } - - return sal_False; - } - - // Is OutDev a recording MetaFile? - sal_Bool DisplayInfo::OutputToRecordingMetaFile() const - { - if(mpOutputDevice) - { - GDIMetaFile* pMetaFile = mpOutputDevice->GetConnectMetaFile(); - - if(pMetaFile) - { - sal_Bool bRecording = pMetaFile->IsRecord() && !pMetaFile->IsPause(); - return bRecording; - } - } - - return sal_False; - } - - void DisplayInfo::SetControlLayerPainting(sal_Bool bDoPaint) - { - if(mbControlLayerPainting != bDoPaint) - { - mbControlLayerPainting = bDoPaint; - } - } - - sal_Bool DisplayInfo::GetControlLayerPainting() const - { - return mbControlLayerPainting; - } - - void DisplayInfo::SetPagePainting(sal_Bool bDoPaint) - { - if(mbPagePainting != bDoPaint) - { - mbPagePainting = bDoPaint; - } - } - - sal_Bool DisplayInfo::GetPagePainting() const - { - return mbPagePainting; } - // Access to svtools::ColorConfig - const svtools::ColorConfig& DisplayInfo::GetColorConfig() const + bool DisplayInfo::GetControlLayerProcessingActive() const { - return maColorConfig; + return mbControlLayerProcessingActive; } - sal_uInt32 DisplayInfo::GetOriginalDrawMode() const + void DisplayInfo::SetPageProcessingActive(bool bDoProcess) { - // return DrawMode without ghosted stuff - if(mpOutputDevice) + if((bool)mbPageProcessingActive != bDoProcess) { - return (mpOutputDevice->GetDrawMode() & ~ALL_GHOSTED_DRAWMODES); + mbPageProcessingActive = bDoProcess; } - - return 0L; } - sal_uInt32 DisplayInfo::GetCurrentDrawMode() const + bool DisplayInfo::GetPageProcessingActive() const { - if(mpOutputDevice) - { - return mpOutputDevice->GetDrawMode(); - } - - return 0L; + return mbPageProcessingActive; } void DisplayInfo::ClearGhostedDrawMode() { - if(mpOutputDevice) - { - mpOutputDevice->SetDrawMode(mpOutputDevice->GetDrawMode() & ~ALL_GHOSTED_DRAWMODES); - } - - mbGhostedDrawModeActive = sal_False; + mbGhostedDrawModeActive = false; } void DisplayInfo::SetGhostedDrawMode() { - if(mpOutputDevice) - { - mpOutputDevice->SetDrawMode(mpOutputDevice->GetDrawMode() | ALL_GHOSTED_DRAWMODES); - } - - mbGhostedDrawModeActive = sal_True; + mbGhostedDrawModeActive = true; } - sal_Bool DisplayInfo::IsGhostedDrawModeActive() const + bool DisplayInfo::IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; } - // access to buffering allowed flag - void DisplayInfo::SetBufferingAllowed(sal_Bool bNew) - { - if(mbBufferingAllowed != bNew) - { - mbBufferingAllowed = bNew; - } - } - - sal_Bool DisplayInfo::IsBufferingAllowed() const - { - return mbBufferingAllowed; - } - - // Check if painting should be continued. If not, return from paint - // as soon as possible. - sal_Bool DisplayInfo::DoContinuePaint() - { - if(mbContinuePaint - && mpOutputDevice - && OUTDEV_WINDOW == mpOutputDevice->GetOutDevType()) - { - CheckContinuePaint(); - } - - return mbContinuePaint; - } - - sal_Bool DisplayInfo::GetMasterPagePainting() const + bool DisplayInfo::GetSubContentActive() const { - return mbMasterPagePainting; + return mbSubContentActive; } - void DisplayInfo::SetMasterPagePainting(sal_Bool bNew) + void DisplayInfo::SetSubContentActive(bool bNew) { - if(mbMasterPagePainting != bNew) + if((bool)mbSubContentActive != bNew) { - mbMasterPagePainting = bNew; + mbSubContentActive = bNew; } } } // end of namespace contact |