diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-13 20:09:49 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-14 07:58:28 -0600 |
commit | 2a0a80a1385544cbb8d9f6b3ffc22f1c0afeb4ed (patch) | |
tree | b802a0844ce7a014cc48201aae955b5400cbc458 /svx | |
parent | bb39bea2e63ec04e2cde88121d09c88e451b340e (diff) |
protect macosx against the HiDPI hacks
Change-Id: Ie79abaffef72cbdf3006314c56590ca1e10cf949
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 5 | ||||
-rw-r--r-- | svx/source/stbctrls/modctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/stbctrls/pszctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/stbctrls/selctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/stbctrls/xmlsecctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/stbctrls/zoomsliderctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 4 |
7 files changed, 16 insertions, 7 deletions
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index b897facd7aea..5f3c763245e9 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -100,6 +100,7 @@ void ValueSetWithTextControl::AddItem( ? *pSelectedItemImage : rItemImage; +#ifndef MACOSX if ( GetDPIScaleFactor() > 1 ) { BitmapEx b = aItem.maItemImage.GetBitmapEx(); @@ -113,7 +114,7 @@ void ValueSetWithTextControl::AddItem( aItem.maSelectedItemImage = Image(b); } } - +#endif aItem.maItemText = rItemText; maItems.push_back( aItem ); @@ -167,6 +168,7 @@ void ValueSetWithTextControl::ReplaceItemImages( ? *pSelectedItemImage : rItemImage; +#ifndef MACOSX if ( GetDPIScaleFactor() > 1 ) { BitmapEx b = maItems[nItemId-1].maItemImage.GetBitmapEx(); @@ -180,6 +182,7 @@ void ValueSetWithTextControl::ReplaceItemImages( maItems[nItemId-1].maSelectedItemImage = Image(b); } } +#endif } diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index db94f49bad12..542ec71e79a6 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -73,6 +73,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status SfxStatusBarControl( _nSlotId, _nId, rStb ), mpImpl(new ImplData) { +#ifndef MACOSX if ( rStb.GetDPIScaleFactor() > 1 ) { for (int i = 0; i < mpImpl->MODIFICATION_STATE_SIZE; i++) @@ -82,7 +83,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status mpImpl->maImages[i] = Image(b); } } - +#endif mpImpl->maTimer.SetTimeoutHdl( LINK(this, SvxModifyControl, OnTimer) ); } diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 733b8e7221a4..589f30d86c87 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -177,6 +177,7 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( sal_uInt16 _nSlotId, pImp->aPosImage = Image( ResId( RID_SVXBMP_POSITION, DIALOG_MGR() ) ); pImp->aSizeImage = Image( ResId( RID_SVXBMP_SIZE, DIALOG_MGR() ) ); +#ifndef MACOSX if ( rStb.GetDPIScaleFactor() > 1) { BitmapEx b = pImp->aPosImage.GetBitmapEx(); @@ -187,7 +188,7 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( sal_uInt16 _nSlotId, b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), BMP_SCALE_FAST); pImp->aSizeImage = Image(b); } - +#endif addStatusListener( OUString( STR_POSITION )); // SID_ATTR_POSITION addStatusListener( OUString( STR_TABLECELL )); // SID_TABLE_CELL addStatusListener( OUString( STR_FUNC )); // SID_PSZ_FUNCTION diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 9b77972d74de..6f31d4842bd4 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -80,13 +80,14 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId, mnState( 0 ), maImage( SVX_RES( RID_SVXBMP_SELECTION ) ) { +#ifndef MACOSX if ( GetStatusBar().GetDPIScaleFactor() > 1 ) { BitmapEx b = maImage.GetBitmapEx(); b.Scale(GetStatusBar().GetDPIScaleFactor(), GetStatusBar().GetDPIScaleFactor(), BMP_SCALE_FAST); maImage = Image(b); } - +#endif GetStatusBar().SetItemText( GetId(), "" ); } diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 46ea35b8b167..1ecfd521aaa4 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -61,6 +61,7 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nSlotId, sal_uInt16 mpImpl->maImageBroken = Image( SVX_RES( RID_SVXBMP_SIGNET_BROKEN ) ); mpImpl->maImageNotValidated = Image( SVX_RES( RID_SVXBMP_SIGNET_NOTVALIDATED ) ); +#ifndef MACOSX if (_rStb.GetDPIScaleFactor() > 1) { Image arr[3] = {mpImpl->maImage, mpImpl->maImageBroken, mpImpl->maImageNotValidated}; @@ -76,6 +77,7 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nSlotId, sal_uInt16 mpImpl->maImageBroken = arr[1]; mpImpl->maImageNotValidated = arr[2]; } +#endif } diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 638a8505fb9a..df614d96bc2a 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -170,6 +170,7 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); +#ifndef MACOSX if ( _rStb.GetDPIScaleFactor() > 1) { Image arr[3] = {mpImpl->maSliderButton, mpImpl->maIncreaseButton, mpImpl->maDecreaseButton}; @@ -181,11 +182,11 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI b.Scale(_rStb.GetDPIScaleFactor(), _rStb.GetDPIScaleFactor(), i == 0 ? BMP_SCALE_LANCZOS : BMP_SCALE_FAST); arr[i] = Image(b); } - mpImpl->maSliderButton = arr[0]; mpImpl->maIncreaseButton = arr[1]; mpImpl->maDecreaseButton = arr[2]; } +#endif } // ----------------------------------------------------------------------- diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d54ec9d30b02..df8d31eb87dd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1274,7 +1274,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram BindListener(); AddStatusListener(OUString(".uno:BorderReducedMode")); aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); - +#ifndef MACOSX if( pParentWindow->GetDPIScaleFactor() > 1 ) { for (short i = 0; i < aImgList.GetImageCount(); i++) @@ -1285,7 +1285,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram aImgList.ReplaceImage(rImageName, Image(b)); } } - +#endif /* * 1 2 3 4 * ------------------------------------- |