diff options
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 31 | ||||
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 5 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/optcomparison.ui | 93 |
3 files changed, 121 insertions, 8 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index add7bed5a079..294e25772da0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2457,10 +2457,15 @@ SwCompareOptionsTabPage::SwCompareOptionsTabPage(weld::Container* pPage, weld::D , m_xAutoRB(m_xBuilder->weld_radio_button("auto")) , m_xWordRB(m_xBuilder->weld_radio_button("byword")) , m_xCharRB(m_xBuilder->weld_radio_button("bycharacter")) + , m_xCompareModeImg(m_xBuilder->weld_widget("lockcomparemode")) , m_xRsidCB(m_xBuilder->weld_check_button("useRSID")) + , m_xRsidImg(m_xBuilder->weld_widget("lockuseRSID")) , m_xIgnoreCB(m_xBuilder->weld_check_button("ignore")) + , m_xIgnoreImg(m_xBuilder->weld_widget("lockignore")) , m_xLenNF(m_xBuilder->weld_spin_button("ignorelen")) + , m_xLenImg(m_xBuilder->weld_widget("lockignorelen")) , m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID")) + , m_xStoreRsidImg(m_xBuilder->weld_widget("lockstoreRSID")) { Link<weld::Toggleable&,void> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) ); m_xAutoRB->connect_toggled( aLnk ); @@ -2581,22 +2586,48 @@ void SwCompareOptionsTabPage::Reset( const SfxItemSet* ) m_xIgnoreCB->set_sensitive(true); m_xLenNF->set_sensitive(true); } + + if (officecfg::Office::Writer::Comparison::Mode::isReadOnly()) + { + m_xAutoRB->set_sensitive(false); + m_xWordRB->set_sensitive(false); + m_xCharRB->set_sensitive(false); + m_xCompareModeImg->set_visible(true); + } + m_xAutoRB->save_state(); m_xWordRB->save_state(); m_xCharRB->save_state(); m_xRsidCB->set_active( pOpt->IsUseRsid() ); + if (officecfg::Office::Writer::Comparison::UseRSID::isReadOnly()) + { + m_xRsidCB->set_sensitive(false); + m_xRsidImg->set_visible(true); + } m_xRsidCB->save_state(); m_xIgnoreCB->set_active( pOpt->IsIgnorePieces() ); + if (officecfg::Office::Writer::Comparison::IgnorePieces::isReadOnly()) + { + m_xIgnoreCB->set_sensitive(false); + m_xIgnoreImg->set_visible(true); + } m_xIgnoreCB->save_state(); m_xLenNF->set_sensitive( m_xIgnoreCB->get_active() && eCmpMode != SwCompareMode::Auto ); m_xLenNF->set_value( pOpt->GetPieceLen() ); + if (officecfg::Office::Writer::Comparison::IgnoreLength::isReadOnly()) + { + m_xLenNF->set_sensitive(false); + m_xLenImg->set_visible(true); + } m_xLenNF->save_value(); m_xStoreRsidCB->set_active(pOpt->IsStoreRsid()); + m_xStoreRsidCB->set_sensitive(!officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly()); + m_xStoreRsidImg->set_visible(officecfg::Office::Writer::Comparison::StoreRSID::isReadOnly()); m_xStoreRsidCB->save_state(); } diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 9027c74ab1bf..ba9c585d9d99 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -451,10 +451,15 @@ class SwCompareOptionsTabPage final : public SfxTabPage std::unique_ptr<weld::RadioButton> m_xAutoRB; std::unique_ptr<weld::RadioButton> m_xWordRB; std::unique_ptr<weld::RadioButton> m_xCharRB; + std::unique_ptr<weld::Widget> m_xCompareModeImg; std::unique_ptr<weld::CheckButton> m_xRsidCB; + std::unique_ptr<weld::Widget> m_xRsidImg; std::unique_ptr<weld::CheckButton> m_xIgnoreCB; + std::unique_ptr<weld::Widget> m_xIgnoreImg; std::unique_ptr<weld::SpinButton> m_xLenNF; + std::unique_ptr<weld::Widget> m_xLenImg; std::unique_ptr<weld::CheckButton> m_xStoreRsidCB; + std::unique_ptr<weld::Widget> m_xStoreRsidImg; DECL_LINK(ComparisonHdl, weld::Toggleable&, void); DECL_LINK(IgnoreHdl, weld::Toggleable&, void); diff --git a/sw/uiconfig/swriter/ui/optcomparison.ui b/sw/uiconfig/swriter/ui/optcomparison.ui index 8010cbc0a9a2..afaab6e4bbd1 100644 --- a/sw/uiconfig/swriter/ui/optcomparison.ui +++ b/sw/uiconfig/swriter/ui/optcomparison.ui @@ -22,7 +22,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=3 --> + <!-- n-columns=2 n-rows=3 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -40,7 +40,7 @@ <property name="draw-indicator">True</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> </packing> </child> @@ -55,7 +55,7 @@ <property name="group">auto</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -70,10 +70,29 @@ <property name="group">auto</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">2</property> </packing> </child> + <child> + <object class="GtkImage" id="lockcomparemode"> + <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="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> <child type="label"> @@ -100,7 +119,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=2 n-rows=3 --> + <!-- n-columns=4 n-rows=3 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -118,7 +137,7 @@ <property name="draw-indicator">True</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -132,7 +151,7 @@ <property name="draw-indicator">True</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> </packing> </child> @@ -145,7 +164,7 @@ <property name="adjustment">adjustment1</property> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">3</property> <property name="top-attach">1</property> </packing> </child> @@ -159,11 +178,69 @@ <property name="draw-indicator">True</property> </object> <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockuseRSID"> + <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="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockignore"> + <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="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockstoreRSID"> + <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="icon-name">res/lock.png</property> + </object> + <packing> <property name="left-attach">0</property> <property name="top-attach">2</property> </packing> </child> <child> + <object class="GtkImage" id="lockignorelen"> + <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="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">2</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> <placeholder/> </child> <child> |