1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #undef SC_DLLIMPLEMENTATION
22 #include <svx/svxids.hrc>
24 #include <editeng/flstitem.hxx>
25 #include <sfx2/objsh.hxx>
26 #include <svl/cjkoptions.hxx>
28 #include "textdlgs.hxx"
29 #include "scresid.hxx"
31 #include <svl/intitem.hxx>
32 #include <svx/flagsdef.hxx>
33 // -----------------------------------------------------------------------
35 ScCharDlg::ScCharDlg( Window
* pParent
, const SfxItemSet
* pAttr
,
36 const SfxObjectShell
* pDocShell
) :
37 SfxTabDialog ( pParent
, ScResId( RID_SCDLG_CHAR
), pAttr
),
38 rDocShell ( *pDocShell
)
42 AddTabPage( RID_SVXPAGE_CHAR_NAME
);
43 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS
);
44 AddTabPage( RID_SVXPAGE_CHAR_POSITION
);
47 // -----------------------------------------------------------------------
49 void ScCharDlg::PageCreated( sal_uInt16 nId
, SfxTabPage
&rPage
)
51 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
54 case RID_SVXPAGE_CHAR_NAME
:
56 SvxFontListItem
aItem(*( (const SvxFontListItem
*)
57 ( rDocShell
.GetItem( SID_ATTR_CHAR_FONTLIST
) ) ) );
59 aSet
.Put (SvxFontListItem( aItem
.GetFontList(), SID_ATTR_CHAR_FONTLIST
));
60 rPage
.PageCreated(aSet
);
64 case RID_SVXPAGE_CHAR_EFFECTS
:
65 aSet
.Put (SfxUInt16Item(SID_DISABLE_CTL
,DISABLE_CASEMAP
));
66 rPage
.PageCreated(aSet
);
74 // -----------------------------------------------------------------------
76 ScParagraphDlg::ScParagraphDlg( Window
* pParent
, const SfxItemSet
* pAttr
) :
77 SfxTabDialog ( pParent
, ScResId( RID_SCDLG_PARAGRAPH
), pAttr
)
81 SvtCJKOptions aCJKOptions
;
83 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH
);
84 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH
);
85 if ( aCJKOptions
.IsAsianTypographyEnabled() )
86 AddTabPage( RID_SVXPAGE_PARA_ASIAN
);
88 RemoveTabPage( RID_SVXPAGE_PARA_ASIAN
);
89 AddTabPage( RID_SVXPAGE_TABULATOR
);
92 // -----------------------------------------------------------------------
94 void ScParagraphDlg::PageCreated( sal_uInt16 nId
, SfxTabPage
&rPage
)
98 case RID_SVXPAGE_TABULATOR
:
100 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
101 aSet
.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS
,(TABTYPE_ALL
&~TABTYPE_LEFT
) |
102 (TABFILL_ALL
&~TABFILL_NONE
) ));
103 rPage
.PageCreated(aSet
);
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */