summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-20 17:23:27 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-09-21 09:29:28 +0000
commite91e11d091a323d13b480a8bf995e1d70a0f8e89 (patch)
tree6a53e4e22b65bfd46f4eaca50e9a786bf732c94c /sw
parent7dfe0da0d9852c1f5bb1b71257e914435f75a44b (diff)
tdf#101536 sw: do load Insert Index dialog's document ReadOnly
Turns out SwOneExampleFrame is used for different things, so load doc read-only only if it's an existing document. (regression from 6a8407d82d71083c8bdec6a106ba9092a5196cbe) (cherry picked from commit b7faef01678573f7b060ad26798aa841689ce3e6) Change-Id: I0a1ab0725ed9dccca23742c9d83cd9635a188edf Reviewed-on: https://gerrit.libreoffice.org/29100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/unotools.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 77dfc9f7a289..15ca5d12be33 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -137,13 +137,15 @@ void SwOneExampleFrame::CreateControl()
sTempURL = sArgumentURL;
aURL <<= sTempURL;
- uno::Sequence<beans::PropertyValue> aSeq(2);
+ uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pValues = aSeq.getArray();
pValues[0].Name = "OpenFlags";
pValues[0].Value <<= OUString("-RB");
pValues[1].Name = "Referer";
pValues[1].Value <<= OUString("private:user");
+ pValues[2].Name = "ReadOnly";
+ pValues[2].Value <<= (sTempURL != cFactory);
uno::Any aArgs;
aArgs.setValue(&aSeq, cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get());