1*d4aefcaeSZheng Fan /**************************************************************
2*d4aefcaeSZheng Fan  *
3*d4aefcaeSZheng Fan  * Licensed to the Apache Software Foundation (ASF) under one
4*d4aefcaeSZheng Fan  * or more contributor license agreements.  See the NOTICE file
5*d4aefcaeSZheng Fan  * distributed with this work for additional information
6*d4aefcaeSZheng Fan  * regarding copyright ownership.  The ASF licenses this file
7*d4aefcaeSZheng Fan  * to you under the Apache License, Version 2.0 (the
8*d4aefcaeSZheng Fan  * "License"); you may not use this file except in compliance
9*d4aefcaeSZheng Fan  * with the License.  You may obtain a copy of the License at
10*d4aefcaeSZheng Fan  *
11*d4aefcaeSZheng Fan  *   http://www.apache.org/licenses/LICENSE-2.0
12*d4aefcaeSZheng Fan  *
13*d4aefcaeSZheng Fan  * Unless required by applicable law or agreed to in writing,
14*d4aefcaeSZheng Fan  * software distributed under the License is distributed on an
15*d4aefcaeSZheng Fan  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d4aefcaeSZheng Fan  * KIND, either express or implied.  See the License for the
17*d4aefcaeSZheng Fan  * specific language governing permissions and limitations
18*d4aefcaeSZheng Fan  * under the License.
19*d4aefcaeSZheng Fan  *
20*d4aefcaeSZheng Fan  *************************************************************/
21*d4aefcaeSZheng Fan 
22*d4aefcaeSZheng Fan #include "TextUnderlinePopup.hxx"
23*d4aefcaeSZheng Fan #include "TextUnderlineControl.hxx"
24*d4aefcaeSZheng Fan 
25*d4aefcaeSZheng Fan 
26*d4aefcaeSZheng Fan namespace svx { namespace sidebar {
27*d4aefcaeSZheng Fan 
TextUnderlinePopup(Window * pParent,const::boost::function<PopupControl * (PopupContainer *)> & rControlCreator)28*d4aefcaeSZheng Fan TextUnderlinePopup::TextUnderlinePopup (
29*d4aefcaeSZheng Fan     Window* pParent,
30*d4aefcaeSZheng Fan     const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator)
31*d4aefcaeSZheng Fan     : Popup(
32*d4aefcaeSZheng Fan         pParent,
33*d4aefcaeSZheng Fan         rControlCreator,
34*d4aefcaeSZheng Fan         ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Character Spacing")))
35*d4aefcaeSZheng Fan {
36*d4aefcaeSZheng Fan }
37*d4aefcaeSZheng Fan 
38*d4aefcaeSZheng Fan 
39*d4aefcaeSZheng Fan 
40*d4aefcaeSZheng Fan 
~TextUnderlinePopup(void)41*d4aefcaeSZheng Fan TextUnderlinePopup::~TextUnderlinePopup (void)
42*d4aefcaeSZheng Fan {
43*d4aefcaeSZheng Fan }
44*d4aefcaeSZheng Fan 
45*d4aefcaeSZheng Fan 
46*d4aefcaeSZheng Fan 
47*d4aefcaeSZheng Fan 
Rearrange(FontUnderline eLine)48*d4aefcaeSZheng Fan void TextUnderlinePopup::Rearrange (FontUnderline eLine)
49*d4aefcaeSZheng Fan {
50*d4aefcaeSZheng Fan     ProvideContainerAndControl();
51*d4aefcaeSZheng Fan 
52*d4aefcaeSZheng Fan     TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mpControl.get());
53*d4aefcaeSZheng Fan     if (pControl != NULL)
54*d4aefcaeSZheng Fan         pControl->Rearrange(eLine);
55*d4aefcaeSZheng Fan }
56*d4aefcaeSZheng Fan 
57*d4aefcaeSZheng Fan 
58*d4aefcaeSZheng Fan } } // end of namespace svx::sidebar
59*d4aefcaeSZheng Fan 
60*d4aefcaeSZheng Fan 
61