diff options
Diffstat (limited to 'svx/source/gallery2/galobj.cxx')
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index a4b9cc0d39..a62a530ccb 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,17 +38,17 @@ #include <sfx2/docfac.hxx> #include <comphelper/classids.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <tools/rcid.h> #include <tools/vcompat.hxx> #include <vcl/virdev.hxx> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include <svx/fmmodel.hxx> #include <svx/fmview.hxx> #include <svx/fmpage.hxx> #include "gallery.hrc" -#include "galmisc.hxx" +#include "svx/galmisc.hxx" #include "galobj.hxx" #include <vcl/salbtype.hxx> // FRound #include <vcl/svapp.hxx> @@ -82,22 +82,22 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic ) { const Color aWhite( COL_WHITE ); - if( aBmpEx.GetPrefMapMode().GetMapUnit() != MAP_PIXEL && - aBmpEx.GetPrefSize().Width() > 0 && + if( aBmpEx.GetPrefMapMode().GetMapUnit() != MAP_PIXEL && + aBmpEx.GetPrefSize().Width() > 0 && aBmpEx.GetPrefSize().Height() > 0 ) { Size aLogSize( OutputDevice::LogicToLogic( aBmpEx.GetPrefSize(), aBmpEx.GetPrefMapMode(), MAP_100TH_MM ) ); - + if( aLogSize.Width() > 0 && aLogSize.Height() > 0 ) { double fFactorLog = static_cast< double >( aLogSize.Width() ) / aLogSize.Height(); double fFactorPix = static_cast< double >( aBmpSize.Width() ) / aBmpSize.Height(); - + if( fFactorPix > fFactorLog ) aBmpSize.Width() = FRound( aBmpSize.Height() * fFactorLog ); else aBmpSize.Height() = FRound( aBmpSize.Width() / fFactorLog ); - + aBmpEx.SetSizePixel( aBmpSize ); } } @@ -371,7 +371,7 @@ Bitmap SgaObjectSound::GetThumbBmp() const nId = RID_SVXBMP_GALLERY_MEDIA; break; } - + const BitmapEx aBmpEx( GAL_RESID( nId ) ); const Color aTransColor( COL_WHITE ); @@ -416,8 +416,8 @@ SgaObjectAnim::SgaObjectAnim() // ------------------------------------------------------------------------ -SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic, - const INetURLObject& rURL, +SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic, + const INetURLObject& rURL, const String& ) { aURL = rURL; @@ -492,7 +492,7 @@ SvxGalleryDrawModel::~SvxGalleryDrawModel() // ------------------------------------------------------------------------ SgaObjectSvDraw::SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL ) -{ +{ SvxGalleryDrawModel aModel; if( aModel.GetModel() ) @@ -556,7 +556,7 @@ BOOL SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rMode MapMode aMap( rModel.GetScaleUnit() ); Rectangle aDrawRectPix( Point( 1, 1 ), Size( aOutSizePix.Width() - 2, aOutSizePix.Height() - 2 ) ); const double fFactor = (double) aObjRect.GetWidth() / aObjRect.GetHeight(); - Fraction aFrac( FRound( fFactor < 1. ? aDrawRectPix.GetWidth() * fFactor : aDrawRectPix.GetWidth() ), + Fraction aFrac( FRound( fFactor < 1. ? aDrawRectPix.GetWidth() * fFactor : aDrawRectPix.GetWidth() ), pOut->LogicToPixel( aObjRect.GetSize(), aMap ).Width() ); aMap.SetScaleX( aFrac ); @@ -568,7 +568,7 @@ BOOL SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rMode aOrigin.X() += ( ( aDrawSize.Width() - aObjRect.GetWidth() ) >> 1 ) - aObjRect.Left(); aOrigin.Y() += ( ( aDrawSize.Height() - aObjRect.GetHeight() ) >> 1 ) - aObjRect.Top(); aMap.SetOrigin( aOrigin ); - + aView.SetPageVisible( FALSE ); aView.SetBordVisible( FALSE ); aView.SetGridVisible( FALSE ); |