fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / dlg / dlgattr.cxx
blob1ca5043be4bb7267829f39daa2335b327065b16c
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 .
20 #include "dlgattr.hxx"
22 #include <sfx2/tabdlg.hxx>
24 #include <svx/numinf.hxx>
26 #include <svx/dialogs.hrc>
27 #include "dbu_dlg.hrc"
28 #include <svl/itemset.hxx>
29 #include <svl/zforlist.hxx>
30 #include <svx/svxids.hrc>
31 #include <svx/flagsdef.hxx>
32 #include <svl/intitem.hxx>
33 #include "moduledbu.hxx"
34 using namespace dbaui;
37 SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const SfxItemSet* pCellAttrs,
38 SvNumberFormatter* pFormatter, bool bHasFormat, bool bRow)
39 : SfxTabDialog(pParent, "FieldDialog", "dbaccess/ui/fielddialog.ui", pCellAttrs)
40 , m_nNumberFormatId(0)
42 pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 );
44 if (bRow)
45 SetText(get<FixedText>("alttitle")->GetText());
46 if (bHasFormat)
47 m_nNumberFormatId = AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT);
48 else
49 RemoveTabPage("format");
50 AddTabPage("alignment", RID_SVXPAGE_ALIGNMENT);
53 SbaSbAttrDlg::~SbaSbAttrDlg()
55 disposeOnce();
58 void SbaSbAttrDlg::dispose()
60 delete pNumberInfoItem;
61 SfxTabDialog::dispose();
64 void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
66 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
67 if (nPageId == m_nNumberFormatId)
69 aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO));
70 rTabPage.PageCreated(aSet);
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */