1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hi_linkhelper.hxx,v $
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 #ifndef ADC_DISPLAY_HI_LINKHELPER_HXX
32 #define ADC_DISPLAY_HI_LINKHELPER_HXX
41 #include <toolkit/out_position.hxx>
42 #include <toolkit/out_tree.hxx>
48 typedef ary::idl::CodeEntity CE
;
49 typedef output::Position OutPosition
;
56 OutPosition
PositionOf_CurModule() const
57 { return OutPosition( rEnv
.CurPosition(),
58 output::ModuleFileName()); }
60 OutPosition
PositionOf_CurXRefs(
61 const String
& i_ceName
) const;
62 OutPosition
PositionOf_Index() const
63 { OutPosition ret1
= rEnv
.OutputTree().IndexRoot();
64 return OutPosition( ret1
, String(output::IndexFile_A()) ); }
67 const ary::idl::Module
*
68 Search_CurModule() const;
69 const ary::idl::Module
*
71 output::Node
& i_node
) const;
73 const CE
* Search_CeFromType(
74 ary::idl::Type_id i_type
) const;
76 void Get_Link2Position(
78 OutPosition
& i_pos
) const
79 { rEnv
.CurPosition().Get_LinkTo(o_link
, i_pos
); }
83 OutPosition
& i_ownerPos
,
84 const String
& i_memberName
) const
85 { Get_Link2Position(o_link
, i_ownerPos
);
86 o_link
<< "#" << i_memberName
; }
87 const String
& XrefsSuffix() const;
91 mutable HtmlEnvironment_Idl
&
95 inline const ary::idl::CodeEntity
*
96 LinkHelper::Search_CeFromType( ary::idl::Type_id i_type
) const
98 ary::idl::Ce_id nCe
= rEnv
.Data().CeFromType(i_type
);
100 return &rEnv
.Data().Find_Ce(nCe
);
106 String
nameChainLinker(
107 const char * i_levelName
);