2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-15 17:28:16 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-04-11 18:21:25 +00:00
|
|
|
|
2013-10-23 19:14:56 +02:00
|
|
|
#ifndef INCLUDED_SVTOOLS_HTMLOUT_HXX
|
|
|
|
#define INCLUDED_SVTOOLS_HTMLOUT_HXX
|
2007-04-11 18:21:25 +00:00
|
|
|
|
2013-11-09 15:40:46 -06:00
|
|
|
#include <svtools/svtdllapi.h>
|
2007-04-11 18:21:25 +00:00
|
|
|
#include <tools/solar.h>
|
|
|
|
#include <rtl/textenc.h>
|
2011-07-29 23:22:28 +01:00
|
|
|
#include <rtl/string.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/macitem.hxx>
|
2007-04-11 18:21:25 +00:00
|
|
|
|
2014-03-16 20:57:51 +01:00
|
|
|
#include "HtmlWriter.hxx"
|
|
|
|
|
2007-04-11 18:21:25 +00:00
|
|
|
class Color;
|
|
|
|
class ImageMap;
|
|
|
|
class SvStream;
|
|
|
|
class SvxMacroTableDtor;
|
|
|
|
class SvNumberFormatter;
|
|
|
|
|
|
|
|
struct HTMLOutEvent
|
|
|
|
{
|
|
|
|
const sal_Char *pBasicName;
|
|
|
|
const sal_Char *pJavaName;
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 nEvent;
|
2007-04-11 18:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SVT_DLLPUBLIC HTMLOutContext
|
|
|
|
{
|
|
|
|
rtl_TextEncoding m_eDestEnc;
|
|
|
|
rtl_TextToUnicodeConverter m_hConv;
|
|
|
|
rtl_TextToUnicodeContext m_hContext;
|
|
|
|
|
|
|
|
HTMLOutContext( rtl_TextEncoding eDestEnc );
|
|
|
|
~HTMLOutContext();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct HTMLOutFuncs
|
|
|
|
{
|
2013-08-20 11:54:26 +02:00
|
|
|
SVT_DLLPUBLIC static OString ConvertStringToHTML( const OUString& sSrc,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2007-04-11 18:21:25 +00:00
|
|
|
|
|
|
|
SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr,
|
2014-03-20 14:38:38 +02:00
|
|
|
bool bOn = true,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252);
|
|
|
|
SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
|
|
|
|
HTMLOutContext& rContext,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2013-07-03 16:14:45 +03:00
|
|
|
SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const OUString&,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2011-01-12 15:56:50 +01:00
|
|
|
SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
|
|
|
|
SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&,
|
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
|
2013-08-20 11:54:26 +02:00
|
|
|
SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const OUString&, const ImageMap&, const OUString&,
|
2007-04-11 18:21:25 +00:00
|
|
|
const HTMLOutEvent *pEventTable,
|
2014-03-20 14:38:38 +02:00
|
|
|
bool bOutStarBasic,
|
2007-04-11 18:21:25 +00:00
|
|
|
const sal_Char *pDelim = 0,
|
|
|
|
const sal_Char *pIndentArea = 0,
|
|
|
|
const sal_Char *pIndentMap = 0,
|
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2007-04-11 18:21:25 +00:00
|
|
|
SVT_DLLPUBLIC static SvStream& FlushToAscii( SvStream&, HTMLOutContext& rContext );
|
|
|
|
|
|
|
|
SVT_DLLPUBLIC static SvStream& OutScript( SvStream& rStrm,
|
2013-08-20 11:54:26 +02:00
|
|
|
const OUString& rBaseURL,
|
|
|
|
const OUString& rSource,
|
2013-07-25 09:37:58 +02:00
|
|
|
const OUString& rLanguage,
|
2007-04-11 18:21:25 +00:00
|
|
|
ScriptType eScriptType,
|
2013-08-20 11:54:26 +02:00
|
|
|
const OUString& rSrc,
|
2013-07-25 09:37:58 +02:00
|
|
|
const OUString *pSBLibrary = 0,
|
|
|
|
const OUString *pSBModule = 0,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2007-04-11 18:21:25 +00:00
|
|
|
|
|
|
|
// der 3. Parameter ist ein Array von HTMLOutEvents, das mit einem
|
|
|
|
// nur aus 0 bestehen Eintrag terminiert ist.
|
|
|
|
SVT_DLLPUBLIC static SvStream& Out_Events( SvStream&, const SvxMacroTableDtor&,
|
2014-03-20 14:38:38 +02:00
|
|
|
const HTMLOutEvent*, bool bOutStarBasic,
|
2007-04-11 18:21:25 +00:00
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0 );
|
2007-04-11 18:21:25 +00:00
|
|
|
|
|
|
|
// <TD SDVAL="..." SDNUM="...">
|
2013-04-07 12:06:47 +02:00
|
|
|
SVT_DLLPUBLIC static OString CreateTableDataOptionsValNum(
|
2014-03-20 14:38:38 +02:00
|
|
|
bool bValue, double fVal, sal_uLong nFormat,
|
2007-04-11 18:21:25 +00:00
|
|
|
SvNumberFormatter& rFormatter,
|
|
|
|
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
|
2013-08-20 11:54:26 +02:00
|
|
|
OUString *pNonConvertableChars = 0);
|
2007-04-11 18:21:25 +00:00
|
|
|
};
|
|
|
|
|
2014-03-16 20:57:51 +01:00
|
|
|
struct HtmlWriterHelper
|
|
|
|
{
|
2014-04-06 23:39:50 +03:00
|
|
|
SVT_DLLPUBLIC static void applyColor( HtmlWriter& rHtmlWriter, const OString &aAttributeName, const Color& rColor);
|
2014-03-16 20:57:51 +01:00
|
|
|
};
|
|
|
|
|
2007-04-11 18:21:25 +00:00
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|