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 : #include <svx/dialogs.hrc>
21 : #include <editeng/flstitem.hxx>
22 : #include <svx/flagsdef.hxx>
23 : #include <sfx2/objsh.hxx>
24 :
25 : #include "sdresid.hxx"
26 : #include "dlg_char.hxx"
27 : #include <svx/svxids.hrc>
28 : #include <svl/intitem.hxx>
29 :
30 : /**
31 : * Constructor of tab dialog: append pages to dialog
32 : */
33 0 : SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr,
34 : const SfxObjectShell* pDocShell ) :
35 : SfxTabDialog ( pParent, SdResId( TAB_CHAR ), pAttr ),
36 0 : rDocShell ( *pDocShell )
37 : {
38 0 : FreeResource();
39 :
40 0 : AddTabPage( RID_SVXPAGE_CHAR_NAME );
41 0 : AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
42 0 : AddTabPage( RID_SVXPAGE_CHAR_POSITION );
43 0 : }
44 :
45 : // -----------------------------------------------------------------------
46 :
47 0 : void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
48 : {
49 0 : SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
50 0 : switch( nId )
51 : {
52 : case RID_SVXPAGE_CHAR_NAME:
53 : {
54 : SvxFontListItem aItem(*( (const SvxFontListItem*)
55 0 : ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
56 :
57 0 : aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
58 0 : rPage.PageCreated(aSet);
59 : }
60 0 : break;
61 :
62 : case RID_SVXPAGE_CHAR_EFFECTS:
63 0 : aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
64 0 : rPage.PageCreated(aSet);
65 0 : break;
66 :
67 : default:
68 0 : break;
69 0 : }
70 0 : }
71 :
72 :
73 :
74 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|