[Libreoffice-commits] core.git: cui/source editeng/source include/editeng reportdesign/source sc/qa sd/qa svx/source sw/source
Michael Stahl
mstahl at redhat.com
Thu Jan 7 10:21:34 PST 2016
cui/source/tabpages/chardlg.cxx | 12 ++++++------
editeng/source/editeng/editattr.cxx | 2 +-
editeng/source/editeng/editdbg.cxx | 2 +-
editeng/source/editeng/editdoc.cxx | 2 +-
editeng/source/editeng/eertfpar.cxx | 2 +-
editeng/source/editeng/impedit4.cxx | 2 +-
editeng/source/items/textitem.cxx | 2 +-
editeng/source/rtf/rtfitem.cxx | 4 ++--
include/editeng/escapementitem.hxx | 6 +++---
reportdesign/source/ui/misc/UITools.cxx | 2 +-
sc/qa/unit/subsequent_export-test.cxx | 2 +-
sd/qa/unit/import-tests.cxx | 2 +-
svx/source/dialog/fntctrl.cxx | 4 ++--
sw/source/core/text/atrstck.cxx | 2 +-
sw/source/core/txtnode/swfont.cxx | 4 ++--
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
sw/source/filter/ww8/rtfattributeoutput.cxx | 8 ++++----
sw/source/filter/ww8/ww8atr.cxx | 2 +-
18 files changed, 31 insertions(+), 31 deletions(-)
New commits:
commit 63a3c07d7cdc6b947e91ad8d16d1e77c5ac80de1
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jan 7 19:13:19 2016 +0100
svx: fix windows build, rename SvxEscapementItem::GetProp()
90e07dd6f5d64a0d0041361c1592a6cd93ff2ac0 introduced a new unit test
which calls SvxEscapementItem::GetProp(), and apparently the unit test
also #includes windows.h somehow, so GetProp macro is defined to
GetPropA and that fails to link since SvxEscapementItem doesn't have
this member function. Thank you, C preprocessor, you barbarous relic.
Change-Id: I6fd8e9d832ed5e1ce1a4fa7f1516c55d51a3283b
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 8351042..2d6550e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2758,18 +2758,18 @@ void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc )
if ( SVX_ESCAPEMENT_SUPERSCRIPT == nEsc )
{
aEscItm.GetEsc() = m_nSuperEsc;
- aEscItm.GetProp() = m_nSuperProp;
+ aEscItm.GetProportionalHeight() = m_nSuperProp;
}
else if ( SVX_ESCAPEMENT_SUBSCRIPT == nEsc )
{
aEscItm.GetEsc() = m_nSubEsc;
- aEscItm.GetProp() = m_nSubProp;
+ aEscItm.GetProportionalHeight() = m_nSubProp;
}
short nFac = aEscItm.GetEsc() < 0 ? -1 : 1;
m_pHighLowMF->SetValue( aEscItm.GetEsc() * nFac );
- m_pFontSizeMF->SetValue( aEscItm.GetProp() );
+ m_pFontSizeMF->SetValue( aEscItm.GetProportionalHeight() );
if ( SVX_ESCAPEMENT_OFF == nEsc )
{
@@ -2794,7 +2794,7 @@ void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc )
AutoPositionHdl_Impl( m_pHighLowRB );
}
- UpdatePreview_Impl( 100, aEscItm.GetProp(), aEscItm.GetEsc() );
+ UpdatePreview_Impl( 100, aEscItm.GetProportionalHeight(), aEscItm.GetEsc() );
}
@@ -3036,7 +3036,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
{
const SvxEscapementItem& rItem = static_cast<const SvxEscapementItem&>(rSet->Get( nWhich ));
nEsc = rItem.GetEsc();
- nEscProp = rItem.GetProp();
+ nEscProp = rItem.GetProportionalHeight();
if ( nEsc != 0 )
{
@@ -3273,7 +3273,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
if ( pOld )
{
const SvxEscapementItem& rItem = *static_cast<const SvxEscapementItem*>(pOld);
- if ( rItem.GetEsc() == nEsc && rItem.GetProp() == nEscProp )
+ if (rItem.GetEsc() == nEsc && rItem.GetProportionalHeight() == nEscProp)
bChanged = false;
}
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 088327f..a556fd3 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -278,7 +278,7 @@ EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAt
void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
{
- sal_uInt16 nProp = static_cast<const SvxEscapementItem*>(GetItem())->GetProp();
+ sal_uInt16 const nProp = static_cast<const SvxEscapementItem*>(GetItem())->GetProportionalHeight();
rFont.SetPropr( (sal_uInt8)nProp );
short nEsc = static_cast<const SvxEscapementItem*>(GetItem())->GetEsc();
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 37d8bad..64a7e2f 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -265,7 +265,7 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
aDebStr.append("Escape=");
aDebStr.append(static_cast<sal_Int32>(static_cast<const SvxEscapementItem&>(rItem).GetEsc()));
aDebStr.append(", ");
- aDebStr.append(static_cast<sal_Int32>(static_cast<const SvxEscapementItem&>(rItem).GetProp()));
+ aDebStr.append(static_cast<sal_Int32>(static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight()));
break;
case EE_CHAR_PAIRKERNING:
aDebStr.append("PairKerning=");
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 09f5f1f..41b227f 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2068,7 +2068,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
{
const SvxEscapementItem& rEsc = static_cast<const SvxEscapementItem&>( rSet.Get( EE_CHAR_ESCAPEMENT ) );
- sal_uInt16 nProp = rEsc.GetProp();
+ sal_uInt16 const nProp = rEsc.GetProportionalHeight();
rFont.SetPropr( (sal_uInt8)nProp );
short nEsc = rEsc.GetEsc();
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index a3b271b..8d7dcf1 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -343,7 +343,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
mpEditEngine->SeekCursor(aStartPaM.GetNode(), aStartPaM.GetIndex()+1, aFont);
nEsc = nEsc * 100 / aFont.GetSize().Height();
- SvxEscapementItem aEscItem( (short) nEsc, static_cast<const SvxEscapementItem*>(pItem)->GetProp(), EE_CHAR_ESCAPEMENT );
+ SvxEscapementItem aEscItem( (short) nEsc, static_cast<const SvxEscapementItem*>(pItem)->GetProportionalHeight(), EE_CHAR_ESCAPEMENT );
rSet.GetAttrSet().Put( aEscItem );
}
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 1f8bf52..2a30723 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -969,7 +969,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
long nFontHeight = GetRefDevice()->LogicToLogic(
aFont.GetSize(), &GetRefMapMode(), &aPntMode ).Height();
nFontHeight *=2; // Half Points
- sal_uInt16 nProp = static_cast<const SvxEscapementItem&>(rItem).GetProp();
+ sal_uInt16 const nProp = static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight();
sal_uInt16 nProp100 = nProp*100; // For SWG-Token Prop in 100th percent.
short nEsc = static_cast<const SvxEscapementItem&>(rItem).GetEsc();
if ( nEsc == DFLT_ESC_AUTO_SUPER )
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index d4417b8..7ca6b6a 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2339,7 +2339,7 @@ SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*
else if( DFLT_ESC_AUTO_SUB == _nEsc )
_nEsc = DFLT_ESC_SUB;
}
- rStrm.WriteUChar( GetProp() )
+ rStrm.WriteUChar( GetProportionalHeight() )
.WriteInt16( _nEsc );
return rStrm;
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 01cc8b8..9ae0526 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -580,7 +580,7 @@ SET_FONTALIGNMENT:
if( DFLT_ESC_AUTO_SUPER == rOld.GetEsc() )
{
nEs = DFLT_ESC_AUTO_SUB;
- nProp = rOld.GetProp();
+ nProp = rOld.GetProportionalHeight();
}
else
{
@@ -927,7 +927,7 @@ ATTR_SETOVERLINE:
if( DFLT_ESC_AUTO_SUB == rOld.GetEsc() )
{
nEs = DFLT_ESC_AUTO_SUPER;
- nProp = rOld.GetProp();
+ nProp = rOld.GetProportionalHeight();
}
else
{
diff --git a/include/editeng/escapementitem.hxx b/include/editeng/escapementitem.hxx
index 291a63d..ad422d8 100644
--- a/include/editeng/escapementitem.hxx
+++ b/include/editeng/escapementitem.hxx
@@ -80,13 +80,13 @@ public:
inline short &GetEsc() { return nEsc; }
inline short GetEsc() const { return nEsc; }
- inline sal_uInt8 &GetProp() { return nProp; }
- inline sal_uInt8 GetProp() const { return nProp; }
+ inline sal_uInt8 &GetProportionalHeight() { return nProp; }
+ inline sal_uInt8 GetProportionalHeight() const { return nProp; }
inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc)
{
nEsc = rEsc.GetEsc();
- nProp = rEsc.GetProp();
+ nProp = rEsc.GetProportionalHeight();
return *this;
}
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index fbef47b..6a5263f 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -553,7 +553,7 @@ namespace
{
const SvxEscapementItem* pFontItem = static_cast<const SvxEscapementItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENT, uno::makeAny( pFontItem->GetEsc() ) );
- lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENTHEIGHT, uno::makeAny( (sal_Int8)pFontItem->GetProp() ) );
+ lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENTHEIGHT, uno::makeAny(static_cast<sal_Int8>(pFontItem->GetProportionalHeight())) );
}
}
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 73f26c2..41c54ed 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -731,7 +731,7 @@ void ScExportTest::testRichTextExportODS()
continue;
const SvxEscapementItem* pItem = static_cast<const SvxEscapementItem*>(p);
- return ((pItem->GetEsc() == nEsc) && (pItem->GetProp() == nRelSize));
+ return ((pItem->GetEsc() == nEsc) && (pItem->GetProportionalHeight() == nRelSize));
}
return false;
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 3fb64ff..49db223 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -291,7 +291,7 @@ void SdImportTest::testN862510_1()
for( std::vector<EECharAttrib>::reverse_iterator it = rLst.rbegin(); it!=rLst.rend(); ++it)
{
const SvxEscapementItem *pFontEscapement = dynamic_cast<const SvxEscapementItem *>( (*it).pAttr );
- CPPUNIT_ASSERT_MESSAGE( "Baseline attribute not handled properly", !( pFontEscapement && pFontEscapement->GetProp() != 100 ) );
+ CPPUNIT_ASSERT_MESSAGE( "Baseline attribute not handled properly", !(pFontEscapement && pFontEscapement->GetProportionalHeight() != 100) );
}
}
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 8511dc0..1aa7a6d 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -1139,7 +1139,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack
{
const SvxEscapementItem& rItem = static_cast<const SvxEscapementItem&>( rSet.Get( nWhich ) );
nEsc = rItem.GetEsc();
- nEscProp = rItem.GetProp();
+ nEscProp = rItem.GetProportionalHeight();
if( nEsc == DFLT_ESC_AUTO_SUPER )
nEsc = DFLT_ESC_SUPER;
@@ -1387,7 +1387,7 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet)
{
const SvxEscapementItem& rItem = static_cast<const SvxEscapementItem&>( rSet.Get( nWhich ) );
nEsc = rItem.GetEsc();
- nEscProp = rItem.GetProp();
+ nEscProp = rItem.GetProportionalHeight();
if( nEsc == DFLT_ESC_AUTO_SUPER )
nEsc = DFLT_ESC_SUPER;
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index ef421b1..c4933f0 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -650,7 +650,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
break;
case RES_CHRATR_ESCAPEMENT :
rFnt.SetEscapement( static_cast<const SvxEscapementItem&>(rItem).GetEsc() );
- rFnt.SetProportion( static_cast<const SvxEscapementItem&>(rItem).GetProp() );
+ rFnt.SetProportion( static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight() );
break;
case RES_CHRATR_FONT :
rFnt.SetName( static_cast<const SvxFontItem&>(rItem).GetFamilyName(), SW_LATIN );
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 134cce5..989e7d9 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -642,7 +642,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
const SvxEscapementItem *pEsc = static_cast<const SvxEscapementItem *>(pItem);
SetEscapement( pEsc->GetEsc() );
if( m_aSub[SW_LATIN].IsEsc() )
- SetProportion( pEsc->GetProp() );
+ SetProportion( pEsc->GetProportionalHeight() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
true, &pItem ))
@@ -835,7 +835,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
const SvxEscapementItem &rEsc = pAttrSet->GetEscapement();
SetEscapement( rEsc.GetEsc() );
if( m_aSub[SW_LATIN].IsEsc() )
- SetProportion( rEsc.GetProp() );
+ SetProportion( rEsc.GetProportionalHeight() );
SetCaseMap( pAttrSet->GetCaseMap().GetCaseMap() );
SetFixKerning( pAttrSet->GetKerning().GetValue() );
const SfxPoolItem* pItem;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6b4cade..4c5851e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6184,7 +6184,7 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
OString sIss;
- short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
+ short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProportionalHeight();
if ( !nEsc )
{
sIss = OString( "baseline" );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 9e1c583..f3c0409 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2228,7 +2228,7 @@ void RtfAttributeOutput::CharCrossedOut(const SvxCrossedOutItem& rCrossedOut)
void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc)
{
short nEsc = rEsc.GetEsc();
- if (rEsc.GetProp() == DFLT_ESC_PROP)
+ if (rEsc.GetProportionalHeight() == DFLT_ESC_PROP)
{
if (DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc)
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SUB);
@@ -2251,15 +2251,15 @@ void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc)
else
return;
- short nProp = rEsc.GetProp() * 100;
+ short nProp = rEsc.GetProportionalHeight() * 100;
if (DFLT_ESC_AUTO_SUPER == nEsc)
{
- nEsc = 100 - rEsc.GetProp();
+ nEsc = 100 - rEsc.GetProportionalHeight();
++nProp;
}
else if (DFLT_ESC_AUTO_SUB == nEsc)
{
- nEsc = - 100 + rEsc.GetProp();
+ nEsc = - 100 + rEsc.GetProportionalHeight();
++nProp;
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 7e4bdda..a1f9d83 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1315,7 +1315,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
sal_uInt8 b = 0xFF;
- short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
+ short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProportionalHeight();
if ( !nEsc )
{
b = 0;
More information about the Libreoffice-commits
mailing list