Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #undef SC_DLLIMPLEMENTATION
21 :
22 : #include <svx/svxids.hrc>
23 :
24 : #include <editeng/flstitem.hxx>
25 : #include <sfx2/objsh.hxx>
26 : #include <svl/cjkoptions.hxx>
27 :
28 : #include "textdlgs.hxx"
29 : #include "scresid.hxx"
30 : #include "sc.hrc"
31 : #include <svl/intitem.hxx>
32 : #include <svx/flagsdef.hxx>
33 : // -----------------------------------------------------------------------
34 :
35 0 : ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
36 : const SfxObjectShell* pDocShell ) :
37 : SfxTabDialog ( pParent, ScResId( RID_SCDLG_CHAR ), pAttr ),
38 0 : rDocShell ( *pDocShell )
39 : {
40 0 : FreeResource();
41 :
42 0 : AddTabPage( RID_SVXPAGE_CHAR_NAME );
43 0 : AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
44 0 : AddTabPage( RID_SVXPAGE_CHAR_POSITION );
45 0 : }
46 :
47 : // -----------------------------------------------------------------------
48 :
49 0 : void ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
50 : {
51 0 : SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
52 0 : switch( nId )
53 : {
54 : case RID_SVXPAGE_CHAR_NAME:
55 : {
56 : SvxFontListItem aItem(*( (const SvxFontListItem*)
57 0 : ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
58 :
59 0 : aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
60 0 : rPage.PageCreated(aSet);
61 : }
62 0 : break;
63 :
64 : case RID_SVXPAGE_CHAR_EFFECTS:
65 0 : aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
66 0 : rPage.PageCreated(aSet);
67 0 : break;
68 :
69 : default:
70 0 : break;
71 0 : }
72 0 : }
73 :
74 : // -----------------------------------------------------------------------
75 :
76 0 : ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) :
77 0 : SfxTabDialog ( pParent, ScResId( RID_SCDLG_PARAGRAPH ), pAttr )
78 : {
79 0 : FreeResource();
80 :
81 0 : SvtCJKOptions aCJKOptions;
82 :
83 0 : AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
84 0 : AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
85 0 : if ( aCJKOptions.IsAsianTypographyEnabled() )
86 0 : AddTabPage( RID_SVXPAGE_PARA_ASIAN);
87 : else
88 0 : RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
89 0 : AddTabPage( RID_SVXPAGE_TABULATOR );
90 0 : }
91 :
92 : // -----------------------------------------------------------------------
93 :
94 0 : void ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
95 : {
96 0 : switch( nId )
97 : {
98 : case RID_SVXPAGE_TABULATOR:
99 : {
100 0 : SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
101 : aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) |
102 0 : (TABFILL_ALL &~TABFILL_NONE) ));
103 0 : rPage.PageCreated(aSet);
104 : }
105 0 : break;
106 : }
107 0 : }
108 :
109 :
110 :
111 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|