[Libreoffice-commits] core.git: svx/source sw/source

Norbert Thiebaud nthiebaud at gmail.com
Fri Feb 14 14:59:00 CET 2014


 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |    5 ++++-
 svx/source/stbctrls/modctrl.cxx                      |    3 ++-
 svx/source/stbctrls/pszctrl.cxx                      |    3 ++-
 svx/source/stbctrls/selctrl.cxx                      |    3 ++-
 svx/source/stbctrls/xmlsecctrl.cxx                   |    2 ++
 svx/source/stbctrls/zoomsliderctrl.cxx               |    3 ++-
 svx/source/tbxctrls/tbcontrl.cxx                     |    4 ++--
 sw/source/ui/utlui/content.cxx                       |    3 ++-
 sw/source/ui/utlui/viewlayoutctrl.cxx                |    2 ++
 9 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit 2a0a80a1385544cbb8d9f6b3ffc22f1c0afeb4ed
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Thu Feb 13 20:09:49 2014 -0600

    protect macosx against the HiDPI hacks
    
    Change-Id: Ie79abaffef72cbdf3006314c56590ca1e10cf949

diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index b897fac..5f3c763 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 db94f49..542ec71 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 733b8e7..589f30d 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 9b77972..6f31d48 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 46ea35b..1ecfd52 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 638a850..df614d9 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 d54ec9d..df8d31e 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
      *  -------------------------------------
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index f810c57..b8e62d7 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1562,6 +1562,7 @@ void SwContentTree::Display( bool bActive )
     {
         aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
 
+#ifndef MACSOX
         if ( GetDPIScaleFactor() > 1 )
         {
             for (short i = 0; i < aEntryImages.GetImageCount(); i++)
@@ -1573,7 +1574,7 @@ void SwContentTree::Display( bool bActive )
                 aEntryImages.ReplaceImage(rImageName, Image(b));
             }
         }
-
+#endif
         bIsImageListInitialized = true;
     }
     // First read the selected entry to select it later again if necessary
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 00d409e..18a9212 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -52,6 +52,7 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
     mpImpl->maImageBookMode             = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
     mpImpl->maImageBookMode_Active      = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
 
+#ifndef MACOSX
     if ( rStb.GetDPIScaleFactor() > 1)
     {
         Image arr[6] = {mpImpl->maImageSingleColumn, mpImpl->maImageSingleColumn_Active,
@@ -75,6 +76,7 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
         mpImpl->maImageBookMode = arr[4];
         mpImpl->maImageBookMode_Active = arr[5];
     }
+#endif
 }
 
 SwViewLayoutControl::~SwViewLayoutControl()


More information about the Libreoffice-commits mailing list