2010-10-12 15:59:00 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +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 .
|
|
|
|
*/
|
2006-09-17 11:59:20 +00:00
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
#include "tp_LegendPosition.hxx"
|
|
|
|
#include "ResId.hxx"
|
|
|
|
#include "TabPages.hrc"
|
2007-05-22 16:45:52 +00:00
|
|
|
#include "res_LegendPosition.hxx"
|
|
|
|
#include "chartview/ChartSfxItemIds.hxx"
|
2003-10-06 08:58:36 +00:00
|
|
|
#include <svx/chrtitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/eeitem.hxx>
|
|
|
|
#include <editeng/frmdiritem.hxx>
|
2007-05-22 16:45:52 +00:00
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
namespace chart
|
|
|
|
{
|
|
|
|
|
2013-11-26 23:14:18 -02:00
|
|
|
SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, const SfxItemSet& rInAttrs)
|
|
|
|
: SfxTabPage( pWindow
|
|
|
|
,"tp_LegendPosition"
|
|
|
|
,"modules/schart/ui/tp_LegendPosition.ui"
|
|
|
|
, rInAttrs )
|
2013-11-27 10:31:37 +00:00
|
|
|
, m_aLegendPositionResources(*this)
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
2013-11-26 23:14:18 -02:00
|
|
|
get(m_pLbTextDirection,"LB_LEGEND_TEXTDIR");
|
|
|
|
|
|
|
|
m_pLbTextDirection->SetDropDownLineCount(3);
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
|
2013-11-26 23:14:18 -02:00
|
|
|
SfxTabPage* SchLegendPosTabPage::Create(Window* pWindow, const SfxItemSet& rOutAttrs)
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
|
|
|
return new SchLegendPosTabPage(pWindow, rOutAttrs);
|
|
|
|
}
|
|
|
|
|
2014-03-26 15:34:49 +02:00
|
|
|
bool SchLegendPosTabPage::FillItemSet(SfxItemSet& rOutAttrs)
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
2013-11-27 10:31:37 +00:00
|
|
|
m_aLegendPositionResources.writeToItemSet(rOutAttrs);
|
2008-11-26 15:19:48 +00:00
|
|
|
|
2013-11-26 23:14:18 -02:00
|
|
|
if( m_pLbTextDirection->GetSelectEntryCount() > 0 )
|
|
|
|
rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_pLbTextDirection->GetSelectEntryValue() ) );
|
2008-11-26 15:19:48 +00:00
|
|
|
|
2014-03-26 15:34:49 +02:00
|
|
|
return true;
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SchLegendPosTabPage::Reset(const SfxItemSet& rInAttrs)
|
|
|
|
{
|
2013-11-27 10:31:37 +00:00
|
|
|
m_aLegendPositionResources.initFromItemSet(rInAttrs);
|
2008-11-26 15:19:48 +00:00
|
|
|
|
|
|
|
const SfxPoolItem* pPoolItem = 0;
|
2014-02-19 21:49:02 +01:00
|
|
|
if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SFX_ITEM_SET )
|
2013-11-26 23:14:18 -02:00
|
|
|
m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} //namespace chart
|
2010-10-12 15:59:00 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|