diff options
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/area/AreaTransparencyGradientControl.cxx | 40 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 10 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 40 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 10 | ||||
-rw-r--r-- | svx/source/sidebar/possize/SidebarDialControl.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 4 |
11 files changed, 64 insertions, 64 deletions
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx index dc50fb1f8b00..922f104b6e6e 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx @@ -30,24 +30,24 @@ namespace svx { namespace sidebar { // positioning helpers -#define APOS1_1 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL), MAP_APPFONT)) -#define APOS2_1 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS1_2 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL), MAP_APPFONT)) -#define APOS2_2 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS1_3 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS1_4 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS2_3 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS2_4 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MAP_APPFONT)) -#define APOS1_5 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS1_6 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+2*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS2_5 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS2_6 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+2*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS1_7 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS1_8 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 4*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+3*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MAP_APPFONT)) -#define APOS_Left_Right_1 Point(LogicToPixel(Point(LEFT_RIGHT_X1,LEFT_RIGHT_Y1), MAP_APPFONT)) -#define APOS_Left_Right_2 Point(LogicToPixel(Point(LEFT_RIGHT_X2,LEFT_RIGHT_Y1), MAP_APPFONT)) -#define APOS_Left_Right_3 Point(LogicToPixel(Point(LEFT_RIGHT_X1,LEFT_RIGHT_Y2), MAP_APPFONT)) -#define APOS_Left_Right_4 Point(LogicToPixel(Point(LEFT_RIGHT_X2,LEFT_RIGHT_Y2), MAP_APPFONT)) +#define APOS1_1 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL), MapUnit::MapAppFont)) +#define APOS2_1 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS1_2 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL), MapUnit::MapAppFont)) +#define APOS2_2 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS1_3 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS1_4 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS2_3 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS2_4 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL), MapUnit::MapAppFont)) +#define APOS1_5 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS1_6 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+2*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS2_5 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 2*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS2_6 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL+CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+2*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS1_7 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 3*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL+MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS1_8 Point(LogicToPixel(Point(POPUPPANEL_MARGIN_HORIZONTAL,POPUPPANEL_MARGIN_VERTICAL + 4*(FIXED_TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL)+3*(MBOX_HEIGHT+CONTROL_SPACING_VERTICAL)), MapUnit::MapAppFont)) +#define APOS_Left_Right_1 Point(LogicToPixel(Point(LEFT_RIGHT_X1,LEFT_RIGHT_Y1), MapUnit::MapAppFont)) +#define APOS_Left_Right_2 Point(LogicToPixel(Point(LEFT_RIGHT_X2,LEFT_RIGHT_Y1), MapUnit::MapAppFont)) +#define APOS_Left_Right_3 Point(LogicToPixel(Point(LEFT_RIGHT_X1,LEFT_RIGHT_Y2), MapUnit::MapAppFont)) +#define APOS_Left_Right_4 Point(LogicToPixel(Point(LEFT_RIGHT_X2,LEFT_RIGHT_Y2), MapUnit::MapAppFont)) AreaTransparencyGradientControl::AreaTransparencyGradientControl ( vcl::Window* pParent, @@ -128,9 +128,9 @@ void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGra const XGradient& rGradient = pGradientItem->GetGradientValue(); css::awt::GradientStyle eXGS(rGradient.GetGradientStyle()); Size aSize(POP_WIDTH,POP_HEIGHT); - aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); + aSize = LogicToPixel( aSize, MapMode(MapUnit::MapAppFont) ); Size aSize2(POP_WIDTH,POP_HEIGHT2); - aSize2 = LogicToPixel( aSize2, MapMode(MAP_APPFONT) ); + aSize2 = LogicToPixel( aSize2, MapMode(MapUnit::MapAppFont) ); long aPosY = 0; Point aPointAngle; Size aSizeAngle = maMtrTrgrAngle->GetSizePixel(); diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 4d1ff4a309f1..2047408efd12 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -165,7 +165,7 @@ LinePropertyPanelBase::LinePropertyPanelBase( mpStyleItem(), mpDashItem(), mnTrans(0), - meMapUnit(MAP_MM), + meMapUnit(MapUnit::MapMM), mnWidthCoreValue(0), mpStartItem(), mpEndItem(), @@ -705,7 +705,7 @@ void LinePropertyPanelBase::SetWidthIcon() return; } - long nVal = LogicToLogic(mnWidthCoreValue * 10,(MapUnit)meMapUnit , MAP_POINT); + long nVal = LogicToLogic(mnWidthCoreValue * 10,(MapUnit)meMapUnit , MapUnit::MapPoint); const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH); if(nVal <= 6) diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index b455758f8216..52f60d0b67bc 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -32,7 +32,7 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) , m_rParent(rParent) , m_pStr(nullptr) , m_sPt(SVX_RESSTR(RID_SVXSTR_PT)) - , m_eMapUnit(MAP_TWIP) + , m_eMapUnit(MapUnit::MapTwip) , m_bVSFocus(true) , m_bCustom(false) , m_bCloseByEdit(false) @@ -116,7 +116,7 @@ IMPL_LINK(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void) sal_uInt16 iPos = m_xVSWidth->GetSelectItemId(); if (iPos >= 1 && iPos <= 8) { - sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)m_eMapUnit); + sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData( iPos )), MapUnit::MapPoint, (MapUnit)m_eMapUnit); nVal = m_xMFWidth->Denormalize(nVal); XLineWidthItem aWidthItem( nVal ); m_rParent.setLineWidth(aWidthItem); @@ -130,7 +130,7 @@ IMPL_LINK(LineWidthPopup, VSSelectHdl, ValueSet*, /*pControl*/, void) //modified if (m_bCustom) { - long nVal = LogicToLogic(m_nCustomWidth , MAP_POINT, (MapUnit)m_eMapUnit); + long nVal = LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, (MapUnit)m_eMapUnit); nVal = m_xMFWidth->Denormalize(nVal); XLineWidthItem aWidthItem( nVal ); m_rParent.setLineWidth(aWidthItem); @@ -165,7 +165,7 @@ IMPL_LINK(LineWidthPopup, MFModifyHdl, Edit&, /*rControl*/, void) m_xVSWidth->StartSelection(); } long nTmp = static_cast<long>(m_xMFWidth->GetValue()); - long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)m_eMapUnit ); + long nVal = LogicToLogic( nTmp, MapUnit::MapPoint, (MapUnit)m_eMapUnit ); sal_Int32 nNewWidth = (short)m_xMFWidth->Denormalize( nVal ); XLineWidthItem aWidthItem(nNewWidth); m_rParent.setLineWidth(aWidthItem); @@ -208,7 +208,7 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni if (bValuable) { - sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, (MapUnit) eMapUnit, MAP_100TH_MM ); + sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, (MapUnit) eMapUnit, MapUnit::Map100thMM ); nVal = m_xMFWidth->Normalize(nVal); m_xMFWidth->SetValue( nVal, FUNIT_100TH_MM ); } diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 0d7503fac64b..7b406b4575a6 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -173,7 +173,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) Size LineWidthValueSet::GetOptimalSize() const { - return LogicToPixel(Size(80, 12 * 9), MAP_APPFONT); + return LogicToPixel(Size(80, 12 * 9), MapUnit::MapAppFont); } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 765e0f80a900..e4b3a0f1460f 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -154,7 +154,7 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename) { bIsLoading = true; MapUnit eOldCoreUnit=eCoreUnit; - eCoreUnit = MAP_100TH_MM; + eCoreUnit = MapUnit::Map100thMM; INetURLObject aFile( SvtPathOptions().GetUserConfigPath() ); aFile.Append( filename); std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); @@ -193,7 +193,7 @@ void NBOTypeMgrBase::ImplStore(const OUString& filename) { if (bIsLoading) return; MapUnit eOldCoreUnit=eCoreUnit; - eCoreUnit = MAP_100TH_MM; + eCoreUnit = MapUnit::Map100thMM; INetURLObject aFile( SvtPathOptions().GetUserConfigPath() ); aFile.Append( filename); std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); @@ -975,7 +975,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf ); } } - aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)GetMapUnit()); + aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)GetMapUnit()); aFmt.SetGraphicBrush( pLevelSettings->pBrushItem, &aSize, &eOrient ); } } else diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index f58cb6bc11ad..46ca5b89fcd8 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -62,7 +62,7 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId) mpActLineDistFld = mpLineDistAtPercentBox.get(); - meLNSpaceUnit = MAP_100TH_MM; + meLNSpaceUnit = MapUnit::Map100thMM; Link<Button*,void> aLink = LINK(this, ParaLineSpacingControl, PredefinedValuesHandler); mpSpacing1Button->SetClickHdl(aLink); @@ -120,7 +120,7 @@ void ParaLineSpacingControl::Initialize() if( eState >= SfxItemState::DEFAULT ) { - MapUnit eUnit = MAP_100TH_MM; + MapUnit eUnit = MapUnit::Map100thMM; meLNSpaceUnit = eUnit; switch( currSPItem->GetLineSpaceRule() ) @@ -309,7 +309,7 @@ void ParaLineSpacingControl::UpdateMetricFields() mpLineDistAtMetricBox->SetMin(mpLineDistAtMetricBox->Normalize(MIN_FIXED_DISTANCE), FUNIT_TWIP); if (mpLineDistAtMetricBox->GetValue() != nTemp) - SetMetricValue(*mpLineDistAtMetricBox, FIX_DIST_DEF, MAP_TWIP); + SetMetricValue(*mpLineDistAtMetricBox, FIX_DIST_DEF, MapUnit::MapTwip); mpLineDistLabel->Enable(); mpActLineDistFld->Show(); diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index b3e7e078145d..1f288e9deeaa 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -136,7 +136,7 @@ void ParaPropertyPanel::HandleContextChange ( mpToolBoxHighlight->Hide(); Size aSize(PROPERTYPAGE_WIDTH,TEXT_SECTIONPAGE_HEIGHT); - aSize = LogicToPixel( aSize,MapMode(MAP_APPFONT) ); + aSize = LogicToPixel( aSize,MapMode(MapUnit::MapAppFont) ); aSize.setWidth(GetOutputSizePixel().Width()); SetSizePixel(aSize); }*/ @@ -225,8 +225,8 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl, v SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE ); maTxtLeft += INDENT_STEP; - sal_Int64 nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); - nVal = OutputDevice::LogicToLogic( (long)nVal, MAP_100TH_MM, (MapUnit)m_eLRSpaceUnit ); + sal_Int64 nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); + nVal = OutputDevice::LogicToLogic( (long)nVal, MapUnit::Map100thMM, (MapUnit)m_eLRSpaceUnit ); aMargin.SetTextLeft( (const long)nVal ); aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); aMargin.SetTextFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent, m_eLRSpaceUnit ) ); @@ -258,8 +258,8 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl, v SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE ); - sal_Int64 nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); - nVal = OutputDevice::LogicToLogic( (long)nVal, MAP_100TH_MM, (MapUnit)m_eLRSpaceUnit ); + sal_Int64 nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); + nVal = OutputDevice::LogicToLogic( (long)nVal, MapUnit::Map100thMM, (MapUnit)m_eLRSpaceUnit ); aMargin.SetTextLeft( (const long)nVal ); aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); @@ -369,18 +369,18 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat { const SvxLRSpaceItem* pSpace = static_cast<const SvxLRSpaceItem*>(pState); maTxtLeft = pSpace->GetTextLeft(); - maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)m_eLRSpaceUnit, MAP_100TH_MM ); - maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, MAP_100TH_MM, (MapUnit)(MAP_TWIP) ); + maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)m_eLRSpaceUnit, MapUnit::Map100thMM ); + maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, MapUnit::Map100thMM, (MapUnit)(MapUnit::MapTwip) ); long aTxtRight = pSpace->GetRight(); - aTxtRight = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)m_eLRSpaceUnit, MAP_100TH_MM ); - aTxtRight = OutputDevice::LogicToLogic( aTxtRight, MAP_100TH_MM, (MapUnit)(MAP_TWIP) ); + aTxtRight = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)m_eLRSpaceUnit, MapUnit::Map100thMM ); + aTxtRight = OutputDevice::LogicToLogic( aTxtRight, MapUnit::Map100thMM, (MapUnit)(MapUnit::MapTwip) ); long aTxtFirstLineOfst = pSpace->GetTextFirstLineOfst(); - aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)m_eLRSpaceUnit, MAP_100TH_MM ); - aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MAP_100TH_MM, (MapUnit)(MAP_TWIP) ); + aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)m_eLRSpaceUnit, MapUnit::Map100thMM ); + aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MapUnit::Map100thMM, (MapUnit)(MapUnit::MapTwip) ); - long nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); + long nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); nVal = (long)mpLeftIndent->Normalize( (long)nVal ); if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text) @@ -390,7 +390,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat mpFLineIndent->SetMin( nVal*(-1), FUNIT_100TH_MM ); } - long nrVal = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); + long nrVal = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); nrVal = (long)mpRightIndent->Normalize( (long)nrVal ); switch (maContext.GetCombinedContext_DI()) @@ -421,7 +421,7 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat mpLeftIndent->SetValue( nVal, FUNIT_100TH_MM ); mpRightIndent->SetValue( nrVal, FUNIT_100TH_MM ); - long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); + long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); nfVal = (long)mpFLineIndent->Normalize( (long)nfVal ); mpFLineIndent->SetValue( nfVal, FUNIT_100TH_MM ); @@ -475,18 +475,18 @@ void ParaPropertyPanel::StateChangedULImpl( sal_uInt16 /*nSID*/, SfxItemState eS const SvxULSpaceItem* pOldItem = static_cast<const SvxULSpaceItem*>(pState); maUpper = pOldItem->GetUpper(); - maUpper = OutputDevice::LogicToLogic( maUpper, (MapUnit)m_eULSpaceUnit, MAP_100TH_MM ); - maUpper = OutputDevice::LogicToLogic( maUpper, MAP_100TH_MM, (MapUnit)(MAP_TWIP) ); + maUpper = OutputDevice::LogicToLogic( maUpper, (MapUnit)m_eULSpaceUnit, MapUnit::Map100thMM ); + maUpper = OutputDevice::LogicToLogic( maUpper, MapUnit::Map100thMM, (MapUnit)(MapUnit::MapTwip) ); maLower = pOldItem->GetLower(); - maLower = OutputDevice::LogicToLogic( maLower, (MapUnit)m_eULSpaceUnit, MAP_100TH_MM ); - maLower = OutputDevice::LogicToLogic( maLower, MAP_100TH_MM, (MapUnit)(MAP_TWIP) ); + maLower = OutputDevice::LogicToLogic( maLower, (MapUnit)m_eULSpaceUnit, MapUnit::Map100thMM ); + maLower = OutputDevice::LogicToLogic( maLower, MapUnit::Map100thMM, (MapUnit)(MapUnit::MapTwip) ); - sal_Int64 nVal = OutputDevice::LogicToLogic( maUpper, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); + sal_Int64 nVal = OutputDevice::LogicToLogic( maUpper, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); nVal = mpTopDist->Normalize( nVal ); mpTopDist->SetValue( nVal, FUNIT_100TH_MM ); - nVal = OutputDevice::LogicToLogic( maLower, (MapUnit)(MAP_TWIP), MAP_100TH_MM ); + nVal = OutputDevice::LogicToLogic( maLower, (MapUnit)(MapUnit::MapTwip), MapUnit::Map100thMM ); nVal = mpBottomDist->Normalize( nVal ); mpBottomDist->SetValue( nVal, FUNIT_100TH_MM ); } diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index 576da6087e28..41a7e45bab1c 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -36,7 +36,7 @@ using namespace svx; ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent, css::uno::Reference<css::frame::XFrame>& xFrame) : VclVBox(pParent) - , m_eUnit(MAP_TWIP) + , m_eUnit(MapUnit::MapTwip) { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/paraulspacing.ui", @@ -105,7 +105,7 @@ IMPL_LINK_NOARG(ParaULSpacingWindow, ModifySpacingHdl, Edit&, void) ParaLRSpacingWindow::ParaLRSpacingWindow(vcl::Window* pParent, css::uno::Reference<css::frame::XFrame>& xFrame) : VclVBox(pParent) - , m_eUnit(MAP_TWIP) + , m_eUnit(MapUnit::MapTwip) { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/paralrspacing.ui", diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 6dc0f9025179..856bef27a3d5 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -810,14 +810,14 @@ void PosSizePropertyPanel::executeSize() double nWidth = (double)mpMtrWidth->GetValue( meDlgUnit ); nWidth = MetricField::ConvertDoubleValue( nWidth, mpMtrWidth->GetBaseValue(), mpMtrWidth->GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM ); long lWidth = (long)(nWidth * (double)aUIScale); - lWidth = OutputDevice::LogicToLogic( lWidth, MAP_100TH_MM, (MapUnit)mePoolUnit ); + lWidth = OutputDevice::LogicToLogic( lWidth, MapUnit::Map100thMM, mePoolUnit ); lWidth = (long)mpMtrWidth->Denormalize( lWidth ); // get Height double nHeight = (double)mpMtrHeight->GetValue( meDlgUnit ); nHeight = MetricField::ConvertDoubleValue( nHeight, mpMtrHeight->GetBaseValue(), mpMtrHeight->GetDecimalDigits(), meDlgUnit, FUNIT_100TH_MM ); long lHeight = (long)(nHeight * (double)aUIScale); - lHeight = OutputDevice::LogicToLogic( lHeight, MAP_100TH_MM, (MapUnit)mePoolUnit ); + lHeight = OutputDevice::LogicToLogic( lHeight, MapUnit::Map100thMM, mePoolUnit ); lHeight = (long)mpMtrWidth->Denormalize( lHeight ); // put Width & Height to itemset @@ -1067,8 +1067,8 @@ void PosSizePropertyPanel::SetPosSizeMinMax() TransfrmHelper::ScaleRect( maRect, aUIScale ); const sal_uInt16 nDigits(mpMtrPosX->GetDecimalDigits()); - TransfrmHelper::ConvertRect( maWorkArea, nDigits, (MapUnit) mePoolUnit, meDlgUnit ); - TransfrmHelper::ConvertRect( maRect, nDigits, (MapUnit) mePoolUnit, meDlgUnit ); + TransfrmHelper::ConvertRect( maWorkArea, nDigits, mePoolUnit, meDlgUnit ); + TransfrmHelper::ConvertRect( maRect, nDigits, mePoolUnit, meDlgUnit ); double fLeft(maWorkArea.getMinX()); double fTop(maWorkArea.getMinY()); @@ -1080,7 +1080,7 @@ void PosSizePropertyPanel::SetPosSizeMinMax() fRight -= maRect.getWidth(); fBottom -= maRect.getHeight(); - const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MAP_100TH_MM, meDlgUnit ) - 1L)); + const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1L)); fLeft = basegfx::clamp(fLeft, -fMaxLong, fMaxLong); fRight = basegfx::clamp(fRight, -fMaxLong, fMaxLong); fTop = basegfx::clamp(fTop, - fMaxLong, fMaxLong); diff --git a/svx/source/sidebar/possize/SidebarDialControl.cxx b/svx/source/sidebar/possize/SidebarDialControl.cxx index 8f9db397e023..831fcbca1266 100644 --- a/svx/source/sidebar/possize/SidebarDialControl.cxx +++ b/svx/source/sidebar/possize/SidebarDialControl.cxx @@ -34,7 +34,7 @@ VCL_BUILDER_FACTORY_ARGS(SidebarDialControl, WB_TABSTOP) Size SidebarDialControl::GetOptimalSize() const { - return LogicToPixel(Size(10, 10), MAP_APPFONT); + return LogicToPixel(Size(10, 10), MapUnit::MapAppFont); } void SidebarDialControl::MouseButtonDown( const MouseEvent& rMEvt ) diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 5005f59c873a..3275033926d0 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -127,7 +127,7 @@ void TextCharacterSpacingControl::Initialize() { MapUnit eUnit = GetCoreMetric(); MapUnit eOrgUnit = (MapUnit)eUnit; - MapUnit ePntUnit(MAP_POINT); + MapUnit ePntUnit(MapUnit::MapPoint); long nBig = maEditKerning->Normalize(nKerning); nKerning = LogicToLogic(nBig, eOrgUnit, ePntUnit); maEditKerning->SetValue(nKerning); @@ -151,7 +151,7 @@ void TextCharacterSpacingControl::ExecuteCharacterSpacing(long nValue, bool bClo long nSign = (nValue < 0) ? -1 : 1; nValue = nValue * nSign; - long nVal = LogicToLogic(nValue, MAP_POINT, (MapUnit)eUnit); + long nVal = LogicToLogic(nValue, MapUnit::MapPoint, (MapUnit)eUnit); short nKern = (nValue == 0) ? 0 : (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(nSign * nKern, SID_ATTR_CHAR_KERNING); |