sd: add "bAllyState" parameter to "getPresentationInfo" function
To check if the user has enabled the accessibility feature flag, verify the corresponding setting. Change-Id: Iae44631ca4b2359f29f3aba6d5434789e29c1717 Signed-off-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190705 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192440 Tested-by: Jenkins
This commit is contained in:
@@ -5766,7 +5766,14 @@ static char* doc_getPresentationInfo(LibreOfficeKitDocument* pThis)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return convertOString(pDoc->getPresentationInfo());
|
||||
bool bAllyState = false;
|
||||
SfxViewShell* pViewShell = SfxViewShell::Current();
|
||||
if (pViewShell)
|
||||
{
|
||||
bAllyState = pViewShell->GetLOKAccessibilityState();
|
||||
}
|
||||
|
||||
return convertOString(pDoc->getPresentationInfo(bAllyState));
|
||||
}
|
||||
|
||||
static bool doc_createSlideRenderer(
|
||||
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
virtual OString getViewRenderState(SfxViewShell* = nullptr) { return rtl::OString(); }
|
||||
|
||||
/** Return JSON structure filled with the information about the presentation (Impress only function) */
|
||||
virtual OString getPresentationInfo() const
|
||||
virtual OString getPresentationInfo(bool = false /*bAllyState*/) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ public:
|
||||
SD_DLLPUBLIC virtual void getCommandValues(tools::JsonWriter& rJsonWriter, std::string_view rCommand) override;
|
||||
|
||||
/// @see vcl::ITiledRenderable::getPresentationInfo().
|
||||
SD_DLLPUBLIC OString getPresentationInfo() const override;
|
||||
SD_DLLPUBLIC OString getPresentationInfo(bool bAllyState = false) const override;
|
||||
/// @see vcl::ITiledRenderable::createSlideRenderer().
|
||||
SD_DLLPUBLIC bool createSlideRenderer(
|
||||
const OString& rSlideHash,
|
||||
|
||||
@@ -4604,7 +4604,7 @@ void getShapeClickAction(const uno::Reference<drawing::XShape> &xShape, ::tools:
|
||||
}
|
||||
}
|
||||
|
||||
OString SdXImpressDocument::getPresentationInfo() const
|
||||
OString SdXImpressDocument::getPresentationInfo(bool bAllyState) const
|
||||
{
|
||||
::tools::JsonWriter aJsonWriter;
|
||||
|
||||
@@ -4656,6 +4656,8 @@ OString SdXImpressDocument::getPresentationInfo() const
|
||||
{
|
||||
auto aName = SdDrawPage::getPageApiNameFromUiName(pPage->GetName());
|
||||
aJsonWriter.put("name", aName);
|
||||
|
||||
if (bAllyState)
|
||||
{
|
||||
OUStringBuffer aHtml;
|
||||
SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
|
||||
|
||||
Reference in New Issue
Block a user