summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2009-12-07 14:11:32 +0100
committerThomas Lange [tl] <tl@openoffice.org>2009-12-07 14:11:32 +0100
commit8a75134b7668c04ee8b8bab2d49a84d3540a702a (patch)
treeb0b52bbdfb01b481ec770490d0aa01b8849671a4 /sw/source/core
parent0b7a663872f6377fced80cdd6368174f1f28eddb (diff)
#i104312# fixed print objetcs for pictures and graphics; nopw works for drawing objects as well and does not effect form controls
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx2
-rw-r--r--sw/source/core/inc/flyfrm.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx3
-rw-r--r--sw/source/core/inc/layfrm.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/tabfrm.hxx2
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx10
-rw-r--r--sw/source/core/layout/paintfrm.cxx22
-rw-r--r--sw/source/core/layout/unusedf.cxx2
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/view/vdraw.cxx8
-rwxr-xr-xsw/source/core/view/vprint.cxx16
15 files changed, 46 insertions, 33 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 9f464aac5424..4a8ecf7ff09a 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -269,7 +269,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect ) const
+void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
{
if ( Frm().IsEmpty() )
return;
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index c8bbc7be70c6..0825ccc2dfd7 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -51,7 +51,7 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
const SwTableBox *GetTabBox() const { return pTabBox; }
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index dc8975f3fd47..031b93e7ce21 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -161,7 +161,7 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 02c8040b83c3..1fe6e00af3e5 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -56,6 +56,7 @@ class SvxBrushItem;
class SwSelectionList;
struct SwPosition;
struct SwCrsrMoveState;
+class SwPrtOptions;
// --> OD 2004-07-06 #i28701#
class SwSortedObjs;
@@ -828,7 +829,7 @@ public:
SwCrsrMoveState* = 0 ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
// Wer den void* falsch Casted ist selbst schuld!
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 76262d18a894..e3ee5edf60c1 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -108,7 +108,7 @@ public:
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
const SwFrm *Lower() const { return pLower; }
SwFrm *Lower() { return pLower; }
const SwCntntFrm *ContainsCntnt() const;
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 81d63e733f9c..ff739b530758 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -59,7 +59,7 @@ public:
~SwNoTxtFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint(const SwRect& ) const;
+ virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index c04b30792b53..7e9b0eeb61d9 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -200,7 +200,7 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
#ifndef PRODUCT
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index b41ba4214aa0..bbd2931d7839 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -132,7 +132,7 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
virtual void Cut();
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index b0b2b807ab43..bdfdf3efde74 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -296,7 +296,7 @@ public:
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
- virtual void Paint( const SwRect & ) const;
+ virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index eba323bd52a2..026b293a827c 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -57,6 +57,7 @@ struct SdrPaintProcRec;
class SwAccessibleMap;
class SdrObject;
class Fraction;
+class SwPrtOptions;
// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
// OD 15.01.2003 #103492#
@@ -270,10 +271,11 @@ public:
// direction at the outliner of the draw view for painting layers <hell>
// and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
- void PaintLayer ( const SdrLayerID _nLayerID,
- const SwRect& _rRect,
- const Color* _pPageBackgrdColor = 0,
- const bool _bIsPageRightToLeft = false ) const;
+ void PaintLayer( const SdrLayerID _nLayerID,
+ const SwPrtOptions *pPrintData,
+ const SwRect& _rRect,
+ const Color* _pPageBackgrdColor = 0,
+ const bool _bIsPageRightToLeft = false ) const;
//wird als Link an die DrawEngine uebergeben, entscheidet was wie
//gepaintet wird oder nicht.
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 7dcbc4ef80a9..6181269b96b8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2740,7 +2740,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect ) const
+void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
@@ -2939,7 +2939,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const
// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), aPaintRect,
+ pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect,
&aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( pSh->GetOut() );
pLines->LockLines( FALSE );
@@ -2972,7 +2972,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const
{
/// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
- pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), aPaintRect,
+ pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), pPrintData, aPaintRect,
&aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
}
@@ -3190,7 +3190,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect ) const
+void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
ViewShell *pSh = GetShell();
@@ -3478,7 +3478,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect ) const
+void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3497,7 +3497,7 @@ void SwCellFrm::Paint( const SwRect& rRect ) const
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect ) const
+void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
@@ -3732,7 +3732,7 @@ void SwFlyFrm::Paint( const SwRect& rRect ) const
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect ) const
+void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
@@ -6438,10 +6438,10 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pSh->Imp()->PaintLayer( pIDDMA->GetHellId(),
+ pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), 0,
aRetouchePart, &aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
- pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(),
+ pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(), 0,
aRetouchePart, &aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
}
@@ -6691,14 +6691,14 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
// OD 30.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pImp->PaintLayer( pIDDMA->GetHellId(), aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor,
(pFlyPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( &aDev );
if ( pFly->IsFlyInCntFrm() )
pFly->Paint( aOut );
pLines->PaintLines( &aDev );
/// OD 30.08.2002 #102450# - add 3rd parameter
- pImp->PaintLayer( pIDDMA->GetHeavenId(), aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor,
(pFlyPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( &aDev );
DELETEZ( pLines );
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index e7d602ae5aba..5eb230f0b3ba 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -44,7 +44,7 @@ void SwFrm::Format( const SwBorderAttrs * )
ASSERT( FALSE, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &) const
+void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
{
ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 5a88599c6e35..1492f1167f38 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -600,7 +600,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
* SwTxtFrm::Paint()
*************************************************************************/
-void SwTxtFrm::Paint( const SwRect &rRect ) const
+void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
{
ResetRepaint();
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 7429eb5c444d..b58026e33a72 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -57,6 +57,7 @@
#include "viewimp.hxx"
#include "dflyobj.hxx"
#include "viewopt.hxx"
+#include "swprtopt.hxx"
#include "dcontact.hxx"
#include "dview.hxx"
#include "flyfrm.hxx"
@@ -184,6 +185,7 @@ void SwViewImp::UnlockPaint()
// outliner of the draw view for painting layers <hell> and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
+ const SwPrtOptions * _pPrintData,
const SwRect& ,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft ) const
@@ -230,6 +232,12 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
+ if (_pPrintData)
+ {
+ // hide drawings but not form controls (form controls are handled elsewhere)
+ SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
+ rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() );
+ }
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 715c74870f2f..ed23a7b251e6 100755
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -404,7 +404,7 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView ) :
// create a bool option for graphics
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
aLocalizedStrings.GetString( 5 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTablesGraphicsAndDiagrams" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
sal_True );
if (!bWeb)
{
@@ -611,9 +611,11 @@ bool SwPrintUIOptions::IsPrintTables() const
// take care of different property names for the option.
// for compatibility the old name should win
- bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
- bRes = getBoolValue( "PrintTables", bRes );
- return bRes;
+// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
+// bRes = getBoolValue( "PrintTables", bRes );
+// return bRes;
+ // for now it was decided that tables should always be printed
+ return true;
}
bool SwPrintUIOptions::IsPrintGraphics() const
@@ -621,7 +623,7 @@ bool SwPrintUIOptions::IsPrintGraphics() const
// take care of different property names for the option.
// for compatibility the old name should win
- bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
+ bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
bRes = getBoolValue( "PrintGraphics", bRes );
return bRes;
}
@@ -631,7 +633,7 @@ bool SwPrintUIOptions::IsPrintDrawings() const
// take care of different property names for the option.
// for compatibility the old name should win
- bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
+ bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
bRes = getBoolValue( "PrintDrawings", bRes );
return bRes;
}
@@ -1186,7 +1188,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
rPrintData.GetRenderData().m_pPostItShell : pShell;
::SetSwVisArea( pViewSh2, pStPage->Frm() );
- pStPage->GetUpper()->Paint( pStPage->Frm() );
+ pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
} //Zus. Scope wg. CurShell!