1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_sw.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #ifndef __SBX_SBXVARIABLE_HXX //autogen 33*cdf0e10cSrcweir #include <basic/sbxvar.hxx> 34*cdf0e10cSrcweir #endif 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir #ifndef _SVX_SVXIDS_HRC //autogen 37*cdf0e10cSrcweir #include <svx/svxids.hrc> 38*cdf0e10cSrcweir #endif 39*cdf0e10cSrcweir #include <editeng/svxenum.hxx> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #include "viewopt.hxx" 43*cdf0e10cSrcweir #include "swtypes.hxx" 44*cdf0e10cSrcweir #include "cmdid.h" 45*cdf0e10cSrcweir #include "prtopt.hxx" 46*cdf0e10cSrcweir #include "cfgitems.hxx" 47*cdf0e10cSrcweir #include "crstate.hxx" 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SwDocDisplayItem, SfxPoolItem) 52*cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SwElemItem, SfxPoolItem) 53*cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem) 54*cdf0e10cSrcweir TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem) 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) : 58*cdf0e10cSrcweir SfxPoolItem(_nWhich), 59*cdf0e10cSrcweir aIndexBackgrndCol(COL_GRAY) 60*cdf0e10cSrcweir { 61*cdf0e10cSrcweir bParagraphEnd = 62*cdf0e10cSrcweir bTab = 63*cdf0e10cSrcweir bSpace = 64*cdf0e10cSrcweir bNonbreakingSpace = 65*cdf0e10cSrcweir bSoftHyphen = 66*cdf0e10cSrcweir bFldHiddenText = 67*cdf0e10cSrcweir bCharHiddenText = 68*cdf0e10cSrcweir bManualBreak = 69*cdf0e10cSrcweir bShowHiddenPara = sal_False; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir }; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir /*------------OS 12.01.95 ------------------------------------------- 74*cdf0e10cSrcweir Item fuer Einstellungsdialog, Seite Dokumentansicht 75*cdf0e10cSrcweir --------------------------------------------------------------------*/ 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ): 78*cdf0e10cSrcweir SfxPoolItem(rDocDisplayItem) 79*cdf0e10cSrcweir { 80*cdf0e10cSrcweir *this = rDocDisplayItem; 81*cdf0e10cSrcweir }; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir /*----------------------- ------------------------------------------- 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir --------------------------------------------------------------------*/ 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : 88*cdf0e10cSrcweir SfxPoolItem( _nWhich ) 89*cdf0e10cSrcweir { 90*cdf0e10cSrcweir bParagraphEnd = rVOpt.IsParagraph(sal_True); 91*cdf0e10cSrcweir bTab = rVOpt.IsTab(sal_True); 92*cdf0e10cSrcweir bSpace = rVOpt.IsBlank(sal_True); 93*cdf0e10cSrcweir bNonbreakingSpace = rVOpt.IsHardBlank(); 94*cdf0e10cSrcweir bSoftHyphen = rVOpt.IsSoftHyph(); 95*cdf0e10cSrcweir bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True); 96*cdf0e10cSrcweir bFldHiddenText = rVOpt.IsShowHiddenField(); 97*cdf0e10cSrcweir bManualBreak = rVOpt.IsLineBreak(sal_True); 98*cdf0e10cSrcweir bShowHiddenPara = rVOpt.IsShowHiddenPara(); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir } 101*cdf0e10cSrcweir /*-------------------------------------------------------------------- 102*cdf0e10cSrcweir Beschreibung: 103*cdf0e10cSrcweir --------------------------------------------------------------------*/ 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool* ) const 106*cdf0e10cSrcweir { 107*cdf0e10cSrcweir return new SwDocDisplayItem( *this ); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir /*-------------------------------------------------------------------- 111*cdf0e10cSrcweir Beschreibung: 112*cdf0e10cSrcweir --------------------------------------------------------------------*/ 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir int SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const 115*cdf0e10cSrcweir { 116*cdf0e10cSrcweir DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir const SwDocDisplayItem& rItem = (SwDocDisplayItem&)rAttr; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir return ( bParagraphEnd == rItem.bParagraphEnd && 121*cdf0e10cSrcweir bTab == rItem.bTab && 122*cdf0e10cSrcweir bSpace == rItem.bSpace && 123*cdf0e10cSrcweir bNonbreakingSpace == rItem.bNonbreakingSpace && 124*cdf0e10cSrcweir bSoftHyphen == rItem.bSoftHyphen && 125*cdf0e10cSrcweir bCharHiddenText == rItem.bCharHiddenText && 126*cdf0e10cSrcweir bFldHiddenText == rItem.bFldHiddenText && 127*cdf0e10cSrcweir bManualBreak == rItem.bManualBreak && 128*cdf0e10cSrcweir bShowHiddenPara == rItem.bShowHiddenPara ); 129*cdf0e10cSrcweir } 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir /*-----------------31.08.96 14.14------------------- 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir --------------------------------------------------*/ 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir void SwDocDisplayItem::operator=( const SwDocDisplayItem& rDocDisplayItem) 138*cdf0e10cSrcweir { 139*cdf0e10cSrcweir bParagraphEnd = rDocDisplayItem.bParagraphEnd ; 140*cdf0e10cSrcweir bTab = rDocDisplayItem.bTab ; 141*cdf0e10cSrcweir bSpace = rDocDisplayItem.bSpace ; 142*cdf0e10cSrcweir bNonbreakingSpace = rDocDisplayItem.bNonbreakingSpace ; 143*cdf0e10cSrcweir bSoftHyphen = rDocDisplayItem.bSoftHyphen ; 144*cdf0e10cSrcweir bCharHiddenText = rDocDisplayItem.bCharHiddenText ; 145*cdf0e10cSrcweir bFldHiddenText = rDocDisplayItem.bFldHiddenText ; 146*cdf0e10cSrcweir bManualBreak = rDocDisplayItem.bManualBreak ; 147*cdf0e10cSrcweir bShowHiddenPara = rDocDisplayItem.bShowHiddenPara ; 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir /*-------------------------------------------------------------------- 151*cdf0e10cSrcweir Beschreibung: 152*cdf0e10cSrcweir --------------------------------------------------------------------*/ 153*cdf0e10cSrcweir void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const 154*cdf0e10cSrcweir { 155*cdf0e10cSrcweir rVOpt.SetParagraph (bParagraphEnd ); 156*cdf0e10cSrcweir rVOpt.SetTab (bTab ); 157*cdf0e10cSrcweir rVOpt.SetBlank (bSpace ); 158*cdf0e10cSrcweir rVOpt.SetHardBlank (bNonbreakingSpace ); 159*cdf0e10cSrcweir rVOpt.SetSoftHyph (bSoftHyphen ); 160*cdf0e10cSrcweir rVOpt.SetShowHiddenChar(bCharHiddenText ); 161*cdf0e10cSrcweir rVOpt.SetShowHiddenField(bFldHiddenText ); 162*cdf0e10cSrcweir rVOpt.SetLineBreak (bManualBreak ); 163*cdf0e10cSrcweir rVOpt.SetShowHiddenPara(bShowHiddenPara ); 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir /*-------------------------------------------------------------------- 168*cdf0e10cSrcweir Beschreibung: 169*cdf0e10cSrcweir --------------------------------------------------------------------*/ 170*cdf0e10cSrcweir SwElemItem::SwElemItem( sal_uInt16 _nWhich ) : 171*cdf0e10cSrcweir SfxPoolItem(_nWhich) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir bHorzScrollbar = 174*cdf0e10cSrcweir bVertScrollbar = 175*cdf0e10cSrcweir bAnyRuler = 176*cdf0e10cSrcweir bHorzRuler = 177*cdf0e10cSrcweir bVertRuler = 178*cdf0e10cSrcweir bVertRulerRight= 179*cdf0e10cSrcweir bCrosshair = 180*cdf0e10cSrcweir bHandles = 181*cdf0e10cSrcweir bBigHandles = 182*cdf0e10cSrcweir bSmoothScroll = 183*cdf0e10cSrcweir bTable = 184*cdf0e10cSrcweir bGraphic = 185*cdf0e10cSrcweir bDrawing = 186*cdf0e10cSrcweir bFieldName = 187*cdf0e10cSrcweir bNotes = sal_False; 188*cdf0e10cSrcweir } 189*cdf0e10cSrcweir /*-------------------------------------------------------------------- 190*cdf0e10cSrcweir Beschreibung: 191*cdf0e10cSrcweir --------------------------------------------------------------------*/ 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir SwElemItem::SwElemItem( const SwElemItem& rElemItem ): 194*cdf0e10cSrcweir SfxPoolItem(rElemItem) 195*cdf0e10cSrcweir { 196*cdf0e10cSrcweir *this = rElemItem; 197*cdf0e10cSrcweir } 198*cdf0e10cSrcweir /*-------------------------------------------------------------------- 199*cdf0e10cSrcweir Beschreibung: 200*cdf0e10cSrcweir --------------------------------------------------------------------*/ 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) : 203*cdf0e10cSrcweir SfxPoolItem( _nWhich ) 204*cdf0e10cSrcweir { 205*cdf0e10cSrcweir bHorzScrollbar = rVOpt.IsViewHScrollBar(); 206*cdf0e10cSrcweir bVertScrollbar = rVOpt.IsViewVScrollBar(); 207*cdf0e10cSrcweir bAnyRuler = rVOpt.IsViewAnyRuler(); 208*cdf0e10cSrcweir bHorzRuler = rVOpt.IsViewHRuler(sal_True); 209*cdf0e10cSrcweir bVertRuler = rVOpt.IsViewVRuler(sal_True); 210*cdf0e10cSrcweir bVertRulerRight = rVOpt.IsVRulerRight(); 211*cdf0e10cSrcweir bCrosshair = rVOpt.IsCrossHair(); 212*cdf0e10cSrcweir bHandles = rVOpt.IsSolidMarkHdl(); 213*cdf0e10cSrcweir bBigHandles = rVOpt.IsBigMarkHdl(); 214*cdf0e10cSrcweir bSmoothScroll = rVOpt.IsSmoothScroll(); 215*cdf0e10cSrcweir bTable = rVOpt.IsTable(); 216*cdf0e10cSrcweir bGraphic = rVOpt.IsGraphic(); 217*cdf0e10cSrcweir bDrawing = rVOpt.IsDraw() && rVOpt.IsControl(); 218*cdf0e10cSrcweir bFieldName = rVOpt.IsFldName(); 219*cdf0e10cSrcweir bNotes = rVOpt.IsPostIts(); 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir } 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir /*-------------------------------------------------------------------- 224*cdf0e10cSrcweir Beschreibung: 225*cdf0e10cSrcweir --------------------------------------------------------------------*/ 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir SfxPoolItem* SwElemItem::Clone( SfxItemPool* ) const 228*cdf0e10cSrcweir { 229*cdf0e10cSrcweir return new SwElemItem( *this ); 230*cdf0e10cSrcweir } 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir /*-------------------------------------------------------------------- 233*cdf0e10cSrcweir Beschreibung: 234*cdf0e10cSrcweir --------------------------------------------------------------------*/ 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir int SwElemItem::operator==( const SfxPoolItem& rAttr ) const 237*cdf0e10cSrcweir { 238*cdf0e10cSrcweir DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir const SwElemItem& rItem = (SwElemItem&)rAttr; 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir return ( bHorzScrollbar == rItem.bHorzScrollbar && 243*cdf0e10cSrcweir bVertScrollbar == rItem.bVertScrollbar && 244*cdf0e10cSrcweir bAnyRuler == rItem.bAnyRuler && 245*cdf0e10cSrcweir bHorzRuler == rItem.bHorzRuler && 246*cdf0e10cSrcweir bVertRuler == rItem.bVertRuler && 247*cdf0e10cSrcweir bVertRulerRight == rItem.bVertRulerRight&& 248*cdf0e10cSrcweir bCrosshair == rItem.bCrosshair && 249*cdf0e10cSrcweir bHandles == rItem.bHandles && 250*cdf0e10cSrcweir bBigHandles == rItem.bBigHandles && 251*cdf0e10cSrcweir bSmoothScroll == rItem.bSmoothScroll && 252*cdf0e10cSrcweir bTable == rItem.bTable && 253*cdf0e10cSrcweir bGraphic == rItem.bGraphic && 254*cdf0e10cSrcweir bDrawing == rItem.bDrawing && 255*cdf0e10cSrcweir bFieldName == rItem.bFieldName && 256*cdf0e10cSrcweir bNotes == rItem.bNotes ); 257*cdf0e10cSrcweir } 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir /*-----------------31.08.96 14.13------------------- 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir --------------------------------------------------*/ 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir void SwElemItem::operator=( const SwElemItem& rElemItem) 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir bHorzScrollbar = rElemItem. bHorzScrollbar ; 267*cdf0e10cSrcweir bVertScrollbar = rElemItem. bVertScrollbar ; 268*cdf0e10cSrcweir bAnyRuler = rElemItem. bAnyRuler; 269*cdf0e10cSrcweir bHorzRuler = rElemItem. bHorzRuler ; 270*cdf0e10cSrcweir bVertRuler = rElemItem. bVertRuler ; 271*cdf0e10cSrcweir bVertRulerRight = rElemItem. bVertRulerRight ; 272*cdf0e10cSrcweir bCrosshair = rElemItem. bCrosshair ; 273*cdf0e10cSrcweir bHandles = rElemItem. bHandles ; 274*cdf0e10cSrcweir bBigHandles = rElemItem. bBigHandles ; 275*cdf0e10cSrcweir bSmoothScroll = rElemItem. bSmoothScroll ; 276*cdf0e10cSrcweir bTable = rElemItem.bTable ; 277*cdf0e10cSrcweir bGraphic = rElemItem.bGraphic ; 278*cdf0e10cSrcweir bDrawing = rElemItem.bDrawing ; 279*cdf0e10cSrcweir bFieldName = rElemItem.bFieldName ; 280*cdf0e10cSrcweir bNotes = rElemItem.bNotes ; 281*cdf0e10cSrcweir } 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir /*-------------------------------------------------------------------- 284*cdf0e10cSrcweir Beschreibung: 285*cdf0e10cSrcweir --------------------------------------------------------------------*/ 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const 288*cdf0e10cSrcweir { 289*cdf0e10cSrcweir rVOpt.SetViewHScrollBar(bHorzScrollbar ); 290*cdf0e10cSrcweir rVOpt.SetViewVScrollBar(bVertScrollbar ); 291*cdf0e10cSrcweir rVOpt.SetViewAnyRuler(bAnyRuler); 292*cdf0e10cSrcweir rVOpt.SetViewHRuler(bHorzRuler ); 293*cdf0e10cSrcweir rVOpt.SetViewVRuler(bVertRuler ); 294*cdf0e10cSrcweir rVOpt.SetVRulerRight(bVertRulerRight ); 295*cdf0e10cSrcweir rVOpt.SetCrossHair(bCrosshair ); 296*cdf0e10cSrcweir rVOpt.SetSolidMarkHdl(bHandles ); 297*cdf0e10cSrcweir rVOpt.SetBigMarkHdl(bBigHandles ); 298*cdf0e10cSrcweir rVOpt.SetSmoothScroll(bSmoothScroll); 299*cdf0e10cSrcweir rVOpt.SetTable (bTable ); 300*cdf0e10cSrcweir rVOpt.SetGraphic (bGraphic ); 301*cdf0e10cSrcweir rVOpt.SetDraw (bDrawing ); 302*cdf0e10cSrcweir rVOpt.SetControl (bDrawing ); 303*cdf0e10cSrcweir rVOpt.SetFldName (bFieldName ); 304*cdf0e10cSrcweir rVOpt.SetPostIts (bNotes ); 305*cdf0e10cSrcweir } 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir /*-------------------------------------------------------------------- 309*cdf0e10cSrcweir Beschreibung: CopyCTOR 310*cdf0e10cSrcweir --------------------------------------------------------------------*/ 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ): 313*cdf0e10cSrcweir SfxPoolItem(rAddPrinterItem), 314*cdf0e10cSrcweir SwPrintData( rAddPrinterItem ) 315*cdf0e10cSrcweir { 316*cdf0e10cSrcweir } 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir /*-------------------------------------------------------------------- 319*cdf0e10cSrcweir Beschreibung: CTOR fuer leeres Item 320*cdf0e10cSrcweir --------------------------------------------------------------------*/ 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich): 323*cdf0e10cSrcweir SfxPoolItem(_nWhich) 324*cdf0e10cSrcweir { 325*cdf0e10cSrcweir } 326*cdf0e10cSrcweir /*-------------------------------------------------------------------- 327*cdf0e10cSrcweir Beschreibung: CTOR aus SwPrintOptions 328*cdf0e10cSrcweir --------------------------------------------------------------------*/ 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) : 331*cdf0e10cSrcweir SfxPoolItem(_nWhich) 332*cdf0e10cSrcweir { 333*cdf0e10cSrcweir SwPrintData::operator=(rPrtData); 334*cdf0e10cSrcweir } 335*cdf0e10cSrcweir /*-------------------------------------------------------------------- 336*cdf0e10cSrcweir Beschreibung: 337*cdf0e10cSrcweir --------------------------------------------------------------------*/ 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir SfxPoolItem* SwAddPrinterItem::Clone( SfxItemPool* ) const 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir return new SwAddPrinterItem( *this ); 342*cdf0e10cSrcweir } 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir /*-------------------------------------------------------------------- 345*cdf0e10cSrcweir Beschreibung: 346*cdf0e10cSrcweir --------------------------------------------------------------------*/ 347*cdf0e10cSrcweir 348*cdf0e10cSrcweir int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); 351*cdf0e10cSrcweir 352*cdf0e10cSrcweir const SwAddPrinterItem& rItem = (SwAddPrinterItem&)rAttr; 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir return SwPrintData::operator==(rItem); 355*cdf0e10cSrcweir } 356*cdf0e10cSrcweir /*-----------------03.11.97 10:00------------------- 357*cdf0e10cSrcweir Item fuer Einstellungsdialog, ShadowCursorSeite 358*cdf0e10cSrcweir --------------------------------------------------*/ 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich ) 361*cdf0e10cSrcweir : SfxPoolItem( _nWhich ), 362*cdf0e10cSrcweir eMode( FILL_TAB ) 363*cdf0e10cSrcweir ,bOn( sal_False ) 364*cdf0e10cSrcweir { 365*cdf0e10cSrcweir } 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) 368*cdf0e10cSrcweir : SfxPoolItem( rCpy.Which() ), 369*cdf0e10cSrcweir eMode( rCpy.GetMode() ) 370*cdf0e10cSrcweir ,bOn( rCpy.IsOn() ) 371*cdf0e10cSrcweir 372*cdf0e10cSrcweir { 373*cdf0e10cSrcweir } 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich ) 376*cdf0e10cSrcweir : SfxPoolItem( _nWhich ), 377*cdf0e10cSrcweir eMode( rVOpt.GetShdwCrsrFillMode() ) 378*cdf0e10cSrcweir ,bOn( rVOpt.IsShadowCursor() ) 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir { 381*cdf0e10cSrcweir } 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir SfxPoolItem* SwShadowCursorItem::Clone( SfxItemPool* ) const 384*cdf0e10cSrcweir { 385*cdf0e10cSrcweir return new SwShadowCursorItem( *this ); 386*cdf0e10cSrcweir } 387*cdf0e10cSrcweir 388*cdf0e10cSrcweir int SwShadowCursorItem::operator==( const SfxPoolItem& rCmp ) const 389*cdf0e10cSrcweir { 390*cdf0e10cSrcweir return IsOn() == ((SwShadowCursorItem&)rCmp).IsOn() && 391*cdf0e10cSrcweir GetMode() == ((SwShadowCursorItem&)rCmp).GetMode(); 392*cdf0e10cSrcweir } 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir void SwShadowCursorItem::operator=( const SwShadowCursorItem& rCpy ) 395*cdf0e10cSrcweir { 396*cdf0e10cSrcweir SetOn( rCpy.IsOn() ); 397*cdf0e10cSrcweir SetMode( rCpy.GetMode() ); 398*cdf0e10cSrcweir } 399*cdf0e10cSrcweir 400*cdf0e10cSrcweir 401*cdf0e10cSrcweir void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const 402*cdf0e10cSrcweir { 403*cdf0e10cSrcweir rVOpt.SetShadowCursor( bOn ); 404*cdf0e10cSrcweir rVOpt.SetShdwCrsrFillMode( eMode ); 405*cdf0e10cSrcweir } 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir #ifdef DBG_UTIL 408*cdf0e10cSrcweir /*-------------------------------------------------------------------- 409*cdf0e10cSrcweir Beschreibung: 410*cdf0e10cSrcweir --------------------------------------------------------------------*/ 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir SwTestItem::SwTestItem( const SwTestItem& rTestItem ): 413*cdf0e10cSrcweir SfxPoolItem(rTestItem) 414*cdf0e10cSrcweir { 415*cdf0e10cSrcweir bTest1=rTestItem.bTest1; 416*cdf0e10cSrcweir bTest2=rTestItem.bTest2; 417*cdf0e10cSrcweir bTest3=rTestItem.bTest3; 418*cdf0e10cSrcweir bTest4=rTestItem.bTest4; 419*cdf0e10cSrcweir bTest5=rTestItem.bTest5; 420*cdf0e10cSrcweir bTest6=rTestItem.bTest6; 421*cdf0e10cSrcweir bTest7=rTestItem.bTest7; 422*cdf0e10cSrcweir bTest8=rTestItem.bTest8; 423*cdf0e10cSrcweir bTest9=rTestItem.bTest9; 424*cdf0e10cSrcweir bTest10=rTestItem.bTest10; 425*cdf0e10cSrcweir }; 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir /*-------------------------------------------------------------------- 428*cdf0e10cSrcweir Beschreibung: 429*cdf0e10cSrcweir --------------------------------------------------------------------*/ 430*cdf0e10cSrcweir 431*cdf0e10cSrcweir SfxPoolItem* SwTestItem::Clone( SfxItemPool* ) const 432*cdf0e10cSrcweir { 433*cdf0e10cSrcweir return new SwTestItem( *this ); 434*cdf0e10cSrcweir } 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir /*-------------------------------------------------------------------- 437*cdf0e10cSrcweir Beschreibung: 438*cdf0e10cSrcweir --------------------------------------------------------------------*/ 439*cdf0e10cSrcweir 440*cdf0e10cSrcweir int SwTestItem::operator==( const SfxPoolItem& rAttr ) const 441*cdf0e10cSrcweir { 442*cdf0e10cSrcweir DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); 443*cdf0e10cSrcweir 444*cdf0e10cSrcweir const SwTestItem& rItem = (const SwTestItem&) rAttr; 445*cdf0e10cSrcweir 446*cdf0e10cSrcweir return ( bTest1==rItem.bTest1&& 447*cdf0e10cSrcweir bTest2==rItem.bTest2&& 448*cdf0e10cSrcweir bTest3==rItem.bTest3&& 449*cdf0e10cSrcweir bTest4==rItem.bTest4&& 450*cdf0e10cSrcweir bTest5==rItem.bTest5&& 451*cdf0e10cSrcweir bTest6==rItem.bTest6&& 452*cdf0e10cSrcweir bTest7==rItem.bTest7&& 453*cdf0e10cSrcweir bTest8==rItem.bTest8&& 454*cdf0e10cSrcweir bTest9==rItem.bTest9&& 455*cdf0e10cSrcweir bTest10==rItem.bTest10); 456*cdf0e10cSrcweir } 457*cdf0e10cSrcweir 458*cdf0e10cSrcweir #endif 459*cdf0e10cSrcweir 460*cdf0e10cSrcweir 461