From 723467bd88a50323ccd2e4046d0a36332c664a66 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 31 May 2016 16:57:13 +0200 Subject: [API CHANGE] notebookbar: paragraph spacing controls Change-Id: I9d2672cd156f2dcc2ee4c544902e9d42632cab70 Reviewed-on: https://gerrit.libreoffice.org/26039 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- svx/Library_svx.mk | 2 + svx/UIConfig_svx.mk | 2 + svx/sdi/svx.sdi | 2 + .../sidebar/paragraph/ParaSpacingControl.cxx | 181 ++++++++++++++ svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 265 +++++++++++++++++++++ svx/source/sidebar/paragraph/ParaSpacingWindow.hxx | 85 +++++++ svx/uiconfig/ui/paralrspacing.ui | 185 ++++++++++++++ svx/uiconfig/ui/paraulspacing.ui | 137 +++++++++++ 8 files changed, 859 insertions(+) create mode 100644 svx/source/sidebar/paragraph/ParaSpacingControl.cxx create mode 100644 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx create mode 100644 svx/source/sidebar/paragraph/ParaSpacingWindow.hxx create mode 100644 svx/uiconfig/ui/paralrspacing.ui create mode 100644 svx/uiconfig/ui/paraulspacing.ui (limited to 'svx') diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 047eb9d7c40c..2233de44eb35 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -196,6 +196,8 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/sidebar/paragraph/ParaLineSpacingControl \ svx/source/sidebar/paragraph/ParaLineSpacingPopup \ svx/source/sidebar/paragraph/ParaPropertyPanel \ + svx/source/sidebar/paragraph/ParaSpacingWindow \ + svx/source/sidebar/paragraph/ParaSpacingControl \ svx/source/sidebar/area/AreaPropertyPanel \ svx/source/sidebar/area/AreaPropertyPanelBase \ svx/source/sidebar/area/AreaTransparencyGradientControl \ diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 56ca90da4038..9202248d2e18 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -47,6 +47,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/namespacedialog \ svx/uiconfig/ui/optgridpage \ svx/uiconfig/ui/paralinespacingcontrol \ + svx/uiconfig/ui/paralrspacing \ + svx/uiconfig/ui/paraulspacing \ svx/uiconfig/ui/passwd \ svx/uiconfig/ui/querydeletecontourdialog \ svx/uiconfig/ui/querydeleteobjectdialog \ diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index f9667ebcff0c..ddab822c42cf 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -5303,6 +5303,8 @@ SfxVoidItem LeftRightParaMargin SID_ATTR_PARA_LRSPACE RecordAbsolute = FALSE, RecordPerSet; + SlotType = SvxLRSpaceItem + AccelConfig = FALSE, MenuConfig = FALSE, ToolBoxConfig = FALSE, diff --git a/svx/source/sidebar/paragraph/ParaSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx new file mode 100644 index 000000000000..7822db158fa7 --- /dev/null +++ b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx @@ -0,0 +1,181 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#include "ParaSpacingWindow.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace svx; + +SFX_IMPL_TOOLBOX_CONTROL(ParaULSpacingControl, SvxULSpaceItem); +SFX_IMPL_TOOLBOX_CONTROL(ParaLRSpacingControl, SvxLRSpaceItem); + +ParaULSpacingControl::ParaULSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) + : SfxToolBoxControl(nSlotId, nId, rTbx) +{ + addStatusListener(".uno:MetricUnit"); +} + +ParaULSpacingControl::~ParaULSpacingControl() +{ +} + +void ParaULSpacingControl::StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) +{ + sal_uInt16 nId = GetId(); + ToolBox& rTbx = GetToolBox(); + ParaULSpacingWindow* pWindow = static_cast(rTbx.GetItemWindow(nId)); + + DBG_ASSERT( pWindow, "Control not found!" ); + + if(SfxItemState::DISABLED == eState) + pWindow->Disable(); + else + pWindow->Enable(); + + rTbx.EnableItem(nId, SfxItemState::DISABLED != eState); + + if(nSID == SID_ATTR_METRIC && pState && eState >= SfxItemState::DEFAULT) + { + const SfxUInt16Item* pMetricItem = static_cast(pState); + pWindow->SetUnit((FieldUnit)pMetricItem->GetValue()); + } + else if(nSID == SID_ATTR_PARA_ULSPACE && pState && eState >= SfxItemState::DEFAULT) + pWindow->SetValue(static_cast(pState)); +} + +VclPtr ParaULSpacingControl::CreateItemWindow(vcl::Window* pParent) +{ + VclPtr pWindow = VclPtr::Create(pParent, m_xFrame); + pWindow->Show(); + + return pWindow; +} + +// ParaLRSpacingControl + +ParaLRSpacingControl::ParaLRSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) + : SfxToolBoxControl(nSlotId, nId, rTbx) +{ + addStatusListener(".uno:MetricUnit"); +} + +ParaLRSpacingControl::~ParaLRSpacingControl() +{ +} + +void SAL_CALL ParaLRSpacingControl::dispose() throw (css::uno::RuntimeException, std::exception) +{ + if(m_xMultiplexer.is()) + { + m_xMultiplexer->removeAllContextChangeEventListeners(this); + m_xMultiplexer.clear(); + } + + SfxToolBoxControl::dispose(); +} + +void ParaLRSpacingControl::StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) +{ + sal_uInt16 nId = GetId(); + ToolBox& rTbx = GetToolBox(); + ParaLRSpacingWindow* pWindow = static_cast(rTbx.GetItemWindow(nId)); + + DBG_ASSERT( pWindow, "Control not found!" ); + + if(!m_xMultiplexer.is()) + { + m_xMultiplexer = css::ui::ContextChangeEventMultiplexer::get( + ::comphelper::getProcessComponentContext()); + + if(m_xFrame.is() && m_xMultiplexer.is()) + m_xMultiplexer->addContextChangeEventListener(this, m_xFrame->getController()); + } + + if(nSID == SID_ATTR_METRIC && pState && eState >= SfxItemState::DEFAULT) + { + const SfxUInt16Item* pMetricItem = static_cast(pState); + pWindow->SetUnit((FieldUnit)pMetricItem->GetValue()); + } + else if(nSID == SID_ATTR_PARA_LRSPACE) + { + pWindow->SetValue(eState, pState); + } +} + +void SAL_CALL ParaLRSpacingControl::notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) + throw (css::uno::RuntimeException, std::exception) +{ + sal_uInt16 nId = GetId(); + ToolBox& rTbx = GetToolBox(); + ParaLRSpacingWindow* pWindow = static_cast(rTbx.GetItemWindow(nId)); + + if(pWindow) + { + ::sfx2::sidebar::EnumContext eContext = ::sfx2::sidebar::EnumContext( + ::sfx2::sidebar::EnumContext::GetApplicationEnum(rEvent.ApplicationName), + ::sfx2::sidebar::EnumContext::GetContextEnum(rEvent.ContextName)); + pWindow->SetContext(eContext); + } +} + +::css::uno::Any SAL_CALL ParaLRSpacingControl::queryInterface(const ::css::uno::Type& aType) + throw (::css::uno::RuntimeException, ::std::exception) +{ + ::css::uno::Any a(SfxToolBoxControl::queryInterface(aType)); + if (a.hasValue()) + return a; + + return ::cppu::queryInterface(aType, static_cast(this)); +} + +void SAL_CALL ParaLRSpacingControl::acquire() throw () +{ + SfxToolBoxControl::acquire(); +} + +void SAL_CALL ParaLRSpacingControl::disposing(const ::css::lang::EventObject&) + throw (::css::uno::RuntimeException, ::std::exception) +{ + SfxToolBoxControl::disposing(); +} + +void SAL_CALL ParaLRSpacingControl::release() throw () +{ + SfxToolBoxControl::release(); +} + +VclPtr ParaLRSpacingControl::CreateItemWindow(vcl::Window* pParent) +{ + VclPtr pWindow = VclPtr::Create(pParent, m_xFrame); + pWindow->Show(); + + return pWindow; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx new file mode 100644 index 000000000000..93a2099c92c2 --- /dev/null +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -0,0 +1,265 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#include "ParaSpacingWindow.hxx" +#include +#include +#include +#include +#include + +using namespace svx; + +#define DEFAULT_VALUE 0 +#define MAX_DURCH 5670 +#define MAX_SW 1709400 +#define MAX_SC_SD 116220200 +#define NEGA_MAXVALUE -10000000 + +// ParaULSpacingWindow + +ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent, css::uno::Reference& xFrame) + : VclVBox(pParent) +{ + m_pUIBuilder = new VclBuilder(this, getUIRootDir(), + "svx/ui/paraulspacing.ui", + "ParaULSpacingWindow", + xFrame); + + get(m_pAboveSpacing, "aboveparaspacing"); + get(m_pBelowSpacing, "belowparaspacing"); + + Link aLink = LINK(this, ParaULSpacingWindow, ModifySpacingHdl); + m_pAboveSpacing->SetModifyHdl(aLink); + m_pBelowSpacing->SetModifyHdl(aLink); +} + +ParaULSpacingWindow::~ParaULSpacingWindow() +{ + disposeOnce(); +} + +void ParaULSpacingWindow::dispose() +{ + m_pAboveSpacing.clear(); + m_pBelowSpacing.clear(); + + disposeBuilder(); + VclVBox::dispose(); +} + +void ParaULSpacingWindow::SetUnit(FieldUnit eUnit) +{ + SetFieldUnit(*m_pAboveSpacing, eUnit); + SetFieldUnit(*m_pBelowSpacing, eUnit); + + SfxItemPool &rPool = SfxGetpApp()->GetPool(); + sal_uInt16 nWhich = rPool.GetWhich(SID_ATTR_PARA_ULSPACE); + m_eUnit = rPool.GetMetric(nWhich); + + m_pAboveSpacing->SetMax(m_pAboveSpacing->Normalize(MAX_DURCH), MapToFieldUnit(m_eUnit)); + m_pBelowSpacing->SetMax(m_pBelowSpacing->Normalize(MAX_DURCH), MapToFieldUnit(m_eUnit)); +} + +void ParaULSpacingWindow::SetValue(const SvxULSpaceItem* pItem) +{ + sal_Int64 nVal = pItem->GetUpper(); + nVal = m_pAboveSpacing->Normalize(nVal); + m_pAboveSpacing->SetValue(nVal, FUNIT_100TH_MM); + + nVal = pItem->GetLower(); + nVal = m_pBelowSpacing->Normalize(nVal); + m_pBelowSpacing->SetValue(nVal, FUNIT_100TH_MM); +} + +IMPL_LINK_NOARG_TYPED(ParaULSpacingWindow, ModifySpacingHdl, Edit&, void) +{ + SfxDispatcher* pDisp = SfxViewFrame::Current()->GetBindings().GetDispatcher(); + if(pDisp) + { + SvxULSpaceItem aMargin(SID_ATTR_PARA_ULSPACE); + aMargin.SetUpper((sal_uInt16)GetCoreValue(*m_pAboveSpacing, m_eUnit)); + aMargin.SetLower((sal_uInt16)GetCoreValue(*m_pBelowSpacing, m_eUnit)); + pDisp->ExecuteList(SID_ATTR_PARA_ULSPACE, SfxCallMode::RECORD, {&aMargin}); + } +} + +// ParaLRSpacingWindow + +ParaLRSpacingWindow::ParaLRSpacingWindow(vcl::Window* pParent, css::uno::Reference& xFrame) + : VclVBox(pParent) +{ + m_pUIBuilder = new VclBuilder(this, getUIRootDir(), + "svx/ui/paralrspacing.ui", + "ParaLRSpacingWindow", + xFrame); + + get(m_pBeforeSpacing, "beforetextindent"); + get(m_pAfterSpacing, "aftertextindent"); + get(m_pFLSpacing, "firstlineindent"); + + Link aLink = LINK(this, ParaLRSpacingWindow, ModifySpacingHdl); + m_pBeforeSpacing->SetModifyHdl(aLink); + m_pAfterSpacing->SetModifyHdl(aLink); + m_pFLSpacing->SetModifyHdl(aLink); +} + +ParaLRSpacingWindow::~ParaLRSpacingWindow() +{ + disposeOnce(); +} + +void ParaLRSpacingWindow::dispose() +{ + m_pBeforeSpacing.clear(); + m_pAfterSpacing.clear(); + m_pFLSpacing.clear(); + + disposeBuilder(); + VclVBox::dispose(); +} + +void ParaLRSpacingWindow::SetContext(const ::sfx2::sidebar::EnumContext& eContext) +{ + m_aContext = eContext; +} + +void ParaLRSpacingWindow::SetValue(SfxItemState eState, const SfxPoolItem* pState) +{ + switch(m_aContext.GetCombinedContext_DI()) + { + + case CombinedEnumContext(Application_WriterVariants, Context_DrawText): + case CombinedEnumContext(Application_WriterVariants, Context_Annotation): + case CombinedEnumContext(Application_Calc, Context_DrawText): + case CombinedEnumContext(Application_DrawImpress, Context_DrawText): + case CombinedEnumContext(Application_DrawImpress, Context_Draw): + case CombinedEnumContext(Application_DrawImpress, Context_TextObject): + case CombinedEnumContext(Application_DrawImpress, Context_Graphic): + case CombinedEnumContext(Application_DrawImpress, Context_Table): + { + m_pBeforeSpacing->SetMin(DEFAULT_VALUE); + m_pAfterSpacing->SetMin(DEFAULT_VALUE); + m_pFLSpacing->SetMin(DEFAULT_VALUE); + } + break; + case CombinedEnumContext(Application_WriterVariants, Context_Default): + case CombinedEnumContext(Application_WriterVariants, Context_Text): + case CombinedEnumContext(Application_WriterVariants, Context_Table): + { + m_pBeforeSpacing->SetMin(NEGA_MAXVALUE, FUNIT_100TH_MM); + m_pAfterSpacing->SetMin(NEGA_MAXVALUE, FUNIT_100TH_MM); + m_pFLSpacing->SetMin(NEGA_MAXVALUE, FUNIT_100TH_MM); + } + break; + } + + if(pState && eState >= SfxItemState::DEFAULT) + { + m_pBeforeSpacing-> Enable(); + m_pAfterSpacing->Enable(); + m_pFLSpacing->Enable(); + + const SvxLRSpaceItem* pSpace = static_cast(pState); + long aTxtLeft = pSpace->GetTextLeft(); + long aTxtRight = pSpace->GetRight(); + long aTxtFirstLineOfst = pSpace->GetTextFirstLineOfst(); + + aTxtLeft = (long)m_pBeforeSpacing->Normalize(aTxtLeft); + + if(m_aContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text) + && m_aContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default) + && m_aContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table)) + { + m_pFLSpacing->SetMin(aTxtLeft*(-1), FUNIT_100TH_MM); + } + + aTxtRight = (long)m_pAfterSpacing->Normalize(aTxtRight); + + switch(m_aContext.GetCombinedContext_DI()) + { + case CombinedEnumContext(Application_WriterVariants, Context_DrawText): + case CombinedEnumContext(Application_WriterVariants, Context_Text): + case CombinedEnumContext(Application_WriterVariants, Context_Default): + case CombinedEnumContext(Application_WriterVariants, Context_Table): + case CombinedEnumContext(Application_WriterVariants, Context_Annotation): + { + m_pBeforeSpacing->SetMax(MAX_SW - aTxtRight, FUNIT_100TH_MM); + m_pAfterSpacing->SetMax(MAX_SW - aTxtLeft, FUNIT_100TH_MM); + m_pFLSpacing->SetMax(MAX_SW - aTxtLeft - aTxtRight, FUNIT_100TH_MM); + } + break; + case CombinedEnumContext(Application_DrawImpress, Context_DrawText): + case CombinedEnumContext(Application_DrawImpress, Context_Draw): + case CombinedEnumContext(Application_DrawImpress, Context_Table): + case CombinedEnumContext(Application_DrawImpress, Context_TextObject): + case CombinedEnumContext(Application_DrawImpress, Context_Graphic): + { + m_pBeforeSpacing->SetMax(MAX_SC_SD - aTxtRight, FUNIT_100TH_MM); + m_pAfterSpacing->SetMax(MAX_SC_SD - aTxtLeft, FUNIT_100TH_MM); + m_pFLSpacing->SetMax(MAX_SC_SD - aTxtLeft - aTxtRight, FUNIT_100TH_MM); + } + } + + m_pBeforeSpacing->SetValue(aTxtLeft, FUNIT_100TH_MM); + m_pAfterSpacing->SetValue(aTxtRight, FUNIT_100TH_MM); + + aTxtFirstLineOfst = (long)m_pFLSpacing->Normalize(aTxtFirstLineOfst); + m_pFLSpacing->SetValue(aTxtFirstLineOfst, FUNIT_100TH_MM); + } + else if(eState == SfxItemState::DISABLED) + { + m_pBeforeSpacing-> Disable(); + m_pAfterSpacing->Disable(); + m_pFLSpacing->Disable(); + } + else + { + m_pBeforeSpacing->SetEmptyFieldValue(); + m_pAfterSpacing->SetEmptyFieldValue(); + m_pFLSpacing->SetEmptyFieldValue(); + } +} + +void ParaLRSpacingWindow::SetUnit(FieldUnit eUnit) +{ + SetFieldUnit(*m_pBeforeSpacing, eUnit); + SetFieldUnit(*m_pAfterSpacing, eUnit); + SetFieldUnit(*m_pFLSpacing, eUnit); + + SfxItemPool &rPool = SfxGetpApp()->GetPool(); + sal_uInt16 nWhich = rPool.GetWhich(SID_ATTR_PARA_LRSPACE); + m_eUnit = rPool.GetMetric(nWhich); +} + +IMPL_LINK_NOARG_TYPED(ParaLRSpacingWindow, ModifySpacingHdl, Edit&, void) +{ + SfxDispatcher* pDisp = SfxViewFrame::Current()->GetBindings().GetDispatcher(); + if(pDisp) + { + SvxLRSpaceItem aMargin(SID_ATTR_PARA_LRSPACE); + aMargin.SetTextLeft((const long)GetCoreValue(*m_pBeforeSpacing, m_eUnit)); + aMargin.SetRight((const long)GetCoreValue(*m_pAfterSpacing, m_eUnit)); + aMargin.SetTextFirstLineOfst((const short)GetCoreValue(*m_pFLSpacing, m_eUnit)); + + pDisp->ExecuteList(SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, {&aMargin}); + } +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx new file mode 100644 index 000000000000..4a01ae8ed372 --- /dev/null +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ +#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGWINDOW_HXX +#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGWINDOW_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace com::sun::star; + +namespace svx { + +class ParaULSpacingWindow : public VclVBox, + public VclBuilderContainer + +{ +public: + explicit ParaULSpacingWindow(vcl::Window* pParent, css::uno::Reference& xFrame); + virtual ~ParaULSpacingWindow(); + virtual void dispose() override; + + void SetValue(const SvxULSpaceItem* pItem); + void SetUnit(FieldUnit eUnit); + +private: + VclPtr m_pAboveSpacing; + VclPtr m_pBelowSpacing; + + SfxMapUnit m_eUnit; + + DECL_LINK_TYPED(ModifySpacingHdl, Edit&, void); +}; + +class ParaLRSpacingWindow : public VclVBox, + public VclBuilderContainer +{ +public: + explicit ParaLRSpacingWindow(vcl::Window* pParent, css::uno::Reference& xFrame); + virtual ~ParaLRSpacingWindow(); + virtual void dispose() override; + + void SetValue(SfxItemState eState, const SfxPoolItem* pState); + void SetUnit(FieldUnit eUnit); + void SetContext(const ::sfx2::sidebar::EnumContext& eContext); + +private: + VclPtr m_pBeforeSpacing; + VclPtr m_pAfterSpacing; + VclPtr m_pFLSpacing; + + SfxMapUnit m_eUnit; + + ::sfx2::sidebar::EnumContext m_aContext; + + DECL_LINK_TYPED(ModifySpacingHdl, Edit&, void); +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/paralrspacing.ui b/svx/uiconfig/ui/paralrspacing.ui new file mode 100644 index 000000000000..9795b4e6879b --- /dev/null +++ b/svx/uiconfig/ui/paralrspacing.ui @@ -0,0 +1,185 @@ + + + + + + + True + False + 6 + + + True + False + 6 + 6 + + + True + False + 6 + + + True + False + center + center + svx/res/symphony/Indent4.png + + + False + True + 0 + + + + + True + False + Before + + + False + True + 1 + + + + + 0 + 0 + + + + + 150 + True + True + Before Text Indent + True + + 0 + 0.10000000000000001 + + + 1 + 0 + + + + + True + False + 6 + + + True + False + center + center + svx/res/symphony/Indent3.png + + + False + True + 0 + + + + + True + False + After + + + False + True + 1 + + + + + 0 + 1 + + + + + 150 + True + True + After Text Indent + True + + 0 + + + 1 + 1 + + + + + True + False + 6 + + + True + False + center + center + svx/res/symphony/Indent2.png + + + False + True + 0 + + + + + True + False + First line + + + False + True + 1 + + + + + 150 + True + True + First Line Indent + True + + 0 + + + False + True + 2 + + + + + 2 + 0 + + + + + + + + False + True + 1 + + + + diff --git a/svx/uiconfig/ui/paraulspacing.ui b/svx/uiconfig/ui/paraulspacing.ui new file mode 100644 index 000000000000..4d864e56aca1 --- /dev/null +++ b/svx/uiconfig/ui/paraulspacing.ui @@ -0,0 +1,137 @@ + + + + + + + 100 + 1 + 10 + + + True + False + 6 + + + True + False + 6 + 6 + + + True + False + 6 + + + True + False + center + center + svx/res/symphony/spacing1.png + + + False + True + 0 + + + + + True + False + Above + + + False + True + 1 + + + + + 0 + 0 + + + + + True + False + 6 + + + True + False + center + center + svx/res/symphony/spacing2.png + + + False + True + 0 + + + + + True + False + Below + + + False + True + 1 + + + + + 0 + 1 + + + + + 150 + True + True + True + Above Paragraph Spacing + True + + 0 + adjustment1 + + + 1 + 0 + + + + + 150 + True + True + True + Below Paragraph Spacing + True + + 0 + adjustment1 + + + 1 + 1 + + + + + False + True + 1 + + + + -- cgit