xref: /aoo41x/main/sfx2/inc/sfx2/frmhtmlw.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _FRMHTMLW_HXX
24cdf0e10cSrcweir #define _FRMHTMLW_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "sal/config.h"
27cdf0e10cSrcweir #include "sfx2/dllapi.h"
28cdf0e10cSrcweir #include "sal/types.h"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <sfx2/frmdescr.hxx>
31cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
32cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
33cdf0e10cSrcweir #include <tools/stream.hxx>
34cdf0e10cSrcweir #include <svtools/parhtml.hxx>
35cdf0e10cSrcweir #include <svtools/htmlout.hxx>
36cdf0e10cSrcweir #include <svtools/htmlkywd.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir class SfxFrameSetObjectShell;
39cdf0e10cSrcweir class SfxFrame;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace com { namespace sun { namespace star {
42cdf0e10cSrcweir     namespace document {
43cdf0e10cSrcweir         class XDocumentProperties;
44cdf0e10cSrcweir     }
45cdf0e10cSrcweir } } }
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxFrameHTMLWriter
48cdf0e10cSrcweir {
49cdf0e10cSrcweir 	SAL_DLLPRIVATE static const sal_Char sNewLine[];
50cdf0e10cSrcweir 	SAL_DLLPRIVATE static void OutMeta( SvStream& rStrm,
51cdf0e10cSrcweir 								const sal_Char *pIndent, const String& rName,
52cdf0e10cSrcweir 								const String& rContent, sal_Bool bHTTPEquiv,
53cdf0e10cSrcweir 								rtl_TextEncoding eDestEnc,
54cdf0e10cSrcweir 							String *pNonConvertableChars = 0 );
55cdf0e10cSrcweir 	SAL_DLLPRIVATE inline static void OutMeta( SvStream& rStrm,
56cdf0e10cSrcweir 								const sal_Char *pIndent, const sal_Char *pName,
57cdf0e10cSrcweir 								const String& rContent, sal_Bool bHTTPEquiv,
58cdf0e10cSrcweir 								rtl_TextEncoding eDestEnc,
59cdf0e10cSrcweir 							String *pNonConvertableChars = 0 );
60cdf0e10cSrcweir 
61cdf0e10cSrcweir public:
62cdf0e10cSrcweir     static void Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
63cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
64cdf0e10cSrcweir                 ::com::sun::star::document::XDocumentProperties>&,
65cdf0e10cSrcweir 			const sal_Char *pIndent,
66cdf0e10cSrcweir 			rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
67cdf0e10cSrcweir 			String *pNonConvertableChars = 0 );
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	static void Out_FrameDescriptor(
70cdf0e10cSrcweir         SvStream&, const String& rBaseURL, const com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet >& xSet,
71cdf0e10cSrcweir 		rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
72cdf0e10cSrcweir 		String *pNonConvertableChars = 0 );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	String CreateURL( SfxFrame* pFrame );
75cdf0e10cSrcweir 
76cdf0e10cSrcweir };
77cdf0e10cSrcweir 
OutMeta(SvStream & rStrm,const sal_Char * pIndent,const sal_Char * pName,const String & rContent,sal_Bool bHTTPEquiv,rtl_TextEncoding eDestEnc,String * pNonConvertableChars)78cdf0e10cSrcweir inline void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
79cdf0e10cSrcweir 							const sal_Char *pIndent, const sal_Char *pName,
80cdf0e10cSrcweir 							const String& rContent, sal_Bool bHTTPEquiv,
81cdf0e10cSrcweir 							rtl_TextEncoding eDestEnc,
82cdf0e10cSrcweir 							String *pNonConvertableChars )
83cdf0e10cSrcweir {
84cdf0e10cSrcweir 	String sTmp = String::CreateFromAscii( pName );
85cdf0e10cSrcweir 	OutMeta( rStrm, pIndent, sTmp, rContent, bHTTPEquiv, eDestEnc, pNonConvertableChars );
86cdf0e10cSrcweir }
87cdf0e10cSrcweir 
88cdf0e10cSrcweir #endif
89cdf0e10cSrcweir 
90