2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-12-12 11:33:41 +00:00
|
|
|
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <dlgattr.hxx>
|
2000-12-12 11:33:41 +00:00
|
|
|
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
|
|
|
|
#include <svx/numinf.hxx>
|
|
|
|
|
|
|
|
#include <svx/dialogs.hrc>
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <dbu_dlg.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/itemset.hxx>
|
|
|
|
#include <svl/zforlist.hxx>
|
2010-09-29 20:48:25 +01:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#include <svx/flagsdef.hxx>
|
|
|
|
#include <svl/intitem.hxx>
|
2000-12-12 11:33:41 +00:00
|
|
|
using namespace dbaui;
|
|
|
|
|
2014-01-17 14:06:13 +00:00
|
|
|
|
2018-10-03 21:29:08 +01:00
|
|
|
SbaSbAttrDlg::SbaSbAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs,
|
2016-03-17 15:21:54 +02:00
|
|
|
SvNumberFormatter* pFormatter, bool bHasFormat)
|
2018-10-03 21:29:08 +01:00
|
|
|
: SfxTabDialogController(pParent, "dbaccess/ui/fielddialog.ui", "FieldDialog", pCellAttrs)
|
2000-12-12 11:33:41 +00:00
|
|
|
{
|
2018-05-18 13:46:59 +02:00
|
|
|
pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, 0 ) );
|
2000-12-12 11:33:41 +00:00
|
|
|
|
2014-01-17 14:06:13 +00:00
|
|
|
if (bHasFormat)
|
2018-10-03 21:29:08 +01:00
|
|
|
AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT);
|
2014-08-12 09:01:28 +01:00
|
|
|
else
|
|
|
|
RemoveTabPage("format");
|
2014-01-17 14:06:13 +00:00
|
|
|
AddTabPage("alignment", RID_SVXPAGE_ALIGNMENT);
|
2000-12-12 11:33:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SbaSbAttrDlg::~SbaSbAttrDlg()
|
|
|
|
{
|
2015-01-16 15:29:28 +02:00
|
|
|
}
|
2005-09-23 11:30:30 +00:00
|
|
|
|
2018-10-03 21:29:08 +01:00
|
|
|
void SbaSbAttrDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage)
|
2000-12-12 11:33:41 +00:00
|
|
|
{
|
2004-05-10 14:38:49 +00:00
|
|
|
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
|
2018-10-03 21:29:08 +01:00
|
|
|
if (rPageId == "format")
|
2000-12-12 11:33:41 +00:00
|
|
|
{
|
2018-01-12 20:25:56 +01:00
|
|
|
aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), static_cast<sal_uInt16>(SID_ATTR_NUMBERFORMAT_INFO)));
|
2014-01-17 14:06:13 +00:00
|
|
|
rTabPage.PageCreated(aSet);
|
2000-12-12 11:33:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|