vclxwindows.cxx (b0724fc6) vclxwindows.cxx (b6dc695e)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 686 unchanged lines hidden (view full) ---

695
696 ImageControl* pImageControl = (ImageControl*)GetWindow();
697
698 sal_uInt16 nPropType = GetPropertyId( PropertyName );
699 switch ( nPropType )
700 {
701 case BASEPROPERTY_IMAGE_SCALE_MODE:
702 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 686 unchanged lines hidden (view full) ---

695
696 ImageControl* pImageControl = (ImageControl*)GetWindow();
697
698 sal_uInt16 nPropType = GetPropertyId( PropertyName );
699 switch ( nPropType )
700 {
701 case BASEPROPERTY_IMAGE_SCALE_MODE:
702 {
703 sal_Int16 nScaleMode( ImageScaleMode::Anisotropic );
703 sal_Int16 nScaleMode( ImageScaleMode::ANISOTROPIC );
704 if ( pImageControl && ( Value >>= nScaleMode ) )
705 {
706 pImageControl->SetScaleMode( nScaleMode );
707 }
708 }
709 break;
710
711 case BASEPROPERTY_SCALEIMAGE:
712 {
713 // this is for compatibility only, nowadays, the ImageScaleMode property should be used
714 sal_Bool bScaleImage = sal_False;
715 if ( pImageControl && ( Value >>= bScaleImage ) )
716 {
704 if ( pImageControl && ( Value >>= nScaleMode ) )
705 {
706 pImageControl->SetScaleMode( nScaleMode );
707 }
708 }
709 break;
710
711 case BASEPROPERTY_SCALEIMAGE:
712 {
713 // this is for compatibility only, nowadays, the ImageScaleMode property should be used
714 sal_Bool bScaleImage = sal_False;
715 if ( pImageControl && ( Value >>= bScaleImage ) )
716 {
717 pImageControl->SetScaleMode( bScaleImage ? ImageScaleMode::Anisotropic : ImageScaleMode::None );
717 pImageControl->SetScaleMode( bScaleImage ? ImageScaleMode::ANISOTROPIC : ImageScaleMode::NONE );
718 }
719 }
720 break;
721
722 default:
723 VCLXGraphicControl::setProperty( PropertyName, Value );
724 break;
725 }

--- 5 unchanged lines hidden (view full) ---

731
732 ::com::sun::star::uno::Any aProp;
733 ImageControl* pImageControl = (ImageControl*)GetWindow();
734 sal_uInt16 nPropType = GetPropertyId( PropertyName );
735
736 switch ( nPropType )
737 {
738 case BASEPROPERTY_IMAGE_SCALE_MODE:
718 }
719 }
720 break;
721
722 default:
723 VCLXGraphicControl::setProperty( PropertyName, Value );
724 break;
725 }

--- 5 unchanged lines hidden (view full) ---

731
732 ::com::sun::star::uno::Any aProp;
733 ImageControl* pImageControl = (ImageControl*)GetWindow();
734 sal_uInt16 nPropType = GetPropertyId( PropertyName );
735
736 switch ( nPropType )
737 {
738 case BASEPROPERTY_IMAGE_SCALE_MODE:
739 aProp <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::Anisotropic );
739 aProp <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::ANISOTROPIC );
740 break;
741
742 case BASEPROPERTY_SCALEIMAGE:
740 break;
741
742 case BASEPROPERTY_SCALEIMAGE:
743 aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::None ) ? sal_True : sal_False;
743 aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::NONE ) ? sal_True : sal_False;
744 break;
745
746 default:
747 aProp = VCLXGraphicControl::getProperty( PropertyName );
748 break;
749 }
750 return aProp;
751}

--- 5493 unchanged lines hidden ---
744 break;
745
746 default:
747 aProp = VCLXGraphicControl::getProperty( PropertyName );
748 break;
749 }
750 return aProp;
751}

--- 5493 unchanged lines hidden ---