[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/source sc/uiconfig
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |8 sc/inc/inputopt.hxx |3 + sc/inc/sc.hrc|2 + sc/source/core/tool/inputopt.cxx | 10 - sc/source/ui/app/scmod.cxx | 10 + sc/source/ui/inc/tpview.hxx |1 sc/source/ui/optdlg/tpview.cxx | 11 + sc/source/ui/view/gridwin.cxx|6 ++- sc/uiconfig/scalc/ui/scgeneralpage.ui| 30 +++ 9 files changed, 72 insertions(+), 9 deletions(-) New commits: commit a6e1647612cc3d39e8a6e44c9365ccecb1da2fe6 Author: Martin van Zijl AuthorDate: Sat Jun 6 15:57:54 2020 +1200 Commit: Eike Rathke CommitDate: Wed Nov 18 13:55:59 2020 +0100 tdf#34686 calc: add option to disable paste with enter key Change-Id: Ie20a8931a16f6609ac5be23032a0b2e3a7ad1784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95627 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 0762279bf3db..5b3a2043e63b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -754,6 +754,14 @@ false + + + + Press Enter to paste and clear clipboard + Press Enter to paste and clear clipboard + +true + diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx index 4cff5d14cf48..52811ee93c5c 100644 --- a/sc/inc/inputopt.hxx +++ b/sc/inc/inputopt.hxx @@ -38,6 +38,7 @@ private: boolbTextWysiwyg; boolbReplCellsWarn; boolbLegacyCellSelection; +boolbEnterPasteMode; public: ScInputOptions(); @@ -68,6 +69,8 @@ public: boolGetReplaceCellsWarn() const { return bReplCellsWarn; } voidSetLegacyCellSelection(bool bSet) { bLegacyCellSelection = bSet; } boolGetLegacyCellSelection() const { return bLegacyCellSelection; } +voidSetEnterPasteMode(bool bSet){ bEnterPasteMode = bSet; } +boolGetEnterPasteMode() const { return bEnterPasteMode; } }; // CfgItem for input options diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index b493545ec810..e80825624dea 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -113,6 +113,8 @@ // misc: #define SID_LINKS (SC_VIEW_START + 60) #define SID_INSERT_SMATH(SC_VIEW_START + 63) +// Put this here since all available slots for "SC_INPUT" are taken +#define SID_SC_INPUT_ENTER_PASTE_MODE (SC_VIEW_START + 64) #define SID_MIRROR_VERTICAL (SC_VIEW_START + 65) #define SID_MIRROR_HORIZONTAL (SC_VIEW_START + 66) #define SID_CELL_FORMAT_RESET (SC_VIEW_START + 67) diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index 0ceefd1fa9f1..380c4391f307 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -69,6 +69,7 @@ void ScInputOptions::SetDefaults() #define SCINPUTOPT_TEXTWYSIWYG 9 #define SCINPUTOPT_REPLCELLSWARN 10 #define SCINPUTOPT_LEGACY_CELL_SELECTION 11 +#define SCINPUTOPT_ENTER_PASTE_MODE 12 Sequence ScInputCfg::GetPropertyNames() { @@ -83,7 +84,8 @@ Sequence ScInputCfg::GetPropertyNames() "UseTabCol",// SCINPUTOPT_USETABCOL "UsePrinterMetrics",// SCINPUTOPT_TEXTWYSIWYG "ReplaceCellsWarning", // SCINPUTOPT_REPLCELLSWARN -"LegacyCellSelection"}; // SCINPUTOPT_LEGACY_CELL_SELECTION +"LegacyCellSelection", // SCINPUTOPT_LEGACY_CELL_SELECTION +"EnterPasteMode"}; // SCINPUTOPT_ENTER_PASTE_MODE } ScInputCfg::ScInputCfg() : @@ -142,6 +144,9 @@ ScInputCfg::ScInputCfg() : case SCINPUTOPT_LEGACY_CELL_SELECTION: SetLegacyCellSelection( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); break; +case SCINPUTOPT_ENTER_PASTE_MODE: +SetEnterPasteMode( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); +break; } } } @@ -193,6 +198,9 @@ void ScInputCfg::ImplCommit() case SCINPUTOPT_LEGACY_CELL_SELECTION: pValues[nProp] <<= GetLegacyCellSelection(); break; +case SCINPUTOPT_ENTER_PASTE_MODE: +pValues[nProp] <<= GetEnterPasteMode(); +break; } } PutProperties(aNames, aValues); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index d39c9df9a683..f0a992e774bf 100644 ---
[Libreoffice-commits] core.git: sc/source sc/uiconfig
sc/source/ui/dbgui/filtdlg.cxx | 184 ++- sc/source/ui/inc/filtdlg.hxx | 10 + sc/uiconfig/scalc/ui/standardfilterdialog.ui | 79 +++ 3 files changed, 241 insertions(+), 32 deletions(-) New commits: commit 937b780e3f696552fc686bf0c80c3050443b111a Author: Martin van Zijl AuthorDate: Wed May 27 08:21:39 2020 +1200 Commit: Heiko Tietze CommitDate: Tue Sep 15 08:40:04 2020 +0200 tdf#76898 standard filter: add buttons to remove conditions Change-Id: If59ff911c66537a6449231bc9d54817c4fa86d7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94892 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 2b0d5618a92c..2e4ac4730545 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -65,18 +65,22 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , m_xLbField1(m_xBuilder->weld_combo_box("field1")) , m_xLbCond1(m_xBuilder->weld_combo_box("cond1")) , m_xEdVal1(m_xBuilder->weld_combo_box("val1")) +, m_xBtnRemove1(m_xBuilder->weld_button("remove1")) , m_xLbConnect2(m_xBuilder->weld_combo_box("connect2")) , m_xLbField2(m_xBuilder->weld_combo_box("field2")) , m_xLbCond2(m_xBuilder->weld_combo_box("cond2")) , m_xEdVal2(m_xBuilder->weld_combo_box("val2")) +, m_xBtnRemove2(m_xBuilder->weld_button("remove2")) , m_xLbConnect3(m_xBuilder->weld_combo_box("connect3")) , m_xLbField3(m_xBuilder->weld_combo_box("field3")) , m_xLbCond3(m_xBuilder->weld_combo_box("cond3")) , m_xEdVal3(m_xBuilder->weld_combo_box("val3")) +, m_xBtnRemove3(m_xBuilder->weld_button("remove3")) , m_xLbConnect4(m_xBuilder->weld_combo_box("connect4")) , m_xLbField4(m_xBuilder->weld_combo_box("field4")) , m_xLbCond4(m_xBuilder->weld_combo_box("cond4")) , m_xEdVal4(m_xBuilder->weld_combo_box("val4")) +, m_xBtnRemove4(m_xBuilder->weld_button("remove4")) , m_xContents(m_xBuilder->weld_widget("grid")) , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar")) , m_xExpander(m_xBuilder->weld_expander("more")) @@ -152,6 +156,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) m_xLbCond3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) ); m_xLbCond4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) ); +m_xBtnRemove1->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) ); +m_xBtnRemove2->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) ); +m_xBtnRemove3->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) ); +m_xBtnRemove4->connect_clicked( LINK( this, ScFilterDlg, BtnRemoveHdl ) ); + pViewData = rQueryItem.GetViewData(); pDoc= pViewData ? pViewData->GetDocument() : nullptr; nSrcTab = pViewData ? pViewData->GetTabNo() : static_cast(0); @@ -177,6 +186,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) maConnLbArr.push_back(m_xLbConnect2.get()); maConnLbArr.push_back(m_xLbConnect3.get()); maConnLbArr.push_back(m_xLbConnect4.get()); +maRemoveBtnArr.reserve(QUERY_ENTRY_COUNT); +maRemoveBtnArr.push_back(m_xBtnRemove1.get()); +maRemoveBtnArr.push_back(m_xBtnRemove2.get()); +maRemoveBtnArr.push_back(m_xBtnRemove3.get()); +maRemoveBtnArr.push_back(m_xBtnRemove4.get()); // Option initialization: pOptionsMgr.reset( new ScFilterOptionsMgr( @@ -223,37 +237,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) else { OUString aQueryStr = rItem.maString.getString(); -if (aQueryStr.isEmpty()) -{ -if (rItem.meType == ScQueryEntry::ByValue) -{ -if (pDoc) -{ - pDoc->GetFormatTable()->GetInputLineString(rItem.mfVal, 0, aValStr); -} -} -else if (rItem.meType == ScQueryEntry::ByDate) -{ -if (pDoc) -{ -SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); -pFormatter->GetInputLineString(rItem.mfVal, - pFormatter->GetStandardFormat( SvNumFormatType::DATE), aValStr); -} -} -else -{ -SAL_WARN( "sc", "ScFilterDlg::Init: empty query string, really?"); -aValStr = aQueryStr; -} -} -else -{ -// XXX NOTE: if not ByString we just assume this has been -// set to a proper string corresponding to the numeric -//
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/docvw/edtwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1675f5c0f600c817b0b9a0ab0a79ae32c43e5b93 Author: Martin van Zijl AuthorDate: Thu Sep 10 11:44:05 2020 +1200 Commit: Jim Raykowski CommitDate: Sat Sep 12 11:19:07 2020 +0200 tdf#41202 writer: allow shift+click to decrease selection Change-Id: I8f0f03a3ea0eafda166d19a5cd9fa24e97345a69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102399 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 279bf08127a6..508fac7d2fd1 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3735,7 +3735,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if( !bOverSelect ) bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos ); -if ( !bOverSelect ) +if ( !bOverSelect || rSh.IsInSelect() ) { MoveCursor( rSh, aDocPos, bOnlyText, bLockView ); bCallBase = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: avmedia/source svx/source
avmedia/source/gstreamer/gstplayer.cxx |2 -- svx/source/sidebar/media/MediaPlaybackPanel.cxx |1 - 2 files changed, 3 deletions(-) New commits: commit 5989ffe70942af036974b70c9e0ecd67978c6cc6 Author: Martin van Zijl AuthorDate: Wed Jul 1 07:42:29 2020 +1200 Commit: Noel Grandin CommitDate: Tue Sep 8 08:27:13 2020 +0200 tdf#34759 fix media player pausing when pressing time slider Change-Id: I196549f168d67895510a239640c492cfc421fb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97644 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index 9511be54b5ae..932e1dd1c6e1 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -684,8 +684,6 @@ void SAL_CALL Player::setMediaTime( double fTime ) GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, gst_position, GST_SEEK_TYPE_NONE, 0 ); -if( !isPlaying() ) -gst_element_set_state( mpPlaybin, GST_STATE_PAUSED ); SAL_INFO( "avmedia.gstreamer", AVVERSION "seek to: " << gst_position << " ns original: " << fTime << " s" ); } diff --git a/svx/source/sidebar/media/MediaPlaybackPanel.cxx b/svx/source/sidebar/media/MediaPlaybackPanel.cxx index b62eb3292b91..2b2cd5d10ab8 100644 --- a/svx/source/sidebar/media/MediaPlaybackPanel.cxx +++ b/svx/source/sidebar/media/MediaPlaybackPanel.cxx @@ -133,7 +133,6 @@ IMPL_LINK_NOARG( MediaPlaybackPanel, VolumeSlideHdl, weld::Scale&, void) IMPL_LINK_NOARG( MediaPlaybackPanel, SeekHdl, weld::Scale&, void) { MediaItem aItem(SID_AVMEDIA_TOOLBOX); -aItem.setState( MediaState::Pause ); double nTime = 0; if (mpMediaItem) nTime = mxTimeSlider->get_value() * mpMediaItem->getDuration() / AVMEDIA_TIME_RANGE; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source sc/uiconfig
sc/source/ui/dbgui/filtdlg.cxx | 57 +++ sc/source/ui/inc/filtdlg.hxx |2 sc/uiconfig/scalc/ui/standardfilterdialog.ui | 22 +- 3 files changed, 78 insertions(+), 3 deletions(-) New commits: commit 1ee221ad65ff5e3a725e80777406ac7f94ff3a72 Author: Martin van Zijl AuthorDate: Sun May 24 16:33:29 2020 +1200 Commit: Heiko Tietze CommitDate: Mon Jun 1 10:24:57 2020 +0200 tdf#76898 add ability to reset standard filter Change-Id: If0694fe521770b86f4367fc39c087df8a89a976c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94767 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index addfedbe0f4c..22cc256baf74 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -80,6 +80,7 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , m_xContents(m_xBuilder->weld_widget("grid")) , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar")) , m_xExpander(m_xBuilder->weld_expander("more")) +, m_xBtnClear(m_xBuilder->weld_button("clear")) , m_xBtnOk(m_xBuilder->weld_button("ok")) , m_xBtnCancel(m_xBuilder->weld_button("cancel")) , m_xBtnCase(m_xBuilder->weld_check_button("case")) @@ -121,6 +122,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) const ScQueryItem& rQueryItem = static_cast( rArgSet.Get( nWhichQuery )); +m_xBtnClear->connect_clicked ( LINK( this, ScFilterDlg, BtnClearHdl ) ); m_xBtnOk->connect_clicked ( LINK( this, ScFilterDlg, EndDlgHdl ) ); m_xBtnCancel->connect_clicked ( LINK( this, ScFilterDlg, EndDlgHdl ) ); m_xBtnHeader->connect_clicked ( LINK( this, ScFilterDlg, CheckBoxHdl ) ); @@ -630,6 +632,61 @@ bool ScFilterDlg::IsRefInputMode() const // Handler: +IMPL_LINK( ScFilterDlg, BtnClearHdl, weld::Button&, rBtn, void ) +{ +if ( == m_xBtnClear.get() ) +{ +// scroll to the top +m_xScrollBar->vadjustment_set_value(0); +size_t nOffset = 0; +RefreshEditRow( nOffset); + +// clear all conditions +m_xLbConnect1->set_active(-1); +m_xLbConnect2->set_active(-1); +m_xLbConnect3->set_active(-1); +m_xLbConnect4->set_active(-1); +m_xLbField1->set_active(0); +m_xLbField2->set_active(0); +m_xLbField3->set_active(0); +m_xLbField4->set_active(0); +m_xLbCond1->set_active(0); +m_xLbCond2->set_active(0); +m_xLbCond3->set_active(0); +m_xLbCond4->set_active(0); +ClearValueList( 1 ); +ClearValueList( 2 ); +ClearValueList( 3 ); +ClearValueList( 4 ); + +// disable fields for second row onward +m_xLbConnect2->set_sensitive(false); +m_xLbConnect3->set_sensitive(false); +m_xLbConnect4->set_sensitive(false); +m_xLbField2->set_sensitive(false); +m_xLbField3->set_sensitive(false); +m_xLbField4->set_sensitive(false); +m_xLbCond2->set_sensitive(false); +m_xLbCond3->set_sensitive(false); +m_xLbCond4->set_sensitive(false); +m_xEdVal2->set_sensitive(false); +m_xEdVal3->set_sensitive(false); +m_xEdVal4->set_sensitive(false); + +// clear query data objects +SCSIZE nCount = theQueryData.GetEntryCount(); +if (maRefreshExceptQuery.size() < nCount + 1) +maRefreshExceptQuery.resize(nCount + 1, false); +for (SCSIZE i = 0; i < nCount; ++i) +{ +theQueryData.GetEntry(i).bDoQuery = false; +maRefreshExceptQuery[i] = false; +theQueryData.GetEntry(i).nField = static_cast(0); +} +maRefreshExceptQuery[0] = true; +} +} + IMPL_LINK( ScFilterDlg, EndDlgHdl, weld::Button&, rBtn, void ) { if ( == m_xBtnOk.get() ) diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 8445f1c462a6..e6c2d375f1c1 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -118,6 +118,7 @@ private: std::unique_ptr m_xScrollBar; std::unique_ptr m_xExpander; +std::unique_ptr m_xBtnClear; std::unique_ptr m_xBtnOk; std::unique_ptr m_xBtnCancel; @@ -146,6 +147,7 @@ private: DECL_LINK( LbSelectHdl, weld::ComboBox&, void ); DECL_LINK( ValModifyHdl, weld::ComboBox&, void ); DECL_LINK( CheckBoxHdl, weld::Button&, void ); +DECL_LINK( BtnClearHdl, weld::Button&, void ); DECL_LINK( EndDlgHdl,weld::Button&, void ); DECL_LINK( ScrollHdl, weld::ScrolledWindow&, void ); DECL_LINK( MoreExpandedHdl, weld::Expander&, void ); diff --git a/sc/uiconfig/scalc/ui/standardfilterdialog.ui b/sc/uiconfig/scalc/ui/standardfilterdialog.ui index a71da96fbb22..b657df65816e 100644 --- a/sc/uiconfig/scalc/ui/standardfilterdialog.ui +++
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source
sc/source/ui/app/inputwin.cxx | 116 + sc/source/ui/inc/inputwin.hxx |3 + sc/source/ui/view/tabvwsh4.cxx | 21 +++ 3 files changed, 84 insertions(+), 56 deletions(-) New commits: commit c44ea3d7d55bc309a078fb01a09994e6098c3ff4 Author: Martin van Zijl AuthorDate: Mon May 18 05:32:32 2020 +1200 Commit: Eike Rathke CommitDate: Thu May 28 19:03:10 2020 +0200 tdf#39302 add "alt + =" shortcut for autosum Change-Id: I11e2f77e8d8ec81d9ea6d5bc4e8ef31ec7dedc67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94386 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit f4b47f7d335227d037c2c2e9f662724d4b8c73d4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94964 diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index bdbf32321d44..cb2b00b51d58 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include @@ -821,6 +820,43 @@ void ScInputWindow::MouseButtonUp( const MouseEvent& rMEvt ) ToolBox::MouseButtonUp( rMEvt ); } +void ScInputWindow::AutoSum( bool& bRangeFinder, bool& bSubTotal, OpCode eCode ) +{ +ScModule* pScMod = SC_MOD(); +ScTabViewShell* pViewSh = dynamic_cast( SfxViewShell::Current() ); +if ( pViewSh ) +{ +const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, bSubTotal, eCode); +if ( !aFormula.isEmpty() ) +{ +SetFuncString( aFormula ); +const sal_Int32 aOpen = aFormula.indexOf('('); +const sal_Int32 aLen = aFormula.getLength(); +if (bRangeFinder && pScMod->IsEditMode()) +{ +ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh ); +if ( pHdl ) +{ +pHdl->InitRangeFinder( aFormula ); + +//! SetSelection at the InputHandler? +//! Set bSelIsRef? +if ( aOpen != -1 && aLen > aOpen ) +{ +ESelection aSel( 0, aOpen + (bSubTotal ? 3 : 1), 0, aLen-1 ); +EditView* pTableView = pHdl->GetTableView(); +if ( pTableView ) +pTableView->SetSelection( aSel ); +EditView* pTopView = pHdl->GetTopView(); +if ( pTopView ) +pTopView->SetSelection( aSel ); +} +} +} +} +} +} + ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, ScTabViewShell* pViewSh) : ScTextWndBase(pParent, WinBits(WB_HIDE | WB_TABSTOP)), maTextWndGroup(VclPtr::Create(this, pViewSh)), @@ -962,63 +998,31 @@ IMPL_LINK( ScInputWindow, MenuHdl, Menu *, pMenu, bool ) OString aCommand = pMenu->GetCurItemIdent(); if (!aCommand.isEmpty()) { -ScModule* pScMod = SC_MOD(); -ScTabViewShell* pViewSh = dynamic_cast( SfxViewShell::Current() ); -if ( pViewSh ) +bool bSubTotal = false; +bool bRangeFinder = false; +OpCode eCode = ocSum; +if ( aCommand == "sum" ) { -bool bSubTotal = false; -bool bRangeFinder = false; -OpCode eCode = ocSum; -if ( aCommand == "sum" ) -{ -eCode = ocSum; -} -else if ( aCommand == "average" ) -{ -eCode = ocAverage; -} -else if ( aCommand == "max" ) -{ -eCode = ocMax; -} -else if ( aCommand == "min" ) -{ -eCode = ocMin; -} -else if ( aCommand == "count" ) -{ -eCode = ocCount; -} - -const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, bSubTotal, eCode); -if ( !aFormula.isEmpty() ) -{ -SetFuncString( aFormula ); -const sal_Int32 aOpen = aFormula.indexOf('('); -const sal_Int32 aLen = aFormula.getLength(); -if (bRangeFinder && pScMod->IsEditMode()) -{ -ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh ); -if ( pHdl ) -{ -pHdl->InitRangeFinder( aFormula ); - -//! SetSelection at the InputHandler? -//! Set bSelIsRef? -if ( aOpen != -1 && aLen > aOpen ) -{ -ESelection aSel( 0, aOpen + (bSubTotal ? 3 : 1), 0, aLen-1 ); -EditView* pTableView = pHdl->GetTableView(); -if ( pTableView ) -
[Libreoffice-commits] core.git: sc/source
sc/source/ui/app/inputwin.cxx | 116 + sc/source/ui/inc/inputwin.hxx |3 + sc/source/ui/view/tabvwsh4.cxx | 21 +++ 3 files changed, 84 insertions(+), 56 deletions(-) New commits: commit fef7a9e67b44c2c269f25ee211c3efd01d215a47 Author: Martin van Zijl AuthorDate: Mon May 18 05:32:32 2020 +1200 Commit: Eike Rathke CommitDate: Thu May 28 16:05:58 2020 +0200 tdf#39302 add "alt + =" shortcut for autosum Change-Id: I11e2f77e8d8ec81d9ea6d5bc4e8ef31ec7dedc67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94386 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index bdbf32321d44..cb2b00b51d58 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include @@ -821,6 +820,43 @@ void ScInputWindow::MouseButtonUp( const MouseEvent& rMEvt ) ToolBox::MouseButtonUp( rMEvt ); } +void ScInputWindow::AutoSum( bool& bRangeFinder, bool& bSubTotal, OpCode eCode ) +{ +ScModule* pScMod = SC_MOD(); +ScTabViewShell* pViewSh = dynamic_cast( SfxViewShell::Current() ); +if ( pViewSh ) +{ +const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, bSubTotal, eCode); +if ( !aFormula.isEmpty() ) +{ +SetFuncString( aFormula ); +const sal_Int32 aOpen = aFormula.indexOf('('); +const sal_Int32 aLen = aFormula.getLength(); +if (bRangeFinder && pScMod->IsEditMode()) +{ +ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh ); +if ( pHdl ) +{ +pHdl->InitRangeFinder( aFormula ); + +//! SetSelection at the InputHandler? +//! Set bSelIsRef? +if ( aOpen != -1 && aLen > aOpen ) +{ +ESelection aSel( 0, aOpen + (bSubTotal ? 3 : 1), 0, aLen-1 ); +EditView* pTableView = pHdl->GetTableView(); +if ( pTableView ) +pTableView->SetSelection( aSel ); +EditView* pTopView = pHdl->GetTopView(); +if ( pTopView ) +pTopView->SetSelection( aSel ); +} +} +} +} +} +} + ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, ScTabViewShell* pViewSh) : ScTextWndBase(pParent, WinBits(WB_HIDE | WB_TABSTOP)), maTextWndGroup(VclPtr::Create(this, pViewSh)), @@ -962,63 +998,31 @@ IMPL_LINK( ScInputWindow, MenuHdl, Menu *, pMenu, bool ) OString aCommand = pMenu->GetCurItemIdent(); if (!aCommand.isEmpty()) { -ScModule* pScMod = SC_MOD(); -ScTabViewShell* pViewSh = dynamic_cast( SfxViewShell::Current() ); -if ( pViewSh ) +bool bSubTotal = false; +bool bRangeFinder = false; +OpCode eCode = ocSum; +if ( aCommand == "sum" ) { -bool bSubTotal = false; -bool bRangeFinder = false; -OpCode eCode = ocSum; -if ( aCommand == "sum" ) -{ -eCode = ocSum; -} -else if ( aCommand == "average" ) -{ -eCode = ocAverage; -} -else if ( aCommand == "max" ) -{ -eCode = ocMax; -} -else if ( aCommand == "min" ) -{ -eCode = ocMin; -} -else if ( aCommand == "count" ) -{ -eCode = ocCount; -} - -const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, bSubTotal, eCode); -if ( !aFormula.isEmpty() ) -{ -SetFuncString( aFormula ); -const sal_Int32 aOpen = aFormula.indexOf('('); -const sal_Int32 aLen = aFormula.getLength(); -if (bRangeFinder && pScMod->IsEditMode()) -{ -ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh ); -if ( pHdl ) -{ -pHdl->InitRangeFinder( aFormula ); - -//! SetSelection at the InputHandler? -//! Set bSelIsRef? -if ( aOpen != -1 && aLen > aOpen ) -{ -ESelection aSel( 0, aOpen + (bSubTotal ? 3 : 1), 0, aLen-1 ); -EditView* pTableView = pHdl->GetTableView(); -if ( pTableView ) -pTableView->SetSelection( aSel ); -EditView* pTopView = pHdl->GetTopView(); -if ( pTopView ) -
[Libreoffice-commits] core.git: cui/source include/svx officecfg/registry sw/inc sw/source
cui/source/dialogs/splitcelldlg.cxx |6 ++ cui/source/inc/splitcelldlg.hxx |1 + include/svx/svxdlg.hxx|1 + officecfg/registry/schema/org/openoffice/Office/Writer.xcs|7 +++ officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs |7 +++ sw/inc/doc.hxx|2 ++ sw/inc/modcfg.hxx |8 sw/inc/swmodule.hxx |2 ++ sw/source/core/doc/doc.cxx| 10 ++ sw/source/uibase/app/swmodul1.cxx | 10 ++ sw/source/uibase/config/modcfg.cxx|6 +- sw/source/uibase/inc/wrtsh.hxx|3 +++ sw/source/uibase/shells/tabsh.cxx |6 ++ sw/source/uibase/wrtsh/select.cxx | 10 ++ 14 files changed, 78 insertions(+), 1 deletion(-) New commits: commit a80317b602e175f780cd662b5526a538d053419a Author: Martin van Zijl AuthorDate: Wed Dec 26 07:21:59 2018 +1300 Commit: Samuel Mehrbrodt CommitDate: Wed Mar 27 16:54:53 2019 +0100 tdf#60242 remember horizontal/vertical choice in split cells dialog Change-Id: I25f6b7c8ff6aa678b597bbede0dd1492468f2f62 Reviewed-on: https://gerrit.libreoffice.org/65606 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 903c998bb526..6c9a7443c54e 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -83,4 +83,10 @@ short SvxSplitTableDlg::Execute() return run(); } +void SvxSplitTableDlg::SetSplitVerticalByDefault() +{ +if( mnMaxVertical >= 2 ) +m_xVertBox->set_active(true); // tdf#60242 +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx index 9b4c1f34c668..b0c2fddae3c7 100644 --- a/cui/source/inc/splitcelldlg.hxx +++ b/cui/source/inc/splitcelldlg.hxx @@ -43,6 +43,7 @@ public: virtual long GetCount() const override; virtual short Execute() override; +virtual void SetSplitVerticalByDefault() override; }; #endif diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 8547dc306e1b..2a50a9ccde03 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -295,6 +295,7 @@ public: virtual bool IsHorizontal() const = 0; virtual bool IsProportional() const = 0; virtual long GetCount() const = 0; +virtual void SetSplitVerticalByDefault() = 0; }; class SvxAbstractNewTableDialog : public VclAbstractDialog diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index d18a5469079c..3b147dcfd25d 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -2308,6 +2308,13 @@ true + + +Specifies whether cells should be split vertically by default. +Split vertically by default + + false + diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs index cd655115ac99..917751492689 100644 --- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs @@ -869,6 +869,13 @@ false + + +Specifies whether cells should be split vertically by default. +Split vertically by default + + false + diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 3ebbec5e1cc2..9bba13ef17be 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1197,6 +1197,8 @@ public: bool IsInsTableFormatNum() const; bool IsInsTableChangeNumFormat() const; bool IsInsTableAlignNum() const; +bool IsSplitVerticalByDefault() const; +void SetSplitVerticalByDefault(bool value); // From FEShell (for Undo and BModified). static void GetTabCols( SwTabCols , const SwCellFrame* pBoxFrame ); diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index 550cb1c332be..795d1f382fdc 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -155,6 +155,7 @@ class SwTableConfig : public utl::ConfigItem boolm_bInsTableFormatNum; // Table/Input/NumberRecognition // Automatic recognition of numbers. boolm_bInsTableChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatic recognition of number formats. boolm_bInsTableAlignNum;