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 :
21 : #include <svx/dialogs.hrc>
22 : #include <svx/flagsdef.hxx>
23 : #include <svx/svxdlg.hxx>
24 : #include <editeng/svxenum.hxx>
25 : #include "dlgpage.hxx"
26 : #include "ModuleHelper.hxx"
27 : #include "RptResId.hrc"
28 : #include <svl/intitem.hxx>
29 : #include <svl/cjkoptions.hxx>
30 : #include <svl/aeitem.hxx>
31 :
32 : namespace rptui
33 : {
34 : /*************************************************************************
35 : |*
36 : |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
37 : |*
38 : \************************************************************************/
39 :
40 0 : ORptPageDialog::ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,sal_uInt16 _nPageId) :
41 : SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
42 0 : rOutAttrs ( *pAttr )
43 : {
44 0 : SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
45 : OSL_ENSURE(pFact, "Dialogdiet fail!");
46 0 : switch( _nPageId )
47 : {
48 : case RID_PAGEDIALOG_BACKGROUND:
49 0 : AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
50 0 : break;
51 : case RID_PAGEDIALOG_PAGE:
52 0 : AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
53 0 : AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
54 0 : break;
55 : case RID_PAGEDIALOG_CHAR:
56 0 : AddTabPage(RID_PAGE_CHAR, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
57 0 : AddTabPage(RID_PAGE_EFFECTS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
58 0 : AddTabPage(RID_PAGE_POSITION, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
59 0 : AddTabPage(RID_PAGE_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
60 0 : AddTabPage(RID_PAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
61 0 : AddTabPage(RID_PAGE_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 );
62 :
63 0 : break;
64 : case RID_PAGEDIALOG_LINE:
65 0 : AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
66 0 : break;
67 : default:
68 : OSL_FAIL("Unknown page id");
69 : }
70 :
71 0 : SvtCJKOptions aCJKOptions;
72 0 : if ( !aCJKOptions.IsDoubleLinesEnabled() )
73 0 : RemoveTabPage(RID_PAGE_TWOLN);
74 :
75 0 : FreeResource();
76 0 : }
77 : // =============================================================================
78 0 : } // namespace rptui
79 : // =============================================================================
80 :
81 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|