diff options
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cfgitem.cxx | 10 | ||||
-rw-r--r-- | starmath/source/cfgitem.hxx | 6 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 28 | ||||
-rw-r--r-- | starmath/source/document.cxx | 2 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 4 | ||||
-rw-r--r-- | starmath/source/tmpdevice.cxx | 2 | ||||
-rw-r--r-- | starmath/source/tmpdevice.hxx | 2 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 8 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 26 | ||||
-rw-r--r-- | starmath/source/view.cxx | 4 |
11 files changed, 47 insertions, 47 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 028daa6f9e49..a94e40cb52ef 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -223,7 +223,7 @@ SmFontFormat::SmFontFormat() } -SmFontFormat::SmFontFormat( const Font &rFont ) +SmFontFormat::SmFontFormat( const vcl::Font &rFont ) { aName = rFont.GetName(); nCharSet = (sal_Int16) rFont.GetCharSet(); @@ -234,9 +234,9 @@ SmFontFormat::SmFontFormat( const Font &rFont ) } -const Font SmFontFormat::GetFont() const +const vcl::Font SmFontFormat::GetFont() const { - Font aRes; + vcl::Font aRes; aRes.SetName( aName ); aRes.SetCharSet( (rtl_TextEncoding) nCharSet ); aRes.SetFamily( (FontFamily) nFamily ); @@ -464,7 +464,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, if (nProps && aValues.getLength() == nProps) { const Any * pValue = aValues.getConstArray(); - Font aFont; + vcl::Font aFont; sal_UCS4 cChar = '\0'; OUString aSet; bool bPredefined = false; @@ -1005,7 +1005,7 @@ void SmMathConfig::LoadFormat() LanguageType nLang = Application::GetSettings().GetUILanguageTag().getLanguageType(); for (i = FNT_BEGIN; i < FNT_END; ++i) { - Font aFnt; + vcl::Font aFnt; bool bUseDefaultFont = true; if (pVal->hasValue() && (*pVal >>= aTmpStr)) { diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index 7b40f8b619a4..1e4d90e87249 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -40,7 +40,7 @@ class SmSym; class SmFormat; -class Font; +namespace vcl { class Font; } struct SmCfgOther; struct SmFontFormat @@ -53,9 +53,9 @@ struct SmFontFormat sal_Int16 nItalic; SmFontFormat(); - SmFontFormat( const Font &rFont ); + SmFontFormat( const vcl::Font &rFont ); - const Font GetFont() const; + const vcl::Font GetFont() const; bool operator == ( const SmFontFormat &rFntFmt ) const; }; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 83850e64ecc3..218248562c31 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -64,7 +64,7 @@ public: SmFontStyles(); sal_uInt16 GetCount() const { return 4; } - const OUString& GetStyleName( const Font &rFont ) const; + const OUString& GetStyleName( const vcl::Font &rFont ) const; const OUString& GetStyleName( sal_uInt16 nIdx ) const; }; @@ -81,7 +81,7 @@ SmFontStyles::SmFontStyles() : } -const OUString& SmFontStyles::GetStyleName( const Font &rFont ) const +const OUString& SmFontStyles::GetStyleName( const vcl::Font &rFont ) const { //! compare also SmSpecialNode::Prepare bool bBold = IsBold( rFont ), @@ -124,7 +124,7 @@ const SmFontStyles & GetFontStyles() -void SetFontStyle(const OUString &rStyleName, Font &rFont) +void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont) { // Find index related to StyleName. For an empty StyleName it's assumed to be // 0 (neither bold nor italic). @@ -255,10 +255,10 @@ Size SmShowFont::GetOptimalSize() const return LogicToPixel(Size(111 , 31), MapMode(MAP_APPFONT)); } -void SmShowFont::SetFont(const Font& rFont) +void SmShowFont::SetFont(const vcl::Font& rFont) { Color aTxtColor( GetTextColor() ); - Font aFont (rFont); + vcl::Font aFont (rFont); Invalidate(); aFont.SetSize(Size(0, 24)); @@ -307,7 +307,7 @@ IMPL_LINK( SmFontDialog, AttrChangeHdl, CheckBox *, EMPTYARG /*pCheckBox*/ ) } -void SmFontDialog::SetFont(const Font &rFont) +void SmFontDialog::SetFont(const vcl::Font &rFont) { Face = rFont; @@ -1073,8 +1073,8 @@ void SmShowSymbolSetWindow::Paint(const Rectangle&) Color aTxtColor( GetTextColor() ); for (sal_uInt16 i = v; i < nSymbols ; i++) { - SmSym aSymbol (*aSymbolSet[i]); - Font aFont (aSymbol.GetFace()); + SmSym aSymbol (*aSymbolSet[i]); + vcl::Font aFont (aSymbol.GetFace()); aFont.SetAlign(ALIGN_TOP); // taking a FontSize which is a bit smaller (compared to nLen) in order to have a buffer @@ -1298,7 +1298,7 @@ void SmShowSymbol::Resize() Invalidate(); } -void SmShowSymbol::setFontSize(Font &rFont) const +void SmShowSymbol::setFontSize(vcl::Font &rFont) const { rFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); } @@ -1307,7 +1307,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect) { Control::Paint( rRect ); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); setFontSize(aFont); SetFont(aFont); @@ -1332,7 +1332,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol) { if (pSymbol) { - Font aFont (pSymbol->GetFace()); + vcl::Font aFont (pSymbol->GetFace()); setFontSize(aFont); aFont.SetAlign(ALIGN_BASELINE); SetFont(aFont); @@ -1600,9 +1600,9 @@ void SmShowChar::SetSymbol( const SmSym *pSym ) } -void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont ) +void SmShowChar::SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ) { - Font aFont( rFont ); + vcl::Font aFont( rFont ); aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) ); aFont.SetAlign(ALIGN_BASELINE); SetFont(aFont); @@ -2220,7 +2220,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, if (pSymbol) { // choose font and style accordingly - const Font &rFont = pSymbol->GetFace(); + const vcl::Font &rFont = pSymbol->GetFace(); SelectFont(rFont.GetName(), false); SelectStyle(GetFontStyles().GetStyleName(rFont), false); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index b110cc33acbe..f16a821f4fe6 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -335,7 +335,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool) const FontDta &rFntDta = aTable[i]; LanguageType nLang = (LANGUAGE_NONE == rFntDta.nLang) ? rFntDta.nFallbackLang : rFntDta.nLang; - Font aFont = OutputDevice::GetDefaultFont( + vcl::Font aFont = OutputDevice::GetDefaultFont( rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE ); rEditEngineItemPool.SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 6b31b6dc7cd9..8eef2bcb15e0 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -619,7 +619,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev, const FontMetric aDevFM (rDev.GetFontMetric()); pGlyphDev->Push(PUSH_FONT | PUSH_MAPMODE); - Font aFnt(rDev.GetFont()); + vcl::Font aFnt(rDev.GetFont()); aFnt.SetAlign(ALIGN_TOP); // use scale factor when calling GetTextBoundRect to counter diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 098deb88d238..c2d5e54c9e7e 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -65,7 +65,7 @@ SmSym::SmSym(const SmSym& rSymbol) } -SmSym::SmSym(const OUString& rName, const Font& rFont, sal_UCS4 cChar, +SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, const OUString& rSet, bool bIsPredefined) { m_aName = m_aExportName = rName; @@ -269,7 +269,7 @@ void SmSymbolManager::Load() { // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek const SmSym &rSym = *aGreekSymbols[i]; - Font aFont( rSym.GetFace() ); + vcl::Font aFont( rSym.GetFace() ); OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); aFont.SetItalic( ITALIC_NORMAL ); OUString aSymbolName('i'); diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx index ae4be576eb0d..c867e33475ea 100644 --- a/starmath/source/tmpdevice.cxx +++ b/starmath/source/tmpdevice.cxx @@ -69,7 +69,7 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor ) } -void SmTmpDevice::SetFont(const Font &rNewFont) +void SmTmpDevice::SetFont(const vcl::Font &rNewFont) { rOutDev.SetFont( rNewFont ); rOutDev.SetTextColor( Impl_GetColor( rNewFont.GetColor() ) ); diff --git a/starmath/source/tmpdevice.hxx b/starmath/source/tmpdevice.hxx index f80a32bd170d..12c1d55bed98 100644 --- a/starmath/source/tmpdevice.hxx +++ b/starmath/source/tmpdevice.hxx @@ -35,7 +35,7 @@ public: SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm); ~SmTmpDevice() { rOutDev.Pop(); } - void SetFont(const Font &rNewFont); + void SetFont(const vcl::Font &rNewFont); void SetLineColor( const Color& rColor ) { rOutDev.SetLineColor( Impl_GetColor(rColor) ); } void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor(rColor) ); } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 330ce3c29577..7f479fc2bebe 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -493,7 +493,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if((*pValues).getValueType() != ::getBooleanCppuType()) throw IllegalArgumentException(); bool bVal = *(sal_Bool*)(*pValues).getValue(); - Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); + vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); } @@ -509,7 +509,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if((*pValues).getValueType() != ::getBooleanCppuType()) throw IllegalArgumentException(); bool bVal = *(sal_Bool*)(*pValues).getValue(); - Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); + vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); } @@ -676,7 +676,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* SymbolDescriptor *pDescriptor = aSequence.getArray(); for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++) { - Font aFont; + vcl::Font aFont; aFont.SetName ( pDescriptor->sFontName ); aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) ); aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) ); @@ -894,7 +894,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu pDescriptor->sSymbolSet = (*aIter)->GetSymbolSetName(); pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter()); - Font rFont = (*aIter)->GetFace(); + vcl::Font rFont = (*aIter)->GetFace(); pDescriptor->sFontName = rFont.GetName(); pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet()); pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamily()); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index d83156950eb7..5c15ffa89b9b 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -65,17 +65,17 @@ SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList) return *this; } -Font SmFontPickList::operator [] (sal_uInt16 nPos) const +vcl::Font SmFontPickList::operator [] (sal_uInt16 nPos) const { return aFontVec[nPos]; } -Font SmFontPickList::Get(sal_uInt16 nPos) const +vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const { - return nPos < aFontVec.size() ? aFontVec[nPos] : Font(); + return nPos < aFontVec.size() ? aFontVec[nPos] : vcl::Font(); } -bool SmFontPickList::CompareItem(const Font & rFirstFont, const Font & rSecondFont) const +bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont) const { return rFirstFont.GetName() == rSecondFont.GetName() && rFirstFont.GetFamily() == rSecondFont.GetFamily() && @@ -84,7 +84,7 @@ bool SmFontPickList::CompareItem(const Font & rFirstFont, const Font & rSecondFo rFirstFont.GetItalic() == rSecondFont.GetItalic(); } -OUString SmFontPickList::GetStringItem(const Font &rFont) +OUString SmFontPickList::GetStringItem(const vcl::Font &rFont) { OUStringBuffer aString(rFont.GetName()); @@ -102,7 +102,7 @@ OUString SmFontPickList::GetStringItem(const Font &rFont) return aString.makeStringAndClear(); } -void SmFontPickList::Insert(const Font &rFont) +void SmFontPickList::Insert(const vcl::Font &rFont) { Remove(rFont); aFontVec.push_front( rFont ); @@ -113,7 +113,7 @@ void SmFontPickList::Insert(const Font &rFont) } } -void SmFontPickList::Update(const Font &rFont, const Font &rNewFont) +void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont )) @@ -123,7 +123,7 @@ void SmFontPickList::Update(const Font &rFont, const Font &rNewFont) } } -void SmFontPickList::Remove(const Font &rFont) +void SmFontPickList::Remove(const vcl::Font &rFont) { for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont)) @@ -194,7 +194,7 @@ SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList) return *this; } -void SmFontPickListBox::Insert(const Font &rFont) +void SmFontPickListBox::Insert(const vcl::Font &rFont) { SmFontPickList::Insert(rFont); @@ -209,7 +209,7 @@ void SmFontPickListBox::Insert(const Font &rFont) } -void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont) +void SmFontPickListBox::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { SmFontPickList::Update(rFont, rNewFont); @@ -217,7 +217,7 @@ void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont) } -void SmFontPickListBox::Remove(const Font &rFont) +void SmFontPickListBox::Remove(const vcl::Font &rFont) { SmFontPickList::Remove(rFont); @@ -226,7 +226,7 @@ void SmFontPickListBox::Remove(const Font &rFont) -bool IsItalic( const Font &rFont ) +bool IsItalic( const vcl::Font &rFont ) { FontItalic eItalic = rFont.GetItalic(); // the code below leaves only _NONE and _DONTKNOW as not italic @@ -234,7 +234,7 @@ bool IsItalic( const Font &rFont ) } -bool IsBold( const Font &rFont ) +bool IsBold( const vcl::Font &rFont ) { FontWeight eWeight = rFont.GetWeight(); return eWeight != WEIGHT_DONTKNOW && eWeight > WEIGHT_NORMAL; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 53a3e4fc6586..f59f9bc24f44 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1191,7 +1191,7 @@ void SmViewShell::Impl_Print( { Size aSize600 (0, 600); Size aSize650 (0, 650); - Font aFont(FAMILY_DONTKNOW, aSize600); + vcl::Font aFont(FAMILY_DONTKNOW, aSize600); aFont.SetAlign(ALIGN_TOP); aFont.SetWeight(WEIGHT_BOLD); @@ -1236,7 +1236,7 @@ void SmViewShell::Impl_Print( // output text on bottom if (bIsPrintFormulaText) { - Font aFont(FAMILY_DONTKNOW, Size(0, 600)); + vcl::Font aFont(FAMILY_DONTKNOW, Size(0, 600)); aFont.SetAlign(ALIGN_TOP); aFont.SetColor( Color(COL_BLACK) ); |