summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/tpoption.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg/tpoption.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpoption.cxx94
1 files changed, 47 insertions, 47 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index bdb4cc230537..b78978aed227 100644..100755
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -96,12 +96,12 @@ SdTpOptionsSnap::~SdTpOptionsSnap()
// -----------------------------------------------------------------------
-BOOL SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
{
SvxGridTabPage::FillItemSet(rAttrs);
SdOptionsSnapItem* pOptsItem = NULL;
-// if(SFX_ITEM_SET != rAttrs.GetItemState( ATTR_OPTIONS_SNAP, FALSE, (const SfxPoolItem**)&pOptsItem ))
-// pExampleSet->GetItemState( ATTR_OPTIONS_SNAP, FALSE, (const SfxPoolItem**)&pOptsItem );
+// if(SFX_ITEM_SET != rAttrs.GetItemState( ATTR_OPTIONS_SNAP, sal_False, (const SfxPoolItem**)&pOptsItem ))
+// pExampleSet->GetItemState( ATTR_OPTIONS_SNAP, sal_False, (const SfxPoolItem**)&pOptsItem );
SdOptionsSnapItem aOptsItem( ATTR_OPTIONS_SNAP );
@@ -112,16 +112,16 @@ BOOL SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
aOptsItem.GetOptionsSnap().SetOrtho( aCbxOrtho.IsChecked() );
aOptsItem.GetOptionsSnap().SetBigOrtho( aCbxBigOrtho.IsChecked() );
aOptsItem.GetOptionsSnap().SetRotate( aCbxRotate.IsChecked() );
- aOptsItem.GetOptionsSnap().SetSnapArea( (INT16) aMtrFldSnapArea.GetValue() );
- aOptsItem.GetOptionsSnap().SetAngle( (INT16) aMtrFldAngle.GetValue() );
- aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (INT16) aMtrFldBezAngle.GetValue() );
+ aOptsItem.GetOptionsSnap().SetSnapArea( (sal_Int16) aMtrFldSnapArea.GetValue() );
+ aOptsItem.GetOptionsSnap().SetAngle( (sal_Int16) aMtrFldAngle.GetValue() );
+ aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (sal_Int16) aMtrFldBezAngle.GetValue() );
if( pOptsItem == NULL || !(aOptsItem == *pOptsItem) )
rAttrs.Put( aOptsItem );
// Evtl. vorhandenes GridItem wird geholt, um nicht versehentlich
// irgendwelche Standardwerte einzustellen
- return( TRUE );
+ return( sal_True );
}
// -----------------------------------------------------------------------
@@ -180,9 +180,9 @@ SdTpOptionsContents::~SdTpOptionsContents()
// -----------------------------------------------------------------------
-BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aCbxRuler.GetSavedValue() != aCbxRuler.IsChecked() ||
aCbxMoveOutline.GetSavedValue() != aCbxMoveOutline.IsChecked() ||
@@ -199,7 +199,7 @@ BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
//aOptsItem.GetOptionsLayout().SetHelplines( aCbxHelplines.IsChecked() );
rAttrs.Put( aOptsItem );
- bModified = TRUE;
+ bModified = sal_True;
}
return( bModified );
}
@@ -289,7 +289,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
// Metrik einstellen
FieldUnit eFUnit;
- USHORT nWhich = GetWhich( SID_ATTR_METRIC );
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
if ( rInAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
{
const SfxUInt16Item& rItem = (SfxUInt16Item&)rInAttrs.Get( nWhich );
@@ -302,13 +302,13 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
// ListBox mit Metriken f"ullen
SvxStringArray aMetricArr( RID_SVXSTR_FIELDUNIT_TABLE );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
long nFieldUnit = aMetricArr.GetValue( i );
- USHORT nPos = aLbMetric.InsertEntry( sMetric );
+ sal_uInt16 nPos = aLbMetric.InsertEntry( sMetric );
aLbMetric.SetEntryData( nPos, (void*)nFieldUnit );
}
aLbMetric.SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
@@ -334,7 +334,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
// Fuellen der CB
- USHORT aTable[ TABLE_COUNT ] =
+ sal_uInt16 aTable[ TABLE_COUNT ] =
{ 1, 2, 4, 5, 8, 10, 16, 20, 30, 40, 50, 100 };
for( i = 0; i < TABLE_COUNT; i++ )
@@ -357,7 +357,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
// Metrik ggfs. aendern (da TabPage im Dialog liegt,
// wo die Metrik eingestellt werden kann
const SfxPoolItem* pAttr = NULL;
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , sal_False,
(const SfxPoolItem**)&pAttr ))
{
const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr;
@@ -368,11 +368,11 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
{
// Metriken einstellen
sal_Int64 nVal = aMtrFldOriginalWidth.Denormalize( aMtrFldOriginalWidth.GetValue( FUNIT_TWIP ) );
- SetFieldUnit( aMtrFldOriginalWidth, eFUnit, TRUE );
+ SetFieldUnit( aMtrFldOriginalWidth, eFUnit, sal_True );
aMtrFldOriginalWidth.SetValue( aMtrFldOriginalWidth.Normalize( nVal ), FUNIT_TWIP );
nVal = aMtrFldOriginalHeight.Denormalize( aMtrFldOriginalHeight.GetValue( FUNIT_TWIP ) );
- SetFieldUnit( aMtrFldOriginalHeight, eFUnit, TRUE );
+ SetFieldUnit( aMtrFldOriginalHeight, eFUnit, sal_True );
aMtrFldOriginalHeight.SetValue( aMtrFldOriginalHeight.Normalize( nVal ), FUNIT_TWIP );
@@ -398,7 +398,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
{
// Parsercheck
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
if( pActiveSet )
@@ -419,9 +419,9 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
// -----------------------------------------------------------------------
-BOOL SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aCbxStartWithTemplate.GetSavedValue() != aCbxStartWithTemplate.IsChecked() ||
aCbxMarkedHitMovesAlways.GetSavedValue()!= aCbxMarkedHitMovesAlways.IsChecked() ||
@@ -451,36 +451,36 @@ BOOL SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
: ::com::sun::star::document::PrinterIndependentLayout::ENABLED);
rAttrs.Put( aOptsItem );
- bModified = TRUE;
+ bModified = sal_True;
}
// Metrik
- const USHORT nMPos = aLbMetric.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aLbMetric.GetSelectEntryPos();
if ( nMPos != aLbMetric.GetSavedValue() )
{
- USHORT nFieldUnit = (USHORT)(long)aLbMetric.GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbMetric.GetEntryData( nMPos );
rAttrs.Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ),
- (UINT16)nFieldUnit ) );
- bModified |= TRUE;
+ (sal_uInt16)nFieldUnit ) );
+ bModified |= sal_True;
}
// Tabulatorabstand
if( aMtrFldTabstop.GetText() != aMtrFldTabstop.GetSavedValue() )
{
- USHORT nWh = GetWhich( SID_ATTR_DEFTABSTOP );
+ sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP );
SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWh );
- SfxUInt16Item aDef( nWh,(USHORT)GetCoreValue( aMtrFldTabstop, eUnit ) );
+ SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( aMtrFldTabstop, eUnit ) );
rAttrs.Put( aDef );
- bModified |= TRUE;
+ bModified |= sal_True;
}
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) );
- bModified = TRUE;
+ bModified = sal_True;
}
return( bModified );
@@ -516,7 +516,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxUsePrinterMetrics.SaveValue();
// Metrik
- USHORT nWhich = GetWhich( SID_ATTR_METRIC );
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
aLbMetric.SetNoSelection();
if ( rAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
@@ -524,7 +524,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
- for ( USHORT i = 0; i < aLbMetric.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aLbMetric.GetEntryCount(); ++i )
{
if ( (long)aLbMetric.GetEntryData( i ) == nFieldUnit )
{
@@ -545,9 +545,9 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aLbMetric.SaveValue();
aMtrFldTabstop.SaveValue();
//Scale
- INT32 nX = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nX = ( (const SfxInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_X ) ).GetValue();
- INT32 nY = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nY = ( (const SfxInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_Y ) ).GetValue();
nWidth = ( (const SfxUInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_WIDTH ) ).GetValue();
@@ -582,7 +582,7 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
IMPL_LINK( SdTpOptionsMisc, SelectMetricHdl_Impl, ListBox *, EMPTYARG )
{
- USHORT nPos = aLbMetric.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbMetric.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -695,11 +695,11 @@ void SdTpOptionsMisc::SetDrawMode()
IMPL_LINK( SdTpOptionsMisc, ModifyScaleHdl, void *, EMPTYARG )
{
// Originalgroesse berechnen
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
- INT32 nW = nWidth * nY / nX;
- INT32 nH = nHeight * nY / nX;
+ sal_Int32 nW = nWidth * nY / nX;
+ sal_Int32 nH = nHeight * nY / nX;
SetMetricValue( aMtrFldOriginalWidth, nW, ePoolUnit );
SetMetricValue( aMtrFldOriginalHeight, nH, ePoolUnit );
@@ -749,7 +749,7 @@ IMPL_LINK( SdTpOptionsMisc, ModifyOriginalScaleHdl, void *, EMPTYARG )
// -----------------------------------------------------------------------
-String SdTpOptionsMisc::GetScale( INT32 nX, INT32 nY )
+String SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
String aScale( UniString::CreateFromInt32( nX ) );
aScale.Append( TOKEN );
@@ -760,28 +760,28 @@ String SdTpOptionsMisc::GetScale( INT32 nX, INT32 nY )
// -----------------------------------------------------------------------
-BOOL SdTpOptionsMisc::SetScale( const String& aScale, INT32& rX, INT32& rY )
+sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY )
{
if( aScale.GetTokenCount( TOKEN ) != 2 )
- return( FALSE );
+ return( sal_False );
ByteString aTmp( aScale.GetToken( 0, TOKEN ), RTL_TEXTENCODING_ASCII_US );
if( !aTmp.IsNumericAscii() )
- return( FALSE );
+ return( sal_False );
rX = (long) aTmp.ToInt32();
if( rX == 0 )
- return( FALSE );
+ return( sal_False );
aTmp = ByteString( aScale.GetToken( 1, TOKEN ), RTL_TEXTENCODING_ASCII_US );
if( !aTmp.IsNumericAscii() )
- return( FALSE );
+ return( sal_False );
rY = (long) aTmp.ToInt32();
if( rY == 0 )
- return( FALSE );
+ return( sal_False );
- return( TRUE );
+ return( sal_True );
}
@@ -848,7 +848,7 @@ void SdTpOptionsMisc::PageCreated (SfxAllItemSet aSet)
SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_SDMODE_FLAG,sal_False);
if (pFlagItem)
{
- UINT32 nFlags=pFlagItem->GetValue();
+ sal_uInt32 nFlags=pFlagItem->GetValue();
if ( ( nFlags & SD_DRAW_MODE ) == SD_DRAW_MODE )
SetDrawMode();
if ( ( nFlags & SD_IMPRESS_MODE ) == SD_IMPRESS_MODE )