diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 09:31:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 11:25:18 +0000 |
commit | 396138a6bc7192abe0837b419283860d3331f607 (patch) | |
tree | f80818ba86220abb8db205b402429e3d45aa62d1 /sw/source | |
parent | 8b4705e0e0c76503b1ca61cb567d222f49466fc5 (diff) |
Resolves: coverity#705366 Mixing enum types
and
coverity#705367 Mixing enum types
coverity#705371 Mixing enum types
coverity#982694 Mixing enum types
coverity#1027717 Mixing enum types
coverity#1371228 Mixing enum types
coverity#1371242 Mixing enum types
coverity#1371280 Mixing enum types
coverity#1371310 Mixing enum types
MapUnit and SfxMapUnit share the same values and
are freely cast from one to the other.
Now that
commit d30a4298bdb5ba53cd1fe659f2b742f218a2e527
Date: Thu Aug 11 15:02:19 2016 +0200
loplugin:unusedenumconstants in package..svtools
removed the SfxMapUnit entries that were directly unused, they
don't match anymore and casting from one to the other is dangerous.
Why there was two of these anyway escapes me, get rid of SfxMapUnit
and just use MapUnit universally
Change-Id: I4db5dcd04b59be2f85b62b728f96c90afe00c57e
Reviewed-on: https://gerrit.libreoffice.org/28234
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unoparagraph.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 34 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/uiitems.hxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageFormatPanel.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/attrdesc.cxx | 136 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uiitems.cxx | 6 |
15 files changed, 116 insertions, 116 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index dec139daf86a..965114975d72 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1601,7 +1601,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, { OUString aStr; GetDoc()->GetAttrPool().GetPresentation( *pItem, - SFX_MAPUNIT_CM, aStr ); + MAP_CM, aStr ); if (!sAttrs.isEmpty()) sAttrs += ", "; sAttrs += aStr; diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 333e26bb1617..b52b9f07b15a 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -284,7 +284,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew pFSize != pOldFSize ) { if( 100 == pOldFSize->GetProp() && - SFX_MAPUNIT_RELATIVE == pOldFSize->GetPropUnit() ) + MAP_RELATIVE == pOldFSize->GetPropUnit() ) { // We set it to absolute -> do not propagate it further, unless // we set it! diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 3bc70aba25ef..9a6830e416c3 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1280,7 +1280,7 @@ void SwFormatSurround::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr())); OUString aPresentation; - GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation); + GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bAnchorOnly"), BAD_CAST(OString::boolean(bAnchorOnly).getStr())); @@ -1733,7 +1733,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrder"), BAD_CAST(OString::number(mnOrder).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrderCounter"), BAD_CAST(OString::number(mnOrderCounter).getStr())); OUString aPresentation; - GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation); + GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr())); xmlTextWriterEndElement(pWriter); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 2a2e8c8caf16..cca3207d6474 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1440,9 +1440,9 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& { const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrameFormat()->GetDoc()); const SfxItemPool& rPool = pDoc->GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); + const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + if(eMapUnit != MAP_100TH_MM) { SvxUnoConvertFromMM(eMapUnit, aValue); } @@ -2346,9 +2346,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) { const SwDoc* pDoc = (IsDescriptor() ? m_pDoc : GetFrameFormat()->GetDoc()); const SfxItemPool& rPool = pDoc->GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); + const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + if(eMapUnit != MAP_100TH_MM) { SvxUnoConvertToMM(eMapUnit, aAny); } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 7f7573261310..301f60a2c4c3 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -528,9 +528,9 @@ throw(uno::RuntimeException) if(bDoIt) { - const SfxMapUnit eMapUnit(rSet.GetPool()->GetMetric(rEntry.nWID)); + const MapUnit eMapUnit(rSet.GetPool()->GetMetric(rEntry.nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + if(eMapUnit != MAP_100TH_MM) { SvxUnoConvertToMM(eMapUnit, rAny); } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 1e7ae1e46b7d..7957950f5466 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1582,8 +1582,8 @@ sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* p return rEntry.nMemberId & (~SFX_METRIC_ITEM); const SfxItemPool& rPool = pDoc->GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + const MapUnit eMapUnit(rPool.GetMetric(rEntry.nWID)); + if(eMapUnit != MAP_100TH_MM) SvxUnoConvertFromMM(eMapUnit, o_aValue); return rEntry.nMemberId & (~SFX_METRIC_ITEM); } @@ -2310,13 +2310,13 @@ uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry if(rEntry.nMemberId & SFX_METRIC_ITEM && GetDoc()) { const SfxItemPool& rPool = GetDoc()->GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(rEntry.nWID)); + const MapUnit eMapUnit(rPool.GetMetric(rEntry.nWID)); bool bAllowedConvert(true); // exception: If these ItemTypes are used, do not convert when these are negative // since this means they are intended as percent values if(XATTR_FILLBMP_SIZEX == rEntry.nWID || XATTR_FILLBMP_SIZEY == rEntry.nWID) bAllowedConvert = !aResult.has<sal_Int32>() || aResult.get<sal_Int32>() > 0; - if(eMapUnit != SFX_MAPUNIT_100TH_MM && bAllowedConvert) + if(eMapUnit != MAP_100TH_MM && bAllowedConvert) SvxUnoConvertToMM(eMapUnit, aResult); } return aResult; @@ -3616,9 +3616,9 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( if(bDoIt) { const SfxItemPool& rPool = m_pDocShell->GetDoc()->GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); + const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + if(eMapUnit != MAP_100TH_MM) { SvxUnoConvertFromMM(eMapUnit, aValue); } @@ -4100,9 +4100,9 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl( if(bDoIt) { const SfxItemPool& rPool = mrDoc.GetAttrPool(); - const SfxMapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); + const MapUnit eMapUnit(rPool.GetMetric(pEntry->nWID)); - if(eMapUnit != SFX_MAPUNIT_100TH_MM) + if(eMapUnit != MAP_100TH_MM) { SvxUnoConvertToMM(eMapUnit, aTarget); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index dd75cbe9423b..d6df1bd1eaeb 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -648,7 +648,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, sal_Int32 nHeight, sal_uInt16 nFontHeightWhich) { float fSize = (float)nHeight / 10; - nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP ); + nHeight = CalcToUnit( fSize, MAP_TWIP ); SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType); pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich)); } @@ -677,27 +677,27 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) if(bStandardHeightChanged) { float fSize = (float)m_pStandardHeightLB->GetValue() / 10; - m_pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_STANDARD, m_nFontGroup ); + m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_STANDARD, m_nFontGroup ); } if(bTitleHeightChanged) { float fSize = (float)m_pTitleHeightLB->GetValue() / 10; - m_pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_OUTLINE, m_nFontGroup ); + m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_OUTLINE, m_nFontGroup ); } if(bListHeightChanged) { float fSize = (float)m_pListHeightLB->GetValue() / 10; - m_pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_LIST, m_nFontGroup ); + m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_LIST, m_nFontGroup ); } if(bLabelHeightChanged) { float fSize = (float)m_pLabelHeightLB->GetValue() / 10; - m_pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_CAPTION, m_nFontGroup ); + m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_CAPTION, m_nFontGroup ); } if(bIndexHeightChanged) { float fSize = (float)m_pIndexHeightLB->GetValue() / 10; - m_pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_INDEX, m_nFontGroup ); + m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MAP_TWIP ), FONT_INDEX, m_nFontGroup ); } if(m_pWrtShell) @@ -725,7 +725,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) if(bStandardHeightChanged) { float fSize = (float)m_pStandardHeightLB->GetValue() / 10; - m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); + m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MAP_TWIP ), 100, nFontHeightWhich ) ); SwTextFormatColl *pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFormatAttr(nFontHeightWhich); bMod = true; @@ -949,11 +949,11 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup ); m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList ); - m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, SFX_MAPUNIT_TWIP, 10 ) ); - m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , SFX_MAPUNIT_TWIP, 10 ) ); - m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , SFX_MAPUNIT_TWIP, 10 ) ); - m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , SFX_MAPUNIT_TWIP, 10 )); - m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , SFX_MAPUNIT_TWIP, 10 )); + m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MAP_TWIP, 10 ) ); + m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MAP_TWIP, 10 ) ); + m_pListHeightLB-> SetValue( CalcToPoint( nListHeight , MAP_TWIP, 10 ) ); + m_pLabelHeightLB-> SetValue( CalcToPoint( nLabelHeight , MAP_TWIP, 10 )); + m_pIndexHeightLB-> SetValue( CalcToPoint( nIndexHeight , MAP_TWIP, 10 )); m_pStandardBox->SaveValue(); m_pTitleBox->SaveValue(); @@ -985,19 +985,19 @@ IMPL_LINK_NOARG_TYPED(SwStdFontTabPage, StandardHdl, Button*, void) m_pStandardHeightLB->SetValue( CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_STANDARD + nFontOffset, m_eLanguage), - SFX_MAPUNIT_TWIP, 10 ) ); + MAP_TWIP, 10 ) ); m_pTitleHeightLB ->SetValue(CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_OUTLINE + - nFontOffset, m_eLanguage), SFX_MAPUNIT_TWIP, 10 )); + nFontOffset, m_eLanguage), MAP_TWIP, 10 )); m_pListHeightLB ->SetValue(CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_LIST + nFontOffset, m_eLanguage), - SFX_MAPUNIT_TWIP, 10 )); + MAP_TWIP, 10 )); m_pLabelHeightLB ->SetValue(CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_CAPTION + nFontOffset, m_eLanguage), - SFX_MAPUNIT_TWIP, 10 )); + MAP_TWIP, 10 )); m_pIndexHeightLB ->SetValue(CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, m_eLanguage), - SFX_MAPUNIT_TWIP, 10 )); + MAP_TWIP, 10 )); } IMPL_LINK_TYPED( SwStdFontTabPage, ModifyHdl, Edit&, rBox, void ) diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 557a00af2043..73e09d5b5497 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -838,7 +838,7 @@ bool SwDocStyleSheet::HasClearParentSupport() const } // determine textual description -OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) +OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) { IntlWrapper aIntlWrapper( SvtSysLocale().GetLanguageTag() ); diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx index a1b4414f5c66..2222ffd2e8ec 100644 --- a/sw/source/uibase/inc/uiitems.hxx +++ b/sw/source/uibase/inc/uiitems.hxx @@ -42,10 +42,10 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - OUString &rText, - const IntlWrapper* pIntl = nullptr ) const override; + MapUnit eCoreMetric, + MapUnit ePresMetric, + OUString &rText, + const IntlWrapper* pIntl = nullptr ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx b/sw/source/uibase/sidebar/PageFormatPanel.hxx index 7d6285cc53e7..2d81bc33c431 100644 --- a/sw/source/uibase/sidebar/PageFormatPanel.hxx +++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx @@ -97,7 +97,7 @@ private: std::unique_ptr<SvxLongULSpaceItem> mpPageULMarginItem; FieldUnit meFUnit, meLastFUnit; - SfxMapUnit meUnit; + MapUnit meUnit; long mnPageLeftMargin; long mnPageRightMargin; diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index f8236a1e9039..d9dce30a3915 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -47,7 +47,7 @@ PageMarginControl::PageMarginControl( const Size& rPageSize, const bool bLandscape, const FieldUnit eFUnit, - const SfxMapUnit eUnit ) + const MapUnit eUnit ) : svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_MARGIN) ) , mpMarginValueSet( VclPtr<svx::sidebar::ValueSetWithTextControl>::Create( svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_MARGIN) ) ) , maCustom(VclPtr<FixedText>::Create(this, SW_RES(FT_CUSTOM))) diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx index b064c849fdd2..25c114bf74a4 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.hxx +++ b/sw/source/uibase/sidebar/PageMarginControl.hxx @@ -60,7 +60,7 @@ public: const Size& rPageSize, const bool bLandscape, const FieldUnit eFUnit, - const SfxMapUnit eUnit ); + const MapUnit eUnit ); virtual ~PageMarginControl(); virtual void dispose() override; @@ -88,7 +88,7 @@ private: long mnPageBottomMargin; bool mbMirrored; - const SfxMapUnit meUnit; + const MapUnit meUnit; bool mbUserCustomValuesAvailable; long mnUserCustomPageLeftMargin; diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx index baa225714980..22452c8f3586 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx @@ -178,7 +178,7 @@ namespace sw { namespace sidebar { std::unique_ptr<SfxInt16Item> mpPageColumnTypeItem; FieldUnit meFUnit; - SfxMapUnit meUnit; + MapUnit meUnit; // controller items ::sfx2::sidebar::ControllerItem m_aSwPagePgULControl; diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 6b2e3649f903..8037c8249825 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -63,8 +63,8 @@ using namespace com::sun::star; // query the attribute descriptions void SwAttrSet::GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, + MapUnit eCoreMetric, + MapUnit ePresMetric, OUString &rText ) const { static sal_Char const sComma[] = ", "; @@ -94,8 +94,8 @@ void SwAttrSet::GetPresentation( bool SwFormatCharFormat::GetPresentation ( SfxItemPresentation ePres, - SfxMapUnit eCoreUnit, - SfxMapUnit ePresUnit, + MapUnit eCoreUnit, + MapUnit ePresUnit, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -116,8 +116,8 @@ bool SwFormatCharFormat::GetPresentation bool SwFormatAutoFormat::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -129,8 +129,8 @@ bool SwFormatAutoFormat::GetPresentation bool SwFormatINetFormat::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -140,8 +140,8 @@ bool SwFormatINetFormat::GetPresentation } bool SwFormatRuby::GetPresentation( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, - OUString &rText, const IntlWrapper* /*pIntl*/ ) const + MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, + OUString &rText, const IntlWrapper* /*pIntl*/ ) const { rText.clear(); return true; @@ -150,8 +150,8 @@ bool SwFormatRuby::GetPresentation( SfxItemPresentation /*ePres*/, bool SwFormatDrop::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -178,8 +178,8 @@ bool SwFormatDrop::GetPresentation bool SwRegisterItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -192,8 +192,8 @@ bool SwRegisterItem::GetPresentation bool SwNumRuleItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -209,8 +209,8 @@ bool SwNumRuleItem::GetPresentation bool SwParaConnectBorderItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -225,8 +225,8 @@ bool SwParaConnectBorderItem::GetPresentation bool SwFormatFrameSize::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit eCoreUnit, - SfxMapUnit ePresUnit, + MapUnit eCoreUnit, + MapUnit ePresUnit, OUString& rText, const IntlWrapper* pIntl ) const @@ -267,8 +267,8 @@ bool SwFormatFrameSize::GetPresentation bool SwFormatHeader::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -284,8 +284,8 @@ bool SwFormatHeader::GetPresentation bool SwFormatFooter::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -298,8 +298,8 @@ bool SwFormatFooter::GetPresentation bool SwFormatSurround::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -342,8 +342,8 @@ bool SwFormatSurround::GetPresentation bool SwFormatVertOrient::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit eCoreUnit, - SfxMapUnit ePresUnit, + MapUnit eCoreUnit, + MapUnit ePresUnit, OUString& rText, const IntlWrapper* pIntl ) const @@ -388,8 +388,8 @@ bool SwFormatVertOrient::GetPresentation bool SwFormatHoriOrient::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit eCoreUnit, - SfxMapUnit ePresUnit, + MapUnit eCoreUnit, + MapUnit ePresUnit, OUString& rText, const IntlWrapper* pIntl ) const @@ -434,8 +434,8 @@ bool SwFormatHoriOrient::GetPresentation bool SwFormatAnchor::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -462,8 +462,8 @@ bool SwFormatAnchor::GetPresentation bool SwFormatPageDesc::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -481,8 +481,8 @@ bool SwFormatPageDesc::GetPresentation bool SwFormatCol::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit eCoreUnit, - SfxMapUnit /*ePresUnit*/, + MapUnit eCoreUnit, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* pIntl ) const @@ -496,7 +496,7 @@ bool SwFormatCol::GetPresentation const long nWdth = static_cast<long>(GetLineWidth()); rText = rText + " " + SW_RESSTR( STR_LINE_WIDTH ) + " " + ::GetMetricText( nWdth, eCoreUnit, - SFX_MAPUNIT_POINT, pIntl ); + MAP_POINT, pIntl ); } } else @@ -509,8 +509,8 @@ bool SwFormatCol::GetPresentation bool SwFormatURL::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -536,8 +536,8 @@ bool SwFormatURL::GetPresentation bool SwFormatEditInReadonly::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -559,8 +559,8 @@ void SwFormatEditInReadonly::dumpAsXml(xmlTextWriterPtr pWriter) const bool SwFormatLayoutSplit::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -573,8 +573,8 @@ bool SwFormatLayoutSplit::GetPresentation bool SwFormatRowSplit::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& /*rText*/, const IntlWrapper* /*pIntl*/ ) const @@ -585,8 +585,8 @@ bool SwFormatRowSplit::GetPresentation bool SwFormatFootnoteEndAtTextEnd::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& /*rText*/, const IntlWrapper* /*pIntl*/ ) const @@ -597,8 +597,8 @@ bool SwFormatFootnoteEndAtTextEnd::GetPresentation bool SwFormatChain::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -621,8 +621,8 @@ bool SwFormatChain::GetPresentation bool SwFormatLineNumber::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -642,8 +642,8 @@ bool SwFormatLineNumber::GetPresentation bool SwTextGridItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const @@ -670,8 +670,8 @@ bool SwTextGridItem::GetPresentation bool SwHeaderAndFooterEatSpacingItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, + MapUnit /*eCoreUnit*/, + MapUnit /*ePresUnit*/, OUString& /*rText*/, const IntlWrapper* /*pIntl*/ ) const @@ -682,7 +682,7 @@ bool SwHeaderAndFooterEatSpacingItem::GetPresentation // Graphic attributes bool SwMirrorGrf::GetPresentation( - SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper* /*pIntl*/ ) const { sal_uInt16 nId; @@ -704,7 +704,7 @@ bool SwMirrorGrf::GetPresentation( } bool SwRotationGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -716,7 +716,7 @@ bool SwRotationGrf::GetPresentation( } bool SwLuminanceGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -729,7 +729,7 @@ bool SwLuminanceGrf::GetPresentation( } bool SwContrastGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -742,7 +742,7 @@ bool SwContrastGrf::GetPresentation( } bool SwChannelGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -768,7 +768,7 @@ bool SwChannelGrf::GetPresentation( } bool SwGammaGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { OUStringBuffer aText; @@ -781,7 +781,7 @@ bool SwGammaGrf::GetPresentation( } bool SwInvertGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { rText.clear(); @@ -794,7 +794,7 @@ bool SwInvertGrf::GetPresentation( } bool SwTransparencyGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) @@ -807,7 +807,7 @@ bool SwTransparencyGrf::GetPresentation( } bool SwDrawModeGrf::GetPresentation( - SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, + SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/, OUString &rText, const IntlWrapper* /*pIntl*/) const { rText.clear(); @@ -828,10 +828,10 @@ bool SwDrawModeGrf::GetPresentation( } bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresMetric*/, - OUString &rText, - const IntlWrapper* /*pIntl*/ ) const + MapUnit /*eCoreMetric*/, + MapUnit /*ePresMetric*/, + OUString &rText, + const IntlWrapper* /*pIntl*/ ) const { rText.clear(); if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 7c20a88e157e..8b759ff87d0b 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -59,11 +59,11 @@ bool SwPageFootnoteInfoItem::operator==( const SfxPoolItem& rAttr ) const return ( aFootnoteInfo == static_cast<const SwPageFootnoteInfoItem&>(rAttr).GetPageFootnoteInfo()); } -bool SwPageFootnoteInfoItem::GetPresentation +bool SwPageFootnoteInfoItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit eCoreUnit, - SfxMapUnit ePresUnit, + MapUnit eCoreUnit, + MapUnit ePresUnit, OUString& rText, const IntlWrapper* pIntl ) const |