merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / ary_i / kernel / ci_text2.cxx
blob59aa5703dca547130540599b408754c079303689
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ci_text2.cxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <precomp.h>
32 #include <ary_i/ci_text2.hxx>
35 // NOT FULLY DEFINED SERVICES
36 #include <ary_i/disdocum.hxx>
37 #include <ary_i/d_token.hxx>
40 namespace ary
42 namespace inf
45 DocuTex2::DocuTex2()
49 DocuTex2::~DocuTex2()
51 for ( TokenList::iterator iter = aTokens.begin();
52 iter != aTokens.end();
53 ++iter )
55 delete (*iter);
59 void
60 DocuTex2::DisplayAt( DocumentationDisplay & o_rDisplay ) const
62 for ( ary::inf::DocuTex2::TokenList::const_iterator
63 iter = aTokens.begin();
64 iter != aTokens.end();
65 ++iter )
67 (*iter)->DisplayAt(o_rDisplay);
71 void
72 DocuTex2::AddToken( DYN DocuToken & let_drToken )
74 if (aTokens.empty())
76 if (let_drToken.IsWhiteOnly())
77 return;
79 aTokens.push_back(&let_drToken);
82 bool
83 DocuTex2::IsEmpty() const
85 for ( ary::inf::DocuTex2::TokenList::const_iterator
86 iter = aTokens.begin();
87 iter != aTokens.end();
88 ++iter )
90 return false;
92 return true;
95 using csi::dsapi::DT_TextToken;
97 const String &
98 DocuTex2::TextOfFirstToken() const
100 if (NOT aTokens.empty())
102 const DT_TextToken *
103 pTok = dynamic_cast< const DT_TextToken* >(*aTokens.begin());
105 if (pTok != 0)
106 return pTok->GetTextStr();
108 return String::Null_();
111 String &
112 DocuTex2::Access_TextOfFirstToken()
114 if (NOT aTokens.empty())
116 DT_TextToken *
117 pTok = dynamic_cast< DT_TextToken* >(*aTokens.begin());
119 if (pTok != 0)
120 return pTok->Access_Text();
123 static String sDummy_;
124 return sDummy_;
129 void DocuText_Display::Display_StdAtTag(
130 const csi::dsapi::DT_StdAtTag & ) {}
131 void DocuText_Display::Display_SeeAlsoAtTag(
132 const csi::dsapi::DT_SeeAlsoAtTag & ) {}
133 void DocuText_Display::Display_ParameterAtTag(
134 const csi::dsapi::DT_ParameterAtTag & ) {}
135 void DocuText_Display::Display_SinceAtTag(
136 const csi::dsapi::DT_SinceAtTag & ) {}
140 } // namespace inf
141 } // namespace ary