Author: arielch
Date: Wed Apr 24 20:09:04 2013
New Revision: 1471627
URL: http://svn.apache.org/r1471627
Log:
i121873 - Add option to disable starting the Presenter Screen together with the
presentation
Modified:
openoffice/trunk/main/helpcontent2/source/text/shared/optionen/01070500.xhp
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
openoffice/trunk/main/sd/source/ui/app/optsitem.cxx
openoffice/trunk/main/sd/source/ui/dlg/tpoption.cxx
openoffice/trunk/main/sd/source/ui/dlg/tpoption.src
openoffice/trunk/main/sd/source/ui/inc/optsitem.hxx
openoffice/trunk/main/sd/source/ui/inc/tpoption.hrc
openoffice/trunk/main/sd/source/ui/inc/tpoption.hxx
openoffice/trunk/main/sdext/source/presenter/PresenterScreen.cxx
Modified:
openoffice/trunk/main/helpcontent2/source/text/shared/optionen/01070500.xhp
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/helpcontent2/source/text/shared/optionen/01070500.xhp?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/helpcontent2/source/text/shared/optionen/01070500.xhp
(original)
+++ openoffice/trunk/main/helpcontent2/source/text/shared/optionen/01070500.xhp
Wed Apr 24 20:09:04 2013
@@ -97,6 +97,9 @@
<bookmark xml-lang="en-US"
branch="hid/sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE"
id="bm_id3151249" localize="false"/>
<paragraph role="heading" id="hd_id3155902" xml-lang="en-US" level="3"
l10n="U" oldref="26">Always with current page</paragraph>
<paragraph role="paragraph" id="par_id3155962" xml-lang="en-US" l10n="U"
oldref="27"><ahelp
hid="SD:CHECKBOX:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE">Specifies that you
always want a presentation to start with the current slide.</ahelp>
Unmark<emph> Always with current page</emph> to always start a presentation
with the first page.</paragraph>
+<bookmark xml-lang="en-US"
branch="hid/sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_PRESENTER_SCREEN"
id="bm_id31512490" localize="false"/>
+<paragraph role="heading" id="hd_id31559020" xml-lang="en-US" level="3"
l10n="U">With Presenter Screen</paragraph>
+<paragraph role="paragraph" id="par_id31559620" xml-lang="en-US"
l10n="U"><ahelp
hid="SD:CHECKBOX:TP_OPTIONS_MISC:CBX_START_WITH_PRESENTER_SCREEN">Specifies
that you always want the Presenter Screen to start together with the
presentation, in a multiple-monitor setup.</ahelp>. Unmark<emph> With Presenter
Screen</emph> to disable the Presenter Screen.</paragraph>
<paragraph role="heading" id="hd_id3163806" xml-lang="en-US" level="2"
l10n="U" oldref="41">Scale (only in drawings)</paragraph>
<bookmark xml-lang="en-US" branch="hid/sd:ComboBox:TP_OPTIONS_MISC:CB_SCALE"
id="bm_id3146317" localize="false"/>
<paragraph role="heading" id="hd_id3145147" xml-lang="en-US" level="3"
l10n="U" oldref="43">Drawing scale</paragraph>
Modified:
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
---
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
(original)
+++
openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
Wed Apr 24 20:09:04 2013
@@ -728,6 +728,13 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="PresenterScreen" oor:type="xs:boolean">
+ <info>
+ <desc>Indicates whether to start the Presenter Screen together
with the presentation, in a multiple monitor configuration.</desc>
+ <label>With Presenter Screen</label>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="Compatibility">
<info>
Modified: openoffice/trunk/main/sd/source/ui/app/optsitem.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/app/optsitem.cxx?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/app/optsitem.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/app/optsitem.cxx Wed Apr 24 20:09:04 2013
@@ -498,6 +498,7 @@ SdOptionsMisc::SdOptionsMisc( sal_uInt16
bDoubleClickTextEdit( sal_True ),
bClickChangeRotation( sal_False ),
bStartWithActualPage( sal_False ),
+ bStartWithPresenterScreen( sal_True ), // default: Enable the Presenter
Screen
bSolidDragging( sal_True ),
bSolidMarkHdl( sal_True ), // default: Use nice handles
bSummationOfParagraphs( sal_False ),
@@ -535,6 +536,7 @@ sal_Bool SdOptionsMisc::operator==( cons
IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit()
&&
IsClickChangeRotation() == rOpt.IsClickChangeRotation()
&&
IsStartWithActualPage() == rOpt.IsStartWithActualPage()
&&
+ IsStartWithPresenterScreen() == rOpt.IsStartWithPresenterScreen()
&&
IsSummationOfParagraphs() ==
rOpt.IsSummationOfParagraphs() &&
IsSolidDragging() == rOpt.IsSolidDragging() &&
IsSolidMarkHdl() == rOpt.IsSolidMarkHdl() &&
@@ -597,10 +599,12 @@ void SdOptionsMisc::GetPropNameArray( co
"Display",
"PenColor",
- "PenWidth"
+ "PenWidth",
+
+ "Start/PresenterScreen"
};
- rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 27 : 16 );
+ rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 28 : 16 );
ppNames = aPropNames;
}
@@ -661,6 +665,9 @@ sal_Bool SdOptionsMisc::ReadData( const
if( pValues[26].hasValue() )
SetPresentationPenWidth( getSafeValue< double >(
pValues[ 26 ] ) );
+
+ if( pValues[27].hasValue() )
+ SetStartWithPresenterScreen( *(sal_Bool*) pValues[ 27 ].getValue()
);
}
return sal_True;
@@ -707,6 +714,8 @@ sal_Bool SdOptionsMisc::WriteData( Any*
pValues[ 25 ] <<= GetPresentationPenColor();
pValues[ 26 ] <<= GetPresentationPenWidth();
+
+ pValues[ 27 ] <<= IsStartWithPresenterScreen();
}
return sal_True;
@@ -734,6 +743,7 @@ SdOptionsMiscItem::SdOptionsMiscItem( sa
{
maOptionsMisc.SetStartWithTemplate(
pOpts->IsStartWithTemplate() );
maOptionsMisc.SetStartWithActualPage(
pOpts->IsStartWithActualPage() );
+ maOptionsMisc.SetStartWithPresenterScreen(
pOpts->IsStartWithPresenterScreen() );
maOptionsMisc.SetSummationOfParagraphs(
pOpts->IsSummationOfParagraphs() );
// #90356#
maOptionsMisc.SetShowUndoDeleteWarning(
pOpts->IsShowUndoDeleteWarning() );
@@ -823,6 +833,7 @@ void SdOptionsMiscItem::SetOptions( SdOp
pOpts->SetDoubleClickTextEdit(
maOptionsMisc.IsDoubleClickTextEdit() );
pOpts->SetClickChangeRotation(
maOptionsMisc.IsClickChangeRotation() );
pOpts->SetStartWithActualPage(
maOptionsMisc.IsStartWithActualPage() );
+ pOpts->SetStartWithPresenterScreen(
maOptionsMisc.IsStartWithPresenterScreen() );
pOpts->SetSummationOfParagraphs(
maOptionsMisc.IsSummationOfParagraphs() );
pOpts->SetSolidDragging( maOptionsMisc.IsSolidDragging() );
pOpts->SetSolidMarkHdl( maOptionsMisc.IsSolidMarkHdl() );
Modified: openoffice/trunk/main/sd/source/ui/dlg/tpoption.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/dlg/tpoption.cxx?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/dlg/tpoption.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/dlg/tpoption.cxx Wed Apr 24 20:09:04 2013
@@ -261,6 +261,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window
aMtrFldTabstop ( this, SdResId( MTR_FLD_TABSTOP ) ),
aCbxStartWithActualPage ( this, SdResId(
CBX_START_WITH_ACTUAL_PAGE ) ),
+ aCbxStartWithPresenterScreen( this, SdResId(
CBX_START_WITH_PRESENTER_SCREEN ) ),
aGrpStartWithActualPage ( this, SdResId( GRP_START_WITH_ACTUAL_PAGE
) ),
aTxtCompatibility ( this, SdResId(
FT_COMPATIBILITY ) ),
aCbxUsePrinterMetrics ( this, SdResId( CB_USE_PRINTER_METRICS ) ),
@@ -427,6 +428,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( S
aCbxMasterPageCache.GetSavedValue() !=
aCbxMasterPageCache.IsChecked() ||
aCbxCopy.GetSavedValue() !=
aCbxCopy.IsChecked() ||
aCbxStartWithActualPage.GetSavedValue() !=
aCbxStartWithActualPage.IsChecked() ||
+ aCbxStartWithPresenterScreen.GetSavedValue() !=
aCbxStartWithPresenterScreen.IsChecked() ||
aCbxCompatibility.GetSavedValue() !=
aCbxCompatibility.IsChecked() ||
aCbxUsePrinterMetrics.GetSavedValue() !=
aCbxUsePrinterMetrics.IsChecked() )
{
@@ -440,6 +442,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( S
aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching(
aCbxMasterPageCache.IsChecked() );
aOptsItem.GetOptionsMisc().SetDragWithCopy(
aCbxCopy.IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithActualPage(
aCbxStartWithActualPage.IsChecked() );
+ aOptsItem.GetOptionsMisc().SetStartWithPresenterScreen(
aCbxStartWithPresenterScreen.IsChecked() );
aOptsItem.GetOptionsMisc().SetSummationOfParagraphs(
aCbxCompatibility.IsChecked() );
aOptsItem.GetOptionsMisc().SetPrinterIndependentLayout (
aCbxUsePrinterMetrics.IsChecked()
@@ -497,6 +500,7 @@ void SdTpOptionsMisc::Reset( const SfxIt
aCbxMasterPageCache.Check(
aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
aCbxCopy.Check( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
aCbxStartWithActualPage.Check(
aOptsItem.GetOptionsMisc().IsStartWithActualPage() );
+ aCbxStartWithPresenterScreen.Check(
aOptsItem.GetOptionsMisc().IsStartWithPresenterScreen() );
aCbxCompatibility.Check(
aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
aCbxUsePrinterMetrics.Check(
aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
aCbxStartWithTemplate.SaveValue();
@@ -508,6 +512,7 @@ void SdTpOptionsMisc::Reset( const SfxIt
aCbxMasterPageCache.SaveValue();
aCbxCopy.SaveValue();
aCbxStartWithActualPage.SaveValue();
+ aCbxStartWithPresenterScreen.SaveValue();
aCbxCompatibility.SaveValue();
aCbxUsePrinterMetrics.SaveValue();
@@ -634,6 +639,11 @@ void SdTpOptionsMisc::SetImpressMode (vo
lcl_MoveWin (aMtrFldTabstop, -nLineHeight);
lcl_MoveWin (aGrpStartWithActualPage, -nLineHeight);
lcl_MoveWin (aCbxStartWithActualPage, -nLineHeight);
+
+ lcl_MoveWin (aCbxStartWithPresenterScreen,
+ nDialogWidth/2 - aCbxStartWithPresenterScreen.GetPosPixel().X(),
+ -nLineHeight);
+
lcl_MoveWin (aTxtCompatibility, -nLineHeight);
// Move the printer-independent-metrics check box up two lines to change
@@ -646,6 +656,7 @@ void SdTpOptionsMisc::SetDrawMode()
aCbxStartWithTemplate.Hide();
aGrpProgramStart.Hide();
aCbxStartWithActualPage.Hide();
+ aCbxStartWithPresenterScreen.Hide();
aCbxCompatibility.Hide();
aGrpStartWithActualPage.Hide();
aCbxCrookNoContortion.Show();
Modified: openoffice/trunk/main/sd/source/ui/dlg/tpoption.src
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/dlg/tpoption.src?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/dlg/tpoption.src (original)
+++ openoffice/trunk/main/sd/source/ui/dlg/tpoption.src Wed Apr 24 20:09:04 2013
@@ -203,10 +203,18 @@ TabPage TP_OPTIONS_MISC
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE";
Pos = MAP_APPFONT ( 12 , 145 ) ;
- Size = MAP_APPFONT ( 242 , 10 ) ;
+ Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Always with current page" ;
};
+ CheckBox CBX_START_WITH_PRESENTER_SCREEN
+ {
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_PRESENTER_SCREEN";
+ Pos = MAP_APPFONT ( 12 , 145 ) ;
+ Size = MAP_APPFONT ( 116 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "With Presenter Screen" ;
+ };
FixedLine FT_COMPATIBILITY
{
Pos = MAP_APPFONT ( 6 , 160 ) ;
Modified: openoffice/trunk/main/sd/source/ui/inc/optsitem.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/optsitem.hxx?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/optsitem.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/optsitem.hxx Wed Apr 24 20:09:04 2013
@@ -260,6 +260,7 @@ private:
sal_Bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit
sal_Bool bClickChangeRotation : 1; // Misc/RotateClick
sal_Bool bStartWithActualPage : 1; //
Misc/Start/CurrentPage
+ sal_Bool bStartWithPresenterScreen : 1; // Misc/Start/PresenterScreen
sal_Bool bSolidDragging : 1; //
Misc/ModifyWithAttributes
sal_Bool bSolidMarkHdl : 1; //
/Misc/SimpleHandles
sal_Bool bSummationOfParagraphs : 1; //
misc/SummationOfParagraphs
@@ -311,6 +312,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 IsStartWithPresenterScreen() const { Init(); return (sal_Bool)
bStartWithPresenterScreen; }
sal_Bool IsSolidDragging() const { Init(); return (sal_Bool)
bSolidDragging; }
sal_Bool IsSolidMarkHdl() const { Init(); return (sal_Bool)
bSolidMarkHdl; }
sal_Bool IsSummationOfParagraphs() const { Init(); return
bSummationOfParagraphs != 0; };
@@ -353,6 +355,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 SetStartWithPresenterScreen( sal_Bool bOn = sal_True ) { if(
bStartWithPresenterScreen != bOn ) { OptionsChanged();
bStartWithPresenterScreen = bOn; } }
void SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn
!= bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; }
}
/** Set the printer independent layout mode.
@param nOn
Modified: openoffice/trunk/main/sd/source/ui/inc/tpoption.hrc
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/tpoption.hrc?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/tpoption.hrc (original)
+++ openoffice/trunk/main/sd/source/ui/inc/tpoption.hrc Wed Apr 24 20:09:04 2013
@@ -89,3 +89,5 @@
#define FT_SCALE 39
#define CB_USE_PRINTER_METRICS 40
+
+#define CBX_START_WITH_PRESENTER_SCREEN 41
Modified: openoffice/trunk/main/sd/source/ui/inc/tpoption.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/tpoption.hxx?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/tpoption.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/tpoption.hxx Wed Apr 24 20:09:04 2013
@@ -117,6 +117,7 @@ private:
MetricField aMtrFldTabstop;
CheckBox aCbxStartWithActualPage;
+ CheckBox aCbxStartWithPresenterScreen;
FixedLine aGrpStartWithActualPage;
FixedLine aTxtCompatibility;
CheckBox aCbxUsePrinterMetrics;
Modified: openoffice/trunk/main/sdext/source/presenter/PresenterScreen.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/presenter/PresenterScreen.cxx?rev=1471627&r1=1471626&r2=1471627&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/presenter/PresenterScreen.cxx (original)
+++ openoffice/trunk/main/sdext/source/presenter/PresenterScreen.cxx Wed Apr 24
20:09:04 2013
@@ -60,6 +60,25 @@ using ::rtl::OUString;
namespace sdext { namespace presenter {
namespace {
+
+ static sal_Bool lcl_IsPresenterEnabled(
+ const css::uno::Reference< css::uno::XComponentContext > &rxContext )
+ {
+ sal_Bool bEnabled( sal_True );
+ PresenterConfigurationAccess aConfig(
+ rxContext,
+ A2S( "/org.openoffice.Office.Impress" ),
+ PresenterConfigurationAccess::READ_ONLY );
+ if ( aConfig.IsValid() )
+ {
+ sal_Bool bVal( sal_False );
+ if ( ( aConfig.GetConfigurationNode(
+ A2S( "Misc/Start/PresenterScreen" )) >>= bVal ) )
+ bEnabled = bVal;
+ }
+ return bEnabled;
+ }
+
typedef ::cppu::WeakComponentImplHelper1 <
css::document::XEventListener
> PresenterScreenListenerInterfaceBase;
@@ -168,7 +187,7 @@ Any SAL_CALL PresenterScreenJob::execute
const beans::NamedValue* p = Arguments.getConstArray();
for (i=0; i<c; ++i)
{
- if (p[i].Name.equalsAscii("Environment"))
+ if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Environment")))
{
p[i].Value >>= lEnv;
break;
@@ -180,7 +199,7 @@ Any SAL_CALL PresenterScreenJob::execute
p = lEnv.getConstArray();
for (i=0; i<c; ++i)
{
- if (p[i].Name.equalsAscii("Model"))
+ if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model")))
{
p[i].Value >>= xModel;
break;
@@ -188,14 +207,15 @@ Any SAL_CALL PresenterScreenJob::execute
}
Reference< XServiceInfo > xInfo( xModel, UNO_QUERY );
- if( xInfo.is() && xInfo->supportsService( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" )
) ) )
- {
- // Create a new listener that waits for the full screen presentation
- // to start and to end. It takes care of its own lifetime.
- ::rtl::Reference<PresenterScreenListener> pListener (
- new PresenterScreenListener(mxComponentContext, xModel));
- pListener->Initialize();
- }
+ if( !xInfo.is() || !xInfo->supportsService(
+ A2S( "com.sun.star.presentation.PresentationDocument" ) ) )
+ return Any();
+
+ // Create a new listener that waits for the full screen presentation
+ // to start and to end. It takes care of its own lifetime.
+ ::rtl::Reference<PresenterScreenListener> pListener (
+ new PresenterScreenListener(mxComponentContext, xModel));
+ pListener->Initialize();
return Any();
}
@@ -304,8 +324,7 @@ void PresenterScreenListener::ThrowIfDis
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "PresenterScreenListener object has already been disposed")),
+ A2S("PresenterScreenListener object has already been disposed"),
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
@@ -388,6 +407,11 @@ void PresenterScreen::InitializePresente
try
{
Reference<XComponentContext> xContext (mxContextWeak);
+
+ // Check if disabled by configuration
+ if (!lcl_IsPresenterEnabled(xContext) )
+ return;
+
mpPaneContainer =
new PresenterPaneContainer(Reference<XComponentContext>(xContext));
@@ -541,11 +565,11 @@ sal_Int32 PresenterScreen::GetScreenNumb
// is set.
PresenterConfigurationAccess aConfiguration (
xContext,
-
OUString::createFromAscii("/org.openoffice.Office.PresenterScreen/"),
+ A2S("/org.openoffice.Office.PresenterScreen/"),
PresenterConfigurationAccess::READ_ONLY);
bool bStartAlways (false);
if (aConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/StartAlways")) >>=
bStartAlways)
+ A2S("Presenter/StartAlways")) >>= bStartAlways)
{
if (bStartAlways)
return nScreenNumber;
@@ -704,13 +728,13 @@ void PresenterScreen::SetupConfiguration
{
PresenterConfigurationAccess aConfiguration (
rxContext,
- OUString::createFromAscii("org.openoffice.Office.PresenterScreen"),
+ A2S("org.openoffice.Office.PresenterScreen"),
PresenterConfigurationAccess::READ_ONLY);
maViewDescriptors.clear();
ProcessViewDescriptions(aConfiguration);
- OUString sLayoutName (OUString::createFromAscii("DefaultLayout"));
+ OUString sLayoutName (RTL_CONSTASCII_USTRINGPARAM("DefaultLayout"));
aConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/CurrentLayout")) >>=
sLayoutName;
+ A2S("Presenter/CurrentLayout")) >>= sLayoutName;
ProcessLayout(aConfiguration, sLayoutName, rxContext, rxAnchorId);
}
catch (RuntimeException&)
@@ -731,14 +755,14 @@ void PresenterScreen::ProcessLayout (
{
Reference<container::XHierarchicalNameAccess> xLayoutNode (
rConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/Layouts/")+rsLayoutName),
+ A2S("Presenter/Layouts/") + rsLayoutName),
UNO_QUERY_THROW);
// Read the parent layout first, if one is referenced.
OUString sParentLayout;
rConfiguration.GetConfigurationNode(
xLayoutNode,
- OUString::createFromAscii("ParentLayout")) >>= sParentLayout;
+ A2S("ParentLayout")) >>= sParentLayout;
if (sParentLayout.getLength() > 0)
{
// Prevent infinite recursion.
@@ -750,16 +774,16 @@ void PresenterScreen::ProcessLayout (
Reference<container::XNameAccess> xList (
rConfiguration.GetConfigurationNode(
xLayoutNode,
- OUString::createFromAscii("Layout")),
+ A2S("Layout")),
UNO_QUERY_THROW);
::std::vector<rtl::OUString> aProperties (6);
- aProperties[0] = OUString::createFromAscii("PaneURL");
- aProperties[1] = OUString::createFromAscii("ViewURL");
- aProperties[2] = OUString::createFromAscii("RelativeX");
- aProperties[3] = OUString::createFromAscii("RelativeY");
- aProperties[4] = OUString::createFromAscii("RelativeWidth");
- aProperties[5] = OUString::createFromAscii("RelativeHeight");
+ aProperties[0] = A2S("PaneURL");
+ aProperties[1] = A2S("ViewURL");
+ aProperties[2] = A2S("RelativeX");
+ aProperties[3] = A2S("RelativeY");
+ aProperties[4] = A2S("RelativeWidth");
+ aProperties[5] = A2S("RelativeHeight");
mnComponentIndex = 1;
PresenterConfigurationAccess::ForAll(
xList,
@@ -788,10 +812,10 @@ void PresenterScreen::ProcessViewDescrip
UNO_QUERY_THROW);
::std::vector<rtl::OUString> aProperties (4);
- aProperties[0] = OUString::createFromAscii("ViewURL");
- aProperties[1] = OUString::createFromAscii("Title");
- aProperties[2] = OUString::createFromAscii("AccessibleTitle");
- aProperties[3] = OUString::createFromAscii("IsOpaque");
+ aProperties[0] = A2S("ViewURL");
+ aProperties[1] = A2S("Title");
+ aProperties[2] = A2S("AccessibleTitle");
+ aProperties[3] = A2S("IsOpaque");
mnComponentIndex = 1;
PresenterConfigurationAccess::ForAll(
xViewDescriptionsNode,