Kaydet (Commit) a7afc46b authored tarafından Oliver Specht's avatar Oliver Specht

#85609# dont allow counting by chapter an positon at end of document

üst dec377fd
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: docfnote.cxx,v $ * $RCSfile: docfnote.cxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: fme $ $Date: 2001-06-01 11:04:53 $ * last change: $Author: os $ $Date: 2001-07-02 11:52:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -206,15 +206,16 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, ...@@ -206,15 +206,16 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
aContFL (this, ResId( FL_CONT )), aContFL (this, ResId( FL_CONT )),
aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)), aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)),
aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)),
pSh( 0 ), pSh( 0 ),
bPosDoc(FALSE), bPosDoc(FALSE),
bEndNote( bEN ) bEndNote( bEN )
{ {
FreeResource(); FreeResource();
aPosPageBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosPage)); aPosPageBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosPageHdl));
aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapter)); aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapterHdl));
aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCount)); aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCountHdl));
} }
...@@ -262,6 +263,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) ...@@ -262,6 +263,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
{ {
aPosChapterBox.Check(); aPosChapterBox.Check();
aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
bPosDoc = TRUE; bPosDoc = TRUE;
} }
// Verweistexte // Verweistexte
...@@ -355,7 +357,7 @@ SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet ...@@ -355,7 +357,7 @@ SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet
inline void SwEndNoteOptionPage::SelectNumbering(int eNum) inline void SwEndNoteOptionPage::SelectNumbering(int eNum)
{ {
aNumCountBox.SelectEntryPos(bPosDoc? (USHORT)eNum - 1: eNum); aNumCountBox.SelectEntryPos(bPosDoc? (USHORT)eNum - 1: eNum);
NumCount( &aNumCountBox ); NumCountHdl( &aNumCountBox );
} }
...@@ -390,12 +392,14 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) ...@@ -390,12 +392,14 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
IMPL_LINK( SwEndNoteOptionPage, PosPage, Button *, EMPTYARG ) IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
{ {
const SwFtnNum eNum = (const SwFtnNum)GetNumbering(); const SwFtnNum eNum = (const SwFtnNum)GetNumbering();
bPosDoc = FALSE; bPosDoc = FALSE;
if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage)) { if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage))
{
aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE); aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE);
aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER);
SelectNumbering(eNum); SelectNumbering(eNum);
} }
aPageTemplLbl.Enable(FALSE); aPageTemplLbl.Enable(FALSE);
...@@ -409,7 +413,7 @@ IMPL_LINK( SwEndNoteOptionPage, PosPage, Button *, EMPTYARG ) ...@@ -409,7 +413,7 @@ IMPL_LINK( SwEndNoteOptionPage, PosPage, Button *, EMPTYARG )
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
IMPL_LINK( SwEndNoteOptionPage, NumCount, ListBox*, EMPTYARG ) IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG )
{ {
BOOL bEnable = TRUE; BOOL bEnable = TRUE;
if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() ) if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() )
...@@ -430,18 +434,19 @@ IMPL_LINK( SwEndNoteOptionPage, NumCount, ListBox*, EMPTYARG ) ...@@ -430,18 +434,19 @@ IMPL_LINK( SwEndNoteOptionPage, NumCount, ListBox*, EMPTYARG )
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapter, Button *, EMPTYARG ) IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
{ {
if ( !bPosDoc ) if ( !bPosDoc )
SelectNumbering(FTNNUM_DOC); SelectNumbering(FTNNUM_DOC);
bPosDoc = TRUE; bPosDoc = TRUE;
aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
aPageTemplLbl.Enable(); aPageTemplLbl.Enable();
aPageTemplBox.Enable(); aPageTemplBox.Enable();
return 0; return 0;
} }
IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapter, Button *, EMPTYARG ) IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName ) SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
{ {
...@@ -534,6 +539,9 @@ SfxTabPage *SwFootNoteOptionPage::Create(Window *pParent, const SfxItemSet &rSet ...@@ -534,6 +539,9 @@ SfxTabPage *SwFootNoteOptionPage::Create(Window *pParent, const SfxItemSet &rSet
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.5 2001/06/01 11:04:53 fme
Fix #86988#: Redesign of dialogs
Revision 1.4 2001/03/02 14:08:37 os Revision 1.4 2001/03/02 14:08:37 os
extended numbering types available extended numbering types available
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: impfnote.hxx,v $ * $RCSfile: impfnote.hxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: fme $ $Date: 2001-06-01 11:04:53 $ * last change: $Author: os $ $Date: 2001-07-02 11:52:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -118,6 +118,7 @@ class SwEndNoteOptionPage : public SfxTabPage ...@@ -118,6 +118,7 @@ class SwEndNoteOptionPage : public SfxTabPage
FixedLine aContFL; FixedLine aContFL;
String aNumPage; String aNumPage;
String aNumChapter;
SwWrtShell *pSh; SwWrtShell *pSh;
BOOL bPosDoc; BOOL bPosDoc;
BOOL bEndNote; BOOL bEndNote;
...@@ -125,9 +126,9 @@ class SwEndNoteOptionPage : public SfxTabPage ...@@ -125,9 +126,9 @@ class SwEndNoteOptionPage : public SfxTabPage
inline void SelectNumbering(int eNum); inline void SelectNumbering(int eNum);
int GetNumbering() const; int GetNumbering() const;
DECL_LINK( PosPage, Button * ); DECL_LINK( PosPageHdl, Button * );
DECL_LINK( PosChapter, Button * ); DECL_LINK( PosChapterHdl, Button * );
DECL_LINK( NumCount, ListBox * ); DECL_LINK( NumCountHdl, ListBox * );
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment