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 (+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 1419-1424 void XMLSectionExport::ExportIndexTempla Link Here
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-1556 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));
1568
//<---
1552
		}
1569
		}
1553
1570
1571
//--->i53420
1572
        if (TOK_TTYPE_ENTRY_NUMBER == nTokenType)
1573
        {
1574
            if (bChapterFormatOK)
1575
                GetExport().AddAttribute(
1576
                    XML_NAMESPACE_TEXT, XML_DISPLAY,
1577
                    XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat));
1578
1579
            if (bLevelOK)
1580
                GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,
1581
                                     OUString::valueOf((sal_Int32)nLevel));
1582
        }
1583
//<---
1554
		// export template
1584
		// export template
1555
		SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT,
1585
		SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT,
1556
											pElement, sal_True, sal_False);
1586
											pElement, sal_True, sal_False);
(-)sw/inc/ndtxt.hxx (-1 / +6 lines)
Lines 404-411 public: Link Here
404
        @param _bInclPrefixAndSuffixStrings
404
        @param _bInclPrefixAndSuffixStrings
405
        optional input parameter - boolean indicating, if the prefix and the
405
        optional input parameter - boolean indicating, if the prefix and the
406
        suffix strings have to been included or not. default value = <true>
406
        suffix strings have to been included or not. default value = <true>
407
408
        @param _nRestrictToThisLevel
409
        optional input parameter - unsigned integer indicating the maximum outline
410
        level to which the output string must be restricted to. Default value is
411
        MAXLEVEL
407
    */
412
    */
408
    XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true ) const;
413
    XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const unsigned int _nRestrictToThisLevel = MAXLEVEL - 1 ) const;
409
414
410
    /**
415
    /**
411
       Returns the additional indents of this text node and its numbering.
416
       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 669-675 SwTOXBase & SwTOXBase::operator = (const Link Here
669
}
669
}
670
670
671
/* -----------------16.07.99 16:02-------------------
671
/* -----------------16.07.99 16:02-------------------
672
672
 Returns the string rapresentation of the index entry line
673
 description 
673
 --------------------------------------------------*/
674
 --------------------------------------------------*/
674
675
675
String SwFormToken::GetString() const
676
String SwFormToken::GetString() const
Lines 737-742 String SwFormToken::GetString() const Link Here
737
    else if(TOKEN_CHAPTER_INFO == eTokenType)
738
    else if(TOKEN_CHAPTER_INFO == eTokenType)
738
    {
739
    {
739
        sRet += String::CreateFromInt32( nChapterFormat );
740
        sRet += String::CreateFromInt32( nChapterFormat );
741
//add maximum permetted level
742
        sRet += ',';       
743
        sRet += String::CreateFromInt32( nOutlineLevel );
740
    }
744
    }
741
    else if(TOKEN_TEXT == eTokenType)
745
    else if(TOKEN_TEXT == eTokenType)
742
    {
746
    {
Lines 752-757 String SwFormToken::GetString() const Link Here
752
        else
756
        else
753
            bAppend = FALSE;
757
            bAppend = FALSE;
754
    }
758
    }
759
    else if(TOKEN_ENTRY_NO == eTokenType)
760
    {
761
        sRet += String::CreateFromInt32( nChapterFormat );
762
//add maximum permitted level
763
        sRet += ',';       
764
        sRet += String::CreateFromInt32( nOutlineLevel );
765
    }
766
755
    if(bAppend)
767
    if(bAppend)
