diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-29 17:43:42 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-31 04:31:13 +0000 |
commit | 3187193a6142b4b1c974ae1e1de572fa74a3c8ee (patch) | |
tree | 6d9350492186d06a38703821336ba79cb72a8583 /sc | |
parent | 0bc3af3c1f719f9758ac01ff0b526abea7af0490 (diff) |
tools: rename FontUnderline to FontLineStyle
Change-Id: I4750ad8569a1003b2f8c29052f3e25003ee433ca
Reviewed-on: https://gerrit.libreoffice.org/21892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'sc')
28 files changed, 186 insertions, 197 deletions
diff --git a/sc/inc/fonthelper.hxx b/sc/inc/fonthelper.hxx index c06930fd3cbc..36d589554e77 100644 --- a/sc/inc/fonthelper.hxx +++ b/sc/inc/fonthelper.hxx @@ -25,8 +25,8 @@ struct SC_DLLPUBLIC ScDxfFont boost::optional<sal_uInt32> nFontHeight; boost::optional<FontWeight> eWeight; boost::optional<FontItalic> eItalic; - boost::optional<FontUnderline> eUnder; - boost::optional<FontUnderline> eOver; + boost::optional<FontLineStyle> eUnder; + boost::optional<FontLineStyle> eOver; boost::optional<bool> bWordLine; boost::optional<FontStrikeout> eStrike; boost::optional<bool> bOutline; diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 46e71fc87269..1e348908399d 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -213,7 +213,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be striked out with a double line", STRIKEOUT_DOUBLE, aFont.GetStrikeout()); pPattern = pDoc->GetPattern(1,3,1); pPattern->GetFont(aFont, SC_AUTOCOL_RAW); - CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be underlined with a dotted line", UNDERLINE_DOTTED, aFont.GetUnderline()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be underlined with a dotted line", LINESTYLE_DOTTED, aFont.GetUnderline()); //check row height import //disable for now until we figure out cause of win tinderboxes test failures //CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(256), pDoc->GetRowHeight(0,1) ); //0.178in diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index e1f89b4c231f..aab6d3430357 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -546,14 +546,14 @@ void setAttribute( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sa break; case EE_CHAR_OVERLINE: { - SvxOverlineItem aItem(UNDERLINE_DOUBLE, nType); + SvxOverlineItem aItem(LINESTYLE_DOUBLE, nType); aItemSet.Put(aItem); rEE.QuickSetAttribs(aItemSet, aSel); } break; case EE_CHAR_UNDERLINE: { - SvxUnderlineItem aItem(UNDERLINE_DOUBLE, nType); + SvxUnderlineItem aItem(LINESTYLE_DOUBLE, nType); aItemSet.Put(aItem); rEE.QuickSetAttribs(aItemSet, aSel); } @@ -671,7 +671,7 @@ void ScExportTest::testRichTextExportODS() return false; } - static bool isOverline(const editeng::Section& rAttr, FontUnderline eStyle) + static bool isOverline(const editeng::Section& rAttr, FontLineStyle eStyle) { if (rAttr.maAttributes.empty()) return false; @@ -688,7 +688,7 @@ void ScExportTest::testRichTextExportODS() return false; } - static bool isUnderline(const editeng::Section& rAttr, FontUnderline eStyle) + static bool isUnderline(const editeng::Section& rAttr, FontLineStyle eStyle) { if (rAttr.maAttributes.empty()) return false; @@ -920,7 +920,7 @@ void ScExportTest::testRichTextExportODS() if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 0 || pAttr->mnEnd != 4) return false; - if (pAttr->maAttributes.size() != 1 || !isOverline(*pAttr, UNDERLINE_DOUBLE)) + if (pAttr->maAttributes.size() != 1 || !isOverline(*pAttr, LINESTYLE_DOUBLE)) return false; // Last section should have underline applied. @@ -928,7 +928,7 @@ void ScExportTest::testRichTextExportODS() if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 9 || pAttr->mnEnd != 14) return false; - if (pAttr->maAttributes.size() != 1 || !isUnderline(*pAttr, UNDERLINE_DOUBLE)) + if (pAttr->maAttributes.size() != 1 || !isUnderline(*pAttr, LINESTYLE_DOUBLE)) return false; return true; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 917dd25e05ff..91812b2f9dc0 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -2243,7 +2243,7 @@ void ScFiltersTest::testRichTextContentODS() if (it->pAttr->Which() == EE_CHAR_UNDERLINE) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>(*it->pAttr); - bHasUnderline = (rItem.GetLineStyle() == UNDERLINE_SINGLE); + bHasUnderline = (rItem.GetLineStyle() == LINESTYLE_SINGLE); if (bHasUnderline) break; } diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 8dccc32d59d4..be888001a8f8 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -228,8 +228,8 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool) ppPoolDefaults[ ATTR_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt; ppPoolDefaults[ ATTR_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_FONT_WEIGHT ); ppPoolDefaults[ ATTR_FONT_POSTURE - ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_FONT_POSTURE ); - ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( UNDERLINE_NONE, ATTR_FONT_UNDERLINE ); - ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( UNDERLINE_NONE, ATTR_FONT_OVERLINE ); + ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ); + ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( LINESTYLE_NONE, ATTR_FONT_OVERLINE ); ppPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ); ppPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR ); ppPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 01039b195d50..c5a886aa3406 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -258,8 +258,8 @@ void ScPatternAttr::GetFont( sal_uInt32 nFontHeight; FontWeight eWeight; FontItalic eItalic; - FontUnderline eUnder; - FontUnderline eOver; + FontLineStyle eUnder; + FontLineStyle eOver; bool bWordLine; FontStrikeout eStrike; bool bOutline; @@ -294,11 +294,11 @@ void ScPatternAttr::GetFont( if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE ); - eUnder = (FontUnderline)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); + eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_OVERLINE ); - eOver = (FontUnderline)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); + eOver = (FontLineStyle)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SfxItemState::SET ) pItem = &rItemSet.Get( ATTR_FONT_WORDLINE ); @@ -341,9 +341,9 @@ void ScPatternAttr::GetFont( rItemSet.Get( nWeightId )).GetValue(); eItalic = (FontItalic)static_cast<const SvxPostureItem&>( rItemSet.Get( nPostureId )).GetValue(); - eUnder = (FontUnderline)static_cast<const SvxUnderlineItem&>( + eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem&>( rItemSet.Get( ATTR_FONT_UNDERLINE )).GetValue(); - eOver = (FontUnderline)static_cast<const SvxOverlineItem&>( + eOver = (FontLineStyle)static_cast<const SvxOverlineItem&>( rItemSet.Get( ATTR_FONT_OVERLINE )).GetValue(); bWordLine = static_cast<const SvxWordLineModeItem&>( rItemSet.Get( ATTR_FONT_WORDLINE )).GetValue(); @@ -532,13 +532,13 @@ ScDxfFont ScPatternAttr::GetDxfFont(const SfxItemSet& rItemSet, SvtScriptType nS if ( rItemSet.GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) == SfxItemState::SET ) { pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE ); - aReturn.eUnder = (FontUnderline)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); + aReturn.eUnder = (FontLineStyle)static_cast<const SvxUnderlineItem*>(pItem)->GetValue(); } if ( rItemSet.GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) == SfxItemState::SET ) { pItem = &rItemSet.Get( ATTR_FONT_OVERLINE ); - aReturn.eOver = (FontUnderline)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); + aReturn.eOver = (FontLineStyle)static_cast<const SvxOverlineItem*>(pItem)->GetValue(); } if ( rItemSet.GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) == SfxItemState::SET ) @@ -602,8 +602,8 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r SvxFontItem aCtlFontItem(EE_CHAR_FONTINFO_CTL); long nTHeight, nCjkTHeight, nCtlTHeight; // Twips FontWeight eWeight, eCjkWeight, eCtlWeight; - SvxUnderlineItem aUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE); - SvxOverlineItem aOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE); + SvxUnderlineItem aUnderlineItem(LINESTYLE_NONE, EE_CHAR_UNDERLINE); + SvxOverlineItem aOverlineItem(LINESTYLE_NONE, EE_CHAR_OVERLINE); bool bWordLine; FontStrikeout eStrike; FontItalic eItalic, eCjkItalic, eCtlItalic; @@ -867,9 +867,9 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet& // SvxTextLineItem contains enum and color if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,true,&pItem) == SfxItemState::SET) - rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *static_cast<const SvxUnderlineItem*>(pItem) ); + rDestSet.Put( SvxUnderlineItem(LINESTYLE_NONE,ATTR_FONT_UNDERLINE) = *static_cast<const SvxUnderlineItem*>(pItem) ); if (rEditSet.GetItemState(EE_CHAR_OVERLINE,true,&pItem) == SfxItemState::SET) - rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *static_cast<const SvxOverlineItem*>(pItem) ); + rDestSet.Put( SvxOverlineItem(LINESTYLE_NONE,ATTR_FONT_OVERLINE) = *static_cast<const SvxOverlineItem*>(pItem) ); if (rEditSet.GetItemState(EE_CHAR_WLM,true,&pItem) == SfxItemState::SET) rDestSet.Put( SvxWordLineModeItem( static_cast<const SvxWordLineModeItem*>(pItem)->GetValue(), ATTR_FONT_WORDLINE) ); diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 2dd104819346..68638e9cb41f 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -280,7 +280,7 @@ void ScStyleSheetPool::CreateStandardStyles() pSet = &pSheet->GetItemSet(); pSet->Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) ); pSet->Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); - pSet->Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + pSet->Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); // 3. Result1 diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 9aae4556e251..0c52378aae0b 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -180,8 +180,8 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion) rStream.WriteUInt16( SvxFontHeightItem(240, 100, ATTR_FONT_HEIGHT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxWeightItem(WEIGHT_NORMAL, ATTR_FONT_WEIGHT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxPostureItem(ITALIC_NONE, ATTR_FONT_POSTURE).GetVersion(fileVersion) ); - rStream.WriteUInt16( SvxUnderlineItem(UNDERLINE_NONE, ATTR_FONT_UNDERLINE).GetVersion(fileVersion) ); - rStream.WriteUInt16( SvxOverlineItem(UNDERLINE_NONE, ATTR_FONT_OVERLINE).GetVersion(fileVersion) ); + rStream.WriteUInt16( SvxUnderlineItem(LINESTYLE_NONE, ATTR_FONT_UNDERLINE).GetVersion(fileVersion) ); + rStream.WriteUInt16( SvxOverlineItem(LINESTYLE_NONE, ATTR_FONT_OVERLINE).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxCrossedOutItem(STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxContourItem(false, ATTR_FONT_CONTOUR).GetVersion(fileVersion) ); rStream.WriteUInt16( SvxShadowedItem(false, ATTR_FONT_SHADOWED).GetVersion(fileVersion) ); @@ -221,8 +221,8 @@ ScAutoFormatDataField::ScAutoFormatDataField() : aCTLWeight( WEIGHT_NORMAL, ATTR_CTL_FONT_WEIGHT ), aCTLPosture( ITALIC_NONE, ATTR_CTL_FONT_POSTURE ), - aUnderline( UNDERLINE_NONE,ATTR_FONT_UNDERLINE ), - aOverline( UNDERLINE_NONE,ATTR_FONT_OVERLINE ), + aUnderline( LINESTYLE_NONE,ATTR_FONT_UNDERLINE ), + aOverline( LINESTYLE_NONE,ATTR_FONT_OVERLINE ), aCrossedOut( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ), aContour( false, ATTR_FONT_CONTOUR ), aShadowed( false, ATTR_FONT_SHADOWED ), diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 7e2d0477314b..3d85c2509f52 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -64,15 +64,15 @@ void LotusFontBuffer::Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet ) rItemSet.Put( aAttr ); } - FontUnderline eUnderline; + FontLineStyle eUnderline; switch( nIndex & 0x60 ) // Bit 5+6 { case 0x60: - case 0x20: eUnderline = UNDERLINE_SINGLE; break; - case 0x40: eUnderline = UNDERLINE_DOUBLE; break; - default: eUnderline = UNDERLINE_NONE; + case 0x20: eUnderline = LINESTYLE_SINGLE; break; + case 0x40: eUnderline = LINESTYLE_DOUBLE; break; + default: eUnderline = LINESTYLE_NONE; } - if( eUnderline != UNDERLINE_NONE ) + if( eUnderline != LINESTYLE_NONE ) { SvxUnderlineItem aUndItem( eUnderline, ATTR_FONT_UNDERLINE ); rItemSet.Put( aUndItem ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 18edb9072e2d..1961c7ded5f8 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -766,9 +766,9 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aNewData.mnUnderline = EXC_FONTUNDERL_NONE; switch( aFont.GetUnderline() ) { - case UNDERLINE_NONE: aNewData.mnUnderline = EXC_FONTUNDERL_NONE; break; - case UNDERLINE_SINGLE: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; break; - case UNDERLINE_DOUBLE: aNewData.mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case LINESTYLE_NONE: aNewData.mnUnderline = EXC_FONTUNDERL_NONE; break; + case LINESTYLE_SINGLE: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; break; + case LINESTYLE_DOUBLE: aNewData.mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: aNewData.mnUnderline = EXC_FONTUNDERL_SINGLE; } if( aFontData.mnUnderline != aNewData.mnUnderline ) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 90c351a10dc5..474ba6c80f6f 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -876,16 +876,16 @@ static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nEle FSEND ); } -static const char* lcl_GetUnderlineStyle( FontUnderline eUnderline, bool& bHaveUnderline ) +static const char* lcl_GetUnderlineStyle( FontLineStyle eUnderline, bool& bHaveUnderline ) { bHaveUnderline = true; switch( eUnderline ) { // OOXTODO: doubleAccounting, singleAccounting - // OOXTODO: what should be done with the other FontUnderline values? - case UNDERLINE_SINGLE: return "single"; - case UNDERLINE_DOUBLE: return "double"; - case UNDERLINE_NONE: + // OOXTODO: what should be done with the other FontLineStyle values? + case LINESTYLE_SINGLE: return "single"; + case LINESTYLE_DOUBLE: return "double"; + case LINESTYLE_NONE: default: bHaveUnderline = false; return "none"; } } diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 50ff07893407..758c0124b2fe 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1024,15 +1024,15 @@ XclExpDxfFont::XclExpDxfFont(const XclExpRoot& rRoot, namespace { -const char* getUnderlineOOXValue(FontUnderline eUnderline) +const char* getUnderlineOOXValue(FontLineStyle eUnderline) { switch (eUnderline) { - case UNDERLINE_NONE: - case UNDERLINE_DONTKNOW: + case LINESTYLE_NONE: + case LINESTYLE_DONTKNOW: return "none"; - case UNDERLINE_DOUBLE: - case UNDERLINE_DOUBLEWAVE: + case LINESTYLE_DOUBLE: + case LINESTYLE_DOUBLEWAVE: return "double"; default: return "single"; diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 776eac550bf1..ebabba382ed0 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -163,7 +163,7 @@ ColorData XclDefaultPalette::GetDefColorData( sal_uInt16 nXclIndex ) const namespace Awt = ::com::sun::star::awt; namespace AwtFontFamily = Awt::FontFamily; -namespace AwtFontUnderline = Awt::FontUnderline; +namespace AwtFontLineStyle = Awt::FontUnderline; namespace AwtFontStrikeout = Awt::FontStrikeout; XclFontData::XclFontData() @@ -271,15 +271,15 @@ FontWeight XclFontData::GetScWeight() const return eScWeight; } -FontUnderline XclFontData::GetScUnderline() const +FontLineStyle XclFontData::GetScUnderline() const { - FontUnderline eScUnderl = UNDERLINE_NONE; + FontLineStyle eScUnderl = LINESTYLE_NONE; switch( mnUnderline ) { case EXC_FONTUNDERL_SINGLE: - case EXC_FONTUNDERL_SINGLE_ACC: eScUnderl = UNDERLINE_SINGLE; break; + case EXC_FONTUNDERL_SINGLE_ACC: eScUnderl = LINESTYLE_SINGLE; break; case EXC_FONTUNDERL_DOUBLE: - case EXC_FONTUNDERL_DOUBLE_ACC: eScUnderl = UNDERLINE_DOUBLE; break; + case EXC_FONTUNDERL_DOUBLE_ACC: eScUnderl = LINESTYLE_DOUBLE; break; } return eScUnderl; } @@ -352,14 +352,14 @@ void XclFontData::SetScWeight( FontWeight eScWeight ) } } -void XclFontData::SetScUnderline( FontUnderline eScUnderl ) +void XclFontData::SetScUnderline( FontLineStyle eScUnderl ) { switch( eScUnderl ) { - case UNDERLINE_NONE: - case UNDERLINE_DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; - case UNDERLINE_DOUBLE: - case UNDERLINE_DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case LINESTYLE_NONE: + case LINESTYLE_DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; + case LINESTYLE_DOUBLE: + case LINESTYLE_DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: mnUnderline = EXC_FONTUNDERL_SINGLE; } } @@ -422,13 +422,13 @@ float XclFontData::GetApiWeight() const sal_Int16 XclFontData::GetApiUnderline() const { - sal_Int16 nApiUnderl = AwtFontUnderline::NONE; + sal_Int16 nApiUnderl = AwtFontLineStyle::NONE; switch( mnUnderline ) { case EXC_FONTUNDERL_SINGLE: - case EXC_FONTUNDERL_SINGLE_ACC: nApiUnderl = AwtFontUnderline::SINGLE; break; + case EXC_FONTUNDERL_SINGLE_ACC: nApiUnderl = AwtFontLineStyle::SINGLE; break; case EXC_FONTUNDERL_DOUBLE: - case EXC_FONTUNDERL_DOUBLE_ACC: nApiUnderl = AwtFontUnderline::DOUBLE; break; + case EXC_FONTUNDERL_DOUBLE_ACC: nApiUnderl = AwtFontLineStyle::DOUBLE; break; } return nApiUnderl; } @@ -486,10 +486,10 @@ void XclFontData::SetApiUnderline( sal_Int16 nApiUnderl ) { switch( nApiUnderl ) { - case AwtFontUnderline::NONE: - case AwtFontUnderline::DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; - case AwtFontUnderline::DOUBLE: - case AwtFontUnderline::DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; + case AwtFontLineStyle::NONE: + case AwtFontLineStyle::DONTKNOW: mnUnderline = EXC_FONTUNDERL_NONE; break; + case AwtFontLineStyle::DOUBLE: + case AwtFontLineStyle::DOUBLEWAVE: mnUnderline = EXC_FONTUNDERL_DOUBLE; break; default: mnUnderline = EXC_FONTUNDERL_SINGLE; } } @@ -568,7 +568,7 @@ const sal_Char *const *const sppcPropNamesChCmplxNoName = sppcPropNamesChCmplx + const sal_Char *const sppcPropNamesControl[] = { "FontName", "FontFamily", "FontCharset", "FontHeight", "FontSlant", - "FontWeight", "FontUnderline", "FontStrikeout", "TextColor", nullptr + "FontWeight", "FontLineStyle", "FontStrikeout", "TextColor", nullptr }; /** Inserts all passed API font settings into the font data object. */ diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index d6f22629391f..47f81fba6bcf 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1016,7 +1016,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); - bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); + bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() ); bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); sal_uInt16 nSetFontSizeNumber = 0; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 8e4867690173..c1e124de6cf4 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1692,7 +1692,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) case HTML_UNDERLINE_ON : { if ( IsAtBeginningOfText( pInfo ) ) - pActEntry->aItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, + pActEntry->aItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); } break; @@ -2971,7 +2971,7 @@ void ScHTMLQueryParser::ProcessToken( const ImportInfo& rInfo ) break; case HTML_UNDERLINE_ON: // <u> - mpCurrTable->PutItem( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + mpCurrTable->PutItem( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); break; } } diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index 233e32015a37..1f34a720d76c 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -257,7 +257,7 @@ private: OUString maName; double mnSize; Color maColor; - FontUnderline meUnderline; + FontLineStyle meUnderline; font(); diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 73e332837b98..187b0356a598 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -329,7 +329,7 @@ struct XclFontData /** Returns the Calc font weight. */ FontWeight GetScWeight() const; /** Returns the Calc font underline style. */ - FontUnderline GetScUnderline() const; + FontLineStyle GetScUnderline() const; /** Returns the Calc escapement style. */ SvxEscapement GetScEscapement() const; /** Returns the Calc strike-out style. */ @@ -346,7 +346,7 @@ struct XclFontData /** Sets the Calc font weight. */ void SetScWeight( FontWeight eScWeight ); /** Sets the Calc underline style. */ - void SetScUnderline( FontUnderline eScUnderl ); + void SetScUnderline( FontLineStyle eScUnderl ); /** Sets the Calc escapement style. */ void SetScEscapement( short nScEscapem ); /** Sets the Calc strike-out style. */ diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 4cd5df25f558..56895530b5c4 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -541,7 +541,7 @@ void OP_CreatePattern123(LotusContext& rContext, SvStream& r, sal_uInt16 n) if ( bIsItalics ) rItemSet.Put( SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if ( bIsUnderLine ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); r.SeekRel(3); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index ce909ad4367e..ffc7898f3f16 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -769,20 +769,18 @@ void Font::importDxfFlag( sal_Int32 nElement, SequenceInputStream& rStrm ) void Font::finalizeImport() { - namespace cssawt = ::com::sun::star::awt; - // font name maApiData.maDesc.Name = maModel.maName; // font family switch( maModel.mnFamily ) { - case OOX_FONTFAMILY_NONE: maApiData.maDesc.Family = cssawt::FontFamily::DONTKNOW; break; - case OOX_FONTFAMILY_ROMAN: maApiData.maDesc.Family = cssawt::FontFamily::ROMAN; break; - case OOX_FONTFAMILY_SWISS: maApiData.maDesc.Family = cssawt::FontFamily::SWISS; break; - case OOX_FONTFAMILY_MODERN: maApiData.maDesc.Family = cssawt::FontFamily::MODERN; break; - case OOX_FONTFAMILY_SCRIPT: maApiData.maDesc.Family = cssawt::FontFamily::SCRIPT; break; - case OOX_FONTFAMILY_DECORATIVE: maApiData.maDesc.Family = cssawt::FontFamily::DECORATIVE; break; + case OOX_FONTFAMILY_NONE: maApiData.maDesc.Family = css::awt::FontFamily::DONTKNOW; break; + case OOX_FONTFAMILY_ROMAN: maApiData.maDesc.Family = css::awt::FontFamily::ROMAN; break; + case OOX_FONTFAMILY_SWISS: maApiData.maDesc.Family = css::awt::FontFamily::SWISS; break; + case OOX_FONTFAMILY_MODERN: maApiData.maDesc.Family = css::awt::FontFamily::MODERN; break; + case OOX_FONTFAMILY_SCRIPT: maApiData.maDesc.Family = css::awt::FontFamily::SCRIPT; break; + case OOX_FONTFAMILY_DECORATIVE: maApiData.maDesc.Family = css::awt::FontFamily::DECORATIVE; break; } // character set (API font descriptor uses rtl_TextEncoding in member CharSet!) @@ -793,20 +791,20 @@ void Font::finalizeImport() // color, height, weight, slant, strikeout, outline, shadow maApiData.mnColor = maModel.maColor.getColor( getBaseFilter().getGraphicHelper() ); maApiData.maDesc.Height = static_cast< sal_Int16 >( maModel.mfHeight * 20.0 ); - maApiData.maDesc.Weight = maModel.mbBold ? cssawt::FontWeight::BOLD : cssawt::FontWeight::NORMAL; - maApiData.maDesc.Slant = maModel.mbItalic ? cssawt::FontSlant_ITALIC : cssawt::FontSlant_NONE; - maApiData.maDesc.Strikeout = maModel.mbStrikeout ? cssawt::FontStrikeout::SINGLE : cssawt::FontStrikeout::NONE; + maApiData.maDesc.Weight = maModel.mbBold ? css::awt::FontWeight::BOLD : css::awt::FontWeight::NORMAL; + maApiData.maDesc.Slant = maModel.mbItalic ? css::awt::FontSlant_ITALIC : css::awt::FontSlant_NONE; + maApiData.maDesc.Strikeout = maModel.mbStrikeout ? css::awt::FontStrikeout::SINGLE : css::awt::FontStrikeout::NONE; maApiData.mbOutline = maModel.mbOutline; maApiData.mbShadow = maModel.mbShadow; // underline switch( maModel.mnUnderline ) { - case XML_double: maApiData.maDesc.Underline = cssawt::FontUnderline::DOUBLE; break; - case XML_doubleAccounting: maApiData.maDesc.Underline = cssawt::FontUnderline::DOUBLE; break; - case XML_none: maApiData.maDesc.Underline = cssawt::FontUnderline::NONE; break; - case XML_single: maApiData.maDesc.Underline = cssawt::FontUnderline::SINGLE; break; - case XML_singleAccounting: maApiData.maDesc.Underline = cssawt::FontUnderline::SINGLE; break; + case XML_double: maApiData.maDesc.Underline = css::awt::FontUnderline::DOUBLE; break; + case XML_doubleAccounting: maApiData.maDesc.Underline = css::awt::FontUnderline::DOUBLE; break; + case XML_none: maApiData.maDesc.Underline = css::awt::FontUnderline::NONE; break; + case XML_single: maApiData.maDesc.Underline = css::awt::FontUnderline::SINGLE; break; + case XML_singleAccounting: maApiData.maDesc.Underline = css::awt::FontUnderline::SINGLE; break; } // escapement @@ -878,29 +876,28 @@ bool Font::needsRichTextFormat() const { return maApiData.mnEscapement != API_ESCAPE_NONE; } + ::FontFamily lcl_getFontFamily( sal_Int32 nFamily ) { - namespace cssawt = ::com::sun::star::awt; - ::FontFamily eScFamily = FAMILY_DONTKNOW; switch( nFamily ) { - case cssawt::FontFamily::DONTKNOW: + case css::awt::FontFamily::DONTKNOW: eScFamily = FAMILY_DONTKNOW; break; - case cssawt::FontFamily::ROMAN: + case css::awt::FontFamily::ROMAN: eScFamily = FAMILY_ROMAN; break; - case cssawt::FontFamily::SWISS: + case css::awt::FontFamily::SWISS: eScFamily = FAMILY_SWISS; break; - case cssawt::FontFamily::MODERN: + case css::awt::FontFamily::MODERN: eScFamily = FAMILY_MODERN; break; - case cssawt::FontFamily::SCRIPT: + case css::awt::FontFamily::SCRIPT: eScFamily = FAMILY_SCRIPT; break; - case cssawt::FontFamily::DECORATIVE: + case css::awt::FontFamily::DECORATIVE: eScFamily = FAMILY_DECORATIVE; break; } @@ -909,7 +906,6 @@ bool Font::needsRichTextFormat() const void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkipPoolDefs ) const { - namespace cssawt = ::com::sun::star::awt; if ( maUsedFlags.mbNameUsed ) { if( !maApiData.maLatinFont.maName.isEmpty() ) @@ -968,7 +964,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip // font posture if( maUsedFlags.mbPostureUsed ) { - SvxPostureItem aPostItem( ( maApiData.maDesc.Slant == cssawt::FontSlant_ITALIC ) ? ITALIC_NORMAL : ITALIC_NONE, ATTR_FONT_POSTURE); + SvxPostureItem aPostItem( ( maApiData.maDesc.Slant == css::awt::FontSlant_ITALIC ) ? ITALIC_NORMAL : ITALIC_NONE, ATTR_FONT_POSTURE); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC : ATTR_FONT_POSTURE, bSkipPoolDefs ); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CJK : ATTR_CJK_FONT_POSTURE, bSkipPoolDefs ); ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CTL : ATTR_CTL_FONT_POSTURE, bSkipPoolDefs ); @@ -981,13 +977,13 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip // underline style if( maUsedFlags.mbUnderlineUsed ) { - ::FontUnderline eScUnderl; - if ( maApiData.maDesc.Underline == cssawt::FontUnderline::DOUBLE ) - eScUnderl = UNDERLINE_DOUBLE; - else if ( maApiData.maDesc.Underline == cssawt::FontUnderline::SINGLE ) - eScUnderl = UNDERLINE_SINGLE; + FontLineStyle eScUnderl; + if ( maApiData.maDesc.Underline == css::awt::FontUnderline::DOUBLE ) + eScUnderl = LINESTYLE_DOUBLE; + else if ( maApiData.maDesc.Underline == css::awt::FontUnderline::SINGLE ) + eScUnderl = LINESTYLE_SINGLE; else - eScUnderl = UNDERLINE_NONE; + eScUnderl = LINESTYLE_NONE; SvxUnderlineItem aUnderlItem( eScUnderl, ATTR_FONT_UNDERLINE ); ScfTools::PutItem( rItemSet, aUnderlItem, bEditEngineText ? EE_CHAR_UNDERLINE : ATTR_FONT_UNDERLINE, bSkipPoolDefs ); } @@ -1188,37 +1184,34 @@ void Alignment::setBiff12Data( sal_uInt32 nFlags ) void Alignment::finalizeImport() { - namespace csstab = ::com::sun::star::table; - namespace csstxt = ::com::sun::star::text; - // horizontal alignment switch( maModel.mnHorAlign ) { - case XML_center: maApiData.meHorJustify = csstab::CellHoriJustify_CENTER; break; - case XML_centerContinuous: maApiData.meHorJustify = csstab::CellHoriJustify_CENTER; break; - case XML_distributed: maApiData.meHorJustify = csstab::CellHoriJustify_BLOCK; break; - case XML_fill: maApiData.meHorJustify = csstab::CellHoriJustify_REPEAT; break; - case XML_general: maApiData.meHorJustify = csstab::CellHoriJustify_STANDARD; break; - case XML_justify: maApiData.meHorJustify = csstab::CellHoriJustify_BLOCK; break; - case XML_left: maApiData.meHorJustify = csstab::CellHoriJustify_LEFT; break; - case XML_right: maApiData.meHorJustify = csstab::CellHoriJustify_RIGHT; break; + case XML_center: maApiData.meHorJustify = css::table::CellHoriJustify_CENTER; break; + case XML_centerContinuous: maApiData.meHorJustify = css::table::CellHoriJustify_CENTER; break; + case XML_distributed: maApiData.meHorJustify = css::table::CellHoriJustify_BLOCK; break; + case XML_fill: maApiData.meHorJustify = css::table::CellHoriJustify_REPEAT; break; + case XML_general: maApiData.meHorJustify = css::table::CellHoriJustify_STANDARD; break; + case XML_justify: maApiData.meHorJustify = css::table::CellHoriJustify_BLOCK; break; + case XML_left: maApiData.meHorJustify = css::table::CellHoriJustify_LEFT; break; + case XML_right: maApiData.meHorJustify = css::table::CellHoriJustify_RIGHT; break; } if (maModel.mnHorAlign == XML_distributed) - maApiData.mnHorJustifyMethod = csstab::CellJustifyMethod::DISTRIBUTE; + maApiData.mnHorJustifyMethod = css::table::CellJustifyMethod::DISTRIBUTE; // vertical alignment switch( maModel.mnVerAlign ) { - case XML_bottom: maApiData.mnVerJustify = csstab::CellVertJustify2::BOTTOM; break; - case XML_center: maApiData.mnVerJustify = csstab::CellVertJustify2::CENTER; break; - case XML_distributed: maApiData.mnVerJustify = csstab::CellVertJustify2::BLOCK; break; - case XML_justify: maApiData.mnVerJustify = csstab::CellVertJustify2::BLOCK; break; - case XML_top: maApiData.mnVerJustify = csstab::CellVertJustify2::TOP; break; + case XML_bottom: maApiData.mnVerJustify = css::table::CellVertJustify2::BOTTOM; break; + case XML_center: maApiData.mnVerJustify = css::table::CellVertJustify2::CENTER; break; + case XML_distributed: maApiData.mnVerJustify = css::table::CellVertJustify2::BLOCK; break; + case XML_justify: maApiData.mnVerJustify = css::table::CellVertJustify2::BLOCK; break; + case XML_top: maApiData.mnVerJustify = css::table::CellVertJustify2::TOP; break; } if (maModel.mnVerAlign == XML_distributed) - maApiData.mnVerJustifyMethod = csstab::CellJustifyMethod::DISTRIBUTE; + maApiData.mnVerJustifyMethod = css::table::CellJustifyMethod::DISTRIBUTE; /* indentation: expressed as number of blocks of 3 space characters in OOXML/BIFF12, and as multiple of 10 points in BIFF8. */ @@ -1235,9 +1228,9 @@ void Alignment::finalizeImport() // complex text direction switch( maModel.mnTextDir ) { - case OOX_XF_TEXTDIR_CONTEXT: maApiData.mnWritingMode = csstxt::WritingMode2::PAGE; break; - case OOX_XF_TEXTDIR_LTR: maApiData.mnWritingMode = csstxt::WritingMode2::LR_TB; break; - case OOX_XF_TEXTDIR_RTL: maApiData.mnWritingMode = csstxt::WritingMode2::RL_TB; break; + case OOX_XF_TEXTDIR_CONTEXT: maApiData.mnWritingMode = css::text::WritingMode2::PAGE; break; + case OOX_XF_TEXTDIR_LTR: maApiData.mnWritingMode = css::text::WritingMode2::LR_TB; break; + case OOX_XF_TEXTDIR_RTL: maApiData.mnWritingMode = css::text::WritingMode2::RL_TB; break; } // rotation: 0-90 means 0 to 90 degrees ccw, 91-180 means 1 to 90 degrees cw, 255 means stacked @@ -1248,7 +1241,7 @@ void Alignment::finalizeImport() // "Orientation" property used for character stacking maApiData.meOrientation = (nOoxRot == OOX_XF_ROTATION_STACKED) ? - csstab::CellOrientation_STACKED : csstab::CellOrientation_STANDARD; + css::table::CellOrientation_STACKED : css::table::CellOrientation_STANDARD; // alignment flags (#i84960 automatic line break, if vertically justified/distributed) maApiData.mbWrapText = maModel.mbWrapText || (maModel.mnVerAlign == XML_distributed) || (maModel.mnVerAlign == XML_justify); @@ -1258,23 +1251,22 @@ void Alignment::finalizeImport() ::SvxCellVerJustify Alignment::GetScVerAlign() const { - namespace csstab = ::com::sun::star::table; ::SvxCellVerJustify nVert = ::SVX_VER_JUSTIFY_STANDARD; switch ( maApiData.mnVerJustify ) { - case csstab::CellVertJustify2::BOTTOM: + case css::table::CellVertJustify2::BOTTOM: nVert = ::SVX_VER_JUSTIFY_BOTTOM; break; - case csstab::CellVertJustify2::CENTER: + case css::table::CellVertJustify2::CENTER: nVert = ::SVX_VER_JUSTIFY_CENTER; break; - case csstab::CellVertJustify2::TOP: + case css::table::CellVertJustify2::TOP: nVert = ::SVX_VER_JUSTIFY_TOP; break; - case csstab::CellVertJustify2::BLOCK: + case css::table::CellVertJustify2::BLOCK: nVert = ::SVX_VER_JUSTIFY_BLOCK; break; - case csstab::CellVertJustify2::STANDARD: + case css::table::CellVertJustify2::STANDARD: default: nVert = ::SVX_VER_JUSTIFY_STANDARD; break; @@ -1284,26 +1276,25 @@ void Alignment::finalizeImport() ::SvxCellHorJustify Alignment::GetScHorAlign() const { - namespace csstab = ::com::sun::star::table; ::SvxCellHorJustify nHori = ::SVX_HOR_JUSTIFY_STANDARD; switch( maApiData.meHorJustify ) { - case csstab::CellHoriJustify_LEFT: + case css::table::CellHoriJustify_LEFT: nHori = ::SVX_HOR_JUSTIFY_LEFT; break; - case csstab::CellHoriJustify_CENTER: + case css::table::CellHoriJustify_CENTER: nHori = ::SVX_HOR_JUSTIFY_CENTER; break; - case csstab::CellHoriJustify_RIGHT: + case css::table::CellHoriJustify_RIGHT: nHori = ::SVX_HOR_JUSTIFY_RIGHT; break; - case csstab::CellHoriJustify_BLOCK: + case css::table::CellHoriJustify_BLOCK: nHori = ::SVX_HOR_JUSTIFY_BLOCK; break; - case csstab::CellHoriJustify_REPEAT: + case css::table::CellHoriJustify_REPEAT: nHori = ::SVX_HOR_JUSTIFY_REPEAT; break; - case csstab::CellHoriJustify_STANDARD: + case css::table::CellHoriJustify_STANDARD: default: nHori = ::SVX_HOR_JUSTIFY_STANDARD; break; @@ -1313,17 +1304,16 @@ void Alignment::finalizeImport() ::SvxFrameDirection Alignment::GetScFrameDir() const { - namespace csstxt = css::text; ::SvxFrameDirection eFrameDir = ::FRMDIR_ENVIRONMENT; switch( maApiData.mnWritingMode ) { - case csstxt::WritingMode2::PAGE: + case css::text::WritingMode2::PAGE: eFrameDir = ::FRMDIR_ENVIRONMENT; break; - case csstxt::WritingMode2::LR_TB: + case css::text::WritingMode2::LR_TB: eFrameDir = ::FRMDIR_HORI_LEFT_TOP; break; - case csstxt::WritingMode2::RL_TB: + case css::text::WritingMode2::RL_TB: eFrameDir = ::FRMDIR_HORI_RIGHT_TOP; break; default: @@ -1334,20 +1324,19 @@ void Alignment::finalizeImport() void Alignment::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const { - namespace csstab = ::com::sun::star::table; // horizontal alignment ScfTools::PutItem( rItemSet, SvxHorJustifyItem( GetScHorAlign(), ATTR_HOR_JUSTIFY ), bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnHorJustifyMethod == csstab::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_HOR_JUSTIFY_METHOD ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnHorJustifyMethod == css::table::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_HOR_JUSTIFY_METHOD ), bSkipPoolDefs ); ScfTools::PutItem( rItemSet, SvxVerJustifyItem( GetScVerAlign(), ATTR_VER_JUSTIFY ), bSkipPoolDefs ); // vertical alignment - ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnVerJustifyMethod == csstab::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_VER_JUSTIFY_METHOD ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxJustifyMethodItem( ( maApiData.mnVerJustifyMethod == css::table::CellJustifyMethod::DISTRIBUTE ) ? ::SVX_JUSTIFY_METHOD_DISTRIBUTE : ::SVX_JUSTIFY_METHOD_AUTO, ATTR_VER_JUSTIFY_METHOD ), bSkipPoolDefs ); // CTL text direction ScfTools::PutItem( rItemSet, SvxFrameDirectionItem( GetScFrameDir(), ATTR_WRITINGDIR ), bSkipPoolDefs ); // set an angle in the range from -90 to 90 degrees ScfTools::PutItem( rItemSet, SfxInt32Item( ATTR_ROTATE_VALUE, maApiData.mnRotation ), bSkipPoolDefs ); // Orientation - ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, maApiData.meOrientation == csstab::CellOrientation_STACKED ), bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, maApiData.meOrientation == css::table::CellOrientation_STACKED ), bSkipPoolDefs ); // indent ScfTools::PutItem( rItemSet, SfxUInt16Item( ATTR_INDENT, maApiData.mnIndent ), bSkipPoolDefs ); // line wrap diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index cc24444865f0..dbe1f5abf269 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -739,7 +739,7 @@ ScOrcusStyles::font::font(): mbBold(false), mbItalic(false), mnSize(10), - meUnderline(UNDERLINE_NONE) + meUnderline(LINESTYLE_NONE) { } @@ -949,14 +949,14 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e) { case orcus::spreadsheet::underline_single: case orcus::spreadsheet::underline_single_accounting: - maCurrentFont.meUnderline = UNDERLINE_SINGLE; + maCurrentFont.meUnderline = LINESTYLE_SINGLE; break; case orcus::spreadsheet::underline_double: case orcus::spreadsheet::underline_double_accounting: - maCurrentFont.meUnderline = UNDERLINE_DOUBLE; + maCurrentFont.meUnderline = LINESTYLE_DOUBLE; break; case orcus::spreadsheet::underline_none: - maCurrentFont.meUnderline = UNDERLINE_NONE; + maCurrentFont.meUnderline = LINESTYLE_NONE; break; } } diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 64ad41012a98..9b88d71b00bc 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -142,7 +142,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, if( bIsItalic ) rItemSet.Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if( bIsUnderLine ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); if (maFontHeight[ maFont [ nStyle ] ]) rItemSet.Put( SvxFontHeightItem( (sal_uLong) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) ); diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index b6ed3a4480ff..4c16276380e8 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -224,7 +224,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I ); } - if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) + if ( rUnderlineItem.GetLineStyle() != LINESTYLE_NONE ) { // underline bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index edf6bf72ca74..e6439c06d313 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -729,7 +729,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) if (pHeadFootLine->LogFont.lfItalic != 0) aEditAttribs.Put(SvxPostureItem(ITALIC_NORMAL, EE_CHAR_ITALIC), EE_CHAR_ITALIC); if (pHeadFootLine->LogFont.lfUnderline != 0) - aEditAttribs.Put(SvxUnderlineItem(UNDERLINE_SINGLE, EE_CHAR_UNDERLINE), EE_CHAR_UNDERLINE); + aEditAttribs.Put(SvxUnderlineItem(LINESTYLE_SINGLE, EE_CHAR_UNDERLINE), EE_CHAR_UNDERLINE); if (pHeadFootLine->LogFont.lfStrikeOut != 0) aEditAttribs.Put(SvxCrossedOutItem(STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT), EE_CHAR_STRIKEOUT); OUString aText( pHeadFootLine->Title, strlen(pHeadFootLine->Title), DEFCHARSET ); @@ -1147,7 +1147,7 @@ void Sc10Import::LoadPatternCollection() if( pPattern->LogFont.lfItalic != 0 ) rItemSet.Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) ); if( pPattern->LogFont.lfUnderline != 0 ) - rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); + rItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE ) ); if( pPattern->LogFont.lfStrikeOut != 0 ) rItemSet.Put( SvxCrossedOutItem( STRIKEOUT_SINGLE, ATTR_FONT_CROSSEDOUT ) ); } @@ -1776,7 +1776,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) if ((nValue1 & atItalic) == atItalic) aScPattern.GetItemSet().Put(SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE)); if ((nValue1 & atUnderline) == atUnderline) - aScPattern.GetItemSet().Put(SvxUnderlineItem(UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE)); + aScPattern.GetItemSet().Put(SvxUnderlineItem(LINESTYLE_SINGLE, ATTR_FONT_UNDERLINE)); if ((nValue1 & atStrikeOut) == atStrikeOut) aScPattern.GetItemSet().Put(SvxCrossedOutItem(STRIKEOUT_SINGLE, ATTR_FONT_CROSSEDOUT)); pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 1af0794e956d..d64d2045ceaf 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -482,7 +482,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons case EE_CHAR_UNDERLINE: { if (!pPoolItem) - pPoolItem.reset(new SvxUnderlineItem(UNDERLINE_NONE, pEntry->mnItemID)); + pPoolItem.reset(new SvxUnderlineItem(LINESTYLE_NONE, pEntry->mnItemID)); pPoolItem->PutValue(it->maValue, pEntry->mnFlag); } @@ -490,7 +490,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons case EE_CHAR_OVERLINE: { if (!pPoolItem) - pPoolItem.reset(new SvxOverlineItem(UNDERLINE_NONE, pEntry->mnItemID)); + pPoolItem.reset(new SvxOverlineItem(LINESTYLE_NONE, pEntry->mnItemID)); pPoolItem->PutValue(it->maValue, pEntry->mnFlag); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 520e2f29bc79..ee4d1ec01480 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -554,22 +554,22 @@ void ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq ) pView->GetAttributes(aViewAttr); // Unterstreichung - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( aViewAttr. + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( aViewAttr. Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ULINE_VAL_NONE: - eNew = UNDERLINE_NONE; + eNew = LINESTYLE_NONE; break; case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; default: break; @@ -1114,14 +1114,14 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 647c2d5023ad..302a48cc184d 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -145,8 +145,8 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font #define SETONALLFONTS( MethodName, Value ) \ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value ); - SETONALLFONTS( SetUnderline, (FontUnderline)pUnderlineItem->GetValue() ) - SETONALLFONTS( SetOverline, (FontUnderline)pOverlineItem->GetValue() ) + SETONALLFONTS( SetUnderline, (FontLineStyle)pUnderlineItem->GetValue() ) + SETONALLFONTS( SetOverline, (FontLineStyle)pOverlineItem->GetValue() ) SETONALLFONTS( SetStrikeout, (FontStrikeout)pCrossedOutItem->GetValue() ) SETONALLFONTS( SetOutline, pContourItem->GetValue() ) SETONALLFONTS( SetShadow, pShadowedItem->GetValue() ) diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 311b283e13ee..eb8082f101a0 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -956,7 +956,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) break; case SID_ULINE_VAL_NONE: - aSet.Put( SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); + aSet.Put( SvxUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ) ); lcl_InvalidateUnder( rBindings ); break; @@ -965,9 +965,9 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ULINE_VAL_DOUBLE: case SID_ULINE_VAL_DOTTED: { - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( pEditView-> + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( pEditView-> GetAttribs().Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ATTR_CHAR_UNDERLINE: @@ -978,17 +978,17 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) } else { - eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld != LINESTYLE_NONE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; } break; case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; } aSet.Put( SvxUnderlineItem( eNew, EE_CHAR_UNDERLINE ) ); @@ -998,9 +998,9 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_OVERLINE: { - FontUnderline eOld = static_cast<const SvxOverlineItem&>( pEditView-> + FontLineStyle eOld = static_cast<const SvxOverlineItem&>( pEditView-> GetAttribs().Get(EE_CHAR_OVERLINE)).GetLineStyle(); - FontUnderline eNew = ( eOld != UNDERLINE_NONE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + FontLineStyle eNew = ( eOld != LINESTYLE_NONE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; aSet.Put( SvxOverlineItem( eNew, EE_CHAR_OVERLINE ) ); rBindings.Invalidate( nSlot ); } @@ -1139,14 +1139,14 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( aAttribs.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index abd34e4ac04f..fffe810fb340 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1410,7 +1410,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eUnderline; + FontLineStyle eUnderline; if( pSet ) { @@ -1436,9 +1436,9 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SvxUnderlineItem aUnderline( static_cast<const SvxUnderlineItem&>( pAttrs->GetItem( ATTR_FONT_UNDERLINE ) ) ); - eUnderline = (UNDERLINE_NONE != aUnderline.GetLineStyle()) - ? UNDERLINE_NONE - : UNDERLINE_SINGLE; + eUnderline = (LINESTYLE_NONE != aUnderline.GetLineStyle()) + ? LINESTYLE_NONE + : LINESTYLE_SINGLE; aUnderline.SetLineStyle( eUnderline ); pTabViewShell->ApplyAttr( aUnderline ); pNewSet->Put( aUnderline,aUnderline.Which() ); @@ -1447,25 +1447,25 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) break; case SID_ULINE_VAL_NONE: - pTabViewShell->ApplyAttr( SvxUnderlineItem( UNDERLINE_NONE, ATTR_FONT_UNDERLINE ) ); + pTabViewShell->ApplyAttr( SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ) ); break; case SID_ULINE_VAL_SINGLE: // Toggles case SID_ULINE_VAL_DOUBLE: case SID_ULINE_VAL_DOTTED: { - FontUnderline eOld = static_cast<const SvxUnderlineItem&>( + FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( pAttrs->GetItem(ATTR_FONT_UNDERLINE)).GetLineStyle(); - FontUnderline eNew = eOld; + FontLineStyle eNew = eOld; switch (nSlot) { case SID_ULINE_VAL_SINGLE: - eNew = ( eOld == UNDERLINE_SINGLE ) ? UNDERLINE_NONE : UNDERLINE_SINGLE; + eNew = ( eOld == LINESTYLE_SINGLE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE; break; case SID_ULINE_VAL_DOUBLE: - eNew = ( eOld == UNDERLINE_DOUBLE ) ? UNDERLINE_NONE : UNDERLINE_DOUBLE; + eNew = ( eOld == LINESTYLE_DOUBLE ) ? LINESTYLE_NONE : LINESTYLE_DOUBLE; break; case SID_ULINE_VAL_DOTTED: - eNew = ( eOld == UNDERLINE_DOTTED ) ? UNDERLINE_NONE : UNDERLINE_DOTTED; + eNew = ( eOld == LINESTYLE_DOTTED ) ? LINESTYLE_NONE : LINESTYLE_DOTTED; break; } pTabViewShell->ApplyAttr( SvxUnderlineItem( eNew, ATTR_FONT_UNDERLINE ) ); @@ -2182,14 +2182,14 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else { - FontUnderline eUnderline = static_cast<const SvxUnderlineItem&>( + FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( rAttrSet.Get(ATTR_FONT_UNDERLINE)).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { - case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; - case UNDERLINE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; - case UNDERLINE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; + case LINESTYLE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; + case LINESTYLE_DOUBLE: nId = SID_ULINE_VAL_DOUBLE; break; + case LINESTYLE_DOTTED: nId = SID_ULINE_VAL_DOTTED; break; default: break; } |