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