Kaydet (Commit) 587527b4 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Andras Timar

NFC ww8 cleanup: remove unused variables, simplify, whitespace

Change-Id: Ib4f100d4019643cde893ef1d8643a5c08b55ff8f
Reviewed-on: https://gerrit.libreoffice.org/61951
Tested-by: Jenkins
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
(cherry picked from commit 2ec0cf50)
üst 7139f926
......@@ -497,14 +497,9 @@ static void WriteDop( WW8Export& rWrt )
OSL_ENSURE(pDocShell, "no SwDocShell");
uno::Reference<document::XDocumentProperties> xDocProps;
uno::Reference<beans::XPropertySet> xProps;
if (pDocShell) {
uno::Reference<lang::XComponent> xModelComp(pDocShell->GetModel(),
uno::UNO_QUERY);
xProps.set(xModelComp, uno::UNO_QUERY);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
xModelComp, uno::UNO_QUERY_THROW);
xDocProps = xDPS->getDocumentProperties();
OSL_ENSURE(xDocProps.is(), "DocumentProperties is null");
if ( pDocShell )
{
xProps.set(pDocShell->GetModel(), uno::UNO_QUERY);
rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash();
}
......
......@@ -1889,22 +1889,14 @@ void SwWW8ImplReader::ImportDop()
// disable form design mode to be able to use imported controls directly
// #i31239# always disable form design mode, not only in protected docs
uno::Reference<beans::XPropertySet> xDocProps(m_pDocShell->GetModel(), uno::UNO_QUERY);
if (xDocProps.is())
{
uno::Reference<lang::XComponent> xModelComp(m_pDocShell->GetModel(),
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xDocProps(xModelComp,
uno::UNO_QUERY);
if (xDocProps.is())
uno::Reference<beans::XPropertySetInfo> xInfo = xDocProps->getPropertySetInfo();
if (xInfo.is())
{
uno::Reference<beans::XPropertySetInfo> xInfo =
xDocProps->getPropertySetInfo();
if (xInfo.is())
{
if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
{
xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(false));
}
}
if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(false));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment