svx/source/sidebar/inspector/InspectorTextPanel.cxx   |    7 ++++++-
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |   10 ----------
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 9abeaaff50e9f6f15c0ef1be5fdabb6fbe1b7a5c
Author:     Shivam Kumar Singh <shivamhere...@gmail.com>
AuthorDate: Wed Jul 8 09:44:19 2020 +0530
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Jul 8 14:55:14 2020 +0200

    tdf#134567 Show all properties in DPS
    
    Change-Id: If2238a80fbc9fc803fc5e12904964bf4289ba2d4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98310
    Tested-by: Jenkins
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx 
b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 906ca736a91a..652e63261713 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -44,7 +44,7 @@ InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
     : PanelLayout(pParent, "InspectorTextPanel", 
"svx/ui/inspectortextpanel.ui", rxFrame)
     , mxListBoxStyles(m_xBuilder->weld_tree_view("listbox_fonts"))
 {
-    mxListBoxStyles->set_size_request(-1, 
mxListBoxStyles->get_height_rows(27));
+    mxListBoxStyles->set_size_request(-1, 
mxListBoxStyles->get_height_rows(25));
 }
 
 static void FillBox_Impl(weld::TreeView& rListBoxStyles, const TreeNode& 
current,
@@ -74,6 +74,11 @@ void InspectorTextPanel::updateEntries(const 
std::vector<TreeNode>& rStore)
         pTreeDiagram->expand_row(rEntry);
         return false;
     });
+
+    std::unique_ptr<weld::TreeIter> xEntry = mxListBoxStyles->make_iterator();
+    mxListBoxStyles->get_iter_first(*xEntry);
+    mxListBoxStyles->iter_next(*xEntry);
+    mxListBoxStyles->collapse_row(*xEntry); // Collapse "Default Paragraph 
Style"
 }
 
 InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx 
b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index b4733e0c1633..dbc22de258b5 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -146,10 +146,8 @@ static void UpdateTree(SwDocShell* pDocSh, 
svx::sidebar::TreeNode& pParentNode,
     {
         uno::Reference<style::XStyle> xProp1;
         uno::Reference<beans::XPropertySet> xProp1Set;
-        uno::Reference<beans::XPropertyState> xProp1State;
         xStyleFamily->getByName(sCurrentStyleName) >>= xProp1;
         xStyleFamily->getByName(sCurrentStyleName) >>= xProp1Set;
-        xStyleFamily->getByName(sCurrentStyleName) >>= xProp1State;
         OUString aParentCharStyle = xProp1->getParentStyle();
         xProp1Set->getPropertyValue("DisplayName") >>= sDisplayName;
         svx::sidebar::TreeNode pCurrentChild;
@@ -170,10 +168,6 @@ static void UpdateTree(SwDocShell* pDocSh, 
svx::sidebar::TreeNode& pParentNode,
             for (const beans::Property& rProperty : aProperties)
             {
                 OUString sPropName = rProperty.Name;
-                // If property's current value equals default value
-                if (xProp1Set->getPropertyValue(sPropName)
-                    == xProp1State->getPropertyDefault(sPropName))
-                    continue;
 
                 if (maIsDefined[sPropName])
                     continue;
@@ -204,9 +198,7 @@ static void UpdateTree(SwDocShell* pDocSh, 
svx::sidebar::TreeNode& pParentNode,
     }
 
     uno::Reference<beans::XPropertySet> aProp1Set;
-    uno::Reference<beans::XPropertyState> aProp1State;
     xStyleFamily->getByName(sCurrentStyleName) >>= aProp1Set;
-    xStyleFamily->getByName(sCurrentStyleName) >>= aProp1State;
 
     const uno::Sequence<beans::Property> aProperties
         = aProp1Set->getPropertySetInfo()->getProperties();
@@ -216,8 +208,6 @@ static void UpdateTree(SwDocShell* pDocSh, 
svx::sidebar::TreeNode& pParentNode,
     for (const beans::Property& rProperty : aProperties)
     {
         OUString aPropertyValuePair, sPropName = rProperty.Name;
-        if (aProp1Set->getPropertyValue(sPropName) == 
aProp1State->getPropertyDefault(sPropName))
-            continue;
         if (maIsDefined[sPropName])
             continue;
         maIsDefined[sPropName] = true;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to