diff options
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 9c9bca1963c8..67e1817b1c0e 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -54,6 +54,8 @@ #include <sfx2/request.hxx> #include <svl/intitem.hxx> +#include <sfx2/viewfrm.hxx> + const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] = { SID_ATTR_PARA_LINESPACE, // 10033 @@ -228,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) m_xLineDistAtMetricBox->get_value_changed_from_saved() ) ) { nWhich = GetWhich( SID_ATTR_PARA_LINESPACE ); - MapUnit eUnit = pPool->GetMetric( nWhich ); + MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich ); SvxLineSpacingItem aSpacing( static_cast<const SvxLineSpacingItem&>(GetItemSet().Get( nWhich )) ); @@ -719,7 +721,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl const SvxLineSpacingItem &rAttr ) { - MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() ); + MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( rAttr.Which() ); switch( rAttr.GetLineSpaceRule() ) { diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 7bd655740926..2f582d9d8335 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -30,6 +30,8 @@ #include <vcl/button.hxx> #include <vcl/fixed.hxx> +#include <svl/itempool.hxx> + #define DEFAULT_LINE_SPACING 200 #define FIX_DIST_DEF 283 #define LINESPACE_1 100 @@ -125,7 +127,7 @@ void ParaLineSpacingControl::Initialize() if( eState >= SfxItemState::DEFAULT ) { - MapUnit eUnit = MapUnit::Map100thMM; + MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( currSPItem->Which() ); meLNSpaceUnit = eUnit; switch( currSPItem->GetLineSpaceRule() ) |