diff options
Diffstat (limited to 'oox/source/xls/unitconverter.cxx')
-rw-r--r-- | oox/source/xls/unitconverter.cxx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/oox/source/xls/unitconverter.cxx b/oox/source/xls/unitconverter.cxx index 2cf7fae8f0cb..65c48e243edc 100644 --- a/oox/source/xls/unitconverter.cxx +++ b/oox/source/xls/unitconverter.cxx @@ -27,30 +27,31 @@ ************************************************************************/ #include "oox/xls/unitconverter.hxx" -#include <rtl/math.hxx> + +#include <com/sun/star/awt/DeviceInfo.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/awt/XDevice.hpp> -#include <com/sun/star/awt/DeviceInfo.hpp> #include <com/sun/star/awt/XFont.hpp> #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/DateTime.hpp> +#include <rtl/math.hxx> #include "oox/core/filterbase.hxx" +#include "oox/helper/propertyset.hxx" #include "oox/xls/stylesbuffer.hxx" -using ::rtl::OUString; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::awt::FontDescriptor; -using ::com::sun::star::awt::XDevice; -using ::com::sun::star::awt::DeviceInfo; -using ::com::sun::star::awt::XFont; -using ::com::sun::star::util::Date; -using ::com::sun::star::util::DateTime; - namespace oox { namespace xls { // ============================================================================ +using namespace ::com::sun::star::awt; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::util; + +using ::rtl::OUString; + +// ============================================================================ + namespace { const double MM100_PER_INCH = 2540.0; @@ -133,7 +134,8 @@ UnitConverter::UnitConverter( const WorkbookHelper& rHelper ) : void UnitConverter::finalizeImport() { - Reference< XDevice > xDevice = getReferenceDevice(); + PropertySet aDocProps( getDocument() ); + Reference< XDevice > xDevice( aDocProps.getAnyProperty( PROP_ReferenceDevice ), UNO_QUERY ); if( xDevice.is() ) { // get reference device metric first, needed to get character widths below @@ -257,4 +259,4 @@ double UnitConverter::getCoefficient( Unit eUnit ) const } // namespace xls } // namespace oox -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file |