View | Details | Raw Unified | Return to issue 53420
Collapse All | Expand All

(-)sw/inc/tox.hxx (+4 lines)
Lines 365-370 class SW_DLLPUBLIC SwForm Link Here
365
	BOOL 	bGenerateTabPos : 1;
365
	BOOL 	bGenerateTabPos : 1;
366
	BOOL 	bIsRelTabPos : 1;
366
	BOOL 	bIsRelTabPos : 1;
367
	BOOL	bCommaSeparated : 1;
367
	BOOL	bCommaSeparated : 1;
368
    BOOL    bIsPrefixPageNum : 1;
368
369
369
public:
370
public:
370
	SwForm( USHORT nType = TOX_CONTENT );
371
	SwForm( USHORT nType = TOX_CONTENT );
Lines 404-409 public: Link Here
404
	BOOL IsCommaSeparated() const 		{ return bCommaSeparated;}
405
	BOOL IsCommaSeparated() const 		{ return bCommaSeparated;}
405
	void SetCommaSeparated( BOOL b)		{ bCommaSeparated = b;}
406
	void SetCommaSeparated( BOOL b)		{ bCommaSeparated = b;}
406
407
408
    BOOL IsPrefixPageNum() const        { return bIsPrefixPageNum;}
409
    void SetPrefixPageNum( BOOL b)      { bIsPrefixPageNum = b;}
410
407
	static USHORT GetFormMaxLevel( USHORT nType );
411
	static USHORT GetFormMaxLevel( USHORT nType );
408
412
409
	static const sal_Char*	aFormEntry;				// <E>
413
	static const sal_Char*	aFormEntry;				// <E>
(-)sw/inc/unomap.hxx (+3 lines)
Lines 235-240 Link Here
235
#define WID_IS_COMMA_SEPARATED                  1049
235
#define WID_IS_COMMA_SEPARATED                  1049
236
#define WID_INDEX_MARKS                         1050
236
#define WID_INDEX_MARKS                         1050
237
#define WID_IS_RELATIVE_TABSTOPS				1051
237
#define WID_IS_RELATIVE_TABSTOPS				1051
238
// --> beppec56 2006-12-27 #i53420#
239
#define WID_IS_PREFIX_PAGE_NUMBER             1200
240
// <--
238
#define WID_CREATE_FROM_PARAGRAPH_STYLES		1052
241
#define WID_CREATE_FROM_PARAGRAPH_STYLES		1052
239
#define WID_IDX_CONTENT_SECTION					1053
242
#define WID_IDX_CONTENT_SECTION					1053
240
#define WID_IDX_HEADER_SECTION                  1054
243
#define WID_IDX_HEADER_SECTION                  1054
(-)sw/inc/unoprnms.hxx (-1 / +4 lines)
Lines 779-785 enum SwPropNameIds Link Here
779
// --> OD 2006-03-21 #b6375613#
779
// --> OD 2006-03-21 #b6375613#
780
/* 0709 */  UNO_NAME_APPLY_WORKAROUND_FOR_B6375613,
780
/* 0709 */  UNO_NAME_APPLY_WORKAROUND_FOR_B6375613,
781
/* 0710 */  UNO_NAME_LAYOUT_SIZE,
781
/* 0710 */  UNO_NAME_LAYOUT_SIZE,
782
/* 0711 */  SW_PROPNAME_END
782
// --> beppec56 2006-12-27 #i53420#
783
/* 0711 */  UNO_NAME_IS_PREFIX_PAGE_NUMBER,
784
// <--
785
/* 0712 */  SW_PROPNAME_END
783
};
786
};
784
787
785
788
(-)sw/source/core/doc/doctxm.cxx (-7 / +80 lines)
Lines 2024-2029 void SwTOXBaseSection::UpdatePageNum() Link Here
2024
	// die aktuellen Seitennummern ins Verzeichnis eintragen
2024
	// die aktuellen Seitennummern ins Verzeichnis eintragen
2025
	SwPageFrm*	pAktPage	= 0;
2025
	SwPageFrm*	pAktPage	= 0;
2026
	USHORT		nPage		= 0;
2026
	USHORT		nPage		= 0;
2027
    USHORT      nPhyPage    = 0;
2027
	SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
2028
	SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
