officecfg/registry/schema/org/openoffice/Office/Writer.xcs |    8 ----
 sw/source/uibase/config/usrpref.cxx                        |    5 --
 sw/source/uibase/uiview/view.cxx                           |   22 -------------
 3 files changed, 2 insertions(+), 33 deletions(-)

New commits:
commit d276d6e8dbba620921e0c49591f4dd2e8d2f69da
Author:     Xisco Fauli <[email protected]>
AuthorDate: Fri Mar 24 11:46:22 2023 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Mar 25 19:41:07 2023 +0000

    tdf#149485: Revert "tdf#142450 add code to store showing whitespace"
    
    This reverts commit 5b07acbf3345918f450fccf7ee243ad5bcb3fd67.
    
    The reverted commit claims that
    "This option is stored at the document level like the other
    layout options."
    which is not true. The option is saved in the user profile,
    which makes other documents to look wrong.
    Reverting for now until it's implemented at document level
    as the commit suggests
    
    Change-Id: I2ae0daeb410090949f1b6cfc8245b711fe518216
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149541
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 3795729fd0f4bc4769d69b45d3536c7b01692b92)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149520
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 9451792366fe..c4dec43ad67a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1610,14 +1610,6 @@
           </info>
           <value>false</value>
         </prop>
-        <prop oor:name="HideWhitespace" oor:type="xs:boolean" 
oor:nillable="false">
-          <!-- UIHints: View - Show Whitespace -->
-          <info>
-            <desc>Specifies whether to hide whitespace.</desc>
-            <label>View Layout Hide Whitespace</label>
-          </info>
-          <value>false</value>
-        </prop>
       </group>
     </group>
     <group oor:name="Grid">
diff --git a/sw/source/uibase/config/usrpref.cxx 
b/sw/source/uibase/config/usrpref.cxx
index 45590d5e0b8a..e2599f4092b3 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -271,9 +271,8 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() 
const
         "Other/IsSquaredPageMode",              //17
         "Other/ApplyCharUnit",                  //18
         "Window/ShowScrollBarTips",             //19
-        "ViewLayout/HideWhitespace",            //20
     };
-    const int nCount = m_bWeb ? 13 : 21;
+    const int nCount = m_bWeb ? 13 : 20;
     Sequence<OUString> aNames(nCount);
     OUString* pNames = aNames.getArray();
     for(int i = 0; i < nCount; i++)
@@ -335,7 +334,6 @@ void SwLayoutViewConfig::ImplCommit()
             case 17: rVal <<= m_rParent.IsSquaredPageMode(); break;            
       // "Other/IsSquaredPageMode",
             case 18: rVal <<= m_rParent.IsApplyCharUnit(); break;              
       // "Other/ApplyCharUnit",
             case 19: rVal <<= m_rParent.IsShowScrollBarTips(); break;          
       // "Window/ShowScrollBarTips",
-            case 20: rVal <<= m_rParent.IsHideWhitespaceMode(); break;         
       // "ViewLayout/HideWhitespace"
         }
     }
     PutProperties(aNames, aValues);
@@ -391,7 +389,6 @@ void SwLayoutViewConfig::Load()
                 case 17: m_rParent.SetDefaultPageMode(bSet,true); break;// 
"Other/IsSquaredPageMode",
                 case 18: m_rParent.SetApplyCharUnit(bSet, true); break;// 
"Other/ApplyUserChar"
                 case 29: m_rParent.SetShowScrollBarTips(bSet); break;// 
"Window/ShowScrollBarTips",
-                case 20: m_rParent.SetHideWhitespaceMode(bSet); break;// 
"ViewLayout/HideWhitespace"
             }
         }
     }
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 8e8858213f05..5b14cd43842b 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1349,7 +1349,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < 
beans::PropertyValue >
     sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->GetZoom());
     bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode();
     sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns();
-    bool bHideWhitespace = pVOpt->IsHideWhitespaceMode();
 
     bool bSelectedFrame = ( m_pWrtShell->GetSelFrameType() != 
FrameTypeFlags::NONE ),
              bGotVisibleLeft = false,
@@ -1357,7 +1356,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < 
beans::PropertyValue >
              bGotZoomType = false,
              bGotZoomFactor = false, bGotIsSelectedFrame = false,
              bGotViewLayoutColumns = false, bGotViewLayoutBookMode = false,
-             bGotHideWhitespace = false,
              bBrowseMode = false, bGotBrowseMode = false;
     bool bKeepRatio = pVOpt->IsKeepRatio();
     bool bGotKeepRatio = false;
@@ -1421,11 +1419,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
             rValue.Value >>= bKeepRatio;
             bGotKeepRatio = true;
         }
-        else if (rValue.Name == "HideWhitespace")
-        {
-            rValue.Value >>= bHideWhitespace;
-            bGotHideWhitespace = true;
-        }
         // Fallback to common SdrModel processing
         else
            
GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->ReadUserDataSequenceValue(&rValue);
@@ -1495,21 +1488,11 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
         m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
     }
 
-    SwViewOption aUsrPref(*pVOpt);
-    bool bUsrPrefModified = false;
     if (bGotKeepRatio && bKeepRatio != pVOpt->IsKeepRatio())
     {
         // Got a custom value, then it makes sense to trigger notifications.
+        SwViewOption aUsrPref(*pVOpt);
         aUsrPref.SetKeepRatio(bKeepRatio);
-        bUsrPrefModified = true;
-    }
-    if (bGotHideWhitespace && bHideWhitespace != pVOpt->IsHideWhitespaceMode())
-    {
-        aUsrPref.SetHideWhitespaceMode(bHideWhitespace);
-        bUsrPrefModified = true;
-    }
-    if (bUsrPrefModified)
-    {
         SW_MOD()->ApplyUsrPref(aUsrPref, this);
     }
 
@@ -1615,9 +1598,6 @@ void SwView::WriteUserDataSequence ( uno::Sequence < 
beans::PropertyValue >& rSe
     aVector.push_back(
         comphelper::makePropertyValue("KeepRatio", 
m_pWrtShell->GetViewOptions()->IsKeepRatio()));
 
-    aVector.push_back(comphelper::makePropertyValue(
-        "HideWhitespace", 
m_pWrtShell->GetViewOptions()->IsHideWhitespaceMode()));
-
     rSequence = comphelper::containerToSequence(aVector);
 
     // Common SdrModel processing

Reply via email to