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

(-)xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx (-4 / +28 lines)
Lines 105-111 XMLIndexChapterInfoEntryContext::XMLInde Link Here
105
								   rTemplate, nPrfx, rLocalName),
105
								   rTemplate, nPrfx, rLocalName),
106
		nChapterInfo(ChapterFormat::NAME_NUMBER),
106
		nChapterInfo(ChapterFormat::NAME_NUMBER),
107
		bChapterInfoOK(sal_False),
107
		bChapterInfoOK(sal_False),
108
		bTOC( bT )
108
		bTOC( bT ),
109
        nOutlineLevel( 0 ),
110
        bOutlineLevelOK(sal_False)
109
{
111
{
110
}
112
}
111
113
Lines 120-126 static const SvXMLEnumMapEntry aChapterD Link Here
120
	{ XML_NUMBER_AND_NAME,			ChapterFormat::NAME_NUMBER },
122
	{ XML_NUMBER_AND_NAME,			ChapterFormat::NAME_NUMBER },
121
// not supported by the template:
123
// not supported by the template:
122
//	{ XML_PLAIN_NUMBER_AND_NAME,	ChapterFormat::NO_PREFIX_SUFFIX },
124
//	{ XML_PLAIN_NUMBER_AND_NAME,	ChapterFormat::NO_PREFIX_SUFFIX },
123
//	{ XML_PLAIN_NUMBER,	    		ChapterFormat::DIGIT },
125
	{ XML_PLAIN_NUMBER,	    		ChapterFormat::DIGIT },
124
	{ XML_TOKEN_INVALID,			0 }
126
	{ XML_TOKEN_INVALID,			0 }
125
};
127
};
126
128
Lines 142-148 void XMLIndexChapterInfoEntryContext::St Link Here
142
				sCharStyleName = xAttrList->getValueByIndex(nAttr);
144
				sCharStyleName = xAttrList->getValueByIndex(nAttr);
143
				bCharStyleNameOK = sal_True;
145
				bCharStyleNameOK = sal_True;
144
			}
146
			}
145
			else if ( !bTOC && IsXMLToken( sLocalName, XML_DISPLAY ) )
147
			else if ( IsXMLToken( sLocalName, XML_DISPLAY ) )//i53420, always true, in TOC as well
146
			{
148
			{
147
				sal_uInt16 nTmp;
149
				sal_uInt16 nTmp;
148
				if (SvXMLUnitConverter::convertEnum(
150
				if (SvXMLUnitConverter::convertEnum(
Lines 153-158 void XMLIndexChapterInfoEntryContext::St Link Here
153
					bChapterInfoOK = sal_True;
155
					bChapterInfoOK = sal_True;
154
				}
156
				}
155
			}
157
			}
158
            else if ( IsXMLToken( sLocalName, XML_OUTLINE_LEVEL ) )
159
            {
160
                sal_Int32 nTmp;
161
162
                if (SvXMLUnitConverter::convertNumber(nTmp, xAttrList->getValueByIndex(nAttr)))
163
                {
164
//control on range is carried out in the UNO level                    
165
                    nOutlineLevel = static_cast<sal_uInt16>(nTmp);
166
                    bOutlineLevelOK = sal_True;
167
                }
168
            }
156
		}
169
		}
157
	}
170
	}
158
171
Lines 167-172 void XMLIndexChapterInfoEntryContext::St Link Here
167
	{
180
	{
168
		nValues++;
181
		nValues++;
169
	}
182
	}
183
    if (bOutlineLevelOK)
184
		nValues++;
170
}
185
}
171
186
172
void XMLIndexChapterInfoEntryContext::FillPropertyValues(
187
void XMLIndexChapterInfoEntryContext::FillPropertyValues(
Lines 176-188 void XMLIndexChapterInfoEntryContext::Fi Link Here
176
	// entry name and (optionally) style name in parent class
191
	// entry name and (optionally) style name in parent class
177
	XMLIndexSimpleEntryContext::FillPropertyValues(rValues);
192
	XMLIndexSimpleEntryContext::FillPropertyValues(rValues);
178
193
194
    sal_Int32 nIndex = bCharStyleNameOK ? 2 : 1;
195
    
179
	if( bChapterInfoOK )
196
	if( bChapterInfoOK )
180
	{
197
	{
181
		// chapter info field
198
		// chapter info field
182
		sal_Int32 nIndex = bCharStyleNameOK ? 2 : 1;
183
		rValues[nIndex].Name = rTemplateContext.sChapterFormat;
199
		rValues[nIndex].Name = rTemplateContext.sChapterFormat;
184
		Any aAny;	
200
		Any aAny;	
185
		aAny <<= nChapterInfo;
201
		aAny <<= nChapterInfo;
186
		rValues[nIndex].Value = aAny;
202
		rValues[nIndex].Value = aAny;
203
        nIndex++;
187
	}
204
	}
205
    if( bOutlineLevelOK )
206
    {
207
        rValues[nIndex].Name = rTemplateContext.sLevel;
208
        Any aAny;	
209
        aAny <<= nOutlineLevel;
210
        rValues[nIndex].Value = aAny;
211
    }
188
}
212
}
(-)xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx (+2 lines)
Lines 68-73 class XMLIndexChapterInfoEntryContext : Link Here
68
	sal_Int16 nChapterInfo;
68
	sal_Int16 nChapterInfo;
69
	sal_Bool bChapterInfoOK;
69
	sal_Bool bChapterInfoOK;
70
	sal_Bool bTOC;
70
	sal_Bool bTOC;
71
    sal_Int16 nOutlineLevel;
72
    sal_Bool bOutlineLevelOK;
71
73
72
public:
74
public:
73
75
(-)xmloff/source/text/XMLIndexTemplateContext.cxx (+1 lines)
Lines 173-178 XMLIndexTemplateContext::XMLIndexTemplat Link Here
173
,	sTabStopFillCharacter(RTL_CONSTASCII_USTRINGPARAM("TabStopFillCharacter"))
173
,	sTabStopFillCharacter(RTL_CONSTASCII_USTRINGPARAM("TabStopFillCharacter"))
174
,	sBibliographyDataField(RTL_CONSTASCII_USTRINGPARAM("BibliographyDataField"))
174
,	sBibliographyDataField(RTL_CONSTASCII_USTRINGPARAM("BibliographyDataField"))
175
,	sChapterFormat(RTL_CONSTASCII_USTRINGPARAM("ChapterFormat"))
175
,	sChapterFormat(RTL_CONSTASCII_USTRINGPARAM("ChapterFormat"))
176
,   sLevel(RTL_CONSTASCII_USTRINGPARAM("Level")) //#i53420
176
177
177
,	sLevelFormat(RTL_CONSTASCII_USTRINGPARAM("LevelFormat"))
178
,	sLevelFormat(RTL_CONSTASCII_USTRINGPARAM("LevelFormat"))
178
,	sParaStyleLevel(RTL_CONSTASCII_USTRINGPARAM("ParaStyleLevel"))
179
,	sParaStyleLevel(RTL_CONSTASCII_USTRINGPARAM("ParaStyleLevel"))
(-)xmloff/source/text/XMLIndexTemplateContext.hxx (+1 lines)
Lines 137-142 public: Link Here
137
	const ::rtl::OUString sTabStopFillCharacter;
137
	const ::rtl::OUString sTabStopFillCharacter;
138
	const ::rtl::OUString sBibliographyDataField;
138
	const ::rtl::OUString sBibliographyDataField;
139
	const ::rtl::OUString sChapterFormat;
139
	const ::rtl::OUString sChapterFormat;
140
    const ::rtl::OUString sLevel;//i53420
140
141
141
	const ::rtl::OUString sLevelFormat;
142
	const ::rtl::OUString sLevelFormat;
142
	const ::rtl::OUString sParaStyleLevel;
143
	const ::rtl::OUString sParaStyleLevel;
(-)xmloff/source/text/XMLSectionExport.cxx (-1 / +30 lines)
Lines 1247-1252 enum TemplateParamEnum Link Here
1247
	TOK_TPARAM_TAB_FILL_CHAR,
1247
	TOK_TPARAM_TAB_FILL_CHAR,
1248
	TOK_TPARAM_TEXT,
1248
	TOK_TPARAM_TEXT,
1249
	TOK_TPARAM_CHAPTER_FORMAT,
1249
	TOK_TPARAM_CHAPTER_FORMAT,
1250
	TOK_TPARAM_LEVEL,
1250
	TOK_TPARAM_BIBLIOGRAPHY_DATA
1251
	TOK_TPARAM_BIBLIOGRAPHY_DATA
1251
};
1252
};
1252
1253
Lines 1275-1280 SvXMLEnumStringMapEntry __READONLY_DATA Link Here
1275
	ENUM_STRING_MAP_ENTRY( "WithTab",               TOK_TPARAM_TAB_WITH_TAB ),
1276
	ENUM_STRING_MAP_ENTRY( "WithTab",               TOK_TPARAM_TAB_WITH_TAB ),
1276
	ENUM_STRING_MAP_ENTRY( "Text",                  TOK_TPARAM_TEXT ),
1277
	ENUM_STRING_MAP_ENTRY( "Text",                  TOK_TPARAM_TEXT ),
1277
	ENUM_STRING_MAP_ENTRY( "ChapterFormat",         TOK_TPARAM_CHAPTER_FORMAT ),
1278
	ENUM_STRING_MAP_ENTRY( "ChapterFormat",         TOK_TPARAM_CHAPTER_FORMAT ),
1279
	ENUM_STRING_MAP_ENTRY( "Level",                 TOK_TPARAM_LEVEL ),
1278
	ENUM_STRING_MAP_ENTRY( "BibliographyDataField", TOK_TPARAM_BIBLIOGRAPHY_DATA ),
1280
	ENUM_STRING_MAP_ENTRY( "BibliographyDataField", TOK_TPARAM_BIBLIOGRAPHY_DATA ),
1279
    ENUM_STRING_MAP_END()
1281
    ENUM_STRING_MAP_END()
1280
};
1282
};
Lines 1344-1349 void XMLSectionExport::ExportIndexTempla Link Here
1344
	sal_Int16 nChapterFormat = 0;
1346
	sal_Int16 nChapterFormat = 0;
1345
	sal_Bool bChapterFormatOK = sal_False;
1347
	sal_Bool bChapterFormatOK = sal_False;
1346
1348
1349
    // outline max level
1350
	sal_Int16 nLevel = 0;
1351
	sal_Bool bLevelOK = sal_False;
1352
    
1347
	// Bibliography Data
1353
	// Bibliography Data
1348
	sal_Int16 nBibliographyData = 0;
1354
	sal_Int16 nBibliographyData = 0;
1349
	sal_Bool bBibliographyDataOK = sal_False;
1355
	sal_Bool bBibliographyDataOK = sal_False;
Lines 1417-1424 void XMLSectionExport::ExportIndexTempla Link Here
1417
1423
1418
				case TOK_TPARAM_CHAPTER_FORMAT:
1424
				case TOK_TPARAM_CHAPTER_FORMAT:
1419
					rValues[i].Value >>= nChapterFormat;
1425
					rValues[i].Value >>= nChapterFormat;
1420
					bChapterFormatOK = sal_True;
1426
                    bChapterFormatOK = sal_True;
1421
					break;
1427
					break;
1428
//i53420
1429
				case TOK_TPARAM_LEVEL:
1430
					rValues[i].Value >>= nLevel;
1431
                    bLevelOK = sal_True;
1432
					break;
1433
1422
				case TOK_TPARAM_BIBLIOGRAPHY_DATA:
1434
				case TOK_TPARAM_BIBLIOGRAPHY_DATA:
1423
					rValues[i].Value >>= nBibliographyData;
1435
					rValues[i].Value >>= nBibliographyData;
1424
					bBibliographyDataOK = sal_True;
1436
					bBibliographyDataOK = sal_True;
Lines 1549-1554 void XMLSectionExport::ExportIndexTempla Link Here
1549
			GetExport().AddAttribute(
1561
			GetExport().AddAttribute(
1550
				XML_NAMESPACE_TEXT, XML_DISPLAY,
1562
				XML_NAMESPACE_TEXT, XML_DISPLAY,
1551
				XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat));
1563
				XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat));
1564
//i53420
1565
            if (bLevelOK)
1566
                GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,
1567
                                     OUString::valueOf((sal_Int32)nLevel)); //i53420
1568
		}
1569
1570
//i53420
1571
		if (TOK_TTYPE_ENTRY_NUMBER == nTokenType)
1572
		{
1573
            if (bChapterFormatOK)
1574
                GetExport().AddAttribute(
1575
                    XML_NAMESPACE_TEXT, XML_DISPLAY,
1576
                    XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat));
1577
//i53420
1578
            if (bLevelOK)
1579
                GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,
1580
                                     OUString::valueOf((sal_Int32)nLevel)); //i53420
1552
		}
1581
		}
1553
1582
1554
		// export template
1583
		// export template
(-)sw/inc/ndtxt.hxx (-1 / +6 lines)
Lines 395-402 public: Link Here
395
        @param _bInclPrefixAndSuffixStrings
395
        @param _bInclPrefixAndSuffixStrings
396
        optional input parameter - boolean indicating, if the prefix and the
396
        optional input parameter - boolean indicating, if the prefix and the
397
        suffix strings have to been included or not. default value = <true>
397
        suffix strings have to been included or not. default value = <true>
398
399
        @param _nRestrictToThisLevel
400
        optional input parameter - unsigned integer indicating the maximum outline
401
        level to which the output string must be restricted to. Default value is
402
        MAXLEVEL
398
    */
403
    */
399
    XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true ) const;
404
    XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const unsigned int _nRestrictToThisLevel = MAXLEVEL - 1 ) const;
400
405
401
    /**
406
    /**
402
       Returns the additional indents of this text node and its numbering.
407
       Returns the additional indents of this text node and its numbering.
(-)sw/inc/tox.hxx (+2 lines)
Lines 228-233 struct SW_DLLPUBLIC SwFormToken Link Here
228
	USHORT			nPoolId;
228
	USHORT			nPoolId;
229
	USHORT			eTabAlign;
229
	USHORT			eTabAlign;
230
	USHORT			nChapterFormat;		//SwChapterFormat;
230
	USHORT			nChapterFormat;		//SwChapterFormat;
231
    USHORT          nOutlineLevel;//the maximum permitted outline level in numbering
231
	USHORT			nAuthorityField;	//enum ToxAuthorityField
232
	USHORT			nAuthorityField;	//enum ToxAuthorityField
232
	sal_Unicode 	cTabFillChar;
233
	sal_Unicode 	cTabFillChar;
233
    sal_Bool        bWithTab;      // TRUE: do generate tab
234
    sal_Bool        bWithTab;      // TRUE: do generate tab
Lines 240-245 struct SW_DLLPUBLIC SwFormToken Link Here
240
		nPoolId(USHRT_MAX),
241
		nPoolId(USHRT_MAX),
241
		eTabAlign(0 /*SVX_TAB_ADJUST_LEFT*/),
242
		eTabAlign(0 /*SVX_TAB_ADJUST_LEFT*/),
242
		nChapterFormat(0 /*CF_NUMBER*/),
243
		nChapterFormat(0 /*CF_NUMBER*/),
244
        nOutlineLevel(MAXLEVEL),   //default to maximum outline level
243
		nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
245
		nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
244
		cTabFillChar(' '),
246
		cTabFillChar(' '),
245
        bWithTab(sal_True)  // #i21237#
247
        bWithTab(sal_True)  // #i21237#
(-)sw/source/core/doc/doctxm.cxx (-5 / +16 lines)
Lines 1720-1726 void SwTOXBaseSection::UpdateTable( cons Link Here
1720
					SonderZeichen 0-31 und 255 entfernen
1720
					SonderZeichen 0-31 und 255 entfernen
1721
 --------------------------------------------------------------------*/
1721
 --------------------------------------------------------------------*/
1722
1722
1723
String lcl_GetNumString( const SwTOXSortTabBase& rBase )
1723
String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, BYTE nLevel )
1724
{
1724
{
1725
	String sRet;
1725
	String sRet;
1726
1726
Lines 1732-1738 String lcl_GetNumString( const SwTOXSort Link Here
1732
			const SwNumRule* pRule = pNd->GetNumRule();
1732
			const SwNumRule* pRule = pNd->GetNumRule();
1733
1733
1734
			if( pRule && pNd->GetLevel() < MAXLEVEL )
1734
			if( pRule && pNd->GetLevel() < MAXLEVEL )
1735
				sRet = pNd->GetNumString();
1735
            {
1736
/* FIXME shurely all this can be put into SwTxtNode...
1737
 * but I don't want to cripple that class...
1738
 * it's basically the code in GetNumString, changed.
1739
 * May be a version of GetNumString as:
1740
 * XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const sal_uInt16 nRestrictToLevel = MAXLEVEL ) const
1741
 * will do, but I'm not sure of the overall implication so:
1742
 */
1743
//comment out the former implementation
1744
				sRet = pNd->GetNumString(bUsePrefix, nLevel);
1745
// a new one, got from                 
1746
            }
1736
		}
1747
		}
1737
	}
1748
	}
1738
	return sRet;
1749
	return sRet;
Lines 1780-1786 void SwTOXBaseSection::GenerateText( USH Link Here
1780
			{
1791
			{
1781
			case TOKEN_ENTRY_NO:
1792
			case TOKEN_ENTRY_NO:
1782
				// fuer Inhaltsverzeichnis Numerierung
1793
				// fuer Inhaltsverzeichnis Numerierung
1783
				rTxt.Insert( lcl_GetNumString( rBase ));
1794
				rTxt.Insert( lcl_GetNumString( rBase, aToken.nChapterFormat == CF_NUMBER, aToken.nOutlineLevel - 1 ));
1784
				break;
1795
				break;
1785
1796
1786
			case TOKEN_ENTRY_TEXT:
1797
			case TOKEN_ENTRY_TEXT:
Lines 1793-1799 void SwTOXBaseSection::GenerateText( USH Link Here
1793
			case TOKEN_ENTRY:
1804
			case TOKEN_ENTRY:
1794
				{
1805
				{
1795
					// fuer Inhaltsverzeichnis Numerierung
1806
					// fuer Inhaltsverzeichnis Numerierung
1796
					rTxt.Insert( lcl_GetNumString( rBase ));
1807
					rTxt.Insert( lcl_GetNumString( rBase, sal_True, MAXLEVEL ));
1797
1808
1798
					SwIndex aIdx( pTOXNd, rTxt.Len() );
1809
					SwIndex aIdx( pTOXNd, rTxt.Len() );
1799
					rBase.FillText( *pTOXNd, aIdx );
1810
					rBase.FillText( *pTOXNd, aIdx );
Lines 1915-1921 void SwTOXBaseSection::GenerateText( USH Link Here
1915
						{
1926
						{
1916
							SwChapterFieldType aFldTyp;
1927
							SwChapterFieldType aFldTyp;
1917
							SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
1928
							SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
1918
							aFld.SetLevel( MAXLEVEL - 1 );
1929
                            aFld.SetLevel( aToken.nOutlineLevel - 1 );
1919
							aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE );
1930
							aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE );
1920
1931
1921
							if(CF_NUMBER == aToken.nChapterFormat)
1932
							if(CF_NUMBER == aToken.nChapterFormat)
(-)sw/source/core/tox/tox.cxx (-1 / +24 lines)
Lines 875-881 SwTOXBase & SwTOXBase::operator = (const Link Here
875
}
875
}
876
876
877
/* -----------------16.07.99 16:02-------------------
877
/* -----------------16.07.99 16:02-------------------
878
878
 Returns the string rapresentation of the index entry line
879
 description 
879
 --------------------------------------------------*/
880
 --------------------------------------------------*/
880
881
881
String SwFormToken::GetString() const
882
String SwFormToken::GetString() const
Lines 943-948 String SwFormToken::GetString() const Link Here
943
    else if(TOKEN_CHAPTER_INFO == eTokenType)
944
    else if(TOKEN_CHAPTER_INFO == eTokenType)
944
    {
945
    {
945
        sRet += String::CreateFromInt32( nChapterFormat );
946
        sRet += String::CreateFromInt32( nChapterFormat );
947
//add maximum permetted level
948
        sRet += ',';       
949
        sRet += String::CreateFromInt32( nOutlineLevel );
946
    }
950
    }
947
    else if(TOKEN_TEXT == eTokenType)
951
    else if(TOKEN_TEXT == eTokenType)
948
    {
952
    {
Lines 958-963 String SwFormToken::GetString() const Link Here
958
        else
962
        else
959
            bAppend = FALSE;
963
            bAppend = FALSE;
960
    }
964
    }
965
    else if(TOKEN_ENTRY_NO == eTokenType)
966
    {
967
        sRet += String::CreateFromInt32( nChapterFormat );
968
//add maximum permitted level
969
        sRet += ',';       
970
        sRet += String::CreateFromInt32( nOutlineLevel );
971
    }
972
961
    if(bAppend)
973
    if(bAppend)
962
    {
974
    {
963
        sRet += '>';
975
        sRet += '>';
Lines 1009-1014 SwFormToken SwFormTokensHelper::BuildTok Link Here
1009
1021
1010
    switch( eTokenType )
1022
    switch( eTokenType )
1011
    {
1023
    {
1024
//i53420        
1025
    case TOKEN_ENTRY_NO:
1026
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
1027
            eRet.nChapterFormat = sTmp.ToInt32();
1028
        if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
1029
            eRet.nOutlineLevel = sTmp.ToInt32(); //the maximum outline level to examine
1030
        break;
1031
1012
    case TOKEN_TEXT:
1032
    case TOKEN_TEXT:
1013
        {
1033
        {
1014
            xub_StrLen nStartText = sToken.Search( TOX_STYLE_DELIMITER );
1034
            xub_StrLen nStartText = sToken.Search( TOX_STYLE_DELIMITER );
Lines 1042-1047 SwFormToken SwFormTokensHelper::BuildTok Link Here
1042
    case TOKEN_CHAPTER_INFO:
1062
    case TOKEN_CHAPTER_INFO:
1043
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
1063
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
1044
            eRet.nChapterFormat = sTmp.ToInt32(); //SwChapterFormat;
1064
            eRet.nChapterFormat = sTmp.ToInt32(); //SwChapterFormat;
1065
//i53420        
1066
        if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
1067
            eRet.nOutlineLevel = sTmp.ToInt32(); //the maximum outline level to examine
1045
        break;
1068
        break;
1046
1069
1047
    case TOKEN_AUTHORITY:
1070
    case TOKEN_AUTHORITY:
(-)sw/source/core/txtnode/ndtxt.cxx (-3 / +14 lines)
Lines 2671-2677 BOOL SwTxtNode::HasBullet() const Link Here
2671
// <- #i29560#
2671
// <- #i29560#
2672
2672
2673
// --> OD 2005-11-17 #128041# - introduce parameter <_bInclPrefixAndSuffixStrings>
2673
// --> OD 2005-11-17 #128041# - introduce parameter <_bInclPrefixAndSuffixStrings>
2674
XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings ) const
2674
//i53420 added max outline parameter
2675
XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const
2675
{
2676
{
2676
    // --> OD 2005-11-02 #i51089 - TUNING#
2677
    // --> OD 2005-11-02 #i51089 - TUNING#
2677
    const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
2678
    const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
Lines 2679-2688 XubString SwTxtNode::GetNumString( const Link Here
2679
         GetNum()->IsCounted() &&
2680
         GetNum()->IsCounted() &&
2680
         pRule->Get( GetNum()->GetLevel() ).IsTxtFmt() )
2681
         pRule->Get( GetNum()->GetLevel() ).IsTxtFmt() )
2681
    {
2682
    {
2683
        if( _nRestrictToThisLevel == (MAXLEVEL-1) )
2684
        {
2682
        // --> OD 2005-11-17 #128041#
2685
        // --> OD 2005-11-17 #128041#
2683
        return pRule->MakeNumString( *(GetNum()),
2686
            return pRule->MakeNumString( *(GetNum()),
2684
                                     _bInclPrefixAndSuffixStrings ? TRUE : FALSE );
2687
                                         _bInclPrefixAndSuffixStrings ? TRUE : FALSE );           
2685
        // <--
2688
        // <--
2689
        }
2690
        else
2691
        {
2692
            return pRule->MakeNumString( GetNum()->GetNumberVector(),
2693
                                         _bInclPrefixAndSuffixStrings ? TRUE : FALSE,
2694
                                         FALSE,
2695
                                         _nRestrictToThisLevel );           
2696
        }
2686
    }
2697
    }
2687
    // <--
2698
    // <--
2688
2699
(-)sw/source/core/unocore/unoidx.cxx (-6 / +60 lines)
Lines 2533-2538 void SwXIndexTokenAccess_Impl::replaceBy Link Here
2533
				}
2533
				}
2534
				aToken.nChapterFormat = nFormat;
2534
				aToken.nChapterFormat = nFormat;
2535
			}
2535
			}
2536
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Level")) )
2537
            {//i53420
2538
				sal_Int16 nLevel = lcl_AnyToInt16(pProperties[j].Value);
2539
                if( nLevel < 1 || nLevel > MAXLEVEL ) //FIXME: ok exception? Would it be better to set to current default?
2540
                    throw IllegalArgumentException();
2541
                aToken.nOutlineLevel = nLevel;
2542
            }
2536
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
2543
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
2537
			{
2544
			{
2538
				sal_Int16 nType; pProperties[j].Value >>= nType;
2545
				sal_Int16 nType; pProperties[j].Value >>= nType;
Lines 2560-2565 void SwXIndexTokenAccess_Impl::replaceBy Link Here
2560
		if(TOKEN_ENTRY_TEXT == aToken.eTokenType &&
2567
		if(TOKEN_ENTRY_TEXT == aToken.eTokenType &&
2561
								TOX_CONTENT != pTOXBase->GetType())
2568
								TOX_CONTENT != pTOXBase->GetType())
2562
			aToken.eTokenType = TOKEN_ENTRY;
2569
			aToken.eTokenType = TOKEN_ENTRY;
2570
// i53420 check for chapter format allowed values if it was TOKEN_ENTRY_NO type
2571
// only allowed value are CF_NUMBER and CF_NUM_NOPREPST_TITLE
2572
2573
        if( TOKEN_ENTRY_NO == aToken.eTokenType )
2574
            switch(aToken.nChapterFormat)
2575
            {
2576
            case CF_NUMBER:
2577
            case CF_NUM_NOPREPST_TITLE:
2578
                break;
2579
            default:
2580
// FIXME: may be a throw is better?
2581
                aToken.nChapterFormat = CF_NUMBER;
2582
                break;
2583
            }
2584
2563
		sPattern += aToken.GetString();
2585
		sPattern += aToken.GetString();
2564
	}
2586
	}
2565
	SwForm aForm(pTOXBase->GetTOXForm());
2587
	SwForm aForm(pTOXBase->GetTOXForm());
Lines 2626-2640 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2626
		{
2648
		{
2627
			case TOKEN_ENTRY_NO     :
2649
			case TOKEN_ENTRY_NO     :
2628
			{
2650
			{
2629
				rCurTokenSeq.realloc( 2 );
2651
                sal_Int32 nElements = 2;
2652
                sal_Int32 nCurrentElement = 0;
2653
                
2654
                if( aToken.nChapterFormat != CF_NUMBER )//check for default value (
2655
                    nElements++;//we need the element
2656
                if( aToken.nOutlineLevel != MAXLEVEL )
2657
                    nElements++;
2658
                
2659
				rCurTokenSeq.realloc( nElements );
2630
				PropertyValue* pArr = rCurTokenSeq.getArray();
2660
				PropertyValue* pArr = rCurTokenSeq.getArray();
2631
2661
2632
				pArr[0].Name = C2U("TokenType");
2662
				pArr[nCurrentElement].Name = C2U("TokenType");
2633
				pArr[0].Value <<= OUString::createFromAscii("TokenEntryNumber");
2663
				pArr[nCurrentElement++].Value <<= OUString::createFromAscii("TokenEntryNumber");
2634
//				pArr[0].Value <<= C2U("TokenEntryNumber");
2664
//				pArr[0].Value <<= C2U("TokenEntryNumber");
2635
2665
2636
				pArr[1].Name = C2U("CharacterStyleName");
2666
				pArr[nCurrentElement].Name = C2U("CharacterStyleName");
2637
                pArr[1].Value <<= aProgCharStyle;
2667
                pArr[nCurrentElement++].Value <<= aProgCharStyle;
2668
//i53420
2669
                if( aToken.nChapterFormat != CF_NUMBER )
2670
                {
2671
                    pArr[nCurrentElement].Name = C2U("ChapterFormat");
2672
                    sal_Int16 nVal;
2673
//!< the allowed values for chapter format are CF_NUMBER and CF_NUM_NOPREPST_TITLE only, all else forced to
2674
//CF_NUMBER
2675
                    switch(aToken.nChapterFormat)
2676
                    {
2677
                    default:
2678
                    case CF_NUMBER:				nVal = text::ChapterFormat::NUMBER; break;
2679
                    case CF_NUM_NOPREPST_TITLE:	nVal = text::ChapterFormat::DIGIT; break;
2680
                    }
2681
                    pArr[nCurrentElement++].Value <<= (sal_Int16)nVal;
2682
                }
2683
2684
                if( aToken.nOutlineLevel != MAXLEVEL ) //only  a Level != MAXLEVEL is registered
2685
                {
2686
                    pArr[nCurrentElement].Name = C2U("Level");
2687
                    pArr[nCurrentElement].Value <<= aToken.nOutlineLevel;
2688
                }
2638
			}
2689
			}
2639
			break;
2690
			break;
2640
			case TOKEN_ENTRY        :	// no difference between Entry and Entry Text
2691
			case TOKEN_ENTRY        :	// no difference between Entry and Entry Text
Lines 2711-2717 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2711
			break;
2762
			break;
2712
			case TOKEN_CHAPTER_INFO :
2763
			case TOKEN_CHAPTER_INFO :
2713
			{
2764
			{
2714
				rCurTokenSeq.realloc( 3 );
2765
				rCurTokenSeq.realloc( 4 );
2715
				PropertyValue* pArr = rCurTokenSeq.getArray();
2766
				PropertyValue* pArr = rCurTokenSeq.getArray();
2716
2767
2717
				pArr[0].Name = C2U("TokenType");
2768
				pArr[0].Name = C2U("TokenType");
Lines 2731-2736 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2731
					case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break;
2782
					case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break;
2732
				}
2783
				}
2733
				pArr[2].Value <<= (sal_Int16)nVal;
2784
				pArr[2].Value <<= (sal_Int16)nVal;
2785
//i53420
2786
				pArr[3].Name = C2U("Level");
2787
                pArr[3].Value <<= aToken.nOutlineLevel;
2734
			}
2788
			}
2735
			break;
2789
			break;
2736
			case TOKEN_LINK_START   :
2790
			case TOKEN_LINK_START   :
(-)sw/source/ui/inc/swuicnttab.hxx (+13 lines)
Lines 439-444 class SwTOXEntryTabPage : public SfxTabP Link Here
439
	FixedText		aChapterEntryFT;
439
	FixedText		aChapterEntryFT;
440
	ListBox			aChapterEntryLB;	// type of chapter info
440
	ListBox			aChapterEntryLB;	// type of chapter info
441
441
442
	FixedText		aNumberFormatFT;
443
	ListBox			aNumberFormatLB;    //!< format for numbering (E#)
444
445
	FixedText		aEntryOutlineLevelFT;    //!< Fixed text, for i53420
446
	NumericField	aEntryOutlineLevelNF;   //!< level to evaluate outline level to, for i53420
442
	FixedText		aFillCharFT;
447
	FixedText		aFillCharFT;
443
	ComboBox		aFillCharCB;		// fill char for tab stop
448
	ComboBox		aFillCharCB;		// fill char for tab stop
444
	FixedText		aTabPosFT;
449
	FixedText		aTabPosFT;
Lines 490-495 class SwTOXEntryTabPage : public SfxTabP Link Here
490
	CurTOXType  	aLastTOXType;
495
	CurTOXType  	aLastTOXType;
491
	BOOL 			bInLevelHdl;
496
	BOOL 			bInLevelHdl;
492
497
498
    Point           aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control,
499
                                             //to be used in moving the element among different tokens
500
    Point           aEntryOutlineLevelFTPosition;//!< holds position ofrEntryOutlineLevelFT control
501
    sal_Int32       nBiasToEntryPoint;
502
493
	DECL_LINK(StyleSelectHdl, ListBox*);
503
	DECL_LINK(StyleSelectHdl, ListBox*);
494
	DECL_LINK(EditStyleHdl, PushButton*);
504
	DECL_LINK(EditStyleHdl, PushButton*);
495
	DECL_LINK(InsertTokenHdl, PushButton*);
505
	DECL_LINK(InsertTokenHdl, PushButton*);
Lines 501-506 class SwTOXEntryTabPage : public SfxTabP Link Here
501
	DECL_LINK(RemoveInsertAuthHdl, PushButton*);
511
	DECL_LINK(RemoveInsertAuthHdl, PushButton*);
502
	DECL_LINK(SortKeyHdl, RadioButton*);
512
	DECL_LINK(SortKeyHdl, RadioButton*);
503
	DECL_LINK(ChapterInfoHdl, ListBox*);
513
	DECL_LINK(ChapterInfoHdl, ListBox*);
514
	DECL_LINK(ChapterInfoOutlineHdl, NumericField*);
515
    DECL_LINK(NumberFormatHdl, ListBox*);
516
504
	DECL_LINK(AllLevelsHdl, PushButton*);
517
	DECL_LINK(AllLevelsHdl, PushButton*);
505
518
506
	void 			EnableButtons();
519
	void 			EnableButtons();
(-)sw/source/ui/index/cnttab.cxx (-6 / +97 lines)
Lines 181-186 Link Here
181
#ifndef _CNTTAB_HRC
181
#ifndef _CNTTAB_HRC
182
#include <cnttab.hrc>
182
#include <cnttab.hrc>
183
#endif
183
#endif
184
185
#ifndef _CHPFLD_HXX
186
#include <chpfld.hxx> //FIXME, see if ok
187
#endif
188
184
#ifndef _GLOBALS_HRC
189
#ifndef _GLOBALS_HRC
185
#include <globals.hrc>
190
#include <globals.hrc>
186
#endif
191
#endif
Lines 1980-1985 public: Link Here
1980
	void SetChapterInfo(sal_uInt16 nSet) { aFormToken.nChapterFormat = nSet;}
1985
	void SetChapterInfo(sal_uInt16 nSet) { aFormToken.nChapterFormat = nSet;}
1981
	sal_uInt16 GetChapterInfo() const{ return aFormToken.nChapterFormat;}
1986
	sal_uInt16 GetChapterInfo() const{ return aFormToken.nChapterFormat;}
1982
1987
1988
   	void SetOutlineLevel(sal_uInt16 nSet) { aFormToken.nOutlineLevel = nSet;}//i53420
1989
	sal_uInt16 GetOutlineLevel() const{ return aFormToken.nOutlineLevel;}
1990
1983
	void SetLinkEnd()
1991
	void SetLinkEnd()
1984
		{
1992
		{
1985
			DBG_ASSERT(TOKEN_LINK_START == aFormToken.eTokenType,
1993
			DBG_ASSERT(TOKEN_LINK_START == aFormToken.eTokenType,
Lines 2101-2107 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2101
	aFillCharFT(this, 			ResId(FT_FILLCHAR			)),
2109
	aFillCharFT(this, 			ResId(FT_FILLCHAR			)),
2102
	aFillCharCB(this,			ResId(CB_FILLCHAR			)),
2110
	aFillCharCB(this,			ResId(CB_FILLCHAR			)),
2103
	aChapterEntryFT(this, 		ResId(FT_CHAPTERENTRY		)),
2111
	aChapterEntryFT(this, 		ResId(FT_CHAPTERENTRY		)),
2104
	aChapterEntryLB(this, 		ResId(LB_CHAPTERENTRY		)),
2112
    aChapterEntryLB(this, 		ResId(LB_CHAPTERENTRY		)),
2113
        
2114
    aNumberFormatFT(this, 		ResId(FT_ENTRY_NO           )),
2115
    aNumberFormatLB(this, 		ResId(LB_ENTRY_NO           )),
2116
        
2117
    aEntryOutlineLevelFT(this,  ResId(FT_LEVEL_OL           )),//i53420
2118
    aEntryOutlineLevelNF(this,  ResId(NF_LEVEL_OL           )),
2105
	aTabPosFT(this, 			ResId(FT_TABPOS				)),
2119
	aTabPosFT(this, 			ResId(FT_TABPOS				)),
2106
	aTabPosMF(this, 			ResId(MF_TABPOS				)),
2120
	aTabPosMF(this, 			ResId(MF_TABPOS				)),
2107
	aAutoRightCB(this, 			ResId(CB_AUTORIGHT			)),
2121
	aAutoRightCB(this, 			ResId(CB_AUTORIGHT			)),
Lines 2175-2180 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2175
	aCharStyleLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
2189
	aCharStyleLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
2176
	aCharStyleLB.InsertEntry(sNoCharStyle);
2190
	aCharStyleLB.InsertEntry(sNoCharStyle);
2177
	aChapterEntryLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
2191
	aChapterEntryLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
2192
	aEntryOutlineLevelNF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoOutlineHdl));
2193
	aNumberFormatLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, NumberFormatHdl));
2194
    
2178
	aTabPosMF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
2195
	aTabPosMF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
2179
	aFillCharCB.SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
2196
	aFillCharCB.SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
2180
	aAutoRightCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
2197
	aAutoRightCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
Lines 2211-2216 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2211
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2228
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2212
	aEditStylePB.Enable(sal_False);
2229
	aEditStylePB.Enable(sal_False);
2213
2230
2231
//get position for Numbering and other stuff
2232
    aChapterEntryFTPosition = aChapterEntryFT.GetPosPixel();
2233
    aEntryOutlineLevelFTPosition = aEntryOutlineLevelFT.GetPosPixel();
2234
    nBiasToEntryPoint = aEntryOutlineLevelNF.GetPosPixel().X() -
2235
                               aEntryOutlineLevelFT.GetPosPixel().X();
2236
2214
	//fill the types in
2237
	//fill the types in
2215
	sal_uInt32 i;
2238
	sal_uInt32 i;
2216
	for( i = 0; i < AUTH_FIELD_END; i++)
2239
	for( i = 0; i < AUTH_FIELD_END; i++)
Lines 2240-2246 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2240
	aFirstKeyLB.SelectEntryPos(0);
2263
	aFirstKeyLB.SelectEntryPos(0);
2241
	aSecondKeyLB.SelectEntryPos(0);
2264
	aSecondKeyLB.SelectEntryPos(0);
2242
	aThirdKeyLB.SelectEntryPos(0);
2265
	aThirdKeyLB.SelectEntryPos(0);
2243
2244
}
2266
}
2245
/* -----------------30.11.99 13:37-------------------
2267
/* -----------------30.11.99 13:37-------------------
2246
	pVoid is used as signal to change all levels of the example
2268
	pVoid is used as signal to change all levels of the example
Lines 2470-2476 void SwTOXEntryTabPage::ActivatePage( co Link Here
2470
		aEntryNoPB.Show(		bToxIsContent );
2492
		aEntryNoPB.Show(		bToxIsContent );
2471
		aHyperLinkPB.Show(		bToxIsContent );
2493
		aHyperLinkPB.Show(		bToxIsContent );
2472
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2494
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2473
		aChapterInfoPB.Show(	bToxIsIndex );
2495
		aChapterInfoPB.Show(	!bToxIsContent);
2474
		aEntryPB.Show(		   !bToxIsAuthorities );
2496
		aEntryPB.Show(		   !bToxIsAuthorities );
2475
		aPageNoPB.Show(		   !bToxIsAuthorities );
2497
		aPageNoPB.Show(		   !bToxIsAuthorities );
2476
		aAuthFieldsLB.Show(		bToxIsAuthorities );
2498
		aAuthFieldsLB.Show(		bToxIsAuthorities );
Lines 2503-2509 void SwTOXEntryTabPage::ActivatePage( co Link Here
2503
		aMainEntryStyleLB.Show(	bToxIsIndex );
2525
		aMainEntryStyleLB.Show(	bToxIsIndex );
2504
		aAlphaDelimCB.Show(		bToxIsIndex );
2526
		aAlphaDelimCB.Show(		bToxIsIndex );
2505
		aCommaSeparatedCB.Show(	bToxIsIndex );
2527
		aCommaSeparatedCB.Show(	bToxIsIndex );
2506
2507
	}
2528
	}
2508
	aLastTOXType = aCurType;
2529
	aLastTOXType = aCurType;
2509
2530
Lines 2804-2811 IMPL_LINK(SwTOXEntryTabPage, TokenSelect Link Here
2804
			aChapterEntryLB.SelectEntryPos(pToken->nChapterFormat);
2825
			aChapterEntryLB.SelectEntryPos(pToken->nChapterFormat);
2805
		else
2826
		else
2806
			aChapterEntryLB.SetNoSelection();
2827
			aChapterEntryLB.SetNoSelection();
2828
//i53420
2829
//move into position the fixed text
2830
//         aEntryOutlineLevelFT.SetPosPixel( aEntryOutlineLevelFTPosition );
2831
// // then the entry        
2832
//         Point aPoint;
2833
//         aPoint.Y() = aEntryOutlineLevelFTPosition.Y();
2834
//         aPoint.X() = aEntryOutlineLevelFTPosition.X() + nBiasToEntryPoint;
2835
//         aEntryOutlineLevelNF.SetPosPixel( aPoint );
2836
2837
        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
2807
	}
2838
	}
2808
2839
2840
//i53420
2841
	if(pToken->eTokenType == TOKEN_ENTRY_NO)
2842
    {
2843
//move into position the fixed text
2844
//        aEntryOutlineLevelFT.SetPosPixel( aChapterEntryFTPosition );
2845
// // then the entry
2846
//         Point aPoint;
2847
//         aPoint.Y() = aChapterEntryFTPosition.Y();
2848
//         aPoint.X() = aChapterEntryFTPosition.X() + nBiasToEntryPoint;
2849
//         aEntryOutlineLevelNF.SetPosPixel( aPoint );
2850
 
2851
        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
2852
        sal_uInt16 nFormat = 0;
2853
        if( pToken->nChapterFormat == CF_NUM_NOPREPST_TITLE )
2854
            nFormat = 1;
2855
        aNumberFormatLB.SelectEntryPos(nFormat);
2856
    }
2857
2809
    sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType;
2858
    sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType;
2810
    aFillCharFT.Show(bTabStop);
2859
    aFillCharFT.Show(bTabStop);
2811
	aFillCharCB.Show(bTabStop);
2860
	aFillCharCB.Show(bTabStop);
Lines 2826-2833 IMPL_LINK(SwTOXEntryTabPage, TokenSelect Link Here
2826
		aTabPosMF.Enable(sal_False);
2875
		aTabPosMF.Enable(sal_False);
2827
	}
2876
	}
2828
2877
2829
	aChapterEntryFT.Show(pToken->eTokenType == TOKEN_CHAPTER_INFO);
2878
    sal_Bool bIsChapterInfo = pToken->eTokenType == TOKEN_CHAPTER_INFO;
2830
	aChapterEntryLB.Show(pToken->eTokenType == TOKEN_CHAPTER_INFO);
2879
    sal_Bool bIsEntryNumber = pToken->eTokenType == TOKEN_ENTRY_NO;
2880
	aChapterEntryFT.Show( bIsChapterInfo );
2881
	aChapterEntryLB.Show( bIsChapterInfo );
2882
    aEntryOutlineLevelFT.Show( bIsChapterInfo || bIsEntryNumber );
2883
    aEntryOutlineLevelNF.Show( bIsChapterInfo || bIsEntryNumber );
2884
    aNumberFormatFT.Show( bIsEntryNumber );
2885
    aNumberFormatLB.Show( bIsEntryNumber );
2886
    
2831
2887
2832
	//now enable the visible buttons
2888
	//now enable the visible buttons
2833
	//- inserting the same type of control is not allowed
2889
	//- inserting the same type of control is not allowed
Lines 2912-2917 IMPL_LINK(SwTOXEntryTabPage, ChapterInfo Link Here
2912
	}
2968
	}
2913
	return 0;
2969
	return 0;
2914
}
2970
}
2971
2972
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
2973
{
2974
	sal_uInt16 nLevel = pField->GetValue();
2975
2976
    Control* pCtrl = aTokenWIN.GetActiveControl();
2977
    DBG_ASSERT(pCtrl, "no active control?")
2978
	if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
2979
        ((SwTOXButton*)pCtrl)->SetOutlineLevel(nLevel);
2980
2981
    ModifyHdl(0);
2982
	return 0;
2983
}
2984
2985
IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
2986
{
2987
	sal_uInt16 nPos = pBox->GetSelectEntryPos();
2988
2989
	if(LISTBOX_ENTRY_NOTFOUND != nPos)
2990
	{
2991
		Control* pCtrl = aTokenWIN.GetActiveControl();
2992
		DBG_ASSERT(pCtrl, "no active control?")
2993
		if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
2994
        {
2995
            sal_uInt16 nFormat = CF_NUMBER;
2996
            if(nPos == 1)
2997
                nFormat = CF_NUM_NOPREPST_TITLE;
2998
2999
			((SwTOXButton*)pCtrl)->SetChapterInfo(nFormat);
3000
        }
3001
		ModifyHdl(0);
3002
	}
3003
	return 0;
3004
}
3005
2915
/* -----------------19.08.99 15:37-------------------
3006
/* -----------------19.08.99 15:37-------------------
2916
3007
2917
 --------------------------------------------------*/
3008
 --------------------------------------------------*/
(-)sw/source/ui/index/cnttab.hrc (+6 lines)
Lines 233-238 Link Here
233
#define IMG_SORTUP_HC			149
233
#define IMG_SORTUP_HC			149
234
#define IMG_SORTDOWN_HC			150
234
#define IMG_SORTDOWN_HC			150
235
#define ST_NO_BRACKET           151
235
#define ST_NO_BRACKET           151
236
237
#define FT_LEVEL_OL             152
238
#define NF_LEVEL_OL             153
239
#define FT_ENTRY_NO             154
240
#define LB_ENTRY_NO             155
241
236
#define TO_CONTENT 		  	1
242
#define TO_CONTENT 		  	1
237
#define TO_INDEX		    2
243
#define TO_INDEX		    2
238
#define TO_ILLUSTRATION     4
244
#define TO_ILLUSTRATION     4
(-)sw/source/ui/index/cnttab.src (+55 lines)
Lines 982-987 TabPage TP_TOX_ENTRY Link Here
982
		< "Number range and description" ; > ;
982
		< "Number range and description" ; > ;
983
	};
983
	};
984
	};
984
	};
985
986
    FixedText FT_ENTRY_NO
987
        {
988
            Pos = MAP_APPFONT ( 37 , 71 ) ;
989
            Size = MAP_APPFONT ( 60, 8 ) ;
990
            Text [ en-US ] = "Format";
991
            Text [ x-comment ] = " ";
992
        };
993
	ListBox LB_ENTRY_NO
994
	{
995
        Pos = MAP_APPFONT ( 100 , 69 ) ;
996
        Size = MAP_APPFONT ( 93, 40 ) ;
997
        TabStop = TRUE ;
998
        DropDown = TRUE ;
999
        StringList [ de ] =
1000
            {
1001
                < "Nummernkreis" ; > ;
1002
                < "Nummernkreis ohne Trennzeichen" ; > ;
1003
            };
1004
        StringList [ x-comment ] =
1005
            {
1006
                < " " ; > ;
1007
                < " " ; > ;
1008
            };
1009
        StringList [ en-US ] =
1010
            {
1011
                < "Number" ; > ;
1012
                < "Number without separator" ; > ;
1013
            };
1014
	};
1015
    
1016
    FixedText       FT_LEVEL_OL
1017
        {
1018
            Pos = MAP_APPFONT ( 37 , 87 ) ;
1019
            Size = MAP_APPFONT ( 63 , 8 ) ;
1020
            Text [ de ] = "Auswerten bis Ebene" ;
1021
            Text [ en-US ] = "Evaluate up to level";
1022
            Text [ x-comment ] = " ";
1023
        };
1024
    NumericField    NF_LEVEL_OL
1025
        {
1026
            Pos = MAP_APPFONT ( 100 , 85 ) ;
1027
            Size = MAP_APPFONT ( 20 , 12 ) ;
1028
            Border = TRUE ;
1029
            TabStop = TRUE ;
1030
            Left = TRUE ;
1031
            Repeat = TRUE ;
1032
            Spin = TRUE ;
1033
            Minimum = 1 ;
1034
            Maximum = 10 ;
1035
            Value = 10 ;
1036
            SpinSize = 1 ;
1037
        };
1038
1039
    
985
	FixedText FT_TABPOS
1040
	FixedText FT_TABPOS
986
	{
1041
	{
987
        Pos = MAP_APPFONT ( 37 , 87 ) ;
1042
        Pos = MAP_APPFONT ( 37 , 87 ) ;

Return to issue 53420