From 60bb1b3436e02a78ff39dd08ec0bffc9c9e2c40c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 26 Nov 2010 10:52:38 +0100 Subject: cws tl84: #i115373# getPrintData refactoring --- sw/inc/IDocumentDeviceAccess.hxx | 2 +- sw/inc/doc.hxx | 2 +- sw/inc/prtopt.hxx | 55 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 sw/inc/prtopt.hxx (limited to 'sw/inc') diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx index 75e6d650a203..42923a2fadf4 100755 --- a/sw/inc/IDocumentDeviceAccess.hxx +++ b/sw/inc/IDocumentDeviceAccess.hxx @@ -129,7 +129,7 @@ @returns the current PrintData */ - virtual SwPrintData* getPrintData() const = 0; + virtual const SwPrintData & getPrintData() const = 0; /** Sets the PrintData diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 874004826379..613817369271 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -770,7 +770,7 @@ public: virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes ); virtual const JobSetup* getJobsetup() const; virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ); - virtual SwPrintData* getPrintData() const; + virtual const SwPrintData & getPrintData() const; virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData); /** IDocumentMarkAccess diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx new file mode 100644 index 000000000000..75f0520e35e8 --- /dev/null +++ b/sw/inc/prtopt.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _PRTOPT_HXX +#define _PRTOPT_HXX + +#include +#include + +class SwPrintOptions : public SwPrintData, public utl::ConfigItem +{ + sal_Bool bIsWeb; + + com::sun::star::uno::Sequence GetPropertyNames(); +public: + SwPrintOptions(sal_Bool bWeb); + virtual ~SwPrintOptions(); + + virtual void Commit(); + virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); + virtual void doSetModified( ) { bModified = sal_True; SetModified();} + + SwPrintOptions& operator=(const SwPrintData& rData) + { + SwPrintData::operator=( rData ); + SetModified(); + return *this; + } +}; + +#endif + -- cgit