diff options
Diffstat (limited to 'dbaccess/source/ui/misc/UITools.cxx')
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index f71fdcd8b45d..41633e23f4a2 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -753,84 +753,6 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment) return eJustify; } // ----------------------------------------------------------------------------- -float ConvertFontWeight( ::FontWeight eWeight ) -{ - if( eWeight == WEIGHT_DONTKNOW ) - return ::com::sun::star::awt::FontWeight::DONTKNOW; - else if( eWeight == WEIGHT_THIN ) - return ::com::sun::star::awt::FontWeight::THIN; - else if( eWeight == WEIGHT_ULTRALIGHT ) - return ::com::sun::star::awt::FontWeight::ULTRALIGHT; - else if( eWeight == WEIGHT_LIGHT ) - return ::com::sun::star::awt::FontWeight::LIGHT; - else if( eWeight == WEIGHT_SEMILIGHT ) - return ::com::sun::star::awt::FontWeight::SEMILIGHT; - else if( ( eWeight == WEIGHT_NORMAL ) || ( eWeight == WEIGHT_MEDIUM ) ) - return ::com::sun::star::awt::FontWeight::NORMAL; - else if( eWeight == WEIGHT_SEMIBOLD ) - return ::com::sun::star::awt::FontWeight::SEMIBOLD; - else if( eWeight == WEIGHT_BOLD ) - return ::com::sun::star::awt::FontWeight::BOLD; - else if( eWeight == WEIGHT_ULTRABOLD ) - return ::com::sun::star::awt::FontWeight::ULTRABOLD; - else if( eWeight == WEIGHT_BLACK ) - return ::com::sun::star::awt::FontWeight::BLACK; - - SAL_WARN("dbaccess.ui", "Unknown FontWeight" ); - return ::com::sun::star::awt::FontWeight::DONTKNOW; -} -// ----------------------------------------------------------------------------- -float ConvertFontWidth( ::FontWidth eWidth ) -{ - if( eWidth == WIDTH_DONTKNOW ) - return ::com::sun::star::awt::FontWidth::DONTKNOW; - else if( eWidth == WIDTH_ULTRA_CONDENSED ) - return ::com::sun::star::awt::FontWidth::ULTRACONDENSED; - else if( eWidth == WIDTH_EXTRA_CONDENSED ) - return ::com::sun::star::awt::FontWidth::EXTRACONDENSED; - else if( eWidth == WIDTH_CONDENSED ) - return ::com::sun::star::awt::FontWidth::CONDENSED; - else if( eWidth == WIDTH_SEMI_CONDENSED ) - return ::com::sun::star::awt::FontWidth::SEMICONDENSED; - else if( eWidth == WIDTH_NORMAL ) - return ::com::sun::star::awt::FontWidth::NORMAL; - else if( eWidth == WIDTH_SEMI_EXPANDED ) - return ::com::sun::star::awt::FontWidth::SEMIEXPANDED; - else if( eWidth == WIDTH_EXPANDED ) - return ::com::sun::star::awt::FontWidth::EXPANDED; - else if( eWidth == WIDTH_EXTRA_EXPANDED ) - return ::com::sun::star::awt::FontWidth::EXTRAEXPANDED; - else if( eWidth == WIDTH_ULTRA_EXPANDED ) - return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED; - - SAL_WARN("dbaccess.ui", "Unknown FontWidth" ); - return ::com::sun::star::awt::FontWidth::DONTKNOW; -} -// ----------------------------------------------------------------------------- -::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& rFont ) -{ - ::com::sun::star::awt::FontDescriptor aFD; - aFD.Name = rFont.GetName(); - aFD.StyleName = rFont.GetStyleName(); - aFD.Height = (sal_Int16)rFont.GetSize().Height(); - aFD.Width = (sal_Int16)rFont.GetSize().Width(); - aFD.Family = sal::static_int_cast< sal_Int16 >(rFont.GetFamily()); - aFD.CharSet = rFont.GetCharSet(); - aFD.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); - aFD.CharacterWidth = ConvertFontWidth( rFont.GetWidthType() ); - aFD.Weight = ConvertFontWeight( rFont.GetWeight() ); - aFD.Slant = (::com::sun::star::awt::FontSlant)rFont.GetItalic(); - aFD.Underline = sal::static_int_cast< sal_Int16 >( - rFont.GetUnderline()); - aFD.Strikeout = sal::static_int_cast< sal_Int16 >( - rFont.GetStrikeout()); - aFD.Orientation = rFont.GetOrientation(); - aFD.Kerning = rFont.IsKerning(); - aFD.WordLineMode = rFont.IsWordLineMode(); - aFD.Type = 0; // ??? => Nur an Metric... - return aFD; -} -// ----------------------------------------------------------------------------- void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, const Reference<XPropertySet>& xField, SvNumberFormatter* _pFormatter, |