diff options
author | mmeof <manik10044@iiitd.ac.in> | 2013-05-03 09:20:28 -0700 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-05-09 15:42:19 +0000 |
commit | 39da7ee77e5c5add8aaef12bf1e80c66132782fa (patch) | |
tree | 8bcf3d06e3d6ff3ec6f4dc49cb74306e48770d99 /sd/source/ui/dlg/tpoption.cxx | |
parent | abb720f4238e1df2c30c88eb1ed8fc9d803fa8eb (diff) |
fdo#56995 Created global option to disable presenter console in Impress
Changes made are as Follows
/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
To add the new global checkbox to Libreoffice Impress>General>Start
A new xml block for EnablePresenterScreen was added
<prop oor:name="EnablePresenterScreen" oor:type="xs:boolean" >
/sd/source/ui/app/optsitem.cxx
To add the setter/getter for the new checkbox button, namely:
SetEnablePresenterScreen
IsEnablePresenterScreen
EnablePresenterScreen added to index number 26 of:
GetPropNameArray()
/sd/source/ui/dlg/tpoption.cxx
SdTpOptionsMisc() editted to attach EnablePresenterScreen to CBX_ENABLE_PRESENTER_SCREEN
aCbxEnablePresenterScreen ( this, SdResId( CBX_ENABLE_PRESENTER_SCREEN))
Also Added to FillItemSet() and Reset() functions
/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
enableSdRemote size changed to
Size = MAP_APPFONT ( 116 , 10 ) ;
Pos = MAP_APPFONT ( 12 , 171 ) ;
158 was correct but 171 was added on request
To allow enableSdRemote(CBX_ENABLE_SDREMOTE) and enablePresenterScreen( CBX_ENABLE_PRESENTER_SCREEN) to be drawn adjacent.
enablePresenterScreen checkbox CBX_ENABLE_PRESENTER_SCREEN added
/sd/source/ui/inc/optsitem.hxx
Set default value for enablePresenterScreen as 1 or TRUE
sal_Bool bEnablePresenterScreen : 1;
Added getter/setter named same as above for interface definition
sd/source/ui/inc/tpoption.hrc
Defined CBX_ENABLE_PRESENTER_SCREEN as 42nd checkbox
#define CBX_ENABLE_PRESENTER_SCREEN 42
/sd/source/ui/inc/tpoption.hxx
Added interface declaration of aCbxEnablePresenterScreen which was attached to CBX_ENABLE_PRESENTER_SCREEN
/sdext/source/presenter/PresenterScreen.hxx
Added interface declaration of
bool isPresenterScreenEnabled()
to PresenterScreen class to allow presenterscreen to get if the option is checked
/sdext/source/presenter/PresenterScreen.cxx
Added definition of
isPresenterScreenEnabled(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
Input : Current Process Context
Output : The 0/1 value of EnablePresenterScreen from presenterconfig
In PresenterScreenListener::notifyEvent( )
Added
if(mpPresenterScreen->isPresenterScreenEnabled(mxComponentContext)
mpPresenterScreen->InitializePresenterScreen()
To initialize PresenterScreen only when enabled
Change-Id: If8242e607323df57d8e78d08cf2129d03c0c9e4f
Reviewed-on: https://gerrit.libreoffice.org/3762
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sd/source/ui/dlg/tpoption.cxx')
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index e87baa8d654c..603cd6026ce0 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -236,6 +236,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 ) ), + 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 ) ), @@ -402,6 +403,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) aCbxCopy.GetSavedValue() != aCbxCopy.IsChecked() || aCbxStartWithActualPage.GetSavedValue() != aCbxStartWithActualPage.IsChecked() || aCbxEnableSdremote.GetSavedValue() != aCbxEnableSdremote.IsChecked() || + aCbxEnablePresenterScreen.GetSavedValue()!= aCbxEnablePresenterScreen.IsChecked() || aCbxCompatibility.GetSavedValue() != aCbxCompatibility.IsChecked() || aCbxUsePrinterMetrics.GetSavedValue() != aCbxUsePrinterMetrics.IsChecked() ) { @@ -416,6 +418,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) 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().SetPrinterIndependentLayout ( aCbxUsePrinterMetrics.IsChecked() @@ -474,6 +477,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs ) 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(); @@ -485,6 +489,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs ) aCbxMasterPageCache.SaveValue(); aCbxCopy.SaveValue(); aCbxEnableSdremote.SaveValue(); + aCbxEnablePresenterScreen.SaveValue(); aCbxCompatibility.SaveValue(); aCbxUsePrinterMetrics.SaveValue(); @@ -611,6 +616,9 @@ void SdTpOptionsMisc::SetImpressMode (void) 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 @@ -627,6 +635,7 @@ void SdTpOptionsMisc::SetDrawMode() aGrpProgramStart.Hide(); aCbxStartWithActualPage.Hide(); aCbxEnableSdremote.Hide(); + aCbxEnablePresenterScreen.Hide(); aCbxCompatibility.Hide(); aGrpStartWithActualPage.Hide(); aCbxCrookNoContortion.Show(); |