diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-11-30 16:02:32 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-11-30 16:02:32 +0100 |
commit | 8e7be2d16b30830d547e7478e55fe0e32e149b7d (patch) | |
tree | c64c5d3903ef5ac9175555ac18ff405a0ab1b5b0 /svx/source/sdr | |
parent | #i115639# (diff) | |
parent | impress202: #i114750# fixed WordWrap also for report Wizard (diff) | |
download | core-8e7be2d16b30830d547e7478e55fe0e32e149b7d.tar.gz core-8e7be2d16b30830d547e7478e55fe0e32e149b7d.zip |
CWS-TOOLING: integrate CWS impress202
Diffstat (limited to 'svx/source/sdr')
-rw-r--r-- | svx/source/sdr/contact/objectcontactofobjlistpainter.cxx | 19 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofgraphic.cxx | 36 |
2 files changed, 40 insertions, 15 deletions
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index da8518d7f1a1..c6965fcd40fb 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -151,6 +151,25 @@ namespace sdr } } + // VirtualDevice? + bool ObjectContactOfObjListPainter::isOutputToVirtualDevice() const + { + return (OUTDEV_VIRDEV == mrTargetOutputDevice.GetOutDevType()); + } + + // recording MetaFile? + bool ObjectContactOfObjListPainter::isOutputToRecordingMetaFile() const + { + GDIMetaFile* pMetaFile = mrTargetOutputDevice.GetConnectMetaFile(); + return (pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause()); + } + + // pdf export? + bool ObjectContactOfObjListPainter::isOutputToPDFFile() const + { + return (0 != mrTargetOutputDevice.GetPDFWriter()); + } + OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const { return &mrTargetOutputDevice; diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx index cd2d9670bf7c..110186d41bf4 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx @@ -177,7 +177,7 @@ namespace sdr if(rGrafObj.IsLinkedGraphic()) { // update graphic link - rGrafObj.ImpUpdateGraphicLink(); + rGrafObj.ImpUpdateGraphicLink( sal_False ); } else { @@ -196,7 +196,7 @@ namespace sdr rGrafObj.mbInsidePaint = sal_True; rGrafObj.ForceSwapIn(); rGrafObj.mbInsidePaint = sal_False; - } + } bRetval = true; } @@ -252,19 +252,27 @@ namespace sdr // prepare primitive generation with evtl. loading the graphic when it's swapped out SdrGrafObj& rGrafObj = const_cast< ViewObjectContactOfGraphic* >(this)->getSdrGrafObj(); bool bDoAsynchronGraphicLoading(rGrafObj.GetModel() && rGrafObj.GetModel()->IsSwapGraphics()); - static bool bSuppressAsynchLoading(false); bool bSwapInDone(false); + bool bSwapInExclusive(false); - if(bDoAsynchronGraphicLoading - && rGrafObj.IsSwappedOut() - && rGrafObj.GetPage() - && rGrafObj.GetPage()->IsMasterPage()) + if( bDoAsynchronGraphicLoading && rGrafObj.IsSwappedOut() ) { - // #i102380# force Swap-In for GraphicObjects on MasterPage to have a nicer visualisation - bDoAsynchronGraphicLoading = false; + // sometimes it is needed that each graphic is completely available and swapped in + // for these cases a ForceSwapIn is called later at the graphic object + if ( rGrafObj.GetPage() && rGrafObj.GetPage()->IsMasterPage() ) + { + // #i102380# force Swap-In for GraphicObjects on MasterPage to have a nicer visualisation + bDoAsynchronGraphicLoading = false; + } + else if ( GetObjectContact().isOutputToPrinter() + || GetObjectContact().isOutputToRecordingMetaFile() + || GetObjectContact().isOutputToPDFFile() ) + { + bDoAsynchronGraphicLoading = false; + bSwapInExclusive = true; + } } - - if(bDoAsynchronGraphicLoading && !bSuppressAsynchLoading) + if( bDoAsynchronGraphicLoading ) { bSwapInDone = const_cast< ViewObjectContactOfGraphic* >(this)->impPrepareGraphicWithAsynchroniousLoading(); } @@ -293,10 +301,8 @@ namespace sdr } } - // if swap in was forced only for printing, swap out again - const bool bSwapInExclusiveForPrinting(bSwapInDone && GetObjectContact().isOutputToPrinter()); - - if(bSwapInExclusiveForPrinting) + // if swap in was forced only for printing metafile and pdf, swap out again + if( bSwapInDone && bSwapInExclusive ) { rGrafObj.ForceSwapOut(); } |