1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _RESOURCEMANAGER_HXX
29 #define _RESOURCEMANAGER_HXX
30 
31 #include <tools/resmgr.hxx>
32 #include <tools/datetime.hxx>
33 #include <com/sun/star/util/DateTime.hpp>
34 #include <com/sun/star/uno/Sequence.hxx>
35 
36 #include <vector>
37 
38 class FixedImage;
39 class FixedInfo;
40 class Control;
41 class LocaleDataWrapper;
42 
43 namespace XmlSec
44 {
45 	ResMgr*			GetResMgr( void );
46 
47 	const LocaleDataWrapper&    GetLocaleData( void );
48 	DateTime		GetDateTime( const ::com::sun::star::util::DateTime& _rDT );
49 	String			GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT );
50 	String			GetDateTimeString( const rtl::OUString& _rDate, const rtl::OUString& _rTime );
51 	String			GetDateString( const ::com::sun::star::util::DateTime& _rDT );
52 
53     std::vector< std::pair< ::rtl::OUString, ::rtl::OUString> >
54         parseDN(const ::rtl::OUString& rRawString);
55     std::pair< ::rtl::OUString, ::rtl::OUString> GetDNForCertDetailsView(
56         const ::rtl::OUString & rRawString);
57     String          GetContentPart( const String& _rRawString );
58 
59 	String			GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", sal_uInt16 _nLineBreak = 0xFFFF );
60 
61 	long			ShrinkToFitWidth( Control& _rCtrl, long _nOffs = 0 );		// return = new width
62 	void			AlignAfterImage( const FixedImage& _rImage, Control& _rCtrl, long _nXOffset = 0 );
63 	void			AlignAfterImage( const FixedImage& _rImage, FixedInfo& _rFI, long _nXOffset = 0 );
64 	void			AlignAndFitImageAndControl( FixedImage& _rImage, FixedInfo& _rFI, long _nXOffset = 0 );
65 }
66 
67 #define XMLSEC_RES(id)		ResId(id,*XmlSec::GetResMgr())
68 
69 #endif
70