2028
2029
2029
    SwTOXInternational aIntl( GetLanguage(),
2030
    SwTOXInternational aIntl( GetLanguage(),
Lines 2035-2041 void SwTOXBaseSection::UpdatePageNum() Link Here
2035
	{
2036
	{
2036
		// Schleife ueber alle SourceNodes
2037
		// Schleife ueber alle SourceNodes
2037
		SvUShorts aNums;		//Die Seitennummern
2038
		SvUShorts aNums;		//Die Seitennummern
2039
        SvUShorts aPhyNums;		//the physical page number, used in sorting instead of virtual pages
2040
                                //if page restart numbering is used then this is a better way than
2041
                                //using virtual pages
2038
		SvPtrarr  aDescs;		//Die PageDescriptoren passend zu den Seitennummern.
2042
		SvPtrarr  aDescs;		//Die PageDescriptoren passend zu den Seitennummern.
2043
        SvPtrarr  aTOXSources;  //The tox source of the page
2039
		SvUShorts* pMainNums = 0; // contains page numbers of main entries
2044
		SvUShorts* pMainNums = 0; // contains page numbers of main entries
2040
2045
2041
		// process run in lines
2046
		// process run in lines
Lines 2087-2103 void SwTOXBaseSection::UpdatePageNum() Link Here
2087
					{
2092
					{
2088
						nPage		= pTmpPage->GetVirtPageNum();
2093
						nPage		= pTmpPage->GetVirtPageNum();
2089
						pAktPage	= pTmpPage;
2094
						pAktPage	= pTmpPage;
2095
                        nPhyPage    = pTmpPage->GetPhyPageNum();
2090
					}
2096
					}
2091
2097
2098
                    // if the page number is to be prefixed with chapter number, then
2099
                    // sometimes the page number restarts from the chapter first page
2100
                    // we may end up having a topic on the same virtual page
2101
                    // but instead being on different physical page,
2102
                    // may be even a different chapter.
2103
                    // So we'd better use the physical page number as mean of sorting
2104
                    // the physical page is anyway better than the virtual one since the
2105
                    // document page flow is from physical page 1 up to the last one
2106
2092
					// sortiert einfuegen
2107
					// sortiert einfuegen
2093
					for( i = 0; i < aNums.Count() && aNums[i] < nPage; ++i )
2108
                    for( i = 0; i < aPhyNums.Count() && aPhyNums[i] < nPhyPage; ++i )
2094
						;
2109
						;
2095
2110
2096
					if( i >= aNums.Count() || aNums[ i ] != nPage )
2111
                    if( i >= aPhyNums.Count() || aPhyNums[ i ] != nPhyPage )
2097
					{
2112
					{
2113
                        aPhyNums.Insert( nPhyPage, i );
2098
						aNums.Insert( nPage, i );
2114
						aNums.Insert( nPage, i );
2099
						aDescs.Insert( (void*)pAktPage->GetPageDesc(), i );
2115
						aDescs.Insert( (void*)pAktPage->GetPageDesc(), i );
2116
                        aTOXSources.Insert( (void*)&pSortBase->aTOXSources[j] , i );
2100
					}
2117
					}
2118
2101
					// is it a main entry?
2119
					// is it a main entry?
2102
					if(TOX_SORT_INDEX == pSortBase->GetType() &&
2120
					if(TOX_SORT_INDEX == pSortBase->GetType() &&
2103
						rTOXSource.bMainEntry)
2121
						rTOXSource.bMainEntry)
Lines 2116-2125 void SwTOXBaseSection::UpdatePageNum() Link Here
2116
				ASSERT( pTxtNd, "kein TextNode, falsches Verzeichnis" );
2134
				ASSERT( pTxtNd, "kein TextNode, falsches Verzeichnis" );
2117
2135
2118
				_UpdatePageNum( (SwTxtNode*)pTxtNd, aNums, aDescs, pMainNums,
2136
				_UpdatePageNum( (SwTxtNode*)pTxtNd, aNums, aDescs, pMainNums,
2119
								aIntl );
2137
                                aIntl, aTOXSources );
2120
			}
2138
			}
2121
			DELETEZ(pMainNums);
2139
			DELETEZ(pMainNums);
2122
			aNums.Remove(0, aNums.Count());
2140
			aNums.Remove(0, aNums.Count());
2141
            aPhyNums.Remove(0, aPhyNums.Count());
2123
		}
2142
		}
2124
	}
2143
	}
2125
	// nach dem Setzen der richtigen Seitennummer, das Mapping-Array
2144
	// nach dem Setzen der richtigen Seitennummer, das Mapping-Array
Lines 2141-2151 BOOL lcl_HasMainEntry( const SvUShorts* Link Here
2141
	return FALSE;
2160
	return FALSE;
2142
}
2161
}
2143
2162
2163
/* i53420
2164
 * add the string representation of the current chapter number, 
2165
 * do nothing if no representation available or no chapter numbering scheme used
2166
 */