756
    {
768
    {
757
        sRet += '>';
769
        sRet += '>';
Lines 803-808 SwFormToken SwFormTokensHelper::BuildTok Link Here
803
815
804
    switch( eTokenType )
816
    switch( eTokenType )
805
    {
817
    {
818
//i53420        
819
    case TOKEN_ENTRY_NO:
820
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
821
            eRet.nChapterFormat = sTmp.ToInt32();
822
        if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
823
            eRet.nOutlineLevel = sTmp.ToInt32(); //the maximum outline level to examine
824
        break;
825
806
    case TOKEN_TEXT:
826
    case TOKEN_TEXT:
807
        {
827
        {
808
            xub_StrLen nStartText = sToken.Search( TOX_STYLE_DELIMITER );
828
            xub_StrLen nStartText = sToken.Search( TOX_STYLE_DELIMITER );
Lines 836-841 SwFormToken SwFormTokensHelper::BuildTok Link Here
836
    case TOKEN_CHAPTER_INFO:
856
    case TOKEN_CHAPTER_INFO:
837
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
857
        if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
838
            eRet.nChapterFormat = sTmp.ToInt32(); //SwChapterFormat;
858
            eRet.nChapterFormat = sTmp.ToInt32(); //SwChapterFormat;
859
//i53420        
860
        if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
861
            eRet.nOutlineLevel = sTmp.ToInt32(); //the maximum outline level to examine
839
        break;
862
        break;
840
863
841
    case TOKEN_AUTHORITY:
864
    case TOKEN_AUTHORITY:
(-)sw/source/core/txtnode/ndtxt.cxx (-3 / +14 lines)
Lines 2703-2709 BOOL SwTxtNode::HasBullet() const Link Here
2703
// <- #i29560#
2703
// <- #i29560#
2704
2704
2705
// --> OD 2005-11-17 #128041# - introduce parameter <_bInclPrefixAndSuffixStrings>
2705
// --> OD 2005-11-17 #128041# - introduce parameter <_bInclPrefixAndSuffixStrings>
2706
XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings ) const
2706
//i53420 added max outline parameter
2707
XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const
2707
{
2708
{
2708
    // --> OD 2005-11-02 #i51089 - TUNING#
2709
    // --> OD 2005-11-02 #i51089 - TUNING#
2709
    const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
2710
    const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
Lines 2711-2720 XubString SwTxtNode::GetNumString( const Link Here
2711
         GetNum()->IsCounted() &&
2712
         GetNum()->IsCounted() &&
2712
         pRule->Get( GetNum()->GetLevel() ).IsTxtFmt() )
2713
         pRule->Get( GetNum()->GetLevel() ).IsTxtFmt() )
2713
    {
2714
    {
2715
        if( _nRestrictToThisLevel == (MAXLEVEL-1) )
2716
        {
2714
        // --> OD 2005-11-17 #128041#
2717
        // --> OD 2005-11-17 #128041#
2715
        return pRule->MakeNumString( *(GetNum()),
2718
            return pRule->MakeNumString( *(GetNum()),
2716
                                     _bInclPrefixAndSuffixStrings ? TRUE : FALSE );
2719
                                         _bInclPrefixAndSuffixStrings ? TRUE : FALSE );           
2717
        // <--
2720
        // <--
2721
        }
2722
        else
2723
        {
2724
            return pRule->MakeNumString( GetNum()->GetNumberVector(),
2725
                                         _bInclPrefixAndSuffixStrings ? TRUE : FALSE,
2726
                                         FALSE,
2727
                                         _nRestrictToThisLevel );           
2728
        }
2718
    }
2729
    }
2719
    // <--
2730
    // <--
2720
2731
(-)sw/source/core/unocore/unoidx.cxx (-6 / +67 lines)
Lines 2529-2534 void SwXIndexTokenAccess_Impl::replaceBy Link Here
2529
				}
2529
				}
2530
				aToken.nChapterFormat = nFormat;
2530
				aToken.nChapterFormat = nFormat;
2531
			}
2531
			}
2532
//--->i53420
2533
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Level")) )
2534
            {
2535
				sal_Int16 nLevel = lcl_AnyToInt16(pProperties[j].Value);
2536
                if( nLevel < 1 || nLevel > MAXLEVEL ) //FIXME beppec56: ok exception? Would it be better to set to current default?
2537
                    throw lang::IllegalArgumentException();
2538
                aToken.nOutlineLevel = nLevel;
2539
            }
2540
//<---
2532
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
2541
            else if( pProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
2533
			{
2542
			{
2534
				sal_Int16 nType; pProperties[j].Value >>= nType;
2543
				sal_Int16 nType; pProperties[j].Value >>= nType;
Lines 2556-2561 void SwXIndexTokenAccess_Impl::replaceBy Link Here
2556
		if(TOKEN_ENTRY_TEXT == aToken.eTokenType &&
2565
		if(TOKEN_ENTRY_TEXT == aToken.eTokenType &&
2557
								TOX_CONTENT != pTOXBase->GetType())
2566
								TOX_CONTENT != pTOXBase->GetType())
2558
			aToken.eTokenType = TOKEN_ENTRY;
2567
			aToken.eTokenType = TOKEN_ENTRY;
2568
//---> i53420
2569
// check for chapter format allowed values if it was TOKEN_ENTRY_NO type
2570
// only allowed value are CF_NUMBER and CF_NUM_NOPREPST_TITLE
2571
// readiing from file
2572
        if( TOKEN_ENTRY_NO == aToken.eTokenType )
2573
            switch(aToken.nChapterFormat)
2574
            {
2575
            case CF_NUMBER:
2576
            case CF_NUM_NOPREPST_TITLE:
2577
                break;
2578
            default:
2579
// FIXME: may be a throw is better?
2580
                aToken.nChapterFormat = CF_NUMBER;
2581
                break;
2582
            }
2583
//<---
2559
		sPattern += aToken.GetString();
2584
		sPattern += aToken.GetString();
2560
	}
2585
	}
2561
	SwForm aForm(pTOXBase->GetTOXForm());
2586
	SwForm aForm(pTOXBase->GetTOXForm());
Lines 2622-2636 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2622
		{
2647
		{
2623
			case TOKEN_ENTRY_NO     :
2648
			case TOKEN_ENTRY_NO     :
2624
			{
2649
			{
2625
				rCurTokenSeq.realloc( 2 );
2650
//--->i53420
2651
// writing to file (from doc to properties)
2652
                sal_Int32 nElements = 2;
2653
                sal_Int32 nCurrentElement = 0;
2654
2655
                if( aToken.nChapterFormat != CF_NUMBER )//check for default value
2656
                    nElements++;//we need the element
2657
                if( aToken.nOutlineLevel != MAXLEVEL )
2658
                    nElements++;
2659
2660
				rCurTokenSeq.realloc( nElements );
2661
                
2626
				beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2662
				beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2627
2663
2628
				pArr[0].Name = C2U("TokenType");
2664
				pArr[nCurrentElement].Name = C2U("TokenType");
2629
				pArr[0].Value <<= OUString::createFromAscii("TokenEntryNumber");
2665
				pArr[nCurrentElement++].Value <<= OUString::createFromAscii("TokenEntryNumber");
2630
//				pArr[0].Value <<= C2U("TokenEntryNumber");
2666
//				pArr[0].Value <<= C2U("TokenEntryNumber");
2631
2667
2632
				pArr[1].Name = C2U("CharacterStyleName");
2668
				pArr[nCurrentElement].Name = C2U("CharacterStyleName");
2633
                pArr[1].Value <<= aProgCharStyle;
2669
                pArr[nCurrentElement++].Value <<= aProgCharStyle;
2670
                if( aToken.nChapterFormat != CF_NUMBER )
2671
                {
2672
                    pArr[nCurrentElement].Name = C2U("ChapterFormat");
2673
                    sal_Int16 nVal;
2674
//! the allowed values for chapter format, when used as entry number, are CF_NUMBER and CF_NUM_NOPREPST_TITLE only, all else forced to
2675
//CF_NUMBER
2676
                    switch(aToken.nChapterFormat)
2677
                    {
2678
                    default:
2679
                    case CF_NUMBER:				nVal = text::ChapterFormat::NUMBER; break;
2680
                    case CF_NUM_NOPREPST_TITLE:	nVal = text::ChapterFormat::DIGIT; break;
2681
                    }
2682
                    pArr[nCurrentElement++].Value <<= (sal_Int16)nVal;
2683
                }
2684
2685
                if( aToken.nOutlineLevel != MAXLEVEL ) //only  a Level != MAXLEVEL is registered
2686
                {
2687
                    pArr[nCurrentElement].Name = C2U("Level");
2688
                    pArr[nCurrentElement].Value <<= aToken.nOutlineLevel;
2689
                }
2690
//<---
2634
			}
2691
			}
2635
			break;
2692
			break;
2636
			case TOKEN_ENTRY        :	// no difference between Entry and Entry Text
2693
			case TOKEN_ENTRY        :	// no difference between Entry and Entry Text
Lines 2707-2713 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2707
			break;
2764
			break;
2708
			case TOKEN_CHAPTER_INFO :
2765
			case TOKEN_CHAPTER_INFO :
2709
			{
2766
			{
2710
				rCurTokenSeq.realloc( 3 );
2767
				rCurTokenSeq.realloc( 4 );
2711
				beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2768
				beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2712
2769
2713
				pArr[0].Name = C2U("TokenType");
2770
				pArr[0].Name = C2U("TokenType");
Lines 2727-2732 uno::Any SwXIndexTokenAccess_Impl::getBy Link Here
2727
					case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break;
2784
					case CF_NUM_NOPREPST_TITLE: nVal = text::ChapterFormat::DIGIT; break;
2728
				}
2785
				}
2729
				pArr[2].Value <<= (sal_Int16)nVal;
2786
				pArr[2].Value <<= (sal_Int16)nVal;
2787
//--->i53420
2788
				pArr[3].Name = C2U("Level");
2789
                pArr[3].Value <<= aToken.nOutlineLevel;
2790
//<---
2730
			}
2791
			}
2731
			break;
2792
			break;
2732
			case TOKEN_LINK_START   :
2793
			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 (-5 / +96 lines)
Lines 178-183 Link Here
178
#ifndef _CNTTAB_HRC
178
#ifndef _CNTTAB_HRC
179
#include <cnttab.hrc>
179
#include <cnttab.hrc>
180
#endif
180
#endif
181
182
#ifndef _CHPFLD_HXX
183
#include <chpfld.hxx> //FIXME, see if ok
184
#endif
185
181
#ifndef _GLOBALS_HRC
186
#ifndef _GLOBALS_HRC
182
#include <globals.hrc>
187
#include <globals.hrc>
183
#endif
188
#endif
Lines 1978-1983 public: Link Here
1978
	void SetChapterInfo(sal_uInt16 nSet) { aFormToken.nChapterFormat = nSet;}
1983
	void SetChapterInfo(sal_uInt16 nSet) { aFormToken.nChapterFormat = nSet;}
1979
	sal_uInt16 GetChapterInfo() const{ return aFormToken.nChapterFormat;}
1984
	sal_uInt16 GetChapterInfo() const{ return aFormToken.nChapterFormat;}
1980
1985
1986
   	void SetOutlineLevel(sal_uInt16 nSet) { aFormToken.nOutlineLevel = nSet;}//i53420
1987
	sal_uInt16 GetOutlineLevel() const{ return aFormToken.nOutlineLevel;}
1988
1981
	void SetLinkEnd()
1989
	void SetLinkEnd()
1982
		{
1990
		{
1983
			DBG_ASSERT(TOKEN_LINK_START == aFormToken.eTokenType,
1991
			DBG_ASSERT(TOKEN_LINK_START == aFormToken.eTokenType,
Lines 2100-2105 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2100
	aFillCharCB(this,			SW_RES(CB_FILLCHAR			)),
2108
	aFillCharCB(this,			SW_RES(CB_FILLCHAR			)),
2101
	aChapterEntryFT(this, 		SW_RES(FT_CHAPTERENTRY		)),
2109
	aChapterEntryFT(this, 		SW_RES(FT_CHAPTERENTRY		)),
2102
	aChapterEntryLB(this, 		SW_RES(LB_CHAPTERENTRY		)),
2110
	aChapterEntryLB(this, 		SW_RES(LB_CHAPTERENTRY		)),
2111
2112
    aNumberFormatFT(this, 		SW_RES(FT_ENTRY_NO           )),//i53420
2113
    aNumberFormatLB(this, 		SW_RES(LB_ENTRY_NO           )),
2114
    aEntryOutlineLevelFT(this,  SW_RES(FT_LEVEL_OL           )),//i53420
2115
    aEntryOutlineLevelNF(this,  SW_RES(NF_LEVEL_OL           )),
2116
2103
	aTabPosFT(this, 			SW_RES(FT_TABPOS				)),
2117
	aTabPosFT(this, 			SW_RES(FT_TABPOS				)),
2104
	aTabPosMF(this, 			SW_RES(MF_TABPOS				)),
2118
	aTabPosMF(this, 			SW_RES(MF_TABPOS				)),
2105
	aAutoRightCB(this, 			SW_RES(CB_AUTORIGHT			)),
2119
	aAutoRightCB(this, 			SW_RES(CB_AUTORIGHT			)),
Lines 2173-2178 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2173
	aCharStyleLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
2187
	aCharStyleLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, StyleSelectHdl));
2174
	aCharStyleLB.InsertEntry(sNoCharStyle);
2188
	aCharStyleLB.InsertEntry(sNoCharStyle);
2175
	aChapterEntryLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
2189
	aChapterEntryLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoHdl));
2190
	aEntryOutlineLevelNF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, ChapterInfoOutlineHdl));
2191
	aNumberFormatLB.SetSelectHdl(LINK(this, SwTOXEntryTabPage, NumberFormatHdl));
2192
    
2176
	aTabPosMF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
2193
	aTabPosMF.SetModifyHdl(LINK(this, SwTOXEntryTabPage, TabPosHdl));
2177
	aFillCharCB.SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
2194
	aFillCharCB.SetModifyHdl(LINK(this, SwTOXEntryTabPage, FillCharHdl));
2178
	aAutoRightCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
2195
	aAutoRightCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, AutoRightHdl));
