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 |
--------------------------------------------------*/ |