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 
24 #ifndef _RESOURCEMANAGER_HXX
25 #define _RESOURCEMANAGER_HXX
26 
27 #include <tools/resmgr.hxx>
28 #include <tools/datetime.hxx>
29 #include <com/sun/star/util/DateTime.hpp>
30 #include <com/sun/star/uno/Sequence.hxx>
31 
32 #include <vector>
33 
34 class FixedImage;
35 class FixedInfo;
36 class Control;
37 class LocaleDataWrapper;
38 
39 namespace XmlSec
40 {
41 	ResMgr*			GetResMgr( void );
42 
43 	const LocaleDataWrapper&    GetLocaleData( void );
44 	DateTime		GetDateTime( const ::com::sun::star::util::DateTime& _rDT );
45 	String			GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT );
46 	String			GetDateTimeString( const rtl::OUString& _rDate, const rtl::OUString& _rTime );
47 	String			GetDateString( const ::com::sun::star::util::DateTime& _rDT );
48 
49     std::vector< std::pair< ::rtl::OUString, ::rtl::OUString> >
50         parseDN(const ::rtl::OUString& rRawString);
51     std::pair< ::rtl::OUString, ::rtl::OUString> GetDNForCertDetailsView(
52         const ::rtl::OUString & rRawString);
53     String          GetContentPart( const String& _rRawString );
54 
55 	String			GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", sal_uInt16 _nLineBreak = 0xFFFF );
56 
57 	long			ShrinkToFitWidth( Control& _rCtrl, long _nOffs = 0 );		// return = new width
58 	void			AlignAfterImage( const FixedImage& _rImage, Control& _rCtrl, long _nXOffset = 0 );
59 	void			AlignAfterImage( const FixedImage& _rImage, FixedInfo& _rFI, long _nXOffset = 0 );
60 	void			AlignAndFitImageAndControl( FixedImage& _rImage, FixedInfo& _rFI, long _nXOffset = 0 );
61 }
62 
63 #define XMLSEC_RES(id)		ResId(id,*XmlSec::GetResMgr())
64 
65 #endif
66