2167
static void lcl_GetChapterString( const SwTOXSource* pTOXSource,//where the chapter data comes from
2168
                           String& sToAdd )//the string to add the chapter, if necessary
2169
{
2170
    if( pTOXSource && pTOXSource->pNd)
2171
    {
2172
        //pTOXSource->pNd is the node cntaining the object being indexed
2173
        //be it text or frame or whatever
2174
        const SwCntntFrm* pFrm = pTOXSource->pNd->GetFrm();
2175
        if( pFrm )
2176
        {
2177
            SwChapterFieldType aFldTyp;
2178
            SwChapterField aFld( &aFldTyp,CF_NUMBER );
2179
            aFld.SetLevel( 0 );
2180
// the following call works even if the 2nd parameter
2181
// if not a text node, e.g. an object node
2182
            aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE );
2183
            String sChapter( aFld.GetNumber() );
2184
            if( sChapter.Len() > 0 )
2185
            {
2186
                sToAdd += aFld.GetNumber();
2187
                sToAdd += '-'; // this is fixed hyphen,
2188
                //can be of course changed to a customizable string
2189
                //is needed
2190
            }
2191
        }
2192
     }
2193
}
2194
2144
void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
2195
void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
2145
									const SvUShorts& rNums,
2196
									const SvUShorts& rNums,
2146
									const SvPtrarr & rDescs,
2197
									const SvPtrarr & rDescs,
2147
									const SvUShorts* pMainEntryNums,
2198
									const SvUShorts* pMainEntryNums,
2148
									const SwTOXInternational& rIntl )
2199
                                    const SwTOXInternational& rIntl,
2200
                                    const SvPtrarr & rTOXSources )
2149
{
2201
{
2150
	//collect starts end ends of main entry character style
2202
	//collect starts end ends of main entry character style
2151
	SvUShorts* pCharStyleIdx = pMainEntryNums ? new SvUShorts : 0;
2203
	SvUShorts* pCharStyleIdx = pMainEntryNums ? new SvUShorts : 0;
Lines 2166-2173 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2166
	USHORT nOld = rNums[0],
2218
	USHORT nOld = rNums[0],
2167
		   nBeg = nOld,
2219
		   nBeg = nOld,
2168
		   nCount  = 0;
2220
		   nCount  = 0;
2169
	String aNumStr( SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ).
2221
//i53420
2170
					GetNumStr( nBeg ) );
2222
    String aNumStr;
2223
    BOOL    bIsPrefixed = GetTOXForm().IsPrefixPageNum();
2224
    if( bIsPrefixed )
2225
        lcl_GetChapterString( (SwTOXSource*)rTOXSources[0], aNumStr );
2226
    aNumStr += SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ).GetNumStr( nBeg );
2227
2171
	if( pCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg ))
2228
	if( pCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg ))
2172
	{
2229
	{
2173
		USHORT nTemp = 0;
2230
		USHORT nTemp = 0;
Lines 2223-2229 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2223
						aNumStr.AppendAscii( sPageDeli );
2280
						aNumStr.AppendAscii( sPageDeli );
2224
//#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr!
2281
//#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr!
2225
					if(nCount)
2282
					if(nCount)
2283
                    {
2284
//i53420 prefix the chapter, if needed
2285
                        if( bIsPrefixed )
2286
                            lcl_GetChapterString( (SwTOXSource*)rTOXSources[i], aNumStr );
2226
						aNumStr += aType.GetNumStr( nBeg + nCount );
2287
						aNumStr += aType.GetNumStr( nBeg + nCount );
2288
                    }
2227
				}
2289
				}
2228
2290
2229
				// neuen String anlegen
2291
				// neuen String anlegen
Lines 2233-2238 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2233
				if(pCharStyleIdx && bMainEntryChanges)
2295
				if(pCharStyleIdx && bMainEntryChanges)
2234
					pCharStyleIdx->Insert(aNumStr.Len(),
2296
					pCharStyleIdx->Insert(aNumStr.Len(),
2235
													pCharStyleIdx->Count());
2297
													pCharStyleIdx->Count());
2298
//i53420 prefix the chapter, if needed
2299
                if( bIsPrefixed )
2300
                    lcl_GetChapterString( (SwTOXSource *)rTOXSources[i], aNumStr );
2236
				aNumStr += aType.GetNumStr( nBeg );
2301
				aNumStr += aType.GetNumStr( nBeg );
2237
				nCount	 = 0;
2302
				nCount	 = 0;
2238
			}
2303
			}
Lines 2240-2245 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2240
		}
