diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-11-26 10:52:38 +0100 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-11-26 10:52:38 +0100 |
commit | 60bb1b3436e02a78ff39dd08ec0bffc9c9e2c40c (patch) | |
tree | 6ba4b9aa791ac3a912437b29f187b1828a972ba8 /sw/inc | |
parent | 8bf24a92b0e97a52412e4e12fb7223e36c1efcdf (diff) |
cws tl84: #i115373# getPrintData refactoring
Diffstat (limited to 'sw/inc')
-rwxr-xr-x | sw/inc/IDocumentDeviceAccess.hxx | 2 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 2 | ||||
-rw-r--r-- | sw/inc/prtopt.hxx | 55 |
3 files changed, 57 insertions, 2 deletions
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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _PRTOPT_HXX +#define _PRTOPT_HXX + +#include <unotools/configitem.hxx> +#include <printdata.hxx> + +class SwPrintOptions : public SwPrintData, public utl::ConfigItem +{ + sal_Bool bIsWeb; + + com::sun::star::uno::Sequence<rtl::OUString> 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 + |