LibreOffice Module cui (master)  1
sdrcelldlg.cxx
Go to the documentation of this file.
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 <sdrcelldlg.hxx>
21 #include <cuitabarea.hxx>
22 #include <svx/svdmodel.hxx>
23 #include <border.hxx>
24 #include <svx/dialogs.hrc>
25 
27  : SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", "FormatCellsDialog", pAttr)
28  , mrOutAttrs(*pAttr)
29  , mpColorTab(rModel.GetColorList())
30  , mpGradientList(rModel.GetGradientList())
31  , mpHatchingList(rModel.GetHatchList())
32  , mpBitmapList(rModel.GetBitmapList())
33  , mpPatternList(rModel.GetPatternList())
34 {
35  AddTabPage("name", RID_SVXPAGE_CHAR_NAME);
36  AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
37  AddTabPage("border", RID_SVXPAGE_BORDER );
38  AddTabPage("area", RID_SVXPAGE_AREA);
39 }
40 
41 void SvxFormatCellsDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
42 {
43  if (rId == "area")
44  {
45  SvxAreaTabPage& rAreaPage = static_cast<SvxAreaTabPage&>(rPage);
46  rAreaPage.SetColorList( mpColorTab );
47  rAreaPage.SetGradientList( mpGradientList );
48  rAreaPage.SetHatchingList( mpHatchingList );
49  rAreaPage.SetBitmapList( mpBitmapList );
50  rAreaPage.SetPatternList( mpPatternList );
51  rAreaPage.ActivatePage( mrOutAttrs );
52  }
53  else if (rId == "border")
54  {
55  SvxBorderTabPage& rBorderPage = static_cast<SvxBorderTabPage&>(rPage);
56  rBorderPage.SetTableMode();
57  }
58  else
60 }
61 
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XColorListRef mpColorTab
Definition: sdrcelldlg.hxx:33
void SetGradientList(XGradientListRef const &pGrdLst)
Definition: cuitabarea.hxx:276
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tparea.cxx:158
void SetColorList(XColorListRef const &pColorList)
Definition: cuitabarea.hxx:275
XHatchListRef mpHatchingList
Definition: sdrcelldlg.hxx:35
virtual void PageCreated(const OString &rName, SfxTabPage &rPage)
void SetPatternList(XPatternListRef const &pPtrnLst)
Definition: cuitabarea.hxx:281
void SetHatchingList(XHatchListRef const &pHtchLst)
Definition: cuitabarea.hxx:278
void SetTableMode()
Definition: border.cxx:1515
const SfxItemSet & mrOutAttrs
Definition: sdrcelldlg.hxx:31
XBitmapListRef mpBitmapList
Definition: sdrcelldlg.hxx:36
SvxFormatCellsDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrModel &rModel)
Definition: sdrcelldlg.cxx:26
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
XPatternListRef mpPatternList
Definition: sdrcelldlg.hxx:37
void SetBitmapList(XBitmapListRef const &pBmpLst)
Definition: cuitabarea.hxx:280
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: sdrcelldlg.cxx:41
XGradientListRef mpGradientList
Definition: sdrcelldlg.hxx:34