Lines 2209-2214 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2209
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2226
		(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
2210
	aEditStylePB.Enable(sal_False);
2227
	aEditStylePB.Enable(sal_False);
2211
2228
2229
//get position for Numbering and other stuff
2230
    aChapterEntryFTPosition = aChapterEntryFT.GetPosPixel();
2231
    aEntryOutlineLevelFTPosition = aEntryOutlineLevelFT.GetPosPixel();
2232
    nBiasToEntryPoint = aEntryOutlineLevelNF.GetPosPixel().X() -
2233
                               aEntryOutlineLevelFT.GetPosPixel().X();
2234
2212
	//fill the types in
2235
	//fill the types in
2213
	sal_uInt32 i;
2236
	sal_uInt32 i;
2214
	for( i = 0; i < AUTH_FIELD_END; i++)
2237
	for( i = 0; i < AUTH_FIELD_END; i++)
Lines 2238-2244 SwTOXEntryTabPage::SwTOXEntryTabPage(Win Link Here
2238
	aFirstKeyLB.SelectEntryPos(0);
2261
	aFirstKeyLB.SelectEntryPos(0);
2239
	aSecondKeyLB.SelectEntryPos(0);
2262
	aSecondKeyLB.SelectEntryPos(0);
2240
	aThirdKeyLB.SelectEntryPos(0);
2263
	aThirdKeyLB.SelectEntryPos(0);
2241
2242
}
2264
}
2243
/* -----------------30.11.99 13:37-------------------
2265
/* -----------------30.11.99 13:37-------------------
2244
	pVoid is used as signal to change all levels of the example
2266
	pVoid is used as signal to change all levels of the example
Lines 2468-2474 void SwTOXEntryTabPage::ActivatePage( co Link Here
2468
		aEntryNoPB.Show(		bToxIsContent );
2490
		aEntryNoPB.Show(		bToxIsContent );
2469
		aHyperLinkPB.Show(		bToxIsContent );
2491
		aHyperLinkPB.Show(		bToxIsContent );
2470
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2492
		aRelToStyleCB.Show(	   !bToxIsAuthorities );
2471
		aChapterInfoPB.Show(	bToxIsIndex );
2493
		aChapterInfoPB.Show(	!bToxIsContent);
2472
		aEntryPB.Show(		   !bToxIsAuthorities );
2494
		aEntryPB.Show(		   !bToxIsAuthorities );
2473
		aPageNoPB.Show(		   !bToxIsAuthorities );
2495
		aPageNoPB.Show(		   !bToxIsAuthorities );
2474
		aAuthFieldsLB.Show(		bToxIsAuthorities );
2496
		aAuthFieldsLB.Show(		bToxIsAuthorities );
Lines 2501-2507 void SwTOXEntryTabPage::ActivatePage( co Link Here
2501
		aMainEntryStyleLB.Show(	bToxIsIndex );
2523
		aMainEntryStyleLB.Show(	bToxIsIndex );
2502
		aAlphaDelimCB.Show(		bToxIsIndex );
2524
		aAlphaDelimCB.Show(		bToxIsIndex );
2503
		aCommaSeparatedCB.Show(	bToxIsIndex );
2525
		aCommaSeparatedCB.Show(	bToxIsIndex );
2504
2505
	}
2526
	}
2506
	aLastTOXType = aCurType;
2527
	aLastTOXType = aCurType;
2507
2528
Lines 2802-2809 IMPL_LINK(SwTOXEntryTabPage, TokenSelect Link Here
2802
			aChapterEntryLB.SelectEntryPos(pToken->nChapterFormat);
2823
			aChapterEntryLB.SelectEntryPos(pToken->nChapterFormat);
2803
		else
2824
		else
2804
			aChapterEntryLB.SetNoSelection();
2825
			aChapterEntryLB.SetNoSelection();
2826
//i53420
2827
//move into position the fixed text
2828
//         aEntryOutlineLevelFT.SetPosPixel( aEntryOutlineLevelFTPosition );
2829
// // then the entry        
2830
//         Point aPoint;
2831
//         aPoint.Y() = aEntryOutlineLevelFTPosition.Y();
2832
//         aPoint.X() = aEntryOutlineLevelFTPosition.X() + nBiasToEntryPoint;
2833
//         aEntryOutlineLevelNF.SetPosPixel( aPoint );
2834
2835
        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
2805
	}
2836
	}
2806
2837
2838
//i53420
2839
	if(pToken->eTokenType == TOKEN_ENTRY_NO)
2840
    {
2841
//move into position the fixed text
2842
//        aEntryOutlineLevelFT.SetPosPixel( aChapterEntryFTPosition );
2843
// // then the entry
2844
//         Point aPoint;
2845
//         aPoint.Y() = aChapterEntryFTPosition.Y();
2846
//         aPoint.X() = aChapterEntryFTPosition.X() + nBiasToEntryPoint;
2847
//         aEntryOutlineLevelNF.SetPosPixel( aPoint );
2848
 
2849
        aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
2850
        sal_uInt16 nFormat = 0;
2851
        if( pToken->nChapterFormat == CF_NUM_NOPREPST_TITLE )
2852
            nFormat = 1;
2853
        aNumberFormatLB.SelectEntryPos(nFormat);
2854
    }
2855
2807
    sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType;
2856
    sal_Bool bTabStop = TOKEN_TAB_STOP == pToken->eTokenType;
2808
    aFillCharFT.Show(bTabStop);
2857
    aFillCharFT.Show(bTabStop);
2809
	aFillCharCB.Show(bTabStop);
2858
	aFillCharCB.Show(bTabStop);
Lines 2824-2831 IMPL_LINK(SwTOXEntryTabPage, TokenSelect Link Here
2824
		aTabPosMF.Enable(sal_False);
2873
		aTabPosMF.Enable(sal_False);
2825
	}
2874
	}
2826
2875
2827
	aChapterEntryFT.Show(pToken->eTokenType == TOKEN_CHAPTER_INFO);
2876
    sal_Bool bIsChapterInfo = pToken->eTokenType == TOKEN_CHAPTER_INFO;
2828
	aChapterEntryLB.Show(pToken->eTokenType == TOKEN_CHAPTER_INFO);
2877
    sal_Bool bIsEntryNumber = pToken->eTokenType == TOKEN_ENTRY_NO;
2878
	aChapterEntryFT.Show( bIsChapterInfo );
2879
	aChapterEntryLB.Show( bIsChapterInfo );
2880
    aEntryOutlineLevelFT.Show( bIsChapterInfo || bIsEntryNumber );
2881
    aEntryOutlineLevelNF.Show( bIsChapterInfo || bIsEntryNumber );
2882
    aNumberFormatFT.Show( bIsEntryNumber );
2883
    aNumberFormatLB.Show( bIsEntryNumber );
2884
    
2829
2885
2830
	//now enable the visible buttons
2886
	//now enable the visible buttons
2831
	//- inserting the same type of control is not allowed
2887
	//- inserting the same type of control is not allowed
Lines 2910-2915 IMPL_LINK(SwTOXEntryTabPage, ChapterInfo Link Here
2910
	}
2966
	}
2911
	return 0;
2967
	return 0;
2912
}
2968
}
2969
2970
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
2971
{
2972
	sal_uInt16 nLevel = pField->GetValue();
2973
2974
    Control* pCtrl = aTokenWIN.GetActiveControl();
2975
    DBG_ASSERT(pCtrl, "no active control?")
2976
	if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
2977
        ((SwTOXButton*)pCtrl)->SetOutlineLevel(nLevel);
2978
2979
    ModifyHdl(0);
2980
	return 0;
2981
}
2982
2983
IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
2984
{
2985
	sal_uInt16 nPos = pBox->GetSelectEntryPos();
2986
2987
	if(LISTBOX_ENTRY_NOTFOUND != nPos)
2988
	{
2989
		Control* pCtrl = aTokenWIN.GetActiveControl();
2990
		DBG_ASSERT(pCtrl, "no active control?")
2991
		if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
2992
        {
2993
            sal_uInt16 nFormat = CF_NUMBER;
2994
            if(nPos == 1)
2995
                nFormat = CF_NUM_NOPREPST_TITLE;
2996
2997
			((SwTOXButton*)pCtrl)->SetChapterInfo(nFormat);
2998
        }
2999
		ModifyHdl(0);
3000
	}
3001
	return 0;
3002
}
3003
2913
/* -----------------19.08.99 15:37-------------------
3004
/* -----------------19.08.99 15:37-------------------
2914
3005
2915
 --------------------------------------------------*/
3006
 --------------------------------------------------*/
(-)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 766-771 TabPage TP_TOX_ENTRY Link Here
766
		< "Number range and description" ; > ;
766
		< "Number range and description" ; > ;
767
	};
767
	};
768
	};
768
	};
769
770
    FixedText FT_ENTRY_NO
771
        {
772
            Pos = MAP_APPFONT ( 37 , 71 ) ;
773
            Size = MAP_APPFONT ( 60, 8 ) ;
774
            Text [ en-US ] = "Format";
775
            Text [ x-comment ] = " ";
776
        };
777
	ListBox LB_ENTRY_NO
778
	{
779
        Pos = MAP_APPFONT ( 100 , 69 ) ;
780
        Size = MAP_APPFONT ( 93, 40 ) ;
781
        TabStop = TRUE ;
782
        DropDown = TRUE ;
783
        StringList [ de ] =
784
            {
785
                < "Nummernkreis" ; > ;
786
                < "Nummernkreis ohne Trennzeichen" ; > ;
787
            };
788
        StringList [ x-comment ] =
789
            {
790
                < " " ; > ;
791
                < " " ; > ;
792
            };
793
        StringList [ en-US ] =
794
            {
795
                < "Number" ; > ;
796
                < "Number without separator" ; > ;
797
            };
798
	};
799
    
800
    FixedText       FT_LEVEL_OL
801
        {
802
            Pos = MAP_APPFONT ( 37 , 87 ) ;
803
            Size = MAP_APPFONT ( 63 , 8 ) ;
804
            Text [ de ] = "Auswerten bis Ebene" ;
805
            Text [ en-US ] = "Evaluate up to level";
806
            Text [ x-comment ] = " ";
807
        };
808
    NumericField    NF_LEVEL_OL
809
        {
810
            Pos = MAP_APPFONT ( 100 , 85 ) ;
811
            Size = MAP_APPFONT ( 20 , 12 ) ;
812
            Border = TRUE ;
813
            TabStop = TRUE ;
814
            Left = TRUE ;
815
            Repeat = TRUE ;
816
            Spin = TRUE ;
817
            Minimum = 1 ;
818
            Maximum = 10 ;
819
            Value = 10 ;
820
            SpinSize = 1 ;
821
        };
822
823
    
769
	FixedText FT_TABPOS
824
	FixedText FT_TABPOS
770
	{
825
	{
771
        Pos = MAP_APPFONT ( 37 , 87 ) ;
826
        Pos = MAP_APPFONT ( 37 , 87 ) ;

Return to issue 53420