1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef ADC_ADOC_CX_A_SUB_HXX 29 #define ADC_ADOC_CX_A_SUB_HXX 30 31 // USED SERVICES 32 // BASE CLASSES 33 #include <tokens/tkpcontx.hxx> 34 // COMPONENTS 35 #include <tokens/tkpstama.hxx> 36 // PARAMETERS 37 #include <tokens/token.hxx> 38 39 40 namespace adoc { 41 42 43 44 45 class Cx_LineStart : public TkpContext 46 { 47 public: 48 Cx_LineStart( 49 TkpContext & i_rFollowUpContext ); 50 51 virtual void ReadCharChain( 52 CharacterSource & io_rText ); 53 virtual bool PassNewToken(); 54 virtual TkpContext & 55 FollowUpContext(); 56 57 void SetCurToken( 58 TextToken::F_CRTOK i_fTokenCreateFunction ) 59 { fCur_TokenCreateFunction = i_fTokenCreateFunction; } 60 void AssignDealer( 61 TokenDealer & o_rDealer ) 62 { pDealer = &o_rDealer; } 63 private: 64 // DATA 65 TokenDealer * pDealer; 66 TkpContext * pFollowUpContext; 67 68 Dyn<TextToken> pNewToken; 69 70 TextToken::F_CRTOK fCur_TokenCreateFunction; 71 }; 72 73 74 /** 75 @descr 76 */ 77 78 class Cx_CheckStar : public TkpContext 79 { 80 public: 81 // LIFECYCLE 82 Cx_CheckStar( 83 TkpContext & i_rFollowUpContext ); 84 void Set_End_FollowUpContext( 85 TkpContext & i_rEnd_FollowUpContext ) 86 { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; } 87 88 virtual void ReadCharChain( 89 CharacterSource & io_rText ); 90 virtual bool PassNewToken(); 91 92 void SetCanBeEnd( 93 bool i_bCanBeEnd ) 94 { bCanBeEnd = i_bCanBeEnd; } 95 virtual TkpContext & 96 FollowUpContext(); 97 void AssignDealer( 98 TokenDealer & o_rDealer ) 99 { pDealer = &o_rDealer; } 100 private: 101 // DATA 102 TokenDealer * pDealer; 103 TkpContext * pFollowUpContext; 104 TkpContext * pEnd_FollowUpContext; 105 106 Dyn<TextToken> pNewToken; 107 108 bool bCanBeEnd; 109 bool bEndTokenFound; 110 }; 111 112 113 class Cx_AtTagCompletion : public TkpContext 114 { 115 public: 116 Cx_AtTagCompletion( 117 TkpContext & i_rFollowUpContext ); 118 119 virtual void ReadCharChain( 120 CharacterSource & io_rText ); 121 virtual bool PassNewToken(); 122 virtual TkpContext & 123 FollowUpContext(); 124 125 void SetCurToken( 126 TextToken::F_CRTOK i_fTokenCreateFunction ) 127 { fCur_TokenCreateFunction = i_fTokenCreateFunction; } 128 void AssignDealer( 129 TokenDealer & o_rDealer ) 130 { pDealer = &o_rDealer; } 131 private: 132 // DATA 133 TokenDealer * pDealer; 134 TkpContext * pFollowUpContext; 135 136 Dyn<TextToken> pNewToken; 137 138 TextToken::F_CRTOK fCur_TokenCreateFunction; 139 }; 140 141 142 } // namespace adoc 143 144 145 #endif 146 147