summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-11-26 17:24:57 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-11-26 18:01:06 +0100
commit64cea833fb9e5534885aa29844255be2ef32db1f (patch)
tree16928043df820611c9d5bf522a486b115ccdea2c /sd
parentset default script text in .ui (diff)
downloadcore-64cea833fb9e5534885aa29844255be2ef32db1f.tar.gz
core-64cea833fb9e5534885aa29844255be2ef32db1f.zip
Give sdremote a separate option, apart from Experimental features
Change-Id: I34f299acaa489d5c619c764c917b8a8d26b71557
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/optsitem.cxx13
-rw-r--r--sd/source/ui/dlg/tpoption.cxx8
-rw-r--r--sd/source/ui/dlg/tpoption.src16
-rw-r--r--sd/source/ui/inc/optsitem.hxx3
-rw-r--r--sd/source/ui/inc/tpoption.hrc1
-rw-r--r--sd/source/ui/inc/tpoption.hxx1
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx2
7 files changed, 36 insertions, 8 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 9251fdae6164..eafe4f007b80 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -497,6 +497,7 @@ SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
bDoubleClickTextEdit( sal_True ),
bClickChangeRotation( sal_False ),
bStartWithActualPage( sal_False ),
+ bEnableSdremote( sal_False ),
bSolidDragging( sal_True ),
bSummationOfParagraphs( sal_False ),
bShowUndoDeleteWarning( sal_True ),
@@ -531,6 +532,7 @@ sal_Bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit() &&
IsClickChangeRotation() == rOpt.IsClickChangeRotation() &&
IsStartWithActualPage() == rOpt.IsStartWithActualPage() &&
+ IsEnableSdremote() == rOpt.IsEnableSdremote() &&
IsSummationOfParagraphs() == rOpt.IsSummationOfParagraphs() &&
IsSolidDragging() == rOpt.IsSolidDragging() &&
IsShowUndoDeleteWarning() == rOpt.IsShowUndoDeleteWarning() &&
@@ -586,10 +588,11 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount )
"Display",
"PenColor",
- "PenWidth"
+ "PenWidth",
+ "Start/EnableSdremote"
};
- rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 25 : 14 );
+ rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 26 : 14 );
ppNames = aPropNames;
}
@@ -645,6 +648,9 @@ sal_Bool SdOptionsMisc::ReadData( const Any* pValues )
if( pValues[24].hasValue() )
SetPresentationPenWidth( getSafeValue< double >( pValues[ 24 ] ) );
+
+ if( pValues[25].hasValue() )
+ SetEnableSdremote( *(sal_Bool*) pValues[ 25 ].getValue() );
}
return sal_True;
@@ -687,6 +693,7 @@ sal_Bool SdOptionsMisc::WriteData( Any* pValues ) const
pValues[ 23 ] <<= GetPresentationPenColor();
pValues[ 24 ] <<= GetPresentationPenWidth();
+ pValues[ 25 ] <<= IsEnableSdremote();
}
return sal_True;
@@ -714,6 +721,7 @@ SdOptionsMiscItem::SdOptionsMiscItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd
{
maOptionsMisc.SetStartWithTemplate( pOpts->IsStartWithTemplate() );
maOptionsMisc.SetStartWithActualPage( pOpts->IsStartWithActualPage() );
+ maOptionsMisc.SetEnableSdremote( pOpts->IsEnableSdremote() );
maOptionsMisc.SetSummationOfParagraphs( pOpts->IsSummationOfParagraphs() );
maOptionsMisc.SetShowUndoDeleteWarning( pOpts->IsShowUndoDeleteWarning() );
maOptionsMisc.SetPrinterIndependentLayout( pOpts->GetPrinterIndependentLayout() );
@@ -796,6 +804,7 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const
pOpts->SetDoubleClickTextEdit( maOptionsMisc.IsDoubleClickTextEdit() );
pOpts->SetClickChangeRotation( maOptionsMisc.IsClickChangeRotation() );
pOpts->SetStartWithActualPage( maOptionsMisc.IsStartWithActualPage() );
+ pOpts->SetEnableSdremote( maOptionsMisc.IsEnableSdremote() );
pOpts->SetSummationOfParagraphs( maOptionsMisc.IsSummationOfParagraphs() );
pOpts->SetSolidDragging( maOptionsMisc.IsSolidDragging() );
pOpts->SetShowUndoDeleteWarning( maOptionsMisc.IsShowUndoDeleteWarning() );
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 807d7a21a986..aa3e81c1ceaa 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -251,6 +251,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
aCbxStartWithActualPage ( this, SdResId( CBX_START_WITH_ACTUAL_PAGE ) ),
aGrpStartWithActualPage ( this, SdResId( GRP_START_WITH_ACTUAL_PAGE ) ),
+ aCbxEnableSdremote ( this, SdResId( CBX_ENABLE_SDREMOTE ) ),
aTxtCompatibility ( this, SdResId( FT_COMPATIBILITY ) ),
aCbxUsePrinterMetrics ( this, SdResId( CB_USE_PRINTER_METRICS ) ),
aCbxCompatibility ( this, SdResId( CB_MERGE_PARA_DIST ) ),
@@ -416,6 +417,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
aCbxMasterPageCache.GetSavedValue() != aCbxMasterPageCache.IsChecked() ||
aCbxCopy.GetSavedValue() != aCbxCopy.IsChecked() ||
aCbxStartWithActualPage.GetSavedValue() != aCbxStartWithActualPage.IsChecked() ||
+ aCbxEnableSdremote.GetSavedValue() != aCbxEnableSdremote.IsChecked() ||
aCbxCompatibility.GetSavedValue() != aCbxCompatibility.IsChecked() ||
aCbxUsePrinterMetrics.GetSavedValue() != aCbxUsePrinterMetrics.IsChecked() )
{
@@ -429,6 +431,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching( aCbxMasterPageCache.IsChecked() );
aOptsItem.GetOptionsMisc().SetDragWithCopy( aCbxCopy.IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithActualPage( aCbxStartWithActualPage.IsChecked() );
+ aOptsItem.GetOptionsMisc().SetEnableSdremote( aCbxEnableSdremote.IsChecked() );
aOptsItem.GetOptionsMisc().SetSummationOfParagraphs( aCbxCompatibility.IsChecked() );
aOptsItem.GetOptionsMisc().SetPrinterIndependentLayout (
aCbxUsePrinterMetrics.IsChecked()
@@ -486,6 +489,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxMasterPageCache.Check( aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
aCbxCopy.Check( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
aCbxStartWithActualPage.Check( aOptsItem.GetOptionsMisc().IsStartWithActualPage() );
+ aCbxEnableSdremote.Check( aOptsItem.GetOptionsMisc().IsEnableSdremote() );
aCbxCompatibility.Check( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
aCbxUsePrinterMetrics.Check( aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
aCbxStartWithTemplate.SaveValue();
@@ -496,7 +500,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxMasterPageCache.SaveValue();
aCbxCopy.SaveValue();
- aCbxStartWithActualPage.SaveValue();
+ aCbxEnableSdremote.SaveValue();
aCbxCompatibility.SaveValue();
aCbxUsePrinterMetrics.SaveValue();
@@ -622,6 +626,7 @@ void SdTpOptionsMisc::SetImpressMode (void)
lcl_MoveWin (aMtrFldTabstop, -nLineHeight);
lcl_MoveWin (aGrpStartWithActualPage, -nLineHeight);
lcl_MoveWin (aCbxStartWithActualPage, -nLineHeight);
+ lcl_MoveWin (aCbxEnableSdremote, -nLineHeight);
lcl_MoveWin (aTxtCompatibility, -nLineHeight);
// Move the printer-independent-metrics check box up two lines to change
@@ -634,6 +639,7 @@ void SdTpOptionsMisc::SetDrawMode()
aCbxStartWithTemplate.Hide();
aGrpProgramStart.Hide();
aCbxStartWithActualPage.Hide();
+ aCbxEnableSdremote.Hide();
aCbxCompatibility.Hide();
aGrpStartWithActualPage.Hide();
aCbxCrookNoContortion.Show();
diff --git a/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
index ba271c60e398..bf86292ca0d7 100644
--- a/sd/source/ui/dlg/tpoption.src
+++ b/sd/source/ui/dlg/tpoption.src
@@ -204,7 +204,7 @@ TabPage TP_OPTIONS_MISC
{
Pos = MAP_APPFONT ( 6 , 134 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Start presentation" ;
+ Text [ en-US ] = "Presentation" ;
};
CheckBox CBX_START_WITH_ACTUAL_PAGE
{
@@ -214,9 +214,17 @@ TabPage TP_OPTIONS_MISC
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 ( 242 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Enable remote control" ;
+ };
FixedLine FT_COMPATIBILITY
{
- Pos = MAP_APPFONT ( 6 , 160 ) ;
+ Pos = MAP_APPFONT ( 6 , 173 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Compatibility" ;
};
@@ -226,14 +234,14 @@ TabPage TP_OPTIONS_MISC
// 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 , 184 ) ;
+ 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 , 171 ) ;
+ Pos = MAP_APPFONT ( 12 , 184 ) ;
Size = MAP_APPFONT ( 242, 10 ) ;
Text [ en-US ] = "Add ~spacing between paragraphs and tables (in current document)";
};
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index e9563df59d8e..c7ae1b9d6689 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -262,6 +262,7 @@ private:
sal_Bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit
sal_Bool bClickChangeRotation : 1; // Misc/RotateClick
sal_Bool bStartWithActualPage : 1; // Misc/Start/CurrentPage
+ sal_Bool bEnableSdremote : 1; // Misc/Start/EnableSdremote
sal_Bool bSolidDragging : 1; // Misc/ModifyWithAttributes
sal_Bool bSummationOfParagraphs : 1; // misc/SummationOfParagraphs
sal_Bool bShowUndoDeleteWarning : 1; // Misc/ShowUndoDeleteWarning
@@ -310,6 +311,7 @@ public:
sal_Bool IsDoubleClickTextEdit() const { Init(); return (sal_Bool) bDoubleClickTextEdit; }
sal_Bool IsClickChangeRotation() const { Init(); return (sal_Bool) bClickChangeRotation; }
sal_Bool IsStartWithActualPage() const { Init(); return (sal_Bool) bStartWithActualPage; }
+ sal_Bool IsEnableSdremote() const { Init(); return (sal_Bool) bEnableSdremote; }
sal_Bool IsSolidDragging() const { Init(); return (sal_Bool) bSolidDragging; }
sal_Bool IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
@@ -348,6 +350,7 @@ public:
void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
void SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
void SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
+ void SetEnableSdremote( sal_Bool bOn = sal_True ) { if( bEnableSdremote != bOn ) { OptionsChanged(); bEnableSdremote = bOn; } }
void SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
/** Set the printer independent layout mode.
@param nOn
diff --git a/sd/source/ui/inc/tpoption.hrc b/sd/source/ui/inc/tpoption.hrc
index 6f93558014db..abca2a26bb05 100644
--- a/sd/source/ui/inc/tpoption.hrc
+++ b/sd/source/ui/inc/tpoption.hrc
@@ -72,3 +72,4 @@
#define FT_SCALE 39
#define CB_USE_PRINTER_METRICS 40
+#define CBX_ENABLE_SDREMOTE 41
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 07b000e6a8f0..1878cb379636 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -110,6 +110,7 @@ private:
CheckBox aCbxStartWithActualPage;
FixedLine aGrpStartWithActualPage;
+ CheckBox aCbxEnableSdremote;
FixedLine aTxtCompatibility;
CheckBox aCbxUsePrinterMetrics;
CheckBox aCbxCompatibility;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index b33b64ea4a60..0614b483a5c2 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -298,7 +298,7 @@ void SdDLL::RegisterRemotes()
// Disable unless in experimental mode for now
SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" );
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
- if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
+ if (!xContext.is() || !officecfg::Office::Impress::Misc::Start::EnableSdremote::get(xContext))
return;
sd::RemoteServer::setup();