update emoji autocorrect entries from po-files
[LibreOffice.git] / reportdesign / source / ui / dlg / dlgpage.cxx
blobe99a7d020f6b1ea7b7d9651e199aa26d45d76cc2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
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>
32 namespace rptui
34 /*************************************************************************
36 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
38 \************************************************************************/
40 ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const OUString &rDialog)
41 : SfxTabDialog (pParent, rDialog, "modules/dbreport/ui/" +
42 rDialog.toAsciiLowerCase() +
43 ".ui", pAttr)
44 , m_nCharBgdId(0)
46 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
47 assert(pFact && "Dialog creation failed!");
49 if (rDialog == "BackgroundDialog")
51 AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
53 else if (rDialog == "PageDialog")
55 AddTabPage("page", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
56 AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
58 else if (rDialog == "CharDialog")
60 AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
61 AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
62 AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
63 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
64 m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
65 AddTabPage("alignment", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), 0 );
67 else
68 OSL_FAIL("Unknown page id");
70 SvtCJKOptions aCJKOptions;
71 if ( !aCJKOptions.IsDoubleLinesEnabled() )
72 RemoveTabPage("asianlayout");
75 void ORptPageDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
77 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
78 if (nId == m_nCharBgdId)
80 aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
81 rPage.PageCreated(aSet);
85 } // namespace rptui
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */