summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2013-03-18 13:36:24 +0100
committerAndras Timar <atimar@suse.com>2013-03-19 12:41:27 +0000
commit5c0dd406207e42aae4d3dbaca8235cc5ab01bc6b (patch)
tree539285458e60aedb6b1a6c1725219452415d81eb /cui/source
parent293006f92171b048f528664cc4e4be1d983a9367 (diff)
converted cui/source/options/optsave.src to .ui
Change-Id: Ieaef10684f45dc699e7d2c56dffca5483f0a30cc Reviewed-on: https://gerrit.libreoffice.org/2816 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/options/optsave.cxx314
-rw-r--r--cui/source/options/optsave.hrc30
-rw-r--r--cui/source/options/optsave.hxx47
-rw-r--r--cui/source/options/optsave.src216
4 files changed, 162 insertions, 445 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index cc1a243a1b82..a221e4d176df 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -54,10 +54,6 @@ using namespace com::sun::star::container;
using namespace comphelper;
#define CFG_PAGE_AND_GROUP OUString("General"), OUString("LoadSave")
-// !! you have to update these index, if you changed the list of the child windows !!
-#define WININDEX_AUTOSAVE ((sal_uInt16) 6)
-#define WININDEX_USERAUTOSAVE ((sal_uInt16) 9)
-#define WININDEX_SAVEURL_RELFSYS ((sal_uInt16)10)
// ----------------------------------------------------------------------
@@ -87,53 +83,53 @@ SvxSaveTabPage_Impl::~SvxSaveTabPage_Impl()
// class SvxSaveTabPage --------------------------------------------------
SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
-
- SfxTabPage( pParent, CUI_RES( RID_SFXPAGE_SAVE ), rCoreSet ),
-
- aLoadFL ( this, CUI_RES( LB_LOAD ) ),
- aLoadUserSettingsCB ( this, CUI_RES( CB_LOAD_SETTINGS ) ),
- aLoadDocPrinterCB ( this, CUI_RES( CB_LOAD_DOCPRINTER ) ),
-
- aSaveFL ( this, CUI_RES( GB_SAVE ) ),
- aDocInfoCB ( this, CUI_RES( BTN_DOCINFO ) ),
- aBackupFI ( this, CUI_RES( FI_BACKUP ) ),
- aBackupCB ( this, CUI_RES( BTN_BACKUP ) ),
- aAutoSaveCB ( this, CUI_RES( BTN_AUTOSAVE ) ),
- aAutoSaveEdit ( this, CUI_RES( ED_AUTOSAVE ) ),
- aMinuteFT ( this, CUI_RES( FT_MINUTE ) ),
- aUserAutoSaveCB ( this, CUI_RES( BTN_USERAUTOSAVE ) ),
- aRelativeFsysCB ( this, CUI_RES( BTN_RELATIVE_FSYS ) ),
- aRelativeInetCB ( this, CUI_RES( BTN_RELATIVE_INET ) ),
-
- aDefaultFormatFL ( this, CUI_RES( FL_FILTER ) ),
- aODFVersionFT ( this, CUI_RES( FT_ODF_VERSION ) ),
- aODFVersionLB ( this, CUI_RES( LB_ODF_VERSION ) ),
- aSizeOptimizationCB ( this, CUI_RES( BTN_NOPRETTYPRINTING ) ),
- aWarnAlienFormatCB ( this, CUI_RES( BTN_WARNALIENFORMAT ) ),
- aDocTypeFT ( this, CUI_RES( FT_APP ) ),
- aDocTypeLB ( this, CUI_RES( LB_APP ) ),
- aSaveAsFT ( this, CUI_RES( FT_FILTER ) ),
- aSaveAsFI ( this, CUI_RES( FI_FILTER ) ),
- aSaveAsLB ( this, CUI_RES( LB_FILTER ) ),
- aODFWarningFI ( this, CUI_RES( FI_ODF_WARNING ) ),
- aODFWarningFT ( this, CUI_RES( FT_WARN ) ),
-
+ SfxTabPage( pParent, "OptSavePage", "cui/ui/optsavepage.ui", rCoreSet ),
pImpl ( new SvxSaveTabPage_Impl )
-
{
- aODFWarningFI.SetImage( Image( CUI_RES( IMG_ODF_WARNING )));
-
- FreeResource();
+ get(aLoadUserSettingsCB, "load_settings");
+ get(aLoadDocPrinterCB, "load_docprinter");
+
+ get(aDocInfoCB, "docinfo");
+ get(aBackupCB, "backup");
+ get(aAutoSaveCB, "autosave");
+ get(aAutoSaveEdit, "autosave_spin");
+ get(aMinuteFT, "autosave_mins");
+ get(aUserAutoSaveCB, "userautosave");
+ get(aRelativeFsysCB, "relative_fsys");
+ get(aRelativeInetCB, "relative_inet");
+
+ get(aODFVersionLB, "odfversion");
+ get(aSizeOptimizationCB, "sizeoptimization");
+ get(aWarnAlienFormatCB, "warnalienformat");
+ get(aDocTypeLB, "doctype");
+ get(aSaveAsFT, "saveas_label");
+ get(aSaveAsLB, "saveas");
+ get(aODFWarningFI, "odfwarning_image");
+ get(aODFWarningFT, "odfwarning_label");
+
+
+ aODFVersionLB->SetEntryData(0, (void*)2 ); // 1.0/1.1
+ aODFVersionLB->SetEntryData(1, (void*)4 ); // 1.2
+ aODFVersionLB->SetEntryData(2, (void*)8 ); // 1.2 Extended (compat mode)
+ aODFVersionLB->SetEntryData(3, (void*)0x7fffffff); // 1.2 Extended (recommended)
+
+ aDocTypeLB->SetEntryData(0, (void*)APP_WRITER );
+ aDocTypeLB->SetEntryData(1, (void*)APP_WRITER_WEB );
+ aDocTypeLB->SetEntryData(2, (void*)APP_WRITER_GLOBAL);
+ aDocTypeLB->SetEntryData(3, (void*)APP_CALC );
+ aDocTypeLB->SetEntryData(4, (void*)APP_IMPRESS );
+ aDocTypeLB->SetEntryData(5, (void*)APP_DRAW );
+ aDocTypeLB->SetEntryData(6, (void*)APP_MATH );
Link aLink = LINK( this, SfxSaveTabPage, AutoClickHdl_Impl );
- aAutoSaveCB.SetClickHdl( aLink );
- aAutoSaveEdit.SetMaxTextLen( 2 );
+ aAutoSaveCB->SetClickHdl( aLink );
+ aAutoSaveEdit->SetMaxTextLen( 2 );
SvtModuleOptions aModuleOpt;
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) )
{
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_MATH ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_MATH ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_MATH ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_MATH ));
}
else
{
@@ -143,8 +139,8 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
{
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_DRAW ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_DRAW ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_DRAW ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_DRAW ));
}
else
{
@@ -154,8 +150,8 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
{
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_IMPRESS ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_IMPRESS ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_IMPRESS ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_IMPRESS ));
}
else
{
@@ -165,8 +161,8 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
{
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_CALC ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_CALC ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_CALC ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_CALC ));
}
else
{
@@ -176,12 +172,12 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
{
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER ));
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_WEB ));
- aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_GLOBAL ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_WEB ));
- aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_GLOBAL ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_WRITER ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_WRITER_WEB ));
+ aSaveAsLB->RemoveEntry(aSaveAsLB->GetEntryPos( (void*) APP_WRITER_GLOBAL ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_WRITER ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_WRITER_WEB ));
+ aDocTypeLB->RemoveEntry(aDocTypeLB->GetEntryPos( (void*) APP_WRITER_GLOBAL ));
}
else
{
@@ -194,10 +190,10 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
}
aLink = LINK( this, SfxSaveTabPage, ODFVersionHdl_Impl );
- aODFVersionLB.SetSelectHdl( aLink );
+ aODFVersionLB->SetSelectHdl( aLink );
aLink = LINK( this, SfxSaveTabPage, FilterHdl_Impl );
- aDocTypeLB.SetSelectHdl( aLink );
- aSaveAsLB.SetSelectHdl( aLink );
+ aDocTypeLB->SetSelectHdl( aLink );
+ aSaveAsLB->SetSelectHdl( aLink );
DetectHiddenControls();
}
@@ -220,133 +216,106 @@ SfxTabPage* SfxSaveTabPage::Create( Window* pParent,
// -----------------------------------------------------------------------
void SfxSaveTabPage::DetectHiddenControls()
{
- long nDelta = 0;
- // the index of the first child window which perhaps have to move upwards
- sal_uInt16 nWinIndex = WININDEX_SAVEURL_RELFSYS;
SvtOptionsDialogOptions aOptionsDlgOpt;
if ( aOptionsDlgOpt.IsOptionHidden( "Backup", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "Backup"
- aBackupFI.Hide();
- aBackupCB.Hide();
- // the other controls have to move upwards the height of checkbox + space
- nDelta = aAutoSaveCB.GetPosPixel().Y() - aBackupCB.GetPosPixel().Y();
+ aBackupCB->Hide();
}
if ( aOptionsDlgOpt.IsOptionHidden( "AutoSave", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "AutoSave"
- aAutoSaveCB.Hide();
- aAutoSaveEdit.Hide();
- aMinuteFT.Hide();
- // the other controls have to move upwards the height of checkbox + space
- nDelta += aUserAutoSaveCB.GetPosPixel().Y() - aAutoSaveCB.GetPosPixel().Y();
+ aAutoSaveCB->Hide();
+ aAutoSaveEdit->Hide();
+ aMinuteFT->Hide();
}
- else if ( nDelta > 0 )
- // the "AutoSave" controls have to move upwards too
- nWinIndex = WININDEX_AUTOSAVE;
if ( aOptionsDlgOpt.IsOptionHidden( "UserAutoSave", CFG_PAGE_AND_GROUP ) )
{
// hide controls of "UserAutoSave"
- aUserAutoSaveCB.Hide();
- // the other controls have to move upwards the height of checkbox + space
- nDelta += aRelativeFsysCB.GetPosPixel().Y() - aUserAutoSaveCB.GetPosPixel().Y();
+ aUserAutoSaveCB->Hide();
}
- else if ( nDelta > 0 )
- // the "UserAutoSave" controls have to move upwards too
- nWinIndex = WININDEX_USERAUTOSAVE;
- if ( nDelta > 0 )
- {
- sal_uInt16 i, nChildCount = GetChildCount();
- for ( i = nWinIndex; i < nChildCount; ++i )
- {
- Window* pWin = GetChild(i);
- Point aPos = pWin->GetPosPixel();
- aPos.Y() -= nDelta;
- pWin->SetPosPixel( aPos );
- }
- }
}
// -----------------------------------------------------------------------
sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
{
sal_Bool bModified = sal_False;
SvtSaveOptions aSaveOpt;
- if(aLoadUserSettingsCB.IsChecked() != aLoadUserSettingsCB.GetSavedValue())
+ if(aLoadUserSettingsCB->IsChecked() != aLoadUserSettingsCB->GetSavedValue())
{
- aSaveOpt.SetLoadUserSettings(aLoadUserSettingsCB.IsChecked());
+ aSaveOpt.SetLoadUserSettings(aLoadUserSettingsCB->IsChecked());
}
- if ( aLoadDocPrinterCB.IsChecked() != aLoadDocPrinterCB.GetSavedValue() )
- aSaveOpt.SetLoadDocumentPrinter( aLoadDocPrinterCB.IsChecked() );
+ if ( aLoadDocPrinterCB->IsChecked() != aLoadDocPrinterCB->GetSavedValue() )
+ aSaveOpt.SetLoadDocumentPrinter( aLoadDocPrinterCB->IsChecked() );
- if ( aODFVersionLB.GetSelectEntryPos() != aODFVersionLB.GetSavedValue() )
+ if ( aODFVersionLB->GetSelectEntryPos() != aODFVersionLB->GetSavedValue() )
{
- long nVersion = long( aODFVersionLB.GetEntryData( aODFVersionLB.GetSelectEntryPos() ) );
+ long nVersion = long( aODFVersionLB->GetEntryData( aODFVersionLB->GetSelectEntryPos() ) );
aSaveOpt.SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( nVersion ) );
}
- if ( aDocInfoCB.IsChecked() != aDocInfoCB.GetSavedValue() )
+ if ( aDocInfoCB->IsChecked() != aDocInfoCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ),
- aDocInfoCB.IsChecked() ) );
+ aDocInfoCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aBackupCB.IsEnabled() && aBackupCB.IsChecked() != aBackupCB.GetSavedValue() )
+ if ( aBackupCB->IsEnabled() && aBackupCB->IsChecked() != aBackupCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ),
- aBackupCB.IsChecked() ) );
+ aBackupCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aSizeOptimizationCB.IsChecked() != aSizeOptimizationCB.GetSavedValue() )
+ if ( aSizeOptimizationCB->IsChecked() != aSizeOptimizationCB->GetSavedValue() )
{
- rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), !aSizeOptimizationCB.IsChecked() ) );
+ rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), !aSizeOptimizationCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aAutoSaveCB.IsChecked() != aAutoSaveCB.GetSavedValue() )
+ if ( aAutoSaveCB->IsChecked() != aAutoSaveCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ),
- aAutoSaveCB.IsChecked() ) );
+ aAutoSaveCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aWarnAlienFormatCB.IsChecked() != aWarnAlienFormatCB.GetSavedValue() )
+ if ( aWarnAlienFormatCB->IsChecked() != aWarnAlienFormatCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_WARNALIENFORMAT ),
- aWarnAlienFormatCB.IsChecked() ) );
+ aWarnAlienFormatCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aAutoSaveEdit.GetText() != aAutoSaveEdit.GetSavedValue() )
+ if ( aAutoSaveEdit->GetText() != aAutoSaveEdit->GetSavedValue() )
{
rSet.Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ),
- (sal_uInt16)aAutoSaveEdit.GetValue() ) );
+ (sal_uInt16)aAutoSaveEdit->GetValue() ) );
bModified |= sal_True;
}
- if ( aUserAutoSaveCB.IsChecked() != aUserAutoSaveCB.GetSavedValue() )
+ if ( aUserAutoSaveCB->IsChecked() != aUserAutoSaveCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_USERAUTOSAVE ),
- aUserAutoSaveCB.IsChecked() ) );
+ aUserAutoSaveCB->IsChecked() ) );
bModified |= sal_True;
}
// save relatively
- if ( aRelativeFsysCB.IsChecked() != aRelativeFsysCB.GetSavedValue() )
+ if ( aRelativeFsysCB->IsChecked() != aRelativeFsysCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_FSYS ),
- aRelativeFsysCB.IsChecked() ) );
+ aRelativeFsysCB->IsChecked() ) );
bModified |= sal_True;
}
- if ( aRelativeInetCB.IsChecked() != aRelativeInetCB.GetSavedValue() )
+ if ( aRelativeInetCB->IsChecked() != aRelativeInetCB->GetSavedValue() )
{
rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_INET ),
- aRelativeInetCB.IsChecked() ) );
+ aRelativeInetCB->IsChecked() ) );
bModified |= sal_True;
}
@@ -421,10 +390,10 @@ sal_Bool isODFFormat( OUString sFilter )
void SfxSaveTabPage::Reset( const SfxItemSet& )
{
SvtSaveOptions aSaveOpt;
- aLoadUserSettingsCB.Check(aSaveOpt.IsLoadUserSettings());
- aLoadUserSettingsCB.SaveValue();
- aLoadDocPrinterCB.Check( aSaveOpt.IsLoadDocumentPrinter() );
- aLoadDocPrinterCB.SaveValue();
+ aLoadUserSettingsCB->Check(aSaveOpt.IsLoadUserSettings());
+ aLoadUserSettingsCB->SaveValue();
+ aLoadDocPrinterCB->Check( aSaveOpt.IsLoadDocumentPrinter() );
+ aLoadDocPrinterCB->SaveValue();
if ( !pImpl->bInitialized )
{
@@ -438,9 +407,9 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY);
if(xQuery.is())
{
- for(sal_uInt16 n = 0; n < aDocTypeLB.GetEntryCount(); n++)
+ for(sal_uInt16 n = 0; n < aDocTypeLB->GetEntryCount(); n++)
{
- long nData = (long) aDocTypeLB.GetEntryData(n);
+ long nData = (long) aDocTypeLB->GetEntryData(n);
OUString sCommand;
sCommand = "matchByDocumentService=%1:iflags=" +
OUString::number(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT) +
@@ -482,8 +451,8 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
pImpl->aODFArr[nData] = lODFList.getAsConstList();
}
}
- aDocTypeLB.SelectEntryPos(0);
- FilterHdl_Impl(&aDocTypeLB);
+ aDocTypeLB->SelectEntryPos(0);
+ FilterHdl_Impl(aDocTypeLB);
}
catch(Exception& e)
{
@@ -500,65 +469,64 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
pImpl->bInitialized = sal_True;
}
- aDocInfoCB.Check(aSaveOpt.IsDocInfoSave());
+ aDocInfoCB->Check(aSaveOpt.IsDocInfoSave());
- aBackupCB.Check(aSaveOpt.IsBackup());
+ aBackupCB->Check(aSaveOpt.IsBackup());
sal_Bool bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP);
- aBackupCB.Enable(!bBackupRO);
- aBackupFI.Show(bBackupRO);
+ aBackupCB->Enable(!bBackupRO);
- aAutoSaveCB.Check(aSaveOpt.IsAutoSave());
- aUserAutoSaveCB.Check(aSaveOpt.IsUserAutoSave());
- aWarnAlienFormatCB.Check(aSaveOpt.IsWarnAlienFormat());
- aWarnAlienFormatCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT));
+ aAutoSaveCB->Check(aSaveOpt.IsAutoSave());
+ aUserAutoSaveCB->Check(aSaveOpt.IsUserAutoSave());
+ aWarnAlienFormatCB->Check(aSaveOpt.IsWarnAlienFormat());
+ aWarnAlienFormatCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT));
// the pretty printing
- aSizeOptimizationCB.Check( !aSaveOpt.IsPrettyPrinting());
+ aSizeOptimizationCB->Check( !aSaveOpt.IsPrettyPrinting());
- aAutoSaveEdit.SetValue( aSaveOpt.GetAutoSaveTime() );
+ aAutoSaveEdit->SetValue( aSaveOpt.GetAutoSaveTime() );
// save relatively
- aRelativeFsysCB.Check( aSaveOpt.IsSaveRelFSys() );
+ aRelativeFsysCB->Check( aSaveOpt.IsSaveRelFSys() );
- aRelativeInetCB.Check( aSaveOpt.IsSaveRelINet() );
+ aRelativeInetCB->Check( aSaveOpt.IsSaveRelINet() );
void* pDefaultVersion = (void*)long( aSaveOpt.GetODFDefaultVersion() );
- aODFVersionLB.SelectEntryPos( aODFVersionLB.GetEntryPos( pDefaultVersion ) );
+ aODFVersionLB->SelectEntryPos( aODFVersionLB->GetEntryPos( pDefaultVersion ) );
- AutoClickHdl_Impl( &aAutoSaveCB );
- ODFVersionHdl_Impl( &aODFVersionLB );
+ AutoClickHdl_Impl( aAutoSaveCB );
+ ODFVersionHdl_Impl( aODFVersionLB );
- aDocInfoCB.SaveValue();
- aBackupCB.SaveValue();
- aWarnAlienFormatCB.SaveValue();
- aSizeOptimizationCB.SaveValue();
- aAutoSaveCB.SaveValue();
- aAutoSaveEdit.SaveValue();
+ aDocInfoCB->SaveValue();
+ aBackupCB->SaveValue();
+ aWarnAlienFormatCB->SaveValue();
+ aSizeOptimizationCB->SaveValue();
+ aAutoSaveCB->SaveValue();
+ aAutoSaveEdit->SaveValue();
- aUserAutoSaveCB.SaveValue();
+ aUserAutoSaveCB->SaveValue();
- aRelativeFsysCB.SaveValue();
- aRelativeInetCB.SaveValue();
- aODFVersionLB.SaveValue();
+ aRelativeFsysCB->SaveValue();
+ aRelativeInetCB->SaveValue();
+ aODFVersionLB->SaveValue();
}
// -----------------------------------------------------------------------
IMPL_LINK( SfxSaveTabPage, AutoClickHdl_Impl, CheckBox *, pBox )
{
- if ( pBox == &aAutoSaveCB )
+ if ( pBox == aAutoSaveCB )
{
- if ( aAutoSaveCB.IsChecked() )
+ if ( aAutoSaveCB->IsChecked() )
{
- aAutoSaveEdit.Enable();
- aMinuteFT.Enable();
- aUserAutoSaveCB.Enable();
+ aAutoSaveEdit->Enable();
+ aMinuteFT->Enable();
+ aUserAutoSaveCB->Enable();
}
else
{
- aAutoSaveEdit.Disable();
- aMinuteFT.Disable();
- aUserAutoSaveCB.Disable();
+ aAutoSaveEdit->Disable();
+ aMinuteFT->Disable();
+ aUserAutoSaveCB->Disable();
}
}
return 0;
@@ -585,17 +553,17 @@ static OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties)
IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
{
- sal_uInt16 nCurPos = aDocTypeLB.GetSelectEntryPos();
+ sal_uInt16 nCurPos = aDocTypeLB->GetSelectEntryPos();
long nData = -1;
if(nCurPos < APP_COUNT)
- nData = (long) aDocTypeLB.GetEntryData(nCurPos);
+ nData = (long) aDocTypeLB->GetEntryData(nCurPos);
if ( nData >= 0 && nData < APP_COUNT )
{
- if(&aDocTypeLB == pBox)
+ if(aDocTypeLB == pBox)
{
- aSaveAsLB.Clear();
+ aSaveAsLB->Clear();
const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray();
if(!pImpl->aUIFilterArr[nData].getLength())
{
@@ -613,17 +581,19 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
OUString sSelect;
for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++)
{
- sal_uInt16 nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]);
+ sal_uInt16 nEntryPos = aSaveAsLB->InsertEntry(pUIFilters[i]);
if ( pImpl->aODFArr[nData][i] )
- aSaveAsLB.SetEntryData( nEntryPos, (void*)pImpl );
+ aSaveAsLB->SetEntryData( nEntryPos, (void*)pImpl );
if(pFilters[i] == pImpl->aDefaultArr[nData])
sSelect = pUIFilters[i];
}
if(!sSelect.isEmpty())
- aSaveAsLB.SelectEntry(sSelect);
- aSaveAsFI.Show(pImpl->aDefaultReadonlyArr[nData]);
- aSaveAsFT.Enable(!pImpl->aDefaultReadonlyArr[nData]);
- aSaveAsLB.Enable(!pImpl->aDefaultReadonlyArr[nData]);
+ {
+ aSaveAsLB->SelectEntry(sSelect);
+ }
+
+ aSaveAsFT->Enable(!pImpl->aDefaultReadonlyArr[nData]);
+ aSaveAsLB->Enable(!pImpl->aDefaultReadonlyArr[nData]);
}
else
{
@@ -641,21 +611,21 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
}
}
- ODFVersionHdl_Impl( &aSaveAsLB );
+ ODFVersionHdl_Impl( aSaveAsLB );
return 0;
};
IMPL_LINK_NOARG(SfxSaveTabPage, ODFVersionHdl_Impl)
{
- long nVersion = long( aODFVersionLB.GetEntryData( aODFVersionLB.GetSelectEntryPos() ) );
+ long nVersion = long( aODFVersionLB->GetEntryData( aODFVersionLB->GetSelectEntryPos() ) );
bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) != SvtSaveOptions::ODFVER_LATEST;
if ( bShown )
{
bool bHasODFFormat = false;
- sal_uInt16 i = 0, nCount = aSaveAsLB.GetEntryCount();
+ sal_uInt16 i = 0, nCount = aSaveAsLB->GetEntryCount();
for ( ; i < nCount; ++ i )
{
- if ( aSaveAsLB.GetEntryData(i) != NULL )
+ if ( aSaveAsLB->GetEntryData(i) != NULL )
{
bHasODFFormat = true;
break;
@@ -663,11 +633,11 @@ IMPL_LINK_NOARG(SfxSaveTabPage, ODFVersionHdl_Impl)
}
bShown = !bHasODFFormat
- || ( aSaveAsLB.GetEntryData( aSaveAsLB.GetSelectEntryPos() ) != NULL );
+ || ( aSaveAsLB->GetEntryData( aSaveAsLB->GetSelectEntryPos() ) != NULL );
}
- aODFWarningFI.Show( bShown );
- aODFWarningFT.Show( bShown );
+ aODFWarningFI->Show( bShown );
+ aODFWarningFT->Show( bShown );
return 0;
}
diff --git a/cui/source/options/optsave.hrc b/cui/source/options/optsave.hrc
index d0148fb4d398..bc20142e3704 100644
--- a/cui/source/options/optsave.hrc
+++ b/cui/source/options/optsave.hrc
@@ -21,36 +21,6 @@
// defines ------------------------------------------------------------------
-#define LB_LOAD 10
-#define CB_LOAD_SETTINGS 11
-#define CB_LOAD_DOCPRINTER 12
-#define GB_SAVE 13
-#define BTN_DOCINFO 14
-#define BTN_BACKUP 15
-#define BTN_AUTOSAVE 16
-#define ED_AUTOSAVE 17
-#define FT_MINUTE 18
-#define BTN_USERAUTOSAVE 19
-#define BTN_NOPRETTYPRINTING 20
-#define FI_BACKUP 21
-#define BTN_WARNALIENFORMAT 22
-#define FT_ODF_VERSION 23
-#define LB_ODF_VERSION 24
-
-#define BTN_RELATIVE_FSYS 41
-#define BTN_RELATIVE_INET 42
-
-#define FL_FILTER 43
-#define FT_APP 44
-#define LB_APP 45
-#define FT_FILTER 46
-#define LB_FILTER 47
-#define FI_FILTER 48
-#define FT_WARN 49
-#define FI_ODF_WARNING 50
-
-#define IMG_ODF_WARNING 1
-
#define APP_WRITER 0
#define APP_WRITER_WEB 1
#define APP_WRITER_GLOBAL 2
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 00cb63f0ae29..dcc3a5af5772 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -43,33 +43,26 @@ struct SvxSaveTabPage_Impl;
class SvxSaveTabPage : public SfxTabPage
{
private:
- FixedLine aLoadFL;
- CheckBox aLoadUserSettingsCB;
- CheckBox aLoadDocPrinterCB;
-
- FixedLine aSaveFL;
- CheckBox aDocInfoCB;
- ReadOnlyImage aBackupFI;
- CheckBox aBackupCB;
- CheckBox aAutoSaveCB;
- NumericField aAutoSaveEdit;
- FixedText aMinuteFT;
- CheckBox aUserAutoSaveCB;
- CheckBox aRelativeFsysCB;
- CheckBox aRelativeInetCB;
-
- FixedLine aDefaultFormatFL;
- FixedText aODFVersionFT;
- ListBox aODFVersionLB;
- CheckBox aSizeOptimizationCB;
- CheckBox aWarnAlienFormatCB;
- FixedText aDocTypeFT;
- ListBox aDocTypeLB;
- FixedText aSaveAsFT;
- ReadOnlyImage aSaveAsFI;
- ListBox aSaveAsLB;
- FixedImage aODFWarningFI;
- FixedText aODFWarningFT;
+ CheckBox* aLoadUserSettingsCB;
+ CheckBox* aLoadDocPrinterCB;
+
+ CheckBox* aDocInfoCB;
+ CheckBox* aBackupCB;
+ CheckBox* aAutoSaveCB;
+ NumericField* aAutoSaveEdit;
+ FixedText* aMinuteFT;
+ CheckBox* aUserAutoSaveCB;
+ CheckBox* aRelativeFsysCB;
+ CheckBox* aRelativeInetCB;
+
+ ListBox* aODFVersionLB;
+ CheckBox* aSizeOptimizationCB;
+ CheckBox* aWarnAlienFormatCB;
+ ListBox* aDocTypeLB;
+ FixedText* aSaveAsFT;
+ ListBox* aSaveAsLB;
+ FixedImage* aODFWarningFI;
+ FixedText* aODFWarningFT;
SvxSaveTabPage_Impl* pImpl;
diff --git a/cui/source/options/optsave.src b/cui/source/options/optsave.src
index 71b29d665564..287709a381a4 100644
--- a/cui/source/options/optsave.src
+++ b/cui/source/options/optsave.src
@@ -26,222 +26,6 @@
#define TEXT_SAVEPAGE \
Text [ en-US ] = "Save" ;\
-TabPage RID_SFXPAGE_SAVE
-{
- HelpId = HID_OPTIONS_SAVE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Hide = TRUE ;
- TEXT_SAVEPAGE
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedLine LB_LOAD
- {
- Pos = MAP_APPFONT ( 6 , 2 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Load";
- };
- CheckBox CB_LOAD_SETTINGS
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:CB_LOAD_SETTINGS";
- Pos = MAP_APPFONT ( 12 , 11 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "Load user-specific settings with the document";
- };
- CheckBox CB_LOAD_DOCPRINTER
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:CB_LOAD_DOCPRINTER";
- Pos = MAP_APPFONT ( 12 , 22 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "Load printer settings with the document";
- };
- FixedLine GB_SAVE
- {
- Pos = MAP_APPFONT ( 6 , 32 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Save" ;
- };
- CheckBox BTN_DOCINFO
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_DOCINFO";
- Pos = MAP_APPFONT ( 12 , 41 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "~Edit document properties before saving" ;
- TabStop = TRUE ;
- };
- FixedImage FI_BACKUP
- {
- Pos = MAP_APPFONT ( 5, 53 ) ;
- Size = MAP_APPFONT ( 6 , 6 ) ;
- Hide = TRUE;
- };
- CheckBox BTN_BACKUP
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_BACKUP";
- Pos = MAP_APPFONT ( 12 , 52 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "Al~ways create backup copy" ;
- };
- CheckBox BTN_AUTOSAVE
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_AUTOSAVE";
- Pos = MAP_APPFONT ( 12 , 63 ) ;
- Size = MAP_APPFONT ( 163 , 10 ) ;
- Text [ en-US ] = "Save ~AutoRecovery information every" ;
- };
- NumericField ED_AUTOSAVE
- {
- HelpID = "cui:NumericField:RID_SFXPAGE_SAVE:ED_AUTOSAVE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 180 , 62 ) ;
- Size = MAP_APPFONT ( 21 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 60 ;
- StrictFormat = TRUE ;
- First = 1 ;
- Last = 60 ;
- SpinSize = 1 ;
- TabStop = TRUE ;
- };
- FixedText FT_MINUTE
- {
- Pos = MAP_APPFONT ( 204 , 64 ) ;
- Size = MAP_APPFONT ( 65 , 8 ) ;
- Text [ en-US ] = "Minutes" ;
- };
- CheckBox BTN_USERAUTOSAVE
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_USERAUTOSAVE";
- Pos = MAP_APPFONT ( 21 , 74 ) ;
- Size = MAP_APPFONT ( 163 , 10 ) ;
- Text [ en-US ] = "Automatically save the document too" ;
- };
- CheckBox BTN_RELATIVE_FSYS
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_RELATIVE_FSYS";
- Pos = MAP_APPFONT ( 12 , 85 ) ;
- Size = MAP_APPFONT ( 236 , 10 ) ;
- Text [ en-US ] = "Save URLs relative to file system" ;
- };
- CheckBox BTN_RELATIVE_INET
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_RELATIVE_INET";
- Pos = MAP_APPFONT ( 12 , 96 ) ;
- Size = MAP_APPFONT ( 248 , 10 ) ;
- Text [ en-US ] = "Save URLs relative to internet" ;
- };
- FixedLine FL_FILTER
- {
- Pos = MAP_APPFONT ( 6 , 108 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Default file format and ODF settings" ;
- };
- FixedText FT_ODF_VERSION
- {
- Pos = MAP_APPFONT ( 12 , 118 ) ;
- Size = MAP_APPFONT ( 121 , 8 ) ;
- Text [ en-US ] = "ODF format version" ;
- };
- ListBox LB_ODF_VERSION
- {
- HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_ODF_VERSION";
- Pos = MAP_APPFONT ( 136 , 116 ) ;
- Size = MAP_APPFONT ( 108 , 58 ) ;
- Border = TRUE;
- DropDown = TRUE;
- StringList [ en-US ] =
- {
- < "1.0/1.1" ; 2 ; > ;
- < "1.2" ; 4 ; > ;
- < "1.2 Extended (compat mode)"; 8 ; > ;
- < "1.2 Extended (recommended)"; 0x7fffffff ; > ;
- };
- };
- CheckBox BTN_NOPRETTYPRINTING
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING";
- Pos = MAP_APPFONT ( 12 , 131 ) ;
- Size = MAP_APPFONT ( 248 , 10 ) ;
- Text [ en-US ] = "Size optimization for ODF format" ;
- };
- CheckBox BTN_WARNALIENFORMAT
- {
- HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_WARNALIENFORMAT";
- Pos = MAP_APPFONT ( 12 , 142 ) ;
- Size = MAP_APPFONT ( 248 , 10 ) ;
- Text [ en-US ] = "Warn when not saving in ODF or default format" ;
- };
- FixedText FT_APP
- {
- Pos = MAP_APPFONT ( 12 , 153 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
- Text [ en-US ] = "D~ocument type";
- };
- FixedText FT_FILTER
- {
- Pos = MAP_APPFONT ( 136 , 153 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
- Text [ en-US ] = "Always sa~ve as";
- };
- ListBox LB_APP
- {
- HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_APP";
- Pos = MAP_APPFONT ( 12 , 164 ) ;
- Size = MAP_APPFONT ( 108 , 58 ) ;
- Border = TRUE;
- DropDown = TRUE;
- StringList [ en-US ] =
- {
- < "Text document" ; APP_WRITER ; > ;
- < "HTML document" ; APP_WRITER_WEB; > ;
- < "Master document" ; APP_WRITER_GLOBAL; > ;
- < "Spreadsheet" ; APP_CALC ; > ;
- < "Presentation" ; APP_IMPRESS ; > ;
- < "Drawing" ; APP_DRAW ; > ;
- < "Formula" ; APP_MATH ; > ;
- };
- };
- FixedImage FI_FILTER
- {
- Pos = MAP_APPFONT ( 129, 165 ) ;
- Size = MAP_APPFONT ( 6 , 6 ) ;
- Hide = TRUE;
- };
- ListBox LB_FILTER
- {
- HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_FILTER";
- Pos = MAP_APPFONT ( 136 , 164 ) ;
- Size = MAP_APPFONT ( 108 , 58 ) ;
- Border = TRUE;
- Sort = TRUE;
- DropDown = TRUE;
- };
- FixedImage FI_ODF_WARNING
- {
- Pos = MAP_APPFONT ( 12, 170 ) ;
- Size = MAP_APPFONT ( 8 , 8 ) ;
- Hide = TRUE;
- };
- FixedText FT_WARN
- {
- Pos = MAP_APPFONT ( 23 , 170 ) ;
- Size = MAP_APPFONT ( 239 , 8 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Not using ODF 1.2 Extended may cause information to be lost.";
- Text [ x-comment ] = "EN-US, the term 'extended' must not be translated.";
- };
- Image IMG_ODF_WARNING
- {
- ImageBitmap = Bitmap
- {
- File = "odfwarning.png";
- };
- MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
- };
-};
-
ModalDialog RID_SVXDLG_FILTER_WARNING
{
HelpID = HID_SVXDLG_FILTER_WARNING;