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 __FRAMEWORK_SERVICES_URIABBREVIATION_HXX_
25 #define __FRAMEWORK_SERVICES_URIABBREVIATION_HXX_
26 
27 #include <macros/xinterface.hxx>
28 #include <macros/xtypeprovider.hxx>
29 #include <macros/xserviceinfo.hxx>
30 #include <general.h>
31 
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/util/XStringAbbreviation.hpp>
34 #include <com/sun/star/uno/XComponentContext.hpp>
35 
36 #include <cppuhelper/implbase2.hxx>
37 
38 namespace framework
39 {
40 
41 class UriAbbreviation:    public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringAbbreviation, css::lang::XServiceInfo>
42 {
43 public:
44     explicit UriAbbreviation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);
45 
46 	DECLARE_XSERVICEINFO
47 
48     // ::com::sun::star::util::XStringAbbreviation:
49     virtual ::rtl::OUString SAL_CALL abbreviateString(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringWidth > & xStringWidth, ::sal_Int32 nWidth, const ::rtl::OUString & aString) throw (::com::sun::star::uno::RuntimeException);
50 
51 private:
52     UriAbbreviation(UriAbbreviation &); // not defined
53     void operator =(UriAbbreviation &); // not defined
54 
~UriAbbreviation()55     virtual ~UriAbbreviation() {}
56 
57     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >  m_xContext;
58 };
59 
60 } //	namespace framework
61 
62 #endif	//	#ifndef __FRAMEWORK_SERVICES_URIABBREVIATION_HXX_
63