2305
		}
2241
		else
2306
		else
2242
		{	// Alle Nummern eintragen
2307
		{	// Alle Nummern eintragen
2308
//i53420 prefix the chapter, if needed
2309
            if( bIsPrefixed )
2310
                lcl_GetChapterString( (SwTOXSource *)rTOXSources[i], aNumStr );
2243
			aNumStr += aType.GetNumStr( USHORT(rNums[i]) );
2311
			aNumStr += aType.GetNumStr( USHORT(rNums[i]) );
2244
			if(i != (rNums.Count()-1))
2312
			if(i != (rNums.Count()-1))
2245
				aNumStr.AppendAscii( sPageDeli );
2313
				aNumStr.AppendAscii( sPageDeli );
Lines 2261-2268 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2261
				aNumStr.AppendAscii( sPageDeli );
2329
				aNumStr.AppendAscii( sPageDeli );
2262
//#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr!
2330
//#58127# Wenn nCount == 0, dann steht die einzige Seitenzahl schon im aNumStr!
2263
			if(nCount)
2331
			if(nCount)
2332
            {
2333
//i53420 prefix the chapter, if needed
2334
                if( bIsPrefixed )
2335
                    lcl_GetChapterString( (SwTOXSource*)rTOXSources[i-1], aNumStr );
2264
				aNumStr += SvxNumberType( ((SwPageDesc*)rDescs[i-1])->
2336
				aNumStr += SvxNumberType( ((SwPageDesc*)rDescs[i-1])->
2265
								GetNumType() ).GetNumStr( nBeg+nCount );
2337
								GetNumType() ).GetNumStr( nBeg+nCount );
2338
            }
2266
		}
2339
		}
2267
	}
2340
	}
2268
	pNd->Insert( aNumStr, aPos, INS_EMPTYEXPAND );
2341
	pNd->Insert( aNumStr, aPos, INS_EMPTYEXPAND );
Lines 2272-2278 void SwTOXBaseSection::_UpdatePageNum( S Link Here
2272
        pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.Len(), SETATTR_DONTEXPAND);
2345
        pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.Len(), SETATTR_DONTEXPAND);
2273
    }
2346
    }
2274
2347
2275
	//now the main entries should get there character style
2348
	//now the main entries should get their character style
2276
	if(pCharStyleIdx && pCharStyleIdx->Count() && GetMainEntryCharStyle().Len())
2349
	if(pCharStyleIdx && pCharStyleIdx->Count() && GetMainEntryCharStyle().Len())
2277
	{
2350
	{
2278
		// eventually the last index must me appended
2351
		// eventually the last index must me appended
(-)sw/source/core/inc/doctxm.hxx (-1 / +2 lines)
Lines 103-109 class SwTOXBaseSection : public SwTOXBas Link Here
103
							const SvUShorts& rNums,
103
							const SvUShorts& rNums,
104
							const SvPtrarr &rDescs,
104
							const SvPtrarr &rDescs,
105
							const SvUShorts* pMainEntryNums,
105
							const SvUShorts* pMainEntryNums,
106
							const SwTOXInternational& rIntl );
106
							const SwTOXInternational& rIntl,
107
                            const SvPtrarr & rTOXSources ); //i53420, added parameter
107
108
108
	// Bereich fuer Stichwort einfuegen suchen
109
	// Bereich fuer Stichwort einfuegen suchen
109
    Range GetKeyRange( const String& rStr, const String& rStrReading,
110
    Range GetKeyRange( const String& rStr, const String& rStrReading,
(-)sw/source/core/tox/tox.cxx (+2 lines)
Lines 327-332 SwForm::SwForm( USHORT nTyp ) // #i21237 Link Here
327
    bCommaSeparated(FALSE)
327
    bCommaSeparated(FALSE)
328
{
328
{
329
    //bHasFirstTabPos =
329
    //bHasFirstTabPos =
330
    bIsPrefixPageNum =
330
    bGenerateTabPos = FALSE;
331
    bGenerateTabPos = FALSE;
331
    bIsRelTabPos = TRUE;
332
    bIsRelTabPos = TRUE;
332
333
Lines 429-434 SwForm& SwForm::operator=(const SwForm& Link Here
429
//  bHasFirstTabPos = rForm.bHasFirstTabPos;
430
//  bHasFirstTabPos = rForm.bHasFirstTabPos;
430
    bGenerateTabPos = rForm.bGenerateTabPos;
431
    bGenerateTabPos = rForm.bGenerateTabPos;
431
    bIsRelTabPos = rForm.bIsRelTabPos;
432
    bIsRelTabPos = rForm.bIsRelTabPos;
433
    bIsPrefixPageNum = rForm.bIsPrefixPageNum;
432
    bCommaSeparated = rForm.bCommaSeparated;
434
    bCommaSeparated = rForm.bCommaSeparated;
433
    for(USHORT i=0; i < nFormMaxLevel; ++i)
435
    for(USHORT i=0; i < nFormMaxLevel; ++i)
434
    {
436
    {
(-)sw/source/core/unocore/unoidx.cxx (+7 lines)
Lines 664-669 void SwXDocumentIndex::setPropertyValue( Link Here
664
				bForm = sal_True;
664
				bForm = sal_True;
665
				aForm.SetRelTabPos(lcl_AnyToBool(aValue));
665
				aForm.SetRelTabPos(lcl_AnyToBool(aValue));
666
			break;
666
			break;
667
        case WID_IS_PREFIX_PAGE_NUMBER: //i53420
668
                bForm = sal_True;
669
                aForm.SetPrefixPageNum(lcl_AnyToBool(aValue));
670
            break;
667
			case WID_PARA_SEP              :
671
			case WID_PARA_SEP              :
668
			{
672
			{
669
				String aString;
673
				String aString;
Lines 1002-1007 uno::Any SwXDocumentIndex::getPropertyVa Link Here
1002
			case WID_IS_RELATIVE_TABSTOPS:
1006
			case WID_IS_RELATIVE_TABSTOPS:
1003
				bRet = rForm.IsRelTabPos();
1007
				bRet = rForm.IsRelTabPos();
1004
			break;
1008
			break;
1009
            case WID_IS_PREFIX_PAGE_NUMBER:
1010
                bRet = rForm.IsPrefixPageNum();//i53420
1011
            break;
1005
			case WID_INDEX_MARKS:
1012
			case WID_INDEX_MARKS:
1006
			{
1013
			{
1007
				SwTOXMarks aMarks;
1014
				SwTOXMarks aMarks;
(-)sw/source/core/unocore/unomap.cxx (+18 lines)
Lines 1394-1399 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1394
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1394
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1395
                    { SW_PROP_NMID(UNO_NAME_LOCALE),            WID_IDX_LOCALE,         CPPU_E2T(CPPUTYPE_LOCALE), PROPERTY_NONE,     0},\
1395
                    { SW_PROP_NMID(UNO_NAME_LOCALE),            WID_IDX_LOCALE,         CPPU_E2T(CPPUTYPE_LOCALE), PROPERTY_NONE,     0},\
1396
                    { SW_PROP_NMID(UNO_NAME_SORT_ALGORITHM),    WID_IDX_SORT_ALGORITHM,  CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE,     0},\
1396
                    { SW_PROP_NMID(UNO_NAME_SORT_ALGORITHM),    WID_IDX_SORT_ALGORITHM,  CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE,     0},\
1397
                    //--> beppec56 2006-12-27 #i53420#
1398
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1399
                    //<--
1397
                    {0,0,0,0,0}
1400
                    {0,0,0,0,0}
1398
				};
1401
				};
1399
				aMapArr[nPropertyId] = aTOXIndexMap_Impl;
1402
				aMapArr[nPropertyId] = aTOXIndexMap_Impl;
Lines 1434-1439 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1434
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL10), 	WID_PARA_LEV10, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1437
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL10), 	WID_PARA_LEV10, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1435
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1438
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1436
					{ SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK),			PropertyAttribute::READONLY ,0		 },
1439
					{ SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK),			PropertyAttribute::READONLY ,0		 },
1440
                    //--> beppec56 2006-12-27 #ii53420#
1441
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1442
                    //<--
1437
					{0,0,0,0,0}
1443
					{0,0,0,0,0}
1438
				};
1444
				};
1439
				aMapArr[nPropertyId] = aTOXContentMap_Impl;
1445
				aMapArr[nPropertyId] = aTOXContentMap_Impl;
Lines 1476-1481 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1476
					{ SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK),			PropertyAttribute::READONLY ,0		 },
1482
					{ SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARKS), WID_INDEX_MARKS, CPPU_E2T(CPPUTYPE_DOCIDXMRK),			PropertyAttribute::READONLY ,0		 },
1477
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1483
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1478
                    { SW_PROP_NMID(UNO_NAME_USER_INDEX_NAME), WID_USER_IDX_NAME,    CPPU_E2T(CPPUTYPE_OUSTRING)  ,      PROPERTY_NONE,     0},
1484
                    { SW_PROP_NMID(UNO_NAME_USER_INDEX_NAME), WID_USER_IDX_NAME,    CPPU_E2T(CPPUTYPE_OUSTRING)  ,      PROPERTY_NONE,     0},
1485
                    //--> beppec56 2006-12-27 #i53420#
1486
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1487
                    //<--
1479
                    {0,0,0,0,0}
1488
                    {0,0,0,0,0}
1480
				};
1489
				};
1481
				aMapArr[nPropertyId] = aTOXUserMap_Impl;
1490
				aMapArr[nPropertyId] = aTOXUserMap_Impl;
Lines 1501-1506 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1501
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1510
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1502
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1511
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1503
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1512
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1513
                    //--> beppec56 2006-12-27 #i53420#
1514
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1515
                    //<--
1504
					{0,0,0,0,0}
1516
					{0,0,0,0,0}
1505
				};
1517
				};
1506
				aMapArr[nPropertyId] = aTOXTablesMap_Impl;
1518
				aMapArr[nPropertyId] = aTOXTablesMap_Impl;
Lines 1529-1534 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1529
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1541
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1530
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1542
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1531
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1543
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1544
                    //--> beppec56 2006-12-27 #i53420#
1545
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1546
                    //<--
1532
					{0,0,0,0,0}
1547
					{0,0,0,0,0}
1533
				};
1548
				};
1534
				aMapArr[nPropertyId] = aTOXObjectsMap_Impl;
1549
				aMapArr[nPropertyId] = aTOXObjectsMap_Impl;
Lines 1555-1560 const SfxItemPropertyMap* SwUnoPropertyM Link Here
1555
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1570
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLEHEADING), 	WID_PARA_HEAD, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1556
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1571
					{ SW_PROP_NMID(UNO_NAME_PARA_STYLELEVEL1), 	WID_PARA_LEV1, 	CPPU_E2T(CPPUTYPE_OUSTRING)  , 0,     0},
1557
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1572
					{ SW_PROP_NMID(UNO_NAME_IS_RELATIVE_TABSTOPS), WID_IS_RELATIVE_TABSTOPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1573
                    //--> beppec56 2006-12-27 #i53420#
1574
                    { SW_PROP_NMID(UNO_NAME_IS_PREFIX_PAGE_NUMBER), WID_IS_PREFIX_PAGE_NUMBER, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
1575
                    //<--
1558
					{0,0,0,0,0}
1576
					{0,0,0,0,0}
1559
				};
1577
				};
1560
				aMapArr[nPropertyId] = aTOXIllustrationsMap_Impl;
1578
				aMapArr[nPropertyId] = aTOXIllustrationsMap_Impl;
(-)sw/source/core/unocore/unoprnms.cxx (-1 / +2 lines)
Lines 765-771 const SwPropNameTab aPropNameTab = { Link Here
765
/* 0707 UNO_CHAR_AUTO_STYLE_NAME */     {MAP_CHAR_LEN("CharAutoStyleName")},
765
/* 0707 UNO_CHAR_AUTO_STYLE_NAME */     {MAP_CHAR_LEN("CharAutoStyleName")},
766
/* 0708 UNO_PARA_AUTO_STYLE_NAME */     {MAP_CHAR_LEN("ParaAutoStyleName")},
766
/* 0708 UNO_PARA_AUTO_STYLE_NAME */     {MAP_CHAR_LEN("ParaAutoStyleName")},
767
/* 0709 UNO_NAME_APPLY_WORKAROUND_FOR_B6375613*/ {MAP_CHAR_LEN("ApplyWorkaroundForB6375613")},
767
/* 0709 UNO_NAME_APPLY_WORKAROUND_FOR_B6375613*/ {MAP_CHAR_LEN("ApplyWorkaroundForB6375613")},
768
/* 0710 UNO_NAME_LAYOUT_SIZE*/ {MAP_CHAR_LEN("LayoutSize")}
768
/* 0710 UNO_NAME_LAYOUT_SIZE*/ {MAP_CHAR_LEN("LayoutSize")},
769
/* 0711 UNO_NAME_IS_PREFIX_PAGE_NUMBER*/   {MAP_CHAR_LEN("IsPrefixPageNumber")}
769
};
770
};
770
771
771
const SwPropNameLen& SwGetPropName( USHORT nId )
772
const SwPropNameLen& SwGetPropName( USHORT nId )
(-)sw/source/ui/inc/swuicnttab.hxx (+2 lines)
Lines 447-452 class SwTOXEntryTabPage : public SfxTabP Link Here
447
    FixedLine       aEntryFL;
447
    FixedLine       aEntryFL;
