diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-20 02:28:55 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-20 02:38:22 +0200 |
commit | 503c8fdb1705f0b91e5181b250a6dc94e94e835d (patch) | |
tree | 3d28514aab697580361aac9f09e8bc9f44d3ba03 /sc | |
parent | e878c9bba31386cbdb9caca3cbc588a25dc1ae1e (diff) |
export font information into dxf
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index ca608ca4639c..c73a08bb91c1 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -28,12 +28,14 @@ #include "xestyle.hxx" +#include <iostream> #include <algorithm> #include <iterator> #include <set> #include <com/sun/star/i18n/ScriptType.hpp> #include <vcl/font.hxx> #include <svl/zformat.hxx> +#include <svl/itempool.hxx> #include <svl/languageoptions.hxx> #include <sfx2/printer.hxx> #include "scitems.hxx" @@ -2878,9 +2880,16 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) delete pCellArea; pCellArea = NULL; } - //XclExpFont* pFont = new XclExpFont( GetRoot(), XclFontData( rFont ), EXC_COLOR_CELLTEXT ); - maDxf.push_back(new XclExpDxf( rRoot, pAlign, pBorder, NULL, NULL, pCellProt, pCellArea )); + XclExpFont* pFont = NULL; + // check if non default font is set and only export then + if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ))>SFX_ITEM_DEFAULT ) + { + Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rSet, com::sun::star::i18n::ScriptType::WEAK ); + pFont = new XclExpFont( GetRoot(), XclFontData( aFont ), EXC_COLOR_CELLTEXT ); + } + + maDxf.push_back(new XclExpDxf( rRoot, pAlign, pBorder, pFont, NULL, pCellProt, pCellArea )); ++nIndex; } |