Kaydet (Commit) 3eb84bcb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Simplify TKGet(TK_FOO) -> "FOO"

Change-Id: I06e3134aeef27f13969f6d9d7d81b916bc93e8e2
üst 48d72126
...@@ -83,21 +83,21 @@ void OptimizerSettings::SaveSettingsToConfiguration( const Reference< XNameRepla ...@@ -83,21 +83,21 @@ void OptimizerSettings::SaveSettingsToConfiguration( const Reference< XNameRepla
if ( rSettings.is() ) if ( rSettings.is() )
{ {
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Name ), "Name",
TKGet( TK_JPEGCompression ), "JPEGCompression",
TKGet( TK_JPEGQuality ), "JPEGQuality",
TKGet( TK_RemoveCropArea ), "RemoveCropArea",
TKGet( TK_ImageResolution ), "ImageResolution",
TKGet( TK_EmbedLinkedGraphics ), "EmbedLinkedGraphics",
TKGet( TK_OLEOptimization ), "OLEOptimization",
TKGet( TK_OLEOptimizationType ), "OLEOptimizationType",
TKGet( TK_DeleteUnusedMasterPages ), "DeleteUnusedMasterPages",
TKGet( TK_DeleteHiddenSlides ), "DeleteHiddenSlides",
TKGet( TK_DeleteNotesPages ), "DeleteNotesPages",
TKGet( TK_SaveAs ), "SaveAs",
// TKGet( TK_SaveAsURL ), // "SaveAsURL",
// TKGet( TK_FilterName ), // "FilterName",
TKGet( TK_OpenNewDocument ) }; "OpenNewDocument" };
Any pValues[] = { Any pValues[] = {
Any( maName ), Any( maName ),
...@@ -153,7 +153,7 @@ ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContex ...@@ -153,7 +153,7 @@ ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContex
LoadStrings(); LoadStrings();
maSettings.push_back( pDefaultSettings ? maSettings.push_back( pDefaultSettings ?
*pDefaultSettings : OptimizerSettings() ); *pDefaultSettings : OptimizerSettings() );
maSettings.back().maName = TKGet( TK_LastUsedSettings ); maSettings.back().maName = "LastUsedSettings";
LoadConfiguration(); LoadConfiguration();
maInitialSettings = maSettings; maInitialSettings = maSettings;
}; };
...@@ -199,7 +199,7 @@ void ConfigurationAccess::LoadStrings() ...@@ -199,7 +199,7 @@ void ConfigurationAccess::LoadStrings()
Reference< XInterface > xRoot( OpenConfiguration( true ) ); Reference< XInterface > xRoot( OpenConfiguration( true ) );
if ( !xRoot.is() ) if ( !xRoot.is() )
break; break;
Reference< container::XNameAccess > xSet( GetConfigurationNode( xRoot, TKGet( TK_Strings ) ), UNO_QUERY ); Reference< container::XNameAccess > xSet( GetConfigurationNode( xRoot, "Strings" ), UNO_QUERY );
if ( xSet.is() ) if ( xSet.is() )
{ {
const Sequence< OUString > aElements( xSet->getElementNames() ); const Sequence< OUString > aElements( xSet->getElementNames() );
...@@ -233,13 +233,13 @@ void ConfigurationAccess::LoadConfiguration() ...@@ -233,13 +233,13 @@ void ConfigurationAccess::LoadConfiguration()
Reference< XInterface > xRoot( OpenConfiguration( true ) ); Reference< XInterface > xRoot( OpenConfiguration( true ) );
if ( !xRoot.is() ) if ( !xRoot.is() )
break; break;
Reference< container::XNameAccess > xSet( GetConfigurationNode( xRoot, TKGet( TK_LastUsedSettings ) ), UNO_QUERY ); Reference< container::XNameAccess > xSet( GetConfigurationNode( xRoot, "LastUsedSettings" ), UNO_QUERY );
if ( xSet.is() ) if ( xSet.is() )
{ {
OptimizerSettings& rCurrent( maSettings.front() ); OptimizerSettings& rCurrent( maSettings.front() );
rCurrent.LoadSettingsFromConfiguration( xSet ); rCurrent.LoadSettingsFromConfiguration( xSet );
} }
xSet = Reference< container::XNameAccess >( GetConfigurationNode( xRoot, TKGet( TK_Settings_Templates ) ), UNO_QUERY ); xSet = Reference< container::XNameAccess >( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY );
if ( xSet.is() ) if ( xSet.is() )
{ {
const Sequence< OUString > aElements( xSet->getElementNames() ); const Sequence< OUString > aElements( xSet->getElementNames() );
...@@ -247,7 +247,7 @@ void ConfigurationAccess::LoadConfiguration() ...@@ -247,7 +247,7 @@ void ConfigurationAccess::LoadConfiguration()
{ {
try try
{ {
OUString aPath( TKGet( TK_Settings_Templates_ ).concat( aElements[ i ] ) ); OUString aPath( "Settings/Templates/" + aElements[ i ] );
Reference< container::XNameAccess > xTemplates( GetConfigurationNode( xRoot, aPath ), UNO_QUERY ); Reference< container::XNameAccess > xTemplates( GetConfigurationNode( xRoot, aPath ), UNO_QUERY );
if ( xTemplates.is() ) if ( xTemplates.is() )
{ {
...@@ -279,12 +279,12 @@ void ConfigurationAccess::SaveConfiguration() ...@@ -279,12 +279,12 @@ void ConfigurationAccess::SaveConfiguration()
Reference<util::XChangesBatch> xRoot( OpenConfiguration( false ), UNO_QUERY_THROW ); Reference<util::XChangesBatch> xRoot( OpenConfiguration( false ), UNO_QUERY_THROW );
// storing the last used settings // storing the last used settings
Reference< container::XNameReplace > xSet( GetConfigurationNode( xRoot, TKGet( TK_LastUsedSettings ) ), UNO_QUERY_THROW ); Reference< container::XNameReplace > xSet( GetConfigurationNode( xRoot, "LastUsedSettings" ), UNO_QUERY_THROW );
OptimizerSettings& rCurrent( maSettings.front() ); OptimizerSettings& rCurrent( maSettings.front() );
rCurrent.SaveSettingsToConfiguration( xSet ); rCurrent.SaveSettingsToConfiguration( xSet );
// updating template elements // updating template elements
xSet = Reference< container::XNameReplace >( GetConfigurationNode( xRoot, TKGet( TK_Settings_Templates ) ), UNO_QUERY_THROW ); xSet = Reference< container::XNameReplace >( GetConfigurationNode( xRoot, "Settings/Templates" ), UNO_QUERY_THROW );
Reference< container::XNameContainer > xNameContainer( xSet, UNO_QUERY_THROW ); Reference< container::XNameContainer > xNameContainer( xSet, UNO_QUERY_THROW );
const Sequence< OUString > aElements( xSet->getElementNames() ); const Sequence< OUString > aElements( xSet->getElementNames() );
...@@ -294,12 +294,12 @@ void ConfigurationAccess::SaveConfiguration() ...@@ -294,12 +294,12 @@ void ConfigurationAccess::SaveConfiguration()
for( k = 1; k < maSettings.size(); k++ ) for( k = 1; k < maSettings.size(); k++ )
{ {
OptimizerSettings& rSettings( maSettings[ k ] ); OptimizerSettings& rSettings( maSettings[ k ] );
OUString aElementName( TKGet( TK_Template ).concat( OUString::number( k ) ) ); OUString aElementName( "Template" + OUString::number( k ) );
Reference< lang::XSingleServiceFactory > xChildFactory ( xSet, UNO_QUERY_THROW ); Reference< lang::XSingleServiceFactory > xChildFactory ( xSet, UNO_QUERY_THROW );
Reference< container::XNameReplace > xChild( xChildFactory->createInstance(), UNO_QUERY_THROW ); Reference< container::XNameReplace > xChild( xChildFactory->createInstance(), UNO_QUERY_THROW );
xNameContainer->insertByName( aElementName, Any( xChild ) ); xNameContainer->insertByName( aElementName, Any( xChild ) );
OUString aPath( TKGet( TK_Settings_Templates_ ).concat( aElementName ) ); OUString aPath( "Settings/Templates/" + aElementName );
Reference< container::XNameReplace > xTemplates( GetConfigurationNode( xRoot, aPath ), UNO_QUERY ); Reference< container::XNameReplace > xTemplates( GetConfigurationNode( xRoot, aPath ), UNO_QUERY );
rSettings.SaveSettingsToConfiguration( xTemplates ); rSettings.SaveSettingsToConfiguration( xTemplates );
} }
...@@ -468,35 +468,35 @@ Sequence< PropertyValue > ConfigurationAccess::GetConfigurationSequence() ...@@ -468,35 +468,35 @@ Sequence< PropertyValue > ConfigurationAccess::GetConfigurationSequence()
{ {
Sequence< PropertyValue > aRet( 15 ); Sequence< PropertyValue > aRet( 15 );
OptimizerSettings& rSettings( maSettings.front() ); OptimizerSettings& rSettings( maSettings.front() );
aRet[ 0 ].Name = TKGet( TK_JPEGCompression ); aRet[ 0 ].Name = "JPEGCompression";
aRet[ 0 ].Value= Any( rSettings.mbJPEGCompression ); aRet[ 0 ].Value= Any( rSettings.mbJPEGCompression );
aRet[ 1 ].Name = TKGet( TK_JPEGQuality ); aRet[ 1 ].Name = "JPEGQuality";
aRet[ 1 ].Value= Any( rSettings.mnJPEGQuality ); aRet[ 1 ].Value= Any( rSettings.mnJPEGQuality );
aRet[ 2 ].Name = TKGet( TK_RemoveCropArea ); aRet[ 2 ].Name = "RemoveCropArea";
aRet[ 2 ].Value= Any( rSettings.mbRemoveCropArea ); aRet[ 2 ].Value= Any( rSettings.mbRemoveCropArea );
aRet[ 3 ].Name = TKGet( TK_ImageResolution ); aRet[ 3 ].Name = "ImageResolution";
aRet[ 3 ].Value= Any( rSettings.mnImageResolution ); aRet[ 3 ].Value= Any( rSettings.mnImageResolution );
aRet[ 4 ].Name = TKGet( TK_EmbedLinkedGraphics ); aRet[ 4 ].Name = "EmbedLinkedGraphics";
aRet[ 4 ].Value= Any( rSettings.mbEmbedLinkedGraphics ); aRet[ 4 ].Value= Any( rSettings.mbEmbedLinkedGraphics );
aRet[ 5 ].Name = TKGet( TK_OLEOptimization ); aRet[ 5 ].Name = "OLEOptimization";
aRet[ 5 ].Value= Any( rSettings.mbOLEOptimization ); aRet[ 5 ].Value= Any( rSettings.mbOLEOptimization );
aRet[ 6 ].Name = TKGet( TK_OLEOptimizationType ); aRet[ 6 ].Name = "OLEOptimizationType";
aRet[ 6 ].Value= Any( rSettings.mnOLEOptimizationType ); aRet[ 6 ].Value= Any( rSettings.mnOLEOptimizationType );
aRet[ 7 ].Name = TKGet( TK_DeleteUnusedMasterPages ); aRet[ 7 ].Name = "DeleteUnusedMasterPages";
aRet[ 7 ].Value= Any( rSettings.mbDeleteUnusedMasterPages ); aRet[ 7 ].Value= Any( rSettings.mbDeleteUnusedMasterPages );
aRet[ 8 ].Name = TKGet( TK_DeleteHiddenSlides ); aRet[ 8 ].Name = "DeleteHiddenSlides";
aRet[ 8 ].Value= Any( rSettings.mbDeleteHiddenSlides ); aRet[ 8 ].Value= Any( rSettings.mbDeleteHiddenSlides );
aRet[ 9 ].Name = TKGet( TK_DeleteNotesPages ); aRet[ 9 ].Name = "DeleteNotesPages";
aRet[ 9 ].Value= Any( rSettings.mbDeleteNotesPages ); aRet[ 9 ].Value= Any( rSettings.mbDeleteNotesPages );
aRet[ 10].Name = TKGet( TK_CustomShowName ); aRet[ 10].Name = "CustomShowName";
aRet[ 10].Value= Any( rSettings.maCustomShowName ); aRet[ 10].Value= Any( rSettings.maCustomShowName );
aRet[ 11].Name = TKGet( TK_SaveAsURL ); aRet[ 11].Name = "SaveAsURL";
aRet[ 11].Value= Any( rSettings.maSaveAsURL ); aRet[ 11].Value= Any( rSettings.maSaveAsURL );
aRet[ 12].Name = TKGet( TK_FilterName ); aRet[ 12].Name = "FilterName";
aRet[ 12].Value= Any( rSettings.maFilterName ); aRet[ 12].Value= Any( rSettings.maFilterName );
aRet[ 13].Name = TKGet( TK_OpenNewDocument ); aRet[ 13].Name = "OpenNewDocument";
aRet[ 13].Value= Any( rSettings.mbOpenNewDocument ); aRet[ 13].Value= Any( rSettings.mbOpenNewDocument );
aRet[ 14].Name = TKGet( TK_EstimatedFileSize ); aRet[ 14].Name = "EstimatedFileSize";
aRet[ 14].Value= Any( rSettings.mnEstimatedFileSize ); aRet[ 14].Value= Any( rSettings.mnEstimatedFileSize );
return aRet; return aRet;
} }
......
...@@ -93,16 +93,16 @@ void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference ...@@ -93,16 +93,16 @@ void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference
{ {
Reference< XGraphic > xGraphic; Reference< XGraphic > xGraphic;
Reference< XPropertySet > xShapePropertySet( rxShape, UNO_QUERY_THROW ); Reference< XPropertySet > xShapePropertySet( rxShape, UNO_QUERY_THROW );
if ( xShapePropertySet->getPropertyValue( TKGet( TK_Graphic ) ) >>= xGraphic ) if ( xShapePropertySet->getPropertyValue( "Graphic" ) >>= xGraphic )
{ {
text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 ); text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 );
GraphicCollector::GraphicUser aUser; GraphicCollector::GraphicUser aUser;
aUser.mxShape = rxShape; aUser.mxShape = rxShape;
aUser.mbFillBitmap = sal_False; aUser.mbFillBitmap = sal_False;
xShapePropertySet->getPropertyValue( TKGet( TK_GraphicURL ) ) >>= aUser.maGraphicURL; xShapePropertySet->getPropertyValue( "GraphicURL" ) >>= aUser.maGraphicURL;
xShapePropertySet->getPropertyValue( TKGet( TK_GraphicStreamURL ) ) >>= aUser.maGraphicStreamURL; xShapePropertySet->getPropertyValue( "GraphicStreamURL" ) >>= aUser.maGraphicStreamURL;
xShapePropertySet->getPropertyValue( TKGet( TK_GraphicCrop ) ) >>= aGraphicCropLogic; xShapePropertySet->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropLogic;
awt::Size aLogicalSize( rxShape->getSize() ); awt::Size aLogicalSize( rxShape->getSize() );
// calculating the logical size, as if there were no cropping // calculating the logical size, as if there were no cropping
...@@ -133,12 +133,12 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const ...@@ -133,12 +133,12 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
try try
{ {
FillStyle eFillStyle; FillStyle eFillStyle;
if ( rxPropertySet->getPropertyValue( TKGet( TK_FillStyle ) ) >>= eFillStyle ) if ( rxPropertySet->getPropertyValue( "FillStyle" ) >>= eFillStyle )
{ {
if ( eFillStyle == FillStyle_BITMAP ) if ( eFillStyle == FillStyle_BITMAP )
{ {
Reference< XBitmap > xFillBitmap; Reference< XBitmap > xFillBitmap;
if ( rxPropertySet->getPropertyValue( TKGet( TK_FillBitmap ) ) >>= xFillBitmap ) if ( rxPropertySet->getPropertyValue( "FillBitmap" ) >>= xFillBitmap )
{ {
Reference< XGraphic > xGraphic( xFillBitmap, UNO_QUERY_THROW ); Reference< XGraphic > xGraphic( xFillBitmap, UNO_QUERY_THROW );
if ( xGraphic.is() ) if ( xGraphic.is() )
...@@ -147,18 +147,18 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const ...@@ -147,18 +147,18 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
Reference< XPropertySetInfo > axPropSetInfo( rxPropertySet->getPropertySetInfo() ); Reference< XPropertySetInfo > axPropSetInfo( rxPropertySet->getPropertySetInfo() );
if ( axPropSetInfo.is() ) if ( axPropSetInfo.is() )
{ {
if ( axPropSetInfo->hasPropertyByName( TKGet( TK_FillBitmapMode ) ) ) if ( axPropSetInfo->hasPropertyByName( "FillBitmapMode" ) )
{ {
BitmapMode eBitmapMode; BitmapMode eBitmapMode;
if ( rxPropertySet->getPropertyValue( TKGet( TK_FillBitmapMode ) ) >>= eBitmapMode ) if ( rxPropertySet->getPropertyValue( "FillBitmapMode" ) >>= eBitmapMode )
{ {
if ( ( eBitmapMode == BitmapMode_REPEAT ) || ( eBitmapMode == BitmapMode_NO_REPEAT ) ) if ( ( eBitmapMode == BitmapMode_REPEAT ) || ( eBitmapMode == BitmapMode_NO_REPEAT ) )
{ {
sal_Bool bLogicalSize = sal_False; sal_Bool bLogicalSize = sal_False;
awt::Size aSize( 0, 0 ); awt::Size aSize( 0, 0 );
if ( ( rxPropertySet->getPropertyValue( TKGet( TK_FillBitmapLogicalSize ) ) >>= bLogicalSize ) if ( ( rxPropertySet->getPropertyValue( "FillBitmapLogicalSize" ) >>= bLogicalSize )
&& ( rxPropertySet->getPropertyValue( TKGet( TK_FillBitmapSizeX ) ) >>= aSize.Width ) && ( rxPropertySet->getPropertyValue( "FillBitmapSizeX" ) >>= aSize.Width )
&& ( rxPropertySet->getPropertyValue( TKGet( TK_FillBitmapSizeY ) ) >>= aSize.Height ) ) && ( rxPropertySet->getPropertyValue( "FillBitmapSizeY" ) >>= aSize.Height ) )
{ {
if ( bLogicalSize ) if ( bLogicalSize )
{ {
...@@ -183,7 +183,7 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const ...@@ -183,7 +183,7 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
} }
GraphicCollector::GraphicUser aUser; GraphicCollector::GraphicUser aUser;
aUser.mxPropertySet = rxPropertySet; aUser.mxPropertySet = rxPropertySet;
rxPropertySet->getPropertyValue( TKGet( TK_FillBitmapURL ) ) >>= aUser.maGraphicURL; rxPropertySet->getPropertyValue( "FillBitmapURL" ) >>= aUser.maGraphicURL;
aUser.mbFillBitmap = sal_True; aUser.mbFillBitmap = sal_True;
aUser.maLogicalSize = aLogicalSize; aUser.maLogicalSize = aLogicalSize;
aUser.mxPagePropertySet = rxPagePropertySet; aUser.mxPagePropertySet = rxPagePropertySet;
...@@ -204,11 +204,11 @@ void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxMSF, c ...@@ -204,11 +204,11 @@ void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxMSF, c
{ {
awt::Size aLogicalSize( 28000, 21000 ); awt::Size aLogicalSize( 28000, 21000 );
Reference< XPropertySet > xPropertySet( rxDrawPage, UNO_QUERY_THROW ); Reference< XPropertySet > xPropertySet( rxDrawPage, UNO_QUERY_THROW );
xPropertySet->getPropertyValue( TKGet( TK_Width ) ) >>= aLogicalSize.Width; xPropertySet->getPropertyValue( "Width" ) >>= aLogicalSize.Width;
xPropertySet->getPropertyValue( TKGet( TK_Height ) ) >>= aLogicalSize.Height; xPropertySet->getPropertyValue( "Height" ) >>= aLogicalSize.Height;
Reference< XPropertySet > xBackgroundPropSet; Reference< XPropertySet > xBackgroundPropSet;
if ( xPropertySet->getPropertyValue( TKGet( TK_Background ) ) >>= xBackgroundPropSet ) if ( xPropertySet->getPropertyValue( "Background" ) >>= xBackgroundPropSet )
ImpAddFillBitmapEntity( rxMSF, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet ); ImpAddFillBitmapEntity( rxMSF, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet );
} }
catch( Exception& ) catch( Exception& )
...@@ -252,12 +252,12 @@ awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext ...@@ -252,12 +252,12 @@ awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext
{ {
awt::Size aSize100thMM( 0, 0 ); awt::Size aSize100thMM( 0, 0 );
Reference< XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW ); Reference< XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
if ( xGraphicPropertySet->getPropertyValue( TKGet( TK_Size100thMM ) ) >>= aSize100thMM ) if ( xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSize100thMM )
{ {
if ( !aSize100thMM.Width && !aSize100thMM.Height ) if ( !aSize100thMM.Width && !aSize100thMM.Height )
{ // MAPMODE_PIXEL USED :-( { // MAPMODE_PIXEL USED :-(
awt::Size aSourceSizePixel( 0, 0 ); awt::Size aSourceSizePixel( 0, 0 );
if ( xGraphicPropertySet->getPropertyValue( TKGet( TK_SizePixel ) ) >>= aSourceSizePixel ) if ( xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel )
{ {
const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxMSF ) ); const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxMSF ) );
if ( rDeviceInfo.PixelPerMeterX && rDeviceInfo.PixelPerMeterY ) if ( rDeviceInfo.PixelPerMeterX && rDeviceInfo.PixelPerMeterY )
...@@ -364,7 +364,7 @@ void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const ...@@ -364,7 +364,7 @@ void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const
Reference< XPropertySet > xEmptyPagePropSet; Reference< XPropertySet > xEmptyPagePropSet;
Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW ); Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW );
FillStyle eFillStyle; FillStyle eFillStyle;
if ( xShapePropertySet->getPropertyValue( TKGet( TK_FillStyle ) ) >>= eFillStyle ) if ( xShapePropertySet->getPropertyValue( "FillStyle" ) >>= eFillStyle )
{ {
if ( eFillStyle == FillStyle_BITMAP ) if ( eFillStyle == FillStyle_BITMAP )
{ {
...@@ -385,14 +385,14 @@ void ImpCountBackgroundGraphic( ...@@ -385,14 +385,14 @@ void ImpCountBackgroundGraphic(
{ {
awt::Size aLogicalSize( 28000, 21000 ); awt::Size aLogicalSize( 28000, 21000 );
Reference< XPropertySet > xPropertySet( rxDrawPage, UNO_QUERY_THROW ); Reference< XPropertySet > xPropertySet( rxDrawPage, UNO_QUERY_THROW );
xPropertySet->getPropertyValue( TKGet( TK_Width ) ) >>= aLogicalSize.Width; xPropertySet->getPropertyValue( "Width" ) >>= aLogicalSize.Width;
xPropertySet->getPropertyValue( TKGet( TK_Height ) ) >>= aLogicalSize.Height; xPropertySet->getPropertyValue( "Height" ) >>= aLogicalSize.Height;
Reference< XPropertySet > xBackgroundPropSet; Reference< XPropertySet > xBackgroundPropSet;
if ( xPropertySet->getPropertyValue( TKGet( TK_Background ) ) >>= xBackgroundPropSet ) if ( xPropertySet->getPropertyValue( "Background" ) >>= xBackgroundPropSet )
{ {
FillStyle eFillStyle; FillStyle eFillStyle;
if ( xBackgroundPropSet->getPropertyValue( TKGet( TK_FillStyle ) ) >>= eFillStyle ) if ( xBackgroundPropSet->getPropertyValue( "FillStyle" ) >>= eFillStyle )
{ {
if ( eFillStyle == FillStyle_BITMAP ) if ( eFillStyle == FillStyle_BITMAP )
{ {
......
...@@ -62,14 +62,14 @@ OUString InsertFixedText( InformationDialog& rInformationDialog, const OUString& ...@@ -62,14 +62,14 @@ OUString InsertFixedText( InformationDialog& rInformationDialog, const OUString&
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex ) sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
{ {
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Height ), "Height",
TKGet( TK_Label ), "Label",
TKGet( TK_MultiLine ), "MultiLine",
TKGet( TK_PositionX ), "PositionX",
TKGet( TK_PositionY ), "PositionY",
TKGet( TK_Step ), "Step",
TKGet( TK_TabIndex ), "TabIndex",
TKGet( TK_Width ) }; "Width" };
Any pValues[] = { Any pValues[] = {
Any( nHeight ), Any( nHeight ),
...@@ -101,13 +101,13 @@ OUString InsertImage( ...@@ -101,13 +101,13 @@ OUString InsertImage(
sal_Bool bScale ) sal_Bool bScale )
{ {
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Border ), "Border",
TKGet( TK_Height ), "Height",
TKGet( TK_ImageURL ), "ImageURL",
TKGet( TK_PositionX ), "PositionX",
TKGet( TK_PositionY ), "PositionY",
TKGet( TK_ScaleImage ), "ScaleImage",
TKGet( TK_Width ) }; "Width" };
Any pValues[] = { Any pValues[] = {
Any( sal_Int16( 0 ) ), Any( sal_Int16( 0 ) ),
...@@ -131,14 +131,14 @@ OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString& ...@@ -131,14 +131,14 @@ OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString&
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex ) sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
{ {
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Enabled ), "Enabled",
TKGet( TK_Height ), "Height",
TKGet( TK_Label ), "Label",
TKGet( TK_PositionX ), "PositionX",
TKGet( TK_PositionY ), "PositionY",
TKGet( TK_Step ), "Step",
TKGet( TK_TabIndex ), "TabIndex",
TKGet( TK_Width ) }; "Width" };
Any pValues[] = { Any pValues[] = {
Any( sal_True ), Any( sal_True ),
...@@ -165,15 +165,15 @@ OUString InsertButton( InformationDialog& rInformationDialog, const OUString& rC ...@@ -165,15 +165,15 @@ OUString InsertButton( InformationDialog& rInformationDialog, const OUString& rC
sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID ) sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID )
{ {
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Enabled ), "Enabled",
TKGet( TK_Height ), "Height",
TKGet( TK_Label ), "Label",
TKGet( TK_PositionX ), "PositionX",
TKGet( TK_PositionY ), "PositionY",
TKGet( TK_PushButtonType ), "PushButtonType",
TKGet( TK_Step ), "Step",
TKGet( TK_TabIndex ), "TabIndex",
TKGet( TK_Width ) }; "Width" };
Any pValues[] = { Any pValues[] = {
Any( sal_True ), Any( sal_True ),
...@@ -217,13 +217,13 @@ void InformationDialog::InitDialog() ...@@ -217,13 +217,13 @@ void InformationDialog::InitDialog()
// setting the dialog properties // setting the dialog properties
OUString pNames[] = { OUString pNames[] = {
TKGet( TK_Closeable ), "Closeable",
TKGet( TK_Height ), "Height",
TKGet( TK_Moveable ), "Moveable",
TKGet( TK_PositionX ), "PositionX",
TKGet( TK_PositionY ), "PositionY",
TKGet( TK_Title ), "Title",
TKGet( TK_Width ) }; "Width" };
Any pValues[] = { Any pValues[] = {
Any( sal_True ), Any( sal_True ),
...@@ -304,11 +304,11 @@ void InformationDialog::InitDialog() ...@@ -304,11 +304,11 @@ void InformationDialog::InitDialog()
5, 5, 25, 25, sal_False ); 5, 5, 25, 25, sal_False );
InsertFixedText( *this, OUString("fixedtext"), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); InsertFixedText( *this, OUString("fixedtext"), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
if ( !maSaveAsURL.isEmpty() ) if ( !maSaveAsURL.isEmpty() )
InsertCheckBox( *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 ); InsertCheckBox( *this, "OpenNewDocument", xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 );
InsertButton( *this, OUString("button"), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); InsertButton( *this, OUString("button"), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK );
sal_Bool bOpenNewDocument = mrbOpenNewDocument; sal_Bool bOpenNewDocument = mrbOpenNewDocument;
setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) ); setControlProperty( "OpenNewDocument", "State", Any( (sal_Int16)bOpenNewDocument ) );
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -348,7 +348,7 @@ sal_Bool InformationDialog::execute() ...@@ -348,7 +348,7 @@ sal_Bool InformationDialog::execute()
if ( !maSaveAsURL.isEmpty() ) if ( !maSaveAsURL.isEmpty() )
{ {
sal_Int16 nInt16 = 0; sal_Int16 nInt16 = 0;
Any aAny( getControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ) ) ); Any aAny( getControlProperty( "OpenNewDocument", "State" ) );
if ( aAny >>= nInt16 ) if ( aAny >>= nInt16 )
{ {
sal_Bool bOpenNewDocument = static_cast< sal_Bool >( nInt16 ); sal_Bool bOpenNewDocument = static_cast< sal_Bool >( nInt16 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment