The htmlhelp.cpp
File Reference
Included Headers
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include "htmlhelp.h"
#include "config.h"
#include "message.h"
#include "doxygen.h"
#include "language.h"
#include "portable.h"
#include "groupdef.h"
#include "memberdef.h"
#include "filedef.h"
#include "util.h"
#include "linkedmap.h"
#include "regex.h"
#include "fileinfo.h"
Classes Index
class | HtmlHelpRecoder |
Helper class to deal with recoding the UTF8 encoded text back to the native encoding specified by CHM_INDEX_ENCODING. More... | |
struct | IndexField |
Class representing a field in the HTML help index. More... | |
class | HtmlHelpIndex |
A helper class for HtmlHelp that manages a two level index in alphabetical order. More... | |
class | Private |
Functions Index
static QCString | field2URL (const IndexField *f, bool checkReversed) |
static QCString | convertToHtmlAndTruncate (const QCString &s) |
Functions
convertToHtmlAndTruncate()
| static |
Definition at line 185 of file htmlhelp.cpp.
185static QCString convertToHtmlAndTruncate(const QCString &s)
186{
187 /* to prevent
188 * Warning: Keyword string:
189 * ...
190 * is too long. The maximum size is 488 characters.
191 */
192 int maxLen = 400;
193 size_t maxExpandedLen = maxLen+50;
194 QCString result = convertToHtml(s,true);
195 if (result.length()>maxExpandedLen) // we need to truncate the string
196 {
197 // in the unlikely case that the string after conversion grows from maxLen to maxExpandedLen, we try smaller parts
198 // until we end up below the limit
199 while (maxLen>0 && result.length()>maxExpandedLen)
200 {
201 result = convertToHtml(s.left(maxLen));
202 maxLen-=20;
203 }
204 return result+"...";
205 }
206 else
207 {
208 return result;
209 }
210}
References convertToHtml, QCString::left and QCString::length.
Referenced by HtmlHelpIndex::writeFields.
field2URL()
| static |
Definition at line 174 of file htmlhelp.cpp.
174static QCString field2URL(const IndexField *f,bool checkReversed)
175{
177 addHtmlExtensionIfMissing(result);
179 {
180 result+="#"+f->anchor;
181 }
182 return result;
183}
References addHtmlExtensionIfMissing, IndexField::anchor, QCString::isEmpty, IndexField::reversed and IndexField::url.
Referenced by HtmlHelpIndex::writeFields.
Generated via doxygen2docusaurus by Doxygen 1.14.0.