448
448
449
	CheckBox		aRelToStyleCB;		// position relative to the right margin of the para style
449
	CheckBox		aRelToStyleCB;		// position relative to the right margin of the para style
450
    CheckBox        aPrefixPageNumCB;   // prefix the page numbers with chapter numbers
450
	FixedText		aMainEntryStyleFT;
451
	FixedText		aMainEntryStyleFT;
451
	ListBox 		aMainEntryStyleLB;	// character style of main entries in indexes
452
	ListBox 		aMainEntryStyleLB;	// character style of main entries in indexes
452
	CheckBox		aAlphaDelimCB;
453
	CheckBox		aAlphaDelimCB;
Lines 485-490 class SwTOXEntryTabPage : public SfxTabP Link Here
485
486
486
	Point 			aRelToStylePos;
487
	Point 			aRelToStylePos;
487
	Point 			aRelToStyleIdxPos;
488
	Point 			aRelToStyleIdxPos;
489
    Point           aPrefixPageNumPos;    //to dinamically position the checkbox
488
    Size            aLevelFLSize;
490
    Size            aLevelFLSize;
489
491
490
	CurTOXType  	aLastTOXType;
492
	CurTOXType  	aLastTOXType;
(-)sw/source/ui/index/cnttab.cxx (+12 lines)
Lines 2107-2112 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2107
	aAutoRightCB(this, 			ResId(CB_AUTORIGHT			)),
2107
	aAutoRightCB(this, 			ResId(CB_AUTORIGHT			)),
2108
    aEntryFL(this,              ResId(FL_ENTRY              )),
2108
    aEntryFL(this,              ResId(FL_ENTRY              )),
2109
	aRelToStyleCB(this, 		ResId(CB_RELTOSTYLE			)),
2109
	aRelToStyleCB(this, 		ResId(CB_RELTOSTYLE			)),
2110
    aPrefixPageNumCB(this,      ResId(CB_PRE_PAGE_NUM       )),
2110
	aMainEntryStyleFT(this, 	ResId(FT_MAIN_ENTRY_STYLE)),
2111
	aMainEntryStyleFT(this, 	ResId(FT_MAIN_ENTRY_STYLE)),
2111
	aMainEntryStyleLB(this, 	ResId(LB_MAIN_ENTRY_STYLE)),
2112
	aMainEntryStyleLB(this, 	ResId(LB_MAIN_ENTRY_STYLE)),
2112
	aAlphaDelimCB(this, 		ResId(CB_ALPHADELIM			)),
2113
	aAlphaDelimCB(this, 		ResId(CB_ALPHADELIM			)),
Lines 2187-2192 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2187
	aAlphaDelimCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2188
	aAlphaDelimCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2188
	aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2189
	aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2189
	aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2190
	aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2191
    aPrefixPageNumCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
2190
2192
2191
    FieldUnit aMetric = ::GetDfltMetric(FALSE);
2193
    FieldUnit aMetric = ::GetDfltMetric(FALSE);
2192
    SetMetric(aTabPosMF, aMetric);
2194
    SetMetric(aTabPosMF, aMetric);
Lines 2209-2214 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2209
	aRelToStyleIdxPos = aCommaSeparatedCB.GetPosPixel();
2211
	aRelToStyleIdxPos = aCommaSeparatedCB.GetPosPixel();
2210
	aRelToStyleIdxPos.Y() +=
2212
	aRelToStyleIdxPos.Y() +=
2211
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2213
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2214
    aPrefixPageNumPos = aPrefixPageNumCB.GetPosPixel();
2212
	aEditStylePB.Enable(sal_False);
2215
	aEditStylePB.Enable(sal_False);
2213
2216
2214
	//fill the types in
2217
	//fill the types in
Lines 2301-2306 void SwTOXEntryTabPage::Reset( const Sfx Link Here
2301
	}
2304
	}
2302
	aRelToStyleCB.Check(pCurrentForm->IsRelTabPos());
2305
	aRelToStyleCB.Check(pCurrentForm->IsRelTabPos());
2303
	aCommaSeparatedCB.Check(pCurrentForm->IsCommaSeparated());
2306
	aCommaSeparatedCB.Check(pCurrentForm->IsCommaSeparated());
2307
    aPrefixPageNumCB.Check(pCurrentForm->IsPrefixPageNum());
