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 #include <svl/cjkoptions.hxx>
21 #include <svx/flagsdef.hxx>
23 #include "sdrcelldlg.hxx"
24 #include "dialmgr.hxx"
25 #include "cuitabarea.hxx"
26 #include "svx/svdmodel.hxx"
28 #include <svx/dialogs.hrc>
30 SvxFormatCellsDialog::SvxFormatCellsDialog( vcl::Window
* pParent
, const SfxItemSet
* pAttr
, SdrModel
* pModel
)
31 : SfxTabDialog(pParent
, "FormatCellsDialog", "cui/ui/formatcellsdialog.ui", pAttr
)
33 , mpColorTab(pModel
->GetColorList())
34 , mpGradientList(pModel
->GetGradientList())
35 , mpHatchingList(pModel
->GetHatchList())
36 , mpBitmapList(pModel
->GetBitmapList())
39 AddTabPage("name", RID_SVXPAGE_CHAR_NAME
);
40 AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS
);
41 m_nBorderPageId
= AddTabPage("border", RID_SVXPAGE_BORDER
);
42 m_nAreaPageId
= AddTabPage("area", RID_SVXPAGE_AREA
);
45 void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId
, SfxTabPage
&rPage
)
47 if (nId
== m_nAreaPageId
)
49 SvxAreaTabPage
& rAreaPage
= static_cast<SvxAreaTabPage
&>(rPage
);
50 rAreaPage
.SetColorList( mpColorTab
);
51 rAreaPage
.SetGradientList( mpGradientList
);
52 rAreaPage
.SetHatchingList( mpHatchingList
);
53 rAreaPage
.SetBitmapList( mpBitmapList
);
54 rAreaPage
.SetPageType( PT_AREA
);
55 rAreaPage
.SetDlgType( 1 );
56 rAreaPage
.SetPos( 0 );
57 rAreaPage
.Construct();
58 rAreaPage
.ActivatePage( mrOutAttrs
);
60 else if (nId
== m_nBorderPageId
)
62 SvxBorderTabPage
& rBorderPage
= static_cast<SvxBorderTabPage
&>(rPage
);
63 rBorderPage
.SetTableMode();
66 SfxTabDialog::PageCreated( nId
, rPage
);
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */