diff options
-rw-r--r-- | svx/source/sidebar/inspector/InspectorTextPanel.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 10 |
2 files changed, 6 insertions, 11 deletions
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; |