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 #ifdef SW_DLLIMPLEMENTATION 32*cdf0e10cSrcweir #undef SW_DLLIMPLEMENTATION 33*cdf0e10cSrcweir #endif 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir #include <hintids.hxx> 36*cdf0e10cSrcweir #include <svl/eitem.hxx> 37*cdf0e10cSrcweir #include <svl/stritem.hxx> 38*cdf0e10cSrcweir #include <sfx2/request.hxx> 39*cdf0e10cSrcweir #include <editeng/fontitem.hxx> 40*cdf0e10cSrcweir #include <vcl/msgbox.hxx> 41*cdf0e10cSrcweir #include <fmtftn.hxx> 42*cdf0e10cSrcweir #include <swundo.hxx> 43*cdf0e10cSrcweir #include <cmdid.h> 44*cdf0e10cSrcweir #include <wrtsh.hxx> 45*cdf0e10cSrcweir #include <view.hxx> 46*cdf0e10cSrcweir #include <basesh.hxx> 47*cdf0e10cSrcweir #include <insfnote.hxx> 48*cdf0e10cSrcweir #include <crsskip.hxx> 49*cdf0e10cSrcweir #include <misc.hrc> 50*cdf0e10cSrcweir #include <insfnote.hrc> 51*cdf0e10cSrcweir #include <svx/svxdlg.hxx> 52*cdf0e10cSrcweir #include <svx/dialogs.hrc> 53*cdf0e10cSrcweir #include <sfx2/viewfrm.hxx> 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir static sal_Bool bFootnote = sal_True; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir /*------------------------------------------------------------------------ 58*cdf0e10cSrcweir Beschreibung: Einfuegen der Fussnote durch OK 59*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir void __EXPORT SwInsFootNoteDlg::Apply() 62*cdf0e10cSrcweir { 63*cdf0e10cSrcweir String aStr; 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir if ( aNumberCharBtn.IsChecked() ) 66*cdf0e10cSrcweir aStr = aNumberCharEdit.GetText(); 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir if ( bEdit ) 69*cdf0e10cSrcweir { 70*cdf0e10cSrcweir rSh.StartAction(); 71*cdf0e10cSrcweir rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); 72*cdf0e10cSrcweir rSh.StartUndo( UNDO_START ); 73*cdf0e10cSrcweir SwFmtFtn aNote( aEndNoteBtn.IsChecked() ); 74*cdf0e10cSrcweir aNote.SetNumStr( aStr ); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir if( rSh.SetCurFtn( aNote ) && bExtCharAvailable ) 77*cdf0e10cSrcweir { 78*cdf0e10cSrcweir rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); 79*cdf0e10cSrcweir SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); 80*cdf0e10cSrcweir rSh.GetCurAttr( aSet ); 81*cdf0e10cSrcweir SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); 82*cdf0e10cSrcweir SvxFontItem aFont( rFont.GetFamily(), aFontName, 83*cdf0e10cSrcweir rFont.GetStyleName(), rFont.GetPitch(), 84*cdf0e10cSrcweir eCharSet, RES_CHRATR_FONT ); 85*cdf0e10cSrcweir aSet.Put( aFont ); 86*cdf0e10cSrcweir rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND ); 87*cdf0e10cSrcweir rSh.ResetSelect(0, sal_False); 88*cdf0e10cSrcweir rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); 89*cdf0e10cSrcweir } 90*cdf0e10cSrcweir rSh.EndUndo( UNDO_END ); 91*cdf0e10cSrcweir rSh.EndAction(); 92*cdf0e10cSrcweir } 93*cdf0e10cSrcweir else 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir /* 96*cdf0e10cSrcweir rSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE ); 97*cdf0e10cSrcweir rSh.InsertFootnote( aStr, aEndNoteBtn.IsChecked(), !bExtCharAvailable ); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir if ( bExtCharAvailable ) 100*cdf0e10cSrcweir { 101*cdf0e10cSrcweir rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); 102*cdf0e10cSrcweir SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); 103*cdf0e10cSrcweir rSh.GetAttr( aSet ); 104*cdf0e10cSrcweir SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); 105*cdf0e10cSrcweir SvxFontItem aFont( rFont.GetFamily(), aFontName, 106*cdf0e10cSrcweir rFont.GetStyleName(), rFont.GetPitch(), 107*cdf0e10cSrcweir eCharSet ); 108*cdf0e10cSrcweir aSet.Put( aFont ); 109*cdf0e10cSrcweir rSh.SetAttr( aSet, SETATTR_DONTEXPAND ); 110*cdf0e10cSrcweir // zur Bearbeitung des Fussnotentextes 111*cdf0e10cSrcweir rSh.ResetSelect(0, sal_False); 112*cdf0e10cSrcweir rSh.GotoFtnTxt(); 113*cdf0e10cSrcweir } 114*cdf0e10cSrcweir rSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE ); 115*cdf0e10cSrcweir */ 116*cdf0e10cSrcweir } 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir bFootnote = aFtnBtn.IsChecked(); 119*cdf0e10cSrcweir } 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir /*------------------------------------------------------------------------ 123*cdf0e10cSrcweir Beschreibung: 124*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG ) 127*cdf0e10cSrcweir { 128*cdf0e10cSrcweir aNumberCharEdit.GrabFocus(); 129*cdf0e10cSrcweir aOkBtn.Enable( aNumberCharEdit.GetText().Len() || bExtCharAvailable ); 130*cdf0e10cSrcweir return 0; 131*cdf0e10cSrcweir } 132*cdf0e10cSrcweir IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG ) 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir /*------------------------------------------------------------------------ 135*cdf0e10cSrcweir Beschreibung: 136*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir aNumberCharBtn.Check( sal_True ); 141*cdf0e10cSrcweir aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() ); 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir return 0; 144*cdf0e10cSrcweir } 145*cdf0e10cSrcweir IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir /*------------------------------------------------------------------------ 148*cdf0e10cSrcweir Beschreibung: 149*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) 152*cdf0e10cSrcweir { 153*cdf0e10cSrcweir aOkBtn.Enable( sal_True ); 154*cdf0e10cSrcweir return 0; 155*cdf0e10cSrcweir } 156*cdf0e10cSrcweir IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir /*------------------------------------------------------------------------ 159*cdf0e10cSrcweir Beschreibung: 160*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) 163*cdf0e10cSrcweir { 164*cdf0e10cSrcweir aNumberCharBtn.Check( sal_True ); 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); 167*cdf0e10cSrcweir rSh.GetCurAttr( aSet ); 168*cdf0e10cSrcweir const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir SfxAllItemSet aAllSet( rSh.GetAttrPool() ); 171*cdf0e10cSrcweir aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); 172*cdf0e10cSrcweir aAllSet.Put( rFont ); 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 175*cdf0e10cSrcweir SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aAllSet, 176*cdf0e10cSrcweir rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); 177*cdf0e10cSrcweir if (RET_OK == pDlg->Execute()) 178*cdf0e10cSrcweir { 179*cdf0e10cSrcweir SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False ); 180*cdf0e10cSrcweir SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); 181*cdf0e10cSrcweir if ( pItem ) 182*cdf0e10cSrcweir { 183*cdf0e10cSrcweir String sExtChars(pItem->GetValue()); 184*cdf0e10cSrcweir aNumberCharEdit.SetText( sExtChars ); 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir if ( pFontItem ) 187*cdf0e10cSrcweir { 188*cdf0e10cSrcweir aFontName = pFontItem->GetFamilyName(); 189*cdf0e10cSrcweir eCharSet = pFontItem->GetCharSet(); 190*cdf0e10cSrcweir Font aFont( aFontName, pFontItem->GetStyleName(), aNumberCharEdit.GetFont().GetSize() ); 191*cdf0e10cSrcweir aFont.SetCharSet( pFontItem->GetCharSet() ); 192*cdf0e10cSrcweir aFont.SetPitch( pFontItem->GetPitch() ); 193*cdf0e10cSrcweir aNumberCharEdit.SetFont( aFont ); 194*cdf0e10cSrcweir } 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir bExtCharAvailable = sal_True; 197*cdf0e10cSrcweir aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len()); 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir } 200*cdf0e10cSrcweir delete pDlg; 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir return 0; 203*cdf0e10cSrcweir } 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir /*------------------------------------------------------------------------ 206*cdf0e10cSrcweir Beschreibung: 207*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) 210*cdf0e10cSrcweir { 211*cdf0e10cSrcweir Apply(); 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir // Hier zur naechsten Fuss/Endnote wandern 214*cdf0e10cSrcweir rSh.ResetSelect(0, sal_False); 215*cdf0e10cSrcweir if (pBtn == &aNextBT) 216*cdf0e10cSrcweir rSh.GotoNextFtnAnchor(); 217*cdf0e10cSrcweir else 218*cdf0e10cSrcweir rSh.GotoPrevFtnAnchor(); 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir Init(); 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir return 0; 223*cdf0e10cSrcweir } 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir /*------------------------------------------------------------------------ 226*cdf0e10cSrcweir Beschreibung: 227*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) : 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)), 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir rSh(rShell), 234*cdf0e10cSrcweir bExtCharAvailable(sal_False), 235*cdf0e10cSrcweir bEdit(bEd), 236*cdf0e10cSrcweir aNumberFL (this,SW_RES(FL_NUMBER)), 237*cdf0e10cSrcweir aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)), 238*cdf0e10cSrcweir aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)), 239*cdf0e10cSrcweir aNumberCharEdit (this,SW_RES(ED_NUMBER_CHAR)), 240*cdf0e10cSrcweir aNumberExtChar (this,SW_RES(BT_NUMBER_CHAR)), 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir aTypeFL (this,SW_RES(FL_TYPE)), 243*cdf0e10cSrcweir aFtnBtn (this,SW_RES(RB_TYPE_FTN)), 244*cdf0e10cSrcweir aEndNoteBtn (this,SW_RES(RB_TYPE_ENDNOTE)), 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir aOkBtn (this,SW_RES(BT_OK)), 247*cdf0e10cSrcweir aCancelBtn (this,SW_RES(BT_CANCEL)), 248*cdf0e10cSrcweir aHelpBtn (this,SW_RES(BT_HELP)), 249*cdf0e10cSrcweir aPrevBT (this,SW_RES(BT_PREV)), 250*cdf0e10cSrcweir aNextBT (this,SW_RES(BT_NEXT)) 251*cdf0e10cSrcweir { 252*cdf0e10cSrcweir aNumberCharEdit.SetAccessibleName(String(SW_RES(STR_CHAR))); 253*cdf0e10cSrcweir aNumberExtChar.SetAccessibleRelationMemberOf(&aNumberFL); 254*cdf0e10cSrcweir aNumberCharEdit.SetAccessibleRelationLabeledBy(&aNumberCharBtn); 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir aNumberAutoBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberAutoBtnHdl)); 257*cdf0e10cSrcweir aNumberExtChar.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberExtCharHdl)); 258*cdf0e10cSrcweir aNumberCharBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberCharHdl)); 259*cdf0e10cSrcweir aNumberCharEdit.SetModifyHdl(LINK(this,SwInsFootNoteDlg,NumberEditHdl)); 260*cdf0e10cSrcweir aNumberCharEdit.SetMaxTextLen(10); 261*cdf0e10cSrcweir aNumberCharEdit.Enable(); 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir aPrevBT.SetClickHdl(LINK(this, SwInsFootNoteDlg, NextPrevHdl)); 264*cdf0e10cSrcweir aNextBT.SetClickHdl(LINK(this, SwInsFootNoteDlg, NextPrevHdl)); 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir FreeResource(); 267*cdf0e10cSrcweir rSh.SetCareWin(this); 268*cdf0e10cSrcweir 269*cdf0e10cSrcweir if (bEdit) 270*cdf0e10cSrcweir { 271*cdf0e10cSrcweir Init(); 272*cdf0e10cSrcweir 273*cdf0e10cSrcweir aPrevBT.Show(); 274*cdf0e10cSrcweir aNextBT.Show(); 275*cdf0e10cSrcweir } 276*cdf0e10cSrcweir } 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir /*------------------------------------------------------------------------ 280*cdf0e10cSrcweir Beschreibung: 281*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir SwInsFootNoteDlg::~SwInsFootNoteDlg() 284*cdf0e10cSrcweir { 285*cdf0e10cSrcweir rSh.SetCareWin(0); 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir if (bEdit) 288*cdf0e10cSrcweir rSh.ResetSelect(0, sal_False); 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir /*------------------------------------------------------------------------ 292*cdf0e10cSrcweir Beschreibung: 293*cdf0e10cSrcweir ------------------------------------------------------------------------*/ 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir void SwInsFootNoteDlg::Init() 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir SwFmtFtn aFtnNote; 298*cdf0e10cSrcweir String sNumStr; 299*cdf0e10cSrcweir Font aFont; 300*cdf0e10cSrcweir bExtCharAvailable = sal_False; 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir rSh.StartAction(); 303*cdf0e10cSrcweir 304*cdf0e10cSrcweir if( rSh.GetCurFtn( &aFtnNote )) 305*cdf0e10cSrcweir { 306*cdf0e10cSrcweir if(aFtnNote.GetNumStr().Len()) 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir sNumStr = aFtnNote.GetNumStr(); 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); 311*cdf0e10cSrcweir SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); 312*cdf0e10cSrcweir rSh.GetCurAttr( aSet ); 313*cdf0e10cSrcweir const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir aFont = aNumberCharEdit.GetFont(); 316*cdf0e10cSrcweir aFontName = rFont.GetFamilyName(); 317*cdf0e10cSrcweir eCharSet = rFont.GetCharSet(); 318*cdf0e10cSrcweir aFont.SetName(aFontName); 319*cdf0e10cSrcweir aFont.SetCharSet(eCharSet); 320*cdf0e10cSrcweir bExtCharAvailable = sal_True; 321*cdf0e10cSrcweir rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); 322*cdf0e10cSrcweir } 323*cdf0e10cSrcweir bFootnote = !aFtnNote.IsEndNote(); 324*cdf0e10cSrcweir } 325*cdf0e10cSrcweir aNumberCharEdit.SetFont(aFont); 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir sal_Bool bNumChar = sNumStr.Len() != 0; 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir aNumberCharEdit.SetText(sNumStr); 330*cdf0e10cSrcweir aNumberCharBtn.Check(bNumChar); 331*cdf0e10cSrcweir aNumberAutoBtn.Check(!bNumChar); 332*cdf0e10cSrcweir if (bNumChar) 333*cdf0e10cSrcweir aNumberCharEdit.GrabFocus(); 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir if (bFootnote) 336*cdf0e10cSrcweir aFtnBtn.Check(); 337*cdf0e10cSrcweir else 338*cdf0e10cSrcweir aEndNoteBtn.Check(); 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir sal_Bool bNext = rSh.GotoNextFtnAnchor(); 341*cdf0e10cSrcweir 342*cdf0e10cSrcweir if (bNext) 343*cdf0e10cSrcweir rSh.GotoPrevFtnAnchor(); 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir sal_Bool bPrev = rSh.GotoPrevFtnAnchor(); 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir if (bPrev) 348*cdf0e10cSrcweir rSh.GotoNextFtnAnchor(); 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir aPrevBT.Enable(bPrev); 351*cdf0e10cSrcweir aNextBT.Enable(bNext); 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir rSh.EndAction(); 356*cdf0e10cSrcweir } 357*cdf0e10cSrcweir 358