offapi/com/sun/star/text/PrintSettings.idl | 2 officecfg/registry/schema/org/openoffice/Office/Writer.xcs | 8 -- sw/inc/printdata.hxx | 7 - sw/source/core/doc/notxtfrm.cxx | 2 sw/source/core/inc/cellfrm.hxx | 3 sw/source/core/inc/flyfrm.hxx | 3 sw/source/core/inc/frame.hxx | 3 sw/source/core/inc/layfrm.hxx | 3 sw/source/core/inc/notxtfrm.hxx | 3 sw/source/core/inc/rootfrm.hxx | 3 sw/source/core/inc/tabfrm.hxx | 3 sw/source/core/inc/txtfrm.hxx | 3 sw/source/core/inc/viewimp.hxx | 1 sw/source/core/layout/paintfrm.cxx | 20 ++--- sw/source/core/layout/unusedf.cxx | 2 sw/source/core/text/frmpaint.cxx | 2 sw/source/core/view/printdata.cxx | 13 --- sw/source/core/view/vdraw.cxx | 7 - sw/source/core/view/vprint.cxx | 4 - sw/source/filter/xml/xmlimp.cxx | 1 sw/source/ui/config/optpage.cxx | 3 sw/source/uibase/config/prtopt.cxx | 46 ++++--------- sw/source/uibase/uno/unomod.cxx | 4 - sw/source/uibase/uno/unotxdoc.cxx | 1 test/source/text/textprintersettings.cxx | 1 25 files changed, 45 insertions(+), 103 deletions(-)
New commits: commit 6cdf523f179f3e7ed94267502a5fe3d1247398cc Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Thu Dec 14 12:36:46 2023 +0100 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Dec 18 09:35:29 2023 +0100 [API CHANGE] tdf#158041 Remove unused drawing printing option from sw Change-Id: I95f81f166ab9d75622c83672101925894b2f2e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160774 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> diff --git a/offapi/com/sun/star/text/PrintSettings.idl b/offapi/com/sun/star/text/PrintSettings.idl index 4050d82877a2..f43fc899f299 100644 --- a/offapi/com/sun/star/text/PrintSettings.idl +++ b/offapi/com/sun/star/text/PrintSettings.idl @@ -38,6 +38,8 @@ published service PrintSettings [property] boolean PrintTables; /** determines if shapes are printed. + * + * @deprecated since 24.8. Use PrintGraphics instead. */ [property] boolean PrintDrawings; diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index eeb00060c54d..b6a26e4bf11f 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -1728,14 +1728,6 @@ </info> <value>true</value> </prop> - <prop oor:name="Drawing" oor:type="xs:boolean" oor:nillable="false"> - <!-- UIHints: Tools - Options - Text document - Print - [Section] Contents --> - <info> - <desc>Specifies whether drawings are printed.</desc> - <label>Drawings</label> - </info> - <value>true</value> - </prop> <prop oor:name="Control" oor:type="xs:boolean" oor:nillable="false"> <!-- UIHints: Tools - Options - Text document - Print - [Section] Contents --> <info> diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index b6be2951f611..7dcdbdbb964a 100644 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -55,7 +55,7 @@ class SwPrintData public: - bool m_bPrintGraphic, m_bPrintDraw, m_bPrintControl, m_bPrintPageBackground, + bool m_bPrintGraphic, m_bPrintControl, m_bPrintPageBackground, m_bPrintBlackFont, //#i81434# - printing of hidden text m_bPrintHiddenText, m_bPrintTextPlaceholder, @@ -73,7 +73,6 @@ public: m_pRenderData = nullptr; m_bPrintGraphic = - m_bPrintDraw = m_bPrintControl = m_bPrintLeftPages = m_bPrintRightPages = @@ -102,7 +101,6 @@ public: { return m_bPrintGraphic == rData.m_bPrintGraphic && - m_bPrintDraw == rData.m_bPrintDraw && m_bPrintControl == rData.m_bPrintControl && m_bPrintPageBackground== rData.m_bPrintPageBackground && m_bPrintBlackFont == rData.m_bPrintBlackFont && @@ -125,7 +123,6 @@ public: void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; } bool IsPrintGraphic() const { return m_bPrintGraphic; } - bool IsPrintDraw() const { return m_bPrintDraw; } bool IsPrintControl() const { return m_bPrintControl; } bool IsPrintLeftPage() const { return m_bPrintLeftPages; } bool IsPrintRightPage() const { return m_bPrintRightPages; } @@ -142,7 +139,6 @@ public: bool IsPrintTextPlaceholder() const { return m_bPrintTextPlaceholder; } void SetPrintGraphic( bool b ) { doSetModified(); m_bPrintGraphic = b; } - void SetPrintDraw( bool b ) { doSetModified(); m_bPrintDraw = b; } void SetPrintControl( bool b ) { doSetModified(); m_bPrintControl = b; } void SetPrintLeftPage( bool b ) { doSetModified(); m_bPrintLeftPages = b; } void SetPrintRightPage( bool b ) { doSetModified(); m_bPrintRightPages = b; } @@ -186,7 +182,6 @@ public: bool IsPrintRightPages() const; bool IsPrintEmptyPages( bool bIsPDFExport ) const; bool IsPrintGraphics() const; - bool IsPrintDrawings() const; }; /** A class that stores temporary data that is needed for rendering the document. diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 14cb5680309b..b97ae500a021 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -211,7 +211,7 @@ static void lcl_ClearArea( const SwFrame &rFrame, } } -void SwNoTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwNoTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { if ( getFrameArea().IsEmpty() ) return; diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 796cb1d3dfb3..f2be099e381f 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -42,8 +42,7 @@ public: SwCellFrame( const SwTableBox &, SwFrame*, bool bInsertContent ); virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual void CheckDirection( bool bVert ) override; // #i103961# diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index d1f14591bc2f..017c5c857aef 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -170,8 +170,7 @@ protected: public: // #i26791# - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual Size ChgSize( const Size& aNewSize ) override; virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 1c5aa331f927..ebfe4a0f2bb4 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -847,8 +847,7 @@ public: SwCursorMoveState* = nullptr, bool bTestBackground = false ) const; virtual bool GetCharRect( SwRect &, const SwPosition&, SwCursorMoveState* = nullptr, bool bAllowFarAway = true ) const; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const; // HACK: shortcut between frame and formatting // It's your own fault if you cast void* incorrectly! In any case check diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 981fbb34f649..4774257d3a63 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -96,8 +96,7 @@ public: SwLayoutFrame( SwFrameFormat*, SwFrame* ); - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; const SwFrame *Lower() const { return m_pLower; } SwFrame *Lower() { return m_pLower; } bool ContainsDeleteForbiddenLayFrame() const; diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 50612e396ab5..a7648b6ba5cb 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -82,8 +82,7 @@ public: virtual bool LeftMargin(SwPaM *) const override; virtual bool RightMargin(SwPaM *, bool bAPI = false) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual bool GetCharRect( SwRect &, const SwPosition&, SwCursorMoveState* = nullptr, bool bAllowFarAway = true ) const override; virtual bool GetModelPositionForViewPoint(SwPosition* pPos, Point& aPoint, diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 90d18fcf0ee4..5938bcfc7a4d 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -240,8 +240,7 @@ public: virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; #ifdef DBG_UTIL diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 08020de73489..80bbcd2b3d2f 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -144,8 +144,7 @@ public: inline SwTabFrame *GetFollow(); SwTabFrame* FindMaster( bool bFirstMaster = false ) const; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual void CheckDirection( bool bVert ) override; virtual void Cut() override; diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index aa2246727fc2..4b06ba0164c1 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -419,8 +419,7 @@ public: void PaintExtraData( const SwRect & rRect ) const; /// Page number etc. SwRect GetPaintSwRect(); - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; /** * Layout oriented cursor travelling: diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 4b249154c2f8..4c659f349262 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -176,7 +176,6 @@ public: * the draw view for painting layers "hell" and "heaven" */ void PaintLayer( const SdrLayerID _nLayerID, - SwPrintData const*const pPrintData, SwPageFrame const& rPageFrame, const SwRect& _rRect, const Color* _pPageBackgrdColor, diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 84eb066ee5ae..6bf137b19740 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3269,7 +3269,7 @@ namespace * 3. Paint the document content (text) * 4. Paint the draw layer that is above the document |*/ -void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const +void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "Lower of root is no page." ); @@ -3478,7 +3478,6 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& gProp.pSLines->LockLines( true ); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), - pPrintData, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), @@ -3526,7 +3525,6 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( pSh->Imp()->HasDrawView() ) { pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(), - pPrintData, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), @@ -3700,7 +3698,7 @@ SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect ) } } -void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { // #i16816# tagged pdf support Frame_Info aFrameInfo(*this, false); @@ -4223,7 +4221,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) return bPaint; } -void SwCellFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwCellFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { if ( GetLayoutRowSpan() >= 1 ) SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); @@ -4262,7 +4260,7 @@ void SwFrame::SetDrawObjsAsDeleted( bool bDeleted ) } } -void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { //optimize thumbnail generation and store procedure to improve odt saving performance, #i120030# SwViewShell *pShell = getRootFrame()->GetCurrShell(); @@ -4639,7 +4637,7 @@ void SwTextFrame::PaintOutlineContentVisibilityButton() const UpdateOutlineContentVisibilityButton(pWrtSh); } -void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) @@ -7767,11 +7765,11 @@ void SwFrame::Retouch( const SwPageFrame * pPage, const SwRect &rRect ) const SwViewObjectContactRedirector aSwRedirector( *pSh ); // <-- - pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), nullptr, + pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), *pPage, rRetouche, &aPageBackgrdColor, pPage->IsRightToLeft(), &aSwRedirector ); - pSh->Imp()->PaintLayer( rIDDMA.GetHeavenId(), nullptr, + pSh->Imp()->PaintLayer( rIDDMA.GetHeavenId(), *pPage, rRetouche, &aPageBackgrdColor, pPage->IsRightToLeft(), &aSwRedirector ); @@ -8086,7 +8084,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap, const sal_uInt32 /*nMaxim // --> OD #i76669# SwViewObjectContactRedirector aSwRedirector( *pSh ); // <-- - pImp->PaintLayer( rIDDMA.GetHellId(), nullptr, + pImp->PaintLayer( rIDDMA.GetHellId(), *pFlyPage, aOut, &aPageBackgrdColor, pFlyPage->IsRightToLeft(), &aSwRedirector ); @@ -8094,7 +8092,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap, const sal_uInt32 /*nMaxim if ( pFly->IsFlyInContentFrame() ) pFly->PaintSwFrame( *pDev, aOut ); gProp.pSLines->PaintLines( pDev, gProp ); - pImp->PaintLayer( rIDDMA.GetHeavenId(), nullptr, + pImp->PaintLayer( rIDDMA.GetHeavenId(), *pFlyPage, aOut, &aPageBackgrdColor, pFlyPage->IsRightToLeft(), &aSwRedirector ); diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index 25de7617c11d..e26e3a923ab0 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -27,7 +27,7 @@ void SwFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttr OSL_FAIL( "Format() of the base class called." ); } -void SwFrame::PaintSwFrame(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const +void SwFrame::PaintSwFrame(vcl::RenderContext&, SwRect const&) const { OSL_FAIL( "PaintSwFrame() of the base class called." ); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 57458a021817..d6d47f7ae637 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -642,7 +642,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const return false; } -void SwTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const +void SwTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect) const { ResetRepaint(); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 2dcbe0cdc44c..039a591163ce 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -129,7 +129,6 @@ void SwRenderData::MakeSwPrtOptions( // get print options to use from provided properties rOptions.m_bPrintGraphic = pOpt->IsPrintGraphics(); - rOptions.m_bPrintDraw = pOpt->IsPrintDrawings(); rOptions.m_bPrintControl = pOpt->IsPrintFormControls(); rOptions.m_bPrintLeftPages = pOpt->IsPrintLeftPages(); rOptions.m_bPrintRightPages = pOpt->IsPrintRightPages(); @@ -199,7 +198,7 @@ SwPrintUIOptions::SwPrintUIOptions( bDefaultVal); // create a bool option for pictures/graphics AND OLE and drawing objects as well - bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); + bDefaultVal = rDefaultPrintData.IsPrintGraphic(); m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SwResId( STR_PRINTOPTUI_PICTURES), ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox", "PrintPicturesAndObjects", @@ -410,16 +409,6 @@ bool SwPrintUIOptions::IsPrintGraphics() const return bRes; } -bool SwPrintUIOptions::IsPrintDrawings() const -{ - // take care of different property names for the option. - // for compatibility the old name should win (may still be used for PDF export or via Uno API) - - bool bRes = getBoolValue( "PrintPicturesAndObjects", true ); - bRes = getBoolValue( "PrintDrawings", bRes ); - return bRes; -} - bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp ) { bool bChanged = processProperties( i_rNewProp ); diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index 5a95053cd7b9..16ee86a99335 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -86,7 +86,6 @@ void SwViewShellImp::UnlockPaint() } void SwViewShellImp::PaintLayer( const SdrLayerID _nLayerID, - SwPrintData const*const pPrintData, SwPageFrame const& rPageFrame, const SwRect& aPaintRect, const Color* _pPageBackgrdColor, @@ -136,12 +135,6 @@ void SwViewShellImp::PaintLayer( const SdrLayerID _nLayerID, } pOutDev->Push( vcl::PushFlags::LINECOLOR ); - if (pPrintData) - { - // hide drawings but not form controls (form controls are handled elsewhere) - SdrView &rSdrView = GetPageView()->GetView(); - rSdrView.setHideDraw( !pPrintData->IsPrintDraw() ); - } basegfx::B2IRectangle const pageFrame = vcl::unotools::b2IRectangleFromRectangle(rPageFrame.getFrameArea().SVRect()); GetPageView()->DrawLayer(_nLayerID, pOutDev, pRedirector, aPaintRect.SVRect(), &pageFrame); pOutDev->Pop(); diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index f97a39ee3861..008e2e1ce1bc 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -512,7 +512,7 @@ bool SwViewShell::PrintOrPDFExport( ::SetSwVisArea( pViewSh2, pStPage->getFrameArea() ); - pStPage->GetUpper()->PaintSwFrame( *pOutDev, pStPage->getFrameArea(), &rPrintData ); + pStPage->GetUpper()->PaintSwFrame( *pOutDev, pStPage->getFrameArea() ); SwPaintQueue::Repaint(); @@ -651,7 +651,7 @@ SwDrawViewSave::~SwDrawViewSave() void SwViewShell::PrepareForPrint( const SwPrintData &rOptions, bool bIsPDFExport ) { mpOpt->SetGraphic ( rOptions.m_bPrintGraphic ); - mpOpt->SetDraw ( rOptions.m_bPrintDraw ); + mpOpt->SetDraw ( rOptions.m_bPrintGraphic ); mpOpt->SetControl ( rOptions.m_bPrintControl ); mpOpt->SetPageBack ( rOptions.m_bPrintPageBackground ); // Font should not be black if it's a PDF Export diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 0fcef5daddac..05b22f6e28ec 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1248,7 +1248,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC "PrintAnnotationMode", "PrintBlackFonts", "PrintControls", - "PrintDrawings", "PrintGraphics", "PrintHiddenText", "PrintLeftPages", diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 9a63d3f44358..ea2b147da219 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -541,7 +541,6 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet ) { SwAddPrinterItem aAddPrinterAttr; aAddPrinterAttr.m_bPrintGraphic = m_xGrfCB->get_active(); - aAddPrinterAttr.m_bPrintDraw = m_xGrfCB->get_active(); // UI merged with m_xGrfCB in CWS printerpullgpages aAddPrinterAttr.m_bPrintControl = m_xCtrlFieldCB->get_active(); aAddPrinterAttr.m_bPrintPageBackground = m_xBackgroundCB->get_active(); aAddPrinterAttr.m_bPrintBlackFont = m_xBlackFontCB->get_active(); @@ -583,7 +582,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet* ) { bReadOnly = !m_bHTMLMode ? officecfg::Office::Writer::Print::Content::Graphic::isReadOnly() : officecfg::Office::WriterWeb::Print::Content::Graphic::isReadOnly(); - m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic || pAddPrinterAttr->m_bPrintDraw); + m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic); m_xGrfCB->set_sensitive(!bReadOnly); m_xGrfImg->set_visible(bReadOnly); diff --git a/sw/source/uibase/config/prtopt.cxx b/sw/source/uibase/config/prtopt.cxx index 6fb4e6890e2d..da0667ffcb57 100644 --- a/sw/source/uibase/config/prtopt.cxx +++ b/sw/source/uibase/config/prtopt.cxx @@ -41,14 +41,13 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames() const "Page/BrochureRightToLeft", // 7 "Output/Fax", // 8 "Papertray/FromPrinterSetup", // 9 - "Content/Drawing", // 10 not in SW/Web - "Page/LeftPage", // 11 not in SW/Web - "Page/RightPage", // 12 not in SW/Web - "EmptyPages", // 13 not in SW/Web - "Content/PrintPlaceholders", // 14 not in Sw/Web - "Content/PrintHiddenText" // 15 not in Sw/Web + "Page/LeftPage", // 10 not in SW/Web + "Page/RightPage", // 11 not in SW/Web + "EmptyPages", // 12 not in SW/Web + "Content/PrintPlaceholders", // 13 not in Sw/Web + "Content/PrintHiddenText" // 14 not in Sw/Web }; - const int nCount = m_bIsWeb ? 10 : 16; + const int nCount = m_bIsWeb ? 10 : 15; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -97,22 +96,15 @@ SwPrintOptions::SwPrintOptions(bool bWeb) : case 7: m_bPrintProspectRTL = *o3tl::doAccess<bool>(pValues[nProp]); break; case 8: pValues[nProp] >>= m_sFaxName; break; case 9: m_bPaperFromSetup = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 10: m_bPrintDraw = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 11: m_bPrintLeftPages = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 12: m_bPrintRightPages = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 13: m_bPrintEmptyPages = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 14: m_bPrintTextPlaceholder = *o3tl::doAccess<bool>(pValues[nProp]); break; - case 15: m_bPrintHiddenText = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 10: m_bPrintLeftPages = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 11: m_bPrintRightPages = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 12: m_bPrintEmptyPages = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 13: m_bPrintTextPlaceholder = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 14: m_bPrintHiddenText = *o3tl::doAccess<bool>(pValues[nProp]); break; } } } } - - // currently there is just one checkbox for print drawings and print graphics - // In the UI. (File/Print dialog and Tools/Options/.../Print) - // And since print graphics is the only available in Writer and WriterWeb... - - m_bPrintDraw = m_bPrintGraphic; } SwPrintOptions::~SwPrintOptions() @@ -142,20 +134,14 @@ void SwPrintOptions::ImplCommit() case 7: pValues[nProp] <<= m_bPrintProspectRTL; break; case 8: pValues[nProp] <<= m_sFaxName; break; case 9: pValues[nProp] <<= m_bPaperFromSetup; break; - case 10: pValues[nProp] <<= m_bPrintDraw; break; - case 11: pValues[nProp] <<= m_bPrintLeftPages; break; - case 12: pValues[nProp] <<= m_bPrintRightPages; break; - case 13: pValues[nProp] <<= m_bPrintEmptyPages; break; - case 14: pValues[nProp] <<= m_bPrintTextPlaceholder; break; - case 15: pValues[nProp] <<= m_bPrintHiddenText; break; + case 10: pValues[nProp] <<= m_bPrintLeftPages; break; + case 11: pValues[nProp] <<= m_bPrintRightPages; break; + case 12: pValues[nProp] <<= m_bPrintEmptyPages; break; + case 13: pValues[nProp] <<= m_bPrintTextPlaceholder; break; + case 14: pValues[nProp] <<= m_bPrintHiddenText; break; } } - // currently there is just one checkbox for print drawings and print graphics - // In the UI. (File/Print dialog and Tools/Options/.../Print) - // And since print graphics is the only available in Writer and WriterWeb... - m_bPrintDraw = m_bPrintGraphic; - PutProperties(aNames, aValues); } diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 49812654a553..faaa6b72c478 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -327,7 +327,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, break; case HANDLE_PRINTSET_DRAWINGS: { - mpPrtOpt->SetPrintDraw(tryBoolAccess(rInfo.maName, rValue)); + mpPrtOpt->SetPrintGraphic(tryBoolAccess(rInfo.maName, rValue)); } break; case HANDLE_PRINTSET_CONTROLS: @@ -440,7 +440,7 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, rValue <<= true; break; case HANDLE_PRINTSET_DRAWINGS: - rValue <<= mpPrtOpt->IsPrintDraw(); + rValue <<= mpPrtOpt->IsPrintGraphic(); break; case HANDLE_PRINTSET_CONTROLS: rValue <<= mpPrtOpt->IsPrintControl(); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 0509b5ca4a94..7ff979bd0190 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2439,7 +2439,6 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData( SwPrintData aDocPrintData( rDoc.getIDocumentDeviceAccess().getPrintData() ); aDocPrintData.SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() ); - aDocPrintData.SetPrintDraw( rPrintUIOptions.IsPrintDrawings() ); aDocPrintData.SetPrintControl( rPrintUIOptions.IsPrintFormControls() ); aDocPrintData.SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() ); aDocPrintData.SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() ); diff --git a/test/source/text/textprintersettings.cxx b/test/source/text/textprintersettings.cxx index 1ceb11e07967..77fc286e1951 100644 --- a/test/source/text/textprintersettings.cxx +++ b/test/source/text/textprintersettings.cxx @@ -21,7 +21,6 @@ void TextPrinterSettings::testPrinterSettingsProperties() css::uno::UNO_QUERY_THROW); testBooleanProperty(xPrinterSettings, "PrintGraphics"); - testBooleanProperty(xPrinterSettings, "PrintDrawings"); testBooleanProperty(xPrinterSettings, "PrintLeftPages"); testBooleanProperty(xPrinterSettings, "PrintRightPages"); testBooleanProperty(xPrinterSettings, "PrintControls");