summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-01 14:25:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-01 14:26:26 +0200
commitbd23cf009a7e3c63a066794d41ae0c97589c8891 (patch)
treed51fdfada8c371e0d04f5add92ffb90fa8fc1354
parent8701899950e0d0135ee7f66296714740406e4350 (diff)
tdf#87441: Check for read-only RemoveHiddenContent
Change-Id: Ic67c368c63e598f727d81ebb566ff858a2c1dfcc
-rw-r--r--cui/source/options/optinet2.cxx15
-rw-r--r--cui/source/options/optinet2.hxx2
-rw-r--r--cui/uiconfig/ui/optemailpage.ui19
3 files changed, 29 insertions, 7 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 3d15501f61d7..4c610886a7be 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -942,12 +942,15 @@ struct SvxEMailTabPage_Impl
bROProgram(
officecfg::Office::Common::ExternalMailer::Program::isReadOnly()),
bHideContent(
- officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get())
+ officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get()),
+ bROHideContent(
+ officecfg::Office::Security::HiddenContent::RemoveHiddenContent::isReadOnly())
{}
OUString sProgram;
bool bROProgram;
bool bHideContent;
+ bool bROHideContent;
};
SvxEMailTabPage::SvxEMailTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
@@ -958,6 +961,8 @@ SvxEMailTabPage::SvxEMailTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
get(m_pMailerURLFI, "lockemail");
get(m_pMailerURLED, "url");
get(m_pMailerURLPB, "browse");
+ get(m_pSuppressHiddenContainer, "suppressHiddenCont");
+ get(m_pSuppressHiddenFI, "lockSuppressHidden");
get(m_pSuppressHidden, "suppressHidden");
m_sDefaultFilterName = get<FixedText>("browsetitle")->GetText();
m_pMailerURLPB->SetClickHdl( LINK( this, SvxEMailTabPage, FileDialogHdl_Impl ) );
@@ -989,7 +994,8 @@ bool SvxEMailTabPage::FillItemSet( SfxItemSet* )
officecfg::Office::Common::ExternalMailer::Program::set(
pImpl->sProgram, batch);
}
- if (pImpl->bHideContent != m_pSuppressHidden->IsChecked())
+ if (!pImpl->bROHideContent
+ && pImpl->bHideContent != m_pSuppressHidden->IsChecked())
{
pImpl->bHideContent = m_pSuppressHidden->IsChecked();
officecfg::Office::Security::HiddenContent::RemoveHiddenContent::set(
@@ -1014,7 +1020,12 @@ void SvxEMailTabPage::Reset( const SfxItemSet* )
m_pMailContainer->Enable(!pImpl->bROProgram);
+ if (pImpl->bROHideContent)
+ m_pSuppressHiddenFI->Show();
+
m_pSuppressHidden->Check(pImpl->bHideContent);
+
+ m_pSuppressHiddenContainer->Enable(!pImpl->bROHideContent);
}
/* -------------------------------------------------------------------------*/
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 0c5f713d858d..37c97c1c7b0c 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -186,6 +186,8 @@ class SvxEMailTabPage : public SfxTabPage
FixedImage* m_pMailerURLFI;
Edit* m_pMailerURLED;
PushButton* m_pMailerURLPB;
+ VclContainer* m_pSuppressHiddenContainer;
+ FixedImage* m_pSuppressHiddenFI;
CheckBox* m_pSuppressHidden;
OUString m_sDefaultFilterName;
diff --git a/cui/uiconfig/ui/optemailpage.ui b/cui/uiconfig/ui/optemailpage.ui
index 4a2a913eded1..890604488538 100644
--- a/cui/uiconfig/ui/optemailpage.ui
+++ b/cui/uiconfig/ui/optemailpage.ui
@@ -103,7 +103,7 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkGrid" id="suppressHiddenCont">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
@@ -141,10 +141,19 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
+ <object class="GtkImage" id="lockSuppressHidden">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixbuf">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
</object>
<packing>