diff options
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 1 | ||||
-rw-r--r-- | editeng/source/items/svxfont.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 5 | ||||
-rw-r--r-- | include/editeng/escapementitem.hxx | 9 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/style/escphdl.cxx | 7 |
6 files changed, 8 insertions, 19 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 64b9f26c3b3a..263b9f08b70e 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2700,7 +2700,6 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) m_nSuperProp = static_cast<sal_uInt8>(sUser.getToken( 0, ';', nIdx ).toInt32()); m_nSubProp = static_cast<sal_uInt8>(sUser.getToken( 0, ';', nIdx ).toInt32()); - // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters) m_xHighLowMF->set_max(MAX_ESC_POS, FieldUnit::PERCENT); //fdo#75307 validate all the entries and discard all of them if any are diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 58cc0ddab5da..3ee013a03cf4 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -511,7 +511,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, { short nTmpEsc; if( DFLT_ESC_AUTO_SUPER == nEsc ) - nTmpEsc = 33; + nTmpEsc = DFLT_ESC_SUPER; else if( DFLT_ESC_AUTO_SUB == nEsc ) nTmpEsc = -20; else diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 34b6ac42d8ec..bd39fa4cf3f7 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1707,7 +1707,7 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, { SetEscapement( eEscape ); if( nEsc ) - nProp = 58; + nProp = DFLT_ESC_PROP; } @@ -1817,8 +1817,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) case MID_ESC: { sal_Int16 nVal = sal_Int16(); - // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters) - if( (rVal >>= nVal) && (std::abs(nVal) <= 14400)) + if( (rVal >>= nVal) && (std::abs(nVal) <= MAX_ESC_POS+1)) nEsc = nVal; else return false; diff --git a/include/editeng/escapementitem.hxx b/include/editeng/escapementitem.hxx index b667faad1a5e..f84d18dd8f57 100644 --- a/include/editeng/escapementitem.hxx +++ b/include/editeng/escapementitem.hxx @@ -70,16 +70,13 @@ public: nProp = 100; } else + { + nProp = DFLT_ESC_PROP; if( SvxEscapement::Superscript == eNew ) - { nEsc = DFLT_ESC_SUPER; - nProp = DFLT_ESC_PROP; - } else - { nEsc = DFLT_ESC_SUB; - nProp = DFLT_ESC_PROP; - } + } } SvxEscapement GetEscapement() const { return static_cast< SvxEscapement >( GetEnumValue() ); } diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 16d42193ac6a..4f7648f0967f 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2258,7 +2258,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) case NS_ooxml::LN_EG_RPrBase_vertAlign: { sal_Int16 nEscapement = 0; - sal_Int8 nProp = 58; + sal_Int8 nProp = DFLT_ESC_PROP; if ( sStringValue == "superscript" ) nEscapement = DFLT_ESC_AUTO_SUPER; else if ( sStringValue == "subscript" ) @@ -2879,7 +2879,6 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32 else nEscapement = nIntValue > 0 ? DFLT_ESC_SUPER : DFLT_ESC_SUB; } - // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters) if ( nEscapement > MAX_ESC_POS ) nEscapement = MAX_ESC_POS; else if ( nEscapement < -MAX_ESC_POS ) diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx index f52c360d0865..76b4d95fd967 100644 --- a/xmloff/source/style/escphdl.cxx +++ b/xmloff/source/style/escphdl.cxx @@ -19,6 +19,7 @@ #include "escphdl.hxx" +#include <editeng/escapementitem.hxx> #include <sax/tools/converter.hxx> #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> @@ -28,12 +29,6 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; -// this is a copy of defines in include/editeng/escapementitem.hxx -#define DFLT_ESC_PROP 58 -#define MAX_ESC_POS 13999 -#define DFLT_ESC_AUTO_SUPER (MAX_ESC_POS+1) -#define DFLT_ESC_AUTO_SUB -DFLT_ESC_AUTO_SUPER - // class XMLEscapementPropHdl |