diff options
author | Armin Le Grand <alg@apache.org> | 2013-06-18 10:07:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-18 13:06:12 +0100 |
commit | 7377557f277b19c4953198c17b591fd964ac7c40 (patch) | |
tree | 205ee08ac0651082379c1bced5ada7105e27029a /vcl | |
parent | Let WINDOWS_SDK_WILANGID override the location of WiLangId.vbs (diff) | |
download | core-7377557f277b19c4953198c17b591fd964ac7c40.tar.gz core-7377557f277b19c4953198c17b591fd964ac7c40.zip |
Resolves: #i122120# Changed UI preview creators...
to no longer need SdrModel/SdrObject
(cherry picked from commit 0c353433ad94786a937fa9da01d6e7382e3da942)
corrected unwanted change
(cherry picked from commit 8a10735b8ee3926a592d6919f4dbb823771bed9f)
Conflicts:
vcl/inc/vcl/outdev.hxx
7c096015d974382e6874a874370ee72a61f02e6a
Change-Id: Ib2afe135566eba2e99cc8c4a653de3df0fa7f0cd
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/settings.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/outmap.cxx | 62 |
2 files changed, 51 insertions, 16 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 0df08a4ba2a6..6539d385b083 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -243,6 +243,7 @@ ImplStyleData::ImplStyleData() : maListBoxPreviewDefaultLogicSize = Size(15, 7); maListBoxPreviewDefaultPixelSize = Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize() mnListBoxPreviewDefaultLineWidth = 1; + mbUIPreviewUsesCheckeredBackground = true; SetStandardStyles(); } @@ -366,6 +367,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) : maListBoxPreviewDefaultLogicSize = rData.maListBoxPreviewDefaultLogicSize; maListBoxPreviewDefaultPixelSize = rData.maListBoxPreviewDefaultPixelSize; mnListBoxPreviewDefaultLineWidth = rData.mnListBoxPreviewDefaultLineWidth; + mbUIPreviewUsesCheckeredBackground = rData.mbUIPreviewUsesCheckeredBackground; } // ----------------------------------------------------------------------- @@ -982,7 +984,8 @@ sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const (mpData->mnColorValueSetMaximumRowCount == rSet.mpData->mnColorValueSetMaximumRowCount) && (mpData->maListBoxPreviewDefaultLogicSize == rSet.mpData->maListBoxPreviewDefaultLogicSize) && (mpData->maListBoxPreviewDefaultPixelSize == rSet.mpData->maListBoxPreviewDefaultPixelSize) && - (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth)) + (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth) && + (mpData->mbUIPreviewUsesCheckeredBackground == rSet.mpData->mbUIPreviewUsesCheckeredBackground)) return sal_True; else return sal_False; diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index 98614c85eaa3..0f252fa84dc3 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -2173,19 +2173,54 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly const MapMode& rMapModeSource, const MapMode& rMapModeDest ) { - if ( rMapModeSource == rMapModeDest ) + if(rMapModeSource == rMapModeDest) + { return rPolySource; + } - MapUnit eUnitSource = rMapModeSource.GetMapUnit(); - MapUnit eUnitDest = rMapModeDest.GetMapUnit(); - ENTER2( eUnitSource, eUnitDest ); + const basegfx::B2DHomMatrix aTransform(LogicToLogic(rMapModeSource, rMapModeDest)); + basegfx::B2DPolygon aPoly(rPolySource); + + aPoly.transform(aTransform); + return aPoly; +} + +// ----------------------------------------------------------------------- + +basegfx::B2DPolyPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolyPolygon& rPolySource, + const MapMode& rMapModeSource, + const MapMode& rMapModeDest ) +{ + if(rMapModeSource == rMapModeDest) + { + return rPolySource; + } + + const basegfx::B2DHomMatrix aTransform(LogicToLogic(rMapModeSource, rMapModeDest)); + basegfx::B2DPolyPolygon aPoly(rPolySource); + + aPoly.transform(aTransform); + return aPoly; +} +// ----------------------------------------------------------------------- + +basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest) +{ basegfx::B2DHomMatrix aTransform; - if ( rMapModeSource.mpImplMapMode->mbSimple && - rMapModeDest.mpImplMapMode->mbSimple ) + if(rMapModeSource == rMapModeDest) { - ENTER3( eUnitSource, eUnitDest ); + return aTransform; + } + + MapUnit eUnitSource = rMapModeSource.GetMapUnit(); + MapUnit eUnitDest = rMapModeDest.GetMapUnit(); + ENTER2(eUnitSource, eUnitDest); + + if(rMapModeSource.mpImplMapMode->mbSimple && rMapModeDest.mpImplMapMode->mbSimple) + { + ENTER3(eUnitSource, eUnitDest); const double fScaleFactor((double)nNumerator / (double)nDenominator); aTransform.set(0, 0, fScaleFactor); @@ -2193,12 +2228,10 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly } else { - ENTER4( rMapModeSource, rMapModeDest ); + ENTER4(rMapModeSource, rMapModeDest); - const double fScaleFactorX( (double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX)) - / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX)) ); - const double fScaleFactorY( (double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY)) - / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY)) ); + const double fScaleFactorX((double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX)) / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX))); + const double fScaleFactorY((double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY)) / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY))); const double fZeroPointX(double(aMapResSource.mnMapOfsX) * fScaleFactorX - double(aMapResDest.mnMapOfsX)); const double fZeroPointY(double(aMapResSource.mnMapOfsY) * fScaleFactorY - double(aMapResDest.mnMapOfsY)); @@ -2207,9 +2240,8 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly aTransform.set(0, 2, fZeroPointX); aTransform.set(1, 2, fZeroPointY); } - basegfx::B2DPolygon aPoly( rPolySource ); - aPoly.transform( aTransform ); - return aPoly; + + return aTransform; } // ----------------------------------------------------------------------- |