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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_chart2.hxx"
26 
27 #include "dlg_ShapeParagraph.hxx"
28 #include "ResId.hxx"
29 #include "ResourceIds.hrc"
30 
31 #include <svl/cjkoptions.hxx>
32 #include <svl/intitem.hxx>
33 #include <svx/dialogs.hrc>
34 #include <svx/flagsdef.hxx>
35 
36 using ::com::sun::star::uno::Reference;
37 using namespace ::com::sun::star;
38 
39 //.............................................................................
40 namespace chart
41 {
42 //.............................................................................
43 
ShapeParagraphDialog(Window * pParent,const SfxItemSet * pAttr)44 ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr )
45     :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr )
46 {
47     FreeResource();
48 
49     SvtCJKOptions aCJKOptions;
50 
51     AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
52     AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
53     if ( aCJKOptions.IsAsianTypographyEnabled() )
54     {
55         AddTabPage( RID_SVXPAGE_PARA_ASIAN );
56     }
57     else
58     {
59         RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
60     }
61     AddTabPage( RID_SVXPAGE_TABULATOR );
62 }
63 
~ShapeParagraphDialog()64 ShapeParagraphDialog::~ShapeParagraphDialog()
65 {
66 }
67 
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)68 void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
69 {
70     SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
71     switch ( nId )
72     {
73         case RID_SVXPAGE_TABULATOR:
74             {
75                 aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS,
76                     ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) );
77                 rPage.PageCreated( aSet );
78             }
79             break;
80         default:
81             {
82             }
83             break;
84     }
85 }
86 
87 //.............................................................................
88 } //namespace chart
89 //.............................................................................
90