Index: sw/inc/tox.hxx =================================================================== RCS file: /cvs/sw/sw/inc/tox.hxx,v retrieving revision 1.16 diff -u -p --unified -r1.16 tox.hxx --- sw/inc/tox.hxx 14 Aug 2006 15:35:22 -0000 1.16 +++ sw/inc/tox.hxx 19 Jan 2007 10:14:34 -0000 @@ -365,6 +365,7 @@ class SW_DLLPUBLIC SwForm BOOL bGenerateTabPos : 1; BOOL bIsRelTabPos : 1; BOOL bCommaSeparated : 1; + BOOL bIsPrefixPageNum : 1; public: SwForm( USHORT nType = TOX_CONTENT ); @@ -404,6 +405,9 @@ public: BOOL IsCommaSeparated() const { return bCommaSeparated;} void SetCommaSeparated( BOOL b) { bCommaSeparated = b;} + BOOL IsPrefixPageNum() const { return bIsPrefixPageNum;} + void SetPrefixPageNum( BOOL b) { bIsPrefixPageNum = b;} + static USHORT GetFormMaxLevel( USHORT nType ); static const sal_Char* aFormEntry; // Index: sw/inc/unomap.hxx =================================================================== RCS file: /cvs/sw/sw/inc/unomap.hxx,v retrieving revision 1.58 diff -u -p --unified -r1.58 unomap.hxx --- sw/inc/unomap.hxx 1 Dec 2006 15:34:54 -0000 1.58 +++ sw/inc/unomap.hxx 19 Jan 2007 10:14:34 -0000 @@ -235,6 +235,9 @@ #define WID_IS_COMMA_SEPARATED 1049 #define WID_INDEX_MARKS 1050 #define WID_IS_RELATIVE_TABSTOPS 1051 +// --> beppec56 2006-12-27 #i53420# +#define WID_IS_PREFIX_PAGE_NUMBER 1200 +// <-- #define WID_CREATE_FROM_PARAGRAPH_STYLES 1052 #define WID_IDX_CONTENT_SECTION 1053 #define WID_IDX_HEADER_SECTION 1054 Index: sw/inc/unoprnms.hxx =================================================================== RCS file: /cvs/sw/sw/inc/unoprnms.hxx,v retrieving revision 1.117 diff -u -p --unified -r1.117 unoprnms.hxx --- sw/inc/unoprnms.hxx 1 Dec 2006 15:35:07 -0000 1.117 +++ sw/inc/unoprnms.hxx 19 Jan 2007 10:14:35 -0000 @@ -779,7 +779,10 @@ enum SwPropNameIds // --> OD 2006-03-21 #b6375613# /* 0709 */ UNO_NAME_APPLY_WORKAROUND_FOR_B6375613, /* 0710 */ UNO_NAME_LAYOUT_SIZE, -/* 0711 */ SW_PROPNAME_END +// --> beppec56 2006-12-27 #i53420# +/* 0711 */ UNO_NAME_IS_PREFIX_PAGE_NUMBER, +// <-- +/* 0712 */ SW_PROPNAME_END }; Index: sw/source/core/doc/doctxm.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/doc/doctxm.cxx,v retrieving revision 1.45 diff -u -p --unified -r1.45 doctxm.cxx --- sw/source/core/doc/doctxm.cxx 1 Dec 2006 15:40:02 -0000 1.45 +++ sw/source/core/doc/doctxm.cxx 19 Jan 2007 10:14:36 -0000 @@ -2024,6 +2024,7 @@ void SwTOXBaseSection::UpdatePageNum() // die aktuellen Seitennummern ins Verzeichnis eintragen SwPageFrm* pAktPage = 0; USHORT nPage = 0; + USHORT nPhyPage = 0; SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); SwTOXInternational aIntl( GetLanguage(), @@ -2035,7 +2036,11 @@ void SwTOXBaseSection::UpdatePageNum() { // Schleife ueber alle SourceNodes SvUShorts aNums; //Die Seitennummern + SvUShorts aPhyNums; //the physical page number, used in sorting instead of virtual pages + //if page restart numbering is used then this is a better way than + //using virtual pages SvPtrarr aDescs; //Die PageDescriptoren passend zu den Seitennummern. + SvPtrarr aTOXSources; //The tox source of the page SvUShorts* pMainNums = 0; // contains page numbers of main entries // process run in lines @@ -2087,17 +2092,30 @@ void SwTOXBaseSection::UpdatePageNum() { nPage = pTmpPage->GetVirtPageNum(); pAktPage = pTmpPage; + nPhyPage = pTmpPage->GetPhyPageNum(); } + // if the page number is to be prefixed with chapter number, then + // sometimes the page number restarts from the chapter first page + // we may end up having a topic on the same virtual page + // but instead being on different physical page, + // may be even a different chapter. + // So we'd better use the physical page number as mean of sorting + // the physical page is anyway better than the virtual one since the + // document page flow is from physical page 1 up to the last one + // sortiert einfuegen - for( i = 0; i < aNums.Count() && aNums[i] < nPage; ++i ) + for( i = 0; i < aPhyNums.Count() && aPhyNums[i] < nPhyPage; ++i ) ; - if( i >= aNums.Count() || aNums[ i ] != nPage ) + if( i >= aPhyNums.Count() || aPhyNums[ i ] != nPhyPage ) { + aPhyNums.Insert( nPhyPage, i ); aNums.Insert( nPage, i ); aDescs.Insert( (void*)pAktPage->GetPageDesc(), i ); + aTOXSources.Insert( (void*)&pSortBase->aTOXSources[j] , i ); } + // is it a main entry? if(TOX_SORT_INDEX == pSortBase->GetType() && rTOXSource.bMainEntry) @@ -2116,10 +2134,11 @@ void SwTOXBaseSection::UpdatePageNum() ASSERT( pTxtNd, "kein TextNode, falsches Verzeichnis" ); _UpdatePageNum( (SwTxtNode*)pTxtNd, aNums, aDescs, pMainNums, - aIntl ); + aIntl, aTOXSources ); } DELETEZ(pMainNums); aNums.Remove(0, aNums.Count()); + aPhyNums.Remove(0, aPhyNums.Count()); } } // nach dem Setzen der richtigen Seitennummer, das Mapping-Array @@ -2141,11 +2160,44 @@ BOOL lcl_HasMainEntry( const SvUShorts* return FALSE; } +/* i53420 + * add the string representation of the current chapter number, + * do nothing if no representation available or no chapter numbering scheme used + */ +static void lcl_GetChapterString( const SwTOXSource* pTOXSource,//where the chapter data comes from + String& sToAdd )//the string to add the chapter, if necessary +{ + if( pTOXSource && pTOXSource->pNd) + { + //pTOXSource->pNd is the node cntaining the object being indexed + //be it text or frame or whatever + const SwCntntFrm* pFrm = pTOXSource->pNd->GetFrm(); + if( pFrm ) + { + SwChapterFieldType aFldTyp; + SwChapterField aFld( &aFldTyp,CF_NUMBER ); + aFld.SetLevel( 0 ); +// the following call works even if the 2nd parameter +// if not a text node, e.g. an object node + aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE ); + String sChapter( aFld.GetNumber() ); + if( sChapter.Len() > 0 ) + { + sToAdd += aFld.GetNumber(); + sToAdd += '-'; // this is fixed hyphen, + //can be of course changed to a customizable string + //is needed + } + } + } +} + void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd, const SvUShorts& rNums, const SvPtrarr & rDescs, const SvUShorts* pMainEntryNums, - const SwTOXInternational& rIntl ) + const SwTOXInternational& rIntl, + const SvPtrarr & rTOXSources ) { //collect starts end ends of main entry character style SvUShorts* pCharStyleIdx = pMainEntryNums ? new SvUShorts : 0; @@ -2166,8 +2218,13 @@ void SwTOXBaseSection::_UpdatePageNum( S USHORT nOld = rNums[0], nBeg = nOld, nCount = 0; - String aNumStr( SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ). - GetNumStr( nBeg ) ); +//i53420 + String aNumStr; + BOOL bIsPrefixed = GetTOXForm().IsPrefixPageNum(); + if( bIsPrefixed ) + lcl_GetChapterString( (SwTOXSource*)rTOXSources[0], aNumStr ); + aNumStr += SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ).GetNumStr( nBeg ); + if( pCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg )) { USHORT nTemp = 0; @@ -2223,7 +2280,12 @@ void SwTOXBaseSection::_UpdatePageNum( S aNumStr.AppendAscii( sPageDeli ); //#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr! if(nCount) + { +//i53420 prefix the chapter, if needed + if( bIsPrefixed ) + lcl_GetChapterString( (SwTOXSource*)rTOXSources[i], aNumStr ); aNumStr += aType.GetNumStr( nBeg + nCount ); + } } // neuen String anlegen @@ -2233,6 +2295,9 @@ void SwTOXBaseSection::_UpdatePageNum( S if(pCharStyleIdx && bMainEntryChanges) pCharStyleIdx->Insert(aNumStr.Len(), pCharStyleIdx->Count()); +//i53420 prefix the chapter, if needed + if( bIsPrefixed ) + lcl_GetChapterString( (SwTOXSource *)rTOXSources[i], aNumStr ); aNumStr += aType.GetNumStr( nBeg ); nCount = 0; } @@ -2240,6 +2305,9 @@ void SwTOXBaseSection::_UpdatePageNum( S } else { // Alle Nummern eintragen +//i53420 prefix the chapter, if needed + if( bIsPrefixed ) + lcl_GetChapterString( (SwTOXSource *)rTOXSources[i], aNumStr ); aNumStr += aType.GetNumStr( USHORT(rNums[i]) ); if(i != (rNums.Count()-1)) aNumStr.AppendAscii( sPageDeli ); @@ -2261,8 +2329,13 @@ void SwTOXBaseSection::_UpdatePageNum( S aNumStr.AppendAscii( sPageDeli ); //#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr! if(nCount) + { +//i53420 prefix the chapter, if needed + if( bIsPrefixed ) + lcl_GetChapterString( (SwTOXSource*)rTOXSources[i-1], aNumStr ); aNumStr += SvxNumberType( ((SwPageDesc*)rDescs[i-1])-> GetNumType() ).GetNumStr( nBeg+nCount ); + } } } pNd->Insert( aNumStr, aPos, INS_EMPTYEXPAND ); @@ -2272,7 +2345,7 @@ void SwTOXBaseSection::_UpdatePageNum( S pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.Len(), SETATTR_DONTEXPAND); } - //now the main entries should get there character style + //now the main entries should get their character style if(pCharStyleIdx && pCharStyleIdx->Count() && GetMainEntryCharStyle().Len()) { // eventually the last index must me appended Index: sw/source/core/inc/doctxm.hxx =================================================================== RCS file: /cvs/sw/sw/source/core/inc/doctxm.hxx,v retrieving revision 1.7 diff -u -p --unified -r1.7 doctxm.hxx --- sw/source/core/inc/doctxm.hxx 9 Sep 2005 03:45:20 -0000 1.7 +++ sw/source/core/inc/doctxm.hxx 19 Jan 2007 10:14:36 -0000 @@ -103,7 +103,8 @@ class SwTOXBaseSection : public SwTOXBas const SvUShorts& rNums, const SvPtrarr &rDescs, const SvUShorts* pMainEntryNums, - const SwTOXInternational& rIntl ); + const SwTOXInternational& rIntl, + const SvPtrarr & rTOXSources ); //i53420, added parameter // Bereich fuer Stichwort einfuegen suchen Range GetKeyRange( const String& rStr, const String& rStrReading, Index: sw/source/core/tox/tox.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/tox/tox.cxx,v retrieving revision 1.18 diff -u -p --unified -r1.18 tox.cxx --- sw/source/core/tox/tox.cxx 16 Sep 2006 21:43:08 -0000 1.18 +++ sw/source/core/tox/tox.cxx 19 Jan 2007 10:14:36 -0000 @@ -327,6 +327,7 @@ SwForm::SwForm( USHORT nTyp ) // #i21237 bCommaSeparated(FALSE) { //bHasFirstTabPos = + bIsPrefixPageNum = bGenerateTabPos = FALSE; bIsRelTabPos = TRUE; @@ -429,6 +430,7 @@ SwForm& SwForm::operator=(const SwForm& // bHasFirstTabPos = rForm.bHasFirstTabPos; bGenerateTabPos = rForm.bGenerateTabPos; bIsRelTabPos = rForm.bIsRelTabPos; + bIsPrefixPageNum = rForm.bIsPrefixPageNum; bCommaSeparated = rForm.bCommaSeparated; for(USHORT i=0; i < nFormMaxLevel; ++i) { Index: sw/source/core/unocore/unoidx.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/unocore/unoidx.cxx,v retrieving revision 1.60 diff -u -p --unified -r1.60 unoidx.cxx --- sw/source/core/unocore/unoidx.cxx 16 Sep 2006 21:57:39 -0000 1.60 +++ sw/source/core/unocore/unoidx.cxx 19 Jan 2007 10:14:37 -0000 @@ -664,6 +664,10 @@ void SwXDocumentIndex::setPropertyValue( bForm = sal_True; aForm.SetRelTabPos(lcl_AnyToBool(aValue)); break; + case WID_IS_PREFIX_PAGE_NUMBER: //i53420 + bForm = sal_True; + aForm.SetPrefixPageNum(lcl_AnyToBool(aValue)); + break; case WID_PARA_SEP : { String aString; @@ -1002,6 +1006,9 @@ uno::Any SwXDocumentIndex::getPropertyVa case WID_IS_RELATIVE_TABSTOPS: bRet = rForm.IsRelTabPos(); break; + case WID_IS_PREFIX_PAGE_NUMBER: + bRet = rForm.IsPrefixPageNum();//i53420 + break; case WID_INDEX_MARKS: { SwTOXMarks aMarks; Index: sw/source/core/unocore/unomap.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/unocore/unomap.cxx,v retrieving revision 1.192 diff -u -p --unified -r1.192 unomap.cxx --- sw/source/core/unocore/unomap.cxx 1 Dec 2006 15:51:41 -0000 1.192 +++ sw/source/core/unocore/unomap.cxx 19 Jan 2007 10:14:37 -0000 @@ -1394,6 +1394,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_LOCALE), WID_IDX_LOCALE, CPPU_E2T(CPPUTYPE_LOCALE), PROPERTY_NONE, 0},\ { SW_PROP_NMID(UNO_NAME_SORT_ALGORITHM), WID_IDX_SORT_ALGORITHM, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},\ + //--> beppec56 2006-12-27 #i53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXIndexMap_Impl; @@ -1434,6 +1437,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL10), WID_PARA_LEV10, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK), PropertyAttribute::READONLY ,0 }, + //--> beppec56 2006-12-27 #ii53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXContentMap_Impl; @@ -1476,6 +1482,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK), PropertyAttribute::READONLY ,0 }, { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_USER_INDEX_NAME), WID_USER_IDX_NAME, CPPU_E2T(CPPUTYPE_OUSTRING) , PROPERTY_NONE, 0}, + //--> beppec56 2006-12-27 #i53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXUserMap_Impl; @@ -1501,6 +1510,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), WID_PARA_HEAD, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), WID_PARA_LEV1, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //--> beppec56 2006-12-27 #i53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXTablesMap_Impl; @@ -1529,6 +1541,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), WID_PARA_HEAD, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), WID_PARA_LEV1, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //--> beppec56 2006-12-27 #i53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXObjectsMap_Impl; @@ -1555,6 +1570,9 @@ const SfxItemPropertyMap* SwUnoPropertyM { SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), WID_PARA_HEAD, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), WID_PARA_LEV1, CPPU_E2T(CPPUTYPE_OUSTRING) , 0, 0}, { SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //--> beppec56 2006-12-27 #i53420# + { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, + //<-- {0,0,0,0,0} }; aMapArr[nPropertyId] = aTOXIllustrationsMap_Impl; Index: sw/source/core/unocore/unoprnms.cxx =================================================================== RCS file: /cvs/sw/sw/source/core/unocore/unoprnms.cxx,v retrieving revision 1.125 diff -u -p --unified -r1.125 unoprnms.cxx --- sw/source/core/unocore/unoprnms.cxx 1 Dec 2006 15:52:26 -0000 1.125 +++ sw/source/core/unocore/unoprnms.cxx 19 Jan 2007 10:14:38 -0000 @@ -765,7 +765,8 @@ const SwPropNameTab aPropNameTab = { /* 0707 UNO_CHAR_AUTO_STYLE_NAME */ {MAP_CHAR_LEN("CharAutoStyleName")}, /* 0708 UNO_PARA_AUTO_STYLE_NAME */ {MAP_CHAR_LEN("ParaAutoStyleName")}, /* 0709 UNO_NAME_APPLY_WORKAROUND_FOR_B6375613*/ {MAP_CHAR_LEN("ApplyWorkaroundForB6375613")}, -/* 0710 UNO_NAME_LAYOUT_SIZE*/ {MAP_CHAR_LEN("LayoutSize")} +/* 0710 UNO_NAME_LAYOUT_SIZE*/ {MAP_CHAR_LEN("LayoutSize")}, +/* 0711 UNO_NAME_IS_PREFIX_PAGE_NUMBER*/ {MAP_CHAR_LEN("IsPrefixPageNumber")} }; const SwPropNameLen& SwGetPropName( USHORT nId ) Index: sw/source/ui/inc/swuicnttab.hxx =================================================================== RCS file: /cvs/sw/sw/source/ui/inc/swuicnttab.hxx,v retrieving revision 1.3 diff -u -p --unified -r1.3 swuicnttab.hxx --- sw/source/ui/inc/swuicnttab.hxx 9 Sep 2005 10:05:37 -0000 1.3 +++ sw/source/ui/inc/swuicnttab.hxx 19 Jan 2007 10:14:38 -0000 @@ -447,6 +447,7 @@ class SwTOXEntryTabPage : public SfxTabP FixedLine aEntryFL; CheckBox aRelToStyleCB; // position relative to the right margin of the para style + CheckBox aPrefixPageNumCB; // prefix the page numbers with chapter numbers FixedText aMainEntryStyleFT; ListBox aMainEntryStyleLB; // character style of main entries in indexes CheckBox aAlphaDelimCB; @@ -485,6 +486,7 @@ class SwTOXEntryTabPage : public SfxTabP Point aRelToStylePos; Point aRelToStyleIdxPos; + Point aPrefixPageNumPos; //to dinamically position the checkbox Size aLevelFLSize; CurTOXType aLastTOXType; Index: sw/source/ui/index/cnttab.cxx =================================================================== RCS file: /cvs/sw/sw/source/ui/index/cnttab.cxx,v retrieving revision 1.69 diff -u -p --unified -r1.69 cnttab.cxx --- sw/source/ui/index/cnttab.cxx 16 Sep 2006 23:03:52 -0000 1.69 +++ sw/source/ui/index/cnttab.cxx 19 Jan 2007 10:14:42 -0000 @@ -2107,6 +2107,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Win aAutoRightCB(this, ResId(CB_AUTORIGHT )), aEntryFL(this, ResId(FL_ENTRY )), aRelToStyleCB(this, ResId(CB_RELTOSTYLE )), + aPrefixPageNumCB(this, ResId(CB_PRE_PAGE_NUM )), aMainEntryStyleFT(this, ResId(FT_MAIN_ENTRY_STYLE)), aMainEntryStyleLB(this, ResId(LB_MAIN_ENTRY_STYLE)), aAlphaDelimCB(this, ResId(CB_ALPHADELIM )), @@ -2187,6 +2188,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Win aAlphaDelimCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); + aPrefixPageNumCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); FieldUnit aMetric = ::GetDfltMetric(FALSE); SetMetric(aTabPosMF, aMetric); @@ -2209,6 +2211,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Win aRelToStyleIdxPos = aCommaSeparatedCB.GetPosPixel(); aRelToStyleIdxPos.Y() += (aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y()); + aPrefixPageNumPos = aPrefixPageNumCB.GetPosPixel(); aEditStylePB.Enable(sal_False); //fill the types in @@ -2301,6 +2304,7 @@ void SwTOXEntryTabPage::Reset( const Sfx } aRelToStyleCB.Check(pCurrentForm->IsRelTabPos()); aCommaSeparatedCB.Check(pCurrentForm->IsCommaSeparated()); + aPrefixPageNumCB.Check(pCurrentForm->IsPrefixPageNum()); } /*-- 16.06.99 10:47:34--------------------------------------------------- @@ -2470,6 +2474,7 @@ void SwTOXEntryTabPage::ActivatePage( co aEntryNoPB.Show( bToxIsContent ); aHyperLinkPB.Show( bToxIsContent ); aRelToStyleCB.Show( !bToxIsAuthorities ); + aPrefixPageNumCB.Show( !bToxIsAuthorities ); aChapterInfoPB.Show( bToxIsIndex ); aEntryPB.Show( !bToxIsAuthorities ); aPageNoPB.Show( !bToxIsAuthorities ); @@ -2497,6 +2502,11 @@ void SwTOXEntryTabPage::ActivatePage( co aRelToStyleCB.SetPosPixel( bToxIsIndex ? aRelToStyleIdxPos : aRelToStylePos ); + Point aOtherPrefixPageNumPos( aPrefixPageNumPos ); + aOtherPrefixPageNumPos.Y() += (aRelToStyleIdxPos.Y() - aRelToStylePos.Y()); + aPrefixPageNumCB.SetPosPixel( bToxIsIndex ? aOtherPrefixPageNumPos + : aPrefixPageNumPos ); + // aRecalcTabCB.Show( aCurType.eType == TOX_CONTENT); aMainEntryStyleFT.Show( bToxIsIndex ); @@ -2552,6 +2562,8 @@ void SwTOXEntryTabPage::UpdateDescriptor } if(aCommaSeparatedCB.IsVisible()) pCurrentForm->SetCommaSeparated(aCommaSeparatedCB.IsChecked()); + if(aPrefixPageNumCB.IsVisible()) + pCurrentForm->SetPrefixPageNum(aPrefixPageNumCB.IsChecked()); } /*-- 16.06.99 10:47:34--------------------------------------------------- Index: sw/source/ui/index/cnttab.hrc =================================================================== RCS file: /cvs/sw/sw/source/ui/index/cnttab.hrc,v retrieving revision 1.8 diff -u -p --unified -r1.8 cnttab.hrc --- sw/source/ui/index/cnttab.hrc 9 Sep 2005 10:21:18 -0000 1.8 +++ sw/source/ui/index/cnttab.hrc 19 Jan 2007 10:14:42 -0000 @@ -142,6 +142,7 @@ #define MF_TABPOS 52 #define CB_AUTORIGHT 53 #define CB_RELTOSTYLE 54 +#define CB_PRE_PAGE_NUM 55 #define CB_RECALCTAB 56 #define CB_NUMSTYLEFROMPDESC 57 #define CB_ALPHADELIM 58 Index: sw/source/ui/index/cnttab.src =================================================================== RCS file: /cvs/sw/sw/source/ui/index/cnttab.src,v retrieving revision 1.74 diff -u -p --unified -r1.74 cnttab.src --- sw/source/ui/index/cnttab.src 23 Sep 2005 13:06:59 -0000 1.74 +++ sw/source/ui/index/cnttab.src 19 Jan 2007 10:14:42 -0000 @@ -1032,6 +1032,13 @@ TabPage TP_TOX_ENTRY Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent"; Text [ x-comment ] = " "; }; + CheckBox CB_PRE_PAGE_NUM + { + Pos = MAP_APPFONT ( 37 , 122 ) ; + Size = MAP_APPFONT ( 200, 10 ) ; + Text [ en-US ] = "Prefix page numbers with chapter number"; + Text [ x-comment ] = " "; + }; FixedText FT_MAIN_ENTRY_STYLE { Pos = MAP_APPFONT ( 37 , 112 ) ;