Kaydet (Commit) 6a80a5ae authored tarafından Abdulaziz A Alayed's avatar Abdulaziz A Alayed

Convert impress and draw general option to .ui

Change-Id: I8be55720bb8086892b41abde95ece4d13f8da7d1
üst 07dde826
......@@ -76,6 +76,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/printeroptions \
sd/uiconfig/simpress/ui/photoalbum \
sd/uiconfig/simpress/ui/customslideshows \
sd/uiconfig/simpress/ui/optimpressgeneralpage \
))
# vim: set noet sw=4 ts=4:
......@@ -45,7 +45,6 @@
#define HID_SD_WIN_DOCUMENT "SD_HID_SD_WIN_DOCUMENT"
#define HID_SD_OPTIONS_LAYOUT "SD_HID_SD_OPTIONS_LAYOUT"
#define HID_SD_OPTIONS_CONTENTS "SD_HID_SD_OPTIONS_CONTENTS"
#define HID_SD_OPTIONS_MISC "SD_HID_SD_OPTIONS_MISC"
#define HID_SD_EFFECT_PREVIEW "SD_HID_SD_EFFECT_PREVIEW"
#define HID_SD_CTL_NEWFOIL "SD_HID_SD_CTL_NEWFOIL"
#define HID_SD_NAVIGATOR_TLB "SD_HID_SD_NAVIGATOR_TLB"
......
......@@ -213,48 +213,35 @@ SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
#define TOKEN (sal_Unicode(':'))
SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs ) :
SfxTabPage ( pParent, SdResId( TP_OPTIONS_MISC ), rInAttrs ),
aGrpText ( this, SdResId( GRP_TEXT ) ),
aCbxQuickEdit ( this, SdResId( CBX_QUICKEDIT ) ),
aCbxPickThrough ( this, SdResId( CBX_PICKTHROUGH ) ),
// At the moment, template & layout are not running synchronized
aGrpProgramStart ( this, SdResId( GRP_PROGRAMSTART ) ),
aCbxStartWithTemplate ( this, SdResId( CBX_START_WITH_TEMPLATE ) ),
aGrpSettings ( this, SdResId( GRP_SETTINGS ) ),
aCbxMasterPageCache ( this, SdResId( CBX_MASTERPAGE_CACHE ) ),
aCbxCopy ( this, SdResId( CBX_COPY ) ),
aCbxMarkedHitMovesAlways ( this, SdResId( CBX_MARKED_HIT_MOVES_ALWAYS ) ),
aCbxCrookNoContortion ( this, SdResId( CBX_CROOK_NO_CONTORTION ) ),
aTxtMetric ( this, SdResId( FT_METRIC ) ),
aLbMetric ( this, SdResId( LB_METRIC ) ),
aTxtTabstop ( this, SdResId( FT_TABSTOP ) ),
aMtrFldTabstop ( this, SdResId( MTR_FLD_TABSTOP ) ),
aCbxStartWithActualPage ( this, SdResId( CBX_START_WITH_ACTUAL_PAGE ) ),
aGrpStartWithActualPage ( this, SdResId( GRP_START_WITH_ACTUAL_PAGE ) ),
aCbxEnableSdremote ( this, SdResId( CBX_ENABLE_SDREMOTE ) ),
aCbxEnablePresenterScreen ( this, SdResId( CBX_ENABLE_PRESENTER_SCREEN ) ),
aTxtCompatibility ( this, SdResId( FT_COMPATIBILITY ) ),
aCbxUsePrinterMetrics ( this, SdResId( CB_USE_PRINTER_METRICS ) ),
aCbxCompatibility ( this, SdResId( CB_MERGE_PARA_DIST ) ),
aGrpScale ( this, SdResId( GRP_SCALE ) ),
aFtScale ( this, SdResId( FT_SCALE ) ),
aCbScale ( this, SdResId( CB_SCALE ) ),
aFtOriginal ( this, SdResId( FT_ORIGINAL ) ),
aFtEquivalent ( this, SdResId( FT_EQUIVALENT ) ),
aFtPageWidth ( this, SdResId( FT_PAGEWIDTH ) ),
aFiInfo1 ( this, SdResId( FI_INFO_1 ) ),
aMtrFldOriginalWidth ( this, SdResId( MTR_FLD_ORIGINAL_WIDTH ) ),
aFtPageHeight ( this, SdResId( FT_PAGEHEIGHT ) ),
aFiInfo2 ( this, SdResId( FI_INFO_2 ) ),
aMtrFldOriginalHeight ( this, SdResId( MTR_FLD_ORIGINAL_HEIGHT ) ),
aMtrFldInfo1 ( this, WinBits( WB_HIDE ) ),
aMtrFldInfo2 ( this, WinBits( WB_HIDE ) )
SfxTabPage ( pParent, "OptSavePage","modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs )
{
FreeResource();
get(m_pCbxQuickEdit , "qickedit");
get(m_pCbxPickThrough , "textselected");
get(m_pCbxStartWithTemplate,"startwithwizard");
get(m_pCbxMasterPageCache , "backgroundback");
get(m_pCbxCopy , "copywhenmove");
get(m_pCbxMarkedHitMovesAlways , "objalwymov");
get(m_pLbMetric , "units");
get(m_pCbxStartWithActualPage , "strtwithPag");
get(m_pCbxEnableSdremote , "enremotcont");
get(m_pCbxEnablePresenterScreen , "enprsntcons");
get(m_pCbxUsePrinterMetrics , "printermetrc");
get(m_pPresentationFrame , "presentationframe");
get(m_pScaleFrame , "scaleframe");
get(m_pCbScale , "scaleBox");
get(m_pMtrFldTabstop , "metericFields");
get(m_pMtrFldOriginalWidth , "metericWidthFields");
get(m_pMtrFldOriginalHeight , "metericHighteFields");
get(m_pMtrFldInfo1 , "metericInfo1Fields");
get(m_pMtrFldInfo2 , "metericInfo2Fields");
get(m_pCbxCompatibility ,"cbCompatibility" );
get(m_pFiInfo1 , "info1");
get(m_pFiInfo2 , "info2");
get(m_pNewDocLb , "newdoclbl");
get(m_pWidthLb , "widthlbl");
get(m_pHeightLb , "heightlbl");
get(m_pCbxDistrot , "distrotcb");
SetExchangeSupport();
// set metric
......@@ -269,7 +256,11 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
else
eFUnit = SfxModule::GetCurrentFieldUnit();
SetFieldUnit( aMtrFldTabstop, eFUnit );
SetFieldUnit( *m_pMtrFldTabstop , eFUnit );
// Impress is default mode, let' hide the entire scale frame etc.
m_pCbxDistrot->Hide();
m_pScaleFrame->Hide();
// fill ListBox with metrics
SvxStringArray aMetricArr( RID_SVXSTR_FIELDUNIT_TABLE );
......@@ -279,25 +270,25 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
{
String sMetric = aMetricArr.GetStringByPos( i );
long nFieldUnit = aMetricArr.GetValue( i );
sal_uInt16 nPos = aLbMetric.InsertEntry( sMetric );
aLbMetric.SetEntryData( nPos, (void*)nFieldUnit );
sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit );
}
aLbMetric.SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
m_pLbMetric->SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
SetFieldUnit( aMtrFldOriginalWidth, eFUnit );
SetFieldUnit( aMtrFldOriginalHeight, eFUnit );
aMtrFldOriginalWidth.SetLast( 999999999 );
aMtrFldOriginalWidth.SetMax( 999999999 );
aMtrFldOriginalHeight.SetLast( 999999999 );
aMtrFldOriginalHeight.SetMax( 999999999 );
SetFieldUnit( *m_pMtrFldOriginalWidth, eFUnit );
SetFieldUnit( *m_pMtrFldOriginalHeight, eFUnit );
m_pMtrFldOriginalWidth->SetLast( 999999999 );
m_pMtrFldOriginalWidth->SetMax( 999999999 );
m_pMtrFldOriginalHeight->SetLast( 999999999 );
m_pMtrFldOriginalHeight->SetMax( 999999999 );
// temporary fields for info texts (for formatting/calculation)
aMtrFldInfo1.SetUnit( eFUnit );
aMtrFldInfo1.SetMax( 999999999 );
aMtrFldInfo1.SetDecimalDigits( 2 );
aMtrFldInfo2.SetUnit( eFUnit );
aMtrFldInfo2.SetMax( 999999999 );
aMtrFldInfo2.SetDecimalDigits( 2 );
m_pMtrFldInfo1->SetUnit( eFUnit );
m_pMtrFldInfo1->SetMax( 999999999 );
m_pMtrFldInfo1->SetDecimalDigits( 2 );
m_pMtrFldInfo2->SetUnit( eFUnit );
m_pMtrFldInfo2->SetMax( 999999999 );
m_pMtrFldInfo2->SetDecimalDigits( 2 );
// determine PoolUnit
SfxItemPool* pPool = rInAttrs.GetPool();
......@@ -309,9 +300,9 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
{ 1, 2, 4, 5, 8, 10, 16, 20, 30, 40, 50, 100 };
for( i = 0; i < TABLE_COUNT; i++ )
aCbScale.InsertEntry( GetScale( 1, aTable[i] ) );
m_pCbScale->InsertEntry( GetScale( 1, aTable[i] ) );
for( i = 1; i < TABLE_COUNT; i++ )
aCbScale.InsertEntry( GetScale( aTable[i], 1 ) );
m_pCbScale->InsertEntry( GetScale( aTable[i], 1 ) );
}
// -----------------------------------------------------------------------
......@@ -324,7 +315,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
{
// We have to call SaveValue again since it can happen that the value
// has no effect on other TabPages
aLbMetric.SaveValue();
m_pLbMetric->SaveValue();
// change metric if necessary (since TabPage is in the Dialog where
// the metric is set)
const SfxPoolItem* pAttr = NULL;
......@@ -335,30 +326,30 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
FieldUnit eFUnit = (FieldUnit)(long)pItem->GetValue();
if( eFUnit != aMtrFldOriginalWidth.GetUnit() )
if( eFUnit != m_pMtrFldOriginalWidth->GetUnit() )
{
// set metrics
sal_Int64 nVal = aMtrFldOriginalWidth.Denormalize( aMtrFldOriginalWidth.GetValue( FUNIT_TWIP ) );
SetFieldUnit( aMtrFldOriginalWidth, eFUnit, sal_True );
aMtrFldOriginalWidth.SetValue( aMtrFldOriginalWidth.Normalize( nVal ), FUNIT_TWIP );
sal_Int64 nVal = m_pMtrFldOriginalWidth->Denormalize( m_pMtrFldOriginalWidth->GetValue( FUNIT_TWIP ) );
SetFieldUnit( *m_pMtrFldOriginalWidth, eFUnit, sal_True );
m_pMtrFldOriginalWidth->SetValue( m_pMtrFldOriginalWidth->Normalize( nVal ), FUNIT_TWIP );
nVal = aMtrFldOriginalHeight.Denormalize( aMtrFldOriginalHeight.GetValue( FUNIT_TWIP ) );
SetFieldUnit( aMtrFldOriginalHeight, eFUnit, sal_True );
aMtrFldOriginalHeight.SetValue( aMtrFldOriginalHeight.Normalize( nVal ), FUNIT_TWIP );
nVal = m_pMtrFldOriginalHeight->Denormalize( m_pMtrFldOriginalHeight->GetValue( FUNIT_TWIP ) );
SetFieldUnit( *m_pMtrFldOriginalHeight, eFUnit, sal_True );
m_pMtrFldOriginalHeight->SetValue( m_pMtrFldOriginalHeight->Normalize( nVal ), FUNIT_TWIP );
if( nWidth != 0 && nHeight != 0 )
{
aMtrFldInfo1.SetUnit( eFUnit );
aMtrFldInfo2.SetUnit( eFUnit );
m_pMtrFldInfo1->SetUnit( eFUnit );
m_pMtrFldInfo2->SetUnit( eFUnit );
SetMetricValue( aMtrFldInfo1, nWidth, ePoolUnit );
aInfo1 = aMtrFldInfo1.GetText();
aFiInfo1.SetText( aInfo1 );
SetMetricValue( *m_pMtrFldInfo1, nWidth, ePoolUnit );
aInfo1 = m_pMtrFldInfo1->GetText();
m_pFiInfo1->SetText( aInfo1 );
SetMetricValue( aMtrFldInfo2, nHeight, ePoolUnit );
aInfo2 = aMtrFldInfo2.GetText();
aFiInfo2.SetText( aInfo2 );
SetMetricValue( *m_pMtrFldInfo2, nHeight, ePoolUnit );
aInfo2 = m_pMtrFldInfo2->GetText();
m_pFiInfo2->SetText( aInfo2 );
}
}
}
......@@ -370,7 +361,7 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
{
// check parser
sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
if( SetScale( m_pCbScale->GetText(), nX, nY ) )
{
if( pActiveSet )
FillItemSet( *pActiveSet );
......@@ -394,34 +385,32 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
{
sal_Bool bModified = sal_False;
if( aCbxStartWithTemplate.GetSavedValue() != aCbxStartWithTemplate.IsChecked() ||
aCbxMarkedHitMovesAlways.GetSavedValue()!= aCbxMarkedHitMovesAlways.IsChecked() ||
aCbxCrookNoContortion.GetSavedValue() != aCbxCrookNoContortion.IsChecked() ||
aCbxQuickEdit.GetSavedValue() != aCbxQuickEdit.IsChecked() ||
aCbxPickThrough.GetSavedValue() != aCbxPickThrough.IsChecked() ||
aCbxMasterPageCache.GetSavedValue() != aCbxMasterPageCache.IsChecked() ||
aCbxCopy.GetSavedValue() != aCbxCopy.IsChecked() ||
aCbxStartWithActualPage.GetSavedValue() != aCbxStartWithActualPage.IsChecked() ||
aCbxEnableSdremote.GetSavedValue() != aCbxEnableSdremote.IsChecked() ||
aCbxEnablePresenterScreen.GetSavedValue()!= aCbxEnablePresenterScreen.IsChecked() ||
aCbxCompatibility.GetSavedValue() != aCbxCompatibility.IsChecked() ||
aCbxUsePrinterMetrics.GetSavedValue() != aCbxUsePrinterMetrics.IsChecked() )
if( m_pCbxStartWithTemplate->GetSavedValue() != m_pCbxStartWithTemplate->IsChecked() ||
m_pCbxMarkedHitMovesAlways->GetSavedValue()!= m_pCbxMarkedHitMovesAlways->IsChecked() ||
m_pCbxQuickEdit->GetSavedValue() != m_pCbxQuickEdit->IsChecked() ||
m_pCbxPickThrough->GetSavedValue() != m_pCbxPickThrough->IsChecked() ||
m_pCbxMasterPageCache->GetSavedValue() != m_pCbxMasterPageCache->IsChecked() ||
m_pCbxCopy->GetSavedValue() != m_pCbxCopy->IsChecked() ||
m_pCbxStartWithActualPage->GetSavedValue() != m_pCbxStartWithActualPage->IsChecked() ||
m_pCbxEnableSdremote->GetSavedValue() != m_pCbxEnableSdremote->IsChecked() ||
m_pCbxEnablePresenterScreen->GetSavedValue()!= m_pCbxEnablePresenterScreen->IsChecked() ||
m_pCbxCompatibility->GetSavedValue() != m_pCbxCompatibility->IsChecked() ||
m_pCbxUsePrinterMetrics->GetSavedValue() != m_pCbxUsePrinterMetrics->IsChecked() )
{
SdOptionsMiscItem aOptsItem( ATTR_OPTIONS_MISC );
aOptsItem.GetOptionsMisc().SetStartWithTemplate( aCbxStartWithTemplate.IsChecked() );
aOptsItem.GetOptionsMisc().SetMarkedHitMovesAlways( aCbxMarkedHitMovesAlways.IsChecked() );
aOptsItem.GetOptionsMisc().SetCrookNoContortion( aCbxCrookNoContortion.IsChecked() );
aOptsItem.GetOptionsMisc().SetQuickEdit( aCbxQuickEdit.IsChecked() );
aOptsItem.GetOptionsMisc().SetPickThrough( aCbxPickThrough.IsChecked() );
aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching( aCbxMasterPageCache.IsChecked() );
aOptsItem.GetOptionsMisc().SetDragWithCopy( aCbxCopy.IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithActualPage( aCbxStartWithActualPage.IsChecked() );
aOptsItem.GetOptionsMisc().SetEnableSdremote( aCbxEnableSdremote.IsChecked() );
aOptsItem.GetOptionsMisc().SetEnablePresenterScreen( aCbxEnablePresenterScreen.IsChecked() );
aOptsItem.GetOptionsMisc().SetSummationOfParagraphs( aCbxCompatibility.IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithTemplate( m_pCbxStartWithTemplate->IsChecked() );
aOptsItem.GetOptionsMisc().SetMarkedHitMovesAlways( m_pCbxMarkedHitMovesAlways->IsChecked() );
aOptsItem.GetOptionsMisc().SetQuickEdit( m_pCbxQuickEdit->IsChecked() );
aOptsItem.GetOptionsMisc().SetPickThrough( m_pCbxPickThrough->IsChecked() );
aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching( m_pCbxMasterPageCache->IsChecked() );
aOptsItem.GetOptionsMisc().SetDragWithCopy( m_pCbxCopy->IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithActualPage( m_pCbxStartWithActualPage->IsChecked() );
aOptsItem.GetOptionsMisc().SetEnableSdremote( m_pCbxEnableSdremote->IsChecked() );
aOptsItem.GetOptionsMisc().SetEnablePresenterScreen( m_pCbxEnablePresenterScreen->IsChecked() );
aOptsItem.GetOptionsMisc().SetSummationOfParagraphs( m_pCbxCompatibility->IsChecked() );
aOptsItem.GetOptionsMisc().SetPrinterIndependentLayout (
aCbxUsePrinterMetrics.IsChecked()
m_pCbxUsePrinterMetrics->IsChecked()
? ::com::sun::star::document::PrinterIndependentLayout::DISABLED
: ::com::sun::star::document::PrinterIndependentLayout::ENABLED);
rAttrs.Put( aOptsItem );
......@@ -430,27 +419,27 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
}
// metric
const sal_uInt16 nMPos = aLbMetric.GetSelectEntryPos();
if ( nMPos != aLbMetric.GetSavedValue() )
const sal_uInt16 nMPos = m_pLbMetric->GetSelectEntryPos();
if ( nMPos != m_pLbMetric->GetSavedValue() )
{
sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbMetric.GetEntryData( nMPos );
sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pLbMetric->GetEntryData( nMPos );
rAttrs.Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ),
(sal_uInt16)nFieldUnit ) );
bModified |= sal_True;
}
// tabulator space
if( aMtrFldTabstop.GetText() != aMtrFldTabstop.GetSavedValue() )
if( m_pMtrFldTabstop->GetText() != m_pMtrFldTabstop->GetSavedValue() )
{
sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP );
SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWh );
SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( aMtrFldTabstop, eUnit ) );
SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( *m_pMtrFldTabstop, eUnit ) );
rAttrs.Put( aDef );
bModified |= sal_True;
}
sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
if( SetScale( m_pCbScale->GetText(), nX, nY ) )
{
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) );
......@@ -468,45 +457,43 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
SdOptionsMiscItem aOptsItem( (const SdOptionsMiscItem&) rAttrs.
Get( ATTR_OPTIONS_MISC ) );
aCbxStartWithTemplate.Check( aOptsItem.GetOptionsMisc().IsStartWithTemplate() );
aCbxMarkedHitMovesAlways.Check( aOptsItem.GetOptionsMisc().IsMarkedHitMovesAlways() );
aCbxCrookNoContortion.Check( aOptsItem.GetOptionsMisc().IsCrookNoContortion() );
aCbxQuickEdit.Check( aOptsItem.GetOptionsMisc().IsQuickEdit() );
aCbxPickThrough.Check( aOptsItem.GetOptionsMisc().IsPickThrough() );
aCbxMasterPageCache.Check( aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
aCbxCopy.Check( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
aCbxStartWithActualPage.Check( aOptsItem.GetOptionsMisc().IsStartWithActualPage() );
aCbxEnableSdremote.Check( aOptsItem.GetOptionsMisc().IsEnableSdremote() );
aCbxEnablePresenterScreen.Check( aOptsItem.GetOptionsMisc().IsEnablePresenterScreen() );
aCbxCompatibility.Check( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
aCbxUsePrinterMetrics.Check( aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
aCbxStartWithTemplate.SaveValue();
aCbxMarkedHitMovesAlways.SaveValue();
aCbxCrookNoContortion.SaveValue();
aCbxQuickEdit.SaveValue();
aCbxPickThrough.SaveValue();
aCbxMasterPageCache.SaveValue();
aCbxCopy.SaveValue();
aCbxEnableSdremote.SaveValue();
aCbxEnablePresenterScreen.SaveValue();
aCbxCompatibility.SaveValue();
aCbxUsePrinterMetrics.SaveValue();
m_pCbxStartWithTemplate->Check( aOptsItem.GetOptionsMisc().IsStartWithTemplate() );
m_pCbxMarkedHitMovesAlways->Check( aOptsItem.GetOptionsMisc().IsMarkedHitMovesAlways() );
m_pCbxQuickEdit->Check( aOptsItem.GetOptionsMisc().IsQuickEdit() );
m_pCbxPickThrough->Check( aOptsItem.GetOptionsMisc().IsPickThrough() );
m_pCbxMasterPageCache->Check( aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
m_pCbxCopy->Check( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
m_pCbxStartWithActualPage->Check( aOptsItem.GetOptionsMisc().IsStartWithActualPage() );
m_pCbxEnableSdremote->Check( aOptsItem.GetOptionsMisc().IsEnableSdremote() );
m_pCbxEnablePresenterScreen->Check( aOptsItem.GetOptionsMisc().IsEnablePresenterScreen() );
m_pCbxCompatibility->Check( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
m_pCbxUsePrinterMetrics->Check( aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
m_pCbxStartWithTemplate->SaveValue();
m_pCbxMarkedHitMovesAlways->SaveValue();
m_pCbxQuickEdit->SaveValue();
m_pCbxPickThrough->SaveValue();
m_pCbxMasterPageCache->SaveValue();
m_pCbxCopy->SaveValue();
m_pCbxEnableSdremote->SaveValue();
m_pCbxEnablePresenterScreen->SaveValue();
m_pCbxCompatibility->SaveValue();
m_pCbxUsePrinterMetrics->SaveValue();
// metric
sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
aLbMetric.SetNoSelection();
m_pLbMetric->SetNoSelection();
if ( rAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
{
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
for ( sal_uInt16 i = 0; i < aLbMetric.GetEntryCount(); ++i )
for ( sal_uInt16 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
{
if ( (long)aLbMetric.GetEntryData( i ) == nFieldUnit )
if ( (long)m_pLbMetric->GetEntryData( i ) == nFieldUnit )
{
aLbMetric.SelectEntryPos( i );
m_pLbMetric->SelectEntryPos( i );
break;
}
}
......@@ -518,10 +505,10 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
{
SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWhich );
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
SetMetricValue( aMtrFldTabstop, rItem.GetValue(), eUnit );
SetMetricValue( *m_pMtrFldTabstop, rItem.GetValue(), eUnit );
}
aLbMetric.SaveValue();
aMtrFldTabstop.SaveValue();
m_pLbMetric->SaveValue();
m_pMtrFldTabstop->SaveValue();
//Scale
sal_Int32 nX = ( (const SfxInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_X ) ).GetValue();
......@@ -532,18 +519,14 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
nHeight = ( (const SfxUInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_HEIGHT ) ).GetValue();
aCbScale.SetText( GetScale( nX, nY ) );
m_pCbScale->SetText( GetScale( nX, nY ) );
aFtOriginal.Hide();
aFtEquivalent.Hide();
aMtrFldOriginalWidth.Hide();
aMtrFldOriginalWidth.SetText( aInfo1 ); // empty
aMtrFldOriginalHeight.Hide();
aMtrFldOriginalHeight.SetText( aInfo2 ); //empty
aFtPageWidth.Hide();
aFtPageHeight.Hide();
aFiInfo1.Hide();
aFiInfo2.Hide();
m_pMtrFldOriginalWidth->Hide();
m_pMtrFldOriginalWidth->SetText( aInfo1 ); // empty
m_pMtrFldOriginalHeight->Hide();
m_pMtrFldOriginalHeight->SetText( aInfo2 ); //empty
m_pFiInfo1->Hide();
m_pFiInfo2->Hide();
UpdateCompatibilityControls ();
}
......@@ -559,122 +542,51 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl)
{
sal_uInt16 nPos = aLbMetric.GetSelectEntryPos();
sal_uInt16 nPos = m_pLbMetric->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
FieldUnit eUnit = (FieldUnit)(long)aLbMetric.GetEntryData( nPos );
FieldUnit eUnit = (FieldUnit)(long)m_pLbMetric->GetEntryData( nPos );
sal_Int64 nVal =
aMtrFldTabstop.Denormalize( aMtrFldTabstop.GetValue( FUNIT_TWIP ) );
SetFieldUnit( aMtrFldTabstop, eUnit );
aMtrFldTabstop.SetValue( aMtrFldTabstop.Normalize( nVal ), FUNIT_TWIP );
m_pMtrFldTabstop->Denormalize( m_pMtrFldTabstop->GetValue( FUNIT_TWIP ) );
SetFieldUnit( *m_pMtrFldTabstop, eUnit );
m_pMtrFldTabstop->SetValue( m_pMtrFldTabstop->Normalize( nVal ), FUNIT_TWIP );
}
return 0;
}
namespace {
void lcl_MoveWin( Window& rWin, long nYDiff)
{
Point aPos(rWin.GetPosPixel());
aPos.Y() += nYDiff;
rWin.SetPosPixel (aPos);
}
void lcl_MoveWin( Window& rWin, long nXdiff, long nYdiff)
{
Point aPos(rWin.GetPosPixel());
aPos.X() += nXdiff;
aPos.Y() += nYdiff;
rWin.SetPosPixel(aPos);
}
}
void SdTpOptionsMisc::SetImpressMode (void)
{
long nDialogWidth = GetSizePixel().Width();
long nLineHeight = aCbxPickThrough.GetPosPixel().Y()
- aCbxQuickEdit.GetPosPixel().Y();
// Put both "Text objects" check boxes side by side.
lcl_MoveWin (aCbxPickThrough,
nDialogWidth/2 - aCbxPickThrough.GetPosPixel().X(),
-nLineHeight);
// Move the other controls up one line.
lcl_MoveWin (aGrpProgramStart, -nLineHeight);
lcl_MoveWin (aCbxStartWithTemplate, -nLineHeight);
lcl_MoveWin (aGrpSettings, -nLineHeight);
lcl_MoveWin (aCbxMasterPageCache, -nLineHeight);
lcl_MoveWin (aCbxCopy, -nLineHeight);
lcl_MoveWin (aCbxMarkedHitMovesAlways, -nLineHeight);
lcl_MoveWin (aCbxCrookNoContortion, -nLineHeight);
lcl_MoveWin (aTxtMetric, -nLineHeight);
lcl_MoveWin (aLbMetric, -nLineHeight);
lcl_MoveWin (aTxtTabstop, -nLineHeight);
lcl_MoveWin (aMtrFldTabstop, -nLineHeight);
lcl_MoveWin (aGrpStartWithActualPage, -nLineHeight);
lcl_MoveWin (aCbxStartWithActualPage, -nLineHeight);
lcl_MoveWin (aCbxEnableSdremote, -nLineHeight);
lcl_MoveWin (aCbxEnablePresenterScreen,
nDialogWidth/2 - aCbxEnablePresenterScreen.GetPosPixel().X(),
-nLineHeight);
lcl_MoveWin (aTxtCompatibility, -nLineHeight);
// Move the printer-independent-metrics check box up two lines to change
// places with spacing-between-paragraphs check box.
lcl_MoveWin (aCbxUsePrinterMetrics, -2*nLineHeight);
#ifndef ENABLE_SDREMOTE_BLUETOOTH
aCbxEnableSdremote.Hide();
m_pCbxEnableSdremote->Hide();
#endif
}
void SdTpOptionsMisc::SetDrawMode()
{
aCbxStartWithTemplate.Hide();
aGrpProgramStart.Hide();
aCbxStartWithActualPage.Hide();
aCbxEnableSdremote.Hide();
aCbxEnablePresenterScreen.Hide();
aCbxCompatibility.Hide();
aGrpStartWithActualPage.Hide();
aCbxCrookNoContortion.Show();
aGrpScale.Show();
aFtScale.Show();
aCbScale.Show();
aFtOriginal.Show();
aFtEquivalent.Show();
aFtPageWidth.Show();
aFiInfo1.Show();
aMtrFldOriginalWidth.Show();
aFtPageHeight.Show();
aFiInfo2.Show();
aMtrFldOriginalHeight.Show();
long nDiff = aGrpSettings.GetPosPixel().Y() - aGrpProgramStart.GetPosPixel().Y();
lcl_MoveWin( aGrpSettings, -nDiff );
lcl_MoveWin( aCbxMasterPageCache, -nDiff );
lcl_MoveWin( aCbxCopy, -nDiff );
lcl_MoveWin( aCbxMarkedHitMovesAlways, -nDiff );
lcl_MoveWin( aCbxCrookNoContortion, -nDiff );
nDiff -= aCbxCrookNoContortion.GetPosPixel().Y() - aCbxMarkedHitMovesAlways.GetPosPixel().Y();
lcl_MoveWin( aTxtMetric, -nDiff );
lcl_MoveWin( aLbMetric, -nDiff );
lcl_MoveWin( aTxtTabstop, -nDiff );
lcl_MoveWin( aMtrFldTabstop, -nDiff );
// Move the scale controls so that they are visually centered between the
// group controls above and below.
lcl_MoveWin (aFtScale, -17);
lcl_MoveWin (aCbScale, -17);
m_pScaleFrame->Show();
m_pCbxStartWithTemplate->Hide();
m_pCbxStartWithActualPage->Hide();
m_pCbxEnableSdremote->Hide();
m_pCbxEnablePresenterScreen->Hide();
m_pCbxCompatibility->Hide();
m_pNewDocLb->Hide();
m_pCbScale->Show();
m_pPresentationFrame->Hide();
m_pMtrFldInfo1->Hide();
m_pMtrFldInfo2->Hide();
m_pWidthLb->Hide();
m_pHeightLb->Hide();
m_pFiInfo1->Show();
m_pMtrFldOriginalWidth->Show();
m_pFiInfo2->Show();
m_pMtrFldOriginalHeight->Show();
m_pCbxDistrot->Show();
m_pCbxCompatibility->Hide();
// Move the printer-independent-metrics check box in the place that the
// spacing-between-paragraphs check box normally is in.
aCbxUsePrinterMetrics.SetPosPixel (aCbxCompatibility.GetPosPixel());
m_pCbxUsePrinterMetrics->SetPosPixel (m_pCbxCompatibility->GetPosPixel());
}
// -----------------------------------------------------------------------
......@@ -758,9 +670,8 @@ void SdTpOptionsMisc::UpdateCompatibilityControls (void)
// bIsEnabled and disable the controls.
}
aTxtCompatibility.Enable (bIsEnabled);
aCbxCompatibility.Enable(bIsEnabled);
aCbxUsePrinterMetrics.Enable (bIsEnabled);
m_pCbxCompatibility->Enable(bIsEnabled);
m_pCbxUsePrinterMetrics->Enable (bIsEnabled);
}
void SdTpOptionsMisc::PageCreated (SfxAllItemSet aSet)
......
......@@ -70,283 +70,6 @@ TabPage TP_OPTIONS_CONTENTS
TabStop = TRUE ;
Text [ en-US ] = "~Contour of each individual object" ;
};
};
// MISC
TabPage TP_OPTIONS_MISC
{
HelpID = HID_SD_OPTIONS_MISC ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE;
Text [ en-US ] = "Other" ;
FixedLine GRP_TEXT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Text objects" ;
};
CheckBox CBX_QUICKEDIT
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_QUICKEDIT";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Allow quick editing" ;
};
CheckBox CBX_PICKTHROUGH
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_PICKTHROUGH";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Only text area selectable" ;
};
FixedLine GRP_PROGRAMSTART
{
Pos = MAP_APPFONT ( 6 , 42 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "New document" ;
};
CheckBox CBX_START_WITH_TEMPLATE
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_TEMPLATE";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Start with ~wizard" ;
};
FixedLine GRP_SETTINGS
{
Pos = MAP_APPFONT ( 6 , 69 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Settings";
};
CheckBox CBX_MASTERPAGE_CACHE
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_MASTERPAGE_CACHE";
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Use background cache" ;
};
CheckBox CBX_COPY
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_COPY";
Pos = MAP_APPFONT ( 12 , 93 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Copy when moving" ;
};
CheckBox CBX_MARKED_HIT_MOVES_ALWAYS
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_MARKED_HIT_MOVES_ALWAYS";
Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Objects always moveable" ;
};
CheckBox CBX_CROOK_NO_CONTORTION
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_CROOK_NO_CONTORTION";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Hide = TRUE;
Text [ en-US ] = "Do not distort objects in curve" ;
};
FixedText FT_METRIC
{
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 60 , 8 ) ;
Text [ en-US ] = "Unit of ~measurement" ;
};
ListBox LB_METRIC
{
HelpID = "sd:ListBox:TP_OPTIONS_MISC:LB_METRIC";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 117 ) ;
Size = MAP_APPFONT ( 50 , 50 ) ;
DropDown = TRUE ;
};
FixedText FT_TABSTOP
{
Pos = MAP_APPFONT ( 130 , 119 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Right = TRUE;
Text [ en-US ] = "Ta~b stops" ;
};
MetricField MTR_FLD_TABSTOP
{
HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_TABSTOP";
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 117 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Unit = FUNIT_CM ;
SpinSize = 10 ;
Minimum = 50 ;
Maximum = 2000;
First = 50 ;
Last = 2000 ;
StrictFormat = TRUE ;
DecimalDigits = 2 ;
};
FixedLine GRP_START_WITH_ACTUAL_PAGE
{
Pos = MAP_APPFONT ( 6 , 134 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Presentation" ;
};
CheckBox CBX_START_WITH_ACTUAL_PAGE
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE";
Pos = MAP_APPFONT ( 12 , 145 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Always with current page" ;
};
CheckBox CBX_ENABLE_SDREMOTE
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_ENABLE_SDREMOTE";
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Enable remote control" ;
};
CheckBox CBX_ENABLE_PRESENTER_SCREEN
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_ENABLE_PRESENTER_SCREEN";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Enable Presenter Console" ;
};
FixedLine FT_COMPATIBILITY
{
Pos = MAP_APPFONT ( 6 , 173 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Compatibility" ;
};
CheckBox CB_USE_PRINTER_METRICS
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CB_USE_PRINTER_METRICS";
// This checkbox and the following one will change places when this
// one is wired in into the dialog. At the moment exists only for
// translation to work on.
Pos = MAP_APPFONT ( 12 , 197 ) ;
Size = MAP_APPFONT ( 242, 10 ) ;
Text [ en-US ] = "Us~e printer metrics for document formatting";
};
CheckBox CB_MERGE_PARA_DIST
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CB_MERGE_PARA_DIST";
Pos = MAP_APPFONT ( 12 , 184 ) ;
Size = MAP_APPFONT ( 242, 10 ) ;
Text [ en-US ] = "Add ~spacing between paragraphs and tables (in current document)";
};
FixedLine GRP_SCALE
{
Hide = TRUE;
Pos = MAP_APPFONT ( 6 , 122 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
SCALE_TEXT
};
FixedText FT_ORIGINAL
{
Hide = TRUE;
Pos = MAP_APPFONT ( 155 , 133 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "Original";
};
FixedText FT_EQUIVALENT
{
Hide = TRUE;
Pos = MAP_APPFONT ( 206 , 133 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "Equivalent to";
};
FixedText FT_SCALE
{
Hide = TRUE;
Pos = MAP_APPFONT ( 12 , 149 ) ;
Size = MAP_APPFONT ( 56 , 8 ) ;
Text [ en-US ] = "~Drawing scale";
};
ComboBox CB_SCALE
{
HelpID = "sd:ComboBox:TP_OPTIONS_MISC:CB_SCALE";
Hide = TRUE;
Pos = MAP_APPFONT ( 72 , 147 ) ;
Size = MAP_APPFONT ( 30 , 70 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
};
FixedText FT_PAGEWIDTH
{
Hide = TRUE;
Pos = MAP_APPFONT ( 105 , 149 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
Text [ en-US ] = "Page ~width" ;
};
FixedText FI_INFO_1
{
Hide = TRUE;
Pos = MAP_APPFONT ( 155 , 149 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
};
MetricField MTR_FLD_ORIGINAL_WIDTH
{
HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_ORIGINAL_WIDTH";
Hide = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 147 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
SpinSize = 100 ;
Minimum = 1 ;
Maximum = 999999999 ;
StrictFormat = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_MM ;
First = 1 ;
Last = 999999999 ;
};
FixedText FT_PAGEHEIGHT
{
Hide = TRUE;
Pos = MAP_APPFONT ( 105 , 165 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
Text [ en-US ] = "Page ~height" ;
};
FixedText FI_INFO_2
{
Hide = TRUE;
Pos = MAP_APPFONT ( 155 , 165 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
};
MetricField MTR_FLD_ORIGINAL_HEIGHT
{
HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_ORIGINAL_HEIGHT";
Hide = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 163 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
SpinSize = 100 ;
Minimum = 1 ;
Maximum = 999999999 ;
StrictFormat = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_MM ;
First = 1 ;
Last = 999999999 ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -19,29 +19,18 @@
#define TP_OPTIONS_LAYOUT 596
#define TP_OPTIONS_CONTENTS 597
#define TP_OPTIONS_SNAP 598
#define TP_OPTIONS_MISC 599
#define FT_METRIC 2
#define GRP_PROGRAMSTART 3
#define GRP_DISPLAY 4
#define GRP_SETTINGS 5
#define GRP_TEXT 6
#define FT_TABSTOP 7
#define CBX_COPY 13
#define CBX_RULER 14
#define CBX_HELPLINES 1
#define CBX_MOVE_OUTLINE 15
#define CBX_MARKED_HIT_MOVES_ALWAYS 19
#define CBX_CROOK_NO_CONTORTION 21
#define CBX_HANDLES_BEZIER 2
#define GRP_SNAP 1
#define GRP_ORTHO 2
#define FT_SNAP_AREA 1
#define FT_BEZ_ANGLE 4
#define LB_METRIC 1
#define MTR_FLD_SNAP_AREA 1
#define MTR_FLD_ANGLE 2
#define MTR_FLD_BEZ_ANGLE 3
#define MTR_FLD_TABSTOP 4
#define CBX_ROTATE 8
#define CBX_ORTHO 6
#define CBX_BIGORTHO 7
......@@ -50,29 +39,5 @@
#define CBX_SNAP_BORDER 3
#define CBX_SNAP_FRAME 4
#define CBX_SNAP_POINTS 5
#define CBX_START_WITH_TEMPLATE 6
#define CBX_PICKTHROUGH 9
#define CBX_QUICKEDIT 24
#define CBX_MASTERPAGE_CACHE 25
#define CBX_START_WITH_ACTUAL_PAGE 26
#define GRP_START_WITH_ACTUAL_PAGE 8
#define FT_COMPATIBILITY 27
#define CB_MERGE_PARA_DIST 28
#define CB_SCALE 29
#define FT_ORIGINAL 30
#define MTR_FLD_ORIGINAL_WIDTH 31
#define FT_EQUIVALENT 32
#define MTR_FLD_ORIGINAL_HEIGHT 33
#define GRP_SCALE 34
#define FI_INFO_1 35
#define FI_INFO_2 36
#define FT_PAGEWIDTH 37
#define FT_PAGEHEIGHT 38
#define FT_SCALE 39
#define CB_USE_PRINTER_METRICS 40
#define CBX_ENABLE_SDREMOTE 41
#define CBX_ENABLE_PRESENTER_SCREEN 42
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -76,50 +76,38 @@ class SdTpOptionsMisc : public SfxTabPage
friend class SdModule;
private:
FixedLine aGrpText;
CheckBox aCbxQuickEdit;
CheckBox aCbxPickThrough;
FixedLine aGrpProgramStart;
CheckBox aCbxStartWithTemplate;
FixedLine aGrpSettings;
CheckBox aCbxMasterPageCache;
CheckBox aCbxCopy;
CheckBox aCbxMarkedHitMovesAlways;
CheckBox aCbxCrookNoContortion;
FixedText aTxtMetric;
ListBox aLbMetric;
FixedText aTxtTabstop;
MetricField aMtrFldTabstop;
CheckBox aCbxStartWithActualPage;
FixedLine aGrpStartWithActualPage;
CheckBox aCbxEnableSdremote;
CheckBox aCbxEnablePresenterScreen;
FixedLine aTxtCompatibility;
CheckBox aCbxUsePrinterMetrics;
CheckBox aCbxCompatibility;
CheckBox *m_pCbxQuickEdit;
CheckBox *m_pCbxPickThrough;
//Scale
FixedLine aGrpScale;
FixedText aFtScale;
ComboBox aCbScale;
CheckBox *m_pCbxStartWithTemplate;
FixedText aFtOriginal;
FixedText aFtEquivalent;
CheckBox *m_pCbxMasterPageCache;
CheckBox *m_pCbxCopy;
CheckBox *m_pCbxMarkedHitMovesAlways;
VclFrame *m_pPresentationFrame;
FixedText aFtPageWidth;
FixedInfo aFiInfo1;
MetricField aMtrFldOriginalWidth;
ListBox *m_pLbMetric;
MetricField *m_pMtrFldTabstop;
FixedText aFtPageHeight;
FixedInfo aFiInfo2;
MetricField aMtrFldOriginalHeight;
CheckBox *m_pCbxStartWithActualPage;
CheckBox *m_pCbxEnableSdremote;
CheckBox *m_pCbxEnablePresenterScreen;
CheckBox *m_pCbxUsePrinterMetrics;
CheckBox *m_pCbxCompatibility;
MetricField aMtrFldInfo1;
MetricField aMtrFldInfo2;
//Scale
VclFrame *m_pScaleFrame;
ComboBox *m_pCbScale;
FixedText *m_pNewDocLb;
FixedText *m_pFiInfo1;
MetricField *m_pMtrFldOriginalWidth;
FixedText *m_pWidthLb;
FixedText *m_pHeightLb;
FixedText *m_pFiInfo2;
MetricField *m_pMtrFldOriginalHeight;
CheckBox *m_pCbxDistrot;
MetricField *m_pMtrFldInfo1;
MetricField *m_pMtrFldInfo2;
sal_uInt32 nWidth;
sal_uInt32 nHeight;
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkBox" id="OptSavePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">69</property>
<child>
<object class="GtkCheckButton" id="qickedit">
<property name="label" translatable="yes">Allow quick editing</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="textselected">
<property name="label" translatable="yes">Only text area selected</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="image_position">right</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text objects</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<child>
<object class="GtkCheckButton" id="startwithwizard">
<property name="label" translatable="yes">Start with wizard</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="newdoclbl">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">New document</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="column_spacing">12</property>
<property name="column_homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="copywhenmove">
<property name="label" translatable="yes">Copy when moving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="objalwymov">
<property name="label" translatable="yes">Objects always moveable</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="units">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_span_column">7</property>
<property name="add_tearoffs">True</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="ypad">1</property>
<property name="label" translatable="yes">Unit of _measurement</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">units</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="backgroundback">
<property name="label" translatable="yes">Use background back</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="tapstoplabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="double_buffered">False</property>
<property name="xpad">40</property>
<property name="label" translatable="yes">Tab sto_ps</property>
<property name="use_underline">True</property>
<property name="justify">fill</property>
<property name="mnemonic_widget">metericFields:0.00mm</property>
<property name="track_visited_links">False</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="distrotcb">
<property name="label" translatable="yes">Do not distort objects in curve</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="double_buffered">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="metericFields:0,00mm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="digits">1</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">3</property>
<property name="label" translatable="yes">Settings</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="presentationframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<child>
<object class="GtkCheckButton" id="strtwithPag">
<property name="label" translatable="yes">Always with current page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="enremotcont">
<property name="label" translatable="yes">Enable remote control</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="enprsntcons">
<property name="label" translatable="yes">Enable Presenter Console</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Presentation</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="scaleframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="double_buffered">False</property>
<property name="row_spacing">50</property>
<property name="column_spacing">50</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="double_buffered">False</property>
<property name="margin_right">3</property>
<property name="label" translatable="yes">Drawin_g scale</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">scaleBox</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="scaleBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_span_column">300</property>
<property name="column_span_column">2</property>
<property name="active">0</property>
<property name="button_sensitivity">off</property>
<property name="has_entry">True</property>
<property name="popup_fixed_width">False</property>
<child internal-child="entry">
<object class="GtkEntry" id="combobox-entry2">
<property name="can_focus">False</property>
<property name="xalign">0.5</property>
<property name="shadow_type">none</property>
<property name="caps_lock_warning">False</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="widthlbl">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Width</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heightlbl">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Height</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="metericWidthFields:0.00mm">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="metericHighteFields:0.00mm">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="info1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">info1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="metericInfo1Fields:0.00mm">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="info2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.47999998927116394</property>
<property name="yalign">0.43000000715255737</property>
<property name="label" translatable="yes">info2</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="metericInfo2Fields:0.00mm">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Scale</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="printermetrc">
<property name="label" translatable="yes">Use printer metrics for document formatting</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cbCompatibility">
<property name="label" translatable="yes">Add spacing between paragraphs and tables (in current document)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.49000000953674316</property>
<property name="yalign">0.49000000953674316</property>
<property name="label" translatable="yes">Compatibility</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">5</property>
<property name="upper">2000</property>
<property name="value">50</property>
<property name="step_increment">10</property>
<property name="page_increment">10</property>
</object>
</interface>
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