2304
}
2308
}
2305
/*-- 16.06.99 10:47:34---------------------------------------------------
2309
/*-- 16.06.99 10:47:34---------------------------------------------------
2306
2310
Lines 2470-2475 void SwTOXEntryTabPage::ActivatePage( co Link Here
2470
		aEntryNoPB.Show(		bToxIsContent );
2474
		aEntryNoPB.Show(		bToxIsContent );
2471
		aHyperLinkPB.Show(		bToxIsContent );
2475
		aHyperLinkPB.Show(		bToxIsContent );
2472
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2476
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2477
        aPrefixPageNumCB.Show( !bToxIsAuthorities );
2473
		aChapterInfoPB.Show(	bToxIsIndex );
2478
		aChapterInfoPB.Show(	bToxIsIndex );
2474
		aEntryPB.Show(		   !bToxIsAuthorities );
2479
		aEntryPB.Show(		   !bToxIsAuthorities );
2475
		aPageNoPB.Show(		   !bToxIsAuthorities );
2480
		aPageNoPB.Show(		   !bToxIsAuthorities );
Lines 2497-2502 void SwTOXEntryTabPage::ActivatePage( co Link Here
2497
		aRelToStyleCB.SetPosPixel( bToxIsIndex ? aRelToStyleIdxPos
2502
		aRelToStyleCB.SetPosPixel( bToxIsIndex ? aRelToStyleIdxPos
2498
											   : aRelToStylePos );
2503
											   : aRelToStylePos );
2499
2504
2505
        Point aOtherPrefixPageNumPos( aPrefixPageNumPos );
2506
        aOtherPrefixPageNumPos.Y() += (aRelToStyleIdxPos.Y() - aRelToStylePos.Y());
2507
        aPrefixPageNumCB.SetPosPixel( bToxIsIndex ?    aOtherPrefixPageNumPos
2508
                                                     : aPrefixPageNumPos );
2509
2500
//		aRecalcTabCB.Show(	aCurType.eType == TOX_CONTENT);
2510
//		aRecalcTabCB.Show(	aCurType.eType == TOX_CONTENT);
2501
2511
2502
		aMainEntryStyleFT.Show(	bToxIsIndex );
2512
		aMainEntryStyleFT.Show(	bToxIsIndex );
Lines 2552-2557 void SwTOXEntryTabPage::UpdateDescriptor Link Here
2552
	}
2562
	}
2553
	if(aCommaSeparatedCB.IsVisible())
2563
	if(aCommaSeparatedCB.IsVisible())
2554
		pCurrentForm->SetCommaSeparated(aCommaSeparatedCB.IsChecked());
2564
		pCurrentForm->SetCommaSeparated(aCommaSeparatedCB.IsChecked());
2565
    if(aPrefixPageNumCB.IsVisible())
2566
        pCurrentForm->SetPrefixPageNum(aPrefixPageNumCB.IsChecked());
2555
}
2567
}
2556
/*-- 16.06.99 10:47:34---------------------------------------------------
2568
/*-- 16.06.99 10:47:34---------------------------------------------------
2557
2569
(-)sw/source/ui/index/cnttab.hrc (+1 lines)
Lines 142-147 Link Here
142
#define MF_TABPOS				52
142
#define MF_TABPOS				52
143
#define CB_AUTORIGHT			53
143
#define CB_AUTORIGHT			53
144
#define CB_RELTOSTYLE			54
144
#define CB_RELTOSTYLE			54
145
#define CB_PRE_PAGE_NUM         55
145
#define CB_RECALCTAB			56
146
#define CB_RECALCTAB			56
146
#define CB_NUMSTYLEFROMPDESC	57
147
#define CB_NUMSTYLEFROMPDESC	57
147
#define CB_ALPHADELIM			58
148
#define CB_ALPHADELIM			58
(-)sw/source/ui/index/cnttab.src (+7 lines)
Lines 1032-1037 TabPage TP_TOX_ENTRY Link Here
1032
		Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent";
1032
		Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent";
1033
		Text [ x-comment ] = " ";
1033
		Text [ x-comment ] = " ";
1034
	};
1034
	};
1035
    CheckBox CB_PRE_PAGE_NUM
1036
    {
1037
        Pos = MAP_APPFONT ( 37 , 122 ) ;
1038
        Size = MAP_APPFONT ( 200, 10 ) ;
1039
        Text [ en-US ] = "Prefix page numbers with chapter number";
1040
        Text [ x-comment ] = " ";
1041
    };
1035
	FixedText FT_MAIN_ENTRY_STYLE
1042
	FixedText FT_MAIN_ENTRY_STYLE
1036
	{
1043
	{
1037
        Pos = MAP_APPFONT ( 37 , 112 ) ;
1044
        Pos = MAP_APPFONT ( 37 , 112 ) ;

Return to issue 53420