diff options
author | heiko tietze <tietze.heiko@gmail.com> | 2019-02-14 11:33:54 +0100 |
---|---|---|
committer | Heiko Tietze <tietze.heiko@gmail.com> | 2019-02-18 09:49:50 +0100 |
commit | 7dcd1651e8cd89f07bbe618393bea32fc73d3549 (patch) | |
tree | b4008ab120021c7c2f261c2871e40da359c76558 | |
parent | d341b12a924c5c901021ac0d36d8bd8dbc69b478 (diff) |
Resolves tdf#123091 - Move Display Fields section from Formatting Aids to View
Change-Id: Ie302ff30328bd23c280369db0bb84c6103335ae3
Reviewed-on: https://gerrit.libreoffice.org/67812
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 21 | ||||
-rw-r--r-- | sw/source/uibase/config/cfgitems.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/inc/cfgitems.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 5 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/optformataidspage.ui | 69 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/viewoptionspage.ui | 67 |
6 files changed, 93 insertions, 97 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 7f717160d4fc..d497d3e3dcd0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -110,6 +110,9 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, get (m_pFieldNameCB, "fieldcodes"); get (m_pPostItCB, "comments"); + get(m_pFieldHiddenCB, "hiddentextfield"); + get(m_pFieldHiddenParaCB, "hiddenparafield"); + get (m_pSettingsFrame, "settingsframe"); get (m_pSettingsLabel, "settingslabel"); get (m_pMetricLabel, "measureunitlabel"); @@ -189,6 +192,8 @@ void SwContentOptPage::dispose() m_pDrwCB.clear(); m_pFieldNameCB.clear(); m_pPostItCB.clear(); + m_pFieldHiddenCB.clear(); + m_pFieldHiddenParaCB.clear(); m_pSettingsFrame.clear(); m_pSettingsLabel.clear(); m_pMetricLabel.clear(); @@ -240,6 +245,8 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) m_pVRulerRightCBox->Check (pElemAttr->bVertRulerRight); m_pSmoothCBox->Check (pElemAttr->bSmoothScroll); m_pShowInlineTooltips->Check (pElemAttr->bShowInlineTooltips); + m_pFieldHiddenCB->Check ( pElemAttr->bFieldHiddenText ); + m_pFieldHiddenParaCB->Check ( pElemAttr->bShowHiddenPara ); } m_pMetricLB->SetNoSelection(); lcl_SelectMetricLB(m_pMetricLB, SID_ATTR_METRIC, *rSet); @@ -263,6 +270,8 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) aElem.bVertRulerRight = m_pVRulerRightCBox->IsChecked(); aElem.bSmoothScroll = m_pSmoothCBox->IsChecked(); aElem.bShowInlineTooltips = m_pShowInlineTooltips->IsChecked(); + aElem.bFieldHiddenText = m_pFieldHiddenCB->IsChecked(); + aElem.bShowHiddenPara = m_pFieldHiddenParaCB->IsChecked(); bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) @@ -1261,8 +1270,6 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, get(m_pTabCB, "tabs"); get(m_pBreakCB, "break"); get(m_pCharHiddenCB, "hiddentext"); - get(m_pFieldHiddenCB, "hiddentextfield"); - get(m_pFieldHiddenParaCB, "hiddenparafield"); get(m_pDirectCursorFrame, "directcrsrframe"); get(m_pOnOffCB, "cursoronoff"); @@ -1302,8 +1309,8 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, m_pTabCB->Hide(); m_pCharHiddenCB->Hide(); - m_pFieldHiddenCB->Hide(); - m_pFieldHiddenParaCB->Hide(); +// m_pFieldHiddenCB->Hide(); +// m_pFieldHiddenParaCB->Hide(); m_pDirectCursorFrame->Hide(); m_pOnOffCB->Hide(); @@ -1332,8 +1339,6 @@ void SwShdwCursorOptionsTabPage::dispose() m_pTabCB.clear(); m_pBreakCB.clear(); m_pCharHiddenCB.clear(); - m_pFieldHiddenCB.clear(); - m_pFieldHiddenParaCB.clear(); m_pDirectCursorFrame.clear(); m_pOnOffCB.clear(); m_pFillMarginRB.clear(); @@ -1408,9 +1413,7 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) aDisp.bSpace = m_pSpacesCB->IsChecked(); aDisp.bNonbreakingSpace = m_pHSpacesCB->IsChecked(); aDisp.bSoftHyphen = m_pSHyphCB->IsChecked(); - aDisp.bFieldHiddenText = m_pFieldHiddenCB->IsChecked(); aDisp.bCharHiddenText = m_pCharHiddenCB->IsChecked(); - aDisp.bShowHiddenPara = m_pFieldHiddenParaCB->IsChecked(); aDisp.bManualBreak = m_pBreakCB->IsChecked(); bRet |= (!pOldAttr || aDisp != *pOldAttr); @@ -1463,8 +1466,6 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet ) m_pHSpacesCB->Check ( pDocDisplayAttr->bNonbreakingSpace ); m_pSHyphCB->Check ( pDocDisplayAttr->bSoftHyphen ); m_pCharHiddenCB->Check ( pDocDisplayAttr->bCharHiddenText ); - m_pFieldHiddenCB->Check ( pDocDisplayAttr->bFieldHiddenText ); - m_pFieldHiddenParaCB->Check ( pDocDisplayAttr->bShowHiddenPara ); m_pBreakCB->Check ( pDocDisplayAttr->bManualBreak ); } } diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 98dc29eba68e..c07a0c84bbed 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -38,11 +38,8 @@ SwDocDisplayItem::SwDocDisplayItem() : bSpace = bNonbreakingSpace = bSoftHyphen = - bFieldHiddenText = bCharHiddenText = - bManualBreak = - bShowHiddenPara = false; - + bManualBreak = true; }; // Item for the Settings dialog, page document view @@ -55,9 +52,7 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) : bNonbreakingSpace = rVOpt.IsHardBlank(); bSoftHyphen = rVOpt.IsSoftHyph(); bCharHiddenText = rVOpt.IsShowHiddenChar(true); - bFieldHiddenText = rVOpt.IsShowHiddenField(); bManualBreak = rVOpt.IsLineBreak(true); - bShowHiddenPara = rVOpt.IsShowHiddenPara(); } SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool* ) const @@ -77,9 +72,7 @@ bool SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const bNonbreakingSpace == rItem.bNonbreakingSpace && bSoftHyphen == rItem.bSoftHyphen && bCharHiddenText == rItem.bCharHiddenText && - bFieldHiddenText == rItem.bFieldHiddenText && - bManualBreak == rItem.bManualBreak && - bShowHiddenPara == rItem.bShowHiddenPara ); + bManualBreak == rItem.bManualBreak ); } void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const @@ -90,9 +83,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetHardBlank (bNonbreakingSpace ); rVOpt.SetSoftHyph (bSoftHyphen ); rVOpt.SetShowHiddenChar(bCharHiddenText ); - rVOpt.SetShowHiddenField(bFieldHiddenText ); rVOpt.SetLineBreak (bManualBreak ); - rVOpt.SetShowHiddenPara(bShowHiddenPara ); } SwElemItem::SwElemItem() : @@ -108,6 +99,8 @@ SwElemItem::SwElemItem() : bFieldName = bNotes = false; bShowInlineTooltips = true; + bFieldHiddenText = + bShowHiddenPara = false; } SwElemItem::SwElemItem(const SwViewOption& rVOpt) : @@ -123,7 +116,8 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) : bFieldName = rVOpt.IsFieldName(); bNotes = rVOpt.IsPostIts(); bShowInlineTooltips = rVOpt.IsShowInlineTooltips(); - + bFieldHiddenText = rVOpt.IsShowHiddenField(); + bShowHiddenPara = rVOpt.IsShowHiddenPara(); } SfxPoolItem* SwElemItem::Clone( SfxItemPool* ) const @@ -146,7 +140,9 @@ bool SwElemItem::operator==( const SfxPoolItem& rAttr ) const bDrawing == rItem.bDrawing && bFieldName == rItem.bFieldName && bNotes == rItem.bNotes && - bShowInlineTooltips == rItem.bShowInlineTooltips ); + bShowInlineTooltips == rItem.bShowInlineTooltips && + bFieldHiddenText == rItem.bFieldHiddenText && + bShowHiddenPara == rItem.bShowHiddenPara); } void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const @@ -162,6 +158,8 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetFieldName (bFieldName ); rVOpt.SetPostIts (bNotes ); rVOpt.SetShowInlineTooltips( bShowInlineTooltips ); + rVOpt.SetShowHiddenField(bFieldHiddenText ); + rVOpt.SetShowHiddenPara(bShowHiddenPara ); } // CTOR for empty Item diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index c2187d2b0aa9..66946df3d1e9 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -50,9 +50,7 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem bool bNonbreakingSpace :1; bool bSoftHyphen :1; bool bCharHiddenText :1; - bool bFieldHiddenText :1; bool bManualBreak :1; - bool bShowHiddenPara :1; public: SwDocDisplayItem(); @@ -80,6 +78,8 @@ class SW_DLLPUBLIC SwElemItem : public SfxPoolItem bool bFieldName :1; bool bNotes :1; bool bShowInlineTooltips :1; + bool bFieldHiddenText :1; + bool bShowHiddenPara :1; friend class SwContentOptPage; diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 801230d09bc1..b95222cd095a 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -58,7 +58,8 @@ class SwContentOptPage : public SfxTabPage VclPtr<ListBox> m_pMetricLB; VclPtr<CheckBox> m_pShowInlineTooltips; - + VclPtr<CheckBox> m_pFieldHiddenCB; + VclPtr<CheckBox> m_pFieldHiddenParaCB; DECL_LINK(VertRulerHdl, Button*, void); public: SwContentOptPage( vcl::Window* pParent, const SfxItemSet& rSet); @@ -234,8 +235,6 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage VclPtr<CheckBox> m_pTabCB; VclPtr<CheckBox> m_pBreakCB; VclPtr<CheckBox> m_pCharHiddenCB; - VclPtr<CheckBox> m_pFieldHiddenCB; - VclPtr<CheckBox> m_pFieldHiddenParaCB; VclPtr<VclFrame> m_pDirectCursorFrame; VclPtr<CheckBox> m_pOnOffCB; diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui b/sw/uiconfig/swriter/ui/optformataidspage.ui index 24718bf9702e..a869a1c3344e 100644 --- a/sw/uiconfig/swriter/ui/optformataidspage.ui +++ b/sw/uiconfig/swriter/ui/optformataidspage.ui @@ -227,75 +227,6 @@ </packing> </child> <child> - <object class="GtkFrame" id="frame2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkAlignment" id="alignment6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="top_padding">6</property> - <property name="left_padding">12</property> - <child> - <object class="GtkGrid" id="grid7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - <child> - <object class="GtkCheckButton" id="hiddentextfield"> - <property name="label" translatable="yes" context="optformataidspage|hiddentextfield">Hidden te_xt</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="hiddenparafield"> - <property name="label" translatable="yes" context="optformataidspage|hiddenparafield">Hidden p_aragraphs</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="displayfl1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="optformataidspage|displayfl">Display fields</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> <object class="GtkFrame" id="frame4"> <property name="visible">True</property> <property name="can_focus">False</property> diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui b/sw/uiconfig/swriter/ui/viewoptionspage.ui index b5d64b2031c0..c77cd914eb37 100644 --- a/sw/uiconfig/swriter/ui/viewoptionspage.ui +++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui @@ -200,6 +200,73 @@ <property name="position">1</property> </packing> </child> + <child> + <object class="GtkFrame" id="fieldsframe"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="fieldsalignment"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkCheckButton" id="hiddentextfield"> + <property name="label" translatable="yes" context="viewoptionspage|hiddentextfield">Hidden te_xt</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="hiddenparafield"> + <property name="label" translatable="yes" context="viewoptionspage|hiddenparafield">Hidden p_aragraphs</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="displayfl1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="viewoptionspage|fieldslabel">Display fields</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> |