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