summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs8
-rw-r--r--sc/inc/viewopti.hxx3
-rw-r--r--sc/source/core/tool/viewopti.cxx11
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx11
-rw-r--r--sc/source/ui/inc/searchresults.hxx2
-rw-r--r--sc/source/ui/inc/tpview.hxx1
-rw-r--r--sc/source/ui/optdlg/tpview.cxx7
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
-rw-r--r--sc/uiconfig/scalc/ui/searchresults.ui23
-rw-r--r--sc/uiconfig/scalc/ui/tpviewpage.ui20
10 files changed, 83 insertions, 7 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index e5b3318ff701..1517514c903d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -390,6 +390,14 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="SearchSummary" oor:type="xs:boolean" oor:nillable="false">
+ <!-- UIHints: Tools - Options -Spreadsheets - View - [Section] Window -->
+ <info>
+ <desc>Specifies whether a summarizing dialog is displayed after search.</desc>
+ <label>Search summary</label>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="Other">
<info>
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index e768b1ba4a8a..99936ee284bb 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -44,7 +44,8 @@ enum ScViewOption
VOPT_HELPLINES,
VOPT_ANCHOR,
VOPT_PAGEBREAKS,
- VOPT_CLIPMARKS
+ VOPT_SUMMARY,
+ VOPT_CLIPMARKS,
};
enum ScVObjType
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 58262ae65ba8..95ad06cfa69f 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -109,6 +109,7 @@ void ScViewOptions::SetDefaults()
aOptArr[ VOPT_ANCHOR ] = true;
aOptArr[ VOPT_PAGEBREAKS ] = true;
aOptArr[ VOPT_CLIPMARKS ] = true;
+ aOptArr[ VOPT_SUMMARY ] = true;
aModeArr[VOBJ_TYPE_OLE ] = VOBJ_MODE_SHOW;
aModeArr[VOBJ_TYPE_CHART] = VOBJ_MODE_SHOW;
@@ -214,6 +215,7 @@ SfxPoolItem* ScTpViewItem::Clone( SfxItemPool * ) const
#define SCLAYOUTOPT_SHEETTAB 7
#define SCLAYOUTOPT_OUTLINE 8
#define SCLAYOUTOPT_GRID_ONCOLOR 9
+#define SCLAYOUTOPT_SUMMARY 10
#define CFGPATH_DISPLAY "Office.Calc/Content/Display"
@@ -251,7 +253,8 @@ Sequence<OUString> ScViewCfg::GetLayoutPropertyNames()
"Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL
"Window/SheetTab", // SCLAYOUTOPT_SHEETTAB
"Window/OutlineSymbol", // SCLAYOUTOPT_OUTLINE
- "Line/GridOnColoredCells"}; // SCLAYOUTOPT_GRID_ONCOLOR;
+ "Line/GridOnColoredCells", // SCLAYOUTOPT_GRID_ONCOLOR;
+ "Window/SearchSummary"}; // SCLAYOUTOPT_SUMMARY
}
Sequence<OUString> ScViewCfg::GetDisplayPropertyNames()
@@ -339,6 +342,9 @@ ScViewCfg::ScViewCfg() :
case SCLAYOUTOPT_OUTLINE:
SetOption( VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
break;
+ case SCLAYOUTOPT_SUMMARY:
+ SetOption( VOPT_SUMMARY, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
+ break;
}
}
}
@@ -503,6 +509,9 @@ IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
case SCLAYOUTOPT_OUTLINE:
pValues[nProp] <<= GetOption( VOPT_OUTLINER );
break;
+ case SCLAYOUTOPT_SUMMARY:
+ pValues[nProp] <<= GetOption( VOPT_SUMMARY );
+ break;
}
}
aLayoutItem.PutProperties(aNames, aValues);
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 9491123f77e5..8b896b466ab6 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -26,9 +26,10 @@ SearchResultsDlg::SearchResultsDlg(SfxBindings* _pBindings, weld::Window* pParen
, mpDoc(nullptr)
, mxList(m_xBuilder->weld_tree_view("results"))
, mxSearchResults(m_xBuilder->weld_label("lbSearchResults"))
+ , mxShowDialog(m_xBuilder->weld_check_button("cbShow"))
{
mxList->set_size_request(mxList->get_approximate_digit_width() * 50, mxList->get_height_rows(15));
-
+ mxShowDialog->connect_toggled(LINK(this, SearchResultsDlg, OnShowToggled));
std::vector<int> aWidths;
aWidths.push_back(mxList->get_approximate_digit_width() * 10);
aWidths.push_back(mxList->get_approximate_digit_width() * 10);
@@ -187,6 +188,14 @@ IMPL_LINK_NOARG( SearchResultsDlg, ListSelectHdl, weld::TreeView&, void )
pScViewShell->AlignToCursor(aPos.Col(), aPos.Row(), SC_FOLLOW_JUMP);
}
+IMPL_STATIC_LINK( SearchResultsDlg, OnShowToggled, weld::ToggleButton&, rButton, void )
+{
+ ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
+ ScViewOptions aViewOpt( pScViewShell->GetViewData().GetOptions() );
+ aViewOpt.SetOption( VOPT_SUMMARY, rButton.get_active() );
+ pScViewShell->GetViewData().SetOptions( aViewOpt );
+}
+
SearchResultsDlgWrapper::SearchResultsDlgWrapper(
vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* /*pInfo*/)
: SfxChildWindow(_pParent, nId)
diff --git a/sc/source/ui/inc/searchresults.hxx b/sc/source/ui/inc/searchresults.hxx
index ff092f897b48..bbc734803c2b 100644
--- a/sc/source/ui/inc/searchresults.hxx
+++ b/sc/source/ui/inc/searchresults.hxx
@@ -27,8 +27,10 @@ class SearchResultsDlg : public SfxDialogController
ScDocument* mpDoc;
std::unique_ptr<weld::TreeView> mxList;
std::unique_ptr<weld::Label> mxSearchResults;
+ std::unique_ptr<weld::CheckButton> mxShowDialog;
DECL_LINK(ListSelectHdl, weld::TreeView&, void);
+ DECL_STATIC_LINK(SearchResultsDlg, OnShowToggled, weld::ToggleButton&, void);
public:
SearchResultsDlg(SfxBindings* _pBindings, weld::Window* pParent);
virtual ~SearchResultsDlg() override;
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 15b30184e149..0079d6172738 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -55,6 +55,7 @@ class ScTpContentOptions : public SfxTabPage
VclPtr<CheckBox> pVScrollCB;
VclPtr<CheckBox> pTblRegCB;
VclPtr<CheckBox> pOutlineCB;
+ VclPtr<CheckBox> pSummaryCB;
std::unique_ptr<ScViewOptions> pLocalOptions;
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index d16b9b2e3e6a..e4a10483313d 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -60,6 +60,7 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent,
get(pVScrollCB,"vscroll");
get(pTblRegCB,"tblreg");
get(pOutlineCB,"outline");
+ get(pSummaryCB,"cbSummary");
SetExchangeSupport();
Link<ListBox&,void> aSelObjHdl(LINK( this, ScTpContentOptions, SelLbObjHdl ) );
@@ -83,6 +84,7 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent,
pBreakCB ->SetClickHdl(aCBHdl);
pGuideLineCB->SetClickHdl(aCBHdl);
pRowColHeaderCB->SetClickHdl(aCBHdl);
+ pSummaryCB->SetClickHdl(aCBHdl);
pColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
pColorLB->SetAutoDisplayColor(SC_STD_GRIDCOLOR);
@@ -117,6 +119,7 @@ void ScTpContentOptions::dispose()
pVScrollCB.clear();
pTblRegCB.clear();
pOutlineCB.clear();
+ pSummaryCB.clear();
SfxTabPage::dispose();
}
@@ -146,6 +149,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
pOutlineCB ->IsValueChangedFromSaved() ||
pColorLB ->IsValueChangedFromSaved() ||
pBreakCB ->IsValueChangedFromSaved() ||
+ pSummaryCB ->IsValueChangedFromSaved() ||
pGuideLineCB ->IsValueChangedFromSaved())
{
NamedColor aNamedColor = pColorLB->GetSelectedEntry();
@@ -196,6 +200,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
pVScrollCB->Check( pLocalOptions->GetOption(VOPT_VSCROLL) );
pTblRegCB ->Check( pLocalOptions->GetOption(VOPT_TABCONTROLS) );
pOutlineCB->Check( pLocalOptions->GetOption(VOPT_OUTLINER) );
+ pSummaryCB->Check( pLocalOptions->GetOption(VOPT_SUMMARY) );
InitGridOpt();
@@ -228,6 +233,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
pColorLB->SaveValue();
pBreakCB->SaveValue();
pGuideLineCB->SaveValue();
+ pSummaryCB->SaveValue();
}
void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet)
@@ -276,6 +282,7 @@ IMPL_LINK( ScTpContentOptions, CBHdl, Button*, pBtn, void )
else if ( pBreakCB == pBtn ) eOption = VOPT_PAGEBREAKS;
else if ( pGuideLineCB == pBtn ) eOption = VOPT_HELPLINES;
else if ( pRowColHeaderCB == pBtn ) eOption = VOPT_HEADER;
+ else if ( pSummaryCB == pBtn ) eOption = VOPT_SUMMARY;
pLocalOptions->SetOption( eOption, bChecked );
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 7cc06cdd44c8..f34ce438dae7 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1875,7 +1875,9 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if (nCommand == SvxSearchCmd::FIND_ALL || nCommand == SvxSearchCmd::REPLACE_ALL)
{
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
- if (pViewFrm && !comphelper::LibreOfficeKit::isActive())
+ bool bShow = GetViewData().GetViewShell()->GetViewData().GetOptions().GetOption( VOPT_SUMMARY );
+
+ if (bShow && pViewFrm && !comphelper::LibreOfficeKit::isActive())
{
pViewFrm->ShowChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
SfxChildWindow* pWnd = pViewFrm->GetChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
diff --git a/sc/uiconfig/scalc/ui/searchresults.ui b/sc/uiconfig/scalc/ui/searchresults.ui
index bae6d7952f42..cb8fbaf44e7e 100644
--- a/sc/uiconfig/scalc/ui/searchresults.ui
+++ b/sc/uiconfig/scalc/ui/searchresults.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.1 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<object class="GtkTreeStore" id="liststore3">
@@ -29,8 +29,27 @@
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="layout_style">end</property>
<child>
+ <object class="GtkCheckButton" id="cbShow">
+ <property name="label" translatable="yes" context="searchresults|ShowBox">_Show this dialog</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes" context="searchresults|ShowBox">Enable the dialog again at Tools &gt; Options &gt; Calc &gt; View</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<property name="visible">True</property>
@@ -43,7 +62,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui b/sc/uiconfig/scalc/ui/tpviewpage.ui
index 091dfe7e29ef..daade25fdc15 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Thu Jan 9 10:47:53 2014 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
@@ -278,6 +278,24 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="cbSummary">
+ <property name="label" translatable="yes" context="tpviewpage|summary">Summary o_n search</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="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ </packing>
+ </child>
</object>
</child>
</object>